AgentPrismCircuitBreakerOptions
AgentPrism.Core.dllDefines circuit-breaker options that temporarily stop requests after a model provider returns consecutive failures.
public sealed class AgentPrismCircuitBreakerOptionsInheritance
Section titled “Inheritance”object ← AgentPrismCircuitBreakerOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”AgentPrismCircuitBreakerOptions()
Section titled “ AgentPrismCircuitBreakerOptions()”public AgentPrismCircuitBreakerOptions()Properties
Section titled “Properties”BreakDuration
Section titled “ BreakDuration”Gets or sets the duration to wait after opening the circuit before one half-open retry.
public TimeSpan BreakDuration { get; set; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”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; }Property Value
Section titled “Property Value”FailureThreshold
Section titled “ FailureThreshold”Gets or sets the consecutive failure count required to open the circuit.
public int FailureThreshold { get; set; }