Aider is a practical terminal pair-programming tool that works especially well for small iterative code changes, diff review, explicit context-file control, and repeated fix cycles inside a git repo. For Crazyrouter, the safest path is Aider’s officially supported OpenAI-compatible setup.Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
With environment variables or~/.aider.conf.yml, Aider can send requests to Crazyrouter:
- recommended protocol:
OpenAI-compatible API - base URL:
https://crazyrouter.com/v1 - auth variable:
OPENAI_API_KEY - recommended default model string:
gpt-5.4
Best For
- users who want small-step code edits from the terminal
- workflows that need explicit control over context files, diffs, and commit cadence
- teams that want Aider billed separately from Codex or Claude Code
- users who want the simplest OpenAI-compatible Crazyrouter setup path
Protocol Used
Recommended protocol:OpenAI-compatible API
Aider officially supports these settings:
OPENAI_API_KEYOPENAI_API_BASEopenai-api-keyopenai-api-base
gpt-5.4 and claude-sonnet-4-6. Use that raw model ID directly in Aider:
Prerequisites
| Item | Notes |
|---|---|
| Crazyrouter account | Create one at crazyrouter.com |
| Crazyrouter token | Create a dedicated token for Aider |
| Git | Prefer git 2.23+ |
| Python | If you use the aider-install path, make sure you have Python 3.8-3.13; if you use the official one-line installer, it can provision Python 3.12 as needed |
| Aider | Use a current stable version |
| Git repo | Aider generally works best inside a git repo |
| Allowed models | Allow at least one coding-friendly model |
gpt-5.4claude-sonnet-4-6gemini-3-pro
Full Install Path By Operating System
Recommended Windows Path
The most reliable Windows setup is:Git + Python + PowerShell install flow for Aider + PowerShell environment variables.
Recommended order:
- Install Git
- Install Python
- Install Aider from the official PowerShell installer, or use
aider-install - Set temporary env vars in PowerShell
- Persist user-level env vars in PowerShell
- Open a fresh terminal and verify both the command and variables
aider --version is not found, close and reopen PowerShell and try again.
Recommended macOS Path
The smoothest macOS setup is usually:Xcode Command Line Tools + Homebrew + Git + Python + Aider official installer + ~/.zshrc for persistent env vars.
Recommended order:
- Install Xcode Command Line Tools
- Install Homebrew if needed
- Install Git and Python
- Run Aider’s official installer, or install via
aider-installoruv - Persist env vars in
~/.zshrc - Open a fresh terminal and verify the executable path
Linux Note
Linux can generally follow the same terminal flow as macOS, except persistent variables usually belong in~/.bashrc. For a first pass, it is safer to validate with temporary env vars before making the setup permanent.
Detailed Install Walkthrough
Before connecting Aider to Crazyrouter, make sure the local toolchain is ready.1. Install Git
- Windows PowerShell
- macOS
- Ubuntu / Debian
2. Install Python and pip
- Windows PowerShell
- macOS
- Ubuntu / Debian
3. Install Aider
Aider’s current official one-line installers are:- Windows PowerShell
- macOS / Linux
aider-install flow is also valid:
- Windows PowerShell
- macOS / Linux
uv, Aider’s docs also allow:
Quick Start
Create an Aider-specific token
In Crazyrouter, create a token named something like
aider. Start by allowing only models such as gpt-5.4, claude-sonnet-4-6, and gemini-3-pro.The allowlist here uses Crazyrouter’s raw model IDs. Use the same raw model IDs in Aider.
Optionally add a config file
Add this to If you prefer a safer secret-handling pattern, keep the key only in environment variables and store only
~/.aider.conf.yml:model plus openai-api-base in the config file.Prepare the repo before the first real run
If this folder is not a Git repo yet:If it is already an existing repo, at least inspect the current state first:
Recommended Model Setup
| Use case | Recommended Aider model string | Why |
|---|---|---|
| default coding driver | gpt-5.4 | uses Crazyrouter’s raw model ID and works as the OpenAI-compatible Aider baseline |
| Claude-style alternative | claude-sonnet-4-6 | good for long-context explanation and steady multi-turn collaboration |
| Gemini fallback path | gemini-3-pro | useful as a second compatibility-validation path |
gpt-5.4. Then add claude-sonnet-4-6 or gemini-3-pro only after the baseline path is stable.
Token Setup Best Practices
| Setting | Recommendation | Notes |
|---|---|---|
| dedicated token | Required | Do not share the Aider token with other IDE or CLI tools |
| model allowlist | Strongly recommended | Keep the model set small to avoid accidental high-cost switching |
| IP restriction | Situational | Consider it on fixed servers; be careful on mobile dev machines |
| quota cap | Strongly recommended | Long sessions and repeated repair loops can add up quickly |
| environment split | Recommended | Separate local development, remote hosts, and CI |
| leak response | Rotate immediately | If .aider.conf.yml, shell history, or recordings expose the key, rotate it |
Verification Checklist
-
git --versionworks -
python --versionorpython3 --versionworks -
aider --versionworks -
OPENAI_API_KEYis set correctly -
OPENAI_API_BASEishttps://crazyrouter.com/v1 - if
~/.aider.conf.ymlis used, the model string is a Crazyrouter raw model ID such asgpt-5.4 -
aider --model gpt-5.4launches correctly - the first read-only or small-change task succeeds
- Crazyrouter logs show the matching request
- token quota and model allowlist match your intended setup
Common Errors And Fixes
| Symptom | Likely cause | Fix |
|---|---|---|
401 unauthorized | wrong, expired, or incomplete API key | generate a new token and set it again |
403 or model not allowed | the token does not allow the selected model | allow that model in Crazyrouter token settings |
404 | wrong base URL or missing /v1 | use https://crazyrouter.com/v1 |
model not found | wrong model string, an unsupported openai/ prefix, or a model that is not currently available on Crazyrouter | switch back to a raw model ID that exists on the pricing page or model list, such as gpt-5.4 or claude-sonnet-4-6 |
| Aider launches but performs poorly | the model is too weak or the context is too noisy | return to gpt-5.4 and reduce the context files |
| config file and env vars behave inconsistently | the two configuration sources conflict | pick one primary source and restart Aider |
| cost rises too quickly | long sessions and too many context files | clear or restart the session and shrink the context |
Performance And Cost Tips
- validate on a small repo first
- keep
gpt-5.4as the main model and addclaude-sonnet-4-6only when you need cross-vendor validation - split tokens by project type so cost tracking stays clear
- clear context when the session becomes too long or drifts away from the task
- after larger edits, review both the Aider diff and Crazyrouter logs
FAQ
What base URL should I use for Aider?
Usehttps://crazyrouter.com/v1.
Why should the model name not be openai/gpt-5.4?
Because Crazyrouter model names do not include provider prefixes. Crazyrouter recognizes raw model IDs such as gpt-5.4; openai/gpt-5.4 is treated as a different model name and is not available.
Should I prefer env vars or a config file?
Both work. Environment variables are faster for a first setup;~/.aider.conf.yml is useful once the setup becomes permanent.
Which model should I try first?
Start withgpt-5.4.
Does Aider have to run inside a git repo?
Not strictly, but the experience is usually best inside a git repo because change review is easier and safer.Why should I avoid allowing too many models at first?
Because multi-turn sessions make troubleshooting, budget control, and stability harder when the model surface area is too broad.If you want a very lightweight terminal tool for day-to-day small-step coding, Aider still deserves a strong place in the Crazyrouter application guides.