Skip to content

AgentPrismCircuitBreakerOptions

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Defines circuit-breaker options that temporarily stop requests after a model provider returns consecutive failures.

public sealed class AgentPrismCircuitBreakerOptions

objectAgentPrismCircuitBreakerOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The circuit breaker decorates the AI.IChatClient pipeline instead of being embedded in a provider implementation. Every provider, including OpenAI, compatible servers, and future Anthropic or Gemini providers, gets the same protection.

public AgentPrismCircuitBreakerOptions()

Gets or sets the duration to wait after opening the circuit before one half-open retry.

public TimeSpan BreakDuration { get; set; }

TimeSpan

Gets or sets whether the circuit breaker is enabled. When disabled, requests always reach the provider and no consecutive-failure counter is kept.

public bool Enabled { get; set; }

bool

Gets or sets the consecutive failure count required to open the circuit.

public int FailureThreshold { get; set; }

int