Skip to content

Conversation

@plucked
Copy link

@plucked plucked commented May 22, 2025

Related GitHub Issue

Closes: #3842

Description

Claude 4 models are released and this PR is adding them to the list of VertexAI models.
Blog Post by Anthropic: https://www.anthropic.com/news/claude-4

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

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.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Does this PR necessitate updates to user-facing documentation?

  • 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

Get in Touch


Important

Add Claude 4 models to Vertex AI specs in src/shared/api.ts, including claude-sonnet-4 and claude-opus-4 with detailed attributes and pricing.

  • Models:
    • Added claude-sonnet-4@20250514:thinking and claude-sonnet-4@20250514 to vertexModels in src/shared/api.ts.
    • Added claude-opus-4@20250514:thinking and claude-opus-4@20250514 to vertexModels in src/shared/api.ts.
  • Attributes:
    • Models support maxTokens, contextWindow, supportsImages, supportsComputerUse, supportsPromptCache.
    • Pricing details include inputPrice, outputPrice, cacheWritesPrice, cacheReadsPrice.

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

thinking: true,
},
"claude-opus-4@20250514": {
maxTokens: 32_000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we still want this many max tokens for the non-thinking version?

Copy link
Author

Choose a reason for hiding this comment

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

Updated it here as well

thinking: true,
},
"claude-sonnet-4@20250514": {
maxTokens: 64_000,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here - maybe we should make this 8192 like 3.7

Copy link
Author

Choose a reason for hiding this comment

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

will do

Copy link
Author

Choose a reason for hiding this comment

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

I updated it to 8192, you were right, that value is more reasonable

@plucked
Copy link
Author

plucked commented May 22, 2025

Here are screenshots as proof of working
image
image

@plucked
Copy link
Author

plucked commented May 22, 2025

looks like a similar PR was merged, will close this

@plucked plucked closed this May 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 22, 2025
@mrubens
Copy link
Collaborator

mrubens commented May 22, 2025

Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[VertexAI] Add Claude Opus 4 and Claude Sonnet 4 Models

2 participants