Description
Describe the bug
Occasionally, when running the agent, I encounter a response with the following error:
Raw response:
{"candidates":[{"content":{},"finish_reason":"MALFORMED_FUNCTION_CALL"}],"model_version":"gemini-2.0-flash","usage_metadata":{"prompt_token_count":2931,"prompt_tokens_details":[{"modality":"TEXT","token_count":2931}],"total_token_count":2931},"automatic_function_calling_history":[]}
To Reproduce
Steps to reproduce the behavior:
The error appears randomly during agent execution. Though there is no pattern to this, I've noticed this issue when you go out of sequence and ask questions to the root agent.
Expected behavior
I expect the agent to return a valid and complete response, or at least provide a clearer error message with function its trying to call and guidance on how to resolve the issue.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu 24.04.2 LTS
- Python version(python -V): 3.13.3
- ADK version(pip show google-adk): 1.1.1
Additional context
This issue kind of breaks the orchestration flow of the Root Agent.