docs(runtime): correct TypeScript claims in RunConfig streaming docs - #2101
Open
kazunori279 wants to merge 2 commits into
Open
docs(runtime): correct TypeScript claims in RunConfig streaming docs#2101kazunori279 wants to merge 2 commits into
kazunori279 wants to merge 2 commits into
Conversation
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.
✅ Deploy Preview for adk-docs-preview ready!
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The streaming sections of
docs/runtime/runconfig.mdtell 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/adk1.6.0 (Node 25,gemini-2.5-flashover Vertex AI) and by readinggoogle/adk-jsat HEAD.1. The
BIDIbullet pointed at an entry point TypeScript does not haveIt read: "For bidirectional streaming, use
runner.run_live()instead." — on a page tagged for TypeScript.Runnerexposes norunLive()(runner.tshas only a TODO) andLlmAgent.runLiveFlowthrowsError: LlmAgent.runLiveFlow not implemented.The bullet also omitted the behaviour that actually bites: passing
BIDIdoes not error, does not warn, and does not stream. Measured on the same agent and prompt:streamingModeSSENONE)BIDIA 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 runThe snippet was copy-pasteable and produced no answer. With the documented config:
The throw is at
llm_agent.tsin thecallLlmAsyncpath and is surfaced as an error event, so a reader who does not checkevent.errorCodesees 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 sectionThe section documents
run_live()parameters and carried a TypeScript support tag plus a TypeScript snippet. The three fields the TypeScriptRunConfigdoes declare —enableAffectiveDialog,proactivity,realtimeInputConfig— are assigned only intollmRequest.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../live/index.mdresolvesdocs/runtime/runconfig.md