Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Sep 15, 2025

Summary

This PR adds support for Claude 4.5 Sonnet model across all providers that support Claude models.

Changes

Anthropic Provider

  • Added claude-4.5-sonnet model configuration
  • Added support for 1M context beta flag for Claude 4.5 Sonnet

Claude Code Provider

  • Added claude-4.5-sonnet (imports from anthropic)

AWS Bedrock Provider

  • Added anthropic.claude-4.5-sonnet-v1:0

Google Vertex AI Provider

  • Added claude-4.5-sonnet

Testing

  • Added comprehensive test coverage for new model
  • All existing tests pass

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
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Sep 15, 2025
Copy link
Contributor

@roomote roomote bot left a 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(),
Copy link
Contributor

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.
Copy link
Contributor

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,
Copy link
Contributor

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", () => {
Copy link
Contributor

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": {
Copy link
Contributor

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.

@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@daniel-lxs daniel-lxs reopened this Sep 29, 2025
@github-project-automation github-project-automation bot moved this from Done to Triage in Roo Code Roadmap Sep 29, 2025
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Sep 29, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Sep 29, 2025
@daniel-lxs daniel-lxs marked this pull request as ready for review September 29, 2025 17:10
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 29, 2025
@daniel-lxs daniel-lxs changed the title feat: add Claude 4.5 Sonnet and Opus models across all providers feat: add Claude 4.5 Sonnet model across all providers Sep 29, 2025
@dosubot dosubot bot added the enhancement New feature or request label Sep 29, 2025
@daniel-lxs daniel-lxs closed this Sep 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 29, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 29, 2025
@daniel-lxs daniel-lxs deleted the feat/add-claude-4.5-models branch September 29, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants