メインコンテンツへスキップ
更新日: 2026-06-06
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.

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
If your main workflow is read code -> edit a few places -> inspect the diff -> refine once more, Aider is often one of the lightest and easiest tools to operationalize.

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_KEY
  • OPENAI_API_BASE
  • openai-api-key
  • openai-api-base
For Crazyrouter, use:
One important accuracy detail: Crazyrouter model names are the raw model IDs shown in the model list and pricing page, such as gpt-5.5 and claude-opus-4-8. Use that raw model ID directly in Aider:
Do not add an extra openai/ prefix to Crazyrouter model names. openai/gpt-5.5 is not a Crazyrouter model ID and can cause model not found or no-route failures.

Prerequisites

Suggested starter allowlist:
  • gpt-5.5
  • claude-opus-4-8
  • gemini-3.1-pro

Full Install Path By Operating System

The most reliable Windows setup is: Git + Python + PowerShell install flow for Aider + PowerShell environment variables. Recommended order:
  1. Install Git
  2. Install Python
  3. Install Aider from the official PowerShell installer, or use aider-install
  4. Set temporary env vars in PowerShell
  5. Persist user-level env vars in PowerShell
  6. Open a fresh terminal and verify both the command and variables
Recommended verification commands:
If aider --version is not found, close and reopen PowerShell and try again. The smoothest macOS setup is usually: Xcode Command Line Tools + Homebrew + Git + Python + Aider official installer + ~/.zshrc for persistent env vars. Recommended order:
  1. Install Xcode Command Line Tools
  2. Install Homebrew if needed
  3. Install Git and Python
  4. Run Aider’s official installer, or install via aider-install or uv
  5. Persist env vars in ~/.zshrc
  6. Open a fresh terminal and verify the executable path
Recommended verification commands:

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

Recommended one-time identity setup:

2. Install Python and pip

3. Install Aider

Aider’s current official one-line installers are:
If you prefer a more explicit step-by-step install, Aider’s official aider-install flow is also valid:
If your team already standardizes on uv, Aider’s docs also allow:
Avoid starting with a plain system-wide pip install aider-chat. Aider’s own installers, aider-install, or uv are usually safer and easier to debug.

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

3

Persist the environment variables

4

Optionally add a config file

Add this to ~/.aider.conf.yml:
If you prefer a safer secret-handling pattern, keep the key only in environment variables and store only 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 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 --version works
  • python --version or python3 --version works
  • aider --version works
  • OPENAI_API_KEY is set correctly
  • OPENAI_API_BASE is https://api.crazyrouter.com/v1
  • if ~/.aider.conf.yml is used, the model string is a Crazyrouter raw model ID such as gpt-5.5
  • aider --model gpt-5.5 launches 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.5 as the main model and add claude-opus-4-8 only 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?

Use https://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 with gpt-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.