Configuring the Assistant
Here's a bird's-eye view of all the configuration options available in Zed's Assistant:
- Configure Custom API Keys for LLM Providers
- Advanced configuration options
- Common Panel Settings
- General Configuration Example
Configure Custom API Keys for LLM Providers {#configure-custom-api-keys}
See Configuring Custom API Keys
Advanced Configuration {#advanced-configuration}
Custom Endpoints {#custom-endpoint}
You can use a custom API endpoint for different providers, as long as it's compatible with the providers API structure.
To do so, add the following to your Zed settings.json:
{
"language_models": {
"some-provider": {
"api_url": "http://localhost:11434"
}
}
}
Where some-provider can be any of the following values: anthropic, google, ollama, openai.
Configuring Models {#default-model}
Zed's hosted LLM service sets claude-3-7-sonnet-latest as the default model.
However, you can change it either via the model dropdown in the Assistant Panel's bottom-left corner or by manually editing the default_model object in your settings:
{
"assistant": {
"version": "2",
"default_model": {
"provider": "zed.dev",
"model": "gpt-4o"
}
}
}
Feature-specific Models {#feature-specific-models}
Currently only available in Preview.
Zed allows you to configure different models for specific features. This provides flexibility to use more powerful models for certain tasks while using faster or more efficient models for others.
If a feature-specific model is not set, it will fall back to using the default model, which is the one you set on the Agent Panel.
You can configure the following feature-specific models:
- Thread summary model: Used for generating thread summaries
- Inline Assist model: Used for the Inline Assist feature
- Commit message model: Used for generating Git commit messages
Example configuration:
{
"assistant": {
"version": "2",
"default_model": {
"provider": "zed.dev",
"model": "claude-3-7-sonnet"
},
"inline_assistant_model": {
"provider": "anthropic",
"model": "claude-3-5-sonnet"
},
"commit_message_model": {
"provider": "openai",
"model": "gpt-4o-mini"
},
"thread_summary_model": {
"provider": "google",
"model": "gemini-2.0-flash"
}
}
}
Configuring Alternative Models for Inline Assists {#alternative-assists}
You can configure additional models that will be used to perform inline assists in parallel. When you do this, the Inline Assist UI will surface controls to cycle between the alternatives generated by each model. The models you specify here are always used in addition to your default model. For example, the following configuration will generate two outputs for every assist. One with Claude 3.5 Sonnet, and one with GPT-4o.
{
"assistant": {
"default_model": {
"provider": "zed.dev",
"model": "claude-3-5-sonnet"
},
"inline_alternatives": [
{
"provider": "zed.dev",
"model": "gpt-4o"
}
],
"version": "2"
}
}
Common Panel Settings {#common-panel-settings}
| key | type | default | description |
|---|---|---|---|
| enabled | boolean | true | Setting this to false will completely disable the assistant |
| button | boolean | true | Show the assistant icon in the status bar |
| dock | string | "right" | The default dock position for the assistant panel. Can be ["left", "right", "bottom"] |
| default_height | string | null | The pixel height of the assistant panel when docked to the bottom |
| default_width | string | null | The pixel width of the assistant panel when docked to the left or right |
General Configuration Example {#general-example}
{
"assistant": {
"enabled": true,
"default_model": {
"provider": "zed.dev",
"model": "claude-3-7-sonnet"
},
"editor_model": {
"provider": "openai",
"model": "gpt-4o"
},
"inline_assistant_model": {
"provider": "anthropic",
"model": "claude-3-5-sonnet"
},
"commit_message_model": {
"provider": "openai",
"model": "gpt-4o-mini"
},
"thread_summary_model": {
"provider": "google",
"model": "gemini-1.5-flash"
},
"version": "2",
"button": true,
"default_width": 480,
"dock": "right"
}
}