feat(utils): default Vertex project and location from GCP metadata - #6703
Open
a2105z wants to merge 1 commit into
Open
feat(utils): default Vertex project and location from GCP metadata#6703a2105z wants to merge 1 commit into
a2105z wants to merge 1 commit into
Conversation
When ADK runs on Google Cloud without an explicit .env, fill unset GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION, and enterprise/Vertex mode from the instance metadata server so Agent Engine deploys do not need those values baked in. Explicit shell and .env values still win, and API-key auth is left alone. Fixes google#2685
Contributor
Author
|
@xuanyang15 @steren @klateefa @yeesian @wuliang229 @llalitkumarrr @GWeale — this implements #2685 (GCP metadata defaults for project/location/enterprise). Happy to iterate on review feedback. |
Contributor
Author
|
@xuanyang15 — this PR is ready for your review whenever you have a chance. Thanks! |
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
.env, it's cleaner (ADK should pick up project and location from GCP metadata server) #2685Summary
When ADK runs on Google Cloud (Agent Engine / Cloud Run / GCE) without an explicit
.env, fill unset:GOOGLE_CLOUD_PROJECTGOOGLE_CLOUD_LOCATIONGOOGLE_GENAI_USE_ENTERPRISE(enterprise/Vertex mode)from the instance metadata server.
Behavior:
.envvalues always winTesting Plan
Unit Tests:
Manual End-to-End (E2E) Tests:
.envVertex identity vars → ADK picks project/region and enables enterprise modeChecklist
Additional context
cc @xuanyang15 @steren @klateefa @yeesian @wuliang229 @llalitkumarrr @GWeale — ready for review when you have a chance.