Codex CLI (gateway)
Codex CLI (gateway)
Codex CLI (gateway)
Route Codex CLI’s LLM calls through the Respan gateway for automatic logging, caching, and model switching. Only your RESPAN_API_KEY is needed.
No OPENAI_API_KEY needed — the Respan gateway handles provider authentication.
Add to ~/.codex/config.toml (user-level) or .codex/config.toml (project-level):
env_key is the name of the environment variable that holds your API key, not the actual key. The wire_api = "responses" setting tells Codex to use the HTTP Responses API instead of WebSockets, which the gateway supports.
Change the model parameter in ~/.codex/config.toml to use any supported model.
See the full model list.