Skip to content

Unexpected status 503 Service Unavailable Codex

Quick fix

Configure v2ray or other proxy tools to bypass LAN traffic, resolving the 503 error when Codex accesses cc-switch local routing.

Error output
Unexpected status 503 Service Unavailable: Unknown error, url: http://127.0.0.1:15721/v1/responses

When using cc-switch to enable local routing for Codex, if system proxy tools like v2ray are enabled, they may intercept local requests to 127.0.0.1, causing Codex to fail connecting to the local service and report a 503 Service Unavailable error. Additionally, some users encountered variant errors when using NVIDIA NIM interfaces: because the upstream interface does not support the /v1/responses path, cc-switch receives a 404 Not Found error from the upstream when forwarding requests.

  1. Open the routing settings of v2ray or other proxy tools, add rules to bypass LAN (LAN) and mainland China domains, ensuring that local requests to 127.0.0.1 are not intercepted by the proxy.

ToolCodex
Version0.136.0
PlatformsmacOSWindows
Why does the 503 error disappear after disabling the proxy, but curl tests fail?
Because accessing external APIs requires a proxy. Directly disabling the proxy causes external requests to fail. The correct approach is to keep the proxy enabled but configure it to bypass the LAN (127.0.0.1), allowing local traffic to connect directly while external traffic goes through the proxy.
What causes the 404 Not Found error when using NVIDIA NIM?
This occurs because upstream providers like NVIDIA do not support the /v1/responses endpoint called by Codex. cc-switch receives a 404 error from the upstream when forwarding requests, which is an API compatibility issue.

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.