-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: add Claude 4.5 Sonnet model across all providers #8007
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
Adds support for Z.ai's coding plan subscription tiers: - International Coding Plan - China Coding Plan Pulls changes from downstream PR Kilo-Org/kilocode#2402
- Added claude-sonnet-4-5-20250514 and claude-opus-4-5-20250514 to Anthropic provider - Added same models to claude-code provider (imports from anthropic) - Added anthropic.claude-sonnet-4-5-20250514-v1:0 and anthropic.claude-opus-4-5-20250514-v1:0 to Bedrock - Added claude-sonnet-4-5@20250514 and claude-opus-4-5@20250514 to Vertex AI - Updated provider implementations to support new models - Added support for 1M context beta flag for Claude 4.5 Sonnet - Added comprehensive test coverage for new models
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.
Thank you for your contribution! I've reviewed the changes and found some issues that need attention before this can be merged.
| const zaiSchema = apiModelIdProviderModelSchema.extend({ | ||
| zaiApiKey: z.string().optional(), | ||
| zaiApiLine: z.union([z.literal("china"), z.literal("international")]).optional(), | ||
| zaiApiLine: zaiApiLineSchema.optional(), |
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 file contains unrelated changes to the ZAi provider that should be in a separate PR. The ZaiApiLine enum and related changes are not related to adding Claude 4.5 models. Could we move these changes to a separate PR to keep this one focused?
| ], | ||
| }, | ||
| "claude-opus-4-5-20250514": { | ||
| maxTokens: 32_000, // Overridden to 8k if `enableReasoningEffort` is false. |
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.
Claude 4.5 Opus has maxTokens of 32,000 here, but in bedrock.ts and vertex.ts it's only 8,192. Could we document why these values differ across providers, or is this a configuration error that needs to be fixed?
| cachableFields: ["system"], | ||
| }, | ||
| "anthropic.claude-sonnet-4-5-20250514-v1:0": { | ||
| maxTokens: 8192, |
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.
The maxTokens value for Claude 4.5 models is 8,192 here but 64,000/32,000 in the anthropic.ts file. Is this intentional due to Bedrock limitations, or should these values be aligned?
| expect(result.temperature).toBe(0) | ||
| }) | ||
|
|
||
| it("should handle Claude 4.5 Sonnet model correctly", () => { |
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.
Good test coverage for the Anthropic provider! However, could we also add test coverage for the other providers (Bedrock, Claude Code, Vertex) that received the new Claude 4.5 models? This would ensure all integrations work correctly.
| } | ||
|
|
||
| export const claudeCodeModels = { | ||
| "claude-sonnet-4-5-20250514": { |
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.
Since the Claude 4.5 model configurations are duplicated across multiple providers with mostly identical settings, have you considered creating a shared configuration object? This could reduce duplication and make future updates easier to maintain.
Summary
This PR adds support for Claude 4.5 Sonnet model across all providers that support Claude models.
Changes
Anthropic Provider
claude-4.5-sonnetmodel configurationClaude Code Provider
claude-4.5-sonnet(imports from anthropic)AWS Bedrock Provider
anthropic.claude-4.5-sonnet-v1:0Google Vertex AI Provider
claude-4.5-sonnetTesting