Skip to content

Commit c63892d

Browse files
Jarno Hakulinennick863
andauthored
Jhakulin/agents naming changes (#40845)
* naming changes * update tests * Record the tests and disable azue functions for now (#40852) * Nirovins/record tests (#40854) * Record the tests and disable azue functions for now * Add recordings for azure functions * Record instrumentation tests --------- Co-authored-by: Jarno Hakulinen <[email protected]> --------- Co-authored-by: Nikolay Rovinskiy <[email protected]>
1 parent 3ff2c17 commit c63892d

29 files changed

+508
-505
lines changed

sdk/ai/azure-ai-agents/apiview-properties.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"CrossLanguageDefinitionId": {
44
"azure.ai.agents.models.Agent": "Azure.AI.Agents.Agent",
55
"azure.ai.agents.models.AgentDeletionStatus": "Azure.AI.Agents.AgentDeletionStatus",
6-
"azure.ai.agents.models.AgentsApiResponseFormat": "Azure.AI.Agents.AgentsApiResponseFormat",
76
"azure.ai.agents.models.AgentsNamedToolChoice": "Azure.AI.Agents.AgentsNamedToolChoice",
7+
"azure.ai.agents.models.AgentsResponseFormat": "Azure.AI.Agents.AgentsResponseFormat",
88
"azure.ai.agents.models.AgentThread": "Azure.AI.Agents.AgentThread",
99
"azure.ai.agents.models.AgentThreadCreationOptions": "Azure.AI.Agents.AgentThreadCreationOptions",
1010
"azure.ai.agents.models.AISearchIndexResource": "Azure.AI.Agents.AISearchIndexResource",
@@ -26,6 +26,7 @@
2626
"azure.ai.agents.models.ConnectedAgentDetails": "Azure.AI.Agents.ConnectedAgentDetails",
2727
"azure.ai.agents.models.ConnectedAgentToolDefinition": "Azure.AI.Agents.ConnectedAgentToolDefinition",
2828
"azure.ai.agents.models.FileDeletionStatus": "Azure.AI.Agents.FileDeletionStatus",
29+
"azure.ai.agents.models.FileInfo": "Azure.AI.Agents.FileInfo",
2930
"azure.ai.agents.models.FileListResponse": "Azure.AI.Agents.FileListResponse",
3031
"azure.ai.agents.models.FileSearchRankingOptions": "Azure.AI.Agents.FileSearchRankingOptions",
3132
"azure.ai.agents.models.FileSearchToolCallContent": "Azure.AI.Agents.FileSearchToolCallContent",
@@ -71,7 +72,6 @@
7172
"azure.ai.agents.models.MessageTextUrlCitationAnnotation": "Azure.AI.Agents.MessageTextUrlCitationAnnotation",
7273
"azure.ai.agents.models.MessageTextUrlCitationDetails": "Azure.AI.Agents.MessageTextUrlCitationDetails",
7374
"azure.ai.agents.models.MicrosoftFabricToolDefinition": "Azure.AI.Agents.MicrosoftFabricToolDefinition",
74-
"azure.ai.agents.models.OpenAIFile": "Azure.AI.Agents.OpenAIFile",
7575
"azure.ai.agents.models.OpenAIPageableListOfAgent": "Azure.AI.Agents.OpenAIPageableListOf",
7676
"azure.ai.agents.models.OpenAIPageableListOfAgentThread": "Azure.AI.Agents.OpenAIPageableListOf",
7777
"azure.ai.agents.models.OpenAIPageableListOfRunStep": "Azure.AI.Agents.OpenAIPageableListOf",
@@ -181,9 +181,9 @@
181181
"azure.ai.agents.models.RunStatus": "Azure.AI.Agents.RunStatus",
182182
"azure.ai.agents.models.IncompleteDetailsReason": "Azure.AI.Agents.IncompleteDetailsReason",
183183
"azure.ai.agents.models.TruncationStrategy": "Azure.AI.Agents.TruncationStrategy",
184-
"azure.ai.agents.models.AgentsApiToolChoiceOptionMode": "Azure.AI.Agents.AgentsApiToolChoiceOptionMode",
184+
"azure.ai.agents.models.AgentsToolChoiceOptionMode": "Azure.AI.Agents.AgentsToolChoiceOptionMode",
185185
"azure.ai.agents.models.AgentsNamedToolChoiceType": "Azure.AI.Agents.AgentsNamedToolChoiceType",
186-
"azure.ai.agents.models.AgentsApiResponseFormatMode": "Azure.AI.Agents.AgentsApiResponseFormatMode",
186+
"azure.ai.agents.models.AgentsResponseFormatMode": "Azure.AI.Agents.AgentsResponseFormatMode",
187187
"azure.ai.agents.models.ResponseFormat": "Azure.AI.Agents.ResponseFormat",
188188
"azure.ai.agents.models.RunAdditionalFieldList": "Azure.AI.Agents.RunAdditionalFieldList",
189189
"azure.ai.agents.models.RunStepType": "Azure.AI.Agents.RunStepType",

sdk/ai/azure-ai-agents/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/ai/azure-ai-agents",
5-
"Tag": "python/ai/azure-ai-agents_bccddce06c"
5+
"Tag": "python/ai/azure-ai-agents_2d7743fd82"
66
}

sdk/ai/azure-ai-agents/azure/ai/agents/_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-ins
5959
credential type or a token credential type. Required.
6060
:type credential: ~azure.core.credentials.AzureKeyCredential or
6161
~azure.core.credentials.TokenCredential
62-
:keyword api_version: The API version to use for this operation. Default value is
63-
"2025-05-15-preview". Note that overriding this default value may result in unsupported
64-
behavior.
62+
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
63+
that overriding this default value may result in unsupported behavior.
6564
:paramtype api_version: str
6665
"""
6766

sdk/ai/azure-ai-agents/azure/ai/agents/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ class AgentsClientConfiguration: # pylint: disable=too-many-instance-attributes
3030
credential type or a token credential type. Required.
3131
:type credential: ~azure.core.credentials.AzureKeyCredential or
3232
~azure.core.credentials.TokenCredential
33-
:keyword api_version: The API version to use for this operation. Default value is
34-
"2025-05-15-preview". Note that overriding this default value may result in unsupported
35-
behavior.
33+
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
34+
that overriding this default value may result in unsupported behavior.
3635
:paramtype api_version: str
3736
"""
3837

3938
def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
40-
api_version: str = kwargs.pop("api_version", "2025-05-15-preview")
39+
api_version: str = kwargs.pop("api_version", "v1")
4140

4241
if endpoint is None:
4342
raise ValueError("Parameter 'endpoint' must not be None.")

sdk/ai/azure-ai-agents/azure/ai/agents/_patch.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=line-too-long,useless-suppression
1+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
22
# ------------------------------------
33
# Copyright (c) Microsoft Corporation.
44
# Licensed under the MIT License.
@@ -87,7 +87,7 @@ def create_agent( # pylint: disable=arguments-differ
8787
tool_resources: Optional[_models.ToolResources] = None,
8888
temperature: Optional[float] = None,
8989
top_p: Optional[float] = None,
90-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
90+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
9191
metadata: Optional[Dict[str, str]] = None,
9292
**kwargs: Any,
9393
) -> _models.Agent:
@@ -150,7 +150,7 @@ def create_agent( # pylint: disable=arguments-differ
150150
toolset: Optional[_models.ToolSet] = None,
151151
temperature: Optional[float] = None,
152152
top_p: Optional[float] = None,
153-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
153+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
154154
metadata: Optional[Dict[str, str]] = None,
155155
**kwargs: Any,
156156
) -> _models.Agent:
@@ -238,7 +238,7 @@ def create_agent(
238238
toolset: Optional[_models.ToolSet] = None,
239239
temperature: Optional[float] = None,
240240
top_p: Optional[float] = None,
241-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
241+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
242242
metadata: Optional[Dict[str, str]] = None,
243243
content_type: str = "application/json",
244244
**kwargs: Any,
@@ -268,7 +268,7 @@ def create_agent(
268268
:keyword top_p: Nucleus sampling parameter.
269269
:paramtype top_p: Optional[float]
270270
:keyword response_format: Response format for tool calls.
271-
:paramtype response_format: Optional["_types.AgentsApiResponseFormatOption"]
271+
:paramtype response_format: Optional["_types.AgentsResponseFormatOption"]
272272
:keyword metadata: Key/value pairs for storing additional information.
273273
:paramtype metadata: Optional[Dict[str, str]]
274274
:keyword content_type: Content type of the body.
@@ -320,7 +320,7 @@ def update_agent( # pylint: disable=arguments-differ
320320
tool_resources: Optional[_models.ToolResources] = None,
321321
temperature: Optional[float] = None,
322322
top_p: Optional[float] = None,
323-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
323+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
324324
metadata: Optional[Dict[str, str]] = None,
325325
**kwargs: Any,
326326
) -> _models.Agent:
@@ -388,7 +388,7 @@ def update_agent( # pylint: disable=arguments-differ
388388
toolset: Optional[_models.ToolSet] = None,
389389
temperature: Optional[float] = None,
390390
top_p: Optional[float] = None,
391-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
391+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
392392
metadata: Optional[Dict[str, str]] = None,
393393
**kwargs: Any,
394394
) -> _models.Agent:
@@ -488,7 +488,7 @@ def update_agent(
488488
toolset: Optional[_models.ToolSet] = None,
489489
temperature: Optional[float] = None,
490490
top_p: Optional[float] = None,
491-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
491+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
492492
content_type: str = "application/json",
493493
metadata: Optional[Dict[str, str]] = None,
494494
**kwargs: Any,
@@ -698,8 +698,8 @@ def create_thread_and_run(
698698
max_prompt_tokens: Optional[int] = None,
699699
max_completion_tokens: Optional[int] = None,
700700
truncation_strategy: Optional[_models.TruncationObject] = None,
701-
tool_choice: Optional["_types.AgentsApiToolChoiceOption"] = None,
702-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
701+
tool_choice: Optional["_types.AgentsToolChoiceOption"] = None,
702+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
703703
parallel_tool_calls: Optional[bool] = None,
704704
metadata: Optional[Dict[str, str]] = None,
705705
**kwargs: Any,
@@ -734,7 +734,7 @@ def create_thread_and_run(
734734
:type truncation_strategy: ~azure.ai.agents.models.TruncationObject
735735
:keyword tool_choice: Controls which tool the model will call.
736736
:type tool_choice: str or
737-
~azure.ai.agents.models.AgentsApiToolChoiceOptionMode or
737+
~azure.ai.agents.models.AgentsToolChoiceOptionMode or
738738
~azure.ai.agents.models.AgentsNamedToolChoice
739739
:keyword response_format: Specifies the format the model must output.
740740
:type response_format: str or
@@ -798,8 +798,8 @@ def create_thread_and_run( # type: ignore
798798
max_prompt_tokens: Optional[int] = None,
799799
max_completion_tokens: Optional[int] = None,
800800
truncation_strategy: Optional[_models.TruncationObject] = None,
801-
tool_choice: Optional[_types.AgentsApiToolChoiceOption] = None,
802-
response_format: Optional[_types.AgentsApiResponseFormatOption] = None,
801+
tool_choice: Optional[_types.AgentsToolChoiceOption] = None,
802+
response_format: Optional[_types.AgentsResponseFormatOption] = None,
803803
parallel_tool_calls: Optional[bool] = None,
804804
metadata: Optional[Dict[str, str]] = None,
805805
**kwargs: Any,
@@ -836,7 +836,7 @@ def create_thread_and_run( # type: ignore
836836
:type truncation_strategy: ~azure.ai.agents.models.TruncationObject
837837
:keyword tool_choice: Controls which tool the model will call.
838838
:type tool_choice: str or
839-
~azure.ai.agents.models.AgentsApiToolChoiceOptionMode or
839+
~azure.ai.agents.models.AgentsToolChoiceOptionMode or
840840
~azure.ai.agents.models.AgentsNamedToolChoice
841841
:keyword response_format: Specifies the format the model must output.
842842
:type response_format: str or
@@ -904,8 +904,8 @@ def create_thread_and_process_run(
904904
max_prompt_tokens: Optional[int] = None,
905905
max_completion_tokens: Optional[int] = None,
906906
truncation_strategy: Optional[_models.TruncationObject] = None,
907-
tool_choice: Optional["_types.AgentsApiToolChoiceOption"] = None,
908-
response_format: Optional["_types.AgentsApiResponseFormatOption"] = None,
907+
tool_choice: Optional["_types.AgentsToolChoiceOption"] = None,
908+
response_format: Optional["_types.AgentsResponseFormatOption"] = None,
909909
parallel_tool_calls: Optional[bool] = None,
910910
metadata: Optional[Dict[str, str]] = None,
911911
sleep_interval: int = 1,
@@ -937,9 +937,9 @@ def create_thread_and_process_run(
937937
:keyword truncation_strategy: Strategy for dropping old messages when context window overflows.
938938
:type truncation_strategy: ~azure.ai.agents.models.TruncationObject, optional
939939
:keyword tool_choice: Controls which tool (if any) the model is allowed to call.
940-
:type tool_choice: str or ~azure.ai.agents.models.AgentsApiToolChoiceOption, optional
940+
:type tool_choice: str or ~azure.ai.agents.models.AgentsToolChoiceOption, optional
941941
:keyword response_format: Specifies the required format for the model’s output.
942-
:type response_format: str or ~azure.ai.agents.models.AgentsApiResponseFormatOption, optional
942+
:type response_format: str or ~azure.ai.agents.models.AgentsResponseFormatOption, optional
943943
:keyword parallel_tool_calls: If True, allows tool calls to be executed in parallel.
944944
:type parallel_tool_calls: bool, optional
945945
:keyword metadata: Optional metadata (up to 16 key/value pairs) to attach to the run.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=line-too-long,useless-suppression
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12,11 +13,7 @@
1213
from . import models as _models
1314
MessageInputContent = Union[str, List["_models.MessageInputContentBlock"]]
1415
MessageAttachmentToolDefinition = Union["_models.CodeInterpreterToolDefinition", "_models.FileSearchToolDefinition"]
15-
AgentsApiToolChoiceOption = Union[str, str, "_models.AgentsApiToolChoiceOptionMode", "_models.AgentsNamedToolChoice"]
16-
AgentsApiResponseFormatOption = Union[
17-
str,
18-
str,
19-
"_models.AgentsApiResponseFormatMode",
20-
"_models.AgentsApiResponseFormat",
21-
"_models.ResponseFormatJsonSchemaType",
16+
AgentsToolChoiceOption = Union[str, str, "_models.AgentsToolChoiceOptionMode", "_models.AgentsNamedToolChoice"]
17+
AgentsResponseFormatOption = Union[
18+
str, str, "_models.AgentsResponseFormatMode", "_models.AgentsResponseFormat", "_models.ResponseFormatJsonSchemaType"
2219
]

sdk/ai/azure-ai-agents/azure/ai/agents/aio/_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ class AgentsClient(AgentsClientOperationsMixin): # pylint: disable=too-many-ins
6060
credential type or a token credential type. Required.
6161
:type credential: ~azure.core.credentials.AzureKeyCredential or
6262
~azure.core.credentials_async.AsyncTokenCredential
63-
:keyword api_version: The API version to use for this operation. Default value is
64-
"2025-05-15-preview". Note that overriding this default value may result in unsupported
65-
behavior.
63+
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
64+
that overriding this default value may result in unsupported behavior.
6665
:paramtype api_version: str
6766
"""
6867

sdk/ai/azure-ai-agents/azure/ai/agents/aio/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ class AgentsClientConfiguration: # pylint: disable=too-many-instance-attributes
3030
credential type or a token credential type. Required.
3131
:type credential: ~azure.core.credentials.AzureKeyCredential or
3232
~azure.core.credentials_async.AsyncTokenCredential
33-
:keyword api_version: The API version to use for this operation. Default value is
34-
"2025-05-15-preview". Note that overriding this default value may result in unsupported
35-
behavior.
33+
:keyword api_version: The API version to use for this operation. Default value is "v1". Note
34+
that overriding this default value may result in unsupported behavior.
3635
:paramtype api_version: str
3736
"""
3837

3938
def __init__(
4039
self, endpoint: str, credential: Union[AzureKeyCredential, "AsyncTokenCredential"], **kwargs: Any
4140
) -> None:
42-
api_version: str = kwargs.pop("api_version", "2025-05-15-preview")
41+
api_version: str = kwargs.pop("api_version", "v1")
4342

4443
if endpoint is None:
4544
raise ValueError("Parameter 'endpoint' must not be None.")

0 commit comments

Comments
 (0)