Skip to content

Issue with 2026.7.1 #106779

Closed
Closed

Description

@delimir

Path: /help/troubleshooting

OpenClaw 2026.7.1

llama.cpp
version 9950 (961e4b26a)

MacBook Pro M5 Max
macOS 26.5.2

Works:

  • curl /v1/chat/completions
  • ChatGPT provider

Fails:

  • any local llama.cpp provider

Error:

400 Unable to generate parser for this template.
Automatic parser generation failed:
JSON schema conversion failed:
Pattern must start with '^' and end with '$'

OpenClaw logs:
reason=format

Tools enabled: same
Tools disabled: same

Doctor:
20 skills
54 plugins
0 plugin errors

Activity

  1. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jul 13, 2026
  2. clawsweeper commented on Jul 13, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    Close as implemented on current main: the exact unanchored pattern in the cron tool schema was removed, and current provider projection also strips unsupported llama.cpp schema patterns.

    Possible regression — probable (reproduction; failure trace). No predecessor PR is attributed.

    Root-cause cluster
    Relationship: same_root_cause
    Canonical: #107449
    Summary: This issue and the canonical cron-schema report describe the same llama.cpp pattern-parser failure; later shared projection work generalized the protection.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Retain the canonical schema projection; any new report should reproduce on current main and identify the exact remaining rejected keyword and endpoint profile.

    Do we have a high-confidence way to reproduce the issue?

    No on current main: the reported pattern is absent from the cron schema and regression coverage verifies the llama.cpp-safe projection, although no live local server was run in this read-only review.

    Is this the best way to solve the issue?

    Yes; removing the invalid model-facing schema constraint at its producer and applying the shared provider projection is more maintainable than requiring per-model workaround settings.

    Security review:

    Security review: No patch is under review.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • lee-xydt: Authored the direct cron-schema repair for the llama.cpp pattern failure. (role: focused repair author; confidence: high; commits: c6a9f5339b01; files: src/agents/tools/cron-tool-schema.ts, src/agents/tools/cron-tool.schema.test.ts)
    • steipete: Authored the later shared llama.cpp-safe schema projection used across local provider paths. (role: recent provider-compatibility contributor; confidence: high; commits: 98a066c90e8a; files: packages/ai/src/providers/clean-for-llamacpp-gbnf.ts, extensions/llama-cpp/index.ts)
    • mohandasjithin: Co-authored the broader local-provider schema projection that carries the compatibility invariant beyond cron. (role: shared projection co-author; confidence: medium; commits: 98a066c90e8a; files: packages/ai/src/providers/clean-for-llamacpp-gbnf.ts)

    Codex review notes: model internal, reasoning high; reviewed against d8c240781598; fix evidence: commit c6a9f5339b01, main fix timestamp 2026-07-16T00:59:20-07:00.

  3. mknap commented on Jul 14, 2026

    @mknap

    I was excited to update to 2026.7.1
    ... and then...
    Updating to 2026.7.1 with this bug has been a tough one to handle.

    • I have found that the model throwing the error above works on the CLI interface on a fresh install before the web interface is enabled. The error is thrown from accessing the model on the web interface.
    • Another note I have found: I am using models with llama.cpp (router mode). The gemma4 model works, while the qwen36 model throws the error.

    ./llama-server --version
    version: 9982 (99f3dc322)
    built with GNU 14.2.0 for Linux x86_64

  4. delimir commented on Jul 14, 2026

    @delimir
    Author

    Additional debugging information:

    I can confirm the failure is reproducible with Qwen3.6-35B-A3B and Qwen3-Coder-30B-A3B through llama.cpp.

    Both models work when calling llama.cpp directly through /v1/chat/completions.
    Openclaw web interface works as intended when using GPT5.5, issue is only with local llama.cpp.

    OpenClaw web agent fails before model generation with:

    reason: "format"

    400 Unable to generate parser for this template. Automatic parser generation failed: JSON schema conversion failed: Pattern must start with '^' and end with '$'

    Disabling tools in the web UI does not change the behavior.

    openclaw doctor reports 20 eligible skills, 54 loaded plugins and 0 plugin errors.

    llama.cpp /v1/models reports the Qwen3.6 model with n_ctx: 131072 and capabilities completion and multimodal.

    llama.cpp version: 9950 (961e4b26a).

    The same Qwen model worked with OpenClaw 2026.6.11 before upgrading to 2026.7.1.

    Based on mknap's observation that Gemma works while Qwen3.6 fails, this may be specific to automatic parser generation / response format handling with the Qwen chat template rather than the llama.cpp provider generally.

  5. delimir commented on Jul 14, 2026

    @delimir
    Author

    Additional model test: GPT-OSS also fails with the same reason. Gemma works on the same OpenClaw 2026.7.1 + llama.cpp server setup. Therefore this does not appear to be Qwen3.6-specific. Qwen3.6, Qwen3-Coder and GPT-OSS fail, while Gemma succeeds.

  6. rsampaio commented on Jul 14, 2026

    @rsampaio

    Apparently the cron tool is the one breaking the template with llama.cpp server, I have the same issue with qwen3.6

  7. rsampaio commented on Jul 14, 2026

    @rsampaio

    @LckHot your patch didn't fix my instance, after an hour with claude this fixed:

    for the local model section in the config:

      "compat": {
        "supportsTools": true,
        "requiresStringContent": true,
        "unsupportedToolSchemaKeywords": [
          "pattern",
          "maxLength"
        ]
      }
  8. Rchique-Openclaw commented on Jul 14, 2026

    @Rchique-Openclaw
    
     "compat": {
         "supportsTools": true,
         "requiresStringContent": true,
         "unsupportedToolSchemaKeywords": [
           "pattern",
           "maxLength"
         ]
       }
    
    

    I can confirm this solution worked to solve my problem with local qwen model as well
    Original model config was:

    {
      "id": "bytkim/Qwen3.6-27B-MTP-pi-reasoning-GGUF:Q8_0",
      "name": "Qwen3.6-27B",
      "input": [
        "text"
      ],
      "cost": {
        "input": 0,
        "output": 0,
        "cacheRead": 0,
        "cacheWrite": 0
      },
      "contextWindow": 262144,
      "maxTokens": 131072,
      "api": "openai-completions",
      "reasoning": true
    } 
    

    Adding a "compat" section resolved the issue. The bug started with 2026.7.1 upgrade and was gone with the downgrade to 2026.6.11 so it's definitely a 2026.7.1 issue.

    Here are the local model launch arguments, just in case

    llama-server \
      -hf bytkim/Qwen3.6-27B-MTP-pi-reasoning-GGUF:Q8_0 \
      --timeout 86400 \
      --image-min-tokens 1024 \
      --host 192.168.0.25 \
      --port 8090 \
      --ctx-size 262144 \
      --flash-attn on \
      --parallel 1 \
      --reasoning-budget 32768 \
      --temp 0.6 \
      --top-p 0.95 \
      --spec-type draft-mtp \
      --spec-draft-n-max 3 \
      --presence-penalty 0.0 \
      --repeat-penalty 1.0 \
      --top-k 20 \
      --batch-size 2048 \
      --ubatch-size 512 \
      -ngl 99 \
      --threads 16 \
      --threads-batch 16 \
      --jinja
    
  9. mknap commented on Jul 14, 2026

    @mknap

    🙏Thank you @rsampaio for the json that patches this for now. 👍️

    For what its worth, this also affected my local ornith model. Using the compat key for ornith and qwen36 , the error is avoided.

  10. racing-cars commented on Jul 14, 2026

    @racing-cars

    I tried the workaround. It doesn't work for me.
    My customization:

            "models": [
              {
                "id": "local",
                "name": "Qwen3.6-27B-MTP-Q4_K_M.gguf",
                "input": [
                        "text"
                ],
                "reasoning": true,
                "contextWindow": 200000,
                "maxTokens": 32768,
                "compat": {
                  "supportsTools": true,
                  "requiresStringContent": true,
                  "unsupportedToolSchemaKeywords": [
                    "pattern",
                    "maxLength"
                     ]
    
              }
              }
            ],
    

    Same result as without compat from llama.cpp:
    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"}}

    Addendum: Perhaps someone else has this problem too. I have llama.cpp installed locally, previously via the OpenAI provider, but now it works via vLLM, where the compat workaround works. It seems they expect you to figure it out yourself, or I didn't read the release info...

  11. 1 remaining item

  12. PCAssistSoftware commented on Jul 17, 2026

    @PCAssistSoftware

    For me with Lemonade as my backend, I can confirm the compat fix resolved the issue for me

  13. rossbrigoli commented on Jul 21, 2026

    @rossbrigoli

    I can confirm this is only happening in Control UI. Terminal UI is not affected. It happens even without tool calls. A simple prompt like "hey" returns error 400. I can also confirm that the config below fixes it.

                "compat": {
                "supportsTools": true,
                "requiresStringContent": true,
                "unsupportedToolSchemaKeywords": [
                    "pattern",
                    "maxLength"
                  ]
                }
    

    I am running Qwen 3.6-27 on llama-server.

  14. added
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.
    and removed
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jul 31, 2026
  15. self-assigned this
    on Aug 5, 2026
  16. vincentkoc commented on Aug 5, 2026

    @vincentkoc
    Member

    Closing as completed.

    This is the same root cause as #107449: v2026.7.1 exposed the cron tool's unanchored pattern: "\\S" to llama.cpp-compatible schema compilers, which reject it before model generation.

    The repair landed in two layers:

    Fresh validation on current main at 92b4757227a7c4754eb99406ab54f1e4a499082e passed 89/89 focused cron-schema and shared provider-schema tests. Both release artifacts are also published on npm.

    Arbitrary custom OpenAI-compatible endpoints continue to use explicit model compatibility metadata such as compat.toolSchemaProfile: "llamacpp" or unsupportedToolSchemaKeywords; that is separate from the fixed cron regression. Please reopen with a current beta/main reproduction and the exact rejected schema path if the same 400 remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions