You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: deepseek-v4-pro on zen/go /v1/messages returns 400 Empty input messages for string content (flash works on same request) #42091
On the OpenCode Zen gateway https://opencode.ai/zen/go, the Anthropic-compatible endpoint POST /v1/messages fails for deepseek-v4-pro when messages[].content is passed as a string. The exact same request with deepseek-v4-flash returns 200 OK. Switching deepseek-v4-pro to the array form of content also works.
This only affects deepseek-v4-pro on the Anthropic endpoint — the OpenAI-compatible endpoint and deepseek-v4-flash are unaffected.
The error is thrown by the Console Go upstream provider.
Test matrix (same endpoint, same payload, only the model changes)
Case
deepseek-v4-flash
deepseek-v4-pro
Anthropic /v1/messages + string content
200 OK
400 Empty input messages
Anthropic /v1/messages + array content
200 OK
200 OK
OpenAI /v1/chat/completions + string content
200 OK
200 OK
Anthropic /v1/messages + stream + array content
—
200, SSE works
Exact trigger condition
Endpoint: only the Anthropic-compatible /v1/messages
Model: only deepseek-v4-pro (same request works for deepseek-v4-flash)
Trigger: messages[].content is a string ("content":"hi"); the array form ("content":[{"type":"text","text":"hi"}]) works
Impact
The Anthropic SDK accepts a string shorthand for content, e.g. client.messages.create(model="deepseek-v4-pro", messages=[{"role":"user","content":"hi"}]). Serialized as string content, this directly triggers the 400. Any string-content Anthropic-SDK call to deepseek-v4-pro fails, while deepseek-v4-flash or the array form does not.
Related
This overlaps with #34331 (same deepseek-v4-pro error observed there), but that issue is broader and predates this specific flash-vs-pro contrast. This report isolates the deepseek-v4-pro-only regression against a working control model.
Workaround: pass content as the array form [{"type":"text","text":"..."}] for deepseek-v4-pro.
Hi, adding a data point on real-world impact: this exact bug blocks Claude Code on the Go plan.
Claude Code talks to the gateway via the Anthropic POST /v1/messages endpoint and serializes user content as a plain string (I confirmed this from the request payloads it produces). String-content is precisely what triggers this 400, so the very first request of any Claude Code session fails — meaning deepseek-v4-pro cannot be used as the model in Claude Code at all, while deepseek-v4-flash works fine on the same setup.
The array-form workaround from the report unfortunately does not help here: Claude Code has no setting to force array-form content.
So Go-plan subscribers running Claude Code have no way to use deepseek-v4-pro until string-content is handled for this model on /zen/go/v1/messages (or it is added to the officially-supported list). Please consider fixing/prioritizing it — thanks!
Also hitting this from the Responses side: with deepseek-v4-pro on /responses, a string-form content is treated as empty (Empty input messages), while array-form content works. Worth noting this isn't only the Anthropic /v1/messages endpoint — the gateway's request conversion is the common root cause, and the same stack also breaks plain Codex sessions via /responses (see #42090 and #42135). Captures + a local workaround proxy: https://github.com/hairyf/codex-deepseek-subagent-proxy
Activity
github-actions commentedon Aug 12, 2026
This issue might be a duplicate of existing issues. Please check:
deepseek-v4-proEmpty input messageserror on the Anthropic-compatible/v1/messagesendpoint — covers the same model and error, with additional model-switching context.heimoshuiyu commentedon Aug 12, 2026
v4 pro does not officially support Anthropic interface yet
lyjx29 commentedon Aug 13, 2026
Hi, adding a data point on real-world impact: this exact bug blocks Claude Code on the Go plan.
Claude Code talks to the gateway via the Anthropic
POST /v1/messagesendpoint and serializes usercontentas a plain string (I confirmed this from the request payloads it produces). String-content is precisely what triggers this 400, so the very first request of any Claude Code session fails — meaningdeepseek-v4-procannot be used as the model in Claude Code at all, whiledeepseek-v4-flashworks fine on the same setup.The array-form workaround from the report unfortunately does not help here: Claude Code has no setting to force array-form content.
So Go-plan subscribers running Claude Code have no way to use
deepseek-v4-prountil string-content is handled for this model on/zen/go/v1/messages(or it is added to the officially-supported list). Please consider fixing/prioritizing it — thanks!hairyf commentedon Aug 13, 2026
Also hitting this from the Responses side: with
deepseek-v4-proon/responses, a string-form content is treated as empty (Empty input messages), while array-form content works. Worth noting this isn't only the Anthropic/v1/messagesendpoint — the gateway's request conversion is the common root cause, and the same stack also breaks plain Codex sessions via/responses(see #42090 and #42135). Captures + a local workaround proxy: https://github.com/hairyf/codex-deepseek-subagent-proxyheimoshuiyu commentedon Aug 13, 2026
@lyjx29 @hairyf now deepseek-v4-pro on opencode-go support anthropic / responses API
github-actions commentedon Oct 13, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.