RetryOptions
Namespace: Vercel.AI.Util
public sealed class RetryOptionsOptions for RetryWithExponentialBackoffRespectingRetryHeaders.
Inheritance: object
Properties
Section titled “Properties”AbortSignal
Section titled “AbortSignal”public CancellationToken AbortSignal { get; set; }Aborts the wait between attempts.
Value: CancellationToken
AdditionalRetryableError
Section titled “AdditionalRetryableError”public Func<object, Task<bool>>? AdditionalRetryableError { get; set; }Extra predicate consulted when the error is not an API or gateway retry.
Value: Func<object, Task<bool>>
BackoffFactor
Section titled “BackoffFactor”public double BackoffFactor { get; set; }Multiplier applied after each retry. Default is 2.
Value: double
public Func<int, CancellationToken, Task>? Delay { get; set; }Waits milliseconds before the next attempt.
The default is CancellationToken).
Value: Func<int, CancellationToken, Task>
InitialDelayInMs
Section titled “InitialDelayInMs”public int InitialDelayInMs { get; set; }Delay before the first retry, in milliseconds. Default is 2000.
Value: int
MaxRetries
Section titled “MaxRetries”public int MaxRetries { get; set; }Maximum retries after the first attempt. Default is 2.
Value: int
UtcNow
Section titled “UtcNow”public Func<DateTimeOffset>? UtcNow { get; set; }Clock used to parse HTTP-date Retry-After values. Default is UTC now.
Value: Func<DateTimeOffset>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product