-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Python: Respect FunctionChoiceBehavior filters in OpenAI responses agent tools #13235
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
base: main
Are you sure you want to change the base?
Python: Respect FunctionChoiceBehavior filters in OpenAI responses agent tools #13235
Conversation
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 ensures that FunctionChoiceBehavior filters are properly respected when retrieving kernel function metadata in OpenAI responses agent tools. Previously, the code was ignoring these filters and always returning all available functions.
- Replaced the TODO comment with proper implementation of FunctionChoiceBehavior filter handling
- Added early returns for cases where kernel functions are disabled or no plugins exist
- Used conditional logic to apply filters when retrieving function metadata
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
python/semantic_kernel/agents/open_ai/responses_agent_thread_actions.py
Outdated
Show resolved
Hide resolved
python/semantic_kernel/agents/open_ai/responses_agent_thread_actions.py
Outdated
Show resolved
Hide resolved
1b57d35 to
30d70c1
Compare
|
@ymuichiro Thanks for the contribution. Please have a look at a failing test, thanks: https://github.com/microsoft/semantic-kernel/actions/runs/18583595889/job/52983055182?pr=13235#step:5:445 |
…ict in Responses agent
….com/ymuichiro/semantic-kernel into feat/respect-function-choice-filters
|
@moonbox3 |
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
issue: #13234
Summary
Contribution Checklist