lex-llm-vllm 0.2.10 → 0.2.11

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: a3082ce3d1b3d61f220aed833a0b87138ad199cce52cfb455683c04d57db4f10
4
- data.tar.gz: a542a059e10c1a12a58fa68f611706e3c6007c0642ba57777ddf2e7b31829e5e
3
+ metadata.gz: c4369ada04bb372dd59d3a57e2490c2b984c6ec1d7c4277c044b0f4126ba6136
4
+ data.tar.gz: 922947d49abecdbefbc7818dff56a82a35d1cae0978ebb94f5e9711f02a402c1
5
5
  SHA512:
6
- metadata.gz: 864d11b0394b30b9df44c5e5ffb97dcba939311c30b87c9588ca8dea73b92f2087c5a6af6c052606f97c63e93201e964d5a358b95ca6b32905f9a087d860bf80
7
- data.tar.gz: 22df5b5ea5c9dedabe193cd2caa83944eef6f0b107f98605216587eda77ce53efb9fe4fea596fd796415d9c1e5ea7fda2d4079890ef805fd054ba78d7f398d9f
6
+ metadata.gz: e2d9c3ffc63f2ba151573ebd898c0a08e8f73c52fe11ba38d452470e61569a33914d253ad8b1d08b235f90cfbc1f9613dea4bae5728d4b905539241e7034f9ff
7
+ data.tar.gz: 9cf36664ead33936f9c70ca3e892603ed6a66e1e3ef82560e7016e94207835ae6de4af7e7e9041e70eeb69b3117a48d780ca4a7e71aa3626ff8cc497800e8453
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.11 - 2026-05-21
4
+
5
+ - Add `default_transport`/`default_tier` class declarations, remove duplicate instance methods
6
+ - Add `model_allowed?` filtering in `discover_offerings`
7
+ - Identity headers included via base provider
8
+ - api_base reads from settings[:endpoint] fallback
9
+
10
+
3
11
  ## 0.2.10 - 2026-05-13
4
12
 
5
13
  - Add `fetch_model_detail` to re-fetch `/v1/models` for `context_window` on a cache miss.
@@ -16,6 +16,8 @@ module Legion
16
16
  class << self
17
17
  def slug = 'vllm'
18
18
  def local? = false
19
+ def default_transport = :http
20
+ def default_tier = :direct
19
21
  def configuration_options = %i[vllm_api_base vllm_api_key]
20
22
  def configuration_requirements = []
21
23
  def capabilities = Capabilities
@@ -52,14 +54,14 @@ module Legion
52
54
  end
53
55
 
54
56
  def api_base
55
- normalize_url(config.vllm_api_base || 'localhost:8000')
57
+ normalize_url(config.vllm_api_base || settings[:endpoint] || 'http://localhost:8000')
56
58
  end
57
59
 
58
60
  def headers
61
+ hdrs = identity_headers
59
62
  token = config.vllm_api_key
60
- return {} if token.nil? || token.to_s.empty?
61
-
62
- { 'Authorization' => "Bearer #{token}" }
63
+ hdrs['Authorization'] = "Bearer #{token}" unless token.nil? || token.to_s.empty?
64
+ hdrs
63
65
  end
64
66
 
65
67
  def health_url = '/health'
@@ -95,9 +97,13 @@ module Legion
95
97
  else
96
98
  Array(@cached_models)
97
99
  end
98
- models.map { |model_info| offering_from_model(model_info) }.tap do |offerings|
99
- log.debug { "built #{offerings.size} vLLM offering(s) live=#{live}" }
100
+ offerings = models.filter_map do |model_info|
101
+ next unless model_allowed?(model_info.id)
102
+
103
+ offering_from_model(model_info)
100
104
  end
105
+ log.debug { "built #{offerings.size} vLLM offering(s) live=#{live}" }
106
+ offerings
101
107
  rescue StandardError => e
102
108
  handle_exception(e, level: :warn, handled: true, operation: 'vllm.discover_offerings')
103
109
  []
@@ -167,14 +173,6 @@ module Legion
167
173
  )
168
174
  end
169
175
 
170
- def offering_transport
171
- config.respond_to?(:transport) ? config.transport : :http
172
- end
173
-
174
- def offering_tier
175
- config.respond_to?(:tier) ? config.tier : :direct
176
- end
177
-
178
176
  def render_payload(messages, tools:, temperature:, model:, stream:, schema:, thinking:, tool_prefs:) # rubocop:disable Metrics/ParameterLists
179
177
  payload = super
180
178
  payload.delete(:reasoning_effort)
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Llm
6
6
  module Vllm
7
- VERSION = '0.2.10'
7
+ VERSION = '0.2.11'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-llm-vllm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - LegionIO