DEV Community

Robin
Robin

Posted on

Aider + Claude Max Ban: How to Keep Aider Working in 2026

If you use Aider for AI-assisted coding and your Claude Max subscription was your model source, January 2026 broke your setup.

This is the fix.


What happened

In January 2026, Anthropic enforced their Claude Max terms of service. Automated tool access — AI coding assistants that call Claude through subscription auth tokens — is not permitted on consumer plans.

Aider, like Cline and Roo Code, can connect to Claude through your subscription credentials. That path stopped working.

The Anthropic API was never restricted. Only the subscription OAuth path was.


Why Aider is actually in a better position than most tools

Aider was built API-first from day one. Unlike VS Code extensions that were patched to support custom providers, Aider has native OpenAI-compatible provider support baked into its config system.

This means the fix is genuinely one line.


The fix: switch to API auth

Aider uses environment variables or a config file for model configuration. You need to:

  1. Get an API key from any OpenAI-compatible provider
  2. Set your environment variables
  3. Optionally: tell Aider which model to use

Option A: Direct Anthropic API

export ANTHROPIC_API_KEY=your-key-here
aider --model anthropic/claude-opus-4-6
Enter fullscreen mode Exit fullscreen mode

This connects directly to Anthropic's API. Pay-per-token. No subscription auth involved.

Cost: Opus 4.6 at ~$0.015/1K input tokens. For a typical coding session (50K tokens), that's about $0.75.

Option B: OpenAI-compatible proxy (smart routing)

export OPENAI_API_KEY=ck_your_key
export OPENAI_API_BASE=https://www.komilion.com/api/v1
aider --model neo-mode/balanced
Enter fullscreen mode Exit fullscreen mode

This routes through Komilion's API, which automatically selects the cheapest capable model for each request. Simple questions go to fast cheap models. Architecture work goes to frontier models.

# Or for full Opus 4.6 on everything:
aider --model neo-mode/premium
Enter fullscreen mode Exit fullscreen mode

Cost: ~$0.006–$0.55 per request depending on tier. For heavy Aider sessions, smart routing cuts costs 40–70% compared to Opus-on-everything.

Option C: Aider config file

Instead of environment variables every session, add to your .aider.conf.yml or ~/.aider.conf.yml:

# For Komilion smart routing:
openai-api-key: ck_your_key
openai-api-base: https://www.komilion.com/api/v1
model: neo-mode/balanced

# Or for direct Anthropic:
anthropic-api-key: your-anthropic-key
model: anthropic/claude-opus-4-6
Enter fullscreen mode Exit fullscreen mode

Now every aider invocation uses your API key automatically.


Aider-specific models worth knowing

Aider's --model flag accepts any model string your provider supports. When using Komilion:

Model string What you get
neo-mode/frugal Cheapest capable model, fast (~$0.006/req)
neo-mode/balanced Sweet spot — Sonnet-class models (~$0.10/req)
neo-mode/premium Opus 4.6 direct, 20K+ char responses (~$0.55/req)

For Aider's typical use case — making targeted edits to specific files — neo-mode/balanced hits the right cost/quality balance. Aider already handles the context management; you don't need Opus for every edit.


Verifying your setup

After configuring, test with a simple prompt:

aider --message "What's in this repo?" --yes
Enter fullscreen mode Exit fullscreen mode

You should see the model name in Aider's output header. If you're using Komilion, the actual model selected will appear in the API response headers (X-Komilion-Model).

For a quick cost check:

# After a session, Aider prints token usage
# Compare against: komilion.com/pricing for per-token costs
Enter fullscreen mode Exit fullscreen mode

What about Aider's repo-map feature?

Aider's repo-map (the feature that scans your repo structure before making edits) makes API calls to build the map. These are typically short classification calls — exactly the kind of request where smart routing saves the most.

With neo-mode/balanced, repo-map calls route to fast cheap models while complex edit requests route to better models. Aider doesn't need to know this is happening — from its perspective, it's just making API calls to an OpenAI-compatible endpoint.


Common issues after switching

"Model not found" error:
Double-check the model string. For Komilion: use neo-mode/frugal, neo-mode/balanced, or neo-mode/premium exactly. For direct Anthropic: anthropic/claude-opus-4-6.

Streaming not working:
Aider uses streaming by default. Komilion's API fully supports SSE streaming — if you see issues, check your OPENAI_API_BASE doesn't have a trailing slash.

Costs higher than expected:
Aider sends the full repo-map + conversation history on every call. For large repos, this adds up. Consider using --map-tokens to limit the repo-map size, or use neo-mode/frugal for exploratory sessions and neo-mode/balanced for actual edits.


The short version

Aider broke because subscription auth broke. The API was always open.

export OPENAI_API_KEY=ck_your_key
export OPENAI_API_BASE=https://www.komilion.com/api/v1
aider --model neo-mode/balanced
Enter fullscreen mode Exit fullscreen mode

Three lines. Aider works again. You're on the official API path with intelligent cost routing.

$5 free credits to test it: komilion.com


Full setup guide and model comparison at komilion.com/cline — the migration guide covers Aider, Cline, Roo Code, and Cursor.

Top comments (0)