Skip to content

.NET: [BREAKING] Remove UserInputRequests property - #3682

Merged
westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:remove-userinputrequests-prop
Feb 5, 2026
Merged

.NET: [BREAKING] Remove UserInputRequests property#3682
westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:remove-userinputrequests-prop

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation and Context

Updating based on review feedback: #2541

Description

  • Removing the UserInputRequests property from AgentResponse and AgentResponseUpdate, since users often need to filter further anyway, and there isn't a clear consensus as to what constitutes a user input request. Can add back later if there is more consensus.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

CopilotAI review requested due to automatic review settings February 4, 2026 19:18
@markwallace-microsoftMark Wallace (markwallace-microsoft) added the .NET Usage: [Issues, PRs], Target: .Net label Feb 4, 2026
@github-actionsgithub-actionsBot changed the title [BREAKING] Remove UserInputRequests property.NET: [BREAKING] Remove UserInputRequests propertyFeb 4, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 UserInputRequests property from AgentResponse and AgentResponseUpdate classes
  • Removed unused System.Linq imports 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
FileDescription
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.csRemoved UserInputRequests property and unused System.Linq import
dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.csRemoved UserInputRequests property and unused System.Linq import
dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.csRemoved unit tests for deleted UserInputRequests property
dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.csRemoved unit tests for deleted UserInputRequests property
dotnet/samples/M365Agent/AFAgentApplication.csUpdated to use explicit filtering for function approval requests with updated comments
dotnet/samples/GettingStarted/ModelContextProtocol/ResponseAgent_Hosted_MCP/Program.csUpdated to filter MCP tool approval requests explicitly, using explicit types
dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/Program.csUpdated to filter MCP tool approval requests explicitly, using explicit types
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step12_Middleware/Program.csUpdated middleware to filter function approval requests explicitly
dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step04_UsingFunctionToolsWithApprovals/Program.csUpdated to filter function approval requests explicitly, using explicit types
dotnet/samples/GettingStarted/Agents/Agent_Step14_Middleware/Program.csUpdated middleware to filter function approval requests explicitly
dotnet/samples/GettingStarted/Agents/Agent_Step04_UsingFunctionToolsWithApprovals/Program.csUpdated to filter function approval requests explicitly, using explicit types

@westey-m
westey (westey-m) added this pull request to the merge queueFeb 4, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Feb 4, 2026
@westey-m
westey (westey-m) added this pull request to the merge queueFeb 5, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Feb 5, 2026
@westey-m
westey (westey-m) added this pull request to the merge queueFeb 5, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Feb 5, 2026
@westey-m
westey (westey-m) added this pull request to the merge queueFeb 5, 2026
Merged via the queue into microsoft:main with commit aa88195Feb 5, 2026
14 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NETUsage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@westey-m@SergeyMenshykh@markwallace-microsoft