Skip to content

ModelTurnLoopState

Mutable per-call state shared with the outer speaking pipeline. A loop must update it as tool calls settle so host-control and sentence gates can observe the current turn without waiting for a second model request.

optional control?: TurnControl;

optional incomplete?: object;

Set when the model call ended on an abnormal FinishReason rather than stop.

Name Type

reason

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

step

number


toolCallsMade: ToolCallRecord[];

toolMessages: ModelMessage[];

toolResults: ToolResultRecord[];

optional usage?: TurnUsageSnapshot;