Skip to content

adk docs: confirm or drop "usage lands on the last one" for streaming #1219

Closed

Description

@tommasobolis

Current behavior (verified)

website/content/frameworks/adk.mdx:233 says that when streaming, the callback runs once per partial response and usage lands on the last one.

Offline, a streamed SSE model() / gemini() Runner run whose stream ends with a usage chunk (prompt 3, completion 2, total 5) shows donkey.last_call.total_tokens is None in every callback, including the final one. This holds on google-adk 2.12.0 and 2.13.0, with or without the #1214 bridge, so #1214 didn't cause it.

Proposal

  • Find where streamed usage is lost: in the transport's SSE usage capture or in ADK's aggregation.
  • Then either fix it with a test, or soften the sentence (§0.3: no unconfirmed behavior stated as fact).

Cross-surface impact

  • Nextra docs site: in scope (frameworks/adk.mdx).
  • integrations/adk.py, core/transport (streamed usage): maybe in scope, depending on the root cause.
  • docs/verified-apis.md: maybe, the §8 ADK rows.
  • Other frameworks: check whether the openai-agents streaming docs make a similar claim.
  • CLI, registry/, tools/: not affected.
  • TypeScript parity: not affected; no TS code exists yet.

Refs #1214.

Activity

  1. added
    documentationImprovements or additions to documentation
    area:docsDocs site, README, verified-apis
    size/s~half day, one file
    priority/p3Nice-to-have, not blocking
    area:adaptersFramework adapters and connection_kwargs() (1.8, 2.8)
    on Oct 25, 2026
  2. self-assigned this
    on Oct 26, 2026
  3. tommasobolis commented on Oct 26, 2026

    @tommasobolis
    CollaboratorAuthor

    Fixed by #1245 (merged as 3154546).

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

Metadata

Metadata

Assignees

Labels

area:adaptersFramework adapters and connection_kwargs() (1.8, 2.8)area:docsDocs site, README, verified-apisdocumentationImprovements or additions to documentationpriority/p3Nice-to-have, not blockingsize/s~half day, one file

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions