Class CircuitOpenException

All Implemented Interfaces:
Serializable

public class CircuitOpenException extends RuntimeException
Thrown when a request is rejected because the circuit breaker is open.

This exception signals that the underlying LLM provider has been temporarily removed from service due to consecutive failures. When used with FallbackRouter, this causes the router to skip to the next provider.

See Also:
  • Constructor Details

    • CircuitOpenException

      public CircuitOpenException(String model, int failureCount, Duration recoveryTimeout, Instant openedAt)
  • Method Details

    • getModel

      public String getModel()
    • getFailureCount

      public int getFailureCount()
    • getRecoveryTimeout

      public Duration getRecoveryTimeout()
    • getOpenedAt

      public Instant getOpenedAt()
    • getRemainingRecoveryTime

      public Duration getRemainingRecoveryTime()
      Returns the estimated time remaining until the circuit transitions to HALF_OPEN.