Skip to content

Conversation

@ashktn
Copy link
Contributor

@ashktn ashktn commented Feb 28, 2025

Context

This PR adds support for the Gemini model family on Vertex AI for users who want to use Gemini with their GCP accounts

Implementation

Screenshots

image

image

How to Test

  • Open Provider Settings
  • Select GCP Vertex AI
  • enter a GCP Project ID, GCP Region
  • Select any of the gemini models
  • Start a new task and ask a question

Get in Touch

@ashktn on the discord server


Important

Adds support for Gemini models on Vertex AI, including configurations, tests, and model information.

  • Behavior:
    • Adds support for Gemini models in VertexHandler in vertex.ts, allowing users to use Gemini with GCP accounts.
    • Introduces createGeminiMessage() and completePromptGemini() methods for handling Gemini model interactions.
    • Updates createMessage() and completePrompt() to handle both Claude and Gemini models.
  • Dependencies:
    • Adds @google-cloud/vertexai package to package.json.
  • Models:
    • Adds Gemini models to vertexModels in api.ts with token pricing and capabilities.
  • Tests:
    • Adds tests for Gemini model support in vertex.test.ts.
    • Adds vertex-gemini-format.test.ts to test message conversion for Gemini models.
  • Transformations:
    • Adds convertAnthropicMessageToGemini() in vertex-gemini-format.ts for message conversion.

This description was created by Ellipsis for d30b5f82fc6d8bce9f394e13f8cfc2b7b04532ce. It will automatically update as commits are pushed.

@ashktn ashktn requested review from cte and mrubens as code owners February 28, 2025 23:47
@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2025

🦋 Changeset detected

Latest commit: 4caa492

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Feb 28, 2025
@ashktn ashktn force-pushed the feat/vertex-gemini branch from d30b5f8 to e882645 Compare February 28, 2025 23:54
@ashktn ashktn force-pushed the feat/vertex-gemini branch from e882645 to 4caa492 Compare February 28, 2025 23:59
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 1, 2025
@mrubens mrubens merged commit 8c8210e into RooCodeInc:main Mar 1, 2025
11 checks passed
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:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants