LiteLLM + minirouter
Configuration for the LiteLLM SDK and proxy: one `openai/`-prefixed model string or one proxy YAML entry reaches every minirouter model.
Settings
Python SDK call, or config.yaml for the proxy
In order
- modelopenai/zai/glm-5.3-flash
The openai/ prefix selects LiteLLM's OpenAI-compatible transport; everything after it is our model id. Once the upstream provider PR lands this becomes minirouter/zai/glm-5.3-flash with no api_base.
- api_basehttps://api.minirouter.sh/v1
- api_keymr-live-… (your key)
model_list:
- model_name: glm-5.3-flash
litellm_params:
model: openai/zai/glm-5.3-flash
api_base: https://api.minirouter.sh/v1
api_key: os.environ/MINIROUTER_API_KEYRecommended models · 4
All models →- Modelzai/glm-5.3-flashWhyBest current balance of coding ability, agentic performance, context and cost.→
- Modelopenai/gpt-5.6-solWhyHigher-intelligence option when task quality matters more than spend.→
- Modelspacexai/grok-4.6WhyStrong agentic alternative with a 500K-token window.→
- Modelgoogle/gemini-3.8-flashWhyMultimodal coding alternative with a 1M-token window.→
Only rows confirmed in the current live catalog are linked. A plain row is included as a reference. Paste ids exactly as written, author/name.
When it fails
- SymptomLiteLLM appends /v1 twice or reports a 404 from the gatewayCodeinvalid_request
Set api_base to https://api.minirouter.sh/v1 exactly. LiteLLM's OpenAI transport does not add /v1 for a custom api_base, so include it yourself and nothing after it. docs/errors#invalid_request →
- SymptomCost tracking shows $0 for every requestCodeclient-side
LiteLLM prices from its own model table, which does not know our ids until the upstream pricing PR lands. Billing on our side is unaffected; read the x-minirouter-balance-usd header for the truth.
- Symptom401 on every requestCodeinvalid_api_key
Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies. docs/errors#invalid_api_key →
- Symptom402 before any tokens arriveCodeinsufficient_credits
Balance below the estimated cost of the request. Top up (from $0.50 with direct Solana payments) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries. docs/errors#insufficient_credits →
Every API error string carries a URL resolving to /docs/errors.