You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Claude Code with multiple LLM providers (Z.AI GLM, MiniMax, Xiaomi MiMo, or any Anthropic-compatible API) via a local proxy. The main agent (Opus) stays on Anthropic while sub-tasks route through cheaper/faster providers.
7 Routing Modes
Command
Mode
Description
claude-full
Full Claude
All → Anthropic OAuth (native, zero overhead)
glm-on
Hybrid GLM
Sonnet → GLM-5.1, Haiku → GLM-4.7, Opus → Anthropic
minimax-on
Hybrid MiniMax
Sonnet/Haiku → MiniMax M2.7, Opus → Anthropic
mimo-on
Hybrid MiMo
Sonnet/Haiku → MiMo-V2.5-Pro, Opus → Anthropic
mix-on
Split
Sonnet → MiMo-V2.5-Pro, Haiku → MiniMax M2.7, Opus → Anthropic
glm-full
Full GLM
All → Z.AI direct (official config, no proxy)
mimo-full
Full MiMo
All → Xiaomi MiMo direct (mimo-v2.5-pro, no proxy)
How it works
┌──────────────────────────────────────────────┐
claude-full │ FULL CLAUDE │
│ All requests → Anthropic OAuth (native) │
├──────────────────────────────────────────────┤
glm-on │ HYBRID GLM │
│ Opus → Anthropic | Sonnet → GLM-5.1 │
│ | Haiku → GLM-4.7 │
├──────────────────────────────────────────────┤
minimax-on │ HYBRID MINIMAX │
│ Opus → Anthropic | Sonnet/Haiku → MiniMax │
├──────────────────────────────────────────────┤
mimo-on │ HYBRID MIMO │
│ Opus → Anthropic | Sonnet/Haiku → MiMo-V2.5 │
├──────────────────────────────────────────────┤
mix-on │ SPLIT GLOBAL (MiMo + MiniMax) │
│ Opus → Anthropic | Sonnet → MiMo-V2.5-Pro │
│ | Haiku → MiniMax M2.7 │
├──────────────────────────────────────────────┤
glm-full │ FULL GLM │
│ All requests → Z.AI direct (no proxy) │
├──────────────────────────────────────────────┤
mimo-full │ FULL MIMO │
│ All requests → Xiaomi MiMo direct (no proxy) │
└──────────────────────────────────────────────┘
Proxy features
Circuit breaker: auto-bypass provider after 5 failures (120s recovery)
Automatic fallback: web_search, vision, PDF → Anthropic transparently
Model-based pricing: accurate cost display from built-in MODEL_PRICING table
Request sanitization: strips Anthropic-specific params for provider compatibility
Per-tier caching: respects each provider's cache_control support
# Shell directives (not passed to proxy)_SHELL_SONNET_KEY=.keyfile# Key file relative to ~/.claude/_SHELL_HAIKU_KEY=.keyfile# Key file relative to ~/.claude/_SHELL_DISABLE_CACHING_SONNET=1# Disable prompt caching for Sonnet_SHELL_DISABLE_CACHING_HAIKU=1# Disable prompt caching for Haiku# Proxy env vars (passed to proxy process)SONNET_PROVIDER_BASE_URL=https://...HAIKU_PROVIDER_BASE_URL=https://...PROVIDER_SONNET_MODEL=model-namePROVIDER_HAIKU_MODEL=model-namePROVIDER_PASS_CACHE_CONTROL=1# Pass cache_control to provider
Pricing
Pricing is resolved automatically by model name in proxy.py:
Model
Input/M
Output/M
Provider
GLM-5.1
$1.40
$4.40
Z.AI
GLM-4.7
$0.60
$2.20
Z.AI
MiniMax M2.7
$0.30
$1.20
MiniMax
MiMo-V2.5-Pro
Token Plan
Token Plan
Xiaomi (credits-based)
Claude Sonnet 4.6
$3.00
$15.00
Anthropic
Claude Haiku 4.5
$1.00
$5.00
Anthropic
Troubleshooting
Proxy won't start
proxy-status # Check current state
proxy-logs # Check error logs
lsof -i:8082 # Port already in use?
API key issues
proxy-keys # Check all configured keys
Switch to safe mode
claude-full # Bypass proxy, use Anthropic directly