# Zed

<img
  src="/brand/banner-b-01.webp"
  alt=""
  loading="lazy"
  width="1280"
  height="549"
  className="brand-band"
/>

[Zed](https://zed.dev) is a fast native editor with a built-in agent panel. It
supports OpenAI-compatible providers directly in `settings.json`, so pointing
its agent at Hyphen takes one block.

*Setup guide: this config comes from Zed's official documentation and has not
been run end to end against the gateway. Corrections to [support@hyphen-solution.com](mailto:support@hyphen-solution.com).*

## 1. Get a key

[app.hyphen-solution.com](https://app.hyphen-solution.com) → sign in → pick a
plan or credit pack → **Dashboard → API Keys**. Copy the `sk-...` key.

## 2. Configure

Open Zed's settings with `cmd-,` (`ctrl-,` on Linux) and add this to
`~/.config/zed/settings.json`:

```json
{
  "language_models": {
    "openai_compatible": {
      "hyphen": {
        "api_url": "https://api.hyphen-solution.com/v1",
        "available_models": [
          {
            "name": "minimax-m3",
            "display_name": "MiniMax M3 (Hyphen)",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "capabilities": {
              "tools": true,
              "images": false,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          },
          {
            "name": "minimax-m2.7",
            "display_name": "MiniMax M2.7 (Hyphen)",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "capabilities": {
              "tools": true,
              "images": false,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          },
          {
            "name": "minimax-m2.5",
            "display_name": "MiniMax M2.5 (Hyphen)",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "capabilities": {
              "tools": true,
              "images": false,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          }
        ]
      }
    }
  }
}
```

## 3. Set the key

**Do not put the key in `settings.json`.** Zed says so explicitly, and the file
is often in version control. Zed derives the environment variable name from the
provider ID, upper-snake-cased with `_API_KEY` appended. The provider above is
called `hyphen`, so the variable is `HYPHEN_API_KEY`:

```bash
export HYPHEN_API_KEY="sk-YOUR_KEY"
```

Put that in `~/.zshrc` or `~/.bashrc`, then **launch Zed from a shell that has
it** so the variable is inherited. Launching from the Dock or a desktop icon
will not see it.

Alternatively, paste the key into the Agent Panel's provider settings UI, which
stores it in Zed's own keychain entry. That works regardless of how Zed is
launched.

## 4. Verify

Open the Agent Panel (`cmd-?`), click the model picker at the bottom of the
panel, and select **MiniMax M3 (Hyphen)** under the `hyphen` provider. Then:

```
Reply with the single word: connected
```

If it prints `connected`, you are wired up.

## Notes on the fields

- **`api_url`** ends in `/v1`. Zed appends `/chat/completions` itself.
- **`max_tokens`** is the context window Zed advertises, not your output cap.
  200000 is a safe value for the standard M-series. Drop it to 60000 if you add
  `minimax-m2-her`, and raise it for `minimax-text-01`.
- **`max_output_tokens`** is the per-response cap Zed sends. Keep it generous.
  The M-series are reasoning models and a tight output budget gets consumed by
  internal reasoning, returning nothing. See
  [Choosing a model](/choosing-a-model#the-max_tokens-gotcha).
- **`capabilities.tools`** must be `true` or the agent panel cannot edit files.
- **`images: false`** is correct. The catalog is text only.

## Troubleshooting

- **Provider does not appear**. `settings.json` is invalid JSON, or Zed needs a
  restart. Zed shows a parse error inline when the file is broken.
- **`401`**. Zed cannot see `HYPHEN_API_KEY`. Launch Zed from a terminal
  (`zed .`) or enter the key in the Agent Panel provider settings instead.
- **Empty replies**. Raise `max_output_tokens`.
- **`429`**. Monthly budget spent. See [Rate limits & caps](/rate-limits).
- **Config shape changed?** Zed's AI settings move between releases. Confirm the
  current shape at [Zed's API access docs](https://zed.dev/docs/ai/use-api-access).

## Related

- [Choosing a model](/choosing-a-model): which model for which job.
- [Other OpenAI-compatible clients](/agents/other-clients): Roo Code, Kilo Code, Cursor, Cline.
