Skip to main content

Module circuit_breaker

Module circuit_breaker 

Source
Expand description

Circuit breaker for LLM provider calls.

States: Closed (normal) → Open (failing) → Half-Open (testing)

The circuit breaker prevents cascading failures when the LLM provider is experiencing issues. When the circuit is open, requests are rejected immediately instead of waiting for timeouts.

Structs§

CircuitBreaker
A simple 3-state circuit breaker for protecting against cascading failures.