Skip to content

Comments

Add Anthropic Claude Sonnet 4.6 support across providers#11509

Merged
hannesrudolph merged 2 commits intoRooCodeInc:mainfrom
PeterDaveHello:feat/claude-sonnet-4-6-support
Feb 17, 2026
Merged

Add Anthropic Claude Sonnet 4.6 support across providers#11509
hannesrudolph merged 2 commits intoRooCodeInc:mainfrom
PeterDaveHello:feat/claude-sonnet-4-6-support

Conversation

@PeterDaveHello
Copy link
Contributor

@PeterDaveHello PeterDaveHello commented Feb 17, 2026

Description

This PR adds support for Claude Sonnet 4.6 across Roo Code providers and UI model-selection flows.

Key changes:

  • Added Sonnet 4.6 model metadata in @roo-code/types for:
    • Anthropic (claude-sonnet-4-6)
    • Bedrock (anthropic.claude-sonnet-4-6-20260114-v1:0)
    • Vertex (claude-sonnet-4-6@20260114)
    • OpenRouter (anthropic/claude-sonnet-4.6)
    • Vercel AI Gateway (anthropic/claude-sonnet-4.6)
  • Added Sonnet 4.6 handling in providers:
    • Anthropic handler support and 64K output token handling
    • Bedrock 1M context/global inference model lists
    • Vertex 1M context model list
    • OpenRouter fetcher max-token override for Sonnet 4.6
  • Updated webview settings/model selection:
    • Anthropic 1M beta messaging now recognizes Sonnet 4.6
    • useSelectedModel applies Sonnet 4.6 1M pricing tier for Anthropic when 1M context is enabled
  • Added/updated tests for Anthropic, Bedrock, Vertex, OpenRouter fetcher, and useSelectedModel.
  • Added a roo-cline patch changeset for release automation.

Test Procedure

  1. Run provider tests:
    • pnpm --filter roo-cline exec vitest run api/providers/__tests__/anthropic.spec.ts api/providers/fetchers/__tests__/openrouter.spec.ts
    • pnpm --filter roo-cline exec vitest run api/providers/__tests__/bedrock.spec.ts api/providers/__tests__/anthropic-vertex.spec.ts
  2. Run webview hook test:
    • pnpm --filter @roo-code/vscode-webview exec vitest run src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
  3. Run type checks:
    • pnpm --filter @roo-code/types check-types
    • pnpm --filter roo-cline check-types
    • pnpm --filter @roo-code/vscode-webview check-types
  4. Pre-push hook check:
    • pnpm run check-types passed in pre-push (14 successful, 14 total).

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.
  • Yes, documentation updates are required. (Please describe what needs to be updated or link to a PR in the docs repository).

Additional Notes

  • Bedrock 1M tier pricing display parity in the model-selection hook was not expanded in this PR beyond Sonnet 4.6 Anthropic selection logic.
  • The known Bedrock 1M display parity behavior for Opus 4.6 was treated as pre-existing scope and left unchanged.

Start a new Roo Code Cloud session on this branch

Add model definitions and capability flags for Anthropic, Bedrock,
Vertex, OpenRouter, and Vercel AI Gateway.

Update Anthropic handler and UI model selection logic to support Claude
Sonnet 4.6 1M context behavior and tier pricing.

Add focused tests for provider handlers, fetchers, and selected-model
hooks.

Keep Bedrock UI tier pricing parity as-is because this is a
pre-existing issue for Opus 4.6 and will be handled separately.

Reference:
- https://www.anthropic.com/news/claude-sonnet-4-6
- https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Feb 17, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 17, 2026

Rooviewer Clock   See task

Reviewed the incremental change (deletion of .changeset/soft-carpets-hunt.md). No issues found. The prior review of all 15 changed files remains valid.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 17, 2026
@hannesrudolph
Copy link
Collaborator

@roomote do we just need to rerun the failing CI or did we change somethign that would cause it to fail?

@roomote
Copy link
Contributor

roomote bot commented Feb 17, 2026

Fixaroo Clock   See task

The failing CI (platform-unit-test (windows-latest)) is a transient Windows file-locking issue, not caused by this PR's changes. The error is:

EBUSY: resource busy or locked, copyfile '...\vscode-material-icons\generated\icons\arduino.svg' -> '...\assets\vscode-material-icons\icons\arduino.svg'

This happens during the esbuild bundle step when Windows holds a file lock during concurrent copy operations -- a known flaky behavior on Windows CI runners. None of the files changed in this PR touch the build system or file-copy logic.

Just rerunning the failing CI job should resolve it. No code changes needed.

@hannesrudolph hannesrudolph merged commit 90e2451 into RooCodeInc:main Feb 17, 2026
19 of 20 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 17, 2026
@PeterDaveHello PeterDaveHello deleted the feat/claude-sonnet-4-6-support branch February 17, 2026 19:29
@anguslees
Copy link

Is this bedrock model ID correct?

I think https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html says anthropic.claude-sonnet-4-6

@o-nix
Copy link

o-nix commented Feb 18, 2026

@anguslees is right, the current Bedrock ID does not work

@PeterDaveHello
Copy link
Contributor Author

Oops, somehow a wrong ID used here, sorry about that, let me fix it.

PeterDaveHello added a commit to PeterDaveHello/Roo-Code that referenced this pull request Feb 18, 2026
Replace the incorrect Sonnet 4.6 Bedrock ID with the AWS-supported
model ID in the model registry and Bedrock capability lists.

Remove references to the deprecated dated ID and update Bedrock
tests to validate the corrected Sonnet 4.6 identifier.
@PeterDaveHello
Copy link
Contributor Author

A PR to fix the wrong ID was sent here: #11569

hannesrudolph pushed a commit that referenced this pull request Feb 18, 2026
Replace the incorrect Sonnet 4.6 Bedrock ID with the AWS-supported
model ID in the model registry and Bedrock capability lists.

Remove references to the deprecated dated ID and update Bedrock
tests to validate the corrected Sonnet 4.6 identifier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants