Skip to main content

Module retry

Module retry 

Source
Expand description

HTTP retry / backoff / Retry-After helpers for LLM providers.

Retries happen ONLY before the streaming response begins. Once the helper returns Ok(Response), the caller owns the stream and any error during SSE iteration must NOT be retried — partial deltas may already have reached the user.

Structs§

RetryPolicy
Retry configuration.

Functions§

send_with_retry
Async retry wrapper for streaming providers.
send_with_retry_blocking
Blocking variant for sync code paths (e.g. OAuth token refresh in create_provider). Same contract as send_with_retry: builder-chain errors are surfaced as reqwest::Error rather than panics.