Codex config import missing auth_mode
Quick fix
Upgrade to cc-switch v4.0 or later; when switching to a third-party provider, the Key is written to config.toml, so there is no need to add auth_mode manually.
Symptom
Section titled “Symptom”{ "OPENAI_API_KEY": "PROXY_MANAGED" }When switching to a third-party provider, cc-switch writes only OPENAI_API_KEY to ~/.codex/auth.json, without auth_mode. A comment notes that even adding auth_mode to the provider template does not persist after switching. The maintainer explains that, starting with v4.0, switching to a third-party provider writes the Key to the [model_providers.custom] table in config.toml, so auth.json is no longer used and auth_mode does not need to be added manually.
Upgrade to cc-switch v4.0 or later. The maintainer recommends getting the update from GitHub Releases.
After switching to a third-party provider, check Codex's config.toml configuration; there is no need to add auth_mode to auth.json manually.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Do I still need to add auth_mode manually after upgrading?
- The maintainer explains that, starting with v4.0, switching to a third-party provider no longer relies on auth.json, so auth_mode does not need to be added manually.
- What should I do if the problem persists after upgrading?
- The maintainer recommends providing more information and reopening the issue.
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.