lex-llm 0.4.3 → 0.4.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 33dcc097174b40983896f2c6676ca20e055f262e9f85d27df6a4b1e6f27e9632
|
|
4
|
+
data.tar.gz: 0abfa31c8b8d3d034f0c0d87e865bc80c5d6f8d5d5232a94ce614da0403b6868
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27dc2378bfb280e77267f15f2ef6945d2453f1ac74c0437815e5c474e1310c951f3b4d80167f182f4465003c1699d97e200f7f1a8f2d479defe94a90dce35ddd
|
|
7
|
+
data.tar.gz: edf02a16a1a1373ac3dc97807af981314bd6fefd4b175bd60b6418e2526b8701f3726b657a6c4b0fb80a64765c2629614601ffe7abef847a6015b1a04ef91275
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.5 - 2026-05-07
|
|
4
|
+
|
|
5
|
+
- Add `ProviderSettings.infer_tier_from_endpoint(url)` shared utility: returns `:local` for localhost/loopback endpoints, `:direct` for all other hosts. Handles `URI::InvalidURIError` and nil safely.
|
|
6
|
+
|
|
7
|
+
## 0.4.4 - 2026-05-07
|
|
8
|
+
|
|
9
|
+
- Fix `confirm_publish` to call `wait_for_confirms` with no arguments, matching bunny 3.1.0 API which removed the timeout parameter.
|
|
10
|
+
- Fix `prepare_publisher_confirms` to pass `confirm_timeout:` to `confirm_select` when `publish_confirm_timeout_ms` is set.
|
|
11
|
+
|
|
3
12
|
## 0.4.3 - 2026-05-06
|
|
4
13
|
|
|
5
14
|
- Move provider-owned fleet responder execution into `lex-llm` so provider gems no longer depend on `legion-llm`.
|
|
@@ -57,7 +57,14 @@ module Legion
|
|
|
57
57
|
return unless options[:publisher_confirm] == true
|
|
58
58
|
|
|
59
59
|
confirm_channel = publish_channel(exchange_dest)
|
|
60
|
-
|
|
60
|
+
return unless confirm_channel.respond_to?(:confirm_select)
|
|
61
|
+
|
|
62
|
+
timeout_ms = options[:publish_confirm_timeout_ms]
|
|
63
|
+
if timeout_ms
|
|
64
|
+
confirm_channel.confirm_select(confirm_timeout: timeout_ms.to_i)
|
|
65
|
+
else
|
|
66
|
+
confirm_channel.confirm_select
|
|
67
|
+
end
|
|
61
68
|
end
|
|
62
69
|
|
|
63
70
|
def publish_result(exchange_dest, options, return_state)
|
|
@@ -93,12 +100,7 @@ module Legion
|
|
|
93
100
|
confirm_channel = publish_channel(exchange_dest)
|
|
94
101
|
return :accepted unless confirm_channel.respond_to?(:wait_for_confirms)
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
confirmed = if timeout
|
|
98
|
-
confirm_channel.wait_for_confirms(timeout.to_f / 1000.0)
|
|
99
|
-
else
|
|
100
|
-
confirm_channel.wait_for_confirms
|
|
101
|
-
end
|
|
103
|
+
confirmed = confirm_channel.wait_for_confirms
|
|
102
104
|
confirmed == false ? :nacked : :accepted
|
|
103
105
|
rescue Timeout::Error => e
|
|
104
106
|
handle_exception(e, level: :warn, handled: true, operation: 'llm.fleet.publish.confirm')
|
|
@@ -60,6 +60,16 @@ module Legion
|
|
|
60
60
|
left_value.is_a?(Hash) && right_value.is_a?(Hash) ? deep_merge(left_value, right_value) : right_value
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
|
+
|
|
64
|
+
def infer_tier_from_endpoint(url)
|
|
65
|
+
return :direct if url.nil? || url.to_s.empty?
|
|
66
|
+
|
|
67
|
+
require 'uri'
|
|
68
|
+
host = URI.parse(url.to_s).host.to_s.downcase
|
|
69
|
+
%w[localhost 127.0.0.1 ::1 [::1]].include?(host) ? :local : :direct
|
|
70
|
+
rescue URI::InvalidURIError
|
|
71
|
+
:direct
|
|
72
|
+
end
|
|
63
73
|
end
|
|
64
74
|
end
|
|
65
75
|
end
|