Aider + TOKNADO
How to use Aider with TOKNADO's OpenAI-compatible API
Aider is an AI pair-programming tool that edits your local git repo from the terminal. It connects to any OpenAI-compatible endpoint with two environment variables and one rule about the model name.
That rule is the number one cause of failed Aider setups with custom endpoints, so it comes first below.
Start free trial Jump to setup
What you need
- Aider installed (
python -m pip install aider-install && aider-install). - Your TOKNADO endpoint and API key.
- A model ID from your TOKNADO dashboard.
Setup: Aider with TOKNADO
Set the base URL and key
Aider uses the standard OpenAI variables. On Windows use
setxand restart the terminal afterward.# macOS / Linux export OPENAI_API_BASE=https://toknado.up.railway.app/v1 export OPENAI_API_KEY=YOUR_TOKNADO_API_KEY # Windows (PowerShell, persisted) setx OPENAI_API_BASE https://toknado.up.railway.app/v1 setx OPENAI_API_KEY YOUR_TOKNADO_API_KEYStart Aider with the openai/ prefix
Prefix the model ID with
openai/. Aider routes through LiteLLM, and that prefix selects the OpenAI-compatible transport. The prefix is routing information, not part of the model ID.cd /path/to/your/project aider --model openai/toknado/autoPersist the settings
To avoid retyping, put them in
.aider.conf.ymlin your repo root or home directory, and keep the key in your environment.# .aider.conf.yml openai-api-base: https://toknado.up.railway.app/v1 model: openai/toknado/auto
Notes for real-world use
- Aider may warn that it doesn't recognise the model. That is expected for custom endpoints and usually harmless; you can set model metadata if you want accurate context handling.
- Aider's on-screen cost figure is an estimate based on its own pricing tables, not your TOKNADO bill. TOKNADO plans are flat monthly with an hourly request cap.
- Setting
OPENAI_API_BASEin your shell affects every tool that reads it. If you also use OpenAI elsewhere, prefer a project.envor.aider.conf.yml.
Troubleshooting Aider + TOKNADO
| Symptom | What to check |
|---|---|
| Requests go to the wrong provider or fail | You forgot the openai/ prefix on --model. |
| 404 | Don't append /chat/completions to OPENAI_API_BASE; Aider adds it. |
| “Unknown model” warning | Expected for custom endpoints. Continue, or add model metadata. |
| Variables not picked up (Windows) | After setx, close and reopen the terminal. |
| 429 errors | You reached the rolling hourly limit or upstream throughput dropped. Check usage and consider a larger plan. |
FAQ
How do I use Aider with a custom OpenAI-compatible endpoint?
Set OPENAI_API_BASE and OPENAI_API_KEY, then run aider --model openai/<model-id>.
Why is the openai/ prefix required?
Aider uses LiteLLM, which reads the prefix to choose the OpenAI-compatible route for your endpoint.
Does the cost shown in Aider match my bill?
No. It is Aider's estimate. TOKNADO bills a flat monthly plan.
Can I use a config file instead of env vars?
Yes. Use openai-api-base and model in .aider.conf.yml, and keep the key in the environment.