Zed is an open-source code editor with a built-in agent. It connects to any server with an OpenAI-compatible API through its openai_compatible provider type. BroadNet Inference serves standard chat completions at https://inference.broadnet.ai/v1, so it fits. BroadRouter is BroadNet’s own site; the steps below follow Zed’s API access docs as of Zed 1.28.
Setup
- Get a key. Create a pay-as-you-go key in the BroadNet console, or use an unlimited plan key.
- Add the provider. Either open Agent Settings with the
agent: open settingscommand and click Add Provider in the LLM Providers section, or editsettings.jsondirectly:
{
"language_models": {
"openai_compatible": {
"broadnet": {
"api_url": "https://inference.broadnet.ai/v1",
"available_models": [
{
"name": "broadnet/glm-5.3",
"display_name": "GLM 5.3 (BroadNet)",
"max_tokens": 1048576,
"max_output_tokens": 16000,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"prompt_cache_key": false,
"chat_completions": true,
"interleaved_reasoning": false,
"max_tokens_parameter": true
}
},
{
"name": "broadnet/qwen3.8-27b",
"display_name": "Qwen3.8 27B (BroadNet)",
"max_tokens": 262144,
"max_output_tokens": 16000,
"capabilities": {
"tools": true,
"images": true,
"parallel_tool_calls": false,
"prompt_cache_key": false,
"chat_completions": true,
"interleaved_reasoning": false,
"max_tokens_parameter": true
}
}
]
}
}
}
}
- Give Zed the key. Export it before you start Zed, or paste it into the provider in Agent Settings. Zed stores pasted keys in the system keychain, not in
settings.json.
export BROADNET_API_KEY='your-broadnet-key'
- Test it. Open the Agent Panel, pick GLM 5.3 (BroadNet) in the model selector and ask a small question about an open file. An answer means the connection works.
What the settings mean
nameis the model ID Zed sends. Use BroadNet’s ID exactly, with thebroadnet/prefix.max_tokensis the context window in Zed’s schema, not the output limit. Use 1,048,576 for GLM 5.3 and DeepSeek V4.1 Flash, and 262,144 for Qwen3.8 27B.max_output_tokenscaps the reply. The 16,000 above is our suggestion, not a BroadNet limit. Reasoning counts toward it, so don’t set it low.max_tokens_parameter: truemakes Zed send the output limit asmax_tokensinstead ofmax_completion_tokens. BroadNet’s API reference describes themax_tokensfield.imagesdefaults to false for OpenAI-compatible models. Turn it on only for models that take images: Qwen3.8 27B, DeepSeek V4.1 Flash and BroadNet Gemma 4 VL 26B.reasoning_effortis optional. BroadNet’s docs suggestlowif you want shorter thinking.
Which model to pick
| Use | Model | Why |
|---|---|---|
| Agent edits with tools | broadnet/glm-5.3 |
BroadNet lists tools and structured output; 1M context |
| Screenshots and Arabic text | broadnet/qwen3.8-27b |
Tools plus image input; 262K context |
| Long chats on a flat plan | broadnet/deepseek-v4.1-flash |
The unlimited-plan model; image input; tools not listed by BroadNet |
Zed assumes tools: true for OpenAI-compatible models. BroadNet’s docs don’t list tool calling for DeepSeek V4.1 Flash, so test a real agent task with it before you rely on it. A Meteor hour ($1) is a cheap way to try it before a Full Moon month ($60).
Troubleshooting
- 401. The key is wrong, expired or out of allowance. If you set
BROADNET_API_KEY, it wins over the keychain; unset it and restart Zed to use the saved key instead. - 404 on every request. Check that
api_urlends in/v1. Then check thenamematches the BroadNet ID exactly. Paid models need a top-up; the $5 credit covers onlybroadnet/gemma-4-26b-a4band the two Transcribe models. - Empty replies. The model used its output budget on reasoning. Raise
max_output_tokensor setreasoning_efforttolow. Why answers come back empty. - 429. A pay-as-you-go key allows 30 requests a minute and 4 in flight. A plan session runs one request at a time. See errors and retries.
- Remote projects. Zed initialises providers in the local app, so over SSH the key comes from your local keychain or local environment, not the remote machine.
