Skip to content

Commit 04d5092

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: Disable bound token sharing check for this Vertex AI SDK code path: google3/third_party/py/google/cloud/aiplatform/vertexai/agent_engines/
PiperOrigin-RevId: 901496226
1 parent c378551 commit 04d5092

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • vertexai/agent_engines/templates

vertexai/agent_engines/templates/adk.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,11 @@ 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"] = "false"
813+
# --- END BOUND TOKEN PATCH ---
809814
project = self._tmpl_attrs.get("project")
810815
if project:
811816
os.environ["GOOGLE_CLOUD_PROJECT"] = project

0 commit comments

Comments
 (0)