35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# Zed AI setup
|
|
|
|
## Codex in the Agent Panel
|
|
|
|
The live configuration now has `disable_ai: false` and already registers `codex-acp`. Restart or reload Zed, open the ACP Registry, install or confirm Codex, then create a Codex thread from the Agent Panel. Codex owns its authentication and billing; use its native login flow for ChatGPT or API-based authentication supported by the installed version.
|
|
|
|
This does not require a VS Code extension. Zed hosts Codex through ACP.
|
|
|
|
## Self-hosted or compatible LLM API
|
|
|
|
Use an OpenAI-compatible provider for an endpoint implementing OpenAI chat-completions or Responses semantics:
|
|
|
|
```jsonc
|
|
"language_models": {
|
|
"openai_compatible": {
|
|
"my-provider": {
|
|
"api_url": "https://llm.example.com/v1",
|
|
"available_models": [
|
|
{
|
|
"name": "my-model",
|
|
"display_name": "My Model",
|
|
"max_tokens": 128000
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Enter the key through **Agent Settings > LLM Providers**, or set `MY_PROVIDER_API_KEY`. Do not put the key in `settings.json`.
|
|
|
|
Anthropic-compatible endpoints can be configured under `language_models.anthropic_compatible`. First-class providers include Anthropic, OpenAI, Google AI, Mistral, DeepSeek, xAI, and OpenCode. Zed also supports OpenRouter, Vercel AI Gateway, Bedrock, Ollama, LM Studio, llama.cpp, and local OpenAI-compatible servers.
|
|
|
|
Using your own key or local endpoint does not require paying for Zed-hosted models. The API provider may still charge for usage. Zed-hosted models use Zed's plan and usage billing.
|