Python: Fix AzureAIClient tool call bug for AG-UI use (#3148)

* Fiz AzureAIClient tool call bug

* Address copilot feedback
This commit is contained in:
Evan Mattson
2026-01-10 03:53:15 +09:00
committed by GitHub
Unverified
parent d28ad2d7df
commit 6445b6b3a6
2 changed files with 67 additions and 15 deletions
@@ -160,10 +160,10 @@ class AgentFrameworkEventBridge:
logger.warning(f"FunctionCallContent missing name and call_id. args_length={args_length}")
tool_call_id = self._coalesce_tool_call_id(content)
# Only emit ToolCallStartEvent once per tool call (when it's a new tool call)
if content.name and tool_call_id != self.current_tool_call_id:
self.streaming_tool_args = ""
self.state_delta_count = 0
if content.name:
self.current_tool_call_id = tool_call_id
self.current_tool_call_name = content.name