Skip to content

Commit e3c0917

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: Disable bound token sharing for GCP services in ADK templates.
PiperOrigin-RevId: 901408387
1 parent f2d73fd commit e3c0917

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • vertexai/agent_engines/templates

vertexai/agent_engines/templates/adk.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,12 @@ def set_up(self):
806806
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService
807807

808808
os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "1"
809+
# --- BEGIN BOUND TOKEN PATCH ---
810+
# Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false
811+
# to disable bound token sharing.
812+
os.environ["GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES"] = (
813+
"false"
814+
)
809815
project = self._tmpl_attrs.get("project")
810816
if project:
811817
os.environ["GOOGLE_CLOUD_PROJECT"] = project

0 commit comments

Comments
 (0)