You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Support per-provider Google credentials for Vertex AI #19930
Both google-vertex and google-vertex-anthropic currently resolve authentication from Application Default Credentials (ADC). There is no way to configure separate GCP credentials per provider.
This matters when Gemini and Anthropic models are available under different GCP projects or service accounts. For example, one account has Gemini access but not Anthropic, and a second account has Anthropic access (via Model Garden) but not Gemini.
Proposed change: Pass the googleAuthOptions field from provider.options through to the AI SDK. The @ai-sdk/google-vertex package already accepts this field natively (it maps to google-auth-library's GoogleAuthOptions), so no SDK changes are needed.
The change is fully backward-compatible: when googleAuthOptions is absent, both providers continue to use ADC exactly as they do today.
Secondary fix: google-vertex-anthropic's custom loader currently ignores provider.options entirely (the function signature is async () => instead of async (provider) =>). This means config-level project/location values are silently dropped. The proposed change fixes this as well.
Activity
github-actions commentedon Mar 29, 2026
This issue might be related to existing issues. Please check:
google-vertex-anthropicviagoogleAuthOptions/bearer token passthrough; your proposal may complement or supersede parts of this.google-vertexandgoogle-vertex-anthropicproviders — same underlying need for isolated per-provider credentials.github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.