Console Go: Upstream request failed - Claude Code
Quick fix
This 400 comes from the OpenCode Go gateway rejecting an incompatible payload. Restart the proxy to restore session mapping, or avoid WebSearch and images.
Symptom
Section titled “Symptom”{
"error": {
"message": "Error from provider (Console Go): Upstream request failed",
"type": "invalid_request_error",
"param": null,
"code": "invalid_request_error"
}
}When cc-switch forwards a request to OpenCode Go (Console Go), the upstream gateway rejects it with a 400 invalid_request_error because the payload format is incompatible or the context was lost. Three variants: 1) a skill re-import reloads the proxy internal state and clears the session association, so model name mapping is silently skipped and the native Claude model name is sent upstream as-is; 2) the Claude Code built-in WebSearch forces an Anthropic-style server_tool tool_choice while the upstream DeepSeek only supports auto or {"type":"web_search"}; 3) pasting an image — even with the model declaring vision support — hits the Console Go gateway deserialising only text blocks and rejecting image_url outright.
For model mapping broken by a skill re-import, restart the cc-switch proxy or wait for it to restore the live config automatically, rebuilding the session context.
For the WebSearch and image errors, the current version has no clean workaround. Avoid the built-in WebSearch in Claude Code and avoid pasting images directly, until a later cc-switch version fixes the protocol conversion and Vision Proxy features.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- Why does the stream health check show fine while requests still 400?
- The health check only tests upstream endpoint reachability — an HTTP 404 counts as Reachable — and never validates the model mapping or payload format.
- I configured a vision MCP — why does pasting an image still error?
- A vision MCP can only be invoked by the model, while a pasted image is already encoded as image_url in the message. The Console Go gateway rejects image_url during deserialisation, so the request fails before it ever reaches the MCP.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.