lex-llm 0.1.9 → 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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/legion/extensions/llm/provider.rb +12 -4
- data/lib/legion/extensions/llm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e89cf3b81ab7c122b0a4ffd99da2dda0cdc7c79258c43aa06291b8008985815a
|
|
4
|
+
data.tar.gz: 8a7e3da631d4595fd4a57de32a6bcdd13004313a00a653bf2b0fd347e85bbd20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11e4dac6953ab61572d539c2e5c7cea634ab96388ba654392ea4b64365bab694f0e420acaf0a098ced97613240b89122fc3e8b5b186e4e78b77d37feca8ffbfd
|
|
7
|
+
data.tar.gz: cb0224a1f4130f2783b17464cc182b2b01b6feee21e35246b99a73b568e68d64f1191b39d59a0f82d333cac0df9b15ab86e710269b44141d0039a0997b008340
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0 - 2026-04-30
|
|
4
|
+
|
|
5
|
+
- Promote ModelInfo Data.define value object with immutable fields: instance, parameter_count, parameter_size, quantization, size_bytes, modalities_input, modalities_output
|
|
6
|
+
- Formalize provider contract: model_allowed? whitelist/blacklist filtering, multi-host base_url resolution with TLS awareness and reachability probing, normalize_url for consistent endpoint formatting
|
|
7
|
+
- Add cache tier selection helpers: cache_local_instance?, model_cache_get/set/fetch, cache_instance_key for local vs shared cache routing
|
|
8
|
+
- Add shared transport classes and RegistryPublisher/RegistryEventBuilder parameterized by provider_family for all lex-llm-* gems
|
|
9
|
+
- Deprecate Provider.register, .resolve, .for, .providers in favor of the extension registry
|
|
10
|
+
|
|
3
11
|
## 0.1.9 - 2026-04-30
|
|
4
12
|
|
|
5
13
|
- Replace Model::Info class with immutable Data.define value object supporting new fields: instance, parameter_count, parameter_size, quantization, size_bytes, modalities_input, modalities_output
|
|
@@ -211,18 +211,26 @@ module Legion
|
|
|
211
211
|
|
|
212
212
|
def resolve_base_url
|
|
213
213
|
urls = Array(config_base_url)
|
|
214
|
-
|
|
214
|
+
return nil if urls.empty?
|
|
215
|
+
|
|
216
|
+
@resolve_base_url ||= find_reachable_url(urls) || normalize_url(urls.first)
|
|
215
217
|
end
|
|
216
218
|
|
|
217
219
|
def config_base_url
|
|
218
220
|
respond_to?(:settings) ? settings[:base_url] : nil
|
|
219
221
|
end
|
|
220
222
|
|
|
223
|
+
def normalize_url(url)
|
|
224
|
+
raw = url.to_s.strip
|
|
225
|
+
return raw if raw.match?(%r{^https?://})
|
|
226
|
+
|
|
227
|
+
scheme = tls_enabled? ? 'https' : 'http'
|
|
228
|
+
"#{scheme}://#{raw}"
|
|
229
|
+
end
|
|
230
|
+
|
|
221
231
|
def find_reachable_url(urls)
|
|
222
232
|
urls.each do |url|
|
|
223
|
-
|
|
224
|
-
scheme = tls_enabled? ? 'https' : 'http'
|
|
225
|
-
full = "#{scheme}://#{normalized}"
|
|
233
|
+
full = normalize_url(url)
|
|
226
234
|
return full if url_reachable?(full)
|
|
227
235
|
end
|
|
228
236
|
nil
|