Skip to content

Add Claude Opus 4.5, Opus 4.6, and Sonnet 4.6 to model catalogue#974

Open
manueltarouca wants to merge 1 commit intoget-convex:mainfrom
manueltarouca:add-claude-opus-and-sonnet-4.6
Open

Add Claude Opus 4.5, Opus 4.6, and Sonnet 4.6 to model catalogue#974
manueltarouca wants to merge 1 commit intoget-convex:mainfrom
manueltarouca:add-claude-opus-and-sonnet-4.6

Conversation

@manueltarouca
Copy link

Summary

  • Adds three new Anthropic models to the model selector: Claude 4.5 Opus, Claude 4.6 Opus, and Claude 4.6 Sonnet
  • 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
  • Includes eval configs for all three new models in the test-kitchen

Test plan

  • pnpm run typecheck passes (exhaustive never checks confirm all switch/map sites are covered)
  • pnpm run lint:app passes
  • pnpm run test passes (108/108 tests)
  • Verify new models appear in the model selector dropdown
  • Verify selecting each new model sends the correct modelChoice slug to the backend

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.
Copilot AI review requested due to automatic review settings March 2, 2026 20:30
@vercel
Copy link

vercel bot commented Mar 2, 2026

@manueltarouca is attempting to deploy a commit to the Convex Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ModelSelection and 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 modelChoice slugs 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.

Comment on lines +318 to +324
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';
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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';

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants