feat(provider): support per-provider Google credentials for Vertex AI#19931
feat(provider): support per-provider Google credentials for Vertex AI#19931major wants to merge 1 commit into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found related PRs that address similar authentication topics for Google Vertex AI: Potentially Related PRs:
These PRs touch on similar authentication concerns for Google Vertex AI providers, though they may have been merged or closed previously. However, PR #19931 is the current PR you're checking, and it appears to be the first to specifically address per-provider Google credentials with |
Signed-off-by: Major Hayden <major@mhtx.net>
da7ef1e to
fbef949
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #19930
Type of change
What does this PR do?
Passes
googleAuthOptionsfrom provider config through to the AI SDK for bothgoogle-vertexandgoogle-vertex-anthropic, so each provider can authenticatewith separate GCP credentials.
Changes to
google-vertexloader:googleAuthOptionsfrom config and spreads it into SDK optionsnew GoogleAuth(...)in the custom fetch for openai-compatible modelsgetApplicationDefault()togetClient()(backward-compatible,falls back to ADC when no explicit credentials given)
Changes to
google-vertex-anthropicloader:async () =>, silently ignoringall config options (
project,location, etc.)projectandlocation,matching the
google-vertexpatterngoogleAuthOptionsthrough to SDK optionsBoth changes are backward-compatible. When
googleAuthOptionsis absent, behavioris identical to before.
How did you verify your code works?
bun typecheckpasses (exit 0)bun test test/provider/provider.test.tspasses (73 pass, 0 fail) including3 new tests:
google-vertex-anthropic: respects config-level project and locationgoogle-vertex: passes googleAuthOptions to provider optionsgoogle-vertex-anthropic: passes googleAuthOptions to provider optionsScreenshots / recordings
N/A - no UI changes.
Checklist