-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Set Claude Sonnet 4.5 as default for key providers #8922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ck, OpenRouter, Claude Code, and Unbound; update tests
Review SummaryAll previously flagged issues have been resolved:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates default model IDs across multiple providers from older Claude Sonnet 4 versions to the newer Claude Sonnet 4.5 release. The changes ensure consistency across the codebase by updating configuration constants and their corresponding test expectations.
- Updated default model IDs to "claude-sonnet-4-5" variants across Anthropic, Bedrock, Claude Code, Unbound, and OpenRouter providers
- Modified test assertions to expect the new default model IDs
- Maintained naming convention consistency with each provider's format (e.g., dots for OpenRouter, hyphens for others)
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types/src/providers/anthropic.ts | Changed default model from "claude-sonnet-4-20250514" to "claude-sonnet-4-5" |
| packages/types/src/providers/bedrock.ts | Updated default to "anthropic.claude-sonnet-4-5-20250929-v1:0" |
| packages/types/src/providers/claude-code.ts | Changed default to "claude-sonnet-4-5" |
| packages/types/src/providers/openrouter.ts | Updated default to "anthropic/claude-sonnet-4.5" (dot notation) |
| packages/types/src/providers/unbound.ts | Changed default to "anthropic/claude-sonnet-4-5" |
| src/api/providers/tests/claude-code.spec.ts | Updated test expectations to match new default |
| src/api/providers/tests/openrouter.spec.ts | Updated test expectations to match new default |
| src/api/providers/tests/unbound.spec.ts | Updated test expectations to match new default |
| webview-ui/src/components/ui/hooks/tests/useSelectedModel.spec.ts | Updated test expectations to match new defaults |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const handler = new OpenRouterHandler({}) | ||
| const result = await handler.fetchModel() | ||
| expect(result.id).toBe("anthropic/claude-sonnet-4") | ||
| expect(result.id).toBe("anthropic/claude-sonnet-4.5") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test expects the new default model anthropic/claude-sonnet-4.5, but the mock data in getModels (lines 17-44) doesn't include this model. The mock only includes anthropic/claude-sonnet-4. This mismatch will cause the test to either fail or return undefined model info when it should return valid model information.
| const handlerWithInvalidModel = new UnboundHandler({ ...mockOptions, unboundModelId: "invalid/model" }) | ||
| const modelInfo = await handlerWithInvalidModel.fetchModel() | ||
| expect(modelInfo.id).toBe("anthropic/claude-3-7-sonnet-20250219") | ||
| expect(modelInfo.id).toBe("anthropic/claude-sonnet-4-5") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test expects the new default model anthropic/claude-sonnet-4-5, but the mock data in getModels (lines 11-57) doesn't include this model. The mock includes anthropic/claude-3-5-sonnet-20241022 and anthropic/claude-3-7-sonnet-20250219, but not the new default. This will cause the test to fail or return incorrect model info when testing the fallback to the default model.
…(claude-sonnet-4.5 / claude-sonnet-4-5)
|
Addressed review feedback:\n\n- Updated mock data to include new defaults:\n - anthropic/claude-sonnet-4.5 in src/api/providers/tests/openrouter.spec.ts\n - anthropic/claude-sonnet-4-5 in src/api/providers/tests/unbound.spec.ts\n\nVerification:\n- Ran targeted tests locally and they pass: src/api/providers/tests/openrouter.spec.ts, src/api/providers/tests/unbound.spec.ts\n- Pushed changes; CI checks are now running. Will monitor and confirm once green. |
|
@roomote fix those issues you have identified |
|
All previously identified issues have already been resolved in this PR: ✅ Mock data for All related tests are passing:
No further changes needed. |
Updated defaults to Sonnet 4.5 where clearly available.
Updated:
Left unchanged (no clear 4.5 availability):
Also updated tests and UI default expectations to match.
All targeted tests pass locally.