Use Kimchi Router in Codex
Run OpenAI Codex on the Kimchi Model Router: connect Codex to the gateway, start sessions on auto, and review the current limitations.
This guide shows you how to run Codex, OpenAI's coding agent, on the Kimchi Model Router. Tested with Codex 0.159.0.
Once connected, Codex sends its requests to the auto model, and the Model Router picks the model that fits each task.
Prerequisites
- The Kimchi CLI installed and set up. See Kimchi CLI.
- Codex 0.159.0 or later.
Connect Codex to Kimchi
Run kimchi setup-tools
Run the setup wizard and select Codex:
kimchi setup-toolsThe wizard configures Codex to send its requests to the Kimchi gateway.
Start a session on auto
Start Codex with the auto model:
codex --model autoTo switch a running session, select auto in the /model dropdown.
Verify the connection
Ask Codex a simple question, then open the Kimchi console. Go to Analytics and set the time range to 24h. Your requests appear in the totals within seconds.
To see which models the Router picked, see Router analytics.
Supported features
- Terminal sessions
- The ChatGPT desktop app
- Image support
Limitations and known issues
Context window
Codex shows no context window indicator for the auto model. Users report an effective window of about 256K tokens.
You can set model_context_window in ~/.codex/config.toml to plan for a larger window. Treat this override with care: Codex has known issues where custom context window values break auto-compaction.
Kimi K3 request failures
Some requests fail when the Model Router picks Kimi K3. This is a known issue on the Kimchi gateway side, and it affects Codex sessions that use the Responses API.
Next steps
Updated about 3 hours ago