# `Alloy.Provider.Retry`
[🔗](https://github.com/alloy-ex/alloy/blob/v0.10.1/lib/alloy/provider/retry.ex#L1)

Provider retry, backoff, fallback, and streaming dispatch logic.

Handles exponential backoff with full jitter, retryable error
classification, fallback provider chains, and receive-timeout
injection. Extracted from `Alloy.Agent.Turn` to separate
provider-oriented concerns from agent loop control flow.

# `call_with_retry`

```elixir
@spec call_with_retry(
  Alloy.Agent.State.t(),
  module(),
  map(),
  boolean(),
  function(),
  integer()
) ::
  {:ok, map()} | {:error, term()}
```

Call a provider with retry, backoff, and fallback logic.

Single entry point for all provider calls. Retries on transient errors
with exponential backoff and jitter, then falls back to configured
fallback providers if the primary provider fails.

Returns `{:ok, response}` or `{:error, reason}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
