RetryAfterOutputPolicy
Defined in: agents/src/types.ts:110
Opt in to retrying a model call that failed transiently after chunks arrived, for runs whose
stream nobody watches. The default keeps core’s invariant 1 (never retry after output). Each
attempt is journaled and priced, counts toward treeLimits.modelCalls and limits.costUsd,
and refuses agents or runs that declare hostedTools (invariant 19).
Properties
Section titled “Properties”baseDelayMs?
Section titled “baseDelayMs?”optional baseDelayMs?: number;Defined in: agents/src/types.ts:115
Base delay in ms for full-jitter exponential backoff. Default 1,000.
maxDelayMs?
Section titled “maxDelayMs?”optional maxDelayMs?: number;Defined in: agents/src/types.ts:117
Maximum backoff delay in ms. Default 30,000.
maxRetries
Section titled “maxRetries”maxRetries: number;Defined in: agents/src/types.ts:113
Maximum transient mid-stream retries per model turn (not counting the initial attempt). Must be a positive integer up to 10.
sleep?
Section titled “sleep?”optional sleep?: (ms, signal?) => Promise<void>;Defined in: agents/src/types.ts:119
Custom sleep for tests. Not saved in snapshots.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ms |
number |
signal? |
AbortSignal |
Returns
Section titled “Returns”Promise<void>