mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 09:12:39 +00:00
- Fix sync streaming handler: check accumulated_tool_args (from deltas) instead of only checking tool_calls from last chunk. This mirrors the async streaming handler fix. - Add isinstance(tool_calls, list) checks in non-streaming handlers for type safety (prevents false positives from auto-created MagicMock attrs). - Update test_handle_streaming_tool_calls_no_available_functions to verify tool calls are returned (not discarded) when available_functions is None, matching the corrected behavior from issue #4788. - Emit LLM completion event before returning accumulated tool calls from streaming handler. Co-Authored-By: João <joao@crewai.com>