Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
engine.auth
There was a problem hiding this comment.
Pull request overview
Adds Gemini Vertex AI authentication through GCP Workload Identity Federation and AWF proxy routing.
Changes:
- Extends
engine.authwith GCP configuration. - Adds Vertex runtime, validation, proxy targeting, and failure detection.
- Documents and tests the new authentication path.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/secret_validation_test.go |
Tests Vertex configuration validation. |
pkg/workflow/gemini_engine.go |
Implements Vertex runtime behavior. |
pkg/workflow/gemini_engine_test.go |
Tests Gemini Vertex execution and routing. |
pkg/workflow/engine.go |
Adds GCP auth fields and environment mapping. |
pkg/workflow/engine_includes_test.go |
Tests imported Vertex auth configuration. |
pkg/workflow/engine_config_test.go |
Tests GCP auth parsing. |
pkg/workflow/engine_config_parser.go |
Parses GCP auth fields. |
pkg/workflow/engine_api_targets.go |
Resolves Vertex API targets. |
pkg/workflow/domains.go |
Adds Vertex domains to sanitization. |
pkg/workflow/awf_helpers_test.go |
Tests AWF Vertex targets. |
pkg/workflow/awf_config.go |
Emits Vertex proxy configuration. |
pkg/parser/schemas/main_workflow_schema.json |
Defines GCP auth schema fields. |
docs/src/content/docs/reference/engines.md |
Lists Vertex authentication support. |
docs/src/content/docs/reference/auth.mdx |
Documents Vertex OIDC configuration. |
docs/src/content/docs/introduction/how-they-work.mdx |
Updates Gemini authentication summary. |
actions/setup/js/handle_agent_failure.test.cjs |
Tests Vertex failure detection. |
actions/setup/js/handle_agent_failure.cjs |
Recognizes Vertex authentication failures. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 17/17 changed files
- Comments generated: 4
- Review effort level: Medium
| env["GOOGLE_API_KEY"] = geminiVertexAPIKeyPlaceholder | ||
| env["GOOGLE_VERTEX_BASE_URL"] = geminiVertexProxyURL |
| if auth := workflowData.EngineConfig.Auth; auth != nil && strings.TrimSpace(auth.GCPLocation) != "" { | ||
| target := strings.TrimSpace(auth.GCPLocation) + "-aiplatform.googleapis.com" | ||
| awfHelpersLog.Printf("Using regional Gemini Vertex API target: %s", target) | ||
| return target | ||
| } |
| if vertexTarget := GetGeminiVertexAPITarget(config.WorkflowData, config.EngineName); vertexTarget != "" { | ||
| awfConfigLog.Printf("API proxy: custom vertex target=%s", vertexTarget) | ||
| targets["vertex"] = &AWFAPITargetConfig{Host: vertexTarget} |
| var geminiLog = logger.New("workflow:gemini_engine") | ||
|
|
||
| const ( | ||
| geminiVertexProxyURL = "http://host.docker.internal:10004" |
|
@copilot resolve the merge conflicts on this branch. |
|
Hey ✅ Focused implementation — cleanly adds ✅ Comprehensive coverage — updates schema, config parsing, runtime behavior, error messaging, docs, and includes tests across multiple scenarios ✅ Well-documented — clear explanation in the PR body with concrete YAML examples showing the Vertex AI auth flow ✅ Tests in place — changes to ✅ Resolves #47053 — directly addresses the enterprise Vertex AI auth request This looks ready for review. Great job tackling both the auth layer and the proxy routing logic!
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot please run the Unresolved review feedback:
Please make the next maintainer decision explicit in your reply.
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in ca8849c by reverting the unsupported Gemini Vertex/OIDC path and its docs/tests. The original feature still depends on upstream |
|
@copilot please run the Unresolved review feedback:
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in 6759cbe. I restored the last incidental |
|
@copilot please run the Unresolved review feedback:
|
Gemini workflows only supported static
GEMINI_API_KEYauth, which blocked the recommended enterprise path via Vertex AI. This change adds a Gemini-specificengine.authflow aligned with the existing Claude auth model and routes Gemini through AWF’s existing GCP/Vertex proxy contract.Gemini
engine.authsupportprovider: gcpworkload-identity-providerservice-accountscopeprojectlocationGemini runtime switch to Vertex mode
engine.auth.type: github-oidc+provider: gcpas Gemini Vertex mode.GEMINI_API_KEYGOOGLE_GENAI_USE_VERTEXAI=trueGOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATIONValidation and UX
GEMINI_API_KEY.AWF target/proxy wiring
Docs
Example: