Browse docs
--- title: "Resilience" description: "Tune retries and the per-provider circuit breaker, and learn when to reach for cross-model failover instead." icon: "shield-check" ---
Aurora wraps every upstream provider call with two resilience layers:
- Retry with exponential backoff — repeats a failed request against the
same provider with growing delays.
- Circuit breaker — short-circuits calls to a provider that has been
failing repeatedly, then probes once the timeout elapses.
Both layers apply per provider. They do not switch to a different model or provider on failure. For cross-model fallback, see Failover.
Defaults
The defaults are tuned to be safe for most deployments. Override only what you need.
Environment Variables
These set the global defaults that apply to every provider unless overridden in YAML.
Retry
Circuit Breaker
YAML
The same fields are available under the global resilience: block, and can be overridden per provider:
resilience:
retry:
max_retries: 2
initial_backoff: 500ms
max_backoff: 10s
backoff_factor: 1.5
jitter_factor: 0.05
circuit_breaker:
failure_threshold: 3
success_threshold: 1
timeout: 15s
providers:
anthropic:
type: anthropic
api_key: ${ANTHROPIC_API_KEY}
resilience:
retry:
max_retries: 5 # Anthropic supports long requests — allow more retries
ollama:
type: ollama
base_url: ${OLLAMA_BASE_URL:-http://localhost:11434/v1}
resilience:
circuit_breaker:
failure_threshold: 10 # local service — tolerate more transient failures
timeout: 5sOnly fields explicitly listed under a provider's resilience: block are overridden. Everything else inherits from the global section, which in turn inherits from the built-in defaults.
Worked example
Given the YAML above, the effective per-provider settings are:
anthropic and ollama inherit every field they did not explicitly override.
Failover vs. Resilience
The retry and circuit breaker layers stay on a single provider. If you also want Aurora to try a different model or provider when the primary keeps failing, configure manual fallback rules. See Failover.