import { Callout } from "../components/Callout";
import { CodeBlock } from "../components/CodeBlock";
export function CircuitBreakerGuide() {
return (
Circuit Breaker & Failover
Veylant IA includes a per-provider circuit breaker that prevents cascading failures when an
LLM provider is degraded or unreachable.
Circuit Breaker States
{[
{
state: "Closed",
color: "border-green-400",
bg: "bg-green-50 dark:bg-green-950/30",
desc: "Normal operation. Requests are forwarded to the provider. Failures are counted.",
},
{
state: "Open",
color: "border-red-400",
bg: "bg-red-50 dark:bg-red-950/30",
desc: "Provider bypassed. All requests use the fallback chain. Stays open for open_ttl seconds.",
},
{
state: "Half-Open",
color: "border-amber-400",
bg: "bg-amber-50 dark:bg-amber-950/30",
desc: "Testing if provider has recovered. One probe request sent. Success → Closed; Failure → Open.",
},
].map((item) => (
))}
Configuration
Each provider has an independent circuit breaker. A failing Azure deployment does not affect
OpenAI or Anthropic calls.
Fallback Chain
When the primary provider's circuit is open, the routing engine uses the{" "}
fallback_providers array from the matched routing rule:
Checking Status
Prometheus Alert
The CircuitBreakerOpen alert fires when any provider is in the open state:
0
for: 0m
labels:
severity: warning
annotations:
summary: "Provider {{ $labels.provider }} circuit breaker is open"
description: "The circuit breaker for {{ $labels.provider }} has opened after repeated failures."`}
/>
Development Mode Degradation
In server.env=development, Veylant IA degrades gracefully if services are
unreachable:
- Keycloak unreachable → MockVerifier (auth bypassed)
- PostgreSQL unreachable → routing disabled, feature flags use in-memory defaults
- ClickHouse unreachable → audit logging disabled
- PII service unreachable → PII skipped if
fail_open=true
In production mode, any of the above causes a fatal startup error.
);
}