OpenAI Codex CLI Can Run Claude, Kimi and Other Models via One Config Block
OpenAI's Codex CLI, typically limited to OpenAI models, supports custom providers through a built-in configuration option that lets users route requests to alternative AI models. By editing a single config file at ~/.codex/config.toml and specifying a gateway that implements the Responses API, developers can run models such as Claude Opus or Kimi K3 directly inside the Codex CLI. The author demonstrates this using Opper, an EU-hosted API gateway offering access to over 700 models under one API key, which they disclose they work for. An optional Opper CLI tool can automate the entire setup, detecting and installing Codex if needed and writing the provider config block without overwriting existing settings. The approach is particularly relevant for developers who need specific models, cost-efficient long sessions, or data residency in regions like the EU for compliance reasons.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in