---
title: "Zed integration"
description: "Settings for using Zed with MiniRouter."
canonical_url: "https://minirouter.sh/docs/integrations/zed"
markdown_url: "https://minirouter.sh/docs/integrations/zed.md"
last_updated: "2026-09-26"
---

# Zed

Run Zed's agent on any model in the MiniRouter catalog.

[Get a key](https://minirouter.sh/key)

[Zed](https://zed.dev) 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](https://minirouter.sh/models), or a [router](https://minirouter.sh/docs/auto-router), with one balance and per-key [spend limits](https://minirouter.sh/docs/rate-limits).

> **Note:** Zed shows only the models listed in `available_models`. Add an entry for each model you want.

## Quick start

### 1. Install Zed

**macOS**

```sh
brew install --cask zed
```

**Linux**

```sh
curl -f https://zed.dev/install.sh | sh
```

**Windows**

```powershell
winget install -e --id ZedIndustries.Zed
```

### 2. Add the provider

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

```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](https://minirouter.sh/models).

### 3. Add your key

[Create a key](https://minirouter.sh/key), then give it to Zed one of two ways.

**Agent settings**

Run `agent: open settings` from the command palette and paste the key under minirouter.

**Environment**

Zed reads `<PROVIDER>_API_KEY`, so the `minirouter` entry reads `MINIROUTER_API_KEY`.

```sh
export MINIROUTER_API_KEY=mr-live-YOUR-KEY-HERE
```

> **Warning:** Never put the key in `settings.json`. Zed keeps credentials out of the config file.

### 4. Send a prompt

Pick a MiniRouter model in the agent panel, send one prompt, then open [Activity](https://minirouter.sh/dashboard/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.

```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" }
  }
}
```

| Setting | Used for |
| --- | --- |
| `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.

| Key | Set |
| --- | --- |
| `max_tokens` | The model's context window, from [Models](https://minirouter.sh/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`](https://minirouter.sh/models/google/gemini-3.8-flash). |
| `capabilities.parallel_tool_calls` | `true` for models that call several [tools](https://minirouter.sh/docs/tools) at once. |
| `reasoning_effort` | `"high"` and similar, for [reasoning](https://minirouter.sh/docs/reasoning) models. |

## Keep spend in check

- [Own key](https://minirouter.sh/dashboard/keys): One key for Zed.
- [Spend cap](https://minirouter.sh/docs/rate-limits): Daily or monthly limit on that key.
- [Activity](https://minirouter.sh/dashboard/activity): Every request and its cost.

Swap models from the dashboard with a [preset](https://minirouter.sh/docs/presets): list `@preset/your-slug` in `available_models`.

## Recommended models

| Model | Why |
| --- | --- |
| [`zai/glm-5.3-flash`](https://minirouter.sh/models/zai/glm-5.3-flash) | Best current balance of coding ability, agentic performance, context and cost. |
| [`openai/gpt-5.6-sol`](https://minirouter.sh/models/openai/gpt-5.6-sol) | Higher-intelligence option when task quality matters more than spend. |
| [`spacexai/grok-4.6`](https://minirouter.sh/models/spacexai/grok-4.6) | Strong agentic alternative with a 500K-token window. |
| [`google/gemini-3.8-flash`](https://minirouter.sh/models/google/gemini-3.8-flash) | Multimodal coding alternative with a 1M-token window. |

Browse every model in the [catalog](https://minirouter.sh/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`](https://minirouter.sh/docs/errors#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`](https://minirouter.sh/docs/errors#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`](https://minirouter.sh/docs/errors#insufficient_credits).

Every error code, with its fix: [Errors](https://minirouter.sh/docs/errors).

## Next steps

- [Presets](https://minirouter.sh/docs/presets): Save a model and its settings under one name.
- [Guardrails](https://minirouter.sh/docs/guardrails): Budgets and model lists per key.
- [Auto router](https://minirouter.sh/docs/auto-router): Let MiniRouter pick the model.
