Skip to content
Discussion options

You must be logged in to vote

Response from ADK Answering Agent (experimental, answer may be inaccurate)

TLDR: The {"role": "model", "parts": []} content is a valid, though empty, response from the model. Your agent is likely crashing because your code is trying to access an element from the empty parts list without checking if the list is empty first. You should add a check to your event handling logic to ensure parts is not empty before accessing its elements.


Hello! Thank you for reaching out.

This is a great question. The behavior you're observing, where you receive {"role": "model", "parts": []} in the events table, is not an error but a valid, albeit empty, response from the model. This can occur for several re…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by caichuanwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
tracing [Component] This issue is related to OpenTelemetry tracing bot responded [Bot] This issue is responded by ADK bot
2 participants
Converted from issue

This discussion was converted from issue #3034 on October 08, 2025 21:32.