Module resilient_provider

Module resilient_provider 

Source
Expand description

Resilient LLM provider wrapper with circuit breaker pattern

Provides fault tolerance for LLM providers by implementing the circuit breaker pattern, preventing cascading failures when external providers are unavailable.

§2025 Best Practices

  • Three states: Closed (normal), Open (failing fast), Half-Open (testing recovery)
  • Configurable thresholds and timeouts
  • Automatic recovery testing after cooldown period

Structs§

LlmCircuitConfig
Configuration for the LLM circuit breaker
ResilientProvider
Resilient LLM provider that wraps any provider with circuit breaker resilience

Enums§

CircuitState
Circuit breaker state