Connect your tools
Zed
Add an OpenAI-compatible provider to Zed's settings.json.
About 6 minFor:Developers who use the Zed editor
Before you start
- Zed is installed
- A key and a model name copied from the model plaza
Step 1 · STEP 0x01
Declare the provider and models in settings.json
Open Zed's settings.json (run zed: open settings from the command palette) and add a provider under language_models.openai_compatible. The key is the provider ID; here we use my-relay:
> zed: open settingssettings.json
{
"language_models": {
"openai_compatible": {
"my-relay": {
"api_url": "https://api.suanlimao.shop/v1",
"available_models": [
{
"name": "<MODEL_NAME>",
"display_name": "<MODEL_NAME>",
"max_tokens": 128000,
"max_output_tokens": 8192,
"capabilities": { "tools": true, "images": false }
}
]
}
}
}
}api_urlishttps://api.suanlimao.shop/v1— the official example uses the /v1 form.- Each entry in
available_modelshasname(copied from the plaza),display_name,max_tokens(context length) andmax_output_tokens; take the numbers from the plaza. capabilitiesdefaults to tools on and images off; setchat_completionsto false for Responses-only models, andmax_tokens_parameter: trueif the endpoint expectsmax_tokens.
Step 2 · STEP 0x02
Give Zed the key (never in settings.json)
API Key
Either paste the key in the provider's settings in the Agent panel, or set an environment variable named after the provider ID in upper snake case plus _API_KEY — my-relay becomes MY_RELAY_API_KEY.
export MY_RELAY_API_KEY=<YOUR_API_KEY>$ export MY_RELAY_API_KEY=<YOUR_API_KEY>$ zed .
Step 3 · STEP 0x03
Pick the model in the Agent panel
Model picker
Message box
- Open the Agent panel; your provider and model appear in the picker. Select it and send a message.
anthropic_compatible instead: api_url is https://api.suanlimao.shop without /v1, and model capabilities support tools, images and prompt_caching.✓ How to tell it worked
- The Agent panel answers with your model.
- The Usage page shows the request.
FAQ
My provider is missing from the picker.
Make sure settings.json is valid JSON and available_models has at least one entry with a name.
It says there is no key.
The variable name must match the provider ID (my-relay → MY_RELAY_API_KEY) and Zed must start after it is set; or paste the key in the provider settings.
I get 404.
Check api_url is https://api.suanlimao.shop/v1 and the model name matches the plaza.
Related tutorials
Still stuck?
Read the troubleshooting tutorials first. If that does not help, open a ticket with the request_id, time, model and the exact error (never paste your key).