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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ca7422981b9d63c85ebe052990cd12af77c9e625ce7597d67e8161418a94ea3
4
- data.tar.gz: 1cd31a58aa6bc9f35a9e8d45c1bed00c05b7dbdcfaaddb81bb29f644787a7703
3
+ metadata.gz: e89cf3b81ab7c122b0a4ffd99da2dda0cdc7c79258c43aa06291b8008985815a
4
+ data.tar.gz: 8a7e3da631d4595fd4a57de32a6bcdd13004313a00a653bf2b0fd347e85bbd20
5
5
  SHA512:
6
- metadata.gz: d0de80f09c6820c95b51297bc3a6b0bdebfdaaedb007668c635b670c45668e80c1ed4a9eb0c2cff5db48aef602c1aa4e9f325b734ed63f661fbec4248589aa26
7
- data.tar.gz: 8bfed0a1cec4ec06062c6797afed865f7fec9757b7906022dfd04bd9650b2b3bd5bc67c6cda65f3464bc3f8da1c0a59543d573ae30231bcc2874b307a0fb6e85
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
- @resolve_base_url ||= find_reachable_url(urls) || urls.first
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
- normalized = strip_scheme(url)
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
@@ -3,7 +3,7 @@
3
3
  module Legion
4
4
  module Extensions
5
5
  module Llm
6
- VERSION = '0.1.9'
6
+ VERSION = '0.2.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LegionIO