Class: Legion::Extensions::Llm::Openai::Actor::DiscoveryRefresh

Inherits:
Actors::Every
  • Object
show all
Includes:
Helpers::Lex, DiscoveryDrafts, DiscoveryEvidenceBuilders, DiscoveryHealthDisplay, DiscoveryIdentity, DiscoveryProbing, DiscoveryTransport, Logging::Helper
Defined in:
lib/legion/extensions/llm/openai/actors/discovery_refresh.rb

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

Constants included from DiscoveryHealthDisplay

DiscoveryHealthDisplay::LEGACY_CAPABILITY_NAMES

Constants included from DiscoveryEvidenceBuilders

DiscoveryEvidenceBuilders::STANDARD_CAPABILITY_CHECKS

Instance Method Summary collapse

Instance Method Details

#check_subtask?Boolean

Returns:

  • (Boolean)


64
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 64

def check_subtask?  = false

#generate_task?Boolean

Returns:

  • (Boolean)


65
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 65

def generate_task?  = false

#manualObject



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

Returns:

  • (Boolean)


62
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 62

def run_now?        = true

#runner_classObject



60
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 60

def runner_class    = self.class

#runner_functionObject



61
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 61

def runner_function = 'manual'

#shutdownObject



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

#timeObject



67
68
69
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 67

def time
  discovery_interval_seconds
end

#use_runner?Boolean

Returns:

  • (Boolean)


63
# File 'lib/legion/extensions/llm/openai/actors/discovery_refresh.rb', line 63

def use_runner?     = false