diff --git a/google/genai/_api_client.py b/google/genai/_api_client.py index 3028c72a2..8049181f7 100644 --- a/google/genai/_api_client.py +++ b/google/genai/_api_client.py @@ -538,6 +538,13 @@ 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. Tracking on + ## https://github.com/googleapis/python-genai/issues/1956 + os.environ['GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES'] = ( + 'false' + ) + def __init__( self, vertexai: Optional[bool] = None,