Skip to content

Commit b349bde

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 b349bde

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • vertexai/agent_engines/templates

vertexai/agent_engines/templates/adk.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,13 @@ 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+
)
815+
# --- END BOUND TOKEN PATCH ---
809816
project = self._tmpl_attrs.get("project")
810817
if project:
811818
os.environ["GOOGLE_CLOUD_PROJECT"] = project

0 commit comments

Comments
 (0)