#Can't start new session to a local llama.cpp

1 messages · Page 1 of 1 (latest)

swift sonnet
#

From my llama.cpp logs:

operator(): got exception: {"error":{"code":500,"message":"\n------------\nWhile executing CallExpression at line 79, column 24 in source:\n...lti_step_tool %}↵ {{- raise_exception('No user query found in messages.') }}↵...\n ^\nError: Jinja Exception: No user query found in messages.","type":"server_error"}}
srv log_server_r: done request: POST /v1/chat/completions 127.0.0.1 500
srv operator(): got exception: {"error":{"code":500,"message":"\n------------\nWhile executing CallExpression at line 79, column 24 in source:\n...lti_step_tool %}↵ {{- raise_exception('No user query found in messages.') }}↵...\n ^\nError: Jinja Exception: No user query found in messages.","type":"server_error"}}
srv log_server_r: done request: POST /v1/chat/completions 127.0.0.1 500
srv operator(): got exception: {"error":{"code":500,"message":"\n------------\nWhile executing CallExpression at line 79, column 24 in source:\n...lti_step_tool %}↵ {{- raise_exception('No user query found in messages.') }}↵...\n ^\nError: Jinja Exception: No user query found in messages.","type":"server_error"}}
srv log_server_r: done re

openclaw is the only program to fail proper api calls. it shouldn't be a misconfiguration from my llama-server side

hoary beaconBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

jagged thistleBOT
#

I’d still grab openclaw --version first — version matters a lot here.

But this specific error looks like the model’s Jinja chat template exploding, not plain HTTP/API validation. The template is raising No user query found in messages, and OpenClaw sends a much more agent-shaped request than most simple clients: system context, history, sometimes tool schemas/tool turns. So “other clients work” doesn’t fully rule out a llama.cpp/template compatibility issue.

Try these in order:

  1. Confirm config is OpenAI-compatible mode
    {
      models: {
        providers: {
          llamacpp: {
            baseUrl: "http://127.0.0.1:8080/v1",
            apiKey: "llama-local",
            api: "openai-completions",
            models: [
    
#
             {
               id: "YOUR_MODEL_ID",
               input: ["text"],
               reasoning: false
             }
           ]
         }
       }
     }
   }
  1. Temporarily disable tool schemas for this model
    compat: { supportsTools: false }
    
#

If that fixes it, the model/template/server is choking on OpenClaw’s tool-capable request shape.

  1. If still failing, also try:

    params: { streaming: false }
    
  2. On the llama.cpp side, try an explicit known-good --chat-template ... / --chat-template-file ..., or test without --jinja if the embedded GGUF template is the thing raising. That multi_step_tool / No user query found path is very template-specific.

Docs bits: OpenClaw’s OpenAI-compatible route is intentionally looser for proxies, and local backends like llama.cpp are supported via that route; local models can still struggle with full agent/tool surfaces.

Useful docs:
<https://docs.openclaw.ai/providers/lmstudio>
<https://docs.openclaw.ai/providers/ollama>
<https://docs.openclaw.ai/concepts/models>

If you paste openclaw --version, llama.cpp version/commit, model GGUF name, and your redacted models.providers entry, I can be more precise.

swift sonnet
#

it's just funny how it worked like 2 days ago without any update. this thing just breaks itself from time to time