Module: Legion::LLM::Routing::Fleet
- Includes:
- Legion::Logging::Helper
- Included in:
- Legion::LLM::Router
- Defined in:
- lib/legion/llm/routing/fleet.rb
Overview
Fleet routing concern — stateless mixin included into the Router class. Provides fleet-dispatch enablement check and fleet-lane qualification.
Instance Method Summary collapse
-
#fleet_enabled? ⇒ Boolean
Whether fleet dispatch is globally enabled.
-
#fleet_lane?(lane:) ⇒ Boolean
Whether
lanequalifies as a dispatchable fleet lane: the lane must be tier :fleet AND carry the supported fleet execution contract.
Instance Method Details
#fleet_enabled? ⇒ Boolean
Whether fleet dispatch is globally enabled. Default-on; returns false only when the operator has explicitly disabled it. Replaces the legacy read at inference/route_attempts.rb ([:llm][:fleet][:dispatch][:enabled]), now namespaced under [:llm][:router][:fleet_dispatch_enabled].
17 18 19 |
# File 'lib/legion/llm/routing/fleet.rb', line 17 def fleet_enabled?(**) Legion::Settings[:llm][:router][:fleet_dispatch_enabled] != false end |
#fleet_lane?(lane:) ⇒ Boolean
Whether lane qualifies as a dispatchable fleet lane: the lane must
be tier :fleet AND carry the supported fleet execution contract.
Self-contained (does NOT call Filter#filter_fleet) so Fleet stays an
independently-testable mixin — this is exactly the condition
filter_fleet collapses to for its :supported verdict.
26 27 28 |
# File 'lib/legion/llm/routing/fleet.rb', line 26 def fleet_lane?(lane:, **) lane.tier == :fleet && lane.[:fleet_execution_contract] == 'exact_offering_v1' end |