Skip to content

Fix memory store and recording#45658

Open
howieleung wants to merge 7 commits intofeature/azure-ai-projects/2.0.1b1from
howie/memory-store
Open

Fix memory store and recording#45658
howieleung wants to merge 7 commits intofeature/azure-ai-projects/2.0.1b1from
howie/memory-store

Conversation

@howieleung
Copy link
Member

@howieleung howieleung commented Mar 12, 2026

  • Fixed .beta.memory_stores.begin_update_memories() in both synchronous and asynchronous clients to consistently send the required Foundry-Features preview header and propagate headers to LRO polling requests, without mutating caller-provided kwargs or header dictionaries.

@github-actions
Copy link

github-actions bot commented Mar 12, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-projects

@dargilco
Copy link
Member

@howieleung please target this PR directly to main, and set the version to 2.0.1, as we need to ship this is a hot fix.

@dargilco
Copy link
Member

Also, I was thinking we need to ask CoPilot to create a test to verify that all public method on the ".beta" subclient have the correct "Foundry-Feature" HTTP request header. The test can hook up custom transport to get access to Request headers. It can make a dummy call (fake endpoint URL, random values for required input argument) and just test the resulting request. If we had that, we would have caught this bug.

lro_delay = request_kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = request_kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = await self._update_memories_initial(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method _update_memories_initial already has this set internally:

    _foundry_features: Literal[_FoundryFeaturesOptInKeys.MEMORY_STORES_V1_PREVIEW] = (
        _FoundryFeaturesOptInKeys.MEMORY_STORES_V1_PREVIEW
    )

So why do we need this above?

_headers["Foundry-Features"] = _FoundryFeaturesOptInKeys.MEMORY_STORES_V1_PREVIEW.value

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because _update_memories_initial only applied header change for the first request. _header for polling was not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants