Module reliability

Module reliability 

Source
Expand description

Reliability primitives: circuit breaker, instrumented model wrappers with timeout and retry support, and metrics emission.

Structsยง

CircuitBreakerConfig
Tunable parameters for the circuit breaker.
CircuitBreakerWrapper
Thread-safe circuit breaker that tracks failures and short-circuits calls when a provider is unhealthy.
InstrumentedEmbeddingModel
Wrapper around an EmbeddingModel that adds per-call timeout enforcement, exponential-backoff retries for transient errors, and metrics emission (model_inference.duration_seconds, model_inference.total).
InstrumentedGeneratorModel
Wrapper around a GeneratorModel that adds timeout, retry, and metrics.
InstrumentedRerankerModel
Wrapper around a RerankerModel that adds timeout, retry, and metrics.