Integrations
Zed
Run Zed's agent on any model in the MiniRouter catalog.
Zed is a fast editor with a built-in agent panel. Add MiniRouter as an OpenAI-compatible provider to use any tool-capable model in the catalog, or a router, with one balance and per-key spend limits.
1. Install Zed
brew install --cask zedcurl -f https://zed.dev/install.sh | shwinget install -e --id ZedIndustries.Zed2. Add the provider
Run zed: open settings file (cmd-alt-, on macOS, ctrl-alt-, elsewhere) and add:
{
"language_models": {
"openai_compatible": {
"minirouter": {
"api_url": "https://api.minirouter.sh/v1",
"available_models": [
{
"name": "zai/glm-5.3-flash",
"display_name": "GLM 5.3 Flash (minirouter)",
"max_tokens": 1000000
},
{
"name": "openai/gpt-5.6-sol",
"display_name": "GPT 5.6 Sol (minirouter)",
"max_tokens": 1050000
},
{
"name": "spacexai/grok-4.6",
"display_name": "Grok 4.6 (minirouter)",
"max_tokens": 500000
}
]
}
}
}
}Set max_tokens to the context window from the model's page in Models.
3. Add your key
Create a key, then give it to Zed one of two ways.
Run agent: open settings from the command palette and paste the key under minirouter.
Zed reads <PROVIDER>_API_KEY, so the minirouter entry reads MINIROUTER_API_KEY.
export MINIROUTER_API_KEY=mr-live-YOUR-KEY-HERE4. Send a prompt
Pick a MiniRouter model in the agent panel, send one prompt, then open Activity. The request lists its model, tokens and exact cost.
Default and task models
Use a strong model for the agent and a cheap one for commit messages and summaries.
{
"agent": {
"default_model": { "provider": "minirouter", "model": "openai/gpt-5.6-sol" },
"commit_message_model": { "provider": "minirouter", "model": "zai/glm-5.3-flash" },
"thread_summary_model": { "provider": "minirouter", "model": "zai/glm-5.3-flash" }
}
}- default_model
- The agent panel.
- commit_message_model
- Commit message generation.
- thread_summary_model
- Thread summaries.
- inline_assistant_model
- The inline assistant.
Each model must also appear in the provider's available_models.
Model capabilities
Zed assumes tools on, images off and no parallel tool calls. Override per model entry.
- max_tokens
- The model's context window, from Models.
- max_output_tokens
- The model's output limit, from the same page.
- capabilities.
images truefor vision models such asgoogle/gemini-3.8-flash.- capabilities.
parallel_tool_calls truefor models that call several tools at once.- reasoning_effort
"high"and similar, for reasoning models.
Keep spend in check
Swap models from the dashboard with a preset: list @preset/your-slug in available_models.
Recommended modelsBrowse every model in the catalog.
zai/glm-5.3-flash- Best current balance of coding ability, agentic performance, context and cost.
openai/gpt-5.6-sol- Higher-intelligence option when task quality matters more than spend.
spacexai/grok-4.6- Strong agentic alternative with a 500K-token window.
google/gemini-3.8-flash- Multimodal coding alternative with a 1M-token window.
Troubleshooting
Provider appears but requests fail instantly
The API key is set in the Agent panel's provider settings, not in settings.json — Zed keeps credentials out of the config file.
404, HTML, or a parse error on every request
Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.
Error: 400 invalid_request.
401 on every request
Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.
Error: 401 invalid_api_key.
402 before any tokens arrive
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.
Error: 402 insufficient_credits.
Every error code, with its fix: Errors.