Skip to content

Commit 22e6adf

Browse files
fix: Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false for bound tokens
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
1 parent b7b1c2e commit 22e6adf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google/genai/_api_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ def __del__(self) -> None:
538538
class BaseApiClient:
539539
"""Client for calling HTTP APIs sending and receiving JSON."""
540540

541+
## Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES to false
542+
## to disable bound token sharing.
543+
os.Setenv("GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES", "false")
544+
541545
def __init__(
542546
self,
543547
vertexai: Optional[bool] = None,

0 commit comments

Comments
 (0)