semantic-kernel
semantic-kernel copied to clipboard
.Net: Respect custom ToolChoice and ParallelToolCallsEnabled options in OpenAIResponseAgent
Motivation and Context
Fixes #13253 by respecting custom ToolChoice and ParallelToolCallsEnabled options in OpenAIResponseAgent.
Description
Previously, when creating ResponseCreationOptions for OpenAIResponseAgent with kernel plugins, ToolChoice will be set to Auto and ParallelToolCallsEnabled will be set to true regardless of the options provided when creating the agent.
This change fixes the problem by setting the default options only when they are not provided, respecting the custom options.
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone :smile: