Skip to content

Codex

Codex CLI lets you register a custom OpenAI-compatible provider in ~/.codex/config.toml. Add Routeplane as that provider and Codex routes through the whole registry instead of only OpenAI.

  • Routeplane running — local proxy at http://127.0.0.1:4356. Routeplane Cloud is on the Phase D roadmap and not yet shipping; for now, self-host with your own provider keys.

  • Codex installed:

    Terminal window
    npm install -g @openai/codex

Add a provider block to ~/.codex/config.toml. The base_url includes /v1 — Codex appends the route (/chat/completions) itself.

model = "openai/gpt-4o"
model_provider = "routeplane"
[model_providers.routeplane]
name = "Routeplane"
base_url = "http://127.0.0.1:4356/v1"
wire_api = "chat" # Chat Completions; use "responses" to target /v1/responses
Terminal window
codex
**No key for the local proxy** — omit `env_key` and Codex sends no auth, which the loopback proxy accepts. Routeplane Cloud is on the Phase D roadmap; the cloud endpoint is not yet shipping. `model_provider` / `model_providers` only take effect in the **user-level** `~/.codex/config.toml`, not a project-local `.codex/config.toml`.

The model field takes any registry id in provider/model form — openai/gpt-4o, anthropic/claude-sonnet-4-6, google/gemini-2.5-pro — optionally with a :cost or :latency variant. Override per run with codex --model <id>. See Models.

Run codex and issue a prompt; check the routeplane-served-by response header to see which provider answered.