Class: Legion::Extensions::Llm::Openai::Actor::DiscoveryRefresh
Overview
SSOT v3 periodic discovery actor for OpenAI provider instances.
Claims configured instances, discovers models via /v1/models,
probes readiness via /v1/models, and publishes complete
OfferingDraft snapshots through the Inventory::Publisher.
Instance identity is the operator's CONFIG NAME
(InstanceKey.instance_id) — the key the router uses for
instances. settings lookups and per-instance tuning. The
derived host:port/credential-fingerprint is the secondary
physical_id (dedup/diagnostics only); two config names at the
same endpoint stay distinct instances.
Constant Summary
DiscoveryHealthDisplay::LEGACY_CAPABILITY_NAMES
DiscoveryDrafts::EVIDENCE_MAP_FIELDS, DiscoveryDrafts::VALUE_EVIDENCE_FIELDS
DiscoveryEvidenceBuilders::STANDARD_CAPABILITY_CHECKS
Instance Method Summary
collapse
Instance Method Details
#check_subtask? ⇒ Boolean
68
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 68
def check_subtask? = false
|
#generate_task? ⇒ Boolean
69
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 69
def generate_task? = false
|
#manual ⇒ Object
75
76
77
78
79
80
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 75
def manual
initialize_weight_publication
tick_refresh
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'openai.actor.discovery_refresh')
end
|
#run_now? ⇒ Boolean
66
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 66
def run_now? = true
|
#runner_class ⇒ Object
64
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 64
def runner_class = self.class
|
#runner_function ⇒ Object
65
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 65
def runner_function = 'manual'
|
#shutdown ⇒ Object
82
83
84
85
86
87
88
89
90
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 82
def shutdown
return unless @instance_states
instance_states_snapshot.each_key { |instance_id| remove_instance_state(instance_id) }
@instance_state_mutex.synchronize do
@instance_states.clear
@dormant_weight_tracker.clear!
end
end
|
#time ⇒ Object
71
72
73
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 71
def time
discovery_interval_seconds
end
|
#use_runner? ⇒ Boolean
67
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 67
def use_runner? = false
|