From 87dc3ada9a58b565f6d8ea721208f6c1354aedb5 Mon Sep 17 00:00:00 2001 From: Radhika Agrawal Date: Wed, 14 Jan 2026 15:03:33 -0800 Subject: [PATCH] fix: Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false for bound tokens Signed-off-by: Radhika Agrawal --- google/genai/_api_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/google/genai/_api_client.py b/google/genai/_api_client.py index 3028c72a2..2e6baa638 100644 --- a/google/genai/_api_client.py +++ b/google/genai/_api_client.py @@ -538,6 +538,10 @@ def __del__(self) -> None: class BaseApiClient: """Client for calling HTTP APIs sending and receiving JSON.""" + ## Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false + ## to disable bound token sharing. + os.Setenv("GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES", "false") + def __init__( self, vertexai: Optional[bool] = None,