Skip to content

Conversation

@eonghk
Copy link
Contributor

@eonghk eonghk commented Mar 5, 2025

Context

This pull request introduces credential-based authentication for Vertex AI, enabling users to easily switch between Google Cloud accounts.

  • Simplified Account Switching:
    Users working across multiple Google Cloud projects can now seamlessly switch accounts without relying solely on Application Default Credentials (ADC). This eliminates the need for complex ADC management when using various profiles.

  • Enhanced Flexibility:
    This feature benefits users who may not have the Google Cloud CLI installed or prefer direct credential management.

Implementation

  • Added configuration options for Vertex AI authentication, allowing users to provide credentials through:
    • Directly pasting the JSON content of a service account key.
    • Specifying the file path to a service account key file (supporting JSON and other formats).
  • Ensured compatibility with existing providers, maintaining their current functionality.
  • Verified that Gemini models are also compatible with the new credential authentication method.

Screenshots

After:

image

How to Test

  • Ensure the Vertex AI API is enabled for your Google Cloud project.

  • Verify that the desired Claude models are accessible.

  • Create a new service account with the necessary Vertex AI permissions.

  • Generate a service account key (JSON format recommended). Refer to the Google Workspace documentation for guidance: https://developers.google.com/workspace/guides/create-credentials?hl=en#service-account

  • In the Vertex AI settings, paste the JSON content of the service account key into the "Google Cloud Credentials" field, or provide the file path to 'Google Cloud Key File Path' field.

  • Execute a prompt to confirm successful authentication and model interaction.

Get in Touch

For any questions or feedback, please reply to this pull request or reach out to Eong on the Discord channel.


Important

Add credential-based authentication for Google Vertex AI, allowing account switching using JSON credentials or key files, with updates to vertex.ts, ClineProvider.ts, and api.ts.

  • Authentication:
    • Adds credential-based authentication for Google Vertex AI in vertex.ts using JSON credentials or key files.
    • Updates ClineProvider.ts to handle new authentication options vertexJsonCredentials and vertexKeyFile.
  • Configuration:
    • Adds vertexJsonCredentials and vertexKeyFile to ApiHandlerOptions in api.ts.
    • Updates ApiOptions.tsx to include input fields for Google Cloud credentials and key file path.
  • Compatibility:
    • Ensures compatibility with existing providers and maintains current functionality.
    • Verifies Gemini models compatibility with new authentication method.

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

@eonghk eonghk requested review from cte and mrubens as code owners March 5, 2025 12:13
@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: e3ffd13

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 Patch

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:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Mar 5, 2025
@hannesrudolph hannesrudolph moved this to To triage in Roo Code Roadmap Mar 5, 2025
@hannesrudolph hannesrudolph moved this from To triage to PR - Needs Approval in Roo Code Roadmap Mar 6, 2025
@eonghk
Copy link
Contributor Author

eonghk commented Mar 6, 2025

@mrubens @cte This is really important for my whole team to be able to use it. Could we get this prioritized?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 6, 2025
@mrubens mrubens merged commit 70a88ae into RooCodeInc:main Mar 6, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from PR [Unverified] to Done in Roo Code Roadmap Mar 6, 2025
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
…ni-2-flash-thinking-model-01-21

Feat/add gemini 2 flash thinking model 01 21
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants