Skip to content

Console Go: DeepSeek V4.1 Flash #max fails on long multi-step runs — reasoning_content not passed back (HTTP 400) #48364

Closed as not planned

Description

@hubris-arch

Summary

Multi-step agentic runs using DeepSeek V4.1 Flash with max reasoning effort
via OpenCode Go ("Console Go") consistently fail with HTTP 400
The reasoning_content in the thinking mode must be passed back to the API.
The same long task succeeds with the same model without the #max variant,
and with glm-5.3-flash#max, so reasoning content is dropped on some replay
path specific to this model + max effort.

Environment

  • opencode version: v0.0.0-next-17403 (opencode2)
  • OS: Linux 7.0.0-28-generic x86_64 (Ubuntu 24.04 based)
  • Terminal: TERM=xterm-256color
  • Shell: /bin/bash
  • Install/channel: next
  • Active plugins: none found in config

Reproduction

  1. Register a custom model under the opencode-go provider mapping to the
    new upstream id (released 2026-09-10):
    "providers": { "opencode-go": { "models": {
      "deepseek-v4.1-flash": {
        "modelID": "deepseek-flash",
        "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
        "limit": { "context": 1000000, "output": 384000 },
        "variants": [
          { "id": "low", "settings": { "reasoningEffort": "low" } },
          { "id": "high", "settings": { "reasoningEffort": "high" } },
          { "id": "max", "settings": { "reasoningEffort": "max" } }
        ]
      }
    } } }
  2. Create a read-only subagent with model: opencode-go/deepseek-v4.1-flash#max
    (deny edit/shell, steps: 8).
  3. Give it a task requiring ~7+ sequential tool calls (e.g. read 7 files +
    a grep) so the run needs many thinking+tool-call rounds.
  4. After several successful reasoning + tool-call steps, a later model call
    fails and the session drain errors out.

Expected Behavior

reasoning_content from thinking blocks is passed back automatically on
every continuation (as happens with glm-5.3-flash#max and with this same
model without a variant), and the run completes.

Actual Behavior

The run fails with:

Provider request failed with HTTP 400: Error from provider (Console Go):
Upstream request failed: [invalid_request_error] The `reasoning_content`
in the thinking mode must be passed back to the API.

Failing assistant message has finish: error, empty content, zero tokens.
Stack: SessionRunner.callModel (core/src/session/runner/llm.ts) via
RequestExecutor.execute (ai/src/route/executor.ts).

Additional Context

  • Frequency: 3/3 failed sessions on long tasks with #max; short tasks
    with #max succeed; the identical long task with the base model
    (no variant) succeeds end-to-end. Possibly the final
    summarize-without-tools call after steps exhaustion replays history
    without reasoning_content, but not confirmed.
  • Workaround: drop the #max variant (use the base model).
  • Related: model released 2026-09-10 (deepseek-flash canonical API id;
    OpenCode listed as day-one partner); opencode-go/deepseek-flash
    catalog entry exists but the v4.1 id does not yet, hence the custom
    mapping.

Activity

  1. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues to see if your report is already covered. If it is, consider adding any additional reproduction details there instead.

  2. hubris-arch commented on Sep 10, 2026

    @hubris-arch
    Author

    Triaged against the suggested duplicates — this looks like the same root cause as #48180 (reasoning_content echo-back × reasoning_effort → HTTP 400 on the Console Go relay), now manifesting on the brand-new DeepSeek V4.1 Flash (released 2026-09-10; used here via a custom providers.models mapping, modelID: deepseek-flash).

    Data points from my bisection that may help fix/verify:

    1. Error body now HAS a message, unlike Console Go relay: HTTP 400 (empty body) when request combines reasoning_content echo-back with reasoning_effort on deepseek-v4-flash #48180's empty {"object":"error"}: [invalid_request_error] The reasoning_content in the thinking mode must be passed back to the API. Possibly a gateway/model-side change since yesterday, or a different code path for the new model id.
    2. Bisected by variant, not just by field: #max fails 3/3 on long multi-step runs; the identical long workload on the base model (no variant) succeeds; short #max runs succeed. Consistent with Console Go relay: HTTP 400 (empty body) when request combines reasoning_content echo-back with reasoning_effort on deepseek-v4-flash #48180's combination trigger (echo-back only exists once history accumulates thinking+tool turns).
    3. Sibling model glm-5.3-flash#max completes the same long workload fine, so it is DeepSeek-path-specific, not a generic replay bug.

    Happy for this to be closed as a duplicate of #48180 if maintainers agree the fix will cover the new deepseek-flash model id as well.

  3. hubris-arch commented on Sep 10, 2026

    @hubris-arch
    Author

    Closing as duplicate of #48180 (same Console Go relay root cause, confirmed by triage above). Distinctive V4.1-Flash data points preserved in the thread.

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