Self Checks / 自检
CC Switch Version / 版本号
3.15.0
Operating System / 操作系统
Windows
Related App / 涉及应用
Claude Code
Steps to Reproduce / 重现步骤
- Configure CC Switch to proxy Claude Code to DeepSeek V4 via Anthropic-compatible endpoint:
- Set
ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
- Provide a valid DeepSeek API key
- In VS Code, open Claude Code plugin (version 2.1.153)
- Start a conversation by asking a question that triggers
reasoning_content (e.g., "Explain quantum computing in detail")
- After receiving the response, ask a follow-up question (e.g., "Can you elaborate on the second point?")
- Observe the error: HTTP 400 with message "The content[].thinking in the thinking mode must be passed back to the API."
Expected Behavior / 期望行为
Claude Code should continue the conversation normally through CC Switch, without any manual intervention regarding thinking mode. The proxy should handle DeepSeek's reasoning_content requirement transparently.
Actual Behavior / 实际行为
After a few turns, Claude Code fails with HTTP 400 error. DeepSeek API rejects the request because the thinking block (or reasoning_content) is missing or malformed.
Additional Context / 补充信息
- DeepSeek models used:
deepseek-v4-pro[1M], deepseek-v4-flash[1M]
- VS Code version: 1.122.0 (user setup)
- Commit: 6a49527b96e326fe62fbdb56f60e16877c9aa724
- Electron: 39.8.8 / Chromium: 142.0.7444.265 / Node.js: 22.22.1
- CC Switch local proxy port: 127.0.0.1:15721
- The issue likely stems from protocol incompatibility:
- DeepSeek V4 enables thinking mode by default, requiring clients to send back
reasoning_content in subsequent requests.
- Claude Code 2.1.153 sends
thinking.type="adaptive" (unsupported) and does not preserve/return reasoning_content.
- Workaround: Bypass CC Switch and use a dedicated proxy like
dsv4-cc-proxy (https://gitcode.csdn.net) that handles the thinking mode translation.
- This problem started after updating Claude Code plugin to 2.1.153. Older versions worked fine.
Self Checks / 自检
I have read the FAQ section in README.
我已阅读 README 中的常见问题。
I have searched for existing issues, including closed ones.
我已搜索过已有的 Issue,包括已关闭的。
CC Switch Version / 版本号
3.15.0
Operating System / 操作系统
Windows
Related App / 涉及应用
Claude Code
Steps to Reproduce / 重现步骤
ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropicreasoning_content(e.g., "Explain quantum computing in detail")Expected Behavior / 期望行为
Claude Code should continue the conversation normally through CC Switch, without any manual intervention regarding thinking mode. The proxy should handle DeepSeek's
reasoning_contentrequirement transparently.Actual Behavior / 实际行为
After a few turns, Claude Code fails with HTTP 400 error. DeepSeek API rejects the request because the
thinkingblock (orreasoning_content) is missing or malformed.Additional Context / 补充信息
deepseek-v4-pro[1M],deepseek-v4-flash[1M]reasoning_contentin subsequent requests.thinking.type="adaptive"(unsupported) and does not preserve/returnreasoning_content.dsv4-cc-proxy(https://gitcode.csdn.net) that handles the thinking mode translation.