Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Dec 19, 2025

Summary

Adds support for the 1M context window beta feature on Vertex AI for Claude Sonnet 4 models. This feature extends the context window from 200K to 1 million tokens when enabled.

Changes

  • Add vertex1MContext boolean setting to provider-settings schema
  • Add VERTEX_1M_CONTEXT_MODEL_IDS constant listing supported models (claude-sonnet-4@20250514, claude-sonnet-4-5@20250929)
  • Add checkbox UI in Vertex settings component that appears only for supported models
  • Add i18n translations for all 18 locales

Important

Adds 1M context window beta support for Claude Sonnet 4 models on Vertex AI, including schema, UI, and translation updates.

  • Behavior:
    • Adds vertex1MContext boolean to provider-settings.ts for 1M context window beta.
    • Introduces VERTEX_1M_CONTEXT_MODEL_IDS in vertex.ts for supported models.
    • Updates VertexHandler in anthropic-vertex.ts to handle 1M context window.
  • UI:
    • Adds checkbox in Vertex.tsx for enabling 1M context window for supported models.
  • Tests:
    • Adds tests in anthropic-vertex.spec.ts to verify 1M context window functionality.
  • Translations:
    • Updates i18n files for 18 locales to include 1M context window descriptions.

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

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Dec 19, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 19, 2025

Oroocle Clock   See task on Roo Cloud

Update: the previously flagged issue is now resolved in the latest commit(s).

  • Wire vertex1MContext through to runtime Vertex handler so it actually enables the context-1m-2025-08-07 beta and updates model info/costing accordingly
Previous reviews

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

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 19, 2025
- Add tier pricing for Claude Sonnet 4 models with 1M context support
- Implement getModel() to return betas array when vertex1MContext enabled
- Update createMessage() to pass anthropic-beta header via requestOptions
- Add comprehensive tests for 1M context beta feature
- Update existing tests to handle the new requestOptions parameter

The vertex1MContext checkbox now properly enables the 1M token context
window for supported Vertex AI Claude models (claude-sonnet-4@20250514,
claude-sonnet-4-5@20250929) by passing the 'context-1m-2025-08-07' beta
header and updating the model pricing accordingly.
@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 Dec 19, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 19, 2025
@mrubens mrubens merged commit 3f1f8be into main Dec 19, 2025
16 checks passed
@mrubens mrubens deleted the feat/vertex-1m-context-beta branch December 19, 2025 17:24
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 19, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer 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.

4 participants