Files
crewAI/lib
Devin AI 4938654ede fix: handle Gemini function calls without text content
When Gemini returns a function call without text content, the response
was being returned as empty/None, causing 'Invalid response from LLM
call - None or empty' errors.

This fix:
1. Adds _format_function_call_as_action() to format function calls as
   'Action: <name>\nAction Input: <args>' text that CrewAI's parser
   can understand
2. Adds _extract_text_from_parts() to properly extract text from
   response parts instead of relying on response.text
3. Updates _process_response_with_tools() to use the fallback format
   when no text content is available
4. Updates _finalize_streaming_response() with the same fallback logic

Fixes #4093

Co-Authored-By: João <joao@crewai.com>
2025-12-16 08:44:25 +00:00
..