anthropic 1.3.0 → 1.4.1
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 +25 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +5 -2
- data/lib/anthropic/helpers/bedrock/client.rb +23 -46
- data/lib/anthropic/internal/transport/base_client.rb +19 -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
@@ -274,7 +274,8 @@ module Anthropic
|
|
274
274
|
Anthropic::Tool,
|
275
275
|
Anthropic::ToolBash20250124,
|
276
276
|
Anthropic::ToolTextEditor20250124,
|
277
|
-
Anthropic::
|
277
|
+
Anthropic::ToolTextEditor20250429,
|
278
|
+
Anthropic::ToolTextEditor20250728,
|
278
279
|
Anthropic::WebSearchTool20250305
|
279
280
|
)
|
280
281
|
]
|
@@ -291,7 +292,8 @@ module Anthropic
|
|
291
292
|
Anthropic::Tool::OrHash,
|
292
293
|
Anthropic::ToolBash20250124::OrHash,
|
293
294
|
Anthropic::ToolTextEditor20250124::OrHash,
|
294
|
-
Anthropic::
|
295
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
296
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
295
297
|
Anthropic::WebSearchTool20250305::OrHash
|
296
298
|
)
|
297
299
|
]
|
@@ -322,7 +324,8 @@ module Anthropic
|
|
322
324
|
Anthropic::Tool::OrHash,
|
323
325
|
Anthropic::ToolBash20250124::OrHash,
|
324
326
|
Anthropic::ToolTextEditor20250124::OrHash,
|
325
|
-
Anthropic::
|
327
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
328
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
326
329
|
Anthropic::WebSearchTool20250305::OrHash
|
327
330
|
)
|
328
331
|
],
|
@@ -546,7 +549,8 @@ module Anthropic
|
|
546
549
|
Anthropic::Tool,
|
547
550
|
Anthropic::ToolBash20250124,
|
548
551
|
Anthropic::ToolTextEditor20250124,
|
549
|
-
Anthropic::
|
552
|
+
Anthropic::ToolTextEditor20250429,
|
553
|
+
Anthropic::ToolTextEditor20250728,
|
550
554
|
Anthropic::WebSearchTool20250305
|
551
555
|
)
|
552
556
|
],
|
@@ -11,71 +11,12 @@ module Anthropic
|
|
11
11
|
Anthropic::Tool,
|
12
12
|
Anthropic::ToolBash20250124,
|
13
13
|
Anthropic::ToolTextEditor20250124,
|
14
|
-
Anthropic::
|
14
|
+
Anthropic::ToolTextEditor20250429,
|
15
|
+
Anthropic::ToolTextEditor20250728,
|
15
16
|
Anthropic::WebSearchTool20250305
|
16
17
|
)
|
17
18
|
end
|
18
19
|
|
19
|
-
class TextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
20
|
-
OrHash =
|
21
|
-
T.type_alias do
|
22
|
-
T.any(
|
23
|
-
Anthropic::MessageCountTokensTool::TextEditor20250429,
|
24
|
-
Anthropic::Internal::AnyHash
|
25
|
-
)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Name of the tool.
|
29
|
-
#
|
30
|
-
# This is how the tool will be called by the model and in `tool_use` blocks.
|
31
|
-
sig { returns(Symbol) }
|
32
|
-
attr_accessor :name
|
33
|
-
|
34
|
-
sig { returns(Symbol) }
|
35
|
-
attr_accessor :type
|
36
|
-
|
37
|
-
# Create a cache control breakpoint at this content block.
|
38
|
-
sig { returns(T.nilable(Anthropic::CacheControlEphemeral)) }
|
39
|
-
attr_reader :cache_control
|
40
|
-
|
41
|
-
sig do
|
42
|
-
params(
|
43
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash)
|
44
|
-
).void
|
45
|
-
end
|
46
|
-
attr_writer :cache_control
|
47
|
-
|
48
|
-
sig do
|
49
|
-
params(
|
50
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
|
51
|
-
name: Symbol,
|
52
|
-
type: Symbol
|
53
|
-
).returns(T.attached_class)
|
54
|
-
end
|
55
|
-
def self.new(
|
56
|
-
# Create a cache control breakpoint at this content block.
|
57
|
-
cache_control: nil,
|
58
|
-
# Name of the tool.
|
59
|
-
#
|
60
|
-
# This is how the tool will be called by the model and in `tool_use` blocks.
|
61
|
-
name: :str_replace_based_edit_tool,
|
62
|
-
type: :text_editor_20250429
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
sig do
|
67
|
-
override.returns(
|
68
|
-
{
|
69
|
-
name: Symbol,
|
70
|
-
type: Symbol,
|
71
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral)
|
72
|
-
}
|
73
|
-
)
|
74
|
-
end
|
75
|
-
def to_hash
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
20
|
sig do
|
80
21
|
override.returns(T::Array[Anthropic::MessageCountTokensTool::Variants])
|
81
22
|
end
|
@@ -332,7 +332,8 @@ module Anthropic
|
|
332
332
|
Anthropic::Tool,
|
333
333
|
Anthropic::ToolBash20250124,
|
334
334
|
Anthropic::ToolTextEditor20250124,
|
335
|
-
Anthropic::
|
335
|
+
Anthropic::ToolTextEditor20250429,
|
336
|
+
Anthropic::ToolTextEditor20250728,
|
336
337
|
Anthropic::WebSearchTool20250305
|
337
338
|
)
|
338
339
|
]
|
@@ -349,7 +350,8 @@ module Anthropic
|
|
349
350
|
Anthropic::Tool::OrHash,
|
350
351
|
Anthropic::ToolBash20250124::OrHash,
|
351
352
|
Anthropic::ToolTextEditor20250124::OrHash,
|
352
|
-
Anthropic::
|
353
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
354
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
353
355
|
Anthropic::WebSearchTool20250305::OrHash
|
354
356
|
)
|
355
357
|
]
|
@@ -413,7 +415,8 @@ module Anthropic
|
|
413
415
|
Anthropic::Tool::OrHash,
|
414
416
|
Anthropic::ToolBash20250124::OrHash,
|
415
417
|
Anthropic::ToolTextEditor20250124::OrHash,
|
416
|
-
Anthropic::
|
418
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
419
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
417
420
|
Anthropic::WebSearchTool20250305::OrHash
|
418
421
|
)
|
419
422
|
],
|
@@ -697,7 +700,8 @@ module Anthropic
|
|
697
700
|
Anthropic::Tool,
|
698
701
|
Anthropic::ToolBash20250124,
|
699
702
|
Anthropic::ToolTextEditor20250124,
|
700
|
-
Anthropic::
|
703
|
+
Anthropic::ToolTextEditor20250429,
|
704
|
+
Anthropic::ToolTextEditor20250728,
|
701
705
|
Anthropic::WebSearchTool20250305
|
702
706
|
)
|
703
707
|
],
|
@@ -464,7 +464,8 @@ module Anthropic
|
|
464
464
|
Anthropic::Tool,
|
465
465
|
Anthropic::ToolBash20250124,
|
466
466
|
Anthropic::ToolTextEditor20250124,
|
467
|
-
Anthropic::
|
467
|
+
Anthropic::ToolTextEditor20250429,
|
468
|
+
Anthropic::ToolTextEditor20250728,
|
468
469
|
Anthropic::WebSearchTool20250305
|
469
470
|
)
|
470
471
|
]
|
@@ -481,7 +482,8 @@ module Anthropic
|
|
481
482
|
Anthropic::Tool::OrHash,
|
482
483
|
Anthropic::ToolBash20250124::OrHash,
|
483
484
|
Anthropic::ToolTextEditor20250124::OrHash,
|
484
|
-
Anthropic::
|
485
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
486
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
485
487
|
Anthropic::WebSearchTool20250305::OrHash
|
486
488
|
)
|
487
489
|
]
|
@@ -552,7 +554,8 @@ module Anthropic
|
|
552
554
|
Anthropic::Tool::OrHash,
|
553
555
|
Anthropic::ToolBash20250124::OrHash,
|
554
556
|
Anthropic::ToolTextEditor20250124::OrHash,
|
555
|
-
Anthropic::
|
557
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
558
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
556
559
|
Anthropic::WebSearchTool20250305::OrHash
|
557
560
|
)
|
558
561
|
],
|
@@ -842,7 +845,8 @@ module Anthropic
|
|
842
845
|
Anthropic::Tool,
|
843
846
|
Anthropic::ToolBash20250124,
|
844
847
|
Anthropic::ToolTextEditor20250124,
|
845
|
-
Anthropic::
|
848
|
+
Anthropic::ToolTextEditor20250429,
|
849
|
+
Anthropic::ToolTextEditor20250728,
|
846
850
|
Anthropic::WebSearchTool20250305
|
847
851
|
)
|
848
852
|
],
|
@@ -68,6 +68,10 @@ module Anthropic
|
|
68
68
|
CLAUDE_4_OPUS_20250514 =
|
69
69
|
T.let(:"claude-4-opus-20250514", Anthropic::Model::TaggedSymbol)
|
70
70
|
|
71
|
+
# Our most capable model
|
72
|
+
CLAUDE_OPUS_4_1_20250805 =
|
73
|
+
T.let(:"claude-opus-4-1-20250805", Anthropic::Model::TaggedSymbol)
|
74
|
+
|
71
75
|
# Excels at writing and complex tasks
|
72
76
|
CLAUDE_3_OPUS_LATEST =
|
73
77
|
T.let(:"claude-3-opus-latest", Anthropic::Model::TaggedSymbol)
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class ToolTextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(Anthropic::ToolTextEditor20250429, Anthropic::Internal::AnyHash)
|
9
|
+
end
|
10
|
+
|
11
|
+
# Name of the tool.
|
12
|
+
#
|
13
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
14
|
+
sig { returns(Symbol) }
|
15
|
+
attr_accessor :name
|
16
|
+
|
17
|
+
sig { returns(Symbol) }
|
18
|
+
attr_accessor :type
|
19
|
+
|
20
|
+
# Create a cache control breakpoint at this content block.
|
21
|
+
sig { returns(T.nilable(Anthropic::CacheControlEphemeral)) }
|
22
|
+
attr_reader :cache_control
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(
|
26
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash)
|
27
|
+
).void
|
28
|
+
end
|
29
|
+
attr_writer :cache_control
|
30
|
+
|
31
|
+
sig do
|
32
|
+
params(
|
33
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
|
34
|
+
name: Symbol,
|
35
|
+
type: Symbol
|
36
|
+
).returns(T.attached_class)
|
37
|
+
end
|
38
|
+
def self.new(
|
39
|
+
# Create a cache control breakpoint at this content block.
|
40
|
+
cache_control: nil,
|
41
|
+
# Name of the tool.
|
42
|
+
#
|
43
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
44
|
+
name: :str_replace_based_edit_tool,
|
45
|
+
type: :text_editor_20250429
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
sig do
|
50
|
+
override.returns(
|
51
|
+
{
|
52
|
+
name: Symbol,
|
53
|
+
type: Symbol,
|
54
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral)
|
55
|
+
}
|
56
|
+
)
|
57
|
+
end
|
58
|
+
def to_hash
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class ToolTextEditor20250728 < Anthropic::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(Anthropic::ToolTextEditor20250728, Anthropic::Internal::AnyHash)
|
9
|
+
end
|
10
|
+
|
11
|
+
# Name of the tool.
|
12
|
+
#
|
13
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
14
|
+
sig { returns(Symbol) }
|
15
|
+
attr_accessor :name
|
16
|
+
|
17
|
+
sig { returns(Symbol) }
|
18
|
+
attr_accessor :type
|
19
|
+
|
20
|
+
# Create a cache control breakpoint at this content block.
|
21
|
+
sig { returns(T.nilable(Anthropic::CacheControlEphemeral)) }
|
22
|
+
attr_reader :cache_control
|
23
|
+
|
24
|
+
sig do
|
25
|
+
params(
|
26
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash)
|
27
|
+
).void
|
28
|
+
end
|
29
|
+
attr_writer :cache_control
|
30
|
+
|
31
|
+
# Maximum number of characters to display when viewing a file. If not specified,
|
32
|
+
# defaults to displaying the full file.
|
33
|
+
sig { returns(T.nilable(Integer)) }
|
34
|
+
attr_accessor :max_characters
|
35
|
+
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
|
39
|
+
max_characters: T.nilable(Integer),
|
40
|
+
name: Symbol,
|
41
|
+
type: Symbol
|
42
|
+
).returns(T.attached_class)
|
43
|
+
end
|
44
|
+
def self.new(
|
45
|
+
# Create a cache control breakpoint at this content block.
|
46
|
+
cache_control: nil,
|
47
|
+
# Maximum number of characters to display when viewing a file. If not specified,
|
48
|
+
# defaults to displaying the full file.
|
49
|
+
max_characters: nil,
|
50
|
+
# Name of the tool.
|
51
|
+
#
|
52
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
53
|
+
name: :str_replace_based_edit_tool,
|
54
|
+
type: :text_editor_20250728
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
sig do
|
59
|
+
override.returns(
|
60
|
+
{
|
61
|
+
name: Symbol,
|
62
|
+
type: Symbol,
|
63
|
+
cache_control: T.nilable(Anthropic::CacheControlEphemeral),
|
64
|
+
max_characters: T.nilable(Integer)
|
65
|
+
}
|
66
|
+
)
|
67
|
+
end
|
68
|
+
def to_hash
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -11,71 +11,12 @@ module Anthropic
|
|
11
11
|
Anthropic::Tool,
|
12
12
|
Anthropic::ToolBash20250124,
|
13
13
|
Anthropic::ToolTextEditor20250124,
|
14
|
-
Anthropic::
|
14
|
+
Anthropic::ToolTextEditor20250429,
|
15
|
+
Anthropic::ToolTextEditor20250728,
|
15
16
|
Anthropic::WebSearchTool20250305
|
16
17
|
)
|
17
18
|
end
|
18
19
|
|
19
|
-
class TextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
20
|
-
OrHash =
|
21
|
-
T.type_alias do
|
22
|
-
T.any(
|
23
|
-
Anthropic::ToolUnion::TextEditor20250429,
|
24
|
-
Anthropic::Internal::AnyHash
|
25
|
-
)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Name of the tool.
|
29
|
-
#
|
30
|
-
# This is how the tool will be called by the model and in `tool_use` blocks.
|
31
|
-
sig { returns(Symbol) }
|
32
|
-
attr_accessor :name
|
33
|
-
|
34
|
-
sig { returns(Symbol) }
|
35
|
-
attr_accessor :type
|
36
|
-
|
37
|
-
# Create a cache control breakpoint at this content block.
|
38
|
-
sig { returns(T.nilable(Anthropic::CacheControlEphemeral)) }
|
39
|
-
attr_reader :cache_control
|
40
|
-
|
41
|
-
sig do
|
42
|
-
params(
|
43
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash)
|
44
|
-
).void
|
45
|
-
end
|
46
|
-
attr_writer :cache_control
|
47
|
-
|
48
|
-
sig do
|
49
|
-
params(
|
50
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
|
51
|
-
name: Symbol,
|
52
|
-
type: Symbol
|
53
|
-
).returns(T.attached_class)
|
54
|
-
end
|
55
|
-
def self.new(
|
56
|
-
# Create a cache control breakpoint at this content block.
|
57
|
-
cache_control: nil,
|
58
|
-
# Name of the tool.
|
59
|
-
#
|
60
|
-
# This is how the tool will be called by the model and in `tool_use` blocks.
|
61
|
-
name: :str_replace_based_edit_tool,
|
62
|
-
type: :text_editor_20250429
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
sig do
|
67
|
-
override.returns(
|
68
|
-
{
|
69
|
-
name: Symbol,
|
70
|
-
type: Symbol,
|
71
|
-
cache_control: T.nilable(Anthropic::CacheControlEphemeral)
|
72
|
-
}
|
73
|
-
)
|
74
|
-
end
|
75
|
-
def to_hash
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
20
|
sig { override.returns(T::Array[Anthropic::ToolUnion::Variants]) }
|
80
21
|
def self.variants
|
81
22
|
end
|
data/rbi/anthropic/models.rbi
CHANGED
@@ -194,6 +194,10 @@ module Anthropic
|
|
194
194
|
|
195
195
|
ToolTextEditor20250124 = Anthropic::Models::ToolTextEditor20250124
|
196
196
|
|
197
|
+
ToolTextEditor20250429 = Anthropic::Models::ToolTextEditor20250429
|
198
|
+
|
199
|
+
ToolTextEditor20250728 = Anthropic::Models::ToolTextEditor20250728
|
200
|
+
|
197
201
|
ToolUnion = Anthropic::Models::ToolUnion
|
198
202
|
|
199
203
|
ToolUseBlock = Anthropic::Models::ToolUseBlock
|
@@ -56,6 +56,7 @@ module Anthropic
|
|
56
56
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
57
57
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
58
58
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
59
|
+
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
59
60
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
60
61
|
)
|
61
62
|
],
|
@@ -370,6 +371,7 @@ module Anthropic
|
|
370
371
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
371
372
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
372
373
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
374
|
+
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
373
375
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
374
376
|
)
|
375
377
|
],
|
@@ -680,6 +682,7 @@ module Anthropic
|
|
680
682
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
681
683
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
682
684
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
685
|
+
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
683
686
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
684
687
|
)
|
685
688
|
],
|
@@ -43,7 +43,8 @@ module Anthropic
|
|
43
43
|
Anthropic::Tool::OrHash,
|
44
44
|
Anthropic::ToolBash20250124::OrHash,
|
45
45
|
Anthropic::ToolTextEditor20250124::OrHash,
|
46
|
-
Anthropic::
|
46
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
47
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
47
48
|
Anthropic::WebSearchTool20250305::OrHash
|
48
49
|
)
|
49
50
|
],
|
@@ -630,7 +631,8 @@ module Anthropic
|
|
630
631
|
Anthropic::Tool::OrHash,
|
631
632
|
Anthropic::ToolBash20250124::OrHash,
|
632
633
|
Anthropic::ToolTextEditor20250124::OrHash,
|
633
|
-
Anthropic::
|
634
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
635
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
634
636
|
Anthropic::WebSearchTool20250305::OrHash
|
635
637
|
)
|
636
638
|
],
|
@@ -923,7 +925,8 @@ module Anthropic
|
|
923
925
|
Anthropic::Tool::OrHash,
|
924
926
|
Anthropic::ToolBash20250124::OrHash,
|
925
927
|
Anthropic::ToolTextEditor20250124::OrHash,
|
926
|
-
Anthropic::
|
928
|
+
Anthropic::ToolTextEditor20250429::OrHash,
|
929
|
+
Anthropic::ToolTextEditor20250728::OrHash,
|
927
930
|
Anthropic::WebSearchTool20250305::OrHash
|
928
931
|
)
|
929
932
|
],
|
@@ -9,6 +9,7 @@ module Anthropic
|
|
9
9
|
document_index: Integer,
|
10
10
|
document_title: String?,
|
11
11
|
end_char_index: Integer,
|
12
|
+
file_id: String?,
|
12
13
|
start_char_index: Integer,
|
13
14
|
type: :char_location
|
14
15
|
}
|
@@ -22,6 +23,8 @@ module Anthropic
|
|
22
23
|
|
23
24
|
attr_accessor end_char_index: Integer
|
24
25
|
|
26
|
+
attr_accessor file_id: String?
|
27
|
+
|
25
28
|
attr_accessor start_char_index: Integer
|
26
29
|
|
27
30
|
attr_accessor type: :char_location
|
@@ -31,6 +34,7 @@ module Anthropic
|
|
31
34
|
document_index: Integer,
|
32
35
|
document_title: String?,
|
33
36
|
end_char_index: Integer,
|
37
|
+
file_id: String?,
|
34
38
|
start_char_index: Integer,
|
35
39
|
?type: :char_location
|
36
40
|
) -> void
|
@@ -40,6 +44,7 @@ module Anthropic
|
|
40
44
|
document_index: Integer,
|
41
45
|
document_title: String?,
|
42
46
|
end_char_index: Integer,
|
47
|
+
file_id: String?,
|
43
48
|
start_char_index: Integer,
|
44
49
|
type: :char_location
|
45
50
|
}
|
@@ -9,6 +9,7 @@ module Anthropic
|
|
9
9
|
document_index: Integer,
|
10
10
|
document_title: String?,
|
11
11
|
end_block_index: Integer,
|
12
|
+
file_id: String?,
|
12
13
|
start_block_index: Integer,
|
13
14
|
type: :content_block_location
|
14
15
|
}
|
@@ -22,6 +23,8 @@ module Anthropic
|
|
22
23
|
|
23
24
|
attr_accessor end_block_index: Integer
|
24
25
|
|
26
|
+
attr_accessor file_id: String?
|
27
|
+
|
25
28
|
attr_accessor start_block_index: Integer
|
26
29
|
|
27
30
|
attr_accessor type: :content_block_location
|
@@ -31,6 +34,7 @@ module Anthropic
|
|
31
34
|
document_index: Integer,
|
32
35
|
document_title: String?,
|
33
36
|
end_block_index: Integer,
|
37
|
+
file_id: String?,
|
34
38
|
start_block_index: Integer,
|
35
39
|
?type: :content_block_location
|
36
40
|
) -> void
|
@@ -40,6 +44,7 @@ module Anthropic
|
|
40
44
|
document_index: Integer,
|
41
45
|
document_title: String?,
|
42
46
|
end_block_index: Integer,
|
47
|
+
file_id: String?,
|
43
48
|
start_block_index: Integer,
|
44
49
|
type: :content_block_location
|
45
50
|
}
|
@@ -9,6 +9,7 @@ module Anthropic
|
|
9
9
|
document_index: Integer,
|
10
10
|
document_title: String?,
|
11
11
|
end_page_number: Integer,
|
12
|
+
file_id: String?,
|
12
13
|
start_page_number: Integer,
|
13
14
|
type: :page_location
|
14
15
|
}
|
@@ -22,6 +23,8 @@ module Anthropic
|
|
22
23
|
|
23
24
|
attr_accessor end_page_number: Integer
|
24
25
|
|
26
|
+
attr_accessor file_id: String?
|
27
|
+
|
25
28
|
attr_accessor start_page_number: Integer
|
26
29
|
|
27
30
|
attr_accessor type: :page_location
|
@@ -31,6 +34,7 @@ module Anthropic
|
|
31
34
|
document_index: Integer,
|
32
35
|
document_title: String?,
|
33
36
|
end_page_number: Integer,
|
37
|
+
file_id: String?,
|
34
38
|
start_page_number: Integer,
|
35
39
|
?type: :page_location
|
36
40
|
) -> void
|
@@ -40,6 +44,7 @@ module Anthropic
|
|
40
44
|
document_index: Integer,
|
41
45
|
document_title: String?,
|
42
46
|
end_page_number: Integer,
|
47
|
+
file_id: String?,
|
43
48
|
start_page_number: Integer,
|
44
49
|
type: :page_location
|
45
50
|
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaToolTextEditor20250728 = Beta::BetaToolTextEditor20250728
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_tool_text_editor20250728 =
|
7
|
+
{
|
8
|
+
name: :str_replace_based_edit_tool,
|
9
|
+
type: :text_editor_20250728,
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
11
|
+
max_characters: Integer?
|
12
|
+
}
|
13
|
+
|
14
|
+
class BetaToolTextEditor20250728 < Anthropic::Internal::Type::BaseModel
|
15
|
+
attr_accessor name: :str_replace_based_edit_tool
|
16
|
+
|
17
|
+
attr_accessor type: :text_editor_20250728
|
18
|
+
|
19
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
20
|
+
|
21
|
+
attr_accessor max_characters: Integer?
|
22
|
+
|
23
|
+
def initialize: (
|
24
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
25
|
+
?max_characters: Integer?,
|
26
|
+
?name: :str_replace_based_edit_tool,
|
27
|
+
?type: :text_editor_20250728
|
28
|
+
) -> void
|
29
|
+
|
30
|
+
def to_hash: -> {
|
31
|
+
name: :str_replace_based_edit_tool,
|
32
|
+
type: :text_editor_20250728,
|
33
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
34
|
+
max_characters: Integer?
|
35
|
+
}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -13,6 +13,7 @@ module Anthropic
|
|
13
13
|
| Anthropic::Beta::BetaToolTextEditor20241022
|
14
14
|
| Anthropic::Beta::BetaToolTextEditor20250124
|
15
15
|
| Anthropic::Beta::BetaToolTextEditor20250429
|
16
|
+
| Anthropic::Beta::BetaToolTextEditor20250728
|
16
17
|
| Anthropic::Beta::BetaWebSearchTool20250305
|
17
18
|
|
18
19
|
module BetaToolUnion
|
@@ -102,6 +102,7 @@ module Anthropic
|
|
102
102
|
| Anthropic::Beta::BetaToolTextEditor20241022
|
103
103
|
| Anthropic::Beta::BetaToolTextEditor20250124
|
104
104
|
| Anthropic::Beta::BetaToolTextEditor20250429
|
105
|
+
| Anthropic::Beta::BetaToolTextEditor20250728
|
105
106
|
| Anthropic::Beta::BetaWebSearchTool20250305
|
106
107
|
|
107
108
|
module Tool
|
@@ -6,6 +6,7 @@ module Anthropic
|
|
6
6
|
document_index: Integer,
|
7
7
|
document_title: String?,
|
8
8
|
end_char_index: Integer,
|
9
|
+
file_id: String?,
|
9
10
|
start_char_index: Integer,
|
10
11
|
type: :char_location
|
11
12
|
}
|
@@ -19,6 +20,8 @@ module Anthropic
|
|
19
20
|
|
20
21
|
attr_accessor end_char_index: Integer
|
21
22
|
|
23
|
+
attr_accessor file_id: String?
|
24
|
+
|
22
25
|
attr_accessor start_char_index: Integer
|
23
26
|
|
24
27
|
attr_accessor type: :char_location
|
@@ -28,6 +31,7 @@ module Anthropic
|
|
28
31
|
document_index: Integer,
|
29
32
|
document_title: String?,
|
30
33
|
end_char_index: Integer,
|
34
|
+
file_id: String?,
|
31
35
|
start_char_index: Integer,
|
32
36
|
?type: :char_location
|
33
37
|
) -> void
|
@@ -37,6 +41,7 @@ module Anthropic
|
|
37
41
|
document_index: Integer,
|
38
42
|
document_title: String?,
|
39
43
|
end_char_index: Integer,
|
44
|
+
file_id: String?,
|
40
45
|
start_char_index: Integer,
|
41
46
|
type: :char_location
|
42
47
|
}
|