-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Describe the bug
When the Gemini model returns multiple function calls in a single
response, the ADK fails to send the combined function responses back
to the API. The Gemini API rejects the payload with a protobuf
serialization error: "Proto field is not repeating, cannot start
list."
To Reproduce
Steps to reproduce the behavior:
- Install @google/adk@0.2.4
- Create an agent with multiple FunctionTool tools
- Send a prompt that causes Gemini to call 2+ tools simultaneously
- All tools execute successfully and return results
- See error:
400 Invalid JSON payload received. Unknown name "response" at
'contents[2].parts[0].function_response': Proto field is not
repeating, cannot start list.
Expected behavior
The ADK should properly format multiple function responses in a way
the Gemini API accepts, allowing the model to see all tool results
and generate a combined response.
Screenshots
N/A - error appears in console logs
Desktop (please complete the following information):
- OS: Windows 10
- TS version/environment: TypeScript 5.x, Node.js v22.20.0
- ADK version: @google/adk@0.2.4
Additional context
- Single tool calls work fine - issue only occurs with 2+
simultaneous tool responses - Tools execute successfully; the failure is in sending responses
back to Gemini - Model: gemini-3-flash-preview, Backend: VERTEX_AI
- Related Python ADK issue:
Addenable_parallel_tool_executionflag to LlmAgent adk-python#1076 - Workaround: Catch error and return fallback message, but model
never sees tool results