Skip to content

StreamOptions

Defined in: src/models/model.ts:108

Options interface for configuring streaming model invocation.

optional systemPrompt?: SystemPrompt;

Defined in: src/models/model.ts:113

System prompt to guide the model’s behavior. Can be a simple string or an array of content blocks for advanced caching.


optional toolSpecs?: ToolSpec[];

Defined in: src/models/model.ts:118

Array of tool specifications that the model can use.


optional toolChoice?: ToolChoice;

Defined in: src/models/model.ts:123

Controls how the model selects tools to use.


optional modelState?: StateStore;

Defined in: src/models/model.ts:131

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.