lex-llm-vllm 0.3.14 → 0.3.16

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: '0459c715b28893afc32019e6f2f831ee08824cd3a0224c17fa25164f5f14a9fc'
4
- data.tar.gz: 72629182ec192e73316f29d1b491b471a1c8cfe6d87e348f2ce00a16f9df8a1b
3
+ metadata.gz: 8a53b31d5fe4efcc8b9451b0934c52bcbf71a4af70e493cfe82d7ba75f40ce68
4
+ data.tar.gz: a567a34e2f14e2cf0497b98926527fa9895040981e19e0340006bdf143640ef4
5
5
  SHA512:
6
- metadata.gz: 60b334c314c6f29257ae7c9a073dfc034536f50f4c58e620137d49d88fb682d12f1abb5882ae792e7a99faffabd3cb01ba990f053f341d10b5478952f527e6bd
7
- data.tar.gz: 3b602d7548c15a76068645d27da5a94619d7ca1954a2620c8291b2eb4af93384b2a4fe5f241b15487b3b8f7bb99a8294cd474ddac7f94ee1439d9e2d5f76ee08
6
+ metadata.gz: 0a64470ff262c97f5cd99b02c066cf24ffb2872ae7dcde10597e9869f3cfc2be89ffc4d07bf9bb43bd83b83d161cfc8d987f25121f87e9cf4f8770abe66fb358
7
+ data.tar.gz: cd4b89c6a0297f70232cf882480b24f903517caec5ed9f7129a61e0dc0d65bb599126cc1fa7cceccd388c8411035db74d737ff15351d7c3ad4c9433823fd5e37
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.16] - 2026-07-31
4
+
5
+ ### Fixed
6
+ - **`parse_chunk` now handles multiple tool_calls batched in a single SSE delta.** vLLM can batch several parallel tool_calls into one `choices[0].delta.tool_calls` array. Previously only `tool_calls.first` was processed — the 2nd+ tool calls were silently dropped, causing parallel tool invocations to lose calls. Now returns an array of `tool_call_delta` chunks (one per tool_call), which the streaming handler already iterates (per lex-llm 0.6.13). Single tool_call deltas still return a single chunk (not wrapped in an array) for backward compatibility.
7
+
8
+ ## [0.3.15] - 2026-07-31
9
+
10
+ ### Fixed
11
+ - **`to_legacy_chunk` now propagates `stop_reason` from canonical chunks.** The canonical translator correctly parsed vLLM's `finish_reason` into `Canonical::Chunk.stop_reason`, but `to_legacy_chunk` never passed it into the legacy `Legion::Extensions::Llm::Chunk` constructor. The `StreamAccumulator` already reads `chunk.stop_reason` (line 40), so the field was silently nil on every streamed chunk — downstream always defaulted to `:end_turn` regardless of what the provider actually said. Truncated responses (`:max_tokens`) and content-filtered responses (`:content_filter`) were indistinguishable from clean completions. Now the real finish_reason flows through: canonical chunk → legacy chunk → accumulator → assembled Message.
12
+
3
13
  ## [0.3.14] - 2026-07-24
4
14
 
5
15
  ### Fixed
data/lex-llm-vllm.gemspec CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency 'legion-logging', '>= 1.3.2'
28
28
  spec.add_dependency 'legion-settings', '>= 1.3.14'
29
29
  spec.add_dependency 'legion-transport', '>= 1.4.14'
30
- spec.add_dependency 'lex-llm', '>= 0.6.9'
30
+ spec.add_dependency 'lex-llm', '>= 0.6.13'
31
31
  end
@@ -363,6 +363,7 @@ module Legion
363
363
  thinking: thinking,
364
364
  input_tokens: usage.respond_to?(:input_tokens) ? usage.input_tokens : nil,
365
365
  output_tokens: usage.respond_to?(:output_tokens) ? usage.output_tokens : nil,
366
+ stop_reason: canonical.stop_reason,
366
367
  raw: raw_data
367
368
  )
368
369
  end
@@ -172,8 +172,11 @@ module Legion
172
172
  log.debug '[vllm][translator] action=content_dropped_with_tool_call ' \
173
173
  "content=#{delta['content'][0, 100].inspect} request_id=#{request_id}"
174
174
  end
175
- return build_tool_call_delta_chunk(tool_calls.first, request_id,
176
- stop_reason: chunk_stop_reason, usage: chunk_usage)
175
+ chunks = tool_calls.map do |tc|
176
+ build_tool_call_delta_chunk(tc, request_id,
177
+ stop_reason: chunk_stop_reason, usage: chunk_usage)
178
+ end
179
+ return chunks.size == 1 ? chunks.first : chunks
177
180
  end
178
181
 
179
182
  # Thinking delta from reasoning_content
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Llm
6
6
  module Vllm
7
- VERSION = '0.3.14'
7
+ VERSION = '0.3.16'
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.3.14
4
+ version: 0.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - LegionIO
@@ -71,14 +71,14 @@ dependencies:
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 0.6.9
74
+ version: 0.6.13
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: 0.6.9
81
+ version: 0.6.13
82
82
  description: vLLM provider integration for the LegionIO LLM routing framework.
83
83
  email:
84
84
  - matthewdiverson@gmail.com