# `LLMProxy.Providers.ReplayPolicy`
[🔗](https://github.com/elixir-vibe/llm_proxy/blob/v0.3.1/lib/llm_proxy/providers/replay_policy.ex#L1)

Decides if a failed provider attempt can be replayed on another deployment.

Safe failures prove that the upstream did not accept work. Uncertain failures
can have billable or side-effecting work in progress. Forbidden failures are
request or authorization failures that another deployment must not replay.

# `decision`

```elixir
@type decision() :: {:retry | :stop, atom()}
```

# `policy`

```elixir
@type policy() :: :safe_only | :allow_uncertain
```

# `decide`

```elixir
@spec decide(LLMProxy.Providers.Result.t(), boolean(), boolean(), policy()) ::
  decision()
```

---

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