TL;DR — This error chain means: your client (via cc-switch's local proxy) called a Codex-style
/responsesendpoint, the proxy forwarded to DeepSeek with thinking mode enabled plus tool calls, and DeepSeek rejected the follow-up request because thereasoning_contentfrom the previous assistant turn was not sent back. The proxy is stripping (or never storing) the thinking block. Fixes: (1) disable thinking mode for tool-calling sessions through the proxy, (2) switch that route to a non-thinking model variant, or (3) put the traffic through a router that round-tripsreasoning_contentcorrectly.
Decoding the error chain
cc switch local proxy failed while handling codex endpoint /responses.
provider: deepseek; model: deepseek-v4-flash; upstream_status: http 400;
cause: the `reasoning_content` in the thinking mode must be passed back to the api.
Three layers are talking here:
- Your client speaks the Codex-style
/responsesAPI shape. - cc-switch's local proxy translates that to the provider's chat-completions shape and forwards to DeepSeek.
- DeepSeek runs
deepseek-v4-flashin thinking mode. When a conversation includes tool calls, DeepSeek's API requires each assistant turn'sreasoning_contentto be included when you send the conversation back. The proxy layer translated the message history but dropped that field → HTTP 400.
This is the same underlying contract we documented in the reasoning_content 400 fix — the proxy just adds a translation layer where the field gets lost.
Fix 1: Disable thinking mode on the proxied route
If cc-switch (or your client config) lets you set request parameters per provider, turn thinking mode off for coding/tool sessions. Tool-heavy coding loops rarely benefit enough from exposed reasoning to justify the fragile round-trip.
Fix 2: Use a non-thinking model variant
Route the /responses traffic to a model/mode without the round-trip requirement. Within DeepSeek's lineup that means the standard chat variants rather than reasoner/thinking modes — V4 Pro vs Flash trade-offs here.
Fix 3: Put a contract-aware router in the path
Message-history translation is exactly where thin proxies break. CodeRouter treats reasoning-model fields as first-class: thinking content is stored and round-tripped per provider contract, so tool-calling sessions with thinking models do not 400. If you keep cc-switch for client switching, you can still point its upstream at a router endpoint instead of the raw provider.