anthropic 1.27.0 → 1.28.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/tools/compaction_control.rb +4 -0
- data/lib/anthropic/helpers/vertex/client.rb +8 -1
- data/lib/anthropic/resources/beta/messages.rb +8 -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: 8d2da1a7bc8b49ea61915d1cc299b5aa6b0f3f23196d5e27c7b9dd3905f7e48f
|
|
4
|
+
data.tar.gz: f8256e11e3730d01877f3107c0a16ae66b5f3de6f5ec3cc7606ff44c889504e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '087f4d5e7a7f9104c994123d42eed55d377be6bfa5f4c232e98b972b82cdc269000724723da83aeda9a418e7d60d38c0cdc28e514cba9a09c39b26ca9190abe8'
|
|
7
|
+
data.tar.gz: 78ffa75859db0ca13363677ef710da7dcdab18847d1e9a922b00d767e5e1fba0502300b821f8eb987e9c597e87d70c4f027df4df7b1a670ddb11f4f03eab2948
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.28.0 (2026-04-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.27.0...v1.28.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.27.0...v1.28.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **vertex:** add support for US multi-region endpoint ([8b7426b](https://github.com/anthropics/anthropic-sdk-ruby/commit/8b7426b41652238c06e83ba03ec6caa87c41b5fd))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **client:** deprecate client-side compaction helpers ([f9dd745](https://github.com/anthropics/anthropic-sdk-ruby/commit/f9dd7457ecee0a7f6fb86dd5f2f13e742d7edb9b))
|
|
15
|
+
|
|
3
16
|
## 1.27.0 (2026-04-01)
|
|
4
17
|
|
|
5
18
|
Full Changelog: [v1.26.0...v1.27.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.26.0...v1.27.0)
|
data/README.md
CHANGED
|
@@ -33,6 +33,10 @@ module Anthropic
|
|
|
33
33
|
# Default token threshold for triggering compaction (100,000 tokens)
|
|
34
34
|
DEFAULT_THRESHOLD = 100_000
|
|
35
35
|
|
|
36
|
+
# @deprecated Use server-side compaction instead by passing
|
|
37
|
+
# edits: [{ type: 'compact_20260112' }] in the params passed to `tool_runner()`.
|
|
38
|
+
# See https://platform.claude.com/docs/en/build-with-claude/compaction
|
|
39
|
+
#
|
|
36
40
|
# Configuration for automatic conversation history compaction in tool runners.
|
|
37
41
|
#
|
|
38
42
|
# When the cumulative token count (input + output) across all messages exceeds
|
|
@@ -84,7 +84,14 @@ module Anthropic
|
|
|
84
84
|
|
|
85
85
|
base_url ||= ENV.fetch(
|
|
86
86
|
"ANTHROPIC_VERTEX_BASE_URL",
|
|
87
|
-
@region.to_s
|
|
87
|
+
case @region.to_s
|
|
88
|
+
when "global"
|
|
89
|
+
"https://aiplatform.googleapis.com/v1"
|
|
90
|
+
when "us"
|
|
91
|
+
"https://aiplatform.us.rep.googleapis.com/v1"
|
|
92
|
+
else
|
|
93
|
+
"https://#{@region}-aiplatform.googleapis.com/v1"
|
|
94
|
+
end
|
|
88
95
|
)
|
|
89
96
|
|
|
90
97
|
super(
|
|
@@ -15,6 +15,14 @@ module Anthropic
|
|
|
15
15
|
warn_thinking_enabled(params)
|
|
16
16
|
max_iterations = params.delete(:max_iterations)
|
|
17
17
|
compaction_control = params.delete(:compaction_control)
|
|
18
|
+
if compaction_control&.dig(:enabled) || compaction_control&.dig("enabled")
|
|
19
|
+
warn(
|
|
20
|
+
"[DEPRECATION] The 'compaction_control' parameter is deprecated and will be removed in a future version. " \
|
|
21
|
+
"Use server-side compaction instead by passing edits: [{ type: 'compact_20260112' }] in the params passed to `tool_runner()`. " \
|
|
22
|
+
"See https://platform.claude.com/docs/en/build-with-claude/compaction",
|
|
23
|
+
category: :deprecated
|
|
24
|
+
)
|
|
25
|
+
end
|
|
18
26
|
Anthropic::Helpers::Tools::Runner.new(@client, params:, max_iterations:, compaction_control:)
|
|
19
27
|
end
|
|
20
28
|
|
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.28.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-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|