-
Notifications
You must be signed in to change notification settings - Fork 849
Rename FunctionCallContent.InvocationRequired to InformationalOnly with inverted polarity #7262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
src/Libraries/Microsoft.Extensions.AI.Abstractions/CHANGELOG.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 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 |
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