Skip to content

Console Go relay: HTTP 400 (empty body) when request combines reasoning_content echo-back with reasoning_effort on deepseek-v4-flash #48180

Description

@fred0m

Summary

POST https://opencode.ai/zen/go/v1/chat/completions with model=deepseek-v4-flash rejects requests that contain BOTH:

  • reasoning_content echo-back on historical assistant messages (required by DeepSeek-family thinking models when replaying tool-call turns), AND
  • any reasoning_effort value (low/medium/high)

The response is HTTP 400 with an empty error body:

{"object":"error","model":"deepseek-v4-flash"}

No message field, so it is impossible to tell what failed. For agents this is fatal: a long session with many tool calls hits this deterministically at some point and cannot recover.

Repro (bisect by replaying a captured request body)

Captured the failing request body from a real session and replayed it with the same x-opencode-session header:

Variant Result
Original body (24 assistant msgs with reasoning_content echo-back + reasoning_effort: high) HTTP 400 (same empty body)
Remove reasoning_effort HTTP 200
Remove reasoning_content echo-back, keep high HTTP 200
reasoning_effort: medium / low (full body) HTTP 400
Short request + high (no echo-back history) HTTP 200

So the trigger is the combination, not either field alone. Removing either side restores 200.

Expected

Either accept the combination (it is a valid OpenAI-compatible payload), or return a descriptive error message instead of a bare {"object":"error","model":...}.

I believe this is in the Console Go relay layer (the same endpoint serves other models fine; deepseek-v4-pro with the same combination is not affected per other reports). Happy to provide more details or a minimal repro script.

Activity

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