If you use Codex CLI and work on big repositories, Xiaomi MiMo is worth a look: a very large context window with no long-context surcharge, at low cache-aware V2.5 rates. MiMo’s OpenAI-compatible API drops straight into Codex as a custom provider, so you can feed it a lot of code without watching the cost multiply.
This is the Windows config and the one gotcha. For Codex’s general provider model, see Codex CLI custom provider setup.
Step 1: Codex CLI and a MiMo key
Install Codex CLI per its docs, then sign up on Xiaomi’s MiMo platform and create an API key (watch for free trial windows). On Windows, env vars are cleaner in WSL — see Codex CLI on Windows with WSL.
Step 2: Add MiMo to config.toml
model = "mimo-v2.5-pro"
model_provider = "mimo"
[model_providers.mimo]
name = "Xiaomi MiMo"
base_url = "https://api.xiaomimimo.com/v1"
env_key = "MIMO_API_KEY"
wire_api = "chat"
Export the key and run:
export MIMO_API_KEY="your-mimo-key"
codex
Confirm the base URL and model ID on Xiaomi’s platform.
Step 3: Exploit the big context
MiMo’s ~1M token context with no surcharge is the reason to use it here. Add large parts of your repo to a Codex session and the per-token cost stays flat. In WSL, keep the project in your Linux home so file operations stay fast — see access your Windows files from WSL.
MiMo models in Codex (verify on Xiaomi)
| mimo-v2.5-pro | Flagship; ~1M context |
|---|---|
| mimo-v2.5 | Standard tier |
| mimo-v2-flash | Faster, lighter |
Pricing
Xiaomi’s official V2.5 price update lists MiMo-V2.5-Pro at $0.0036 cache-hit input / $0.435 cache-miss input / $0.87 output per 1M tokens. Standard MiMo-V2.5 is cheaper at $0.0028 / $0.14 / $0.28 per 1M tokens. That no-surcharge pricing makes loading big context predictable and cheap. Full detail: Xiaomi MiMo pricing and free tiers.
Troubleshooting
- Format/streaming errors — missing
wire_api = "chat". - Auth errors —
MIMO_API_KEYnot set in the shell. - “Model not found” — confirm the model ID on Xiaomi’s platform.
- Changes ignored — restart Codex;
config.tomlloads at startup.
MiMo + Codex checklist
- Codex CLI installed; MiMo key created
- [model_providers.mimo] block with the OpenAI base URL
- wire_api = "chat" set
- model set to mimo-v2.5-pro (verify ID)
- MIMO_API_KEY exported; Codex restarted
Wrapping up
MiMo V2.5 with Codex CLI is a strong big-repo setup: a [model_providers.mimo] block on the OpenAI endpoint, wire_api = "chat", and mimo-v2.5-pro. The ~1M context with no surcharge and low V2.5 cache-aware pricing make feeding lots of code affordable. Verify the endpoint, ID, and rate on Xiaomi’s platform.
To run MiMo with Claude Code, see run Xiaomi MiMo V2.5 Pro with Claude Code.