Skip to content
The Distillery
Docs / Clients / Aider
SETUP · aiderverified

~/distillery setup → aider

Configure Aider to route Claude API requests through The Distillery via the OpenAI adapter.

vendorAnthropic (OpenAI compat)
authAPI key
methodCLI flag
portlocalhost:3080

Overview

Aider is a command-line AI pair programmer. Aider does not natively support a custom Anthropic base URL; instead, it uses its OpenAI-compatible client with the `--openai-api-base` flag. The `openai/claude-sonnet-4-5` model prefix tells Aider to use OpenAI-format routing while targeting a Claude model. The Distillery exposes `/v1/chat/completions` specifically for this case.

Prerequisites

You have The Distillery installed and running locally on port 3080 with the OpenAI adapter enabled. Aider 0.60 or newer is required.

$ install

step 01 / 03
python -m pip install aider-chat

$ configure

step 02 / 03

Run Aider with two flags: `--openai-api-base` pointing at the proxy's OpenAI adapter endpoint, and `--model openai/claude-sonnet-4-5` to select the model via OpenAI-format routing.

To make this persistent, add these flags to `~/.aider.conf.yml`. Set `OPENAI_API_KEY` to any non-empty value: Aider requires the variable, but The Distillery ignores it locally:

aider --openai-api-base http://localhost:3080/v1 --model openai/claude-sonnet-4-5
macOS · Linux
openai-api-base: http://localhost:3080/v1
model: openai/claude-sonnet-4-5

# Then set the required env var:
export OPENAI_API_KEY=unused
Windows
# File location: %USERPROFILE%\.aider.conf.yml
openai-api-base: http://localhost:3080/v1
model: openai/claude-sonnet-4-5

# Then set the required env var:
set OPENAI_API_KEY=unused

$ verify

step 03 / 03
01Start Aider in a repo and ask it anything. Then run:
thedistillery stats
$ comparing tools

Evaluating other Claude Code cost-reduction approaches alongside Aider? See how The Distillery compares to Claude Code Router (model-routing approach), Compresr (YC W26), or browse alternatives to Claude Code Router for the full landscape.

Pricing breakdown: thedistillery.com/pricing.