Type Alias: ProviderBatchEvent
ProviderBatchEvent = {
batch:ProviderBatchReference;modelId:string;requestIds:string[];type:"submitted"; } | {batch:ProviderBatchReference;requestCounts?:BatchRequestCounts;status:"pending"|"completed"|"failed";type:"status"; } | {batch:ProviderBatchReference;type:"completed"; } | {batch?:ProviderBatchReference;error:unknown;requestIds:string[];type:"failed"; } | {batch:ProviderBatchReference;type:"cancelled"; } | {batch:ProviderBatchReference;type:"resumed"; } | {modelId:string;provider:string;reason:string;requestIds?:string[];type:"fallback"; }
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:133
Lifecycle of the provider batches a batch({ providerBatch }) run submits.
Union Members
Type Literal
{ batch: ProviderBatchReference; modelId: string; requestIds: string[]; type: "submitted"; }
Type Literal
{ batch: ProviderBatchReference; requestCounts?: BatchRequestCounts; status: "pending" | "completed" | "failed"; type: "status"; }
Type Literal
{ batch: ProviderBatchReference; type: "completed"; }
Type Literal
{ batch?: ProviderBatchReference; error: unknown; requestIds: string[]; type: "failed"; }
Type Literal
{ batch: ProviderBatchReference; type: "cancelled"; }
Type Literal
{ batch: ProviderBatchReference; type: "resumed"; }
A replayed durable run found calls it had already submitted, and is reading their answers from this batch rather than submitting again.
Type Literal
{ modelId: string; provider: string; reason: string; requestIds?: string[]; type: "fallback"; }
Calls went out live at the standard price: the model's provider has no
batch endpoint, or refused this submission as unsupported (requestIds
is then set).