docs: Update the AI configuration page (#33208)
- Improve the Vercel v0 model section - Replace "assistant panel" to "agent panel" - Replace "Zed assistant" to "Zed agent" - Fix "open configuration" action name - Break sentences where useful Release Notes: - N/A
This commit is contained in:
parent
5244085bd0
commit
336d2c41fa
1 changed files with 56 additions and 48 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
There are various aspects about the Agent Panel that you can customize.
|
||||
All of them can be seen by either visiting [the Configuring Zed page](../configuring-zed.md#agent) or by running the `zed: open default settings` action and searching for `"agent"`.
|
||||
|
||||
Alternatively, you can also visit the panel's Settings view by running the `agent: open configuration` action or going to the top-right menu and hitting "Settings".
|
||||
|
||||
## LLM Providers
|
||||
|
@ -14,14 +15,14 @@ Here's an overview of the supported providers and tool call support:
|
|||
| [Amazon Bedrock](#amazon-bedrock) | Depends on the model |
|
||||
| [Anthropic](#anthropic) | ✅ |
|
||||
| [DeepSeek](#deepseek) | ✅ |
|
||||
| [GitHub Copilot Chat](#github-copilot-chat) | For Some Models ([link](https://github.com/zed-industries/zed/blob/9e0330ba7d848755c9734bf456c716bddf0973f3/crates/language_models/src/provider/copilot_chat.rs#L189-L198)) |
|
||||
| [GitHub Copilot Chat](#github-copilot-chat) | For some models ([link](https://github.com/zed-industries/zed/blob/9e0330ba7d848755c9734bf456c716bddf0973f3/crates/language_models/src/provider/copilot_chat.rs#L189-L198)) |
|
||||
| [Google AI](#google-ai) | ✅ |
|
||||
| [LM Studio](#lmstudio) | ✅ |
|
||||
| [Mistral](#mistral) | ✅ |
|
||||
| [Ollama](#ollama) | ✅ |
|
||||
| [OpenAI](#openai) | ✅ |
|
||||
| [OpenRouter](#openrouter) | ✅ |
|
||||
| [OpenAI API Compatible](#openai-api-compatible) | 🚫 |
|
||||
| [OpenRouter](#openrouter) | ✅ |
|
||||
|
||||
## Use Your Own Keys {#use-your-own-keys}
|
||||
|
||||
|
@ -177,7 +178,8 @@ Zed will also use the `DEEPSEEK_API_KEY` environment variable if it's defined.
|
|||
|
||||
#### Custom Models {#deepseek-custom-models}
|
||||
|
||||
The Zed Assistant 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.json`:
|
||||
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.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -202,14 +204,15 @@ The Zed Assistant comes pre-configured to use the latest version for common mode
|
|||
}
|
||||
```
|
||||
|
||||
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.
|
||||
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}
|
||||
|
||||
> ✅ Supports tool use in some cases.
|
||||
> Visit [the Copilot Chat code](https://github.com/zed-industries/zed/blob/9e0330ba7d848755c9734bf456c716bddf0973f3/crates/language_models/src/provider/copilot_chat.rs#L189-L198) for the supported subset.
|
||||
|
||||
You can use GitHub Copilot Chat with the Zed assistant by choosing it via the model dropdown in the Agent Panel.
|
||||
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 configuration`) and go to the GitHub Copilot Chat section
|
||||
2. Click on `Sign in to use GitHub Copilot`, follow the steps shown in the modal.
|
||||
|
@ -222,7 +225,7 @@ Alternatively, you can provide an OAuth token via the `GH_COPILOT_TOKEN` environ
|
|||
|
||||
> ✅ Supports tool use
|
||||
|
||||
You can use Gemini models with the Zed assistant by choosing it via the model dropdown in the Agent Panel.
|
||||
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](https://aistudio.google.com/app/apikey).
|
||||
2. Open the settings view (`agent: open configuration`) and go to the Google AI section
|
||||
|
@ -264,10 +267,8 @@ Custom models will be listed in the model dropdown in the Agent Panel.
|
|||
|
||||
> ✅ Supports tool use
|
||||
|
||||
1. Download and install the latest version of LM Studio from https://lmstudio.ai/download
|
||||
2. In the app press ⌘/Ctrl + Shift + M and download at least one model, e.g. qwen2.5-coder-7b
|
||||
|
||||
You can also get models via the LM Studio CLI:
|
||||
1. Download and install [the latest version of LM Studio](https://lmstudio.ai/download)
|
||||
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:
|
||||
|
||||
```sh
|
||||
lms get qwen2.5-coder-7b
|
||||
|
@ -286,7 +287,7 @@ Tip: Set [LM Studio as a login item](https://lmstudio.ai/docs/advanced/headless#
|
|||
> ✅ Supports tool use
|
||||
|
||||
1. Visit the Mistral platform and [create an API key](https://console.mistral.ai/api-keys/)
|
||||
2. Open the configuration view (`assistant: show configuration`) and navigate to the Mistral section
|
||||
2. Open the configuration view (`agent: open configuration`) and navigate to the Mistral section
|
||||
3. Enter your Mistral API key
|
||||
|
||||
The Mistral API key will be saved in your keychain.
|
||||
|
@ -295,7 +296,9 @@ Zed will also use the `MISTRAL_API_KEY` environment variable if it's defined.
|
|||
|
||||
#### Custom Models {#mistral-custom-models}
|
||||
|
||||
The Zed Assistant 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.json`:
|
||||
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.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -318,7 +321,7 @@ The Zed Assistant comes pre-configured with several Mistral models (codestral-la
|
|||
}
|
||||
```
|
||||
|
||||
Custom models will be listed in the model dropdown in the assistant panel.
|
||||
Custom models will be listed in the model dropdown in the Agent Panel.
|
||||
|
||||
### Ollama {#ollama}
|
||||
|
||||
|
@ -343,7 +346,8 @@ Download and install Ollama from [ollama.com/download](https://ollama.com/downlo
|
|||
#### Ollama Context Length {#ollama-context}
|
||||
|
||||
Zed has pre-configured maximum context lengths (`max_tokens`) to match the capabilities of common models.
|
||||
Zed API requests to Ollama include this as `num_ctx` parameter, but the default values do not exceed `16384` so users with ~16GB of ram are able to use most models out of the box.
|
||||
Zed API requests to Ollama include this as the `num_ctx` parameter, but the default values do not exceed `16384` so users with ~16GB of RAM are able to use most models out of the box.
|
||||
|
||||
See [get_max_tokens in ollama.rs](https://github.com/zed-industries/zed/blob/main/crates/ollama/src/ollama.rs) for a complete set of defaults.
|
||||
|
||||
> **Note**: Token counts displayed in the Agent Panel are only estimates and will differ from the model's native tokenizer.
|
||||
|
@ -378,15 +382,15 @@ You may also optionally specify a value for `keep_alive` for each available mode
|
|||
This can be an integer (seconds) or alternatively a string duration like "5m", "10m", "1h", "1d", etc.
|
||||
For example, `"keep_alive": "120s"` will allow the remote server to unload the model (freeing up GPU VRAM) after 120 seconds.
|
||||
|
||||
The `supports_tools` option controls whether or not the model will use additional tools.
|
||||
If the model is tagged with `tools` in the Ollama catalog this option should be supplied, and built in profiles `Ask` and `Write` can be used.
|
||||
If the model is not tagged with `tools` in the Ollama catalog, this option can still be supplied with value `true`; however be aware that only the `Minimal` built in profile will work.
|
||||
The `supports_tools` option controls whether the model will use additional tools.
|
||||
If the model is tagged with `tools` in the Ollama catalog, this option should be supplied, and the built-in profiles `Ask` and `Write` can be used.
|
||||
If the model is not tagged with `tools` in the Ollama catalog, this option can still be supplied with the value `true`; however, be aware that only the `Minimal` built-in profile will work.
|
||||
|
||||
The `supports_thinking` option controls whether or not the model will perform an explicit “thinking” (reasoning) pass before producing its final answer.
|
||||
If the model is tagged with `thinking` in the Ollama catalog, set this option and you can use it in zed.
|
||||
The `supports_thinking` option controls whether the model will perform an explicit "thinking" (reasoning) pass before producing its final answer.
|
||||
If the model is tagged with `thinking` in the Ollama catalog, set this option and you can use it in Zed.
|
||||
|
||||
The `supports_images` option enables the model’s vision capabilities, allowing it to process images included in the conversation context.
|
||||
If the model is tagged with `vision` in the Ollama catalog, set this option and you can use it in zed.
|
||||
The `supports_images` option enables the model's vision capabilities, allowing it to process images included in the conversation context.
|
||||
If the model is tagged with `vision` in the Ollama catalog, set this option and you can use it in Zed.
|
||||
|
||||
### OpenAI {#openai}
|
||||
|
||||
|
@ -403,7 +407,7 @@ Zed will also use the `OPENAI_API_KEY` environment variable if it's defined.
|
|||
|
||||
#### Custom Models {#openai-custom-models}
|
||||
|
||||
The Zed Assistant comes pre-configured to use the latest version for common models (GPT-3.5 Turbo, GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o mini).
|
||||
The Zed agent comes pre-configured to use the latest version for common models (GPT-3.5 Turbo, GPT-4, GPT-4 Turbo, GPT-4o, GPT-4o mini).
|
||||
To use alternate models, perhaps a preview release or a dated model release, or if you wish to control the request parameters, you can do so by adding the following to your Zed `settings.json`:
|
||||
|
||||
```json
|
||||
|
@ -429,7 +433,8 @@ To use alternate models, perhaps a preview release or a dated model release, or
|
|||
}
|
||||
```
|
||||
|
||||
You must provide the model's Context Window in the `max_tokens` parameter; this can be found in the [OpenAI model documentation](https://platform.openai.com/docs/models).
|
||||
You must provide the model's context window in the `max_tokens` parameter; this can be found in the [OpenAI model documentation](https://platform.openai.com/docs/models).
|
||||
|
||||
OpenAI `o1` models should set `max_completion_tokens` as well to avoid incurring high reasoning token costs.
|
||||
Custom models will be listed in the model dropdown in the Agent Panel.
|
||||
|
||||
|
@ -437,9 +442,26 @@ Custom models will be listed in the model dropdown in the Agent Panel.
|
|||
|
||||
Zed supports using OpenAI compatible APIs by specifying a custom `endpoint` and `available_models` for the OpenAI provider.
|
||||
|
||||
You can add a custom API URL for OpenAI either via the UI or by editing the your `settings.json`.
|
||||
You can add a custom API URL for OpenAI either via the UI or by editing your `settings.json`.
|
||||
Here are a few model examples you can plug in by using this feature:
|
||||
|
||||
#### Vercel v0
|
||||
|
||||
[Vercel v0](https://vercel.com/docs/v0/api) is an expert model for generating full-stack apps, with framework-aware completions optimized for modern stacks like Next.js and Vercel.
|
||||
It supports text and image inputs and provides fast streaming responses.
|
||||
|
||||
To use it with Zed, ensure you have first created a [v0 API key](https://v0.dev/chat/settings/keys).
|
||||
Once that's done, insert that into the OpenAI API key section, and add this endpoint URL:
|
||||
|
||||
```json
|
||||
"language_models": {
|
||||
"openai": {
|
||||
"api_url": "https://api.v0.dev/v1",
|
||||
"version": "1"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
#### X.ai Grok
|
||||
|
||||
Example configuration for using X.ai Grok with Zed:
|
||||
|
@ -460,20 +482,6 @@ Example configuration for using X.ai Grok with Zed:
|
|||
}
|
||||
```
|
||||
|
||||
#### Vercel's v0
|
||||
|
||||
To use Vercel's v0 models with Zed, ensure you have created a [v0 API key first](https://v0.dev/chat/settings/keys).
|
||||
Once that's done, insert that into the OpenAI API key section, and add this API endpoint:
|
||||
|
||||
```json
|
||||
"language_models": {
|
||||
"openai": {
|
||||
"api_url": "https://api.v0.dev/v1",
|
||||
"version": "1"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### OpenRouter {#openrouter}
|
||||
|
||||
> ✅ Supports tool use
|
||||
|
@ -519,14 +527,14 @@ You can add custom models to the OpenRouter provider by adding the following to
|
|||
|
||||
The available configuration options for each model are:
|
||||
|
||||
- `name`: The model identifier used by OpenRouter (required)
|
||||
- `display_name`: A human-readable name shown in the UI (optional)
|
||||
- `max_tokens`: The model's context window size (required)
|
||||
- `max_output_tokens`: Maximum tokens the model can generate (optional)
|
||||
- `max_completion_tokens`: Maximum completion tokens (optional)
|
||||
- `supports_tools`: Whether the model supports tool/function calling (optional)
|
||||
- `supports_images`: Whether the model supports image inputs (optional)
|
||||
- `mode`: Special mode configuration for thinking models (optional)
|
||||
- `name` (required): The model identifier used by OpenRouter
|
||||
- `display_name` (optional): A human-readable name shown in the UI
|
||||
- `max_tokens` (required): The model's context window size
|
||||
- `max_output_tokens` (optional): Maximum tokens the model can generate
|
||||
- `max_completion_tokens` (optional): Maximum completion tokens
|
||||
- `supports_tools` (optional): Whether the model supports tool/function calling
|
||||
- `supports_images` (optional): Whether the model supports image inputs
|
||||
- `mode` (optional): Special mode configuration for thinking models
|
||||
|
||||
You can find available models and their specifications on the [OpenRouter models page](https://openrouter.ai/models).
|
||||
|
||||
|
@ -631,7 +639,7 @@ One with Claude 3.7 Sonnet, and one with GPT-4o.
|
|||
}
|
||||
```
|
||||
|
||||
## Default View
|
||||
### Default View
|
||||
|
||||
Use the `default_view` setting to set change the default view of the Agent Panel.
|
||||
You can choose between `thread` (the default) and `text_thread`:
|
||||
|
@ -639,7 +647,7 @@ You can choose between `thread` (the default) and `text_thread`:
|
|||
```json
|
||||
{
|
||||
"agent": {
|
||||
"default_view": "text_thread".
|
||||
"default_view": "text_thread"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue