Is your feature request related to a problem? Please describe.
Some LLMs (e.g., Sonnet) return both text and function call(s), which makes it difficult to handle responses in streaming mode. This issue also affects the ADK web UI, as shown in the attached image.
Describe the solution you'd like
Use the same event ID for all text chunks belonging to a single LLM response — but only for the text chunks. This allows the client to group and manage them correctly. (Applying the same ID to all parts, including the function call, would cause issues such as #297 .)
Describe alternatives you've considered
Add an additional field to identify a single LLM call. However, this would be a breaking change.
Additional context
Red: before function call (partial: true)
Green: after function call (partial: true)
Blue: after function call (partial: false)
| id |
partial |
content |
timestamp |
| gpXKpEQM |
true |
I |
1748508250.12534 |
| 7AWtc3D1 |
true |
'll check the current weather in |
1748508250.12534 |
| BD22GY1Z |
true |
New York for you |
1748508250.12534 |
| YjwN742c |
true |
. |
1748508250.12534 |
| kqGe3C4E |
false |
functionCall: get_weather(city="New York") |
1748508250.12534 |
| I1aQFpJL |
null |
functionResponse: The weather in New York is sunny... |
1748508252.415856 |
| 3Ns77VqL |
true |
The weather in New |
1748508252.417286 |
| EO3CB5mD |
true |
York is currently |
1748508252.417286 |
| EtVvvHEC |
true |
sunny with a temperature |
1748508252.417286 |
| ZbPkcEDI |
true |
of 25° |
1748508252.417286 |
| OZGIetlW |
true |
C (77°F). It |
1748508252.417286 |
| hMfOtwCo |
true |
's a beautiful day |
1748508252.417286 |
| irK5ZS4t |
true |
there! |
1748508252.417286 |
| JJlRueia |
false |
The weather in New York is currently sunny with a temperature of 25°C (77°F)... |
1748508252.417286 |
Is your feature request related to a problem? Please describe.
Some LLMs (e.g., Sonnet) return both text and function call(s), which makes it difficult to handle responses in streaming mode. This issue also affects the ADK web UI, as shown in the attached image.
Describe the solution you'd like
Use the same event ID for all text chunks belonging to a single LLM response — but only for the text chunks. This allows the client to group and manage them correctly. (Applying the same ID to all parts, including the function call, would cause issues such as #297 .)
Describe alternatives you've considered
Add an additional field to identify a single LLM call. However, this would be a breaking change.
Additional context
Red: before function call (partial: true)
Green: after function call (partial: true)
Blue: after function call (partial: false)