Repository navigation
Description
opencode-go / deepseek-v4.1-flash: the finished answer is returned in reasoning_content while content is empty — ~7% of turns, 0% on the official API in the same session
Summary
Through opencode-go with deepseek-v4.1-flash, a substantial fraction of turns come back with:
contentempty (no text block)- no
tool_calls - the complete, finished, user-facing answer sitting in
reasoning_content
The turn is reported as a normal completion. The user sees an empty reply.
This is not "the model thought and stayed silent". The reasoning field contains the finished deliverable — headings, bullet lists, wording addressed to the reader. The model expected to emit it as content and never did.
Worse: the model then reads the user's complaint about the empty reply and fails the same way again.
Environment
- Client: DeepSeek Harness (agent harness), OpenAI-compatible route via
@earendil-works/pi-ai0.87.1. The requiredx-opencode-sessionheader is sent. - Provider:
opencode-go - Endpoint:
https://opencode.ai/zen/go/v1/chat/completions - Model:
deepseek-v4.1-flash - Settings:
reasoning_effort=high,max_tokens=384000 - Date: 2026-10-10
Controlled comparison — one session, three gateways
Same session, same harness, same machine, same tools, same system prompt. The provider was switched mid-session, so the only variable is the gateway.
| gateway | model id | assistant messages | reasoning-only turns¹ | rate |
|---|---|---|---|---|
opencode-go |
deepseek-v4.1-flash |
124 | 9 | 7.3% |
cline-pass |
deepseek-v4.1-flash |
199 | 1 | 0.5% |
| official DeepSeek API | deepseek-flash |
192 | 0 | 0% |
¹ reasoning-only = has a reasoning block, no text block, no tool_calls, followed by a user message or session end (so the turn was supposed to produce an answer).
The first two rows are the same model id on two different gateways: 9 vs 1.
All 9 opencode-go cases occurred between 2026-10-10 13:22 and 14:23 local time — i.e. everything after the switch to opencode-go at 13:16. Zero before it, across the same session.
What the reasoning-only turns contain
Short excerpts from the reasoning field of turns that produced no content at all:
- turn 86 — "The user says I didn't output anything — I put the final reply in the thinking chain. I need to just write the actual final response now."
- turn 87 — "The user says I didn't output anything — my final response went into the reasoning instead."
- turn 90 — "The user is saying I did an empty output AGAIN."
- turn 107 — "The user says I produced an empty reply AGAIN. I need to output the report now, visibly."
Turns 86, 87, 90 and 107 are each a single-step turn: the user complained that the reply was empty, the model produced the full reply into reasoning_content again, and content was empty again. This repeated four times.
Suspected trigger — not confirmed
The upstream vLLM DeepSeek V4 tool-call parser routes the entire completion to reasoning_content when the model does not emit the thinking terminator, at a reported ~20–25% misroute rate — see vllm-project/vllm#48645; vLLM added an opt-in fix to expose the unterminated block as content in #50753.
I am not claiming that is the cause here. I have not captured the raw SSE stream to check whether the terminator is present on the failing turns. Related opposite-direction report: ai-dynamo/dynamo#8901.
Repro
- Point any agent harness at
https://opencode.ai/zen/go/v1/chat/completions,model: deepseek-v4.1-flash,reasoning_effort: high. - Run a tool-heavy loop for a while.
- Watch for turns where
contentis empty,tool_callsis absent, and the finished answer is inreasoning_content.
Reported at ~2–3 per session by other users as well, in a harness-side report of the same symptom: deepseek-ai/deepseek-harness#8553.
Asks
- Is
deepseek-v4.1-flashonopencode-goserved by a path that parses the DeepSeek V4 thinking terminator? If the terminator is sometimes missing, that is the whole bug. - If so, can the gateway expose an unterminated reasoning block as
content(as vLLM does in Feature Request: Voice Mode, First-Class Browser Automation, Goal-Driven Task Loop, and In-App Plugin Discovery #50753) instead of routing the entire answer intoreasoning_content? - If this is a known limitation, please document it. Clients currently cannot distinguish this from a genuine empty completion without reading
reasoning_contentas a fallback, which is not something a client should have to do to get its own answer.
Activity
opencode-agent commentedon Oct 10, 2026
Thanks for the detailed report and the side-by-side gateway comparison. I think this is a duplicate of #48419, which reports the same thing: on
opencode-go/deepseek-v4.1-flash, some turns end normally with nocontentand no tool calls, and the finished answer sits in the reasoning.Possible duplicates and related issues, ordered from most to least likely:
stopoutput=0,finish=stop). Its comments include raw SSE captures from the Go endpointYour comparison (9 of 124 turns on
opencode-govs 1 of 199 oncline-passvs 0 of 192 on the official API, in the same session) would be useful evidence on #48419. A raw SSE capture of a failing turn would help too, since it would show whether the thinking terminator is missing.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
opencode-agent commentedon Oct 11, 2026
Closing this as a duplicate of #48419, since we haven't heard back since the duplicate notice. That issue tracks the same problem: on
opencode-go/deepseek-v4.1-flash, some turns come back with nocontentand no tool calls, and the finished answer sits in the reasoning. #49673 is closely related.Please add your gateway comparison there (9 of 124 turns on
opencode-go, 1 of 199 oncline-pass, 0 of 192 on the official API, all in the same session). A raw SSE capture of a failing turn would help as well. If your problem turns out to be different, reply here and we can reopen.