Skip to content

ChatGPT will not authenticate even with the global proxy on - cc-switch

Quick fix

Upgrade cc-switch to v3.16.4+ and set the proxy address under Settings > Routing > Global outbound proxy, fixing OAuth not going through the proxy.

Error output
ChatGPT无法认证, 全局代理已经开了
English translation

ChatGPT will not authenticate, and the global proxy is already on

cc-switch has several known defects when proxying OpenAI/Codex. The core one — authentication failing — is because the OAuth flow in early versions used a hard-coded HTTP client that ignored the in-app 全局出站代理 (global outbound proxy) setting and honoured only environment variables. Fixed in v3.16.4.

The module has other variants too: 1) reasoning effort mapping misbehaving, with Claude's max level wrongly downgraded to xhigh (some older model mappings were fixed in v3.14.0; the GPT-5.6 downgrade is still pending); 2) proxy hijacking that cannot be turned off, leaving Codex making invalid API calls continuously and burning a lot of tokens; 3) the Responses conversion path losing parallel tool calls, so each model response delivers at most one tool_use, badly slowing tasks down.

  1. Upgrade cc-switch to v3.16.4 or newer, fixing the hard-coded client that kept OAuth authentication off the proxy.

  2. In the cc-switch UI, go to 设置 - 路由 - 全局出站代理 (Settings > Routing > Global outbound proxy) and enter your local proxy address (127.0.0.1:7890, for example).

  3. Make sure the proxy node exit IP is in a region OpenAI allows — Hong Kong nodes usually are not. Check your exit IP with a site such as iplark.com.

ToolCodex
Version< 3.16.4 (认证问题),部分缺陷影响至 3.18.0
PlatformsmacOSLinux
I turned the system global proxy on — why does cc-switch still fail to authenticate?
Before v3.16.4, the OAuth flow used a hard-coded HTTP client that honoured only environment variables and ignored the in-app global outbound proxy setting. Upgrade and configure the proxy inside cc-switch separately, or launch cc-switch from a terminal that has the proxy environment variables set.
After switching Claude reasoning effort to max, why does it not apply to OpenAI models, or error?
cc-switch used to map max globally to xhigh. v3.14.0 fixed part of the adaptive thinking mapping, but models with native max support such as GPT-5.6 are still downgraded to xhigh, awaiting a later fix.
Why does Codex keep burning tokens after I close cc-switch?
A known bug introduced in v3.16.5 leaves proxy hijacking not fully disabled, so Codex keeps making invalid API calls. Quit the cc-switch process entirely for now, and check whether your system proxy settings were left modified.

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.