~/distillery setup → aider
Configure Aider to route Claude API requests through The Distillery via the OpenAI adapter.
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 / 03python -m pip install aider-chat$ configure
step 02 / 03Run 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-5openai-api-base: http://localhost:3080/v1
model: openai/claude-sonnet-4-5
# Then set the required env var:
export OPENAI_API_KEY=unused# 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 / 03thedistillery statsEvaluating 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.