Expand ANTHROPIC_MODELS list with recent Claude model names#5173
Merged
paul-gauthier merged 2 commits intoMay 22, 2026
Merged
Conversation
`ANTHROPIC_MODELS` in `aider/models.py` is used by `sanity_check_models` to map a bare Claude model name (no provider prefix) to the `ANTHROPIC_API_KEY` environment variable. Models not in this list fall through to the keymap provider lookup. The list was stale — it had `claude-2`, the 3.x family, `claude-3-5-*`, `claude-sonnet-4-20250514`, `claude-opus-4-20250514`, plus 4.5/4.6/4.7 unrounded names — but was missing: - `claude-3-7-sonnet-20250219` - `claude-opus-4-1` / `claude-opus-4-1-20250805` - `claude-opus-4-5` / `claude-opus-4-5-20251101` - `claude-opus-4-6-20260205` (dated variant) - `claude-opus-4-7-20260416` (dated variant) Companion to the OPENAI_MODELS list expansion. All added names have corresponding entries in `aider/resources/model-settings.yml`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`ANTHROPIC_MODELS` in `aider/models.py` is used by `sanity_check_models` to map a bare Claude model name (no provider prefix) to the `ANTHROPIC_API_KEY` environment variable. Models not in this list fall through to the keymap provider lookup, which fails when the user passes the name without a provider prefix.
The list was stale — it had `claude-2`, the 3.x family, `claude-3-5-*`, `claude-sonnet-4-20250514`, `claude-opus-4-20250514`, plus the 4.5/4.6/4.7 unrounded names — but was missing several recent Anthropic models:
All added names have corresponding entries in `aider/resources/model-settings.yml`, so the list now matches the rest of the project. Companion to the OPENAI_MODELS list expansion PR.
Effect
Before this change, `aider --model claude-opus-4-5` with `ANTHROPIC_API_KEY` set in the environment would show "ANTHROPIC_API_KEY: Not set" because the bare name didn't match the list. After this change, the API key is correctly detected.
Test plan