Zed

Add Merge Gateway as an OpenAI-compatible provider in Zed’s Assistant Panel.

Zed supports any OpenAI-compatible provider via a language_models.openai_compatible block in settings.json. Point it at Merge Gateway and every Gateway model (OpenAI, Anthropic, Google, Kimi, and more) becomes available in the Assistant Panel and inline assists.

Before you start

  • Grab an API key from gateway.merge.dev/settings/api-keys.
  • Pick the Gateway models you want to expose in Zed (you’ll list them in available_models). Model names use the provider/model format, e.g. anthropic/claude-opus-4.6.

Configure Zed

1

Open settings.json

In Zed, run the command zed: open settings (via the command palette) to open your user settings.json.

2

Add Gateway as a provider

Add the following under language_models. The top-level key (Merge Gateway in this example) is the display name that appears in Zed’s model picker.

settings.json
1{
2 "language_models": {
3 "openai_compatible": {
4 "Merge Gateway": {
5 "api_url": "https://api-gateway.merge.dev/v1/openai",
6 "available_models": [
7 {
8 "name": "anthropic/claude-opus-4.6",
9 "display_name": "Claude Opus 4.6 (via Merge)",
10 "max_tokens": 200000,
11 "capabilities": {
12 "tools": true,
13 "images": true,
14 "parallel_tool_calls": false,
15 "prompt_cache_key": false
16 }
17 },
18 {
19 "name": "openai/gpt-5.2",
20 "display_name": "GPT-5.2 (via Merge)",
21 "max_tokens": 128000,
22 "capabilities": {
23 "tools": true,
24 "images": true,
25 "parallel_tool_calls": true,
26 "prompt_cache_key": false
27 }
28 }
29 ]
30 }
31 }
32 }
33}
3

Set the API key

Zed reads the API key from an environment variable named after the provider. Take the provider name, uppercase it, replace non-alphanumeric characters with underscores, and add an _API_KEY suffix.

For "Merge Gateway":

$export MERGE_GATEWAY_API_KEY="your-gateway-api-key"

Add the export to your shell profile so Zed inherits it on next launch.

4

Restart Zed and pick the model

Restart Zed so it picks up the new env var. Open the Assistant Panel, click the model picker, and select one of your Gateway models. Send a test message and the request will appear in your Gateway dashboard.

Caveats

Zed trusts the capabilities block you write. If you set "tools": true for a route that doesn’t support tool calling, Zed will try to use it and the request will fail at the provider. Use GET /v1/models and check vendors.<vendor>.capabilities.supports_tool_calling on the route you plan to use.

Zed reads custom-provider API keys from environment variables only. Don’t paste your Gateway key into settings.json.

The provider block above uses Gateway’s chat completions endpoint, which Zed drives by default. If you need to force the Responses API for a specific model, set "chat_completions": false on that model entry.

Next steps