Rename FunctionCallContent.InvocationRequired to InformationalOnly with inverted polarity#7262
Merged
stephentoub merged 3 commits intomainfrom Feb 4, 2026
Merged
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Invert polarity of InvocationRequired and rename to InformationalOnly
Rename FunctionCallContent.InvocationRequired to InformationalOnly with inverted polarity
Feb 4, 2026
stephentoub
approved these changes
Feb 4, 2026
src/Libraries/Microsoft.Extensions.AI.Abstractions/CHANGELOG.md
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the FunctionCallContent.InvocationRequired property to InformationalOnly and inverts its polarity. The property now defaults to false (was true), meaning function calls require processing unless explicitly marked as informational-only. This is a breaking API change that improves clarity by using positive semantics (what something is) rather than negative semantics (what something requires).
Changes:
- Renamed
InvocationRequiredtoInformationalOnlywith inverted default value (false instead of true) - Updated all 6 usages in
FunctionInvokingChatClient.cswith proper polarity inversion - Updated test names, assertions, and comments across 3 test files to reflect the new property name and semantics
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Libraries/Microsoft.Extensions.AI.Abstractions/Contents/FunctionCallContent.cs |
Renamed property from InvocationRequired to InformationalOnly, changed default from true to false, and updated XML documentation |
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs |
Updated 4 boolean checks to use !InformationalOnly instead of InvocationRequired, and 2 assignments to set InformationalOnly = true instead of InvocationRequired = false |
test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/Contents/FunctionCallContentTests.cs |
Updated 5 test method names and all assertions to use InformationalOnly with correct polarity |
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/FunctionInvokingChatClientTests.cs |
Updated 4 test method names, all assertions, comments, and test data creation to use InformationalOnly with inverted polarity |
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/FunctionInvokingChatClientApprovalsTests.cs |
Updated 1 test method name and assertions to use InformationalOnly with correct polarity |
src/Libraries/Microsoft.Extensions.AI.Abstractions/Microsoft.Extensions.AI.Abstractions.json |
Updated API manifest to reflect the property rename |
src/Libraries/Microsoft.Extensions.AI.Abstractions/CHANGELOG.md |
Updated changelog entry to describe the new property |
jozkee
approved these changes
Feb 4, 2026
This was referenced Feb 11, 2026
Merged
Bump Microsoft.Extensions.ServiceDiscovery from 10.2.0 to 10.3.0
askpt/openfeature-aspire-sample#351
Merged
This was referenced Feb 16, 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.
Renames
FunctionCallContent.InvocationRequiredtoInformationalOnlyand inverts the polarity. The property now defaults tofalse(wastrue), meaning function calls require processing unless explicitly marked as informational.Changes
FunctionCallContentTests,FunctionInvokingChatClientTests, andFunctionInvokingChatClientApprovalsTestsMigration
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Microsoft Reviewers: Open in CodeFlow