Skip to content

TurnResult

optional confidence?: number;

optional control?: TurnControl;

optional gateScope?: "advisory";

Native realtime post-hoc gate: provider audio already played; gate is advisory only.


optional incomplete?: object;

Set when the model loop exited on an abnormal FinishReason rather than stop.

Name Type

reason

"error" | "length" | "content-filter" | "other"

step

number


optional interrupted?: boolean;

optional runId?: string;

The run this turn executed. Conversation turns use the session id; a newly minted flow run is a distinct id.


text: string;

optional toolMessages?: ModelMessage[];

AI-SDK tool round-trip messages (assistant tool-call + tool-result) produced this turn, so the host loop can persist them to history in free conversation (G18).


toolResults: ToolResultRecord[];

optional truncateAt?: number;

optional usage?: TurnUsageSnapshot;

Real token usage from the AI SDK when the driver captured it.