Skip to content

Completion

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

finishReason: FinishReason | null;

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


model: string;

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


optional provider?: string;

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

Present when the stream identifies the endpoint that answered.


reasoning: string;

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


optional reasoningDetails?: unknown[];

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

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


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