Use Zed with GammaInfra
Zed is fast — Rust-based, GPU-accelerated, no Electron tax. Drop GammaInfra's smart router in via one settings.json change and you get per-completion cost visibility and automatic provider fallback across every major LLM, without losing Zed's speed advantage.
What changes with GammaInfra
Zed's AI assistant talks to OpenAI by default. Routing it through GammaInfra:
- Every assistant response carries
X-GammaInfra-Cost-USD— visible via the dashboard rollups at dashboard.gammainfra.com. - Provider rate-limits cascade through GammaInfra's fallback chain transparently. Zed sees a 200, your assistant conversation continues.
- You can pin specific models (
anthropic/claude-opus-4-7,openai/gpt-5, etc.) through one configuration.
Setup
1. Get a GammaInfra API key
Sign up at gammainfra.com and verify your email.
2. Open Zed settings
Cmd/Ctrl + , opens settings (or use the command palette: zed: open settings).
3. Configure the openai provider
Zed's settings.json supports a language_models block:
{
"language_models": {
"openai": {
"api_url": "https://api.gammainfra.com/v1",
"available_models": [
{ "name": "gammainfra/auto", "max_tokens": 16000 },
{ "name": "anthropic/claude-opus-4-7", "max_tokens": 16000 },
{ "name": "anthropic/claude-sonnet-4-6", "max_tokens": 16000 },
{ "name": "openai/gpt-5", "max_tokens": 16000 },
{ "name": "deepseek/deepseek-v4-pro", "max_tokens": 16000 }
]
}
}
}
4. Set your API key
Set OPENAI_API_KEY in your shell environment (Zed reads it for the openai provider) OR add it via Zed's secrets management:
export OPENAI_API_KEY="sk-gammainfra-..."
Restart Zed so it picks up the new env var.
5. Use the assistant panel
Cmd/Ctrl + Shift + Y opens the AI assistant panel. Pick a GammaInfra-routed model from the dropdown.
anthropic provider that talks directly to Anthropic's API (not OpenAI-compatible). If you want Anthropic models through GammaInfra, use the openai provider config above with anthropic/... model names — don't try to redirect Zed's anthropic provider, since GammaInfra doesn't yet expose Anthropic-native ingress.
Verify it's working
Open the assistant panel, ask a question, then check the dashboard:
- Recent requests appear with the resolved model, latency, cost.
- Cost rollups by day show where Zed traffic lands.
Trade-offs
- Latency. ~10–50 ms overhead vs going direct. Zed's UI thread doesn't block on the LLM call, so this is invisible.
- Cost. 3% top-up fee (launch) / 5% standard. Pass-through provider rates on tokens — no markup.
- Privacy. Prompts and responses aren't logged by default. Privacy policy.
Ready to try it?
$3 free trial credit on signup, $10 minimum top-up. Pass-through provider token rates plus 3% top-up fee during the launch window.
Frequently asked questions
How do I point Zed at GammaInfra?
https://api.gammainfra.com/v1 and your sk-gammainfra-... key, then select a model such as gammainfra/auto. Zed's settings keys for custom OpenAI endpoints have changed across versions — follow the setup steps above and Zed's current settings docs. The GammaInfra base URL, key, and model names are version-independent.Does Zed's Assistant panel use the custom model?
settings.json change applies to all three.Can I see per-completion cost in Zed?
Does Zed's auto-complete benefit from smart routing?
gammainfra/fast as the model for the lowest TTFB. For straight chat in the Assistant panel, gammainfra/auto is the better default because longer prompts may want a stronger model.What model is recommended for Zed's inline-edit feature?
anthropic/claude-sonnet-4-6 is a solid default — strong code quality, reasonable latency. For latency-sensitive workflows where Sonnet feels slow, gpt-5-mini or deepseek-v4-flash via gammainfra/fast is faster at the cost of some quality on hard edits.