Expand description
Retry strategies for failed model calls and the backoff math they use.
Structs§
- Backoff
Context - Context passed to a
BackoffStrategyfor each retry decision (BackoffContext). - Constant
Backoff - Constant backoff: the same delay for every retry (
ConstantBackoff). - Constant
Backoff Options - Options for
ConstantBackoff(ConstantBackoffOptions). - Default
Model Retry Strategy - Retries model calls that fail with an error the SDK classifies as retryable
(
DefaultModelRetryStrategy). - Default
Model Retry Strategy Options - Options for
DefaultModelRetryStrategy(DefaultModelRetryStrategyOptions). - Exponential
Backoff - Exponential backoff:
base * multiplier^(attempt - 1), capped atmax, then jittered (ExponentialBackoff). - Exponential
Backoff Options - Options for
ExponentialBackoff(ExponentialBackoffOptions). - IsRetryable
- Classifies which errors a
DefaultModelRetryStrategyretries. - Linear
Backoff - Linear backoff:
base * attempt, capped atmax, then jittered (LinearBackoff). - Linear
Backoff Options - Options for
LinearBackoff(LinearBackoffOptions). - Model
Retry Context - What a
ModelRetryStrategysees of a failed model call.
Enums§
- Jitter
Kind - Jitter applied to the raw delay (
JitterKind). For other jitter, implementBackoffStrategy. - Retry
Decision - Whether to retry a failed operation, and how long to wait first (
RetryDecision). - Retry
Strategy - Any retry strategy the agent accepts (
RetryStrategy).
Traits§
- Backoff
Strategy - Computes the delay before the next retry attempt (
BackoffStrategy). - Model
Retry Strategy - A policy for retrying failed model calls (
ModelRetryStrategy).