Codex + minirouter
Custom Responses API provider configuration for Codex local clients.
Settings
~/.codex/config.toml, with MINIROUTER_KEY in the shell environment
In order
- web_searchdisabled
Hosted web search is not enabled. Local shell and file tools remain available.
- model_reasoning_summarynone
The MiniRouter example below does not emit a Codex reasoning summary.
- model_providerminirouter
- modelzai/glm-5.3-flash
- model_providers.minirouter.base_urlhttps://api.minirouter.sh/v1
- model_providers.minirouter.env_keyMINIROUTER_KEY
Codex reads the MiniRouter key from this environment variable.
- model_providers.minirouter.wire_apiresponses
Codex uses MiniRouter's /v1/responses endpoint.
model = "zai/glm-5.3-flash"
model_provider = "minirouter"
web_search = "disabled"
model_reasoning_summary = "none"
[model_providers.minirouter]
name = "MiniRouter"
base_url = "https://api.minirouter.sh/v1"
env_key = "MINIROUTER_KEY"
wire_api = "responses"Recommended models · 4
All models →- Modelzai/glm-5.3-flashWhyBest current balance of coding ability, agentic performance, context and cost.→
- Modelopenai/gpt-5.6-solWhyHigher-intelligence option when task quality matters more than spend.→
- Modelspacexai/grok-4.6WhyStrong agentic alternative with a 500K-token window.→
- Modelgoogle/gemini-3.8-flashWhyMultimodal coding alternative with a 1M-token window.→
Only rows confirmed in the current live catalog are linked. A plain row is included as a reference. Paste ids exactly as written, author/name.
When it fails
- SymptomCodex ignores the MiniRouter provider blockCodeclient-side
Provider and credential redirects are ignored in project-scoped .codex/config.toml files. Put this provider in your user-level ~/.codex/config.toml.
- SymptomCodex calls Chat Completions or reports an unsupported wire APICodeinvalid_request
Set wire_api to responses. MiniRouter exposes the Responses route at /v1/responses; Codex appends /responses to the configured base URL. docs/errors#invalid_request →
- Symptom401 on every requestCodeinvalid_api_key
Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies. docs/errors#invalid_api_key →
- Symptom402 before any tokens arriveCodeinsufficient_credits
Balance below the estimated cost of the request. Top up (from $0.50 with direct Solana payments) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries. docs/errors#insufficient_credits →
Every API error string carries a URL resolving to /docs/errors.
Other coding agents and editors
- Claude CodeTerminal coding agent
- CursorAI code editor
- ClineVS Code extension
- Roo CodeVS Code extension (archived upstream 2026-05-15)
- Kilo CodeVS Code extension
- OpenCodeTerminal agent
- ContinueVS Code / JetBrains extension
- AiderTerminal pair programmer
- LiteLLMProxy / SDK (feeds Aider, Open WebUI, and any LiteLLM client)
- ZedEditor