Skip to content

Commit 6b87222

Browse files
jscudcopybara-github
authored andcommitted
chore: update error messages to clarify which APIs support a feature.
PiperOrigin-RevId: 912239268
1 parent 1f9c8e0 commit 6b87222

16 files changed

Lines changed: 206 additions & 206 deletions

vertexai/_genai/a2a_task_events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def append(
130130
request_url_dict: Optional[dict[str, str]]
131131
if not self._api_client.vertexai:
132132
raise ValueError(
133-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
133+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
134134
)
135135
else:
136136
request_dict = _AppendAgentEngineTaskEventRequestParameters_to_vertex(
@@ -219,7 +219,7 @@ def _list(
219219
request_url_dict: Optional[dict[str, str]]
220220
if not self._api_client.vertexai:
221221
raise ValueError(
222-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
222+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
223223
)
224224
else:
225225
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(
@@ -333,7 +333,7 @@ async def append(
333333
request_url_dict: Optional[dict[str, str]]
334334
if not self._api_client.vertexai:
335335
raise ValueError(
336-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
336+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
337337
)
338338
else:
339339
request_dict = _AppendAgentEngineTaskEventRequestParameters_to_vertex(
@@ -424,7 +424,7 @@ async def _list(
424424
request_url_dict: Optional[dict[str, str]]
425425
if not self._api_client.vertexai:
426426
raise ValueError(
427-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
427+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
428428
)
429429
else:
430430
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(

vertexai/_genai/a2a_tasks.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def delete(
167167
request_url_dict: Optional[dict[str, str]]
168168
if not self._api_client.vertexai:
169169
raise ValueError(
170-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
170+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
171171
)
172172
else:
173173
request_dict = _DeleteAgentEngineTaskRequestParameters_to_vertex(
@@ -225,7 +225,7 @@ def get(
225225
request_url_dict: Optional[dict[str, str]]
226226
if not self._api_client.vertexai:
227227
raise ValueError(
228-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
228+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
229229
)
230230
else:
231231
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
@@ -309,7 +309,7 @@ def _list(
309309
request_url_dict: Optional[dict[str, str]]
310310
if not self._api_client.vertexai:
311311
raise ValueError(
312-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
312+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
313313
)
314314
else:
315315
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
@@ -397,7 +397,7 @@ def create(
397397
request_url_dict: Optional[dict[str, str]]
398398
if not self._api_client.vertexai:
399399
raise ValueError(
400-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
400+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
401401
)
402402
else:
403403
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(
@@ -526,7 +526,7 @@ async def delete(
526526
request_url_dict: Optional[dict[str, str]]
527527
if not self._api_client.vertexai:
528528
raise ValueError(
529-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
529+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
530530
)
531531
else:
532532
request_dict = _DeleteAgentEngineTaskRequestParameters_to_vertex(
@@ -584,7 +584,7 @@ async def get(
584584
request_url_dict: Optional[dict[str, str]]
585585
if not self._api_client.vertexai:
586586
raise ValueError(
587-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
587+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
588588
)
589589
else:
590590
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
@@ -670,7 +670,7 @@ async def _list(
670670
request_url_dict: Optional[dict[str, str]]
671671
if not self._api_client.vertexai:
672672
raise ValueError(
673-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
673+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
674674
)
675675
else:
676676
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
@@ -760,7 +760,7 @@ async def create(
760760
request_url_dict: Optional[dict[str, str]]
761761
if not self._api_client.vertexai:
762762
raise ValueError(
763-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
763+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
764764
)
765765
else:
766766
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(

vertexai/_genai/agent_engines.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def cancel_query_job(
782782
request_url_dict: Optional[dict[str, str]]
783783
if not self._api_client.vertexai:
784784
raise ValueError(
785-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
785+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
786786
)
787787
else:
788788
request_dict = _CancelQueryJobAgentEngineRequestParameters_to_vertex(
@@ -856,7 +856,7 @@ def _check_query_job(
856856
request_url_dict: Optional[dict[str, str]]
857857
if not self._api_client.vertexai:
858858
raise ValueError(
859-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
859+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
860860
)
861861
else:
862862
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
@@ -933,7 +933,7 @@ def _run_query_job(
933933
request_url_dict: Optional[dict[str, str]]
934934
if not self._api_client.vertexai:
935935
raise ValueError(
936-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
936+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
937937
)
938938
else:
939939
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
@@ -1006,7 +1006,7 @@ def _create(
10061006
request_url_dict: Optional[dict[str, str]]
10071007
if not self._api_client.vertexai:
10081008
raise ValueError(
1009-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1009+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
10101010
)
10111011
else:
10121012
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
@@ -1098,7 +1098,7 @@ def _delete(
10981098
request_url_dict: Optional[dict[str, str]]
10991099
if not self._api_client.vertexai:
11001100
raise ValueError(
1101-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1101+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
11021102
)
11031103
else:
11041104
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
@@ -1169,7 +1169,7 @@ def _get(
11691169
request_url_dict: Optional[dict[str, str]]
11701170
if not self._api_client.vertexai:
11711171
raise ValueError(
1172-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1172+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
11731173
)
11741174
else:
11751175
request_dict = _GetAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -1240,7 +1240,7 @@ def _list(
12401240
request_url_dict: Optional[dict[str, str]]
12411241
if not self._api_client.vertexai:
12421242
raise ValueError(
1243-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1243+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
12441244
)
12451245
else:
12461246
request_dict = _ListAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -1311,7 +1311,7 @@ def _get_agent_operation(
13111311
request_url_dict: Optional[dict[str, str]]
13121312
if not self._api_client.vertexai:
13131313
raise ValueError(
1314-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1314+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
13151315
)
13161316
else:
13171317
request_dict = _GetAgentEngineOperationParameters_to_vertex(parameter_model)
@@ -1383,7 +1383,7 @@ def _query(
13831383
request_url_dict: Optional[dict[str, str]]
13841384
if not self._api_client.vertexai:
13851385
raise ValueError(
1386-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1386+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
13871387
)
13881388
else:
13891389
request_dict = _QueryAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -1452,7 +1452,7 @@ def _update(
14521452
request_url_dict: Optional[dict[str, str]]
14531453
if not self._api_client.vertexai:
14541454
raise ValueError(
1455-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1455+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
14561456
)
14571457
else:
14581458
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(
@@ -3177,7 +3177,7 @@ async def cancel_query_job(
31773177
request_url_dict: Optional[dict[str, str]]
31783178
if not self._api_client.vertexai:
31793179
raise ValueError(
3180-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3180+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
31813181
)
31823182
else:
31833183
request_dict = _CancelQueryJobAgentEngineRequestParameters_to_vertex(
@@ -3253,7 +3253,7 @@ async def _check_query_job(
32533253
request_url_dict: Optional[dict[str, str]]
32543254
if not self._api_client.vertexai:
32553255
raise ValueError(
3256-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3256+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
32573257
)
32583258
else:
32593259
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
@@ -3332,7 +3332,7 @@ async def _run_query_job(
33323332
request_url_dict: Optional[dict[str, str]]
33333333
if not self._api_client.vertexai:
33343334
raise ValueError(
3335-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3335+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
33363336
)
33373337
else:
33383338
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
@@ -3407,7 +3407,7 @@ async def _create(
34073407
request_url_dict: Optional[dict[str, str]]
34083408
if not self._api_client.vertexai:
34093409
raise ValueError(
3410-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3410+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
34113411
)
34123412
else:
34133413
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
@@ -3501,7 +3501,7 @@ async def _delete(
35013501
request_url_dict: Optional[dict[str, str]]
35023502
if not self._api_client.vertexai:
35033503
raise ValueError(
3504-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3504+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
35053505
)
35063506
else:
35073507
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
@@ -3574,7 +3574,7 @@ async def _get(
35743574
request_url_dict: Optional[dict[str, str]]
35753575
if not self._api_client.vertexai:
35763576
raise ValueError(
3577-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3577+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
35783578
)
35793579
else:
35803580
request_dict = _GetAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -3647,7 +3647,7 @@ async def _list(
36473647
request_url_dict: Optional[dict[str, str]]
36483648
if not self._api_client.vertexai:
36493649
raise ValueError(
3650-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3650+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
36513651
)
36523652
else:
36533653
request_dict = _ListAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -3720,7 +3720,7 @@ async def _get_agent_operation(
37203720
request_url_dict: Optional[dict[str, str]]
37213721
if not self._api_client.vertexai:
37223722
raise ValueError(
3723-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3723+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
37243724
)
37253725
else:
37263726
request_dict = _GetAgentEngineOperationParameters_to_vertex(parameter_model)
@@ -3794,7 +3794,7 @@ async def _query(
37943794
request_url_dict: Optional[dict[str, str]]
37953795
if not self._api_client.vertexai:
37963796
raise ValueError(
3797-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3797+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
37983798
)
37993799
else:
38003800
request_dict = _QueryAgentEngineRequestParameters_to_vertex(parameter_model)
@@ -3865,7 +3865,7 @@ async def _update(
38653865
request_url_dict: Optional[dict[str, str]]
38663866
if not self._api_client.vertexai:
38673867
raise ValueError(
3868-
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3868+
"This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode."
38693869
)
38703870
else:
38713871
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(

0 commit comments

Comments
 (0)