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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a28aebdd54d31366f32c1d4d6ef29255d82de76cee72340466a6d00a4c00ce93
4
- data.tar.gz: 782a11bdf33bb17a714fae90128ed8a47bb2dc58f25a13764a963e80dead26b4
3
+ metadata.gz: b34378dd9395b126e18915a8ee15526d27d7e7002475e401d8c81bae601289fb
4
+ data.tar.gz: ed103f7d82d22f04cc7a0332a4a24648beaafcbafbf4e16fa19717ce59c9817c
5
5
  SHA512:
6
- metadata.gz: bea1ae610f8b0ecc832c480a05d2d774b1cf67def8112cd24c433d222fd848ef580abf96ade09eb17fed9b206d2f21648aaf9ec50ea03b0132c7a34fdd3d8479
7
- data.tar.gz: 322ddef548b47012b960dcc23329b753e1a8b04328ad6eb0a40794c912e33829c4aaca97a6cab2c39a2672f5dcc4139e80dfab8fbf87bfccbe9cd3d8bf9d59ff
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
@@ -15,7 +15,7 @@ Add to your application's Gemfile:
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.39.0"
18
+ gem "anthropic", "~> 1.40.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -159,7 +159,26 @@ module Anthropic
159
159
 
160
160
  return request unless @use_sig_v4
161
161
 
162
- sliced = request.slice(:method, :url, :body).transform_keys(method: :http_method)
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")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "1.39.0"
4
+ VERSION = "1.40.0"
5
5
  end
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.39.0
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-06 00:00:00.000000000 Z
11
+ date: 2026-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi