Zed

Zed is a high-performance code editor with built-in AI features. It supports custom OpenAI-compatible endpoints through its settings file.

Setup

  1. Open Zed settings (Cmd+,)
  2. Edit settings.json and add the language_models section:

settings.json

{
  "language_models": {
    "openai": {
      "api_url": "https://api.modelbridge.dev/v1",
      "api_key": "mb_live_your_key_here",
      "available_models": [
        {
          "name": "claude-sonnet-4-6",
          "display_name": "Claude Sonnet 4-6",
          "max_tokens": 8192
        },
        {
          "name": "claude-opus-4-6",
          "display_name": "Claude Opus 4-6",
          "max_tokens": 8192
        },
        {
          "name": "gpt-5.4",
          "display_name": "GPT-5.4",
          "max_tokens": 16384
        },
        {
          "name": "gpt-5.3-codex",
          "display_name": "GPT-5.3 Codex",
          "max_tokens": 16384
        }
      ]
    }
  }
}
  1. Open the AI panel in Zed and select your model from the dropdown
  2. Test with a chat message

Key points

  • Use api_url (not baseURL) -- Zed's config key is different from the OpenAI SDK
  • The available_models array tells Zed which models to show in the dropdown
  • max_tokens configures the maximum response length for each model
  • Zed uses the openai provider section for all OpenAI-compatible endpoints, including non-OpenAI models through ModelBridge

Was this page helpful?