Skip to content

Codex errors after enabling the local proxy

Quick fix

Add /v1 to the end of the Codex provider request address in CC Switch, save, and retry.

Error output
开启本地代理后 Codex 报错
English translation

Codex errors after enabling the local proxy

With the cc-switch Codex local proxy on, Codex sends requests to the local proxy address and cc-switch forwards them to the request address configured on the provider. Codex natively uses the OpenAI Responses format. If the provider request address does not end in `/v1`, or points at an incompatible Chat Completions endpoint, the response format the provider returns does not match what Codex expects and Codex errors. In #651 a maintainer confirmed "add the /v1 suffix, configured in the request address", and the user replied that it was solved.

Other reports in the same cluster are variants on that proxy path. #1586 is the model name not being overridden, where you have to confirm you entered a "service endpoint address compatible with the OpenAI Response format" — cc-switch does no format conversion for Codex. #1515 is that changing the model in the CLI after starting the proxy does not sync back to the config. #4177 and #5526 are duplicate usage counting (copied fork/archived history, and a logical model alias disagreeing with the resolved model). #4188, #4189, and #4190 are attribution, truncated streams, and input_file/input_audio problems on the format conversion path, which a maintainer confirmed are covered on main. And #3970 is the proxy service address being read-only in the UI.

  1. In the CC Switch Codex provider config, change the request address to one ending in `/v1`.

  2. Save and trigger a Codex request again to confirm the error is gone; the user in #651 confirmed it was solved.

  3. If it still errors, check the endpoint you entered is compatible with the OpenAI Response format — cc-switch does not convert Codex requests to Chat Completions.

ToolCodex
Version3.16.2 - 3.17.0(受影响范围)
PlatformsWindowsmacOSLinux
Why does the model name configured in cc-switch not override the `gpt-5.4` Codex selected?
Confirm you entered a service endpoint address compatible with the OpenAI Response format. cc-switch does no format conversion for Codex. The CLI can pass a model name with `-m`, while the VS Code plugin cannot be started with arguments (#1586).
After starting the proxy, why does changing the model in the CLI not sync to the config file?
Enabling the proxy requires taking over model mapping, so a model change in the CLI is not written back to cc-switch. Change the cc-switch config instead, or do not change the model while takeover is on (#1515).
Why do many `Codex (Session)` records appear in usage statistics after a Codex fork?
Parent session history copied into the fork/archived JSONL can be imported twice (#4177). Separately, a logical model alias in the session log disagreeing with the resolved model the proxy recorded also breaks deduplication for the same request (#5526).

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.