ProviderChunk
Defined in: core/src/types.ts:201
Normalized streaming chunk. Every provider’s shape maps to this.
Properties
Section titled “Properties”content?
Section titled “content?”optional content?: string;Defined in: core/src/types.ts:206
finishReason?
Section titled “finishReason?”optional finishReason?: FinishReason;Defined in: core/src/types.ts:215
reasoning?
Section titled “reasoning?”optional reasoning?: string;Defined in: core/src/types.ts:207
reasoningDetails?
Section titled “reasoningDetails?”optional reasoningDetails?: unknown[];Defined in: core/src/types.ts:210
OpenRouter’s normalized reasoning payload. Hand it back on the next turn’s assistant message verbatim. See ChatMessage.reasoningDetails.
reasoningItems?
Section titled “reasoningItems?”optional reasoningItems?: ReasoningItems;Defined in: core/src/types.ts:212
Once per turn, where a provider replays its reasoning. See ChatMessage.reasoningItems.
source?
Section titled “source?”optional source?: object;Defined in: core/src/types.ts:205
The selected endpoint and model when a fallback provider emits this chunk. Per-call metadata, never shared mutable state on the provider object.
model: string;provider
Section titled “provider”provider: string;toolCalls?
Section titled “toolCalls?”optional toolCalls?: ToolCallDelta[];Defined in: core/src/types.ts:213
type: "delta" | "usage" | "finish";Defined in: core/src/types.ts:202
usage?
Section titled “usage?”optional usage?: TokenUsage;Defined in: core/src/types.ts:214