Skip to content

No API key configured for provider: custom: Codex takeover

Quick fix

Upgrade Codex CLI and CC Switch to the latest versions; CC Switch supports reading the Codex CLI version from config.toml.

Error output
No API key configured for provider: custom

This issue occurred with the JS version of Codex installed through Homebrew: it reads config.json, config.yaml, or config.yml, but not config.toml written by CC Switch. It was also incompatible with the placeholder key in auth.json and the provider field format written by the Rust version at the time. The maintainers explained that CC Switch targets Codex CLI versions that read ~/.codex/config.toml; the early JS version was outside the supported scope.

The maintainers said CC Switch 4.0 rewrote Codex configuration writing. It no longer writes placeholder credentials to auth.json, and third-party keys are written only to the [model_providers.custom] table in config.toml. Upgrade Codex and CC Switch and try again; if the issue still occurs, provide the output of codex --version and the CC Switch version number.

  1. Upgrade Codex CLI to the current version and CC Switch to the latest version, then try taking over again.

  2. If the issue still occurs on the latest version, include the output of codex --version and the CC Switch version number in the issue.

ToolCodex
Version3.12.3(CC Switch;问题报告版本)
PlatformsmacOS
What information should I provide if the issue still occurs after upgrading?
The maintainers request the output of codex --version and the CC Switch version number.

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.