legion-llm 0.9.33 → 0.9.34
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 +5 -0
- data/lib/legion/llm/api/openai/responses.rb +6 -1
- data/lib/legion/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: ca7cfa8bdb01bbb162989ba4ce84f8735eb46e34f36cfea29d4504357d6eaa38
|
|
4
|
+
data.tar.gz: 2b8866db7f799f242a070fa590c18f64cbee278c7fc2e827a9fe604cab6ce7d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b3ba4cb577aa0a44b166ef7ee1299db98b5dbfa3759f76fb158ffa5e2c4eca7999198f47d87e70d8ebf79f21e1395137e75f26b033f609b939f70b2faa0b1f6
|
|
7
|
+
data.tar.gz: c77913f743c3075977419811d8c20fe7d7c1b48b77cc234b1bdcd4e1c1642734c9f203c60f3d8ec0c021f9cffe9fc79fd18a0abc14f452bdd152175d8a7fe820
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Legion LLM Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.34] - 2026-05-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- API: `extract_token` now correctly reads `:input_tokens` / `:output_tokens` hash keys from `pipeline_response.tokens`, fixing `input_tokens: 0` in streaming `response.completed` events (caused Codex CLI `stream disconnected before completion` error)
|
|
7
|
+
|
|
3
8
|
## [0.9.33] - 2026-05-22
|
|
4
9
|
|
|
5
10
|
### Added
|
|
@@ -257,9 +257,14 @@ module Legion
|
|
|
257
257
|
|
|
258
258
|
def self.extract_token(tokens, key)
|
|
259
259
|
return 0 if tokens.nil?
|
|
260
|
-
return (tokens[key] || tokens[key.to_s] || 0).to_i if tokens.is_a?(Hash)
|
|
261
260
|
|
|
262
261
|
method_name = { input: :input_tokens, output: :output_tokens }[key]
|
|
262
|
+
|
|
263
|
+
if tokens.is_a?(Hash)
|
|
264
|
+
return (tokens[method_name] || tokens[method_name.to_s] ||
|
|
265
|
+
tokens[key] || tokens[key.to_s] || 0).to_i
|
|
266
|
+
end
|
|
267
|
+
|
|
263
268
|
return tokens.public_send(method_name).to_i if method_name && tokens.respond_to?(method_name)
|
|
264
269
|
|
|
265
270
|
0
|
data/lib/legion/llm/version.rb
CHANGED