anthropic 1.39.0 → 1.40.0
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 +13 -0
- data/README.md +1 -1
- data/lib/anthropic/helpers/aws_auth.rb +20 -1
- data/lib/anthropic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b34378dd9395b126e18915a8ee15526d27d7e7002475e401d8c81bae601289fb
|
|
4
|
+
data.tar.gz: ed103f7d82d22f04cc7a0332a4a24648beaafcbafbf4e16fa19717ce59c9817c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6740871a358a65e3948a1381ba601ad342f4f1418c19af0e9c6badf1c91e7d4aec51650f5d202a3f31d44b39f4c951a85875d4208227281ceb0d7da0b7a9c0d8
|
|
7
|
+
data.tar.gz: b596807165dbd16f19fe9902451b0e6e9b346030265214d1c5eece6e1d4eb8ee7c3fd9cf650d06ca7695eac94103b4669f8b130970b0fe5ca61022ea4ba0630f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.40.0 (2026-05-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.39.0...v1.40.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.39.0...v1.40.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **aws:** Add AWS client for Claude Platform on AWS ([3c24797](https://github.com/anthropics/anthropic-sdk-ruby/commit/3c2479737666f61f1096b07c30412fffdfabe133))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **aws,bedrock:** materialize streamed request body before SigV4 signing ([#927](https://github.com/anthropics/anthropic-sdk-ruby/issues/927)) ([5b6d9d4](https://github.com/anthropics/anthropic-sdk-ruby/commit/5b6d9d4bfcb2a9e3fcc14a5683f6e25a205791a2))
|
|
15
|
+
|
|
3
16
|
## 1.39.0 (2026-05-06)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v1.38.0...v1.39.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.38.0...v1.39.0)
|
data/README.md
CHANGED
|
@@ -159,7 +159,26 @@ module Anthropic
|
|
|
159
159
|
|
|
160
160
|
return request unless @use_sig_v4
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
# `Aws::Sigv4::Signer#sign_request` only accepts `String` / `IO` / `nil`
|
|
163
|
+
# bodies. Multipart and JSONL requests carry a lazy `Enumerable` body
|
|
164
|
+
# (see `Util.encode_content`), which the signer rejects. Materialize it
|
|
165
|
+
# to a `String` and replace the request body so the signed payload is
|
|
166
|
+
# exactly the bytes that go over the wire (the lazy enumerator can only
|
|
167
|
+
# be consumed once).
|
|
168
|
+
body = request[:body]
|
|
169
|
+
body =
|
|
170
|
+
case body
|
|
171
|
+
when nil, String, IO, StringIO
|
|
172
|
+
body
|
|
173
|
+
when Enumerable
|
|
174
|
+
materialized = body.to_a.join
|
|
175
|
+
request = {**request, body: materialized}
|
|
176
|
+
materialized
|
|
177
|
+
else
|
|
178
|
+
body.to_s
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
sliced = {http_method: request.fetch(:method), url: request.fetch(:url), body: body}
|
|
163
182
|
signed = @signer.sign_request({**sliced, headers: headers})
|
|
164
183
|
headers = Anthropic::Internal::Util.normalized_headers(headers, signed.headers)
|
|
165
184
|
headers.delete("connection")
|
data/lib/anthropic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anthropic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.40.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anthropic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|