File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1061,12 +1061,20 @@ def to_agent_engine(
10611061
10621062 import vertexai
10631063
1064+ from ..utils ._google_client_headers import get_tracking_headers
1065+
10641066 if project and region :
10651067 click .echo ('Initializing Vertex AI...' )
1066- client = vertexai .Client (project = project , location = region )
1068+ client = vertexai .Client (
1069+ project = project ,
1070+ location = region ,
1071+ http_options = {'headers' : get_tracking_headers ()},
1072+ )
10671073 elif api_key :
10681074 click .echo ('Initializing Vertex AI in Express Mode with API key...' )
1069- client = vertexai .Client (api_key = api_key )
1075+ client = vertexai .Client (
1076+ api_key = api_key , http_options = {'headers' : get_tracking_headers ()}
1077+ )
10701078 else :
10711079 click .echo (
10721080 'No project/region or api_key provided. '
You can’t perform that action at this time.
0 commit comments