Module: Legion::Extensions::Llm::AzureFoundry

Extended by:
AutoRegistration, Logging::Helper
Defined in:
lib/legion/extensions/llm/azure_foundry.rb,
lib/legion/extensions/llm/azure_foundry/version.rb,
lib/legion/extensions/llm/azure_foundry/provider.rb,
lib/legion/extensions/llm/azure_foundry/actors/discovery.rb,
lib/legion/extensions/llm/azure_foundry/helpers/callable.rb,
lib/legion/extensions/llm/azure_foundry/runners/discovery.rb,
lib/legion/extensions/llm/azure_foundry/actors/fleet_worker.rb,
lib/legion/extensions/llm/azure_foundry/model_catalog_parser.rb,
lib/legion/extensions/llm/azure_foundry/runners/fleet_worker.rb,
lib/legion/extensions/llm/azure_foundry/helpers/offering_evidence.rb

Overview

Azure AI Foundry provider extension namespace.

Defined Under Namespace

Modules: Actor, Capabilities, Helpers, ModelCatalogParser, ProviderClassMethods, ProviderDispatchMethods, Runners Classes: Provider

Constant Summary collapse

PROVIDER_FAMILY =
:azure_foundry
INSTANCE_DEFAULTS =
{
  endpoint: nil,
  tier: :frontier,
  transport: :http,
  credentials: { api_key: nil, bearer_token: nil },
  provider: { api_version: Provider::DEFAULT_API_VERSION, surface: nil },
  usage: { inference: true, embedding: true, image: false },
  limits: { concurrency: 4 },
  fleet: { enabled: false, respond_to_requests: false,
           capabilities: %i[chat stream_chat embed tools] }
}.freeze
VERSION =
'0.4.2'

Class Method Summary collapse

Class Method Details

.default_settingsObject



32
33
34
35
36
37
38
# File 'lib/legion/extensions/llm/azure_foundry.rb', line 32

def self.default_settings
  ::Legion::Extensions::Llm.provider_settings(
    family: PROVIDER_FAMILY,
    discovery: { interval_seconds: 3600 },
    instance: INSTANCE_DEFAULTS
  )
end

.discover_instancesObject



42
43
44
45
46
47
48
49
50
51
# File 'lib/legion/extensions/llm/azure_foundry.rb', line 42

def self.discover_instances
  instances = {}
  discover_default_instance(instances)
  discover_named_instances(instances)
  # enabled: false is a skip, not a credential: a disabled instance
  # or one without a resolvable credential is never returned (the
  # discovery pipeline reads this method as the single claimable
  # source, and the dispatch path reads it too).
  instances.reject { |_, config| config[:enabled] == false || unresolved_credential?(config) }
end

.provider_classObject



40
# File 'lib/legion/extensions/llm/azure_foundry.rb', line 40

def self.provider_class = Provider