Configure provider-call resilience under the resilience key on AurexConfig.
Agent hint
Use for resilience.enabled, mode, max_attempts, max_extra_cost_usd, retry_on, backoff, idempotency.
In scope
Out of scope
from aurex_sdk import AurexAuditor, AurexConfig
auditor = AurexAuditor(AurexConfig(
api_key="aux_dev_yourkey",
resilience={
"enabled": True,
"mode": "observe",
"timeout_ms": 60000,
"max_attempts": 2,
"max_extra_cost_usd": 0.05,
"retry_on": ["timeout", "429", "5xx", "network", "empty"],
"idempotency": "auto",
"proof_window_pct": 0.0,
},
))const auditor = AurexAuditor.getInstance({
apiKey: "aux_dev_yourkey",
resilience: {
enabled: true,
mode: "observe",
timeoutMs: 60000,
maxAttempts: 2,
maxExtraCostUsd: 0.05,
retryOn: ["timeout", "429", "5xx", "network", "empty"],
idempotency: "auto",
proofWindowPct: 0.0,
},
});| Field | Default | Description |
|---|---|---|
| enabled | false | Master switch; false = passthrough. |
| mode | observe | observe | enforce |
| timeout_ms | 60000 | Per-attempt wall-clock cap. |
| max_attempts | 2 | Including initial call; enforce only. |
| max_extra_cost_usd | 0.05 | Cap on additional spend for retries/fallbacks. |
| retry_on | see Classification | List of failure kinds eligible for retry. |
| backoff | base 200ms | base_ms, max_ms, jitter for enforce retries. |
| idempotency | auto | auto | require_key | off |
| fallbacks | [] | Named fallback chain (see Fallbacks page). |
| proof_window_pct | 0.0 | Sample enforce retries in observe for proof (0–1). |
| on_recovery | None | Optional callback after successful recovery. |
| classify_response_override | None | Custom classifier hook (Python). |