-
Notifications
You must be signed in to change notification settings - Fork 4.4k
.Net: Enable argument types retention in handoff orchestration. #13367
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
.Net: Enable argument types retention in handoff orchestration. #13367
Conversation
… the handoff orchestration.
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 fixes an issue where MCP function arguments with complex types (e.g., List<string>) were being incorrectly deserialized as strings instead of retaining their original type information in handoff orchestration scenarios.
Key Changes:
- Enabled
RetainArgumentTypesinFunctionChoiceBehavioroptions withinHandoffActor.CreateInvokeOptions() - Ensures function arguments are deserialized as
JsonElementobjects to preserve type information - Aligns the handoff orchestration behavior with OpenAI Response agents and MCP samples
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR fixes the issue when an MCP function is called with an argument that doesn't match the expected parameter type.
From chat:
When we tested it using Semantic Kernel without MCP, it returned the data in the correct format. However, when we integrated it into the tool (one API Server where we initialize the Kernel and another MCP Server with all the functions), we get the incorrect format:
