Description
When StreamingMode.SSE is enabled (without PROGRESSIVE_SSE_STREAMING), an agent that produces
both a text response and one or more tool calls in the same turn works correctly on the first
user turn but silently drops tool calls on every subsequent turn.
Steps to reproduce
-
Create an LlmAgent with two lightweight tools, for example:
showForecastChart — accepts a location string, returns "Chart displayed."
showQuickActions — accepts an array of action labels, returns "Actions displayed."
-
Write a system prompt that instructs the agent to always reply with a short text summary
and call both tools on every turn.
-
Run the agent with streamingMode: StreamingMode.NONE (the default). Send two consecutive
user messages. Verify that both tools are called on both turns.
-
Run the exact same agent and conversation with streamingMode: StreamingMode.SSE
(PROGRESSIVE_SSE_STREAMING disabled, which is the default). Send the same two messages.
-
Observe that on the later turns one or more tool calls that appeared in step 3 are absent.
Comparing candidatesTokenCount and thoughtsTokenCount in usageMetadata between the two
modes confirms the model actually generates a shorter response: the missing tool
calls are not produced by Gemini API.
Expected behavior
The agent should call the same tools in SSE mode as it does with SSE disabled.
Environment
@google/adk version: 1.1.0
- Model:
gemini-2.5-flash
- Runtime: Node.js
PROGRESSIVE_SSE_STREAMING: disabled (default)
Note: possibly related to #289
Description
When
StreamingMode.SSEis enabled (withoutPROGRESSIVE_SSE_STREAMING), an agent that producesboth a text response and one or more tool calls in the same turn works correctly on the first
user turn but silently drops tool calls on every subsequent turn.
Steps to reproduce
Create an
LlmAgentwith two lightweight tools, for example:showForecastChart— accepts alocationstring, returns"Chart displayed."showQuickActions— accepts an array of action labels, returns"Actions displayed."Write a system prompt that instructs the agent to always reply with a short text summary
and call both tools on every turn.
Run the agent with
streamingMode: StreamingMode.NONE(the default). Send two consecutiveuser messages. Verify that both tools are called on both turns.
Run the exact same agent and conversation with
streamingMode: StreamingMode.SSE(
PROGRESSIVE_SSE_STREAMINGdisabled, which is the default). Send the same two messages.Observe that on the later turns one or more tool calls that appeared in step 3 are absent.
Comparing
candidatesTokenCountandthoughtsTokenCountinusageMetadatabetween the twomodes confirms the model actually generates a shorter response: the missing tool
calls are not produced by Gemini API.
Expected behavior
The agent should call the same tools in SSE mode as it does with SSE disabled.
Environment
@google/adkversion:1.1.0gemini-2.5-flashPROGRESSIVE_SSE_STREAMING: disabled (default)Note: possibly related to #289