-
Notifications
You must be signed in to change notification settings - Fork 2.8k
OpenClaw discards Ollama reasoning field — model output silently lost #247
Copy link
Copy link
Open
Labels
area: inferenceInference routing, serving, model selection, or outputsInference routing, serving, model selection, or outputsarea: local-modelsLocal model providers, downloads, launch, or connectivityLocal model providers, downloads, launch, or connectivityarea: providersInference provider integrations and provider behaviorInference provider integrations and provider behaviorprovider: ollamaOllama local model provider behaviorOllama local model provider behavior
Metadata
Metadata
Assignees
Labels
area: inferenceInference routing, serving, model selection, or outputsInference routing, serving, model selection, or outputsarea: local-modelsLocal model providers, downloads, launch, or connectivityLocal model providers, downloads, launch, or connectivityarea: providersInference provider integrations and provider behaviorInference provider integrations and provider behaviorprovider: ollamaOllama local model provider behaviorOllama local model provider behavior
Type
Fields
Give feedbackNo fields configured for Enhancement.
Description
When OpenClaw sends a chat completion request to an Ollama reasoning model (e.g.
nemotron-3-nano:30b), the model returns its output in thereasoningfield of the response, not incontent. OpenClaw only readscontent, so the actual model output is silently thrown away.This is the root cause behind #246 (blank agent responses with Ollama).
The problem
Ollama's OpenAI-compatible API returns reasoning model output like this:
{ "choices": [{ "message": { "role": "assistant", "content": "", "reasoning": "Hello! I'm happy to help. What would you like to know?" } }] }The model did produce a response. It's sitting right there in
reasoning. But OpenClaw readscontent, gets an empty string, and renders a blank bubble in the dashboard.This affects every reasoning model served through Ollama — not just Nemotron Nano. Qwen3, DeepSeek-R1, and any future reasoning model will hit the same issue.
What should happen
Two things need to happen (ideally both):
1. NemoClaw should tell Ollama to skip reasoning when it's not needed
Ollama respects
reasoning_effort: "none"(orthink: falsein the native API). When this is set, the model writes directly intocontentand the response works as expected:{ "choices": [{ "message": { "role": "assistant", "content": "Hello! I'm happy to help. What would you like to know?" } }] }The Ollama provider configuration in NemoClaw should send this parameter by default for agent chat, since the reasoning chain is not surfaced to the user anyway.
2. OpenClaw should not silently discard non-empty
reasoningwhencontentis emptyEven if the provider misconfigures the model, a non-empty
reasoningfield with an emptycontentfield is a clear signal that the output ended up in the wrong place. OpenClaw should fall back toreasoningas display text rather than showing nothing.Affected components
openshell provider create) — does not pass reasoning-related parametersreasoningfield entirelyRelated