Skip to content

docs(runtime): correct TypeScript claims in RunConfig streaming docs - #2101

Open
kazunori279 wants to merge 2 commits into
mainfrom
kaz-runconfig-bidi-ts
Open

docs(runtime): correct TypeScript claims in RunConfig streaming docs#2101
kazunori279 wants to merge 2 commits into
mainfrom
kaz-runconfig-bidi-ts

Conversation

@kazunori279

Copy link
Copy Markdown
Collaborator

The streaming sections of docs/runtime/runconfig.md tell TypeScript readers three things that are not true of the TypeScript SDK. Surfaced while reviewing #2076, where a contributor hit the same gap from the other direction.

All three were verified by running the documented code against @google/adk 1.6.0 (Node 25, gemini-2.5-flash over Vertex AI) and by reading google/adk-js at HEAD.

1. The BIDI bullet pointed at an entry point TypeScript does not have

It read: "For bidirectional streaming, use runner.run_live() instead." — on a page tagged for TypeScript. Runner exposes no runLive() (runner.ts has only a TODO) and LlmAgent.runLiveFlow throws Error: LlmAgent.runLiveFlow not implemented.

The bullet also omitted the behaviour that actually bites: passing BIDI does not error, does not warn, and does not stream. Measured on the same agent and prompt:

streamingMode events yielded
SSE 6
omitted (default NONE) 1
BIDI 1, no error, no warning

A reader who reasons "bidi is a superset of sse" gets strictly worse behaviour than if they had asked for less. Now stated explicitly, with a warning admonition for the TypeScript case.

2. The TypeScript tab recommended supportCfc: true, which breaks the run

The snippet was copy-pasteable and produced no answer. With the documented config:

supportCfc=true:  events=1  text=""
   errorCode=UNKNOWN_ERROR  errorMessage="CFC is not yet supported in callLlmAsync"

supportCfc=false: events=2  text="Hello."

The throw is at llm_agent.ts in the callLlmAsync path and is surfaced as an error event, so a reader who does not check event.errorCode sees silence rather than a failure. Removed from the TypeScript snippet; the existing "Experimental" admonition now records the exact symptom.

3. "Configure live agents" claimed TypeScript support for a run_live()-only section

The section documents run_live() parameters and carried a TypeScript support tag plus a TypeScript snippet. The three fields the TypeScript RunConfig does declare — enableAffectiveDialog, proactivity, realtimeInputConfig — are assigned only into llmRequest.liveConnectConfig, which is consumed only by the live path that throws. They are typed but inert.

Removed the tag and the snippet, and added a note explaining why the fields exist and do nothing, so the next reader who finds them in the type does not have to work this out.

Checks

  • mkdocs build --strict — clean
  • New internal link ../live/index.md resolves
  • No changes outside docs/runtime/runconfig.md

The streaming sections of runtime/runconfig.md told TypeScript readers three
things that are not true of the TypeScript SDK.

- The BIDI bullet directed readers to `runner.run_live()`. That entry point
  does not exist in TypeScript: `Runner` exposes no `runLive()` and
  `LlmAgent.runLiveFlow` throws. The bullet also omitted that passing BIDI
  degrades to non-streaming with no error and no warning.
- The TypeScript tab recommended `supportCfc: true`. Copying it yields a
  single event with `errorCode: 'UNKNOWN_ERROR'` and
  `errorMessage: 'CFC is not yet supported in callLlmAsync'` and no response
  text at all. Removed from the snippet and documented in the existing
  experimental admonition.
- "Configure live agents" carried a TypeScript support tag and a TypeScript
  snippet, but the whole section describes `run_live()` parameters. The three
  fields the TypeScript `RunConfig` declares feed only `liveConnectConfig`,
  which nothing reachable consumes. Tag and snippet removed, with a note
  explaining why the fields exist but do nothing.

Verified against @google/adk 1.6.0 and adk-js at HEAD; `mkdocs build --strict`
is clean.
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 6ad872b
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a7d1d368264ea00081a6906
😎 Deploy Preview https://deploy-preview-2101--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.

The prose said "set the `streaming_mode` parameter" in a language-neutral
sentence, but the TypeScript property is `streamingMode` (as the TypeScript
code tab below it already shows).
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