Skip to content

Body text appears in thinking blocks, visible text nearly empty - CC Switch

Quick fix

Upgrade cc-switch to a build with PR #4210. Reactive thinking-placeholder handling fixes long-context freezes and body-text collapse.

Error output
正文内容频繁出现在 thinking(思考)块内,visible text 块几乎为空。
English translation

Body content frequently appears inside thinking blocks, while visible text blocks are nearly empty.

cc-switch pre-injects synthetic {"type": "thinking", "thinking": "tool call"} placeholders by default for providers matching REASONING_VENDOR_HINTS (including "deepseek"). This logic was originally added for compatibility with early DeepSeek behavior that required returning a thinking block or returning 400.

In long-context sessions (for example, cache_read over 150k tokens) or heavy tool-call workloads, these synthetic placeholders cannot be blocked by the GUI switch or rectifier and accumulate. They break the Anthropic response structure, causing body text to collapse into thinking blocks and eventually stopping JSONL writes and freezing the client UI. Upstream has relaxed this restriction, so the pre-injection behavior has become the failure source.

  1. Upgrade cc-switch to a version containing the PR #4210 fix (or the latest main branch). The new version removes unconditional pre-injection and dynamically injects a placeholder only when upstream returns legacy 400 errors such as thinking must be passed back.

ToolClaude Code / Codex
Versionv3.16.2
PlatformsWindows
How can I temporarily work around this issue?
Temporarily disable cc-switch routing mode and connect directly to the upstream provider, or wait until PR #4210 is merged and then upgrade the client.
Why did this not fail before?
Early DeepSeek compatibility required returning a thinking block or receiving 400, so cc-switch pre-injected placeholders. Upstream later relaxed that restriction, but the pre-injection logic was not updated, causing format conflicts in long contexts.

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.