Exception: RubyLLM::Agents::Reliability::CircuitBreakerOpenError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_llm/agents/infrastructure/reliability.rb

Overview

Raised when the circuit breaker is open and requests are being blocked

Examples:

raise CircuitBreakerOpenError.new("MyAgent", "gpt-4o")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_type, model_id) ⇒ CircuitBreakerOpenError

Returns a new instance of CircuitBreakerOpenError.

Parameters:

  • agent_type (String)

    The agent class name

  • model_id (String)

    The model identifier



33
34
35
36
37
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 33

def initialize(agent_type, model_id)
  @agent_type = agent_type
  @model_id = model_id
  super("Circuit breaker is open for #{agent_type} with model #{model_id}")
end

Instance Attribute Details

#agent_typeObject (readonly)



29
30
31
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 29

def agent_type
  @agent_type
end

#model_idObject (readonly)



29
30
31
# File 'lib/ruby_llm/agents/infrastructure/reliability.rb', line 29

def model_id
  @model_id
end