Interface: ProviderBatchOptions
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:152
Configuration for batch({ providerBatch }).
Properties
fallback?
optionalfallback?:"error"|"live"
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:173
What a call does when its provider has no batch endpoint, or refuses the
submission as unsupported: 'live' (default) makes a normal call at the
standard price and emits a fallback event; 'error' fails it.
maxRequests?
optionalmaxRequests?:number
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:167
Most requests in one provider batch. A full queue is submitted at once. Default 10 000 — below every provider's count limit, and small enough that typical requests stay under their payload-size limits.
maxWaitMs?
optionalmaxWaitMs?:number
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:161
Longest a queued call waits for work that is busy elsewhere — running a tool, making a live call — before the queue is submitted without it. When every item is waiting on a batch, the queue goes out at once. Default 2 000 ms.
onEvent?
optionalonEvent?: (event) =>void
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:175
Batch lifecycle events. A throwing listener does not affect the run.
Parameters
event
Returns
void
pollIntervalMs?
optionalpollIntervalMs?:number
Defined in: packages/core/src/adapters/ai-sdk/provider-batch.ts:154
How often to ask the provider whether a submitted batch has finished. Default 15 000 ms.