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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72c6d580e9df64dc561e9dcd1b5ea9cd9ad18d46293c64dc25f8e6cd971ed8dc
4
- data.tar.gz: a1124fb9148fc390060d8d9a6f333eb698fb65beaa5e81a7f57c5a02b95fcb16
3
+ metadata.gz: 8d2da1a7bc8b49ea61915d1cc299b5aa6b0f3f23196d5e27c7b9dd3905f7e48f
4
+ data.tar.gz: f8256e11e3730d01877f3107c0a16ae66b5f3de6f5ec3cc7606ff44c889504e9
5
5
  SHA512:
6
- metadata.gz: a687549d5a637357f3ffd5b8da67529da52410168e7cab51e4485c3c120a15f4dbba7b07d957f5920866f78db44f6bd790cab398a6d07b5a4da3298d0c8038f0
7
- data.tar.gz: 19245fd17062f33dbc20dc2ba59e5f6c33be3605bd37d3b27af34813cee0e4b37feedcc217d3cb3b7ef354492220dd39dacb71009eb43f7fe90920762e11adda
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
@@ -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.27.0"
18
+ gem "anthropic", "~> 1.28.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -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 == "global" ? "https://aiplatform.googleapis.com/v1" : "https://#{@region}-aiplatform.googleapis.com/v1"
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "1.27.0"
4
+ VERSION = "1.28.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.27.0
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-01 00:00:00.000000000 Z
11
+ date: 2026-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi