Add every model to Zed's Agent Panel through one endpoint
Zed is a fast, Rust-built code editor with a native Agent Panel, and it takes custom OpenAI-compatible providers straight from settings.json. Registering Router One once puts GPT, Claude, Gemini, and DeepSeek family models in Zed's model picker behind a single key — and every agent turn gets a per-request cost trace on the gateway, so long agentic sessions stop being a billing black box.
Configure Zed to use the Router One base URL
Add an openai_compatible block under language_models in settings.json (run "zed: open settings"), listing each model you want in the picker — set max_tokens to the context window shown on /models. The API key never lives in settings.json: Zed asks for it in the Agent Panel's provider settings, or reads the ROUTER_ONE_API_KEY environment variable:
{
"language_models": {
"openai_compatible": {
"router-one": {
"api_url": "https://api.router.one/v1",
"available_models": [
{
"name": "<model-id-from-/models>",
"display_name": "<label shown in the picker>",
"max_tokens": 1000000
}
]
}
}
}
}Which model ID should Zed send?
Copy the exact model ID from the /models page — IDs are case-sensitive, and the page lists each model's context window, capabilities, and current per-token rates. Create a dedicated API key per tool with its own maxSpend cap, so one runaway tool can't affect other workloads.
Verify the Zed call in your request trace
After your first request, open Dashboard → Logs to see its full trace: model, tokens, cost, latency, and status code. From here every Zed call has a ledger and a trail instead of being a black box.
FAQ
Why is there no api_key field in Zed's settings.json?
By design — Zed keeps credentials out of settings.json. After adding the provider block, open the Agent Panel's settings and paste your key under the router-one provider, or export ROUTER_ONE_API_KEY (Zed derives the variable name from the provider id) before launching the editor.
Which models can Zed use through the gateway?
Any chat-capable model in the catalog — GPT, Claude, Gemini, Grok, DeepSeek, GLM, and Kimi families. The /models page is the source of truth for model IDs and per-token rates.
Does this work from Mainland China?
Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.
How do I debug a 401/403/429?
Open Dashboard → Logs first to see whether requests reached the gateway and with what status, then walk the error-codes reference to check env vars, key status, and limits.