Uh oh!
There was an error while loading. Please reload this page.
[BREAKING] Add response filter for store input in *Providers - #4327
Conversation
There was a problem hiding this comment.
Pull request overview
Adds separate filtering for request vs. response messages when providers store/learn from an invocation, enabling scenarios like excluding tool/function-call messages from persisted chat history (Issue #4256).
Changes:
- Split “store input” filtering into
StorageInputRequestMessageFilterandStorageInputResponseMessageFilteracross chat-history and AI-context provider pipelines. - Update concrete providers/options (TextSearch, ChatHistoryMemory, Mem0, FoundryMemory, Cosmos/InMemory chat history) to pass the new filters through.
- Update unit tests and samples to use the new request/response filter APIs.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs | Introduces request/response store filters in the base provider invocation pipeline. |
| dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs | Introduces request/response store filters for chat history storage. |
| dotnet/src/Microsoft.Agents.AI.Abstractions/MessageAIContextProvider.cs | Threads new request/response store filters through message-based context providers. |
| dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProviderOptions.cs | Adds request/response storage filter options for in-memory chat history. |
| dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs | Wires new options into the base ChatHistoryProvider constructor. |
| dotnet/src/Microsoft.Agents.AI/TextSearchProviderOptions.cs | Adds request/response storage filters for TextSearchProvider state updates. |
| dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs | Passes the new filters into the base class. |
| dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProviderOptions.cs | Adds request/response storage filters for chat-history-backed memory. |
| dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs | Passes the new filters into the base class. |
| dotnet/src/Microsoft.Agents.AI.Mem0/Mem0ProviderOptions.cs | Adds request/response storage filters for Mem0 extraction. |
| dotnet/src/Microsoft.Agents.AI.Mem0/Mem0Provider.cs | Passes the new filters into the base class. |
| dotnet/src/Microsoft.Agents.AI.FoundryMemory/FoundryMemoryProviderOptions.cs | Adds request/response storage filters for Foundry memory extraction. |
| dotnet/src/Microsoft.Agents.AI.FoundryMemory/FoundryMemoryProvider.cs | Passes the new filters into the base class. |
| dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs | Adds request/response storage filter parameters and forwards them to the base class. |
| dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowChatHistoryProvider.cs | Removes now-stale base ctor call; relies on new default ctor parameters. |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AIContextProviderTests.cs | Adds/updates tests validating request/response filter behavior. |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/ChatHistoryProviderTests.cs | Updates tests to validate filtered response storage behavior. |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/InMemoryChatHistoryProviderTests.cs | Updates tests to use the renamed request filter option. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/Data/TextSearchProviderTests.cs | Updates tests to use the renamed request filter option. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/Memory/ChatHistoryMemoryProviderTests.cs | Updates tests to use the renamed request filter option. |
| dotnet/tests/Microsoft.Agents.AI.Mem0.UnitTests/Mem0ProviderTests.cs | Updates tests to use the renamed request filter option. |
| dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosChatHistoryProviderTests.cs | Updates tests for renamed ctor parameter and new semantics. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgent_ChatHistoryManagementTests.cs | Updates mocks due to updated base ctor signatures. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgent_BackgroundResponsesTests.cs | Updates mocks due to updated base ctor signatures. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgentTests.cs | Updates mocks due to updated base ctor signatures. |
| dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgentOptionsTests.cs | Updates mocks due to updated base ctor signatures. |
| dotnet/samples/02-agents/Agents/Agent_Step17_AdditionalAIContext/Program.cs | Updates sample to use the renamed request filter option. |
| dotnet/samples/02-agents/Agents/Agent_Step04_3rdPartyChatHistoryStorage/Program.cs | Removes stale base ctor call after signature change. |
| dotnet/samples/02-agents/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs | Updates sample to use the renamed request filter option. |
| dotnet/samples/02-agents/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs | Updates sample to use the renamed request filter option. |
| dotnet/samples/01-get-started/04_memory/Program.cs | Removes stale base ctor call after signature change. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation and Context
#4256
Description
Contribution Checklist