mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-02 05:38:12 +00:00
Replace all direct params['messages'] accesses with params.get('messages', [])
or the locally validated 'messages' variable in _handle_non_streaming_response,
_ahandle_non_streaming_response, and _handle_streaming_response.
When the 'messages' key is missing from params, the code now gracefully handles
it instead of raising a confusing KeyError.
Closes #5164
Co-Authored-By: João <joao@crewai.com>