Completion
Defined in: core/src/turn.ts:129
Properties
Section titled “Properties”finishReason
Section titled “finishReason”finishReason: FinishReason | null;Defined in: core/src/turn.ts:143
model: string;Defined in: core/src/turn.ts:144
provider?
Section titled “provider?”optional provider?: string;Defined in: core/src/turn.ts:132
Present when the stream identifies the endpoint that answered.
reasoning
Section titled “reasoning”reasoning: string;Defined in: core/src/turn.ts:133
reasoningDetails?
Section titled “reasoningDetails?”optional reasoningDetails?: unknown[];Defined in: core/src/turn.ts:135
Present only where the provider sent one. See ChatMessage.reasoningDetails.
reasoningItems?
Section titled “reasoningItems?”optional reasoningItems?: ReasoningItems;Defined in: core/src/turn.ts:137
Present only where the provider sent them. See ChatMessage.reasoningItems.
text: string;Defined in: core/src/turn.ts:130
toolCalls
Section titled “toolCalls”toolCalls: ToolCall[];Defined in: core/src/turn.ts:141
The calls the model asked for, in index order, and empty when it asked for none. Before this field a drained turn that called a tool read as a turn that said nothing.
usage: TokenUsage;Defined in: core/src/turn.ts:142