Skip to content

deepseek-v4-flash via Console Go (opencode.ai/zen/go) stops after text output: no tool_calls, finish_reason stop #40176

Closed as duplicate

Description

@GreyElaina

Summary

deepseek-v4-flash served through Console Go (opencode.ai/zen/go/v1) ends the response with finish_reason: stop whenever the model first emits a text passage before tool calls. The tool calls never arrive. An agent loop exits mid-task right after the model says what it is about to do.

Environment

  • Client: Grok CLI → cliproxy (Responses→Chat bridge) → Tailscale Aperture → provider opencode-go (Console Go, opencode.ai/zen/go/v1) → deepseek-v4-flash
  • Observed with reasoning_effort: xhigh and max; streaming and non-streaming.

Evidence

Batch analysis of 15 captured responses on the gateway (one session, same request shape):

finish_reason count text before tool calls
tool_calls 6 0/6
stop, no tool_calls 7 7/7

Every early stop has text first; every normal response skips text. The stopped texts end with a colon, for example "…check the tests directory and summarize:".

Control experiment

Same model, same prompt, same tools, same multi-turn history against the official DeepSeek API (api.deepseek.com/v1/chat/completions), with instructions forcing text-then-tool output: 4/4 returned finish_reason: tool_calls, text followed by complete tool calls. The model itself continues normally after text.

Reasoning_content contract is satisfied

Assistant tool-call messages carry reasoning_content (229/229 on a 465-message request; empty string when no reasoning was stored). The early stop persists. This points to Console Go terminating its generation at the text→tool_calls transition, independent of request shape.

Related

Ask

Please check Console Go streaming generation for mixed text + tool_calls output from DeepSeek V4 (text deltas followed by tool-call deltas). It appears to end the response at the text boundary instead of continuing into tool calls.

Activity

  1. LZHcode1986 commented on Aug 8, 2026

    @LZHcode1986

    Same symptom here, and I can add strong evidence that this is a zen/go serving-path defect, not a client issue.

    Timeline

    • Started 2026-08-07 evening (UTC+8), right after the opencode-go provider informed me they completed a local deployment of the DeepSeek V4 Flash lane and updated usage billing.
    • Reproduces on opencode 1.18.15 AND after downgrading to 1.18.14 — same behavior. Not a client version regression.
    • Upgrading the magic-context plugin (0.34.1 → 0.34.2) changed nothing.

    Observed pattern (matches your analysis exactly)

    • The stopped responses always end with a colon — the model finished its text and was about to emit tool calls, then the response ended with finish_reason: stop and zero tool calls.
    • From our local message store (opencode DB), the failed turns show:
      • finish: stop with output tokens as low as 19–61 (normal turns in the same session produce 100–1400 output tokens and finish: tool-calls)
      • several turns show finish: None / output: 0 (stream ended without a proper finish marker)
    • It is intermittent: in the same long-running session, ~60–80% of turns complete with tool calls, then a turn "says what it will do" and stops.
    • It correlates with very long conversations: all failures happened at 254k–281k context tokens; the same model in a fresh/short session does not exhibit it.

    What I ruled out

    • Not a tool failure: proofloop MCP tools return success on adjacent turns.
    • Not permission/ask: no permission prompts on those turns.
    • Not client timeout/abort: no AbortError in logs for these turns; the stream simply ended with finish_reason: stop.

    Please prioritize the streaming text→tool_calls transition in the zen/go serving path. A control run against api.deepseek.com with the same prompt/tools completes tool calls 4/4, so the model itself is fine.

  2. RicSchonfelder commented on Aug 19, 2026

    @RicSchonfelder

    +1 — I am experiencing the exact same issue with OpenCode Go / DeepSeek (deepseek-v4-flash). The agent is coding along and then suddenly stops mid-task with no error, no retry, nothing. I have to keep sending "continue" commands to get it going again, and it stops again shortly after. It happens repeatedly within the same session.

    OpenCode version: 1.18.18, using the OpenCode Go gateway.

  3. GreyElaina commented on Sep 19, 2026

    @GreyElaina
    Author

    i do never use opencode / opencode go so close this issue for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions