Module: Legion::LLM::Router::Availability

Extended by:
Legion::Logging::Helper
Defined in:
lib/legion/llm/router/availability.rb

Class Method Summary collapse

Class Method Details

.lane_rejection_reason(lane:) ⇒ Object

Lane-based rejection reason for request_lane consumers (P4+). Reads lane directly — no Resolution object, no Inventory call.



15
16
17
18
19
20
21
# File 'lib/legion/llm/router/availability.rb', line 15

def lane_rejection_reason(lane:, **)
  return :policy_denied if lane[:health][:denied]
  return :circuit_open  if lane[:health][:circuit_state] == :open
  return :unavailable   if lane[:health][:available] == false

  nil
end