Skip to main content
Content updated: 2026-06-09
Aider is a very practical terminal-based pair programming tool, suitable for making incremental code changes, reviewing diffs, adding context files, and fixing issues in rounds within a Git repository. When connecting to Crazyrouter, the most reliable way is to use the officially supported OpenAI-compatible configuration of Aider.

Overview

By using environment variables or ~/.aider.conf.yml, Aider can send requests to Crazyrouter:
  • Recommended protocol: OpenAI-compatible API
  • Base URL: https://api.crazyrouter.com/v1
  • Authentication variable: OPENAI_API_KEY
  • Recommended default model notation: gpt-5.5
If your usual workflow is “read code -> change a few places -> view diff -> fix again”, Aider is often the lightest and most stable terminal coding tool to land for real use.

Who It’s For

  • People who want to make incremental code changes and commits in the terminal
  • Those who want clear control over context files, diffs, and commit rhythm
  • Users who want to manage billing for Aider, Codex, and Claude Code separately
  • Anyone who wants to connect Crazyrouter using the most direct OpenAI-compatible method first

Protocol Usage

Recommended protocol: OpenAI-compatible API Aider officially supports the following configuration items:
  • OPENAI_API_KEY
  • OPENAI_API_BASE
  • openai-api-key
  • openai-api-base
Crazyrouter’s corresponding notation:
Also note: Crazyrouter’s model name is the original model ID shown in the backend model list and pricing page, such as gpt-5.5 and claude-opus-4-8. The same model ID should be filled in directly in Aider:
Do not add extra openai/ prefixes to Crazyrouter model names. openai/gpt-5.5 is not a model name on this site and will cause model not found errors or no available channels for routing.

System Requirements and Prerequisites

Recommended initial whitelist:
  • gpt-5.5
  • claude-opus-4-8
  • gemini-3.1-pro

Complete Installation Paths by Operating System

The most reliable path for Aider on Windows is: Git + Python + PowerShell installation of Aider + PowerShell: Set environment variables. Recommended order:
  1. Install Git
  2. Install Python
  3. Use PowerShell to run Aider’s official installation script, or install aider-install first
  4. Set temporary environment variables with PowerShell
  5. Set persistent user-level environment variables with PowerShell
  6. Open a new terminal to confirm aider command and variables are effective
Recommended verification command:
If aider --version cannot find the command, close and reopen PowerShell before trying again. The smoothest path for Aider on macOS is usually: Xcode Command Line Tools + Homebrew + Git + Python + Official Aider installation script + ~/.zshrc to persist environment variables. Recommended order:
  1. Install Xcode Command Line Tools
  2. Install Homebrew (if you don’t already have it)
  3. Install Git and Python
  4. Run Aider’s official installation script, or install via aider-install / uv
  5. Write ~/.zshrc
  6. Open a new terminal to verify aider command and variable paths
Recommended verification command:

Linux Instructions

Linux can generally follow the terminal path for macOS, except persistent environment variables are usually written to ~/.bashrc. If this is your local development machine or first connection to a cloud server, prioritize using temporary variables in the current shell before deciding whether to write them persistently.

Complete Installation from Scratch

1

Step 1: Install Git

If the machine doesn’t have Git, install it first.
It’s recommended to supplement:
2

Step 2: Install Python and pip

The official Aider installer will use Python or automatically prepare its own Python runtime environment. For easier troubleshooting, confirm Python is available on your machine first.
3

Step 3: Install Aider

The currently recommended one-click installation script from Aider is as follows.
If you want to clearly see the installation process, you can follow the official Aider aider-install method:
If your team already uses uv uniformly, follow the official documentation for installation:
It’s not recommended to manually pip install aider-chat to the system environment right from the start. The official recommendation is to use installation scripts, aider-install, or uv for more reliable dependency isolation.
4

Step 4: Create a dedicated Aider token in Crazyrouter

Create a token named aider in the Crazyrouter backend, and initially only enable:
  • gpt-5.5
  • claude-opus-4-8
  • gemini-3.1-pro
The whitelist here uses the original Crazyrouter model names; no need to write the openai/ prefix.
5

Step 5: Temporarily set environment variables in the current terminal

First configure temporarily, after successful testing then write persistent settings.
6

Step 6: Write the environment variable to a persistent configuration

After persisting, it’s recommended to open a new terminal and execute once more:
7

Step 7: Optionally write to ~/.aider.conf.yml

If you don’t want to add parameters manually each time, you can write a configuration file.
For greater security, you can keep only the key in an environment variable and only leave model and openai-api-base in the configuration file.
8

Step 8: Prepare the Git repository and make the first snapshot

Aider provides the best experience in a Git repository. If the current directory is not a Git repository:
If it’s an existing repository, check:
9

Step 9: Start Aider and complete the first verification

After entering the project directory, run:
For first-time verification, follow this order:
  1. Please only summarize the current repository structure, do not modify any files
  2. Please read the README and provide the minimal changes needed. Do not make direct changes yet.
  3. Confirm diffs are displayed normally before making small changes
If you want to temporarily test another model, use the same notation, e.g., aider --model claude-opus-4-8.
It’s recommended to start with gpt-5.5, then add claude-opus-4-8 or gemini-3.1-pro as needed by the scenario after successful testing.

Token Best Practices

Verification Checklist

  • git --version is normal
  • python --version or python3 --version is normal
  • aider --version is normal
  • OPENAI_API_KEY is set correctly
  • OPENAI_API_BASE is set to https://api.crazyrouter.com/v1
  • ~/.aider.conf.yml, if used, should use the Crazyrouter original model ID, for example gpt-5.5
  • aider --model gpt-5.5 can start normally
  • The first read-only or minor change task returns successfully
  • Corresponding requests appear in the Crazyrouter backend logs
  • Token quota and model whitelist meet expectations

Common Errors and Fixes

Performance and Cost Suggestions

  • For first integrations, validate in a small repository first
  • Use gpt-5.5 by default; add claude-opus-4-8 for cross-validation if needed
  • It is recommended to separate tokens for different project types for cost statistics
  • Clean up context timely when sessions get long to avoid carrying irrelevant files repeatedly
  • After each major change, review Aider generated diffs and Crazyrouter logs

FAQ

Which Base URL should I fill in for Aider?

Enter https://api.crazyrouter.com/v1.

Why shouldn’t the model name be written as openai/gpt-5.5?

Because Crazyrouter’s model names do not include the vendor prefix; the actual ID recognized on this site is the original model ID like gpt-5.5. openai/gpt-5.5 will be treated as a different model name, which does not exist on this site.

Should I use environment variables or a configuration file?

Either is fine. Using environment variables is faster to start; for long-term use, it is recommended to also add ~/.aider.conf.yml.

Why do you recommend creating a Git snapshot first the first time?

Because Aider will modify files, generate diffs, and automatically commit or suggest commits. Making a snapshot in advance makes troubleshooting and rollbacks much easier. Start with gpt-5.5.

Does Aider have to be used in a Git repository?

It’s not absolutely required, but the experience is usually best in a Git repository, and reviewing modification results is much easier.
If you want a very lightweight terminal tool, very suitable for daily incremental code improvements, Aider is still worth prioritizing in Crazyrouter’s application guide.