Skip to content
Fresh 2026

Zed

How to configure Zed's settings.json to use Gateway models in the Assistant Panel and inline assists.

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, including OpenAI, Anthropic, Google, and Kimi, 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, for example anthropic/claude-opus-4-6.

Configure Zed

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

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.

json
{
  "language_models": {
    "openai_compatible": {
      "Merge Gateway": {
        "api_url": "https://api-gateway.merge.dev/v1/openai",
        "available_models": [
          {
            "name": "anthropic/claude-opus-4-6",
            "display_name": "Claude Opus 4.6 (via Merge)",
            "max_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          },
          {
            "name": "openai/gpt-5.2",
            "display_name": "GPT-5.2 (via Merge)",
            "max_tokens": 128000,
            "capabilities": {
              "tools": true,
              "images": true,
              "parallel_tool_calls": true,
              "prompt_cache_key": false
            }
          }
        ]
      }
    }
  }
}

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":

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

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

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

Let Gateway pick the best vendor for each Zed request

Enable agentic workflows through Gateway

Cap spend for Zed traffic

Unofficial documentation reference. Built for internal use.