ProviderChunk
Defined in: core/src/types.ts:242
Normalized streaming chunk. Every provider’s shape maps to this.
Properties
Section titled “Properties”citations?
Section titled “citations?”optional citations?: Citation[];Defined in: core/src/types.ts:259
Citations, appended in order. Their spans index the turn’s content.
content?
Section titled “content?”optional content?: string;Defined in: core/src/types.ts:247
finishReason?
Section titled “finishReason?”optional finishReason?: FinishReason;Defined in: core/src/types.ts:263
hosted?
Section titled “hosted?”optional hosted?: HostedCallDelta[];Defined in: core/src/types.ts:257
Hosted call fragments, assembled by index. One commits the stream:
past it, a retry would rerun and rebill the vendor’s tool.
hostedItems?
Section titled “hostedItems?”optional hostedItems?: HostedItems;Defined in: core/src/types.ts:261
Once per turn, where a provider replays its hosted tools. See ChatMessage.hostedItems.
reasoning?
Section titled “reasoning?”optional reasoning?: string;Defined in: core/src/types.ts:248
reasoningDetails?
Section titled “reasoningDetails?”optional reasoningDetails?: unknown[];Defined in: core/src/types.ts:251
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:253
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:246
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:254
type: "delta" | "usage" | "finish";Defined in: core/src/types.ts:243
usage?
Section titled “usage?”optional usage?: TokenUsage;Defined in: core/src/types.ts:262