Coding agents resend large parts of your repository on every turn, so per-token billing grows fast. An unlimited plan session removes the meter. These steps follow Aider’s OpenAI-compatible setup.
1. Install Aider
python -m pip install aider-install
aider-install
2. Point it at BroadNet Inference
export OPENAI_API_BASE=https://inference.broadnet.ai/v1
export OPENAI_API_KEY='your-broadnet-plan-key'
On Windows, use setx OPENAI_API_BASE https://inference.broadnet.ai/v1 and setx OPENAI_API_KEY your-key, then open a new terminal. Aider’s docs say to restart the shell after setx.
Keep the /v1 at the end of the base URL. Aider adds the chat-completions path itself.
3. Start it on your codebase
cd /path/to/your/project
aider --model openai/broadnet/deepseek-v4.1-flash
The openai/ prefix tells Aider to use the OpenAI-compatible endpoint; the rest is BroadNet’s model ID. Aider will warn: “Unknown context window size and costs, using sane defaults.” That is expected for models outside its built-in list. Its model warnings page says the warning can usually be ignored.
4. Optional: tell Aider about the model
To remove the warning and give the model room to reason, add two files to your home directory or the repository root. Aider reads both from either place, as described in its advanced model settings docs.
.aider.model.metadata.json:
{
"openai/broadnet/deepseek-v4.1-flash": {
"max_input_tokens": 1048576,
"litellm_provider": "openai",
"mode": "chat"
}
}
.aider.model.settings.yml:
- name: openai/broadnet/deepseek-v4.1-flash
edit_format: diff
extra_params:
max_tokens: 16000
Aider’s default edit format for unknown models is whole, which resends whole files. diff sends only the changed blocks. If edits fail to apply, remove the edit_format line to go back to whole.
Tips
- One Aider window, one session. If you run two Aider instances at the same time, buy two sessions or they queue behind each other.
- Reasoning uses tokens. DeepSeek V4.1 Flash reasons before it answers, and BroadNet counts that toward
max_tokens. Why answers come back empty. - Try an hour first. A Meteor plan costs $1 for one hour, which is enough to judge it on a real task.
Troubleshooting
- 401 Unauthorized.
OPENAI_API_KEYis missing, wrong or expired. Check that the shell running Aider has the variable; on Windows, open a new terminal aftersetx. - Requests go to OpenAI instead of BroadNet.
OPENAI_API_BASEisn’t set in this shell, or the model name lacks theopenai/prefix. Runecho $OPENAI_API_BASEto check. - Model not found. The part after
openai/must bebroadnet/deepseek-v4.1-flashexactly. A plan key covers DeepSeek V4.1 Flash only; other BroadNet models need a pay-as-you-go key. - Empty or cut-off replies. Raise
max_tokensin.aider.model.settings.ymlas shown above. - Edits don’t apply. Switch
edit_formatback towhole, or try--edit-format wholeon the command line. - Slow replies or 429. A plan session runs one request at a time; a second Aider window queues. A pay-as-you-go key allows 30 requests a minute and 4 at once. See errors and retries.
Prefer an agent inside VS Code? See the Cline setup guide, or compare them in Cline vs Roo Code vs Aider.
