feat: support Claude Opus 5#3830
Merged
Merged
Conversation
Runs go generate ./pkg/modelsdev/... to pull the latest catalog from models.dev. The only change to the anthropic provider is the addition of claude-opus-5 (family claude-opus, 1M context, 128k output, $5/$25 pricing, text+image+pdf input). Five new niche providers are also added as part of the wholesale refresh. Adds TestEmbeddedSnapshotIncludesClaudeOpus5 to guard against a future stale snapshot silently dropping the new model, mirroring the existing GPT-5.6 regression test.
Wire up the full model-specific behavior for claude-opus-5: - RejectsTokenThinking: extend the adaptive-only Opus prefix set to include claude-opus-5 (and dated variants). Rename the set from the version-bound claudeOpus46To48Prefixes to adaptiveOnlyOpusPrefixes. - anthropicTopTierSupport: make Opus 5+ return xhigh+max, matching the Opus 4.7+ behavior. Uses claudeOpusSonnetVersion(major>=5) so future dated variants are recognized without further changes. - SupportsAdaptiveThinking: already correct via the version parser (major>=5 path); update doc comment to mention Opus 5. Tests: cover claude-opus-5 in TestRejectsTokenThinking (bare, dated, Bedrock), TestSupportedThinkingLevels (full xhigh+max ladder), TestAnthropicTopEfforts, TestSupportsFullThinkingDisplay, and the adaptive-superset-of-rejects invariant. Docs: add claude-opus-5 as the top entry in the Anthropic 'Available Models' table; update the concepts/models provider example; sync the --judge-model default (cmd/root/eval.go) and its two doc references from the old dated claude-opus-4-5 ID to anthropic/claude-opus-5.
aheritier
marked this pull request as ready for review
July 24, 2026 20:03
Sayt-0
approved these changes
Jul 24, 2026
krissetto
approved these changes
Jul 24, 2026
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.
Add support for claude-opus-5 (released 2026-07-24, 1M ctx, 128k output, full xhigh+max effort ladder).
Snapshot — refreshed via
go generate ./pkg/modelsdev/...; only anthropic delta is +claude-opus-5. Regression testTestEmbeddedSnapshotIncludesClaudeOpus5added.modelinfo —
RejectsTokenThinking: add claude-opus-5 to adaptive-only prefix set; renameclaudeOpus46To48Prefixes→adaptiveOnlyOpusPrefixes.anthropicTopTierSupport: Opus major>=5 → xhigh+max, matching Opus 4.7+. Sonnet 5 unaffected.Tests — claude-opus-5 covered in TestRejectsTokenThinking (bare, dated, Bedrock), TestSupportedThinkingLevels, TestAnthropicTopEfforts, TestSupportsFullThinkingDisplay, TestSupportsDeferredTools, superset invariant.
Docs — claude-opus-5 as top Available Models entry.
--judge-modeldefault updated toanthropic/claude-opus-5(deliberately chosen; flag for reviewer).