lex-llm-azure-foundry 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 279b43dc868c44a7b0f39f737cfff512ee6f5383097b886c5ceb77da7cbb6367
4
- data.tar.gz: 8c6d1c95608344743ae5ebbf181cd9eb016dc389ddb88efb9a338bf7590112a4
3
+ metadata.gz: 816c51165a46a9e5f15c3e535da382dc2459f6cca39b53644b60b2fb090196b9
4
+ data.tar.gz: 5ddf21d6404a9a255d4e3ef30c0b3a4c36989c7e217558b2a00da050f5149093
5
5
  SHA512:
6
- metadata.gz: 98254832116e7e04fc487d0477a791f0aac57fa2123035b87d8ca73d6e88c4691706f0ee23c95fdd8833db77898646ec21378d4eaf6faa799b46840d695732a4
7
- data.tar.gz: fc8551e98c53413ad263b0e78903a24c2d1e2ee49822bba32a5a2e183d5a205af5e1fc00af80cd8f1b6501b02638f5a22286741ea800caf2267ad200438040f7
6
+ metadata.gz: 266af948f19a52cf3b7612c43641daab824a16ffd0b1a06a344184ef5724b30b1b138b85a915459f70fe431c4df80e2e388f884c64e7e10300ecbc590afbef1d
7
+ data.tar.gz: bf925fbf1fe563c47f6e4adf244e6a2468c0c5d198f273515ba98d91fb54a7029dc0315e3520ceda8ef289fd15791358ed441766e4639b60ac708f14c1f43c88
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 - 2026-05-01
4
+
5
+ - Add auto-discovery via CredentialSources and AutoRegistration from lex-llm 0.3.0
6
+ - Self-register discovered instances into Call::Registry at require-time
7
+ - Require lex-llm >= 0.3.0
8
+
9
+
3
10
  ## [0.1.6] - 2026-05-01
4
11
 
5
12
  - Require lex-llm >= 0.1.9 for the shared base contract
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'legion-json', '>= 1.2.1'
27
27
  spec.add_dependency 'legion-logging', '>= 1.3.2'
28
28
  spec.add_dependency 'legion-settings', '>= 1.3.14'
29
- spec.add_dependency 'lex-llm', '>= 0.2.0'
29
+ spec.add_dependency 'lex-llm', '>= 0.3.0'
30
30
  end
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Llm
6
6
  module AzureFoundry
7
- VERSION = '0.1.6'
7
+ VERSION = '0.2.0'
8
8
  end
9
9
  end
10
10
  end
@@ -11,6 +11,7 @@ module Legion
11
11
  module AzureFoundry
12
12
  extend ::Legion::Extensions::Core if ::Legion::Extensions.const_defined?(:Core, false)
13
13
  extend Legion::Logging::Helper
14
+ extend Legion::Extensions::Llm::AutoRegistration
14
15
 
15
16
  PROVIDER_FAMILY = :azure_foundry
16
17
 
@@ -40,8 +41,48 @@ module Legion
40
41
  @registry_publisher ||= Legion::Extensions::Llm::RegistryPublisher.new(provider_family: PROVIDER_FAMILY)
41
42
  end
42
43
 
44
+ def self.discover_instances
45
+ instances = {}
46
+ discover_default_instance(instances)
47
+ discover_named_instances(instances)
48
+ instances
49
+ end
50
+
51
+ def self.discover_default_instance(instances)
52
+ cfg = CredentialSources.setting(:extensions, :llm, :azure_foundry)
53
+ return unless cfg.is_a?(Hash)
54
+
55
+ endpoint = cfg[:endpoint] || cfg['endpoint']
56
+ return if endpoint.nil? || endpoint.to_s.strip.empty?
57
+
58
+ instances[:settings] = cfg.except(:instances, 'instances').merge(tier: :cloud)
59
+ end
60
+
61
+ def self.discover_named_instances(instances)
62
+ cfg = CredentialSources.setting(:extensions, :llm, :azure_foundry)
63
+ return unless cfg.is_a?(Hash)
64
+
65
+ named = cfg[:instances] || cfg['instances']
66
+ return unless named.is_a?(Hash)
67
+
68
+ named.each { |name, config| add_named_instance(instances, name, config) }
69
+ end
70
+
71
+ def self.add_named_instance(instances, name, config)
72
+ return unless config.is_a?(Hash)
73
+
74
+ endpoint = config[:endpoint] || config['endpoint']
75
+ return if endpoint.nil? || endpoint.to_s.strip.empty?
76
+
77
+ instances[name.to_sym] = config.merge(tier: :cloud)
78
+ end
79
+
80
+ private_class_method :discover_default_instance, :discover_named_instances, :add_named_instance
81
+
43
82
  Legion::Extensions::Llm::Configuration.register_provider_options(Provider.configuration_options)
44
83
  end
45
84
  end
46
85
  end
47
86
  end
87
+
88
+ Legion::Extensions::Llm::AzureFoundry.register_discovered_instances
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-llm-azure-foundry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LegionIO
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.2.0
60
+ version: 0.3.0
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 0.2.0
67
+ version: 0.3.0
68
68
  description: Azure AI Foundry and Azure OpenAI hosted provider integration for LegionIO
69
69
  LLM routing.
70
70
  email: