Exception: Legion::LLM::Errors::RoutingRejected

Inherits:
LLMError
  • Object
show all
Defined in:
lib/legion/llm/errors.rb

Overview

SSOT v3: raised by RoutingSession#next_attempt! when Router.next_lane returned a typed Rejection. Carries the exact Phase 1 Rejection so HTTP boundaries can map it through RoutingErrorMapper before StandardError.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rejection:, message: nil) ⇒ RoutingRejected

Returns a new instance of RoutingRejected.



157
158
159
160
# File 'lib/legion/llm/errors.rb', line 157

def initialize(rejection:, message: nil, **)
  @rejection = rejection
  super(message || "routing rejected: #{rejection.kind} (#{rejection.reason})")
end

Instance Attribute Details

#rejectionObject (readonly)

Returns the value of attribute rejection.



155
156
157
# File 'lib/legion/llm/errors.rb', line 155

def rejection
  @rejection
end

Instance Method Details

#retryable?Boolean

Returns:

  • (Boolean)


162
# File 'lib/legion/llm/errors.rb', line 162

def retryable? = false