VertexAI: Add service account key authentication support #532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this does
This pull request adds support for authenticating to Google Vertex AI using a Service Account JSON key in addition to the existing Application Default Credentials (ADC) method. It updates both the documentation and the implementation to allow users to provide a Service Account key for Vertex AI authentication, improving flexibility and compatibility with Google Cloud best practices.
Vertex AI Authentication Enhancements:
vertexai_service_account_keyto theRubyLLMconfiguration, allowing users to specify a Service Account JSON key as a string for Vertex AI authentication. [1] [2] [3]Documentation Updates:
vertexai_service_account_keyoption, how authentication works, and Google Cloud’s recommendations regarding API keys and Service Accounts.Test/Spec Configuration:
vertexai_service_account_key, ensuring test environments can utilize the new authentication method.Type of change
Scope check
Quality check
overcommit --installand all hooks passbundle exec rake vcr:record[provider_name]bundle exec rspecmodels.json,aliases.json)API changes
Related issues
None.