Completion
Defined in: core/src/turn.ts:177
Properties
Section titled “Properties”citations?
Section titled “citations?”optional citations?: Citation[];Defined in: core/src/turn.ts:193
Present only when the answer cites sources. See ChatMessage.citations.
finishReason
Section titled “finishReason”finishReason: | FinishReason | null;Defined in: core/src/turn.ts:195
hostedCalls?
Section titled “hostedCalls?”optional hostedCalls?: HostedCall[];Defined in: core/src/turn.ts:191
Present only when the vendor ran its own tools. See ChatMessage.hostedCalls.
model: string;Defined in: core/src/turn.ts:196
provider?
Section titled “provider?”optional provider?: string;Defined in: core/src/turn.ts:180
Present when the stream identifies the endpoint that answered.
reasoning
Section titled “reasoning”reasoning: string;Defined in: core/src/turn.ts:181
reasoningDetails?
Section titled “reasoningDetails?”optional reasoningDetails?: unknown[];Defined in: core/src/turn.ts:183
Present only where the provider sent one. See ChatMessage.reasoningDetails.
reasoningItems?
Section titled “reasoningItems?”optional reasoningItems?: ReasoningItems;Defined in: core/src/turn.ts:185
Present only where the provider sent them. See ChatMessage.reasoningItems.
text: string;Defined in: core/src/turn.ts:178
toolCalls
Section titled “toolCalls”toolCalls: ToolCall[];Defined in: core/src/turn.ts:189
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:194