Class: Legion::Extensions::Llm::Vertex::Actor::DiscoveryRefresh
- Inherits:
-
Actors::Every
- Object
- Actors::Every
- Legion::Extensions::Llm::Vertex::Actor::DiscoveryRefresh
show all
- Includes:
- Helpers::Lex, DiscoveryRefreshCapabilityEvidence, DiscoveryRefreshClaimHelpers, DiscoveryRefreshConfigHelpers, DiscoveryRefreshHealthDisplay, DiscoveryRefreshLifecycleHelpers, DiscoveryRefreshOfferingHelpers, DiscoveryRefreshOperationEvidence, DiscoveryRefreshProbeHelpers, DiscoveryRefreshReactiveProbeHelpers, DiscoveryRefreshWeightPublication, Logging::Helper
- Defined in:
- lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb
Overview
SSOT v3 periodic discovery actor for Vertex AI provider instances.
Claims configured instances, discovers models from the STATIC_MODELS
catalog, probes health via the non-inference models-list endpoint,
and publishes complete OfferingDraft snapshots through the
Inventory::Publisher. Owns the refresh cadence, recovers
initial-readiness failures, and writes the display-only
health/capabilities settings after each registry commit.
Constant Summary
collapse
- FALLBACK_DISCOVERY_INTERVAL_SECONDS =
Guards a broken discovery config (missing or non-positive value);
the registered default (lex-llm ProviderSettings) is 300 seconds.
300
Legion::Extensions::Llm::Vertex::Actor::DiscoveryRefreshHealthDisplay::CAPABILITY_NAMES_BY_OPERATION, Legion::Extensions::Llm::Vertex::Actor::DiscoveryRefreshHealthDisplay::HEALTH_ADJUSTMENT_AVAILABLE, Legion::Extensions::Llm::Vertex::Actor::DiscoveryRefreshHealthDisplay::HEALTH_ADJUSTMENT_DEGRADED
Instance Method Summary
collapse
Instance Method Details
#check_subtask? ⇒ Boolean
761
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 761
def check_subtask? = false
|
#generate_task? ⇒ Boolean
762
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 762
def generate_task? = false
|
#manual ⇒ Object
772
773
774
775
776
777
778
779
780
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 772
def manual
if @initialized
tick_refresh
else
initial_discovery
end
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'vertex.actor.discovery_refresh')
end
|
#run_now? ⇒ Boolean
759
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 759
def run_now? = true
|
#runner_class ⇒ Object
757
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 757
def runner_class = self.class
|
#runner_function ⇒ Object
758
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 758
def runner_function = 'manual'
|
#shutdown ⇒ Object
782
783
784
785
786
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 782
def shutdown
remove_all_instances
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'vertex.actor.discovery_refresh.shutdown')
end
|
#time ⇒ Object
The actor owns the discovery cadence. Read the registered
interval so the operator knob is honored and the timer never
receives nil.
767
768
769
770
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 767
def time
interval = settings.dig(:discovery, :interval_seconds)
interval.is_a?(Numeric) && interval.positive? ? interval : FALLBACK_DISCOVERY_INTERVAL_SECONDS
end
|
#use_runner? ⇒ Boolean
760
|
# File 'lib/legion/extensions/llm/vertex/actors/discovery_refresh.rb', line 760
def use_runner? = false
|