Skip to content

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.

Error output
codex快速重试连接5次后返回报错“stream disconnected before completion: Upstream Chat Completions stream ended before sending finish_reason”
English translation

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

ToolClaude Code、Codex
Versioncc-switch 3.12.3、3.13.0、3.16.2、3.16.3、3.16.4、3.19.1、3.20.0(各 issue 所报版本;并非统一受影响范围)
PlatformsmacOSWindows

(No FAQ yet)

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.