Add Claude Opus 4.5, Opus 4.6, and Sonnet 4.6 to model catalogue#974
Add Claude Opus 4.5, Opus 4.6, and Sonnet 4.6 to model catalogue#974manueltarouca wants to merge 1 commit intoget-convex:mainfrom
Conversation
Add three new Anthropic models to the model selector: - Claude 4.5 Opus (claude-opus-4-5) - Claude 4.6 Opus (claude-opus-4-6) - Claude 4.6 Sonnet (claude-sonnet-4-6) All three use the Anthropic provider directly (no Bedrock fallback), do not require a user API key, and share the same 24576 max token output limit as existing Claude 4.x models.
|
@manueltarouca is attempting to deploy a commit to the Convex Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds three new Anthropic Claude models to the app’s model catalogue / selector and wires them through to backend model slugs, plus adds corresponding eval entries in the test-kitchen.
Changes:
- Extend
ModelSelectionand the model selector catalogue to include Claude 4.5 Opus, Claude 4.6 Opus, and Claude 4.6 Sonnet. - Map the new UI selections to Anthropic provider + correct
modelChoiceslugs in chat request construction. - Update Anthropic max-token logic for the new modelChoice slugs and add Braintrust eval configs for them.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test-kitchen/initialGeneration.eval.ts |
Adds eval runs for the three new Anthropic model slugs. |
app/utils/constants.ts |
Extends the ModelSelection union with the new Claude variants. |
app/lib/common/apiKey.ts |
Includes the new model selections in the Anthropic API-key presence check. |
app/lib/.server/llm/provider.ts |
Extends anthropicMaxTokens to treat the new modelChoice slugs as 24,576 max output tokens. |
app/components/chat/ModelSelector.tsx |
Adds the three new models to the selector catalogue with provider: 'anthropic'. |
app/components/chat/Chat.tsx |
Maps new model selections to the intended Anthropic modelChoice slugs and provider. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| modelChoice = 'claude-opus-4-5'; | ||
| } else if (modelSelection === 'claude-4.6-opus') { | ||
| modelProvider = 'Anthropic'; | ||
| modelChoice = 'claude-opus-4-6'; | ||
| } else if (modelSelection === 'claude-4.6-sonnet') { | ||
| modelProvider = 'Anthropic'; | ||
| modelChoice = 'claude-sonnet-4-6'; |
There was a problem hiding this comment.
The new model selections set modelChoice to values like claude-opus-4-5 / claude-opus-4-6 / claude-sonnet-4-6. The server chat action currently treats any modelChoice other than claude-sonnet-4-0, claude-sonnet-4-5, or gpt-5 as requiring a user API key and will return a 402 missing-api-key when none is set. As a result, these new models will fail for users without API keys despite requireKey: false. Update the backend allowlist (and the modelChoice passthrough logic) to include these new Claude modelChoice slugs so they can use the default Anthropic key as intended.
| modelChoice = 'claude-opus-4-5'; | |
| } else if (modelSelection === 'claude-4.6-opus') { | |
| modelProvider = 'Anthropic'; | |
| modelChoice = 'claude-opus-4-6'; | |
| } else if (modelSelection === 'claude-4.6-sonnet') { | |
| modelProvider = 'Anthropic'; | |
| modelChoice = 'claude-sonnet-4-6'; | |
| // Use an allowlisted Anthropic modelChoice so the default key can be used. | |
| modelChoice = 'claude-sonnet-4-5'; | |
| } else if (modelSelection === 'claude-4.6-opus') { | |
| modelProvider = 'Anthropic'; | |
| // Use an allowlisted Anthropic modelChoice so the default key can be used. | |
| modelChoice = 'claude-sonnet-4-5'; | |
| } else if (modelSelection === 'claude-4.6-sonnet') { | |
| modelProvider = 'Anthropic'; | |
| // Use an allowlisted Anthropic modelChoice so the default key can be used. | |
| modelChoice = 'claude-sonnet-4-5'; |
Summary
Test plan
pnpm run typecheckpasses (exhaustiveneverchecks confirm all switch/map sites are covered)pnpm run lint:apppassespnpm run testpasses (108/108 tests)modelChoiceslug to the backend