[dotnet-port-fixes] Execute invocable tool siblings - #863
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the agent/harness/toolautocall middleware to correctly handle mixed assistant turns that contain both (a) invocable local function calls and (b) declaration-only (non-invocable) schema tool calls. The middleware now executes the invocable siblings, leaves declaration-only calls actionable for the caller, and only marks the executed local calls as informational-only, with a regression test covering the mixed-call ordering.
Changes:
- Added an execution-plan step to split function calls into “processable now” vs “terminate after processing” to avoid bypassing invocable siblings.
- Updated the main loop to use the plan for termination decisions and for selecting which calls to execute/mark informational-only.
- Added a regression test for mixed invocable + non-invocable schema tool calls to ensure invocable siblings still execute.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| agent/harness/toolautocall/autocall.go | Builds and uses a function-call execution plan so invocable siblings execute even when non-invocable schema tools are present. |
| agent/harness/toolautocall/autocall_test.go | Adds regression coverage ensuring mixed-call ordering executes the invocable tool and leaves declaration-only calls actionable. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Parity Review: ✅ ApprovedThis PR ports a behavior correction from the upstream .NET implementation (microsoft/agent-framework#7388, commit Scope: Internal to Parity check:
No cross-repo consistency issues found. No public API surface changed — the
|
Quim Muntal (qmuntal)
left a comment
There was a problem hiding this comment.
microsoft/agent-framework#7388 implements a new feature, it doesn't fix a bug, but the Go PR landed as part of the dotnet-port-fixes. AFAIU, this shouldn't have happened. Also, the port seems incomplete, as the .NET feature is opt-in.
|
Quim Muntal (@qmuntal) opened up #872 to improve the wording of the workflow prompts |
Summary
Updated
agent/harness/toolautocallso invocable local tool calls still run when the same assistant turn also includes declaration-only schema tools. The middleware now executes the invocable siblings, leaves declaration-only calls actionable for the caller, and marks only the executed local calls informational-only. Added a regression test covering mixed-call ordering.Ported .NET PRs
aaaa56bc60b6703b305664f196e74b284e425918, based ondotnet/src/Microsoft.Agents.AI/ChatClient/InvocableFunctionBypassingChatClient.csanddotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/InvocableFunctionBypassingChatClientTests.cs.Breaking Changes
No.
Tests and Examples
go test ./agent/harness/toolautocallTestFunctionInvoking_MixedInvocableAndNonInvocableSchemaToolExecutesInvocableSiblingNotes
agent/harness/toolautocall; no exported Go API changed.TerminateOnUnknownCallsbehavior for unknown tools and only realigned mixed invocable/declaration-only schema-tool handling.Closes #842