StreamOptions
Defined in: src/models/model.ts:214
Options interface for configuring streaming model invocation.
Properties
Section titled “Properties”cancelSignal?
Section titled “cancelSignal?”optional cancelSignal?: AbortSignal;Defined in: src/models/model.ts:219
Optional cancellation signal that a provider implementation can forward to abort an in-flight request. Support is provider-dependent.
systemPrompt?
Section titled “systemPrompt?”optional systemPrompt?: SystemPrompt;Defined in: src/models/model.ts:225
System prompt to guide the model’s behavior. Can be a simple string or an array of content blocks for advanced caching.
toolSpecs?
Section titled “toolSpecs?”optional toolSpecs?: ToolSpec[];Defined in: src/models/model.ts:230
Array of tool specifications that the model can use.
toolChoice?
Section titled “toolChoice?”optional toolChoice?: ToolChoice;Defined in: src/models/model.ts:235
Controls how the model selects tools to use.
modelState?
Section titled “modelState?”optional modelState?: StateStore;Defined in: src/models/model.ts:243
Runtime state for model providers that manage server-side conversation state.
The model can read and write this state during streaming (e.g., to store a
response ID for conversation chaining). Mutations via set/delete are
visible to the caller after the stream completes.
dynamicTrailingBlocks?
Section titled “dynamicTrailingBlocks?”optional dynamicTrailingBlocks?: number;Defined in: src/models/model.ts:246
How many trailing blocks of the last user message are rebuilt on every call.