.NET: [BREAKING] Remove UserInputRequests property#3682
Open
westey-m wants to merge 3 commits intomicrosoft:mainfrom
Open
.NET: [BREAKING] Remove UserInputRequests property#3682westey-m wants to merge 3 commits intomicrosoft:mainfrom
westey-m wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request removes the UserInputRequests convenience property from AgentResponse and AgentResponseUpdate classes, requiring users to manually filter content for user input requests. This breaking change addresses feedback from issue #2541, where there wasn't clear consensus on what constitutes a user input request.
Changes:
- Removed
UserInputRequestsproperty fromAgentResponseandAgentResponseUpdateclasses - Removed unused
System.Linqimports from abstraction files - Updated all sample code to use explicit filtering with
SelectMany(m => m.Contents).OfType<T>() - Removed associated unit tests for the deleted properties
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs | Removed UserInputRequests property and unused System.Linq import |
| dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs | Removed UserInputRequests property and unused System.Linq import |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs | Removed unit tests for deleted UserInputRequests property |
| dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs | Removed unit tests for deleted UserInputRequests property |
| dotnet/samples/M365Agent/AFAgentApplication.cs | Updated to use explicit filtering for function approval requests with updated comments |
| dotnet/samples/GettingStarted/ModelContextProtocol/ResponseAgent_Hosted_MCP/Program.cs | Updated to filter MCP tool approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/Program.cs | Updated to filter MCP tool approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step12_Middleware/Program.cs | Updated middleware to filter function approval requests explicitly |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step04_UsingFunctionToolsWithApprovals/Program.cs | Updated to filter function approval requests explicitly, using explicit types |
| dotnet/samples/GettingStarted/Agents/Agent_Step14_Middleware/Program.cs | Updated middleware to filter function approval requests explicitly |
| dotnet/samples/GettingStarted/Agents/Agent_Step04_UsingFunctionToolsWithApprovals/Program.cs | Updated to filter function approval requests explicitly, using explicit types |
SergeyMenshykh
approved these changes
Feb 4, 2026
markwallace-microsoft
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Updating based on review feedback: #2541
Description
Contribution Checklist