OptionalexpectedModalities to declare at session creation.
OptionalexpectedOptionallanguageInjects an alternative implementation of the LanguageModel global, for
tests and for embedding a stand-in. Defaults to
globalThis.LanguageModel.
OptionalmodelModel id used for registry matching. Defaults to chrome-on-device.
OptionalnormalizeRewrites the system prompt before a session is created.
This exists because of a specific and costly interaction with ADK. Every request is prefixed by ADK's identity processor with:
You are an agent. Your internal name is "<agent name>".
Under a ParallelAgent fan-out each child has a different name, so every
child produces a different system prompt, so the warm base session never
hits and each child pays a full create() — the most expensive call
available — precisely when the most calls are in flight.
Pass stripAdkIdentityPreamble to drop it. That is safe whenever agent transfer is disabled, because the identity line exists to support transfer. Leave it unset for multi-agent setups that route by name.
OptionalonReceives timing and context diagnostics.
OptionalonReceives bytes-loaded progress while the model downloads on first use.
OptionaltemperatureSampling temperature. Accepted only in extension contexts; on a plain web
page create() rejects it and the adapter retries without it.
OptionaltopSampling top-K. Subject to the same restriction as temperature.
Constructor options for ChromeBuiltInLlm.