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
DiscoveryEvidenceBuilders::STANDARD_CAPABILITY_CHECKS
Instance Method Summary
collapse
Instance Method Details
#check_subtask? ⇒ Boolean
64
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 64
def check_subtask? = false
|
#generate_task? ⇒ Boolean
65
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 65
def generate_task? = false
|
#manual ⇒ Object
71
72
73
74
75
76
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 71
def manual
@instance_states ||= {}
tick_refresh
rescue StandardError => e
handle_exception(e, level: :warn, operation: 'openai.actor.discovery_refresh')
end
|
#run_now? ⇒ Boolean
62
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 62
def run_now? = true
|
#runner_class ⇒ Object
60
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 60
def runner_class = self.class
|
#runner_function ⇒ Object
61
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 61
def runner_function = 'manual'
|
#shutdown ⇒ Object
78
79
80
81
82
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 78
def shutdown
return unless @instance_states
@instance_states.each_key { |instance_id| remove_instance_state(instance_id) }
end
|
#time ⇒ Object
67
68
69
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 67
def time
discovery_interval_seconds
end
|
#use_runner? ⇒ Boolean
63
|
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 63
def use_runner? = false
|