Skip to content

Commit 0531e86

Browse files
committed
docs: Update progressive SSE streaming to be enabled by default
- Change progressive SSE streaming from experimental to default-enabled - Add documentation for function call argument streaming via partial_args - Update environment variable usage to show how to disable (instead of enable) - Add warning about trade-offs when using legacy behavior
1 parent 744411b commit 0531e86

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docs/streaming/dev-guide/part4.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,26 +223,40 @@ sequenceDiagram
223223

224224
### Progressive SSE Streaming
225225

226-
**Progressive SSE streaming** is an experimental feature that enhances how SSE mode delivers streaming responses. When enabled, this feature improves response aggregation by:
226+
**Progressive SSE streaming** is a feature that enhances how SSE mode delivers streaming responses. This feature improves response aggregation by:
227227

228228
- **Content ordering preservation**: Maintains the original order of mixed content types (text, function calls, inline data)
229229
- **Intelligent text merging**: Only merges consecutive text parts of the same type (regular text vs thought text)
230230
- **Progressive delivery**: Marks all intermediate chunks as `partial=True`, with a single final aggregated response at the end
231231
- **Deferred function execution**: Skips executing function calls in partial events, only executing them in the final aggregated event to avoid duplicate executions
232+
- **Function call argument streaming**: Supports progressive building of function call arguments through `partial_args`, enabling real-time display of function call construction
232233

233-
**Enabling the feature:**
234+
**Default Behavior:**
235+
236+
Progressive SSE streaming is **enabled by default** in ADK. This means when you use `StreamingMode.SSE`, you automatically benefit from these improvements without any configuration.
237+
238+
**Disabling the feature (if needed):**
234239

235-
This is an experimental (WIP stage) feature disabled by default. Enable it via environment variable:
240+
If you need to revert to the legacy SSE streaming behavior (simple text accumulation), you can disable it via environment variable:
236241

237242
```bash
238-
export ADK_ENABLE_PROGRESSIVE_SSE_STREAMING=1
243+
export ADK_ENABLE_PROGRESSIVE_SSE_STREAMING=0
239244
```
240245

241-
**When to use:**
246+
!!! warning "Legacy Behavior Trade-offs"
247+
248+
Disabling progressive SSE streaming reverts to simple text accumulation, which:
249+
- May lose original content ordering when mixing text and function calls
250+
- Does not support function call argument streaming via `partial_args`
251+
- May produce duplicate merged text events in addition to the final aggregated event
252+
- Is provided for backward compatibility only—new applications should use the default progressive mode
253+
254+
**When progressive SSE streaming helps:**
242255

243-
- You're using `StreamingMode.SSE` and need better handling of mixed content types (text + function calls)
256+
- You're using `StreamingMode.SSE` and have mixed content types (text + function calls)
244257
- Your responses include thought text (extended thinking) mixed with regular text
245258
- You want to ensure function calls execute only once after complete response aggregation
259+
- You need to display function call construction in real-time as arguments stream in
246260

247261
**Note:** This feature only affects `StreamingMode.SSE`. It does not apply to `StreamingMode.BIDI` (the focus of this guide), which uses the Live API's native bidirectional protocol.
248262

0 commit comments

Comments
 (0)