You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook #6746
The Python agent-framework-github-copilot provider currently enforces function approval itself: it wraps every FunctionTool in an SDK tool-handler that, for tools declared with approval_mode="always_require", awaits an on_function_approval callback before executing (denying by default when none is configured).
Since the GitHub Copilot SDK already provides a native pre-execution hook (on_pre_tool_use) that can return "ask" and route to on_permission_request, this AF-level callback duplicates SDK functionality. For consistency with the .NET provider (see #6671), Python should adopt the same model:
Install a default on_pre_tool_use hook (only when the user hasn't supplied their own) that returns "ask" for approval_mode="always_require" tools and defers otherwise.
If the user supplies their own on_pre_tool_use, theirs takes precedence; document it and log a warning when an approval-required tool would go unenforced.
Remove the bespoke on_function_approval enforcement path.
changed the title [-]Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/-][+].NET: Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/+]on Jun 25, 2026
changed the title [-].NET: Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/-][+]Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/+]on Jun 25, 2026
Activity
[-]Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/-][+].NET: Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/+][-].NET: Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/-][+]Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook[/+]Python: Align GitHub Copilot provider function approval to use SDK on…