anthropic 1.3.0 → 1.4.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 +17 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +5 -2
- data/lib/anthropic/internal/transport/base_client.rb +1 -1
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +49 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
- data/lib/anthropic/models/beta/message_create_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/citation_char_location.rb +7 -1
- data/lib/anthropic/models/citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/citation_page_location.rb +7 -1
- data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
- data/lib/anthropic/models/message_count_tokens_tool.rb +4 -34
- data/lib/anthropic/models/message_create_params.rb +2 -2
- data/lib/anthropic/models/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/model.rb +5 -0
- data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -0
- data/lib/anthropic/models/tool_text_editor_20250728.rb +45 -0
- data/lib/anthropic/models/tool_union.rb +4 -33
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/messages.rb +3 -3
- data/lib/anthropic/resources/messages.rb +3 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +3 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +5 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +4 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +4 -0
- data/rbi/anthropic/models/citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +8 -4
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -61
- data/rbi/anthropic/models/message_create_params.rbi +8 -4
- data/rbi/anthropic/models/messages/batch_create_params.rbi +8 -4
- data/rbi/anthropic/models/model.rbi +4 -0
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +62 -0
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +72 -0
- data/rbi/anthropic/models/tool_union.rbi +2 -61
- data/rbi/anthropic/models.rbi +4 -0
- data/rbi/anthropic/resources/beta/messages.rbi +3 -0
- data/rbi/anthropic/resources/messages.rbi +6 -3
- data/sig/anthropic/internal/transport/base_client.rbs +1 -1
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +39 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
- data/sig/anthropic/models/citation_char_location.rbs +5 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/citation_page_location.rbs +5 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -28
- data/sig/anthropic/models/model.rbs +4 -0
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +30 -0
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +35 -0
- data/sig/anthropic/models/tool_union.rbs +2 -28
- data/sig/anthropic/models.rbs +4 -0
- metadata +11 -2
@@ -14,6 +14,7 @@ module Anthropic
|
|
14
14
|
| :"claude-opus-4-0"
|
15
15
|
| :"claude-opus-4-20250514"
|
16
16
|
| :"claude-4-opus-20250514"
|
17
|
+
| :"claude-opus-4-1-20250805"
|
17
18
|
| :"claude-3-opus-latest"
|
18
19
|
| :"claude-3-opus-20240229"
|
19
20
|
| :"claude-3-haiku-20240307"
|
@@ -62,6 +63,9 @@ module Anthropic
|
|
62
63
|
# Our most capable model
|
63
64
|
CLAUDE_4_OPUS_20250514: :"claude-4-opus-20250514"
|
64
65
|
|
66
|
+
# Our most capable model
|
67
|
+
CLAUDE_OPUS_4_1_20250805: :"claude-opus-4-1-20250805"
|
68
|
+
|
65
69
|
# Excels at writing and complex tasks
|
66
70
|
CLAUDE_3_OPUS_LATEST: :"claude-3-opus-latest"
|
67
71
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
type tool_text_editor20250429 =
|
4
|
+
{
|
5
|
+
name: :str_replace_based_edit_tool,
|
6
|
+
type: :text_editor_20250429,
|
7
|
+
cache_control: Anthropic::CacheControlEphemeral?
|
8
|
+
}
|
9
|
+
|
10
|
+
class ToolTextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
11
|
+
attr_accessor name: :str_replace_based_edit_tool
|
12
|
+
|
13
|
+
attr_accessor type: :text_editor_20250429
|
14
|
+
|
15
|
+
attr_accessor cache_control: Anthropic::CacheControlEphemeral?
|
16
|
+
|
17
|
+
def initialize: (
|
18
|
+
?cache_control: Anthropic::CacheControlEphemeral?,
|
19
|
+
?name: :str_replace_based_edit_tool,
|
20
|
+
?type: :text_editor_20250429
|
21
|
+
) -> void
|
22
|
+
|
23
|
+
def to_hash: -> {
|
24
|
+
name: :str_replace_based_edit_tool,
|
25
|
+
type: :text_editor_20250429,
|
26
|
+
cache_control: Anthropic::CacheControlEphemeral?
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
type tool_text_editor20250728 =
|
4
|
+
{
|
5
|
+
name: :str_replace_based_edit_tool,
|
6
|
+
type: :text_editor_20250728,
|
7
|
+
cache_control: Anthropic::CacheControlEphemeral?,
|
8
|
+
max_characters: Integer?
|
9
|
+
}
|
10
|
+
|
11
|
+
class ToolTextEditor20250728 < Anthropic::Internal::Type::BaseModel
|
12
|
+
attr_accessor name: :str_replace_based_edit_tool
|
13
|
+
|
14
|
+
attr_accessor type: :text_editor_20250728
|
15
|
+
|
16
|
+
attr_accessor cache_control: Anthropic::CacheControlEphemeral?
|
17
|
+
|
18
|
+
attr_accessor max_characters: Integer?
|
19
|
+
|
20
|
+
def initialize: (
|
21
|
+
?cache_control: Anthropic::CacheControlEphemeral?,
|
22
|
+
?max_characters: Integer?,
|
23
|
+
?name: :str_replace_based_edit_tool,
|
24
|
+
?type: :text_editor_20250728
|
25
|
+
) -> void
|
26
|
+
|
27
|
+
def to_hash: -> {
|
28
|
+
name: :str_replace_based_edit_tool,
|
29
|
+
type: :text_editor_20250728,
|
30
|
+
cache_control: Anthropic::CacheControlEphemeral?,
|
31
|
+
max_characters: Integer?
|
32
|
+
}
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -4,39 +4,13 @@ module Anthropic
|
|
4
4
|
Anthropic::Tool
|
5
5
|
| Anthropic::ToolBash20250124
|
6
6
|
| Anthropic::ToolTextEditor20250124
|
7
|
-
| Anthropic::
|
7
|
+
| Anthropic::ToolTextEditor20250429
|
8
|
+
| Anthropic::ToolTextEditor20250728
|
8
9
|
| Anthropic::WebSearchTool20250305
|
9
10
|
|
10
11
|
module ToolUnion
|
11
12
|
extend Anthropic::Internal::Type::Union
|
12
13
|
|
13
|
-
type text_editor20250429 =
|
14
|
-
{
|
15
|
-
name: :str_replace_based_edit_tool,
|
16
|
-
type: :text_editor_20250429,
|
17
|
-
cache_control: Anthropic::CacheControlEphemeral?
|
18
|
-
}
|
19
|
-
|
20
|
-
class TextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
21
|
-
attr_accessor name: :str_replace_based_edit_tool
|
22
|
-
|
23
|
-
attr_accessor type: :text_editor_20250429
|
24
|
-
|
25
|
-
attr_accessor cache_control: Anthropic::CacheControlEphemeral?
|
26
|
-
|
27
|
-
def initialize: (
|
28
|
-
?cache_control: Anthropic::CacheControlEphemeral?,
|
29
|
-
?name: :str_replace_based_edit_tool,
|
30
|
-
?type: :text_editor_20250429
|
31
|
-
) -> void
|
32
|
-
|
33
|
-
def to_hash: -> {
|
34
|
-
name: :str_replace_based_edit_tool,
|
35
|
-
type: :text_editor_20250429,
|
36
|
-
cache_control: Anthropic::CacheControlEphemeral?
|
37
|
-
}
|
38
|
-
end
|
39
|
-
|
40
14
|
def self?.variants: -> ::Array[Anthropic::Models::tool_union]
|
41
15
|
end
|
42
16
|
end
|
data/sig/anthropic/models.rbs
CHANGED
@@ -189,6 +189,10 @@ module Anthropic
|
|
189
189
|
|
190
190
|
class ToolTextEditor20250124 = Anthropic::Models::ToolTextEditor20250124
|
191
191
|
|
192
|
+
class ToolTextEditor20250429 = Anthropic::Models::ToolTextEditor20250429
|
193
|
+
|
194
|
+
class ToolTextEditor20250728 = Anthropic::Models::ToolTextEditor20250728
|
195
|
+
|
192
196
|
module ToolUnion = Anthropic::Models::ToolUnion
|
193
197
|
|
194
198
|
class ToolUseBlock = Anthropic::Models::ToolUseBlock
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthropic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb
|
166
166
|
- lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb
|
167
167
|
- lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb
|
168
|
+
- lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb
|
168
169
|
- lib/anthropic/models/beta/beta_tool_union.rb
|
169
170
|
- lib/anthropic/models/beta/beta_tool_use_block.rb
|
170
171
|
- lib/anthropic/models/beta/beta_tool_use_block_param.rb
|
@@ -310,6 +311,8 @@ files:
|
|
310
311
|
- lib/anthropic/models/tool_choice_tool.rb
|
311
312
|
- lib/anthropic/models/tool_result_block_param.rb
|
312
313
|
- lib/anthropic/models/tool_text_editor_20250124.rb
|
314
|
+
- lib/anthropic/models/tool_text_editor_20250429.rb
|
315
|
+
- lib/anthropic/models/tool_text_editor_20250728.rb
|
313
316
|
- lib/anthropic/models/tool_union.rb
|
314
317
|
- lib/anthropic/models/tool_use_block.rb
|
315
318
|
- lib/anthropic/models/tool_use_block_param.rb
|
@@ -467,6 +470,7 @@ files:
|
|
467
470
|
- rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi
|
468
471
|
- rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi
|
469
472
|
- rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi
|
473
|
+
- rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi
|
470
474
|
- rbi/anthropic/models/beta/beta_tool_union.rbi
|
471
475
|
- rbi/anthropic/models/beta/beta_tool_use_block.rbi
|
472
476
|
- rbi/anthropic/models/beta/beta_tool_use_block_param.rbi
|
@@ -612,6 +616,8 @@ files:
|
|
612
616
|
- rbi/anthropic/models/tool_choice_tool.rbi
|
613
617
|
- rbi/anthropic/models/tool_result_block_param.rbi
|
614
618
|
- rbi/anthropic/models/tool_text_editor_20250124.rbi
|
619
|
+
- rbi/anthropic/models/tool_text_editor_20250429.rbi
|
620
|
+
- rbi/anthropic/models/tool_text_editor_20250728.rbi
|
615
621
|
- rbi/anthropic/models/tool_union.rbi
|
616
622
|
- rbi/anthropic/models/tool_use_block.rbi
|
617
623
|
- rbi/anthropic/models/tool_use_block_param.rbi
|
@@ -768,6 +774,7 @@ files:
|
|
768
774
|
- sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs
|
769
775
|
- sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs
|
770
776
|
- sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs
|
777
|
+
- sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs
|
771
778
|
- sig/anthropic/models/beta/beta_tool_union.rbs
|
772
779
|
- sig/anthropic/models/beta/beta_tool_use_block.rbs
|
773
780
|
- sig/anthropic/models/beta/beta_tool_use_block_param.rbs
|
@@ -913,6 +920,8 @@ files:
|
|
913
920
|
- sig/anthropic/models/tool_choice_tool.rbs
|
914
921
|
- sig/anthropic/models/tool_result_block_param.rbs
|
915
922
|
- sig/anthropic/models/tool_text_editor_20250124.rbs
|
923
|
+
- sig/anthropic/models/tool_text_editor_20250429.rbs
|
924
|
+
- sig/anthropic/models/tool_text_editor_20250728.rbs
|
916
925
|
- sig/anthropic/models/tool_union.rbs
|
917
926
|
- sig/anthropic/models/tool_use_block.rbs
|
918
927
|
- sig/anthropic/models/tool_use_block_param.rbs
|