anthropic 1.33.1 → 1.34.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 +9 -0
- data/README.md +1 -1
- data/lib/anthropic/helpers/aws_auth.rb +9 -3
- data/lib/anthropic/helpers/bedrock/mantle_client.rb +2 -1
- data/lib/anthropic/models/model.rb +12 -0
- 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: 3520cc299f08e53c7dc6c5d584b3e1abc0a0d099b9c1c484a1cfb0348ded7d22
|
|
4
|
+
data.tar.gz: 454ce95234f9551764cf232e8a0d5a858d6fc8d513760f139cc3bc91c8285722
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7acdd0330a5c6c341cf7f00d491202cf802a1078ce32e21035f1201e8b8780298aefc32d22dcbf5b7f296f82eb5110289ed35e9b0af3e844a029907f4b8db13
|
|
7
|
+
data.tar.gz: 3c53d0ac26574660c5008719db5510effd5321bd27755e8ec28ceef98e02408cf7fd4f70f0b3064cee31039cb10545e3671a72eee55beda2a4c3a4e9a67996ec
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.34.0 (2026-04-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.33.1...v1.34.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.33.1...v1.34.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** mark Sonnet and Opus 4 as deprecated ([287e6c4](https://github.com/anthropics/anthropic-sdk-ruby/commit/287e6c471b24ef580260224675dddd08218dcd68))
|
|
10
|
+
* **bedrock:** use auth header for mantle client ([#894](https://github.com/anthropics/anthropic-sdk-ruby/issues/894)) ([2ac3bba](https://github.com/anthropics/anthropic-sdk-ruby/commit/2ac3bbaa1a20f7af1069aa1ff4bcc2b3ef7123c6))
|
|
11
|
+
|
|
3
12
|
## 1.33.1 (2026-04-13)
|
|
4
13
|
|
|
5
14
|
Full Changelog: [v1.33.0...v1.33.1](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.33.0...v1.33.1)
|
data/README.md
CHANGED
|
@@ -40,8 +40,10 @@ module Anthropic
|
|
|
40
40
|
workspace_id: nil,
|
|
41
41
|
env_api_key_fallback: nil,
|
|
42
42
|
env_workspace_id: nil,
|
|
43
|
-
env_workspace_id_fallback: nil
|
|
43
|
+
env_workspace_id_fallback: nil,
|
|
44
|
+
use_bearer_auth: false
|
|
44
45
|
)
|
|
46
|
+
@use_bearer_auth = use_bearer_auth
|
|
45
47
|
begin
|
|
46
48
|
require("aws-sdk-core")
|
|
47
49
|
rescue LoadError
|
|
@@ -132,12 +134,16 @@ module Anthropic
|
|
|
132
134
|
end
|
|
133
135
|
|
|
134
136
|
# Override the base client's auth_headers to prevent ANTHROPIC_API_KEY
|
|
135
|
-
# from leaking as an x-api-key header in SigV4 mode
|
|
136
|
-
#
|
|
137
|
+
# from leaking as an x-api-key header in SigV4 mode, and to send the API
|
|
138
|
+
# key as an Authorization: Bearer header when use_bearer_auth is set.
|
|
137
139
|
#
|
|
138
140
|
# @return [Hash{String=>String}]
|
|
139
141
|
private def auth_headers
|
|
140
142
|
return {} if @use_sig_v4
|
|
143
|
+
if @use_bearer_auth
|
|
144
|
+
return {} if @api_key.nil?
|
|
145
|
+
return {"authorization" => "Bearer #{@api_key}"}
|
|
146
|
+
end
|
|
141
147
|
super
|
|
142
148
|
end
|
|
143
149
|
|
|
@@ -83,7 +83,8 @@ module Anthropic
|
|
|
83
83
|
service_name: "bedrock-mantle",
|
|
84
84
|
env_api_key: "AWS_BEARER_TOKEN_BEDROCK",
|
|
85
85
|
env_api_key_fallback: "ANTHROPIC_AWS_API_KEY",
|
|
86
|
-
derive_base_url: ->(region) { "https://bedrock-mantle.#{region}.api.aws/anthropic" }
|
|
86
|
+
derive_base_url: ->(region) { "https://bedrock-mantle.#{region}.api.aws/anthropic" },
|
|
87
|
+
use_bearer_auth: true
|
|
87
88
|
)
|
|
88
89
|
|
|
89
90
|
super(
|
|
@@ -85,15 +85,27 @@ module Anthropic
|
|
|
85
85
|
CLAUDE_OPUS_4_1_20250805 = :"claude-opus-4-1-20250805"
|
|
86
86
|
|
|
87
87
|
# Powerful model for complex tasks
|
|
88
|
+
# @deprecated Will reach end-of-life on June 15th, 2026. Please migrate to a newer model.
|
|
89
|
+
# Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
|
|
90
|
+
# information.
|
|
88
91
|
CLAUDE_OPUS_4_0 = :"claude-opus-4-0"
|
|
89
92
|
|
|
90
93
|
# Powerful model for complex tasks
|
|
94
|
+
# @deprecated Will reach end-of-life on June 15th, 2026. Please migrate to a newer model.
|
|
95
|
+
# Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
|
|
96
|
+
# information.
|
|
91
97
|
CLAUDE_OPUS_4_20250514 = :"claude-opus-4-20250514"
|
|
92
98
|
|
|
93
99
|
# High-performance model with extended thinking
|
|
100
|
+
# @deprecated Will reach end-of-life on June 15th, 2026. Please migrate to a newer model.
|
|
101
|
+
# Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
|
|
102
|
+
# information.
|
|
94
103
|
CLAUDE_SONNET_4_0 = :"claude-sonnet-4-0"
|
|
95
104
|
|
|
96
105
|
# High-performance model with extended thinking
|
|
106
|
+
# @deprecated Will reach end-of-life on June 15th, 2026. Please migrate to a newer model.
|
|
107
|
+
# Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
|
|
108
|
+
# information.
|
|
97
109
|
CLAUDE_SONNET_4_20250514 = :"claude-sonnet-4-20250514"
|
|
98
110
|
|
|
99
111
|
# Fast and cost-effective model
|
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.34.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-04-
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|