> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Zed

> Add Opper as an openai_compatible provider in Zed, via the agent panel or settings.json

[Zed](https://zed.dev) is a high-performance code editor from Zed Industries (GPL-3.0, [source](https://github.com/zed-industries/zed)) with an agent panel built in. It supports OpenAI-compatible providers both through the UI and through `settings.json`.

## Setup

### Through the UI

Go to **Agent Settings → LLM Providers → Add Provider**, and supply the base URL `https://api.opper.ai/v3/compat` along with your Opper API key.

### Through settings.json

```json theme={null}
{
  "language_models": {
    "openai_compatible": {
      "opper": {
        "api_url": "https://api.opper.ai/v3/compat",
        "available_models": [
          {
            "name": "anthropic/claude-sonnet-4-6",
            "display_name": "Claude Sonnet 4.6 (Opper)",
            "max_tokens": 1000000,
            "capabilities": { "tools": true, "images": true }
          },
          {
            "name": "openai/gpt-5.5",
            "display_name": "GPT-5.5 (Opper)",
            "max_tokens": 1050000,
            "capabilities": { "tools": true, "images": true }
          }
        ]
      }
    }
  }
}
```

<Warning>
  Don't put the API key in `settings.json`. Zed reads it from the provider settings UI, or from an environment variable derived from the provider name — `OPPER_API_KEY` for a provider named `opper`.
</Warning>

`tools` and `images` live under a `capabilities` object on each model, not at the top level of the entry. Both default to on when omitted.

## Choosing a model

Zed doesn't fetch the catalog — each model you want has to be listed in `available_models`. Pull the IDs and context windows from the [model catalog](/capabilities/models).

`max_tokens` is the model's **context window**, and Zed uses it to drive the token counter and decide when to truncate. Setting it too low silently costs you usable context, so take the real figure from the catalog rather than assuming a provider's older limit.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The provider doesn't appear in the agent panel">
    Zed reloads `settings.json` on save. If the provider is still missing, the JSON is likely malformed — check that `openai_compatible` sits inside `language_models`.
  </Accordion>

  <Accordion title="401 Unauthorized">
    The key isn't reaching Zed. Set it in the provider settings UI, or export `OPPER_API_KEY` before launching Zed from the terminal — a Zed started from the Dock won't see a variable set in your shell rc.
  </Accordion>

  <Accordion title="Images are rejected">
    Set `"capabilities": { "images": true }` on that model's entry — a bare `"images"` key at the top level of the entry is ignored. Check the model actually supports vision in the [catalog](/capabilities/models) too.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Model catalog" icon="list" href="/capabilities/models">
    Browse the catalog for model IDs and context windows.
  </Card>

  <Card title="All integrations" icon="plug" href="/integrations/overview">
    Every app that runs on Opper.
  </Card>
</CardGroup>
