Skip to content

The `content[].thinking` in thinking mode must be passed back to the API - Claude Code

Quick fix

Some variants remain unresolved: upgrade to a version with the thinking history normalization fix; for Codex routed through DeepSeek, use a version with the…

Error output
API Error: 400 The `content[].thinking` in the thinking mode must be passed back to the API.

Compatible endpoints such as DeepSeek require thinking content matching the conversation history to be sent back in multi-turn thinking conversations. During context compaction, provider switching, or tool calls, Claude Code may produce thinking history that is missing, truncated, or has an incompatible signature. CC Switch's protocol conversion may also fail to preserve this content, causing the upstream service to return 400. The same issue has also been reported with Kimi/Moonshot. Disabling thinking or starting a new session can temporarily work around it in some reports, but may reduce reasoning capability or lose context.

Fix status varies by client path. Reports say CC Switch v3.16.0 fixed DeepSeek history normalization, which was later extended to Kimi/Moonshot. The Claude Code path has a separate normalization note starting with v3.20.0. A v3.20.3 report says the Codex-to-Anthropic Messages path still lacked this handling; the maintainer said PR #7605 added normalization for DeepSeek/MiMo after conversion. A report of persistent 400 errors after failover hot switching in v3.20.1 remains open, and the cause has not been confirmed; it cannot be considered fixed based on that report.

  1. When Claude Code uses the DeepSeek Anthropic endpoint, upgrade to v3.16.0 or later; the report recommends v3.16.2. The newer Claude path also has normalization starting with v3.20.0. If the issue still reproduces after upgrading, record the CC Switch version, client version, provider configuration, and reproduction steps.

  2. When Codex is routed through CC Switch to an Anthropic Messages endpoint, confirm that your version includes the post-conversion thinking normalization described in PR #7605; the report says this path still had a gap in v3.20.3. The available issues do not specify a released version, so they do not establish which version to upgrade to.

  3. If an old Claude Code session errors after switching providers, try starting a new session or clearing the old context; users reported this worked for that scenario.

  4. Some users reported that adding `"thinking": false` to the DeepSeek provider configuration bypassed the error, but this disables thinking. Its applicability and effectiveness have not been confirmed across all issues.

    // 配置文件路径未在 issue 中提供
    {
    "thinking": false
    }
ToolClaude Code;Codex(相关路径见 issue #7525)
Versioncc-switch:v3.14.1、v3.15.0 报告受影响;Claude 路径报告 v3.16.0 起修复,另有 v3.20.0 起归一化说明。Codex 转换路径在 v3.20.3 仍有报告;PR #7605 的发布版本未说明。
PlatformsUnknown
Can starting a new session resolve this error?
Users reported that exiting the old session or running `/clear` and starting again resolved errors after switching from another provider to DeepSeek; this clears the old session context.
Can disabling thinking work around the error?
Users reported that setting `"thinking": false` in the DeepSeek provider configuration resolved it, but this disables thinking mode, and not all reports confirm that the method works.
Can Codex also encounter this when calling DeepSeek?
Yes. Issue #7525 reports that requests with tool calls still errored when Codex was converted through CC Switch to Anthropic Messages. The maintainer said PR #7605 added normalization for this conversion path, but the issue does not specify a corresponding release version.
What should I do if errors persist after automatic failover and switching back to the original model does not help?
Issue #7226 reports persistent 400 errors after hot switching models within the same Codex session; the user could only abandon that session and start again. The issue remains open, and no fix has been confirmed.

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.