Skip to content

Opencode Zen Deepseek V4 Flash Free (new) reasoning_effort produces wrong behaviour #40777

Closed as not planned

Description

@CoderTom314

Description

When using thinking.type: enabled with the reasoning_effort parameter on the deepseek-v4-flash-free model, I observe that **reasoning_effort: "low"produces significantly longer visible reasoning content** than"max"`.

Steps to reproduce

  • Send a streaming request with:
    {
      "model": "deepseek-v4-flash-free",
      "messages": [{"role": "user", "content": "Design a microservices architecture for e‑commerce"}],
      "stream": true,
      "thinking": {"type": "enabled"},
      "reasoning_effort": "low"   // or "max"
    }
  • Accumulate reasoning_content and content from streaming deltas.
  • Compare lengths and API‑reported token usage.

Observed results (averaged over 5 iterations)

Effort Time (s) Reasoning chars Final chars
low 23.61 5646 1764
high 12.36 1303 1855
max 29.07 1476 1107

Expected behaviour
I would expect reasoning_effort: "max" to either produce more reasoning content than "low", or that the parameter controls the amount of reasoning in a straightforward way. The current behaviour is surprising and may confuse users.

Environment

Plugins

N/A

OpenCode version

N/A

Steps to reproduce

  • Send a streaming request with:
    {
      "model": "deepseek-v4-flash-free",
      "messages": [{"role": "user", "content": "Design a microservices architecture for e‑commerce"}],
      "stream": true,
      "thinking": {"type": "enabled"},
      "reasoning_effort": "low"   // or "max"
    }
  • Accumulate reasoning_content and content from streaming deltas.
  • Compare lengths and API‑reported token usage.

Screenshot and/or share link

No response

Operating System

N/A

Terminal

N/A

Activity

  1. TunaTung commented on Aug 6, 2026

    @TunaTung

    Same model (deepseek-v4-flash-free via Zen), adding another symptom: multi-turn conversations that include images intermittently fail with HTTP 400:

    Error from provider (Console): The `reasoning_content` in the thinking mode must be passed back to the API.
    

    The client passes back standard Anthropic-format thinking blocks in messages (e.g. {"type":"thinking","thinking":"...","signature":"..."}), yet the Zen Console gateway still returns this 400.

    Observed on 2026-08-04 from a Claude Code desktop client (cc-haha v0.5.3) proxying Anthropic-format requests to https://opencode.ai/zen. Notes:

    • Plain-text and tool-call turns with the same thinking-block pass-back succeed.
    • The failure appears specific to turns involving image / multimodal content combined with thinking pass-back (27 of 28 errors in the session were on image requests).
    • Error source is provider (Console), not the direct DeepSeek or go gateway.

    Related closed issues (#24334 direct DeepSeek, #25000 zen/go, #28890 Zen) suggest the Console gateway path for multimodal turns may not have been covered by the earlier fixes. Happy to provide more logs if useful.

  2. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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