Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Sep 29, 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

Notes

This is a clean PR with only the Claude 4.5 Sonnet model additions, without any unrelated changes.


Important

Add Claude 4.5 Sonnet model support across providers with testing and 1M context beta flag.

  • Providers:
    • Added claude-4.5-sonnet model to anthropic.ts, bedrock.ts, claude-code.ts, openrouter.ts, and vertex.ts.
    • Supports 1M context beta flag in anthropic.ts and Anthropic.tsx.
  • Testing:
    • Added tests for claude-4.5-sonnet in anthropic.spec.ts.
    • Updated openrouter.spec.ts to exclude claude-4.5-sonnet from unsupported models.
  • Misc:
    • Updated AnthropicHandler in anthropic.ts to handle new model and beta flag.

This description was created by Ellipsis for ca968a1. You can customize this summary. It will automatically update as commits are pushed.

- Added claude-4.5-sonnet to Anthropic provider with 1M context beta support
- Added claude-4.5-sonnet to Claude Code provider
- Added anthropic.claude-4.5-sonnet-v1:0 to AWS Bedrock provider
- Added claude-4.5-sonnet to Google Vertex AI provider
- Added comprehensive test coverage for the new model
- Updated UI to support 1M context beta flag for Claude 4.5 Sonnet
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Sep 29, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Sep 29, 2025
@mrkmg
Copy link

mrkmg commented Sep 29, 2025

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 29, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 29, 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.

I found some issues that need attention. Please see inline comments for details.

apiModelId: "claude-4.5-sonnet",
anthropicBeta1MContext: true,
})
const model = handler.getModel()
Copy link
Contributor

Choose a reason for hiding this comment

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

[P2] Strengthen the 1M-context assertions to validate cache pricing overrides as well. Since getModel() applies the first tier (contextWindow, inputPrice, outputPrice, cacheWritesPrice, cacheReadsPrice), consider also asserting cacheWritesPrice and cacheReadsPrice after enabling anthropicBeta1MContext to catch regressions in tier merging.

// Check if the current model supports 1M context beta
const supports1MContextBeta = selectedModel?.id === "claude-sonnet-4-20250514"
const supports1MContextBeta =
selectedModel?.id === "claude-sonnet-4-20250514" || selectedModel?.id === "claude-4.5-sonnet"
Copy link
Contributor

Choose a reason for hiding this comment

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

[P3] Avoid hardcoding model IDs for showing the 1M context beta toggle. Derive this from the presence of a tier with contextWindow >= 1_000_000 on the selected model to keep the UI resilient to future model IDs.

Suggested change
selectedModel?.id === "claude-sonnet-4-20250514" || selectedModel?.id === "claude-4.5-sonnet"
const supports1MContextBeta = !!selectedModel?.info?.tiers?.some(t => (t.contextWindow ?? 0) >= 1_000_000)

@mrubens mrubens merged commit 6a91385 into main Sep 29, 2025
7 of 9 checks passed
@mrubens mrubens deleted the feat/add-claude-4.5-sonnet branch September 29, 2025 18:04
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Sep 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 29, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Sep 30, 2025
* fix: identify mcp and slash command config path in multiple folder workspace (RooCodeInc#6904)

* fix: resolve CI e2e test ETIMEDOUT errors when downloading VS Code (RooCodeInc#7583)

* fix: Tackling Race/State condition issue by Changing the Code Design for Gemini Grounding Sources (RooCodeInc#7434)

Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* fix: preserve context by retrying with full conversation on invalid previous_response_id (RooCodeInc#7714)

* chore: add changeset for v3.26.8 (RooCodeInc#7715)

* feat(checkpoints): create checkpoint when user sends a message (RooCodeInc#7713)

* feat(checkpoints): create checkpoint on user message send

* fix(checkpoints): suppress implicit user-message checkpoint row; keep current checkpoint updated without a chat row

* Fix checkpoint suppression for user messages

- Propagate suppressMessage flag through event chain properly
- Update ChatView to check checkpoint metadata for suppressMessage flag
- Ensure checkpoint messages are created but not rendered when suppressed
- Fix bug where checkpointSave(false) should have been checkpointSave(true)

* fix: only create checkpoint on user message when files have changed

- Changed allowEmpty from true to false in checkpointSave call
- Checkpoints will now only be created when there are actual file changes
- This avoids creating empty commits in the shadow git repository

* test: update checkpoint test to include suppressMessage parameter

- Fixed test expectation to match the new function signature
- saveCheckpoint now expects both allowEmpty and suppressMessage parameters

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Hannes Rudolph <[email protected]>
Co-authored-by: Daniel Riccio <[email protected]>

* Bump to 3.27.0 (RooCodeInc#7719)

* Changeset version bump (RooCodeInc#7716)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: update DeepSeek pricing to new unified rates effective Sept 5, 2025 (RooCodeInc#7687)

- Updated deepseek-chat pricing: $0.56 input (cache miss), $0.07 (cache hit), $1.68 output
- Updated deepseek-reasoner pricing: same unified rates as deepseek-chat
- Both models now have identical pricing as per DeepSeek announcement
- Pricing takes effect at 16:00 UTC, Sept 5th, 2025

Fixes RooCodeInc#7685

Co-authored-by: Roo Code <[email protected]>

* feat: replace cloud waitlist ad with direct Cloud link in navigation (RooCodeInc#7742)

Co-authored-by: Roo Code <[email protected]>

* feat: show dash instead of zero for missing data on evals page (RooCodeInc#7748)

Co-authored-by: Roo Code <[email protected]>

* Feature/update vertex ai models and regions (