Zed
Last updated
Zed's Agent Panel supports custom OpenAI-compatible providers, configured either through the UI or directly in settings.json. Add Tempr as one and list every model on your allowlist under it (Claude, GPT, Gemini), all switchable per-conversation from the same model dropdown, under one key.
-
Create a virtual key
In the Portal, create a Gateway virtual key. Keys are prefixed
tvk_and shown once at creation. -
Add a provider key
Gateway is BYOK: add a key for at least one provider from the supported list.
-
Add Tempr as a provider
Open the Agent Panel (
Cmd/Ctrl+Shift+A) → + Add Provider, or edit~/.config/zed/settings.jsondirectly:
{
"language_models": {
"openai_compatible": {
"tempr": {
"api_url": "https://api.temprhq.io/v1",
"available_models": [
{
"name": "anthropic/claude-sonnet-4-5",
"display_name": "Claude Sonnet 4.5 (via Tempr)",
"max_tokens": 200000
}
]
}
}
}
}
Zed derives the API key environment variable from the provider id you chose (tempr above) as upper snake case plus _API_KEY, so set TEMPR_API_KEY to your virtual key before launching Zed, or enter it through the Agent Panel's settings UI, which stores it in your system keychain instead.
Model ids
Use the fully-qualified provider/model form (e.g. anthropic/claude-sonnet-4-5, openai/gpt-5) for each entry in available_models, the same ids GET /v1/models returns.
The example's anthropic/claude-sonnet-4-5 needs an Anthropic key in the Portal; with another provider's key, use one of its models, or any model from GET /v1/models.
On a coding plan
To run Zed on a coding plan, such as the Z.AI GLM Coding Plan or Kimi Code, use one of the plan's models, named by the plan: zai-coding/glm-5.3. Tempr can get the plan's key two ways:
- Stored in Tempr. Add the plan's key under Provider keys in the Portal, and keep Zed's settings as they are, with your virtual key.
- Sent with each request. Add your virtual key to the provider's
custom_headers, and give Zed the plan's key as the provider's API key (Settings → AI → LLM Providers, or an environment variable named after the provider, hereTEMPR_API_KEY): Tempr sends the plan's key only to that plan, and never stores it. An organization's keys take a key sent this way once an owner or admin turns on Plan logins.
{
"language_models": {
"openai_compatible": {
"tempr": {
"api_url": "https://api.temprhq.io/v1",
"custom_headers": { "x-tempr-key": "tvk_..." },
"available_models": [
{ "name": "zai-coding/glm-5.3", "display_name": "GLM 5.3", "max_tokens": 200000 }
]
}
}
}
}
Several plans are sold only for the coding tools they support, and some refuse other tools, telling them apart by the identity each tool sends. Tempr passes Zed's own along and never sends another, so check which tools each plan supports before you subscribe.
Ask Zed about your Gateway
Zed's agent can also read your Gateway through the Gateway's own MCP server: usage and cost, request logs and one request's routing, keys, plan, and providers cooling down. Ask it "why did my last few requests fail?" or "which key spent the most this week?" while you work. It comes with the Gateway Pro, Scale and Enterprise plans.
Add the server to settings.json:
{
"context_servers": {
"tempr-gateway": {
"url": "https://api.temprhq.io/mcp/admin"
}
}
}
Zed then shows the server under Settings → AI → MCP Servers with an Authenticate button, which opens Tempr's sign-in in the browser and keeps the token in your system keychain. Signed in this way, Zed reads your own Gateway, or your organization's if you're an owner or admin. To let it make changes too, tick Also let it make changes on Tempr's consent page.
To give it a management key instead:
-
Create a management key
In the Portal, under Gateway → Keys → Management keys (or Organization → Org keys for an organization's Gateway). A management key reads and manages the Gateway but can't call models, so it's separate from the
tvk_virtual key Zed uses for its model. Tick what Zed may do: Read usage, Read request logs and List keys to read; Create, change and revoke keys as well if it may change keys. -
Send it as a header
Zed doesn't read environment variables here, so the key sits in
settings.jsonitself; keep that file out of anything you share:
"tempr-gateway": {
"url": "https://api.temprhq.io/mcp/admin",
"headers": { "Authorization": "Bearer tmk_..." }
}
- The key's permissions decide the tools. Without Read request logs, Zed gets the usage, plan and key tools but not the logs.
- Changes also need the account to allow them: turn on Changes by AI agents on the Portal's MCP connectors page. Zed can then make changes that only tighten, such as creating a key that expires within 90 days or revoking one, and propose any that would loosen, such as a higher budget, for you to approve in the Portal, and asks you first unless your tool permissions allow it. A new key's secret never reaches it: it gets a one-time Portal link for you to copy the key from.
What's next
- The Gateway's MCP server: every tool, what it returns, and how text from your apps is marked.
- Authentication & virtual keys: scoping keys with model allowlists, budgets, and rate limits.
- Models, limits & logs: request logs and analytics for everything you send through the gateway.