Skip to content

feat: support Claude Opus 5#3830

Merged
Sayt-0 merged 2 commits into
mainfrom
feat/claude-opus-5
Jul 24, 2026
Merged

feat: support Claude Opus 5#3830
Sayt-0 merged 2 commits into
mainfrom
feat/claude-opus-5

Conversation

@aheritier

Copy link
Copy Markdown
Contributor

🤖 Automated implementer agentthis comment was posted by the implementer bot from Docker Agentic Platform, not by a human developer

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 test TestEmbeddedSnapshotIncludesClaudeOpus5 added.

modelinfoRejectsTokenThinking: add claude-opus-5 to adaptive-only prefix set; rename claudeOpus46To48PrefixesadaptiveOnlyOpusPrefixes. 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-model default updated to anthropic/claude-opus-5 (deliberately chosen; flag for reviewer).

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 aheritier added area/cli CLI commands, flags, output formatting area/docs Documentation changes area/models LLM model integrations and model providers kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Jul 24, 2026
@aheritier
aheritier marked this pull request as ready for review July 24, 2026 20:03
@aheritier
aheritier requested a review from a team as a code owner July 24, 2026 20:03
@Sayt-0
Sayt-0 merged commit e9c601d into main Jul 24, 2026
21 checks passed
@Sayt-0
Sayt-0 deleted the feat/claude-opus-5 branch July 24, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli CLI commands, flags, output formatting area/docs Documentation changes area/models LLM model integrations and model providers kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants