Skip to content

fix(py): refresh the Claude catalog to the models the Claude API serves - #184

Closed
huangjeff5 wants to merge 1 commit into
mainfrom
fix/py-anthropic-catalog-refresh
Closed

huangjeff5 wants to merge 1 commit into
mainfrom
fix/py-anthropic-catalog-refresh

Conversation

@huangjeff5

Copy link
Copy Markdown
Collaborator

The Anthropic plugin's built-in Claude catalog now matches the models the Claude API serves today. It adds the 5.5 generation (Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5), plus Fable 5.1 and Opus 5. It drops Sonnet 4, Opus 4 and Opus 4.1, which Anthropic has retired.

The catalog is what makes a model autocomplete in Anthropic.claude(...), appear in the Dev UI model list, and use native structured output. Without this change, the newest Claude models get none of that.

from genkit_anthropic import Anthropic

# 1. The current models autocomplete and are typed
Anthropic.claude('claude-sonnet-5-5')
# => ModelRef(name='anthropic/claude-sonnet-5-5', ...)

# 2. Cataloged, so output_format='json' uses native structured output
await ai.generate(model=Anthropic.claude('claude-sonnet-5-5'), prompt='...', output_format='json')

# 3. A retired id still resolves, with generic capabilities (text output, no native JSON)
Anthropic.claude('claude-sonnet-4')

Changes

  • Added: claude-fable-5-2, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-1, claude-opus-5. Each sends its dateless id, which is a pinned snapshot from the 4.6 generation on.

  • Removed (retired on the Claude API):

    • claude-sonnet-4 and claude-opus-4 retired 2026-06-15.
    • claude-opus-4-1 retired 2026-08-05.

    These ids still resolve on demand. They no longer appear in the Dev UI list or autocomplete, and they get generic capabilities.

  • Kept but deprecated: claude-opus-4-5 retires 2027-01-22, and claude-sonnet-4-5 retires 2026-11-30. They stay listed while the API still serves them.

  • Order: newest first, latest models, then earlier ones, then deprecated. The Dev UI lists static models in this order.

Decisions

  • The catalog is what the Claude API serves today, active or deprecated: Retired models are dropped, even though Google Cloud and Bedrock still serve some of them on their own schedules. Advertising a model that fails on the default backend is worse than losing autocomplete for a retired one, and any id can still be passed as a string.
  • Mythos models stay out: They're limited-availability, so most accounts can't call them, but they resolve on demand like any other id. This matches the existing test_mythos_excluded_but_resolvable.
  • One _claude(label, version) helper instead of 12 copies of the same ModelInfo: Every cataloged model has the same capabilities: text, images, tools, and native structured output. A future model that differs would get its own ModelInfo.

Source: Anthropic's models overview and model deprecations, checked 2026-11-25. The model-garden list for Claude on Google Cloud has the same 5.5 ids.

Verification

  • packages/genkit-anthropic: 388 passed, 5 skipped (live tests, no ANTHROPIC_API_KEY). packages/genkit-vertexai: 53 passed.
  • The tests pin the new labels and ids, and check that retired ids are no longer advertised. The existing test that KnownClaude and the catalog dict hold the same set still passes.
  • ruff and ty pass. pyright and pyrefly error counts are unchanged from main.

Breaking changes

None to the API. KnownClaude loses three retired members, but Anthropic.claude() takes KnownClaude | str, so code that passes them still type-checks and runs.

Not in this PR

  • genkit-amazon-bedrock has its own Claude catalog with Bedrock ids. It needs the same refresh separately.
  • Tests that use claude-sonnet-4 as a generic fixture still pass. They now exercise the unknown-model path, which they never depended on.

Add Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.1 and Opus 5. Drop
Sonnet 4, Opus 4 and Opus 4.1, which Anthropic has retired; they still resolve
on demand with generic capabilities.
@huangjeff5

Copy link
Copy Markdown
Collaborator Author

Superseded by #170 (14eac3c), which already landed the Claude 5.5/Fable catalog refresh and retired model removals.

@huangjeff5 huangjeff5 closed this Nov 30, 2026
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.

1 participant