更新日: 2026-06-06Aider 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.
Overview
With environment variables or~/.aider.conf.yml, Aider can send requests to Crazyrouter:
- recommended protocol:
OpenAI-compatible API - base URL:
https://api.crazyrouter.com/v1 - auth variable:
OPENAI_API_KEY - recommended default model string:
gpt-5.5
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.5 and claude-opus-4-8. Use that raw model ID directly in Aider:
Prerequisites
Suggested starter allowlist:
gpt-5.5claude-opus-4-8gemini-3.1-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
1
Create an Aider-specific token
In Crazyrouter, create a token named something like
aider. Start by allowing only models such as gpt-5.5, claude-opus-4-8, and gemini-3.1-pro.The allowlist here uses Crazyrouter’s raw model IDs. Use the same raw model IDs in Aider.
2
Set the environment variables
- Linux / macOS
- Windows PowerShell
3
Persist the environment variables
- Linux Bash
- macOS / Zsh
- Windows PowerShell
4
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.5
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:
6
Launch Aider inside your repo
7
Run the first validation
Start with a low-risk task such as:
Check the README for typos and suggest the smallest safe edits. Confirm Aider can read files and respond sensibly before using it for real code changes.Recommended Model Setup
Recommended rollout: start with
gpt-5.5. Then add claude-opus-4-8 or gemini-3.1-pro only after the baseline path is stable.
Token Setup Best Practices
Verification Checklist
-
git --versionworks -
python --versionorpython3 --versionworks -
aider --versionworks -
OPENAI_API_KEYis set correctly -
OPENAI_API_BASEishttps://api.crazyrouter.com/v1 - if
~/.aider.conf.ymlis used, the model string is a Crazyrouter raw model ID such asgpt-5.5 -
aider --model gpt-5.5launches 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
Performance And Cost Tips
- validate on a small repo first
- keep
gpt-5.5as the main model and addclaude-opus-4-8only 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://api.crazyrouter.com/v1.
Why should the model name not be openai/gpt-5.5?
Because Crazyrouter model names do not include provider prefixes. Crazyrouter recognizes raw model IDs such as gpt-5.5; openai/gpt-5.5 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.5.
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.