Skip to content

Connection failed: error sending request for url - CC Switch

Quick fix

Most related issues remain unresolved; upgrade to v3.16.3+ to fix the SSL renegotiation bug, or restart the application to refresh proxy status.

Error output
DeepSeek 检查失败: Connection failed: error sending request for url (https://api.deepseek.com/anthropic/v1/messages)
English translation

DeepSeek check failed: Connection failed: error sending request for url (https://api.deepseek.com/anthropic/v1/messages)

This error is triggered by two different mechanisms and must be distinguished based on the environment:

1. **SSL/TLS handshake failure (Windows)**: In v3.16.2 and earlier versions, some providers' APIs (such as DeepSeek) trigger multiple SSL renegotiations. The built-in test client in cc-switch handles this incorrectly, causing the handshake to be rejected, while actual proxy forwarding works normally. This issue was fixed in v3.16.3 by rewriting the test logic to reuse the same HTTP client.

2. **Proxy state caching (Cross-platform)**: If the system proxy is enabled when cc-switch starts, its global `reqwest::Client` locks that proxy configuration. If the proxy is disabled or the network is switched during operation, the client does not automatically refresh the connection pool, causing subsequent requests to fail because they cannot connect to the old proxy address. Restart the application to rebuild the client.

  1. Upgrade cc-switch to v3.16.3 or later to fix test failures caused by SSL renegotiation.

  2. If you do not upgrade or the error persists after upgrading, completely exit the cc-switch process and restart it to clear expired proxy connection caches.

ToolClaude Code / Codex
Version<= 3.16.2
PlatformsWindowsmacOS
Why does the actual conversation work, but the test link keeps reporting errors?
This is because the test function in older versions used an independent HTTP client implementation with poor support for SSL renegotiation, whereas actual proxy forwarding used a different client logic. After upgrading to v3.16.3, both are unified into the same client.
Will restarting cc-switch resolve the issue?
If the issue is caused by connection pool caching due to system proxy toggles (such as Clash/Karing), restarting can resolve it immediately. However, if it is a bug at the SSL handshake level, you must upgrade the software version to cure it.

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.