Skip to content

Ollama thinking models produce empty responses — think: false not sent in API requests #46680

@Maximus-Prime-The-First

Description

Ollama thinking models produce empty responses — think: false not sent in API requests

Summary

When Ollama 0.18.0+ serves thinking-capable models (e.g., qwen3.5:35b), it streams thinking tokens in a separate thinking field. OpenClaw only reads chunk.message.content — when the model spends its output budget on thinking and produces no text/tool_calls, OpenClaw sees content: [] → subagent "failed to produce results."

Related to #34722 (field name mismatch), but the deeper issue is that think: false should be sent in the request body for models where thinking is not desired (subagents, cron jobs, tool-calling tasks).

Affected code

All Ollama API request builders in dist files. The request body should include:

think: false

This prevents thinking tokens from being generated at all, reducing token usage ~60% and ensuring content/tool_calls are returned.

Steps to reproduce

  1. Run Ollama 0.18.0 with qwen3.5:35b
  2. Spawn a subagent on ollama/qwen3.5:35b
  3. Subagent returns empty — session JSONL shows output: 62, content: [], stopReason: "stop"
  4. Direct Ollama API test confirms: all tokens in thinking field, content: ""

Impact

All thinking-capable Ollama models silently produce empty responses in subagents. This includes qwen3.5, kimi-k2.5, glm-5, etc.

Workaround

Patch 6 dist files to add think: false to the request body for Ollama API calls.

Environment

  • OpenClaw 2026.3.13
  • Ollama 0.18.0
  • Model: qwen3.5:35b (23GB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions