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

Terminal
brew install --cask zed

2. Add the provider

Run zed: open settings file (cmd-alt-, on macOS, ctrl-alt-, elsewhere) and add:

settings.json
{
  "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.

4. 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.

settings.json
{
  "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
true for vision models such as google/gemini-3.8-flash.
capabilities.parallel_tool_calls
true for 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.

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.

Next steps

Esc