Zed speaks the OpenAI chat-completions wire format, so a Zed OpenAI compatible provider pointing at AtmoRouter is a settings block, not a fork or a patched build. You hand Zed a base URL, a key, and a list of model IDs, then find out whether the capability flags you left at their defaults match what those models actually do.
This guide covers the Zed side only: the language_models.openai_compatible block, which model IDs are worth enumerating, the capability defaults that silently gate tool calling and reasoning, and the failure modes that hand you an empty model picker or a 404 on every request. Costs below are illustrative arithmetic on published rates, not a benchmark, and this post is AtmoRouter-authored.
What Zed's compatible provider block controls
Everything lives under language_models.openai_compatible in Zed's settings file, keyed by a provider name you choose. That name matters twice: it is the label shown in the model picker, and its upper-snake-case form is the environment variable Zed reads for the key. Name the provider atmorouter and the variable is ATMOROUTER_API_KEY.
Two fields do the real work. api_url is the endpoint root including the version segment — https://atmorouter.dev/v1, with nothing after it. available_models is the list of models Zed offers for that provider, so a model you leave out simply does not appear in the picker.
These providers power the Agent Panel, Inline Assistant, Git commit message generation, and thread summaries. Edit prediction is a different setting on a different code path, covered further down.
A working settings.json for AtmoRouter
Add this to ~/.config/zed/settings.json, or to .zed/settings.json for a single project:
json{
"language_models": {
"openai_compatible": {
"atmorouter": {
"api_url": "https://atmorouter.dev/v1",
"available_models": [
{
"name": "zai/glm-5.3",
"display_name": "GLM 5.3 (AtmoRouter)",
"max_tokens": 1000000,
"max_output_tokens": 128000
},
{
"name": "alicn/deepseek-v4.1-flash",
"display_name": "DeepSeek V4.1 Flash (AtmoRouter)",
"max_tokens": 1000000,
"max_output_tokens": 393216
},
{
"name": "mm/MiniMax-M3",
"display_name": "MiniMax M3 (AtmoRouter)",
"max_tokens": 1000000,
"max_output_tokens": 524288
}
]
}
}
}
}name is the exact catalogue ID and is sent as the model field on every request, prefix included. Drop the prefix and the gateway cannot match the model, so the request fails even though the connection and key are fine.
Before touching the editor, confirm the key and the route with one request:
bashexport ATMOROUTER_API_KEY="ar-xxxxxxxxxxxx"
curl -s https://atmorouter.dev/v1/chat/completions \
-H "Authorization: Bearer $ATMOROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"zai/glm-5.3","messages":[{"role":"user","content":"reply with ok"}]}'If that returns a completion, the endpoint and the key are fine, and whatever is left is a settings problem.
Then put the key where it belongs. Enter it through Agent Settings (agent: open settings), where Zed stores it in the system keychain, or export ATMOROUTER_API_KEY as above. Environment variables take precedence over keychain values, and if a variable is set you have to unset it and restart Zed to stop using it. Keep the key out of settings.json — that file is the one most likely to end up in a dotfiles repository.
One consequence for remote work: in SSH and dev-container projects, Zed reads keys from the local keychain and environment variables from the local Zed process, not from the remote machine.
Model IDs, context windows, and what a turn costs
max_tokens in this block is Zed's idea of the context window, used to decide how much file context to send. Understating it truncates quietly instead of complaining, so copy the real number from the model page. max_output_tokens is optional and caps generation.
Rates below are from the live catalogue on 2026-11-15, quoted as "from" prices because most models have several tiers. Check the model page before you budget — rates refresh, and the page is the authoritative number.
| Model ID | Context | From input | From output | |---|---|---|---| | zai/glm-5.3 | 1,000,000 | $0.0035 | $0.011 | | mm/MiniMax-M3 | 1,000,000 | $0.00075 | $0.003 | | alicn/deepseek-v4.1-flash | 1,000,000 | $0.043875 | $0.1755 | | ali/qwen3.8-max-0902 | 1,000,000 | $0.1 | $0.3 |
All figures are USD per million tokens. Cached input bills at 10% of the input rate where the model supports it.
An illustrative agent turn: 40,000 tokens of context in and 1,500 tokens out on alicn/deepseek-v4.1-flash is about $0.00176 of input plus $0.00026 of output, roughly $0.002. That is arithmetic on published rates for illustration, not a measurement.
Capability flags decide whether tools and thinking work
Zed gives every compatible model a conservative capability set, which you override per model with a capabilities object inside its available_models entry. The defaults are tools: true, images: false, parallel_tool_calls: false, prompt_cache_key: false, chat_completions: true, interleaved_reasoning: false, and max_tokens_parameter: false.
For example, to enable images on a vision-capable model:
json{
"name": "mm/MiniMax-M3",
"display_name": "MiniMax M3 (AtmoRouter)",
"max_tokens": 1000000,
"capabilities": { "tools": true, "images": true }
}The ones that bite:
toolsis on by default, so agent editing works out of the box. Set it tofalseonly if a model rejects tool schemas and you want plain chat.chat_completionsis on by default, which is the surface AtmoRouter exposes. Setting it tofalsepoints Zed at a Responses endpoint instead — do that only when you know the route exists, or every request fails.reasoning_effortmatters only for models that accept OpenAI-style effort levels through your gateway. Set a non-nonelevel when thinking should show in the agent panel, and leave it alone when the model has no reasoning mode.max_tokens_parameterswitches the output limit betweenmax_completion_tokensandmax_tokens. Change it only if a model rejects the default.prompt_cache_keystays off by default, so treat caching in Zed as best-effort rather than a lever you can pull on every request.
What this block does not cover
Three things sit outside it. Edit prediction has its own provider setup under edit_predictions, so chat can work perfectly while autocomplete is still pointed somewhere else. External agents and terminal threads configure model access inside the agent itself. Anthropic-compatible providers use a separate anthropic_compatible block with a root URL that has no /v1, which matters if you prefer Zed's Anthropic path; AtmoRouter serves that protocol at https://atmorouter.dev.
Troubleshooting checklist
- Provider appears but the picker is empty:
available_modelsis missing models, or the IDs are wrong. - 404 on every request:
api_urlis not exactlyhttps://atmorouter.dev/v1(missing/v1, or an extra path segment such as/chat/completions). - Agent edits nothing while chat answers:
toolswas disabled, or the model does not accept the tool schema. - Thinking never shows up:
reasoning_effortisnoneor unset for a model that needs it. - Large files get cut:
max_tokensis below the model's real context window. - Autocomplete dead while chat works: edit prediction is a separate path with its own provider entry.
FAQ
Does Zed support OpenAI compatible providers without a plugin?
Yes. The language_models.openai_compatible block is built into Zed's settings, and you can also add a provider from the LLM Providers section of the agent settings. No extension or patched build is needed.
What environment variable does Zed read for the key?
The provider ID in upper snake case plus _API_KEY. A provider named atmorouter reads ATMOROUTER_API_KEY; a provider named atmorouter-fast would read ATMOROUTER_FAST_API_KEY.
Can I use AtmoRouter's Claude models in Zed?
Yes, either as extra entries in the OpenAI compatible block or through Zed's anthropic_compatible block with https://atmorouter.dev as the root URL. Use exact catalogue IDs such as cc/claude-sonnet-5-5 (from $0.5 / $2.5 per million tokens at the time of writing).
Why is my model picker empty?
Zed shows only the models listed in available_models. Add at least one entry with an exact catalogue ID, then reopen the picker.
Next step
Run the same block twice under different provider IDs — an atmorouter-fast entry for inline work and an atmorouter-strong entry for the agent panel is a five-line change, and it keeps cheap models out of long-context threads. If this is your first editor-side agent, the Cline setup guide and the Cursor comparison cover the same tradeoffs from other angles, and prompt caching is worth reading before you assume cache hits.
Create a key on AtmoRouter, then verify every model ID and rate on the models page before you commit a settings block — that page moves faster than any blog post does.