Skip to main content
Zed is a high-performance code editor that supports custom LLM providers. Through BetterToken, you can use Claude or GPT series models in Zed’s AI panel.

Prerequisites

Setup

1

Open the AI panel

Click the ✨ icon in the bottom-right corner of Zed to open the agent panel.
2

Go to settings

Click the three-dot menu (⋯) in the top-right corner of the panel and select Settings.
3

Add an LLM provider

Find the LLM Provider section, click + Add Provider, and select OpenAI from the dropdown.
4

Fill in the BetterToken config

Enter the following values:
FieldValue
Provider NameBetterToken (or any name you prefer)
API URLhttps://www.bettertoken.com/v1
API Keyyour BetterToken API Key
Model Nameclaude-sonnet-4-5 (or another supported model)
5

Save the provider

Click Save Provider. The provider now appears in the LLM Provider list.Click BetterToken, re-enter your API Key, and press Enter to confirm.
6

Select a model and start

Return to the agent panel, click Select a Model in the bottom-right, and choose the model you just configured.

Supported models

ModelDescription
claude-sonnet-4-5Balanced — recommended
claude-opus-4-5Most capable — complex tasks
claude-haiku-4-5Fastest — simple completions
gpt-4oOpenAI flagship
gpt-4o-miniLightweight, faster
To add more models, repeat the Add an LLM provider step with a different model name each time.