Skip to content

MiMo V2.5 + Codex CLI on Windows

Configure Codex CLI to use Xiaomi MiMo V2.5 on Windows. config.toml provider, wire_api, big-context coding, current V2.5 API pricing, and the common fixes.

MGMCSA Guru Team July 16, 2026 3 min read
Codex CLI on Windows configured to use Xiaomi MiMo V2.5

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 errorsMIMO_API_KEY not set in the shell.
  • “Model not found” — confirm the model ID on Xiaomi’s platform.
  • Changes ignored — restart Codex; config.toml loads 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.

Frequently asked questions

Can Codex CLI use Xiaomi MiMo?

Yes. MiMo offers an OpenAI-compatible API, so you add it as a custom provider in Codex's config.toml with wire_api set to chat, then point the model at mimo-v2.5-pro. It runs like any OpenAI-style provider.

What's MiMo's big advantage in Codex?

Its very large (around 1M token) context window with no long-context surcharge. You can load large portions of a repo into a Codex session affordably, which smaller-context or surcharged models can't match.

Why doesn't a base-URL-only change work?

Codex defaults to OpenAI's responses API. MiMo uses chat completions, so you must set wire_api = "chat". Without it, Codex sends the wrong format and fails even with the right URL and key.

How much does MiMo cost?

As of Xiaomi's May 27, 2026 V2.5 price update, MiMo-V2.5-Pro is $0.0036 cache-hit input, $0.435 cache-miss input, and $0.87 output per 1M tokens. Standard MiMo-V2.5 is $0.0028 / $0.14 / $0.28 per 1M tokens.

Should I run this in WSL?

On Windows, WSL gives the cleaner environment Codex expects for env vars and shell handling. It's optional but smoother — see the Codex CLI on WSL guide.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.