Unable to Display Model Reasoning: Claude Code Proxy
Quick fix
Upgrade to cc-switch 4.0.13 and retest. If the issue persists, ignore late reasoning deltas after the response body begins.
Symptom
Section titled “Symptom”无法显示模型的思考过程Unable to display the model's reasoning process
When using `apiFormat: "openai_chat"` with reasoning models, providers may use different fields and streaming sequences for reasoning content, such as `reasoning`, `reasoning_content`, or other formats. If the proxy does not recognize the relevant field, Claude Code will not display the reasoning process.
Qwen-compatible streams may continue sending reasoning deltas interleaved after visible `content` begins. `create_anthropic_sse_stream` closes and reopens Anthropic content blocks whenever the type changes, splitting the response into multiple `thinking` and `text` blocks and causing Claude Code to display many fragments. The two issues respectively show missing reasoning and fragmented response text. The former was closed after a long period without updates, with the maintainer only recommending an upgrade and retest; the latter remains open.
Upgrade cc-switch to the maintainer-recommended 4.0.13 and retest with the original OpenAI-compatible provider. No user has yet confirmed that this resolves the issue.
If the issue remains reproducible, run `claude -p --verbose --output-format stream-json --include-partial-messages "What model are you?"` and check whether `reasoning_content` and `content` appear interleaved in the response.
The proxy must preserve reasoning before the first visible text. Once the response body begins, ignore subsequent late reasoning deltas to avoid repeatedly creating `thinking` and `text` blocks. The local response normalizer in the issue produced only one continuous text block after applying this rule.
Add regression tests for alternating reasoning/content chunks. Verify that there is at most one `thinking` block and one `text` block, that the response body is fully joined, and that no reasoning is emitted after the response body begins.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
(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.