Upstream Chat Completions Streaming Response Error, Claude Code
Quick fix
Check whether the issue is caused by local proxy conversion or the upstream endpoint; adjust the endpoint or disable the local proxy for the verified scenario.
Symptom
Section titled “Symptom”codex快速重试连接5次后返回报错“stream disconnected before completion: Upstream Chat Completions stream ended before sending finish_reason”After 5 rapid connection retries, codex returns the error “stream disconnected before completion: Upstream Chat Completions stream ended before sending finish_reason”
These issues involve several types of proxy problems and cannot be treated as one failure: Chat Completions streaming content split into multiple Claude Code messages, an upstream stream ending before sending finish_reason, GLM-5.3 rejecting requests that disable thinking, and garbled tool-call arguments. The reporter for #3960 said switching back to the V4 baseurl restored service; #4785 was marked by a maintainer as a duplicate of another issue, with no fix provided here. Verify each symptom separately; this error alone does not indicate a uniform GLM proxy failure.
If you encounter “stream disconnected before completion” while using a Zhipu Anthropic endpoint, the issue reporter said switching back to the V4 baseurl restored service; the corpus does not provide the specific baseurl value.
If Claude Code splits a streaming response into multiple messages after passing through a proxy, #4785 only says the issue was closed as a duplicate and points to another issue for tracking; this corpus contains no confirmed fix.
If you use GLM-5.3 and see error 1210 when disabling thinking, the request form verified in the discussion sets thinking.type to enabled and reasoning_effort to low.
If Claude Code Auto Mode shows classifier unavailable, the temporary workaround reported in #1678 is to disable the CC Switch Anthropic Base URL proxy and restart the Claude Code session; later comments dispute whether it reproduces under normal conditions.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 13 real issues
- #1371SOS技术求助|CC Switch 配置智谱 API 时,地址和 Key 被自动篡改
- #1544中转代理bug
- #1678Claude Code Auto Mode Classifier Compatibility Issue
- #2172vscode中Claude code插件的回答显示会被自动打断,该如何解决?
- #2460开启代理后,模型身份认知错乱: 被强制注入 Claude 系统提示词导致自我认知冲突
- #3960stream disconnected before completion: Upstream Chat Completions stream ended before sending finish_reason
- #4600在claude code聊天框中发送带粘贴图片的消息时,配置了视觉理解MCP的模型会直接报错,导致无法触发图片理解mcp
- #4785Bug: OpenAI Chat Completions streaming is split into multiple Claude assistant messages
- #4998feat(codex): decouple openai_responses wire API from native-safe catalog; add hub-managed model capability templates
- #6508[Feature] Codex 经本地路由接 Kimi 时,将内置 web_search 映射为 Kimi 服务端 $web_search(附已验证方案)
- #6737fix(proxy): GLM-5.3 rejects forced-thinking-off requests from Claude Code
- #6798质谱GLM 5.3乱码
- #6835使用zhipu模型,代理映射一直默认使用glm-5.3
(No FAQ yet)
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.