Skip to content

Expand ANTHROPIC_MODELS list with recent Claude model names#5173

Merged
paul-gauthier merged 2 commits into
Aider-AI:mainfrom
Cyberfilo:feat/anthropic_models-list-add-opus-4-5
May 22, 2026
Merged

Expand ANTHROPIC_MODELS list with recent Claude model names#5173
paul-gauthier merged 2 commits into
Aider-AI:mainfrom
Cyberfilo:feat/anthropic_models-list-add-opus-4-5

Conversation

@Cyberfilo
Copy link
Copy Markdown
Contributor

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:

  • `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 for Opus 4.6)
  • `claude-opus-4-7-20260416` (dated variant for Opus 4.7)

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

  • Diff is purely additive: 9 lines added to the ANTHROPIC_MODELS string + 1 line in HISTORY.md.

Cyberfilo added 2 commits May 22, 2026 12:16
`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`.
@paul-gauthier paul-gauthier merged commit 5dc9490 into Aider-AI:main May 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants