Connect Zed
Register a custom OpenAI-compatible text model in Zed and authenticate with its keychain or a provider-specific environment variable.
https://aelder.dev/v1LOCAL CONFIGURATION
Let my agent set this up
Copy this task to an agent already running on your computer. Enter your API key locally when asked.
Help me connect Zed to AELDER using this guide: https://aelder.dev/docs/zed/
Service Base URL: https://aelder.dev/v1
First inspect my installed version, active profile and configuration. Explain any mismatch with the guide before changing anything.
Use the documented local configuration or CLI method. Do not automate the GUI, install software or change permissions without asking.
Preserve existing accounts, providers, models, defaults, permissions and unrelated settings. Propose the smallest change, show a redacted diff, and back up any files before editing.
Have me enter my API key locally using the tool's secret storage or an environment variable. Never ask me to paste a key into chat, print it, or include it in a command, diff, log or commit.
Use the exact model ID I choose from my account's model list. Do not invent model IDs or assume every model supports every API format or tool feature.
Validate syntax and configuration loading before making any generation request. If there is no dry-run, say so.
Explain any proposed paid test, the model and what it sends, and ask for approval before running it. Do not send project files or private conversation history as a test.
Finish with the settings changed, checks performed and steps to restore the backup.Zed has a native OpenAI-compatible provider for its own Agent and Inline Assistant. External agents launched through Zed keep their own provider settings.
Prepare a service key, exact model ID from our models endpoint, and verified context/output limits.
1. Register the provider and model
Run agent: open settings from Zed’s command palette. Under LLM Providers, use Add Provider and select the OpenAI-compatible route. Enter a unique provider ID such as my-api, the Base URL above including /v1, the exact model ID and the model’s verified context window.
Alternatively, an agent can merge this entry into your user settings.json. Open it with zed: open settings file. Its usual path is ~/.config/zed/settings.json on macOS/Linux, or %APPDATA%\Zed\settings.json on Windows. Keep existing settings intact.
This is a template: replace both [TBD] strings with verified integer limits, without quotes, before saving. Replace YOUR_MODEL_ID with the exact service ID. The AELDER Base URL is already set.
{
"language_models": {
"openai_compatible": {
"my-api": {
"api_url": "https://aelder.dev/v1",
"available_models": [
{
"name": "YOUR_MODEL_ID",
"display_name": "My API model",
"max_tokens": "[TBD]",
"max_output_tokens": "[TBD]",
"capabilities": {
"tools": true,
"images": false,
"chat_completions": true,
"parallel_tool_calls": false
}
}
]
}
}
}
}Use the API base without /chat/completions; chat_completions: true selects that API. name is the ID sent to our service; display_name is a local label. Declare tools: true only for a model with compatible tool calls. Zed’s provider documentation and settings guide describe these fields and paths.
2. Authenticate
In the provider’s settings, enter your service key. Zed keeps UI-entered keys in the system keychain. Do not add the key to settings.json.
For terminal-based setup on macOS/Linux, provider ID my-api maps to MY_API_API_KEY. Fully quit Zed first so an existing process does not retain its previous environment. In Bash or Zsh:
printf 'Service API key: '
IFS= read -r -s SERVICE_API_KEY
printf '\n'
MY_API_API_KEY="$SERVICE_API_KEY" zed .
unset SERVICE_API_KEYThe key is entered at a hidden terminal prompt. Environment authentication applies to that launch; it takes precedence over keychain credentials. For subsequent ordinary app launches, use the keychain UI or your usual secret-manager launch environment. These rules are in Zed’s API-key documentation.
3. Select and verify
Select the registered provider/model in a fresh Zed Agent thread. Ask for CONNECTION_OK without tools, then check the reply and corresponding service request record. Test a small file-reading tool separately with normal approvals. Each test uses API balance.
Model registration does not select it for every Zed feature. Check any separate defaults for Inline Assistant or utility work. A Responses-only model needs a different API selection; reasoning parameters and context limits must match the selected model. For errors, confirm the exact ID, active provider, /v1 base and the key source, then use our API troubleshooting.
Need the key? Open your AELDER dashboard. For direct API calls, see the API reference.

