mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 08:42:38 +00:00
Fixes #4347 - Crew streaming chunks were missing task metadata (task_id/task_name empty). The issue was in _create_stream_chunk() which only used current_task_info for task_name and task_id, ignoring the values from the LLMStreamChunkEvent. This is inconsistent with how agent_role and agent_id were handled (preferring event values). The fix updates _create_stream_chunk() to use event.task_name and event.task_id when available, falling back to current_task_info values otherwise. Added test to verify streaming chunks contain task metadata from events. Co-Authored-By: João <joao@crewai.com>