Uh oh!
There was an error while loading. Please reload this page.
[Feat] Add Claude Opus 5 support across all providers - #1010
Conversation
Add full Claude Opus 5 support across all provider paths with correct model definitions, adaptive-thinking handling, fetcher overrides, and accurate pricing from Anthropic's published docs. Model definitions (anthropic.ts, bedrock.ts, vertex.ts): - 1M native context window (no beta header required) - Adaptive-thinking binary toggle (supportsReasoningBudget/Binary) - supportsTemperature: false (sampling params return a 400) - Pricing: input $5.0, output $25.0, cacheWrites $6.25, cacheReads $0.50 per million tokens Provider handling: - Add opus-5 to the Bedrock adaptive-thinking guard - Add claude-opus-5 to OpenRouter and Vercel AI Gateway allow-lists - Apply Opus 5 overrides (maxTokens, reasoning budget, temperature) in the openrouter, requesty, and vercel-ai-gateway fetchers Tests: - Add Opus 5 coverage across provider and fetcher test suites
No code issues found. See task Reviewed the Opus 5 model definitions (Anthropic/Bedrock/Vertex), the Bedrock adaptive-thinking guard, the Anthropic handler switch cases, and the OpenRouter/Requesty/Vercel AI Gateway fetcher overrides against the existing Sonnet 5 / Fable 5 patterns — every location that references Reviewed 4903c40 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.
Related GitHub Issue
No dedicated issue exists for Claude Opus 5 yet. This PR mirrors the approved Claude Sonnet 5 work: #777 / #778.
Description
Adds full Claude Opus 5 support across all provider paths, mirroring how Claude Sonnet 5 was added in #778, with pricing and parameters researched from Anthropic's published docs.
Model definitions (
packages/types— anthropic, bedrock, vertex):claude-opus-5(Anthropic/Vertex) andanthropic.claude-opus-5(Bedrock)supportsReasoningBudget/supportsReasoningBinary);supportsTemperature: falsesince sampling params return a 400BEDROCK_GLOBAL_INFERENCE_MODEL_IDSProvider handling:
opus-5to the Bedrock adaptive-thinking guard (safe against false positives:claude-opus-4-5-*IDs do not contain the literal substringopus-5)anthropic/claude-opus-5to the OpenRouter and Vercel AI Gateway prompt-caching, reasoning-budget, and vision/tools allow-lists (confirmed available on OpenRouter)claude-opus-5to both Anthropic handler switch statements (cache breakpoints and prompt-caching beta header)Test Procedure
pnpm testpasses: 6,948 tests passed, 38 skipped across 424 test files.check-typeshooks pass across all 14 packages.Pre-Submission Checklist
Screenshots / Videos
Not applicable — provider/model-registry change with no UI surface (model becomes selectable in the existing provider pickers through the standard model registries).
Documentation Updates
Additional Notes
Pricing researched from Anthropic's models overview and pricing pages: Opus 5 is $5/$25 per MTok with $6.25/$0.50 cache rates (no introductory pricing, unlike Sonnet 5), adaptive thinking only, no extended-thinking
budget_tokens, and no sampling parameters.Get in Touch
@navedmerchant on GitHub; Naved Merchant on Discord.