Skip to content

[SRV-006] connection error: connection error cc-switch

Quick fix

Upgrade cc-switch to v3.16.4, which fixes proxy forwarding disconnects with a custom DeepSeek provider and billing falling back to the request model.

Error output
[2026-06-05][10:54:36][DEBUG][cc_switch_lib::proxy::server] [SRV-006] connection error: connection error

In early versions such as v3.16.1, connecting Claude Code to a custom DeepSeek model exposed robustness defects in the proxy forwarding and streaming logic, so long text generation hit a transport-layer disconnect mid-way and threw `[SRV-006] connection error`. At the same time, the historical cost backfill logic `get_log_model_pricing_cached` failed its `trip_model_date_suffix` cleanup match on model names with a non-standard date format (`deepseek-v4-pro-202606`, for example) and silently fell back to billing against the request model (Claude Opus), inflating the cost.

Both were fixed in v3.16.4. The new version improved disconnect detection in streaming and introduced billing against the real upstream model (schema v11), capturing the actual outbound model into the log during forwarding and resolving the billing fallback caused by alias match failures.

  1. Upgrade cc-switch to v3.16.4 or newer for the proxy forwarding robustness improvements and the real-upstream-model billing logic.

  2. If your historical statistics already hold wrong billing data from a failed model alias match, fix the affected rows in the `proxy_request_logs` database table by hand.

ToolClaude Code
Version3.15.0 - 3.16.2
PlatformsmacOSWindows
Why does the DeepSeek model I selected turn into a claude-* model after saving with local routing on?
That is normal local routing behaviour. Once on, cc-switch converts the request model (sonnet, opus) into the corresponding target model, for compatibility with endpoints that do not support `/v1/messages`. Turn local routing off if you do not need it.
I configured DeepSeek V4 Pro — why do the logs always show v4-flash?
Usually because the model name you entered has an invalid format such as wrong casing, so the DeepSeek server finds no match and falls back to v4-flash. Use the official, valid model ID.
DeepSeek V4 supports reasoning_effort — why is it not passed through after configuring it in Claude Desktop?
The cc-switch `supports_reasoning_effort` list does not currently include DeepSeek models, so the parameter is dropped. This is recorded, and a later version may support pass-through or a user-configurable list.

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.