lex-llm-azure-foundry 0.2.15 → 0.2.17
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 433a2650edf79d39694f77ff2ebdabe3e97aa4e6c4ed5aa23935290748789e04
|
|
4
|
+
data.tar.gz: d1953642f8ea39987493f634488dc8480be56642e60369c6696ac2c0213ac7c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ddf30f8e148302d3fc8c897dbc2b55c7df6b93b507860cc20ff4f6a8f4bd47a30df502e5aa9ae95832e4755e3331ebc54673085c2ba44dd3e0ca124d091315f2
|
|
7
|
+
data.tar.gz: 3187ac2e0b1e0fbddcd9fa31ba85fbc55219bc275a14220861e488940657fa8111a03df0ee773520110bd2bb6a18626a8125a98334c3746e0258fd868e3fc879
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.17] - 2026-08-07
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Remove dead legacy discovery calls from `#manual` actor method (closes #154).
|
|
7
|
+
|
|
8
|
+
### Removed
|
|
9
|
+
- Deleted `populate_auto_rules`, `refresh_discovered_models!`, and `invalidate_offerings_cache!` invocations that targeted APIs removed from the SSOT router.
|
|
10
|
+
|
|
11
|
+
## [0.2.16] - 2026-08-04
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- Normalize canonical nested `credentials` and `provider` settings into the Azure Foundry adapter configuration while preserving flat-key aliases.
|
|
15
|
+
|
|
3
16
|
## [0.2.15] - 2026-07-09
|
|
4
17
|
|
|
5
18
|
### Fixed
|
|
@@ -45,20 +45,8 @@ module Legion
|
|
|
45
45
|
Legion::Settings.dig(:extensions, :llm, :azure_foundry, :discovery_interval) || self.class.every_seconds
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
def manual
|
|
49
|
-
|
|
50
|
-
tick if respond_to?(:tick)
|
|
51
|
-
|
|
52
|
-
return unless defined?(Legion::LLM::Discovery)
|
|
53
|
-
|
|
54
|
-
Legion::LLM::Discovery.refresh_discovered_models!(provider: :azure_foundry)
|
|
55
|
-
|
|
56
|
-
if defined?(Legion::LLM::Router) && Legion::LLM::Router.respond_to?(:populate_auto_rules)
|
|
57
|
-
Legion::LLM::Router.populate_auto_rules(Legion::LLM::Discovery.discovered_instances)
|
|
58
|
-
end
|
|
59
|
-
if defined?(Legion::LLM::Inventory) && Legion::LLM::Inventory.respond_to?(:invalidate_offerings_cache!)
|
|
60
|
-
Legion::LLM::Inventory.invalidate_offerings_cache!
|
|
61
|
-
end
|
|
48
|
+
def manual
|
|
49
|
+
tick_if_scoped_refresher
|
|
62
50
|
rescue StandardError => e
|
|
63
51
|
handle_exception(e, level: :warn, handled: true, operation: 'azure_foundry.actor.discovery_refresh')
|
|
64
52
|
end
|
|
@@ -92,6 +80,13 @@ module Legion
|
|
|
92
80
|
|
|
93
81
|
private
|
|
94
82
|
|
|
83
|
+
def tick_if_scoped_refresher
|
|
84
|
+
return unless defined?(Legion::Extensions::Llm::Inventory::ScopedRefresher)
|
|
85
|
+
return unless self.class.ancestors.include?(Legion::Extensions::Llm::Inventory::ScopedRefresher)
|
|
86
|
+
|
|
87
|
+
tick
|
|
88
|
+
end
|
|
89
|
+
|
|
95
90
|
def collect_instance_lanes(instance_entry, lanes)
|
|
96
91
|
adapter = instance_entry[:adapter]
|
|
97
92
|
return unless adapter.respond_to?(:discover_offerings)
|
|
@@ -92,6 +92,8 @@ module Legion
|
|
|
92
92
|
|
|
93
93
|
def self.normalize_instance_config(config) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
94
94
|
normalized = config.to_h.transform_keys { |key| key.respond_to?(:to_sym) ? key.to_sym : key }
|
|
95
|
+
resolve_nested_credentials(normalized)
|
|
96
|
+
resolve_nested_provider(normalized)
|
|
95
97
|
normalized[:azure_foundry_endpoint] ||= normalized.delete(:endpoint)
|
|
96
98
|
normalized[:azure_foundry_endpoint] ||= normalized.delete(:base_url)
|
|
97
99
|
normalized[:azure_foundry_endpoint] ||= normalized.delete(:api_base)
|
|
@@ -103,8 +105,32 @@ module Legion
|
|
|
103
105
|
normalized.compact.except(:instances)
|
|
104
106
|
end
|
|
105
107
|
|
|
108
|
+
# Nested `credentials: { api_key:, bearer_token: }` is the canonical shape
|
|
109
|
+
# (matches default_settings and every other lex-llm-* provider). Flat keys
|
|
110
|
+
# remain accepted as aliases.
|
|
111
|
+
def self.resolve_nested_credentials(normalized)
|
|
112
|
+
creds = normalized.delete(:credentials)
|
|
113
|
+
return unless creds.is_a?(Hash)
|
|
114
|
+
|
|
115
|
+
creds = creds.transform_keys { |key| key.respond_to?(:to_sym) ? key.to_sym : key }
|
|
116
|
+
normalized[:azure_foundry_api_key] ||= creds[:api_key]
|
|
117
|
+
normalized[:azure_foundry_bearer_token] ||= creds[:bearer_token]
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Nested `provider: { api_version:, surface:, deployments: }` is the
|
|
121
|
+
# canonical shape from default_settings. Flat keys remain accepted.
|
|
122
|
+
def self.resolve_nested_provider(normalized)
|
|
123
|
+
prov = normalized.delete(:provider)
|
|
124
|
+
return unless prov.is_a?(Hash)
|
|
125
|
+
|
|
126
|
+
prov = prov.transform_keys { |key| key.respond_to?(:to_sym) ? key.to_sym : key }
|
|
127
|
+
normalized[:azure_foundry_api_version] ||= prov[:api_version]
|
|
128
|
+
normalized[:azure_foundry_surface] ||= prov[:surface]
|
|
129
|
+
normalized[:azure_foundry_deployments] ||= prov[:deployments]
|
|
130
|
+
end
|
|
131
|
+
|
|
106
132
|
private_class_method :discover_default_instance, :discover_named_instances, :add_named_instance,
|
|
107
|
-
:normalize_instance_config
|
|
133
|
+
:normalize_instance_config, :resolve_nested_credentials, :resolve_nested_provider
|
|
108
134
|
|
|
109
135
|
Legion::Extensions::Llm::Configuration.register_provider_options(Provider.configuration_options)
|
|
110
136
|
end
|