Skip to main content
Available on all Portkey plans.
Circuit breakers prevent cascading failures by temporarily blocking requests to targets that are failing.

Config Schema

  • Strategies inherit cb_config from parent if not set
  • Targets inherit from their parent strategy
conditional mode strategies are not evaluated by circuit breaker.

Example

The @provider-slug/model-name format automatically routes to the correct provider. Set up providers in Model Catalog.

How It Works

Circuit breaker tracks per strategy path:
  • Failure and success counts
  • Time of first failure
  • Failure rate (when minimum_requests threshold met)
Circuit opens (OPEN) when:
  • Failure count exceeds failure_threshold, or
  • Failure rate exceeds failure_threshold_percentage
Circuit closes (CLOSED) automatically after cooldown_interval passes.

Runtime Behavior

  • Unhealthy targets removed from routing
  • If all targets are OPEN, circuit breaker is bypassed
Last modified on December 22, 2025