lex-llm-azure-foundry 0.2.5 → 0.2.6
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: be5a0deef7be2d2f074ec98ebb5a77ec065d46029c7d4a902479bdfc2044240d
|
|
4
|
+
data.tar.gz: 565fe0757d88c7f8289c919d721db319303e25ef906f96982fd18179d1135845
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3503088b0c52dedeb98dc49bdbf8006836e038a71c0b0600e5aaaa89302c0e10c4f9963de7d583445fc98910520bd1bed89793b9c9776b7e95cf0d0b6d3d9215
|
|
7
|
+
data.tar.gz: bc52d6be469507ffa3fd886ccab511c345d34c568432b2e94c8e6f89c302d597d12f1fffffa61e2e6206f25e149c0590180c2d40ff28d6a17ad5c9baec3071ec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.6 - 2026-05-21
|
|
4
|
+
|
|
5
|
+
- Add `default_transport`/`default_tier` class declarations, remove `configured_transport`/`configured_tier`
|
|
6
|
+
- Add `model_allowed?` filtering in `discover_offerings`
|
|
7
|
+
- Default tier set to :cloud
|
|
8
|
+
- Identity headers included via base provider
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
## 0.2.5 - 2026-05-06
|
|
4
12
|
|
|
5
13
|
- Load provider-owned fleet actors through the LegionIO subscription base and the canonical Azure Foundry provider root.
|
|
@@ -18,6 +18,8 @@ module Legion
|
|
|
18
18
|
|
|
19
19
|
class << self
|
|
20
20
|
def slug = 'azure_foundry'
|
|
21
|
+
def default_transport = :http
|
|
22
|
+
def default_tier = :cloud
|
|
21
23
|
def configuration_requirements = %i[azure_foundry_endpoint]
|
|
22
24
|
|
|
23
25
|
def configuration_options
|
|
@@ -128,10 +130,10 @@ module Legion
|
|
|
128
130
|
end
|
|
129
131
|
|
|
130
132
|
def headers
|
|
131
|
-
{
|
|
133
|
+
identity_headers.merge({
|
|
132
134
|
'api-key' => config.azure_foundry_api_key,
|
|
133
135
|
'Authorization' => bearer_header
|
|
134
|
-
}.compact
|
|
136
|
+
}.compact)
|
|
135
137
|
end
|
|
136
138
|
|
|
137
139
|
def completion_url = path_for('chat/completions')
|
|
@@ -143,10 +145,10 @@ module Legion
|
|
|
143
145
|
|
|
144
146
|
def discover_offerings(live: false, **filters)
|
|
145
147
|
log.info { "discovering offerings live=#{live} from #{api_base}" }
|
|
146
|
-
offerings =
|
|
147
|
-
return
|
|
148
|
+
offerings = filter_offerings(allowed_offerings, **filters)
|
|
149
|
+
return offerings unless live
|
|
148
150
|
|
|
149
|
-
|
|
151
|
+
offerings.map do |offering|
|
|
150
152
|
with_live_metadata(offering)
|
|
151
153
|
rescue StandardError => e
|
|
152
154
|
handle_exception(e, level: :warn, handled: true, operation: 'azure_foundry.discover_offerings')
|
|
@@ -300,6 +302,18 @@ module Legion
|
|
|
300
302
|
self.class.normalize_deployments(config.azure_foundry_deployments)
|
|
301
303
|
end
|
|
302
304
|
|
|
305
|
+
def allowed_offerings
|
|
306
|
+
configured_deployments.filter_map do |deployment|
|
|
307
|
+
offering = offering_from_config(deployment)
|
|
308
|
+
next unless offering
|
|
309
|
+
|
|
310
|
+
mid = offering.respond_to?(:model) ? offering.model : (offering[:model] || deployment[:model])
|
|
311
|
+
next unless model_allowed?(mid.to_s)
|
|
312
|
+
|
|
313
|
+
offering
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
|
|
303
317
|
def offering_from_config(deployment)
|
|
304
318
|
deployment_name = value_for(deployment, :deployment) || value_for(deployment, :model)
|
|
305
319
|
return nil if deployment_name.to_s.empty?
|
|
@@ -319,8 +333,8 @@ module Legion
|
|
|
319
333
|
Legion::Extensions::Llm::Routing::ModelOffering.new(
|
|
320
334
|
provider_family: :azure_foundry,
|
|
321
335
|
instance_id: instance_id,
|
|
322
|
-
transport:
|
|
323
|
-
tier:
|
|
336
|
+
transport: offering_transport,
|
|
337
|
+
tier: offering_tier,
|
|
324
338
|
model: model,
|
|
325
339
|
usage_type: usage_type.to_sym,
|
|
326
340
|
capabilities: capabilities,
|
|
@@ -332,14 +346,6 @@ module Legion
|
|
|
332
346
|
)
|
|
333
347
|
end
|
|
334
348
|
|
|
335
|
-
def configured_transport(default)
|
|
336
|
-
config.respond_to?(:transport) ? config.transport : default
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
def configured_tier(default)
|
|
340
|
-
config.respond_to?(:tier) ? config.tier : default
|
|
341
|
-
end
|
|
342
|
-
|
|
343
349
|
def with_live_metadata(offering)
|
|
344
350
|
response = connection.get(models_url)
|
|
345
351
|
metadata = offering.metadata.merge(model_info: response.body)
|