Test failed - Claude Code
Quick fix
Change the cc-switch outbound proxy port to match your local proxy software (7897, for instance) to restore the connection.
Symptom
Section titled “Symptom”测试失败Test failed
cc-switch depends on a correct outbound proxy configuration to forward requests to DeepSeek and other upstream models. When you change local proxy software or upgrade the client without updating the cc-switch proxy port setting to match, requests never reach the right listening address. The connection then drops outright, hangs with no response (around a 20-second timeout), or in some network environments returns intermittent 502 Bad Gateway errors.
At bottom this is a local proxy chain configuration that is out of sync, or an unstable proxy node. Intermittent failures usually accompany resource fluctuations in the proxy software itself or network jitter; correcting the port configuration and making sure the proxy chain is healthy resolves it completely.
Open the local proxy software you use and note the proxy port it actually listens on (7897, for instance).
Go to the cc-switch configuration screen or config file, change the outbound proxy port to the one you noted, save, and restart Claude Code to test again.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why did it work before and start erroring after I changed VPN or upgraded the version?
- Because the cc-switch outbound proxy configuration is cached independently and does not follow changes in your local proxy software automatically. A port mismatch means requests are dropped or routed to an invalid address.
- The log shows intermittent 502s or timeouts. Did the DeepSeek server go down?
- No. Per the reports, this kind of intermittent failure usually comes from a wrong local proxy port configuration, the proxy software being overloaded, or network jitter. Correcting the port and stabilizing the proxy resolves it.
Related problems
Section titled “Related problems”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.