{"repo": "anthonyfangqing/pi-provider-xiaomi-mimo", "files": {"README.md": {"26508ee16d038f8836629fe0037a62810d1fb7dd": {"t": 1785595273.742308, "n": 2988, "h": "67dc2080de75aa60", "c": "# Pi Provider Extension: Xiaomi MiMo\n\nA [pi](https://github.com/badlogic/pi-mono) provider extension for [Xiaomi MiMo](https://platform.xiaomimimo.com) AI models.\n\n## Setup\n\n### Option A: `/login` (interactive)\n\n```\n/login\n```\nSelect **\"Use a subscription\"** → **Xiaomi MiMo** → paste your key.\n\n> MiMo doesn't have a real OAuth flow — `/login` just stores your API key.\n> It appears under \"subscription\" because that's how pi supports dynamic base URL\n> switching (tp- keys → Token Plan endpoint, sk- keys → pay-as-you-go endpoint).\n\n### Option B: Environment variable\n\n```bash\nexport MIMO_API_KEY=tp-xxxxx # Token Plan\n# export MIMO_API_KEY=sk-xxxxx # pay-as-you-go\npi -e path/to/pi-provider-xiaomi-mimo\n```\n\n## Models\n\n| Model | Context | Max Output | Vision | Reasoning | Input $/1M | Output $/1M |\n|:------|:--------|:-----------|:------|:----------|:-----------|:------------|\n| `mimo-v2.5-pro` | 1M | 128K | — | ✅ | $1.00 | $3.00 |\n| `mimo-v2.5` | 1M | 128K | ✅ | ✅ | $0.40 | $2.00 |\n| `mimo-v2-pro` | 1M | 128K | — | ✅ | $1.00 | $3.00 |\n| `mimo-v2-omni` | 256K | 128K | ✅ | ✅ | $0.40 | $2.00 |\n| `mimo-v2-flash` | 256K | 64K | — | ✅ | $0.10 | $0.30 |\n\nPrices are overseas pay-as-you-go ≤256K tier. Cache read is 80% cheaper; cache write is free (limited time).\n\n## Token Plan\n\nThe [Token Plan](https://platform.xiaomimimo.com/#/token-plan) is a subscription for AI coding:\n\n| Tier | Price | Monthly Credits | ~Complex Tasks |\n|:-----|:------|:----------------|:---------------|\n| Lite | $6/mo | 60M | ~120 |\n| Standard | $16/mo | 200M | ~400 |\n| Pro | $50/mo | 700M | ~1,400 |\n| Max | $100/mo | 1,600M | ~3,200 |\n\n**Credit rates** (no context-tier surcharge — 1M context costs the same as 256K):\n\n| Model | Rate |\n|:------|:-----|\n| V2.5 / V2-Omni / V2-Flash | 1 token = 1 credit |\n| V2.5-Pro / V2-Pro | 1 token = 2 credits |\n| TTS series | free (limited time) |\n\n> **Key change**: The Token Plan no longer charges extra for the 256K–1M context window tier. Previously this cost 4× credits; now only the model multiplier applies. Pay-as-you-go still doubles pricing for >256K context.\n\n**Off-peak discount**: 0.8× credit consumption daily 00:00–08:00 Beijing Time (4PM–12AM UTC).\n\n**Cache tokens**: The documentation does not explicitly state whether cache-read tokens are discounted in the Token Plan. It appears all input tokens (cache or not) consume credits at the same rate. For pay-as-you-go, cache hits are 80% cheaper.\n\nToken Plan keys (`tp-xxxxx`) and pay-as-you-go keys (`sk-xxxxx`) are independent — do not mix them.\n\n## Configuration\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `MIMO_API_KEY` | API key (required) | — |\n| `MIMO_BASE_URL` | Override base URL entirely | auto-detected |\n| `MIMO_CLUSTER` | Token Plan cluster: `sgp`, `ams`, `cn` | `sgp` |\n\nThe base URL is auto-detected from your API key:\n- `tp-*` keys → Token Plan cluster URL (pick via `MIMO_CLUSTER`)\n- `sk-*` keys → `https://api.xiaomimimo.com/v1`\n\n## License\n\nMIT\n"}}}}