Skip to content

.NET: [BREAKING] Remove UserInputRequests property#3682

Open
westey-m wants to merge 3 commits intomicrosoft:mainfrom
westey-m:remove-userinputrequests-prop
Open

.NET: [BREAKING] Remove UserInputRequests property#3682
westey-m wants to merge 3 commits intomicrosoft:mainfrom
westey-m:remove-userinputrequests-prop

Conversation

@westey-m
Copy link
Contributor

@westey-m westey-m commented Feb 4, 2026

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.

Copilot AI review requested due to automatic review settings February 4, 2026 19:18
@github-actions github-actions bot changed the title [BREAKING] Remove UserInputRequests property .NET: [BREAKING] Remove UserInputRequests property Feb 4, 2026
Copy link
Contributor

Copilot AI left a comment

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
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

@westey-m westey-m enabled auto-merge February 4, 2026 19:34
@westey-m westey-m mentioned this pull request Feb 4, 2026
61 tasks
@westey-m westey-m added this pull request to the merge queue Feb 4, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants