MiMo Code Integration
Configure MiMo Code with LLM Gateway, select a compatible model, and verify a coding task.
MiMo Code is a terminal coding agent. Its custom provider configuration can route Anthropic-compatible requests through LLM Gateway.
Video walkthrough
Install
Use the official installer, then check the version:
1curl -fsSL https://mimo.xiaomi.com/install | bash2mimo --version1curl -fsSL https://mimo.xiaomi.com/install | bash2mimo --versionConnect your workspace
Create a key in your LLM Gateway or DevPass dashboard and export it in the terminal that will launch MiMo Code:
1export LLMGATEWAY_API_KEY="your_api_key"1export LLMGATEWAY_API_KEY="your_api_key"Merge this configuration into ~/.config/mimocode/mimocode.json on macOS or Linux:
1{2 "model": "anthropic/MODEL_ID",3 "small_model": "anthropic/MODEL_ID",4 "provider": {5 "anthropic": {6 "options": {7 "apiKey": "{env:LLMGATEWAY_API_KEY}",8 "baseURL": "https://api.llmgateway.io/v1"9 },10 "models": {11 "MODEL_ID": {12 "name": "Gateway coding model",13 "id": "MODEL_ID",14 "limit": {15 "context": 200000,16 "output": 819217 }18 }19 }20 }21 }22}1{2 "model": "anthropic/MODEL_ID",3 "small_model": "anthropic/MODEL_ID",4 "provider": {5 "anthropic": {6 "options": {7 "apiKey": "{env:LLMGATEWAY_API_KEY}",8 "baseURL": "https://api.llmgateway.io/v1"9 },10 "models": {11 "MODEL_ID": {12 "name": "Gateway coding model",13 "id": "MODEL_ID",14 "limit": {15 "context": 200000,16 "output": 819217 }18 }19 }20 }21 }22}Replace every MODEL_ID with the exact gateway model ID. Choose a model with tool support from the live catalogue. Adjust the example context and output limits to values supported by that model.
Here anthropic/ in the top-level selection identifies MiMo Code's local provider. The nested id is the model ID sent to LLM Gateway. The provider name selects the Anthropic API format; the base URL sends those requests to the gateway.
Using DevPass? Keep the nested
idcanonical and choose a model included in your plan. Adding an upstream provider prefix to that ID pins routing and is not supported on coding plans.
Verify a task
1cd your-project2mimo1cd your-project2mimoReview the workspace trust prompt. Ask the agent to inspect a function, fix a failing test case, and run the existing tests without changing them. Approve file and command permissions as needed, then review the diff and test output.
Check usage in the workspace that issued your key.
Troubleshooting
The request exceeds the model's output limit: MiMo Code 0.1.15 forces a large output allowance for some model names, overriding limit.output. If your request is rejected, select a compatible model or update MiMo Code; changing the configured limit alone may not fix it.
A tool schema is rejected: MiMo Code's tool definitions may exceed what the selected model or upstream provider accepts. Try another tool-capable model and inspect the returned error.
Authentication fails: export the key before starting MiMo Code and confirm that the key is active.
A model is unavailable: check the nested model id, account access, and plan restrictions.
See the MiMo Code provider reference for other configuration options.