Skip to content

With LM Studio 4.19 , JSON schema conversion failed: Pattern must start with '^' and end with '$' #2168

Description

@daedon

LM Studio 4.19 Build 2
OS Linux Mint VERSION 22.1 (Xia)

What is the bug?
OpenClaw 2026.7.1 with LM Studio 4.19 Build 2
This began after an OpenClaw update
Any prompt fails.
LM Studio returns:
JSON schema conversion failed:
Pattern must start with '^' and end with '$'
Looking at the request, OpenClaw emits tool schemas containing patterns such as:
"pattern":"\S"
which LM Studio rejects.
Reverting to LM Studio 4.18 fixes the problem
GPT Suggests LM Studio 4.19 validates JSON Schema more strictly than before.

Logs
2026-07-16 14:53:27 [DEBUG]
16.53.791.150 W srv operator(): got exception: {"error":{"code":400,"message":"Unable to generate parser for this template. Automatic parser generation failed: JSON schema conversion failed:\nPattern must start with '^' and end with '$'","type":"invalid_request_error"}}
2026-07-16 14:53:27 [ERROR]
[qwen/qwen3.5-9b] Engine protocol predict request returned 400: {"error":{"code":400,"message":"Unable to generate parser for this template. Automatic parser generation failed: JSON schema conversion failed:\nPattern must start with '^' and end with '$'","type":"invalid_request_error"}}. Error Data: n/a, Additional Data: n/a
2026-07-16 14:53:29 [DEBUG]
16.56.328.701 I slot print_timing: id 2 | task 99 | n_decoded = 361, tg = 120.01 t/s, tg_3s = 120.01 t/s
2026-07-16 14:53:31 [DEBUG]
16.57.663.232 I slot print_timing: id 2 | task 99 | prompt eval time = 49.74 ms / 56 tokens ( 0.89 ms per token, 1125.88 tokens per second)
16.57.663.236 I slot print_timing: id 2 | task 99 | eval time = 4342.49 ms / 521 tokens ( 8.33 ms per token, 119.98 tokens per second)
16.57.663.236 I slot print_timing: id 2 | task 99 | total time = 4392.23 ms / 577 tokens
16.57.663.237 I slot print_timing: id 2 | task 99 | graphs reused = 612
16.57.663.251 I slot release: id 2 | task 99 | stop processing: n_tokens = 576, truncated = 0
2026-07-16 14:53:31 [INFO]
[qwen/qwen3.5-9b] Finished streaming response

TO REPRODUCE
Launch LM Studio with qwen/qwen3.5-9b
Launch OpenClaw
Say Hello
After "Hello" TUI & Dashboard fail with "The agent run failed before producing a reply" and telegram fails with "LLM request failed".
Reverting to LM Studio 4.18 fixes everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions