Bug Report
Summary
Every API request produces a WARN log: extra_body overwriting request payload keys: thinking. This is a framework-level issue that affects all providers (DeepSeek, Ollama, etc.), not just a single provider. The thinking parameter is being written in two separate locations within the request payload pipeline, causing a field collision on every request.
Version
- OpenClaw 2026.4.26 (be8c246)
- Node.js v25.9.0
- macOS (launchd managed gateway)
Reproduction
Always reproducible. Simply run the gateway with any model — the warning appears on every single API request.
Frequency
- ~384 occurrences/day (observed 2026-04-30, 18:56 CST)
- 271 occurrences/day (observed 2026-04-28)
- Essentially every request triggers this WARN
Impact
1. DeepSeek (V4 Pro): When thinking is enabled, this parameter collision has caused:
2. Ollama/Qwen3 (local model): This has severe consequences for local models:
[llm-idle-timeout] ollama/qwen3:32b-q4_K_M-16k produced no reply before the idle watchdog
Profile ollama:default timed out
- Stuck sessions with
state=processing age=141s
- The root cause appears to be: OpenClaw sends
"thinking" parameter, but Ollama native protocol uses "think" (top-level). When the thinking field state is unreliable due to the overwrite collision, the model may output to message.thinking instead of message.content, causing OpenClaw to see an empty reply → idle-timeout → stuck session → failover to surface_error.
- Mitigation: Setting
thinking: false, think: false, and reasoning: false for all local Ollama models resolves the issue, confirming the thinking field is the root cause.
Relevant Source Location
Based on investigation, this appears to originate from createOpenAICompletionsExtraBodyWrapper in:
src/agents/pi-embedded-runner/extra-params.ts (around line 492)
- The extra_body wrapper is applied after provider-specific wrappers, and
Object.assign overwrites payload keys with a collision warning
Expected Behavior
- The
thinking parameter should be written to the request payload exactly once, in a single location
- No WARN about parameter overwriting should appear on requests where thinking is explicitly disabled
- Local Ollama models should work reliably whether thinking is enabled or disabled
Workaround
For Ollama/Qwen3: explicitly disable all thinking-related parameters in the model config (thinking: false, think: false, reasoning: false).
Log Evidence
extra_body overwriting request payload keys: thinking
[llm-idle-timeout] ollama/qwen3:32b-q4_K_M-16k produced no reply before the idle watchdog
Profile ollama:default timed out. Trying next account...
stuck session: sessionId=main state=processing age=141s
Bug Report
Summary
Every API request produces a WARN log:
extra_body overwriting request payload keys: thinking. This is a framework-level issue that affects all providers (DeepSeek, Ollama, etc.), not just a single provider. Thethinkingparameter is being written in two separate locations within the request payload pipeline, causing a field collision on every request.Version
Reproduction
Always reproducible. Simply run the gateway with any model — the warning appears on every single API request.
Frequency
Impact
1. DeepSeek (V4 Pro): When thinking is enabled, this parameter collision has caused:
2. Ollama/Qwen3 (local model): This has severe consequences for local models:
[llm-idle-timeout] ollama/qwen3:32b-q4_K_M-16k produced no reply before the idle watchdogProfile ollama:default timed outstate=processing age=141s"thinking"parameter, but Ollama native protocol uses"think"(top-level). When the thinking field state is unreliable due to the overwrite collision, the model may output tomessage.thinkinginstead ofmessage.content, causing OpenClaw to see an empty reply → idle-timeout → stuck session → failover tosurface_error.thinking: false,think: false, andreasoning: falsefor all local Ollama models resolves the issue, confirming the thinking field is the root cause.Relevant Source Location
Based on investigation, this appears to originate from
createOpenAICompletionsExtraBodyWrapperin:src/agents/pi-embedded-runner/extra-params.ts(around line 492)Object.assignoverwrites payload keys with a collision warningExpected Behavior
thinkingparameter should be written to the request payload exactly once, in a single locationWorkaround
For Ollama/Qwen3: explicitly disable all thinking-related parameters in the model config (
thinking: false,think: false,reasoning: false).Log Evidence