lex-llm-bedrock 0.3.18 → 0.3.19

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: e0a7bdd5a1097bfe7caf898a8b47649c5b29d7ae2d73c980e47bec743f343b2c
4
- data.tar.gz: bab966bb6aa10487d43f1f4d01ae531b701ef74c49884ad820c127ee3d7efc91
3
+ metadata.gz: 33ab4ab57335007d1ffd9ef1c641e9be4fa657d83129f0b51382f624c3279fb3
4
+ data.tar.gz: 74e962cef7be3018f94a296d84ff248de09d9c0dc88ce1ddb9de8fcb3bf32e21
5
5
  SHA512:
6
- metadata.gz: 34d5f3629994cda2216de0826249516659e39e3e908152a66d62e46d4a9ce6b01f983e094c1c30f9c233227e810231d67dadfd8bed1fa86b70f448ea59b7c1b4
7
- data.tar.gz: 6cc2164e232cada49623ec316ea2a767227196ed7526ac1956c7c0ebf9110e52d1aaa69823c51bb06f33f4779772e4dce1037ed0e9aaf17601db4c9e2e0ec089
6
+ metadata.gz: 0d70d7113fa2b52ded5f4f64a49711052de15f8389c55840e8b4dcbc576b4b7cb55ad4f4bdb5255eb31c9e3e04b83a05415b56e6a4f8b65be31541ff3e5d4ad1
7
+ data.tar.gz: 0ee5829d8287dec6cfa825454a2b36aef4218e7e14517cbc1cf358eac689fdee82462d7031e45c22e3f76160dca2a2b0f1e3de291d6f95c597a97eccef483044
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.19 - 2026-06-10
4
+
5
+ ### Fixed
6
+ - **Tool role mapped incorrectly for Bedrock Converse** — Bedrock Converse API does not accept `role: 'tool'`; tool results must use `role: 'user'`. `format_invoke_model_messages` now remaps tool-role messages to user-role before serialization (provider.rb).
7
+ - **Unused keyword parameters in build_invoke_model_body** — Replaced explicit unused `_model`/`_streaming` kwargs with `**_rest` splat to capture and discard any extra keywords cleanly (provider.rb).
8
+ - **Spec helper LoadError** — Wrapped `require 'legion/extensions/helpers/lex'` in rescue block so specs load in isolated environments where the lex helper gem is absent. Added `register_provider_options` monkey-patch for standalone Configuration compatibility (spec_helper.rb).
9
+
3
10
  ## 0.3.18 - 2026-06-05
4
11
 
5
12
  ### Fixed
@@ -555,8 +555,7 @@ module Legion
555
555
  Legion::Extensions::Llm::Message.new(**msg_attrs)
556
556
  end
557
557
 
558
- def build_invoke_model_body(messages:, temperature:, max_tokens:, tools:, tool_prefs:, thinking:,
559
- _model: nil, _streaming: false)
558
+ def build_invoke_model_body(messages:, temperature:, max_tokens:, tools:, tool_prefs:, thinking:, **_rest)
560
559
  body = {
561
560
  max_tokens: max_tokens || 4096,
562
561
  messages: format_invoke_model_messages(messages),
@@ -597,7 +596,7 @@ module Legion
597
596
 
598
597
  next if content.nil? || (content.is_a?(Array) && content.empty?)
599
598
 
600
- { role: role, content: content }
599
+ { role: role == 'tool' ? 'user' : role, content: content }
601
600
  end
602
601
  end
603
602
 
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Llm
6
6
  module Bedrock
7
- VERSION = '0.3.18'
7
+ VERSION = '0.3.19'
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-bedrock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.18
4
+ version: 0.3.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - LegionIO