LLMProxy.Providers.ReplayPolicy (llm_proxy v0.2.0)

Copy Markdown View Source

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.

Summary

Types

decision()

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

policy()

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

Functions

decide(result, arg2, arg3, arg4)