You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DeepSeek V4 Pro via zen/go: reasoning_content inconsistency causes "must be passed back to the API" error in multi-turn tool calls #25000
When using DeepSeek V4 Pro via the opencode.ai/zen/go/v1 endpoint, multi-turn conversations with tool calls fail intermittently with:
Error from provider (DeepSeek): The `reasoning_content` in the thinking mode must be passed back to the API.
Root Cause
DeepSeek V4 Pro's thinking mode is all-or-nothing: once ANY assistant message in the conversation history includes reasoning_content, ALL subsequent assistant messages MUST also include it. If even one message lacks it (e.g., a tool_calls message where reasoning was omitted), the API rejects the entire request.
Reproduction (minimal)
FAILS — first assistant has reasoning_content, second (tool_calls) does NOT:
Please check if your issue is already covered by one of these, and consider adding any new details (e.g., specific to the zen/go proxy) as a comment on the most relevant existing issue instead.
Duplicate of #24722 and others. Our contribution: confirmed the same bug affects the zen/go proxy endpoint and provided minimal reproduction with exact error message. Adding detailed findings on #24722.
Reopening — this bug is still unresolved. Keeping this open for visibility. Our zen/go proxy repro adds value: minimal curl reproduction with exact error message. Full context also posted on #24722.
Well deepseeks own endpoints behave this exact same way so this isnt a bug, we may inject the reasoning_content: "" into streams to prevent errors for consumers tho
I can reproduce a very similar issue with OpenCode Go and DeepSeek V4 Flash.
Environment:
Provider: OpenCode Go subscription
Model: DeepSeek V4 Flash
Thinking: enabled
Agent/tool calling: enabled
Reproduction:
Start an agent session with thinking enabled.
Let the model call a tool.
The tool returns successfully.
The model should continue generating, but the next request fails with HTTP 400.
This happens every time in my setup (100% reproducible).
When I disable thinking, the same workflow works normally.
I subscribed to OpenCode Go today (2026-08-14), so this is a current reproduction on the Go subscription path.
Unfortunately, the Operit integration I'm using does not expose the upstream 400 response body. The only error surfaced on my side is: NotFoundError: User cancelled the requestDevice() chooser.
Activity
github-actions commentedon Apr 29, 2026
This issue might be a duplicate of existing issues. Please check:
Please check if your issue is already covered by one of these, and consider adding any new details (e.g., specific to the zen/go proxy) as a comment on the most relevant existing issue instead.
WhiteGiverMa commentedon Apr 29, 2026
Duplicate of #24722 and others. Our contribution: confirmed the same bug affects the zen/go proxy endpoint and provided minimal reproduction with exact error message. Adding detailed findings on #24722.
WhiteGiverMa commentedon Apr 29, 2026
Reopening — this bug is still unresolved. Keeping this open for visibility. Our zen/go proxy repro adds value: minimal curl reproduction with exact error message. Full context also posted on #24722.
rekram1-node commentedon Apr 30, 2026
Well deepseeks own endpoints behave this exact same way so this isnt a bug, we may inject the reasoning_content: "" into streams to prevent errors for consumers tho
WhiteGiverMa commentedon May 1, 2026
Ok u r right. Maybe hard to find a more elegant solution.
Mingran23 commentedon Aug 14, 2026
I can reproduce a very similar issue with OpenCode Go and DeepSeek V4 Flash.
Environment:
Reproduction:
This happens every time in my setup (100% reproducible).
When I disable thinking, the same workflow works normally.
I subscribed to OpenCode Go today (2026-08-14), so this is a current reproduction on the Go subscription path.
Unfortunately, the Operit integration I'm using does not expose the upstream 400 response body. The only error surfaced on my side is:
NotFoundError: User cancelled the requestDevice() chooser.rekram1-node commentedon Aug 14, 2026
Are u using opencode? If not then it is because your harness has a bug.