Skip to content
providerkit
GitHub

Completion

Defined in: core/src/turn.ts:177

optional citations?: Citation[];

Defined in: core/src/turn.ts:193

Present only when the answer cites sources. See ChatMessage.citations.


finishReason:
| FinishReason
| null;

Defined in: core/src/turn.ts:195


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


optional provider?: string;

Defined in: core/src/turn.ts:180

Present when the stream identifies the endpoint that answered.


reasoning: string;

Defined in: core/src/turn.ts:181


optional reasoningDetails?: unknown[];

Defined in: core/src/turn.ts:183

Present only where the provider sent one. See ChatMessage.reasoningDetails.


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: 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