Skip to main content

Module retry

Module retry 

Source
Expand description

Retry with exponential backoff and jitter for provider calls.

ARCHITECTURE NOTE: Why retry at the agent loop level (not the provider level)?

Retrying is a cross-cutting concern — all 7 providers share the same retry logic. By handling it in stream_assistant_response() (agent_loop.rs), we avoid duplicating retry logic in every provider. Providers simply return ProviderError::RateLimited or ProviderError::Network, and this module decides what to do.

Structs§

RetryConfig
Configuration for automatic retry of transient provider errors.