Repository navigation
Description
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 the reasoning field of the response, not in content. OpenClaw only reads content, 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 reads content, 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" (or think: false in the native API). When this is set, the model writes directly into content and 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 reasoning when content is empty
Even if the provider misconfigures the model, a non-empty reasoning field with an empty content field is a clear signal that the output ended up in the wrong place. OpenClaw should fall back to reasoning as display text rather than showing nothing.
Affected components
- NemoClaw: Ollama provider setup (
openshell provider create) — does not pass reasoning-related parameters - OpenClaw: Chat completion response parsing — ignores
reasoningfield entirely
Related
- [Bug] Ollama reasoning models return empty content — agent responses are blank #246 — user-facing symptom (blank responses)
- Remove unsupported local-model choices from onboarding until local inference is actually supported #11 — local model support was descoped from current release
- Require explicit inference-provider confirmation instead of silently auto-selecting detected Ollama #12 — Ollama auto-selection without confirmation
Activity
jefffroman commentedon Apr 3, 2026
Additional data point: Gemma 4 31B on Ollama 0.20.0 — the
thinkingfield doesn't just suppresscontent, it also suppressestool_calls.When the model thinks before making a tool call, the Ollama API response contains
thinkingtext buttool_calls: null. Simple prompts that don't trigger thinking produce tool calls correctly. This meansreasoning: false/OLLAMA_REASONING_EFFORT=noneis required not just for visible content but for tool calling to work at all with thinking-capable models.Tested with direct
curlagainst Ollama's/api/chatendpoint — this is an Ollama-level issue, not OpenClaw parsing. Withthink: falseset explicitly, complex prompts return all-null fields (content, thinking, tool_calls) — matching Ollama issue ollama/ollama#15260.Environment: Ollama 0.20.0, Gemma 4 31B (Q4_K_M), macOS, M3 Ultra.
wscurran commentedon Apr 22, 2026
Thanks for the additional data point — the
thinkingfield suppressingtool_callson Gemma 4 is a distinct case from the originalreasoning/contentswap, and worth tracking separately. This is still open and the tool_calls suppression makes it more impactful than originally scoped. We'll keep this on the radar as Ollama reasoning model support matures.latenighthackathon commentedon Jun 24, 2026
Hi @kakuteki, thanks for the report. This one has been open a while: 67 releases have shipped since it was filed (we are now on v0.0.67), with onboarding, the sandbox runtime, config generation, and many platform paths reworked along the way. Could you check whether this is still happening for you on the latest version? Cheers!
houleixx commentedon Jun 25, 2026
A request/response capture would probably make this easier to verify.
ccglass can sit in front of an OpenAI-compatible local provider and show the raw response body, including fields like
content,reasoning, tool calls,latency, and token usage.
Project: https://github.com/jianshuo/ccglass
For this issue, it could help produce a small repro showing that Ollama returns non-empty
reasoningwhilecontentis empty, and that the client/parserdiscards it before rendering.
sandl99 commentedon Jun 25, 2026
Verified on current setup against the latest target tag, v0.0.67.
Checked the original #247 failure mode with
nemotron-3-nano:30bthrough both paths:/v1/chat/completionsforSay helloreturned non-emptychoices[0].message.contentalong withreasoning.https://inference.local/v1/chat/completionsreturned non-emptychoices[0].message.content.The original repro required
content: ""with useful text only inreasoning, causing a blank dashboard bubble. That no longer reproduces here, so I am closing this as fixed/not reproducible on current versions.If this still reproduces elsewhere, please reopen with
nemoclaw --version,openshell --version,ollama --version, the model source or Modelfile fornemotron-3-nano:30b, and raw host plusinference.localresponses showingcontentandreasoning.