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 using the generated config below:
{
  "language_models": {
    "openai": {
      "api_url": "https://api.modelbridge.dev/v1",
      "api_key": "sk_your_api_key_here",
      "available_models": [
        {
          "name": "claude-sonnet-4-6",
          "display_name": "claude-sonnet-4-6",
          "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

Available models

Loading models...

Was this page helpful?