Use /model in Zed
Add /model to Zed's agent as an OpenAI-compatible provider, with the models you want and their limits.
Checked November 24, 2026
Zed's agent takes any OpenAI-compatible API as a provider. Add /model in Zed's settings file, list the models you want, and pick one in the agent panel.
Before you start
- A /model API key: create one on the API keys page and add credit on the credits page.
Set it up
- Put your key in the
SLASHMODEL_API_KEYenvironment variable. Zed reads a provider's key from the variable named after the provider, and the provider below is calledslashmodel. - Add the provider below to Zed's
settings.json, and restart Zed. - Open the agent panel and pick one of the models.
settings.json
{
"language_models": {
"openai_compatible": {
"slashmodel": {
"api_url": "https://api.slashmodel.com/v1",
"available_models": [
{
"name": "claude-sonnet-5-5",
"display_name": "Claude Sonnet 5.5",
"max_tokens": 1000000,
"max_output_tokens": 64000,
"capabilities": { "tools": true, "images": true, "parallel_tool_calls": false, "prompt_cache_key": false }
},
{
"name": "claude-opus-5-5",
"display_name": "Claude Opus 5.5",
"max_tokens": 1000000,
"max_output_tokens": 128000,
"capabilities": { "tools": true, "images": true, "parallel_tool_calls": false, "prompt_cache_key": false }
},
{
"name": "gpt-6.1-sol",
"display_name": "GPT-6.1 Sol",
"max_tokens": 1050000,
"max_output_tokens": 128000,
"capabilities": { "tools": true, "images": true, "parallel_tool_calls": false, "prompt_cache_key": false }
}
]
}
}
}
}max_tokensis the model's context window andmax_output_tokensits longest answer. Both are on each model's page under Models.- Keep all four fields under
capabilities. If one is missing, Zed drops the whole provider. - Zed offers only the models you list here.
- You can also add the provider in Zed's agent settings, with Add Provider under LLM Providers, and type the key there. Zed then keeps the key in your system's keychain.
Good to know
- Started from the Dock or an app launcher, Zed may not see the variable. It takes its environment from a login shell, so set the key in your shell's profile, or type it in the agent settings.
- Claude in Anthropic's format: add the provider under
anthropic_compatibleinstead ofopenai_compatible, withapi_urlwithout/v1:https://api.slashmodel.com. There the fields undercapabilitiesaretools,imagesandprompt_caching.