Skip to content

docs(streaming): fix inverted env var, wrong defaults, broken snippets - #2023

Open
GWeale wants to merge 2 commits into
google:mainfrom
GWeale:docs-audit-streaming
Open

docs(streaming): fix inverted env var, wrong defaults, broken snippets#2023
GWeale wants to merge 2 commits into
google:mainfrom
GWeale:docs-audit-streaming

Conversation

@GWeale

@GWeale GWeale commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Corrections to the docs/streaming/ pages: snippets that can't run, an environment variable documented with inverted polarity, and several defaults documented backwards.

Changes

  • docs/streaming/dev-guide/part4.md — progressive SSE streaming was documented as off-by-default and enabled with export ADK_ENABLE_PROGRESSIVE_SSE_STREAMING=1; it is on by default and turned off with ADK_DISABLE_PROGRESSIVE_SSE_STREAMING=1. Also: response_modalities is list[Modality], not list[str]; run_live() does not read streaming_mode (that selects NONE vs SSE for run_async()); noted the reconnect loop re-raises after 5 consecutive failures; a run_live(session=...) call now passes user_id / session_id.
  • docs/streaming/dev-guide/part3.md — the tool example was a non-async def containing await, and took an InvocationContext; it is now async def taking a ToolContext, using tool_context.state and tool_context.save_artifact(), with a warning that a tool cannot set end_invocation (it only gets a copy of the InvocationContext). Also: a streaming-display snippet was gated on if not event.partial: (that's the final merged event, not the incremental ones); transcriptions were described as always complete when incremental chunks arrive with partial=True; audio artifact saving and cache flushing are gated on RunConfig.save_live_blob; transcription is on by default; aggregation happens in GeminiLlmConnection.receive(), not a StreamingResponseAggregator; streaming-tool queues are registered lazily on first call rather than up front, and the line-number code references were replaced with function names; fixed an indentation error that placed await play_audio(...) outside its loop.
  • docs/streaming/dev-guide/part2.mdLiveRequest was missing its partial and state_delta fields; the claim that ADK auto-creates an event loop for LiveRequestQueue is wrong (nothing is created — the underlying asyncio.Queue binds late, on first wait); and the automatic close() applies to ADK's internal CFC queue, not to a queue you create and pass to run_live().
  • docs/streaming/dev-guide/part1.md — the Gemini API version was listed as v1beta; it is v1alpha. A missing session raises SessionNotFoundError (a ValueError subclass), and Runner(..., auto_create_session=True) avoids it.
  • docs/streaming/configuration.md — added that input_audio_transcription / output_audio_transcription default to AudioTranscriptionConfig(), not None, so both sides are transcribed unless you opt out, plus a pointer to the full RunConfig reference.
  • docs/streaming/dev-guide/part5.md — two Agent(...) snippets omitted the required name=.
  • docs/streaming/streaming-tools.mdPart.from_text(prompt_text)Part.from_text(text=prompt_text); the argument is keyword-only.

How this was produced

Part of a page-by-page audit of the Python docs against the google/adk-python v2.5.0 source: every import resolved against a real 2.5.0 install, every constructor kwarg checked against model_fields / inspect.signature, every documented default read off the field. A second independent pass re-derived each claim from source rather than trusting the finding, and a third conformed the new wording to the surrounding pages. mkdocs build --strict is clean.

Only Python tabs and language-neutral prose were touched — this audit had no ground truth for the Go / Java / TypeScript SDKs.

Split out of a larger audit branch so each area can be reviewed on its own.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit aa360ba
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a6a9993163ce7000841c09b
😎 Deploy Preview https://deploy-preview-2023--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant