8000 Random "MALFORMED_FUNCTION_CALL" Error from Gemini Agent · Issue #1521 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content
Random "MALFORMED_FUNCTION_CALL" Error from Gemini Agent #1521
Open
@onesnzerossc

Description

@onesnzerossc

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

Image

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.

Metadata

Metadata

Assignees

Labels

bot_triagedcoreIssues related to the core interface and implementationdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0