anthropic 1.13.0 → 1.15.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 +27 -0
- data/README.md +31 -1
- data/lib/anthropic/helpers/input_schema/base_model.rb +6 -3
- data/lib/anthropic/helpers/input_schema/json_schema_converter.rb +9 -3
- data/lib/anthropic/helpers/input_schema/supported_schemas.rb +106 -0
- data/lib/anthropic/helpers/input_schema/union_of.rb +3 -1
- data/lib/anthropic/helpers/messages.rb +107 -0
- data/lib/anthropic/helpers/streaming/message_stream.rb +54 -43
- data/lib/anthropic/helpers/tools/base_tool.rb +82 -0
- data/lib/anthropic/helpers/tools/runner.rb +156 -0
- data/lib/anthropic/helpers/tools.rb +5 -0
- data/lib/anthropic/internal/transport/base_client.rb +7 -1
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +8 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +8 -1
- data/lib/anthropic/models/beta/beta_json_output_format.rb +27 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +14 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +8 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +8 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +9 -1
- data/lib/anthropic/models/beta/message_create_params.rb +9 -1
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +9 -1
- data/lib/anthropic/models/tool_use_block.rb +6 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
- data/lib/anthropic/resources/beta/messages.rb +37 -11
- data/lib/anthropic/resources/messages/batches.rb +6 -6
- data/lib/anthropic/resources/messages.rb +12 -84
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +16 -10
- data/manifest.yaml +1 -0
- data/rbi/anthropic/helpers/input_schema/base_model.rbi +7 -2
- data/rbi/anthropic/helpers/tools/base_tool.rbi +51 -0
- data/rbi/anthropic/helpers/tools/runner.rbi +40 -0
- data/rbi/anthropic/helpers/tools.rbi +5 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +5 -0
- data/rbi/anthropic/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/anthropic/internal/type/base_model.rbi +8 -4
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_json_output_format.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool.rbi +9 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +9 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +17 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +17 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +18 -0
- data/rbi/anthropic/models/tool_use_block.rbi +3 -0
- data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/beta/messages.rbi +313 -3
- data/rbi/anthropic/resources/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/messages.rbi +5 -3
- data/sig/anthropic/internal/transport/base_client.rbs +2 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +9 -2
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +9 -2
- data/sig/anthropic/models/beta/beta_json_output_format.rbs +23 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +7 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +9 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +9 -2
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +7 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +5 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +5 -0
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +14 -4
- data/lib/anthropic/helpers/input_schema/property_mapping.rb +0 -47
- /data/rbi/anthropic/helpers/{structured_output.rbi → input_schema.rbi} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaJSONOutputFormat = Beta::BetaJSONOutputFormat
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_json_output_format =
|
|
7
|
+
{ schema: ::Hash[Symbol, top], type: :json_schema }
|
|
8
|
+
|
|
9
|
+
class BetaJSONOutputFormat < Anthropic::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor schema: ::Hash[Symbol, top]
|
|
11
|
+
|
|
12
|
+
attr_accessor type: :json_schema
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
schema: ::Hash[Symbol, top],
|
|
16
|
+
?type: :json_schema
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> { schema: ::Hash[Symbol, top], type: :json_schema }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :memory,
|
|
9
9
|
type: :memory_20250818,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaMemoryTool20250818 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :memory,
|
|
23
29
|
?type: :memory_20250818
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :memory,
|
|
28
34
|
type: :memory_20250818,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -9,6 +9,7 @@ module Anthropic
|
|
|
9
9
|
name: String,
|
|
10
10
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
11
|
description: String,
|
|
12
|
+
strict: bool,
|
|
12
13
|
type: Anthropic::Models::Beta::BetaTool::type_?
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -23,6 +24,10 @@ module Anthropic
|
|
|
23
24
|
|
|
24
25
|
def description=: (String) -> String
|
|
25
26
|
|
|
27
|
+
attr_reader strict: bool?
|
|
28
|
+
|
|
29
|
+
def strict=: (bool) -> bool
|
|
30
|
+
|
|
26
31
|
attr_accessor type: Anthropic::Models::Beta::BetaTool::type_?
|
|
27
32
|
|
|
28
33
|
def initialize: (
|
|
@@ -30,6 +35,7 @@ module Anthropic
|
|
|
30
35
|
name: String,
|
|
31
36
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
32
37
|
?description: String,
|
|
38
|
+
?strict: bool,
|
|
33
39
|
?type: Anthropic::Models::Beta::BetaTool::type_?
|
|
34
40
|
) -> void
|
|
35
41
|
|
|
@@ -38,6 +44,7 @@ module Anthropic
|
|
|
38
44
|
name: String,
|
|
39
45
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
40
46
|
description: String,
|
|
47
|
+
strict: bool,
|
|
41
48
|
type: Anthropic::Models::Beta::BetaTool::type_?
|
|
42
49
|
}
|
|
43
50
|
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :bash,
|
|
9
9
|
type: :bash_20241022,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaToolBash20241022 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :bash,
|
|
23
29
|
?type: :bash_20241022
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :bash,
|
|
28
34
|
type: :bash_20241022,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :bash,
|
|
9
9
|
type: :bash_20250124,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaToolBash20250124 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :bash,
|
|
23
29
|
?type: :bash_20250124
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :bash,
|
|
28
34
|
type: :bash_20250124,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -10,7 +10,8 @@ module Anthropic
|
|
|
10
10
|
name: :computer,
|
|
11
11
|
type: :computer_20241022,
|
|
12
12
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
13
|
-
display_number: Integer
|
|
13
|
+
display_number: Integer?,
|
|
14
|
+
strict: bool
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
class BetaToolComputerUse20241022 < Anthropic::Internal::Type::BaseModel
|
|
@@ -26,11 +27,16 @@ module Anthropic
|
|
|
26
27
|
|
|
27
28
|
attr_accessor display_number: Integer?
|
|
28
29
|
|
|
30
|
+
attr_reader strict: bool?
|
|
31
|
+
|
|
32
|
+
def strict=: (bool) -> bool
|
|
33
|
+
|
|
29
34
|
def initialize: (
|
|
30
35
|
display_height_px: Integer,
|
|
31
36
|
display_width_px: Integer,
|
|
32
37
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
33
38
|
?display_number: Integer?,
|
|
39
|
+
?strict: bool,
|
|
34
40
|
?name: :computer,
|
|
35
41
|
?type: :computer_20241022
|
|
36
42
|
) -> void
|
|
@@ -41,7 +47,8 @@ module Anthropic
|
|
|
41
47
|
name: :computer,
|
|
42
48
|
type: :computer_20241022,
|
|
43
49
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
44
|
-
display_number: Integer
|
|
50
|
+
display_number: Integer?,
|
|
51
|
+
strict: bool
|
|
45
52
|
}
|
|
46
53
|
end
|
|
47
54
|
end
|
|
@@ -10,7 +10,8 @@ module Anthropic
|
|
|
10
10
|
name: :computer,
|
|
11
11
|
type: :computer_20250124,
|
|
12
12
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
13
|
-
display_number: Integer
|
|
13
|
+
display_number: Integer?,
|
|
14
|
+
strict: bool
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
class BetaToolComputerUse20250124 < Anthropic::Internal::Type::BaseModel
|
|
@@ -26,11 +27,16 @@ module Anthropic
|
|
|
26
27
|
|
|
27
28
|
attr_accessor display_number: Integer?
|
|
28
29
|
|
|
30
|
+
attr_reader strict: bool?
|
|
31
|
+
|
|
32
|
+
def strict=: (bool) -> bool
|
|
33
|
+
|
|
29
34
|
def initialize: (
|
|
30
35
|
display_height_px: Integer,
|
|
31
36
|
display_width_px: Integer,
|
|
32
37
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
33
38
|
?display_number: Integer?,
|
|
39
|
+
?strict: bool,
|
|
34
40
|
?name: :computer,
|
|
35
41
|
?type: :computer_20250124
|
|
36
42
|
) -> void
|
|
@@ -41,7 +47,8 @@ module Anthropic
|
|
|
41
47
|
name: :computer,
|
|
42
48
|
type: :computer_20250124,
|
|
43
49
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
44
|
-
display_number: Integer
|
|
50
|
+
display_number: Integer?,
|
|
51
|
+
strict: bool
|
|
45
52
|
}
|
|
46
53
|
end
|
|
47
54
|
end
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :str_replace_editor,
|
|
9
9
|
type: :text_editor_20241022,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaToolTextEditor20241022 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :str_replace_editor,
|
|
23
29
|
?type: :text_editor_20241022
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :str_replace_editor,
|
|
28
34
|
type: :text_editor_20241022,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :str_replace_editor,
|
|
9
9
|
type: :text_editor_20250124,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaToolTextEditor20250124 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :str_replace_editor,
|
|
23
29
|
?type: :text_editor_20250124
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :str_replace_editor,
|
|
28
34
|
type: :text_editor_20250124,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :str_replace_based_edit_tool,
|
|
9
9
|
type: :text_editor_20250429,
|
|
10
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
+
strict: bool
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class BetaToolTextEditor20250429 < Anthropic::Internal::Type::BaseModel
|
|
@@ -17,8 +18,13 @@ module Anthropic
|
|
|
17
18
|
|
|
18
19
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
19
20
|
|
|
21
|
+
attr_reader strict: bool?
|
|
22
|
+
|
|
23
|
+
def strict=: (bool) -> bool
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
27
|
+
?strict: bool,
|
|
22
28
|
?name: :str_replace_based_edit_tool,
|
|
23
29
|
?type: :text_editor_20250429
|
|
24
30
|
) -> void
|
|
@@ -26,7 +32,8 @@ module Anthropic
|
|
|
26
32
|
def to_hash: -> {
|
|
27
33
|
name: :str_replace_based_edit_tool,
|
|
28
34
|
type: :text_editor_20250429,
|
|
29
|
-
cache_control: Anthropic::Beta::BetaCacheControlEphemeral
|
|
35
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
|
+
strict: bool
|
|
30
37
|
}
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -8,7 +8,8 @@ module Anthropic
|
|
|
8
8
|
name: :str_replace_based_edit_tool,
|
|
9
9
|
type: :text_editor_20250728,
|
|
10
10
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
11
|
-
max_characters: Integer
|
|
11
|
+
max_characters: Integer?,
|
|
12
|
+
strict: bool
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
class BetaToolTextEditor20250728 < Anthropic::Internal::Type::BaseModel
|
|
@@ -20,9 +21,14 @@ module Anthropic
|
|
|
20
21
|
|
|
21
22
|
attr_accessor max_characters: Integer?
|
|
22
23
|
|
|
24
|
+
attr_reader strict: bool?
|
|
25
|
+
|
|
26
|
+
def strict=: (bool) -> bool
|
|
27
|
+
|
|
23
28
|
def initialize: (
|
|
24
29
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
25
30
|
?max_characters: Integer?,
|
|
31
|
+
?strict: bool,
|
|
26
32
|
?name: :str_replace_based_edit_tool,
|
|
27
33
|
?type: :text_editor_20250728
|
|
28
34
|
) -> void
|
|
@@ -31,7 +37,8 @@ module Anthropic
|
|
|
31
37
|
name: :str_replace_based_edit_tool,
|
|
32
38
|
type: :text_editor_20250728,
|
|
33
39
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
34
|
-
max_characters: Integer
|
|
40
|
+
max_characters: Integer?,
|
|
41
|
+
strict: bool
|
|
35
42
|
}
|
|
36
43
|
end
|
|
37
44
|
end
|
|
@@ -12,7 +12,8 @@ module Anthropic
|
|
|
12
12
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
13
13
|
citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
|
14
14
|
max_content_tokens: Integer?,
|
|
15
|
-
max_uses: Integer
|
|
15
|
+
max_uses: Integer?,
|
|
16
|
+
strict: bool
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
class BetaWebFetchTool20250910 < Anthropic::Internal::Type::BaseModel
|
|
@@ -32,6 +33,10 @@ module Anthropic
|
|
|
32
33
|
|
|
33
34
|
attr_accessor max_uses: Integer?
|
|
34
35
|
|
|
36
|
+
attr_reader strict: bool?
|
|
37
|
+
|
|
38
|
+
def strict=: (bool) -> bool
|
|
39
|
+
|
|
35
40
|
def initialize: (
|
|
36
41
|
?allowed_domains: ::Array[String]?,
|
|
37
42
|
?blocked_domains: ::Array[String]?,
|
|
@@ -39,6 +44,7 @@ module Anthropic
|
|
|
39
44
|
?citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
|
40
45
|
?max_content_tokens: Integer?,
|
|
41
46
|
?max_uses: Integer?,
|
|
47
|
+
?strict: bool,
|
|
42
48
|
?name: :web_fetch,
|
|
43
49
|
?type: :web_fetch_20250910
|
|
44
50
|
) -> void
|
|
@@ -51,7 +57,8 @@ module Anthropic
|
|
|
51
57
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
52
58
|
citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
|
53
59
|
max_content_tokens: Integer?,
|
|
54
|
-
max_uses: Integer
|
|
60
|
+
max_uses: Integer?,
|
|
61
|
+
strict: bool
|
|
55
62
|
}
|
|
56
63
|
end
|
|
57
64
|
end
|
|
@@ -11,6 +11,7 @@ module Anthropic
|
|
|
11
11
|
blocked_domains: ::Array[String]?,
|
|
12
12
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
13
13
|
max_uses: Integer?,
|
|
14
|
+
strict: bool,
|
|
14
15
|
user_location: Anthropic::Beta::BetaWebSearchTool20250305::UserLocation?
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -27,6 +28,10 @@ module Anthropic
|
|
|
27
28
|
|
|
28
29
|
attr_accessor max_uses: Integer?
|
|
29
30
|
|
|
31
|
+
attr_reader strict: bool?
|
|
32
|
+
|
|
33
|
+
def strict=: (bool) -> bool
|
|
34
|
+
|
|
30
35
|
attr_accessor user_location: Anthropic::Beta::BetaWebSearchTool20250305::UserLocation?
|
|
31
36
|
|
|
32
37
|
def initialize: (
|
|
@@ -34,6 +39,7 @@ module Anthropic
|
|
|
34
39
|
?blocked_domains: ::Array[String]?,
|
|
35
40
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
36
41
|
?max_uses: Integer?,
|
|
42
|
+
?strict: bool,
|
|
37
43
|
?user_location: Anthropic::Beta::BetaWebSearchTool20250305::UserLocation?,
|
|
38
44
|
?name: :web_search,
|
|
39
45
|
?type: :web_search_20250305
|
|
@@ -46,6 +52,7 @@ module Anthropic
|
|
|
46
52
|
blocked_domains: ::Array[String]?,
|
|
47
53
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
48
54
|
max_uses: Integer?,
|
|
55
|
+
strict: bool,
|
|
49
56
|
user_location: Anthropic::Beta::BetaWebSearchTool20250305::UserLocation?
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -7,6 +7,7 @@ module Anthropic
|
|
|
7
7
|
model: Anthropic::Models::model,
|
|
8
8
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
9
9
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
10
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
10
11
|
system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
11
12
|
thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
12
13
|
tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -31,6 +32,8 @@ module Anthropic
|
|
|
31
32
|
::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition]
|
|
32
33
|
) -> ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition]
|
|
33
34
|
|
|
35
|
+
attr_accessor output_format: Anthropic::Beta::BetaJSONOutputFormat?
|
|
36
|
+
|
|
34
37
|
attr_reader system_: Anthropic::Models::Beta::MessageCountTokensParams::system_?
|
|
35
38
|
|
|
36
39
|
def system_=: (
|
|
@@ -66,6 +69,7 @@ module Anthropic
|
|
|
66
69
|
model: Anthropic::Models::model,
|
|
67
70
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
68
71
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
72
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
69
73
|
?system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
70
74
|
?thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
71
75
|
?tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -79,6 +83,7 @@ module Anthropic
|
|
|
79
83
|
model: Anthropic::Models::model,
|
|
80
84
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
81
85
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
86
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
82
87
|
system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
83
88
|
thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
84
89
|
tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -10,6 +10,7 @@ module Anthropic
|
|
|
10
10
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
11
11
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
12
12
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
13
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
13
14
|
service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
14
15
|
stop_sequences: ::Array[String],
|
|
15
16
|
system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
@@ -49,6 +50,8 @@ module Anthropic
|
|
|
49
50
|
Anthropic::Beta::BetaMetadata
|
|
50
51
|
) -> Anthropic::Beta::BetaMetadata
|
|
51
52
|
|
|
53
|
+
attr_accessor output_format: Anthropic::Beta::BetaJSONOutputFormat?
|
|
54
|
+
|
|
52
55
|
attr_reader service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier?
|
|
53
56
|
|
|
54
57
|
def service_tier=: (
|
|
@@ -109,6 +112,7 @@ module Anthropic
|
|
|
109
112
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
110
113
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
111
114
|
?metadata: Anthropic::Beta::BetaMetadata,
|
|
115
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
112
116
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
113
117
|
?stop_sequences: ::Array[String],
|
|
114
118
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
@@ -130,6 +134,7 @@ module Anthropic
|
|
|
130
134
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
131
135
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
132
136
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
137
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
133
138
|
service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
134
139
|
stop_sequences: ::Array[String],
|
|
135
140
|
system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
@@ -63,6 +63,7 @@ module Anthropic
|
|
|
63
63
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
64
64
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
65
65
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
66
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
66
67
|
service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
67
68
|
stop_sequences: ::Array[String],
|
|
68
69
|
stream: bool,
|
|
@@ -98,6 +99,8 @@ module Anthropic
|
|
|
98
99
|
Anthropic::Beta::BetaMetadata
|
|
99
100
|
) -> Anthropic::Beta::BetaMetadata
|
|
100
101
|
|
|
102
|
+
attr_accessor output_format: Anthropic::Beta::BetaJSONOutputFormat?
|
|
103
|
+
|
|
101
104
|
attr_reader service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier?
|
|
102
105
|
|
|
103
106
|
def service_tier=: (
|
|
@@ -156,6 +159,7 @@ module Anthropic
|
|
|
156
159
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
157
160
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
158
161
|
?metadata: Anthropic::Beta::BetaMetadata,
|
|
162
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
159
163
|
?service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
160
164
|
?stop_sequences: ::Array[String],
|
|
161
165
|
?stream: bool,
|
|
@@ -176,6 +180,7 @@ module Anthropic
|
|
|
176
180
|
context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
177
181
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
178
182
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
183
|
+
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
179
184
|
service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
180
185
|
stop_sequences: ::Array[String],
|
|
181
186
|
stream: bool,
|
|
@@ -12,6 +12,7 @@ module Anthropic
|
|
|
12
12
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
13
13
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
14
14
|
?metadata: Anthropic::Beta::BetaMetadata,
|
|
15
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
15
16
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
16
17
|
?stop_sequences: ::Array[String],
|
|
17
18
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
@@ -33,6 +34,7 @@ module Anthropic
|
|
|
33
34
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
34
35
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
35
36
|
?metadata: Anthropic::Beta::BetaMetadata,
|
|
37
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
36
38
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
37
39
|
?stop_sequences: ::Array[String],
|
|
38
40
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
@@ -51,6 +53,7 @@ module Anthropic
|
|
|
51
53
|
model: Anthropic::Models::model,
|
|
52
54
|
?context_management: Anthropic::Beta::BetaContextManagementConfig?,
|
|
53
55
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
56
|
+
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
54
57
|
?system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
55
58
|
?thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
56
59
|
?tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
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.15.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-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -48,11 +48,15 @@ files:
|
|
|
48
48
|
- lib/anthropic/helpers/input_schema/enum_of.rb
|
|
49
49
|
- lib/anthropic/helpers/input_schema/json_schema_converter.rb
|
|
50
50
|
- lib/anthropic/helpers/input_schema/parsed_json.rb
|
|
51
|
-
- lib/anthropic/helpers/input_schema/
|
|
51
|
+
- lib/anthropic/helpers/input_schema/supported_schemas.rb
|
|
52
52
|
- lib/anthropic/helpers/input_schema/union_of.rb
|
|
53
|
+
- lib/anthropic/helpers/messages.rb
|
|
53
54
|
- lib/anthropic/helpers/streaming.rb
|
|
54
55
|
- lib/anthropic/helpers/streaming/events.rb
|
|
55
56
|
- lib/anthropic/helpers/streaming/message_stream.rb
|
|
57
|
+
- lib/anthropic/helpers/tools.rb
|
|
58
|
+
- lib/anthropic/helpers/tools/base_tool.rb
|
|
59
|
+
- lib/anthropic/helpers/tools/runner.rb
|
|
56
60
|
- lib/anthropic/helpers/vertex/client.rb
|
|
57
61
|
- lib/anthropic/input_schema.rb
|
|
58
62
|
- lib/anthropic/internal.rb
|
|
@@ -144,6 +148,7 @@ files:
|
|
|
144
148
|
- lib/anthropic/models/beta/beta_input_json_delta.rb
|
|
145
149
|
- lib/anthropic/models/beta/beta_input_tokens_clear_at_least.rb
|
|
146
150
|
- lib/anthropic/models/beta/beta_input_tokens_trigger.rb
|
|
151
|
+
- lib/anthropic/models/beta/beta_json_output_format.rb
|
|
147
152
|
- lib/anthropic/models/beta/beta_mcp_tool_result_block.rb
|
|
148
153
|
- lib/anthropic/models/beta/beta_mcp_tool_use_block.rb
|
|
149
154
|
- lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb
|
|
@@ -434,6 +439,7 @@ files:
|
|
|
434
439
|
- rbi/anthropic/errors.rbi
|
|
435
440
|
- rbi/anthropic/file_part.rbi
|
|
436
441
|
- rbi/anthropic/helpers/bedrock/client.rbi
|
|
442
|
+
- rbi/anthropic/helpers/input_schema.rbi
|
|
437
443
|
- rbi/anthropic/helpers/input_schema/array_of.rbi
|
|
438
444
|
- rbi/anthropic/helpers/input_schema/base_model.rbi
|
|
439
445
|
- rbi/anthropic/helpers/input_schema/boolean.rbi
|
|
@@ -442,7 +448,9 @@ files:
|
|
|
442
448
|
- rbi/anthropic/helpers/input_schema/union_of.rbi
|
|
443
449
|
- rbi/anthropic/helpers/streaming/events.rbi
|
|
444
450
|
- rbi/anthropic/helpers/streaming/message_stream.rbi
|
|
445
|
-
- rbi/anthropic/helpers/
|
|
451
|
+
- rbi/anthropic/helpers/tools.rbi
|
|
452
|
+
- rbi/anthropic/helpers/tools/base_tool.rbi
|
|
453
|
+
- rbi/anthropic/helpers/tools/runner.rbi
|
|
446
454
|
- rbi/anthropic/helpers/vertex/client.rbi
|
|
447
455
|
- rbi/anthropic/input_schema.rbi
|
|
448
456
|
- rbi/anthropic/internal.rbi
|
|
@@ -534,6 +542,7 @@ files:
|
|
|
534
542
|
- rbi/anthropic/models/beta/beta_input_json_delta.rbi
|
|
535
543
|
- rbi/anthropic/models/beta/beta_input_tokens_clear_at_least.rbi
|
|
536
544
|
- rbi/anthropic/models/beta/beta_input_tokens_trigger.rbi
|
|
545
|
+
- rbi/anthropic/models/beta/beta_json_output_format.rbi
|
|
537
546
|
- rbi/anthropic/models/beta/beta_mcp_tool_result_block.rbi
|
|
538
547
|
- rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi
|
|
539
548
|
- rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi
|
|
@@ -915,6 +924,7 @@ files:
|
|
|
915
924
|
- sig/anthropic/models/beta/beta_input_json_delta.rbs
|
|
916
925
|
- sig/anthropic/models/beta/beta_input_tokens_clear_at_least.rbs
|
|
917
926
|
- sig/anthropic/models/beta/beta_input_tokens_trigger.rbs
|
|
927
|
+
- sig/anthropic/models/beta/beta_json_output_format.rbs
|
|
918
928
|
- sig/anthropic/models/beta/beta_mcp_tool_result_block.rbs
|
|
919
929
|
- sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs
|
|
920
930
|
- sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs
|