Skip to content

Commit d95207e

Browse files
authored
Updates to MemoryStore operations (#44086)
1 parent 3116945 commit d95207e

25 files changed

+103
-389
lines changed

sdk/ai/azure-ai-projects/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ with (
594594
]
595595
eval_object = openai_client.evals.create(
596596
name="Agent Evaluation",
597-
data_source_config=data_source_config,
598-
testing_criteria=testing_criteria, # type: ignore
597+
data_source_config=data_source_config,
598+
testing_criteria=testing_criteria, # type: ignore
599599
)
600600
print(f"Evaluation created (id: {eval_object.id}, name: {eval_object.name})")
601601

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@
356356
"azure.ai.projects.models.ReasoningItemSummaryPartType": "OpenAI.ReasoningItemSummaryPartType",
357357
"azure.ai.projects.models.WebSearchActionType": "OpenAI.WebSearchActionType",
358358
"azure.ai.projects.models.MemoryOperationKind": "Azure.AI.Projects.MemoryOperationKind",
359-
"azure.ai.projects.models.MemoryStoreUpdateStatus": "Azure.AI.Projects.MemoryStoreUpdateStatus",
360359
"azure.ai.projects.models.ConnectionType": "Azure.AI.Projects.ConnectionType",
361360
"azure.ai.projects.models.CredentialType": "Azure.AI.Projects.CredentialType",
362361
"azure.ai.projects.models.DatasetType": "Azure.AI.Projects.DatasetType",
@@ -382,6 +381,7 @@
382381
"azure.ai.projects.models.RecurrenceType": "Azure.AI.Projects.RecurrenceType",
383382
"azure.ai.projects.models.DayOfWeek": "Azure.AI.Projects.DayOfWeek",
384383
"azure.ai.projects.models.ScheduleTaskType": "Azure.AI.Projects.ScheduleTaskType",
384+
"azure.ai.projects.models.MemoryStoreUpdateStatus": "Azure.AI.Projects.MemoryStoreUpdateStatus",
385385
"azure.ai.projects.models.ServiceTier": "OpenAI.ServiceTier",
386386
"azure.ai.projects.models.ToolChoiceOptions": "OpenAI.ToolChoiceOptions",
387387
"azure.ai.projects.models.ToolChoiceObjectType": "OpenAI.ToolChoiceObjectType",
@@ -423,10 +423,6 @@
423423
"azure.ai.projects.aio.operations.MemoryStoresOperations.delete": "Azure.AI.Projects.MemoryStores.deleteMemoryStore",
424424
"azure.ai.projects.operations.MemoryStoresOperations.search_memories": "Azure.AI.Projects.MemoryStores.searchMemories",
425425
"azure.ai.projects.aio.operations.MemoryStoresOperations.search_memories": "Azure.AI.Projects.MemoryStores.searchMemories",
426-
"azure.ai.projects.operations.MemoryStoresOperations.begin_update_memories": "Azure.AI.Projects.MemoryStores.updateMemories",
427-
"azure.ai.projects.aio.operations.MemoryStoresOperations.begin_update_memories": "Azure.AI.Projects.MemoryStores.updateMemories",
428-
"azure.ai.projects.operations.MemoryStoresOperations.get_update_result": "Azure.AI.Projects.MemoryStores.getUpdateResult",
429-
"azure.ai.projects.aio.operations.MemoryStoresOperations.get_update_result": "Azure.AI.Projects.MemoryStores.getUpdateResult",
430426
"azure.ai.projects.operations.MemoryStoresOperations.delete_scope": "Azure.AI.Projects.MemoryStores.deleteScope",
431427
"azure.ai.projects.aio.operations.MemoryStoresOperations.delete_scope": "Azure.AI.Projects.MemoryStores.deleteScope",
432428
"azure.ai.projects.operations.ConnectionsOperations.list": "Azure.AI.Projects.Connections.list",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
7474
"2025-11-15-preview". Note that overriding this default value may result in unsupported
7575
behavior.
7676
:paramtype api_version: str
77-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
78-
Retry-After header is present.
7977
"""
8078

8179
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
7474
"2025-11-15-preview". Note that overriding this default value may result in unsupported
7575
behavior.
7676
:paramtype api_version: str
77-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
78-
Retry-After header is present.
7977
"""
8078

8179
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:

sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py

Lines changed: 7 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
build_memory_stores_delete_request,
8989
build_memory_stores_delete_scope_request,
9090
build_memory_stores_get_request,
91-
build_memory_stores_get_update_result_request,
9291
build_memory_stores_list_request,
9392
build_memory_stores_search_memories_request,
9493
build_memory_stores_update_memories_request,
@@ -2628,7 +2627,7 @@ async def _update_memories_initial(
26282627
return deserialized # type: ignore
26292628

26302629
@overload
2631-
async def begin_update_memories(
2630+
async def _begin_update_memories(
26322631
self,
26332632
name: str,
26342633
*,
@@ -2638,82 +2637,23 @@ async def begin_update_memories(
26382637
previous_update_id: Optional[str] = None,
26392638
update_delay: Optional[int] = None,
26402639
**kwargs: Any
2641-
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]:
2642-
"""Update memory store with conversation memories.
2643-
2644-
:param name: The name of the memory store to update. Required.
2645-
:type name: str
2646-
:keyword scope: The namespace that logically groups and isolates memories, such as a user ID.
2647-
Required.
2648-
:paramtype scope: str
2649-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2650-
Default value is "application/json".
2651-
:paramtype content_type: str
2652-
:keyword items: Conversation items from which to extract memories. Default value is None.
2653-
:paramtype items: list[~azure.ai.projects.models.ItemParam]
2654-
:keyword previous_update_id: The unique ID of the previous update request, enabling incremental
2655-
memory updates from where the last operation left off. Default value is None.
2656-
:paramtype previous_update_id: str
2657-
:keyword update_delay: Timeout period before processing the memory update in seconds.
2658-
If a new update request is received during this period, it will cancel the current request and
2659-
reset the timeout.
2660-
Set to 0 to immediately trigger the update without delay.
2661-
Defaults to 300 (5 minutes). Default value is None.
2662-
:paramtype update_delay: int
2663-
:return: An instance of AsyncLROPoller that returns MemoryStoreUpdateCompletedResult. The
2664-
MemoryStoreUpdateCompletedResult is compatible with MutableMapping
2665-
:rtype:
2666-
~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.MemoryStoreUpdateCompletedResult]
2667-
:raises ~azure.core.exceptions.HttpResponseError:
2668-
"""
2669-
2640+
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ...
26702641
@overload
2671-
async def begin_update_memories(
2642+
async def _begin_update_memories(
26722643
self, name: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any
2673-
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]:
2674-
"""Update memory store with conversation memories.
2675-
2676-
:param name: The name of the memory store to update. Required.
2677-
:type name: str
2678-
:param body: Required.
2679-
:type body: JSON
2680-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2681-
Default value is "application/json".
2682-
:paramtype content_type: str
2683-
:return: An instance of AsyncLROPoller that returns MemoryStoreUpdateCompletedResult. The
2684-
MemoryStoreUpdateCompletedResult is compatible with MutableMapping
2685-
:rtype:
2686-
~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.MemoryStoreUpdateCompletedResult]
2687-
:raises ~azure.core.exceptions.HttpResponseError:
2688-
"""
2689-
2644+
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ...
26902645
@overload
2691-
async def begin_update_memories(
2646+
async def _begin_update_memories(
26922647
self, name: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2693-
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]:
2694-
"""Update memory store with conversation memories.
2695-
2696-
:param name: The name of the memory store to update. Required.
2697-
:type name: str
2698-
:param body: Required.
2699-
:type body: IO[bytes]
2700-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2701-
Default value is "application/json".
2702-
:paramtype content_type: str
2703-
:return: An instance of AsyncLROPoller that returns MemoryStoreUpdateCompletedResult. The
2704-
MemoryStoreUpdateCompletedResult is compatible with MutableMapping
2705-
:rtype:
2706-
~azure.core.polling.AsyncLROPoller[~azure.ai.projects.models.MemoryStoreUpdateCompletedResult]
2707-
:raises ~azure.core.exceptions.HttpResponseError:
2708-
"""
2648+
) -> AsyncLROPoller[_models.MemoryStoreUpdateCompletedResult]: ...
27092649

27102650
@distributed_trace_async
27112651
@api_version_validation(
27122652
method_added_on="2025-11-15-preview",
27132653
params_added_on={"2025-11-15-preview": ["api_version", "name", "content_type", "accept"]},
27142654
api_versions_list=["2025-11-15-preview"],
27152655
)
2716-
async def begin_update_memories(
2656+
async def _begin_update_memories(
27172657
self,
27182658
name: str,
27192659
body: Union[JSON, IO[bytes]] = _Unset,
@@ -2811,78 +2751,6 @@ def get_long_running_output(pipeline_response):
28112751
self._client, raw_result, get_long_running_output, polling_method # type: ignore
28122752
)
28132753

2814-
@distributed_trace_async
2815-
@api_version_validation(
2816-
method_added_on="2025-11-15-preview",
2817-
params_added_on={"2025-11-15-preview": ["api_version", "name", "update_id", "accept"]},
2818-
api_versions_list=["2025-11-15-preview"],
2819-
)
2820-
async def get_update_result(self, name: str, update_id: str, **kwargs: Any) -> _models.MemoryStoreUpdateResult:
2821-
"""Get memory store update result.
2822-
2823-
:param name: The name of the memory store. Required.
2824-
:type name: str
2825-
:param update_id: The ID of the memory update operation. Required.
2826-
:type update_id: str
2827-
:return: MemoryStoreUpdateResult. The MemoryStoreUpdateResult is compatible with MutableMapping
2828-
:rtype: ~azure.ai.projects.models.MemoryStoreUpdateResult
2829-
:raises ~azure.core.exceptions.HttpResponseError:
2830-
"""
2831-
error_map: MutableMapping = {
2832-
401: ClientAuthenticationError,
2833-
404: ResourceNotFoundError,
2834-
409: ResourceExistsError,
2835-
304: ResourceNotModifiedError,
2836-
}
2837-
error_map.update(kwargs.pop("error_map", {}) or {})
2838-
2839-
_headers = kwargs.pop("headers", {}) or {}
2840-
_params = kwargs.pop("params", {}) or {}
2841-
2842-
cls: ClsType[_models.MemoryStoreUpdateResult] = kwargs.pop("cls", None)
2843-
2844-
_request = build_memory_stores_get_update_result_request(
2845-
name=name,
2846-
update_id=update_id,
2847-
api_version=self._config.api_version,
2848-
headers=_headers,
2849-
params=_params,
2850-
)
2851-
path_format_arguments = {
2852-
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
2853-
}
2854-
_request.url = self._client.format_url(_request.url, **path_format_arguments)
2855-
2856-
_stream = kwargs.pop("stream", False)
2857-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2858-
_request, stream=_stream, **kwargs
2859-
)
2860-
2861-
response = pipeline_response.http_response
2862-
2863-
if response.status_code not in [200]:
2864-
if _stream:
2865-
try:
2866-
await response.read() # Load the body in memory and close the socket
2867-
except (StreamConsumedError, StreamClosedError):
2868-
pass
2869-
map_error(status_code=response.status_code, response=response, error_map=error_map)
2870-
error = _failsafe_deserialize(
2871-
_models.ApiErrorResponse,
2872-
response,
2873-
)
2874-
raise HttpResponseError(response=response, model=error)
2875-
2876-
if _stream:
2877-
deserialized = response.iter_bytes()
2878-
else:
2879-
deserialized = _deserialize(_models.MemoryStoreUpdateResult, response.json())
2880-
2881-
if cls:
2882-
return cls(pipeline_response, deserialized, {}) # type: ignore
2883-
2884-
return deserialized # type: ignore
2885-
28862754
@overload
28872755
async def delete_scope(
28882756
self, name: str, *, scope: str, content_type: str = "application/json", **kwargs: Any

sdk/ai/azure-ai-projects/azure/ai/projects/models/_enums.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,24 @@ class PendingUploadType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
452452

453453

454454
class ReasoningEffort(str, Enum, metaclass=CaseInsensitiveEnumMeta):
455-
"""**o-series models only**
455+
"""Constrains effort on reasoning for reasoning models.
456456
457-
Constrains effort on reasoning for
458-
`reasoning models <https://platform.openai.com/docs/guides/reasoning>`_.
459-
Currently supported values are ``low``, ``medium``, and ``high``. Reducing
460-
reasoning effort can result in faster responses and fewer tokens used
461-
on reasoning in a response.
457+
Currently supported values are none, minimal, low, medium, and high.
458+
459+
Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in
460+
a response.
461+
462+
gpt-5.1 defaults to none, which does not perform reasoning. The supported reasoning values for
463+
gpt-5.1 are none, low, medium, and high. Tool calls are supported for all reasoning values in
464+
gpt-5.1.
465+
466+
All models before gpt-5.1 default to medium reasoning effort, and do not support none.
467+
468+
The gpt-5-pro model defaults to (and only supports) high reasoning effort.
462469
"""
463470

471+
NONE = "none"
472+
MINIMAL = "minimal"
464473
LOW = "low"
465474
MEDIUM = "medium"
466475
HIGH = "high"

0 commit comments

Comments
 (0)