All skills
Skillintermediate

LLM Providers

To use AI in Zed, you need to have at least one large language model provider set up. Once configured, providers are available in the [Agent Panel](./agent-panel.md) and [Inline Assistant](./inline-assistant.md).

Claude Code Knowledge Pack7/10/2026

Overview

LLM Providers

To use AI in Zed, you need to have at least one large language model provider set up. Once configured, providers are available in the Agent Panel and Inline Assistant.

You can do that by either subscribing to one of Zed's plans, or by using API keys you already have for the supported providers. For general AI setup, see Configuration.

Use Your Own Keys {#use-your-own-keys}

If you already have an API key for a provider like Anthropic or OpenAI, you can add it to Zed. No Zed subscription required.

To add an existing API key to a given provider, go to the Agent Panel settings (agent: open settings), look for the desired provider, paste the key into the input, and hit enter.

Note: API keys are not stored as plain text in your settings file, but rather in your OS's secure credential storage.

Supported Providers

Zed supports these providers with your own API keys:

Amazon Bedrock {#amazon-bedrock}

Supports tool use with models that support streaming tool use. More details can be found in the Amazon Bedrock's Tool Use documentation.

To use Amazon Bedrock's models, an AWS authentication is required. Ensure your credentials have the following permissions set up:

  • bedrock:InvokeModelWithResponseStream
  • bedrock:InvokeModel

Your IAM policy should look similar to:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream"
      ],
      "Resource": "*"
    }
  ]
}

With that done, choose one of the three authentication methods:

Authentication via Named Profile (Recommended)

  1. Ensure you have the AWS CLI installed and configured with a named profile
  2. Open your settings file (zed: open settings file) and include the bedrock key under language_models with the following settings:
    {
      "language_models": {
        "bedrock": {
          "authentication_method": "named_profile",
          "region": "your-aws-region",
          "profile": "your-profile-name"
        }
      }
    }
    

Authentication via Static Credentials

While it's possible to configure through the Agent Panel settings UI by entering your AWS access key and secret directly, we recommend using named profiles instead for better security practices. To do this:

  1. Create an IAM User in the IAM Console.
  2. Create security credentials for that User, save them and keep them secure.
  3. Open the Agent Configuration with (agent: open settings) and go to the Amazon Bedrock section
  4. Copy the credentials from Step 2 into the respective Access Key ID, Secret Access Key, and Region fields.

Authentication via Bedrock API Key

Amazon Bedrock also supports API Keys, which authenticate directly without requiring IAM users or named profiles.

  1. Create an API Key in the Amazon Bedrock Console
  2. Open the Agent Configuration with (agent: open settings) and go to the Amazon Bedrock section
  3. Enter your Bedrock API key in the API Key field and select your Region
{
  "language_models": {
    "bedrock": {
      "authentication_method": "api_key",
      "region": "your-aws-region"
    }
  }
}

The API key itself is stored securely in your OS keychain, not in your settings file.

Cross-Region Inference

The Zed implementation of Amazon Bedrock uses Cross-Region inference to improve availability and throughput. With Cross-Region inference, you can distribute traffic across multiple AWS Regions, enabling higher throughput.

Regional vs Global Inference Profiles

Bedrock supports two types of cross-region inference profiles:

  • Regional profiles (default): Route requests within a specific geography (US, EU, APAC). For example, us-east-1 uses the us.* profile which routes across us-east-1, us-east-2, and us-west-2.
  • Global profiles: Route requests across all commercial AWS Regions for maximum availability and performance.

By default, Zed uses regional profiles which keep your data within the same geography. You can opt into global profiles by adding "allow_global": true to your Bedrock configuration:

{
  "language_models": {
    "bedrock": {
      "authentication_method": "named_profile",
      "region": "your-aws-region",
      "profile": "your-profile-name",
      "allow_global": true
    }
  }
}

Note: Only select newer models support global inference profiles. See the AWS Bedrock supported models documentation for the current list of models that support global inference. If you encounter availability issues with a model in your region, enabling allow_global may resolve them.

Although the data remains stored only in the source Region, your input prompts and output results might move outside of your source Region during cross-Region inference. All data will be transmitted encrypted across Amazon's secure network.

We will support Cross-Region inference for each of the models on a best-effort basis, please refer to the Cross-Region Inference method Code.

For the most up-to-date supported regions and models, refer to the Supported Models and Regions for Cross Region inference.

Extended Context Window {#bedrock-extended-context}

Anthropic models on Bedrock support a 1M token extended context window through the anthropic_beta API parameter. To enable this feature, set "allow_extended_context": true in your Bedrock configuration:

{
  "language_models": {
    "bedrock": {
      "authentication_method": "named_profile",
      "region": "your-aws-region",
      "profile": "your-profile-name",
      "allow_extended_context": true
    }
  }
}

Zed enables extended context for supported models (Claude Sonnet 4.5, Claude Opus 4.6, and Claude Opus 4.7). Extended context usage may increase API costs—refer to AWS Bedrock pricing for details.

Image Support {#bedrock-image-support}

Bedrock models that support vision (Claude 3 and later, Amazon Nova Pro and Lite, Meta Llama 3.2 Vision models, Mistral Pixtral) can receive images in conversations and tool results.

Anthropic {#anthropic}

You can use Anthropic models by choosing them via the model dropdown in the Agent Panel.

  1. Sign up for Anthropic and create an API key
  2. Make sure that your Anthropic account has credits
  3. Open the settings view (agent: open settings) and go to the Anthropic section
  4. Enter your Anthropic API key

Even if you pay for Claude Pro, you will still have to pay for additional credits to use it via the API.

Zed will also use the ANTHROPIC_API_KEY environment variable if it's defined.

Custom Models {#anthropic-custom-models}

You can add custom models to the Anthropic provider by adding the following to your Zed settings file (how to edit):

{
  "language_models": {
    "anthropic": {
      "available_models": [
        {
          "name": "claude-3-5-sonnet-20240620",
          "display_name": "Sonnet 2024-June",
          "max_tokens": 128000,
          "max_output_tokens": 2560,
          "cache_configuration": {
            "max_cache_anchors": 10,
            "min_total_token": 10000,
            "should_speculate": false
          },
          "tool_override": "some-model-that-supports-toolcalling"
        }
      ]
    }
  }
}

Custom models will be listed in the model dropdown in the Agent Panel.

You can configure a model to use extended thinking (if it supports it) by changing the mode in your model's configuration to thinking, for example:

{
  "name": "claude-sonnet-4-latest",
  "display_name": "claude-sonnet-4-thinking",
  "max_tokens": 200000,
  "mode": {
    "type": "thinking",
    "budget_tokens": 4096
  }
}

DeepSeek {#deepseek}

  1. Visit the DeepSeek platform and create an API key
  2. Open the settings view (agent: open settings) and go to the DeepSeek section
  3. Enter your DeepSeek API key

The DeepSeek API key will be saved in your keychain.

Zed will also use the DEEPSEEK_API_KEY environment variable if it's defined.

Custom Models {#deepseek-custom-models}

The Zed agent comes pre-configured to use the latest version for common models (DeepSeek Chat, DeepSeek Reasoner). If you wish to use alternate models or customize the API endpoint, you can do so by adding the following to your Zed settings file (how to edit):

{
  "language_models": {
    "deepseek": {
      "api_url": "https://api.deepseek.com",
      "available_models": [
        {
          "name": "deepseek-chat",
          "display_name": "DeepSeek Chat",
          "max_tokens": 64000
        },
        {
          "name": "deepseek-reasoner",
          "display_name": "DeepSeek Reasoner",
          "max_tokens": 64000,
          "max_output_tokens": 4096
        }
      ]
    }
  }
}

Custom models will be listed in the model dropdown in the Agent Panel. You can also modify the api_url to use a custom endpoint if needed.

GitHub Copilot Chat {#github-copilot-chat}

You can use GitHub Copilot Chat with the Zed agent by choosing it via the model dropdown in the Agent Panel.

  1. Open the settings view (agent: open settings) and go to the GitHub Copilot Chat section
  2. Click on Sign in to use GitHub Copilot, follow the steps shown in the modal.

Alternatively, you can provide an OAuth token via the GH_COPILOT_TOKEN environment variable.

Note: If you don't see specific models in the dropdown, you may need to enable them in your GitHub Copilot settings.

To use Copilot Enterprise with Zed (for both agent and completions), you must configure your enterprise endpoint as described in Configuring GitHub Copilot Enterprise.

Google AI {#google-ai}

You can use Gemini models with the Zed agent by choosing it via the model dropdown in the Agent Panel.

  1. Go to the Google AI Studio site and create an API key.
  2. Open the settings view (agent: open settings) and go to the Google AI section
  3. Enter your Google AI API key and press enter.

The Google AI API key will be saved in your keychain.

Zed will also use the GEMINI_API_KEY environment variable if it's defined. See Using Gemini API keys in the Gemini docs for more.

Custom Models {#google-ai-custom-models}

By default, Zed will use stable versions of models, but you can use specific versions of models, including experimental models. You can configure a model to use thinking mode (if it supports it) by adding a mode configuration to your model. This is useful for controlling reasoning token usage and response speed. If not specified, Gemini will automatically choose the thinking budget.

Here is an example of a custom Google AI model you could add to your Zed settings file (how to edit):

{
  "language_models": {
    "google": {
      "available_models": [
        {
          "name": "gemini-3.1-pro-preview",
          "display_name": "Gemini 3.1 Pro",
          "max_tokens": 1000000,
          "mode": {
            "type": "thinking",
            "budget_tokens": 24000
          }
        },
        {
          "name": "gemini-3-flash-preview",
          "display_name": "Gemini 3 Flash (Thinking)",
          "max_tokens": 1000000,
          "mode": {
            "type": "thinking",
            "budget_tokens": 24000
          }
        }
      ]
    }
  }
}

Custom models will be listed in the model dropdown in the Agent Panel.

LM Studio {#lmstudio}

  1. Download and install the latest version of LM Studio

  2. In the app press cmd/ctrl-shift-m and download at least one model (e.g., qwen2.5-coder-7b). Alternatively, you can get models via the LM Studio CLI:

    lms get qwen2.5-coder-7b
    
  3. Make sure the LM Studio API server is running by executing:

    lms server start
    

Tip: Set LM Studio as a login item to automate running the LM Studio server.

Mistral {#mistral}

  1. Visit the Mistral platform and create an API key
  2. Open the configuration view (agent: open settings) and navigate to the Mistral section
  3. Enter your Mistral API key

The Mistral API key will be saved in your keychain.

Zed will also use the MISTRAL_API_KEY environment variable if it's defined.

Custom Models {#mistral-custom-models}

The Zed agent comes pre-configured with several Mistral models (codestral-latest, mistral-large-latest, mistral-medium-latest, mistral-small-latest, open-mistral-nemo, and open-codestral-mamba). All the default models support tool use. If you wish to use alternate models or customize their parameters, you can do so by adding the following to your Zed settings file (how to edit):

{
  "language_model