pi-mimofree
v1.3.0
Published
Pi extension: local proxy for MiMo Auto free API with automatic JWT refresh
Downloads
598
Maintainers
Readme
pi-mimofree
Pi extension: local proxy for MiMo Auto free API with automatic JWT refresh and token persistence.
Features
- Local HTTP proxy running on
127.0.0.1:18831 - Automatic JWT refresh — fetches new token when expired (refresh threshold: 10 minutes)
- Token persistence — saves JWT to temp file, survives restarts
- SSE streaming support — forwards streaming responses
- Pi provider auto-registration —
mimo-freeprovider withmimo-automodel
Installation
pi install pi-mimofreeOr manually in ~/.pi/settings.json:
{
"packages": ["npm:pi-mimofree"]
}Usage
After installation, the MiMo provider is automatically available:
- Start pi and run
/model - Select
MiMo Auto (Free) - Use normally — the proxy handles authentication
Commands
/mimo-status— Check proxy status and JWT expiration/mimo-refresh— Manually refresh JWT token
How it works
- Pi requests
localhost:18831/v1/chat/completions - Proxy forwards to
api.xiaomimimo.com/api/free-ai/openai/chat(non-standard path) - Uses bootstrap endpoint to fetch JWT (1-hour expiry)
- Adds required headers:
Authorization: Bearer <JWT>andX-Mimo-Source: mimocode-cli-free
Token storage
JWT is saved to %TEMP%\pi-mimo-proxy-token.json and automatically loaded on startup.
License
MIT
