feat(providers): add Claude Opus 4.8 model#4771
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Updates Reviewed by Cursor Bugbot for commit 1183424. Configure here. |
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — adds a new model entry and a two-line guard in a routing function, with no changes to existing paths. Both changed files are purely additive: the model definition in models.ts follows the exact same shape as Opus 4.7, and the two new pattern checks in supportsAdaptiveThinking() mirror the dual-format convention already used for every other model. No existing behaviour is altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[API Request with modelId] --> B{supportsAdaptiveThinking?}
B -- "includes opus-4-8 / opus-4.8\nincludes opus-4-7 / opus-4.7\nincludes opus-4-6 / opus-4.6\nincludes sonnet-4-6 / sonnet-4.6" --> C[thinking: adaptive\noutputConfig: effort=level]
B -- other models --> D{budgetTokens defined?}
D -- yes --> E[thinking: enabled\nbudget_tokens: N]
D -- no --> F[return null / no thinking]
Reviews (2): Last reviewed commit: "chore(providers): update buildThinkingCo..." | Re-trigger Greptile |
7cae182 to
1183424
Compare
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1183424. Configure here.
Summary
claude-opus-4-8to Anthropic provider models with $5/$0.50/$25 pricing, 1M context, 128k max output, adaptive thinking (effort: low/medium/high/xhigh/max, defaulthigh), andnativeStructuredOutputsrecommended: truefrom Opus 4.7 to Opus 4.8 (new flagship per Anthropic docs)supportsAdaptiveThinking()inanthropic/core.tsto matchopus-4-8— without this the request would route tobudget_tokens, which the Opus 4.8 API rejects with a 400Type of Change
Testing
Tested manually
Checklist