Local proxy port failure: Codex routing error
Quick fix
After upgrading to 4.0, sync the configuration and switch to routing mode so CC Switch generates a Codex address using the local listening port.
Symptom
Section titled “Symptom”手动把 Codex 路由 provider 中的 `base_url` 从 `http://127.0.0.1:18100` 改为 `http://127.0.0.1:15721` 后,问题可绕过。After manually changing `base_url` in the Codex routing provider from `http://127.0.0.1:18100` to `http://127.0.0.1:15721`, the issue can be bypassed.
WebDAV sync in 3.14.1 may sync a Codex routing provider configuration, including the local proxy port, from one device to another. The receiving device listens on port 15721, while the synced configuration still points to 18100, which is not listening, causing routing to fail. The maintainer said that 4.0 rewrote local routing: when entering routing mode, CC Switch generates a Codex local address using the port actually listening on the current device. Routing mode and the port are also stored only on the local device.
Upgrade to version 4.0, sync the configuration, then switch to routing mode. Check whether Codex points to the local proxy port actually listening on the current device.
If you are still on an older version, manually change the Codex route provider's `base_url` to the port actually listening on the local device, for example `http://127.0.0.1:15721`, then restart CC Switch.
~/.codex/config.toml base_url = 'http://127.0.0.1:18100'base_url = 'http://127.0.0.1:15721'
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- After upgrading to 4.0, do I still need to manually change Codex's `base_url`?
- The maintainer recommends syncing the configuration after upgrading, then switching to routing mode. CC Switch will generate an address using the port currently listening on the local device.
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.