Draft
feat(gemini): add Google Vertex AI Workload Identity Federation auth#48185
Conversation
Contributor
🤖 PR Triage
No files changed yet. Defer until the agent finalizes the implementation.
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new authentication methods to Gemini Engine
feat(gemini): add Google Vertex AI Workload Identity Federation auth
Jul 26, 2026
This comment has been minimized.
This comment has been minimized.
Contributor
|
Excellent work! 🤖 This PR cleanly adds Google Vertex AI Workload Identity Federation support to the Gemini engine, aligned with the existing Anthropic WIF pattern. What's great:
Implementation highlights:
This PR is ready for review and merge. 🎉
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enterprise Gemini workloads on Vertex AI / Gemini Enterprise Agent Platform require keyless authentication via Google Cloud WIF rather than a static
GEMINI_API_KEY. This addsprovider: googlesupport toengine.auth, aligned with the existing Anthropic WIF pattern for Claude.Changes
Core auth plumbing
EngineAuthConfig— addsGoogleWorkloadIdentityProvider,GoogleServiceAccount,GoogleProject,GoogleLocationfieldsapplyEngineAuthEnv— emitsAWF_AUTH_GOOGLE_WORKLOAD_IDENTITY_PROVIDER,AWF_AUTH_GOOGLE_SERVICE_ACCOUNT,AWF_AUTH_GOOGLE_PROJECT,AWF_AUTH_GOOGLE_LOCATIONfor the AWF api-proxy sidecarengine_config_parser— parsesworkload-identity-provider,service-account,project,locationfromengine.authGemini engine
isGeminiVertexWIF— detectstype: github-oidc+provider: googleGetRequiredSecretNames— skipsGEMINI_API_KEYwhen WIF is activeGetSecretValidationStep— returns empty step (no static key to validate)GetExecutionSteps— setsGOOGLE_GENAI_USE_VERTEXAI=1,GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION; omitsGEMINI_API_KEYSchema & docs
engine.authGoogle WIF fieldsauth.mdxadds a full Google WIF section with field table and emitted env varsengines.mdGemini row now lists the keyless alternativeUsage
When active,
GEMINI_API_KEYis not required and the Gemini CLI is switched to Vertex AI backend viaGOOGLE_GENAI_USE_VERTEXAI=1.