Skip to content

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.

Error output
{ "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.

  1. Upgrade to cc-switch v4.0 or later. The maintainer recommends getting the update from GitHub Releases.

  2. 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.

ToolCodex
Versionv4.0 起该需求无需手动处理;受影响版本未说明
PlatformsUnknown

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.

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.