OpenAI-compatible proxy for Xiaomi MiMo free AI models.
Connect Xiaomi's MiMo models to OpenCode Desktop, Claude Code, Cline, Continue, or any OpenAI-compatible client.
No API keys required — uses MiMoCode's built-in free model
mimo-auto(zero cost).
mimo-opencode-bridge is a lightweight proxy that translates OpenAI API calls into MiMoCode CLI commands, giving you access to Xiaomi MiMo AI models through any OpenAI-compatible tool.
It solves the problem of MiMo Web API requiring a proprietary bundled provider — by running MiMoCode locally and proxying through it.
| Feature | Details |
|---|---|
| 🆓 Free model | mimo-auto — 0 cost, no API key needed |
| 🔄 Streaming | Real-time SSE streaming |
| 🧵 Concurrency control | Queue system prevents DB corruption |
| ⏱ Smart timeout | Auto-kills stale processes |
| 🖥 Web panel | Built-in control UI (start/stop/restart/logs/test) |
| 🔌 OpenAI-compatible | Works with any /v1/chat/completions client |
| 🔒 Optional auth | API key whitelist support |
| Model ID | Description | Cost |
|---|---|---|
mimo-auto |
MiMo Auto (smart selection) | Free |
mimo-v2-flash |
MiMo V2 Flash (lightweight) | Depends |
mimo-v2.5 |
Xiaomi MiMo V2.5 | Depends |
mimo-v2.5-pro |
Xiaomi MiMo V2.5 Pro (flagship) | Depends |
mimo-v2.5-pro-ultraspeed |
MiMo V2.5 Pro UltraSpeed | Depends |
- Node.js 18+ — for MiMoCode CLI (
@mimo-ai/cli) - Python 3.8+ — for the bridge proxy
- Linux x86_64 (other platforms may work but untested)
npm install -g @mimo-ai/cli
# Verify
mimo --version # → 0.1.3
mimo models # → mimo/mimo-auto, xiaomi/mimo-v2.5, ...git clone https://github.com/cyberanrhy/mimo-opencode-bridge.git
cd mimo-opencode-bridge
bash start.shThe proxy starts on http://127.0.0.1:12434.
# Check models
curl http://127.0.0.1:12434/v1/models
# Send a message
curl -X POST http://127.0.0.1:12434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"mimo-auto","messages":[{"role":"user","content":"Say hello in Russian"}]}'
# → {"choices":[{"message":{"content":"Привет"}}]}Start the panel to manage the proxy from your browser:
python3 panel.py
# Open http://127.0.0.1:12435Features: start/stop/restart, live logs, test request, response time monitor.
Add to ~/.config/opencode/opencode.json:
{
"provider": {
"mimo": {
"npm": "@ai-sdk/openai-compatible",
"name": "MiMo Bridge",
"options": {
"baseURL": "http://127.0.0.1:12434/v1",
"apiKey": "sk-proxy",
"timeout": 180000,
"headerTimeout": 60000,
"chunkTimeout": 110000
},
"models": {
"mimo-auto": { "name": "MiMo Auto (free)" },
"mimo-v2.5": { "name": "MiMo V2.5" },
"mimo-v2.5-pro": { "name": "MiMo V2.5 Pro" },
"mimo-v2.5-pro-ultraspeed": { "name": "MiMo V2.5 Pro UltraSpeed" },
"mimo-v2-flash": { "name": "MiMo V2 Flash" }
}
}
}
}export ANTHROPIC_BASE_URL="http://127.0.0.1:12434/v1"
export ANTHROPIC_AUTH_TOKEN="sk-proxy"Configure as any OpenAI-compatible provider with baseURL: http://127.0.0.1:12434/v1.
Copy config.json.example to config.json:
| Field | Default | Description |
|---|---|---|
port |
12434 |
Proxy listen port |
host |
127.0.0.1 |
Bind address |
default_model |
mimo-auto |
Default model |
timeout |
180 |
Request timeout (seconds) |
log_file |
/tmp/mimo-proxy.log |
Log file |
log_level |
INFO |
Log level |
api_keys |
[] |
Restrict access (empty = open) |
max_concurrency |
1 |
Max concurrent requests |
mimo_bin |
"" |
Force binary path (auto-detect) |
# ~/.config/systemd/user/mimo-proxy.service
[Unit]
Description=MiMo — OpenCode Bridge
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /path/to/mimo_opencode_bridge/mimo_proxy.py --port 12434
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.targetsystemctl --user daemon-reload
systemctl --user enable --now mimo-proxy.service
systemctl --user status mimo-proxy.serviceProxy won't start / "mimo binary not found"
npm install -g @mimo-ai/cli
which mimoMultiple "mimo run" processes stuck
kill $(ps aux | grep "mimo run" | grep -v grep | awk '{print $2}')
systemctl --user restart mimo-proxy.serviceOpenCode shows error with MiMo models
curl http://127.0.0.1:12434/v1/models— is proxy alive?- Check
~/.config/opencode/opencode.jsonsyntax - Restart OpenCode Desktop
503 "server busy" Another request is in progress. The bridge processes one at a time using a queue to prevent database corruption. Retry shortly.
mimo-opencode-bridge/
├── mimo_proxy.py # 🔧 Proxy server (main)
├── panel.py # 🖥 Web control panel
├── config.json.example # 📋 Configuration template
├── start.sh # 🚀 Start script
├── .gitignore
├── LICENSE # MIT
└── README.md # 📖 This file
xiaomi mimo mimo model mimocode free ai model
opencode provider opencode custom provider opencode mimo
openai compatible proxy ai proxy llm proxy
mimo api xiaomi ai mimo v2.5 mimo-auto free
claude code mimo continue dev mimo cline mimo
MIT
- Xiaomi MiMo Team for MiMoCode
- OpenCode for the extensible AI platform
