anthropic 1.6.0 → 1.8.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.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/input_schema/array_of.rb +41 -0
  5. data/lib/anthropic/helpers/input_schema/base_model.rb +86 -0
  6. data/lib/anthropic/helpers/input_schema/boolean.rb +29 -0
  7. data/lib/anthropic/helpers/input_schema/enum_of.rb +63 -0
  8. data/lib/anthropic/helpers/input_schema/json_schema_converter.rb +199 -0
  9. data/lib/anthropic/helpers/input_schema/parsed_json.rb +39 -0
  10. data/lib/anthropic/helpers/input_schema/property_mapping.rb +47 -0
  11. data/lib/anthropic/helpers/input_schema/union_of.rb +56 -0
  12. data/lib/anthropic/helpers/input_schema.rb +16 -0
  13. data/lib/anthropic/helpers/streaming/message_stream.rb +41 -1
  14. data/lib/anthropic/input_schema.rb +10 -0
  15. data/lib/anthropic/internal/stream.rb +2 -1
  16. data/lib/anthropic/internal/transport/base_client.rb +1 -2
  17. data/lib/anthropic/internal/transport/pooled_net_requester.rb +1 -9
  18. data/lib/anthropic/internal/type/base_model.rb +2 -9
  19. data/lib/anthropic/internal/util.rb +1 -1
  20. data/lib/anthropic/models/beta/beta_bash_code_execution_output_block.rb +25 -0
  21. data/lib/anthropic/models/beta/beta_bash_code_execution_output_block_param.rb +25 -0
  22. data/lib/anthropic/models/beta/beta_bash_code_execution_result_block.rb +44 -0
  23. data/lib/anthropic/models/beta/beta_bash_code_execution_result_block_param.rb +44 -0
  24. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rb +43 -0
  25. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rb +53 -0
  26. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rb +39 -0
  27. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rb +39 -0
  28. data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +40 -0
  29. data/lib/anthropic/models/beta/beta_content_block.rb +6 -1
  30. data/lib/anthropic/models/beta/beta_content_block_param.rb +7 -1
  31. data/lib/anthropic/models/beta/beta_message.rb +2 -2
  32. data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
  33. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +8 -3
  34. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +2 -0
  35. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +2 -0
  36. data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rb +25 -0
  37. data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rb +26 -0
  38. data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rb +49 -0
  39. data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb +50 -0
  40. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rb +47 -0
  41. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rb +57 -0
  42. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rb +45 -0
  43. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rb +46 -0
  44. data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rb +61 -0
  45. data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rb +62 -0
  46. data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
  47. data/lib/anthropic/models/beta/message_count_tokens_params.rb +7 -30
  48. data/lib/anthropic/models/beta/message_create_params.rb +3 -26
  49. data/lib/anthropic/models/beta/messages/batch_create_params.rb +6 -36
  50. data/lib/anthropic/models/beta/messages/beta_message_batch.rb +1 -4
  51. data/lib/anthropic/models/beta_error_response.rb +7 -1
  52. data/lib/anthropic/models/cache_control_ephemeral.rb +39 -1
  53. data/lib/anthropic/models/cache_creation.rb +24 -0
  54. data/lib/anthropic/models/error_response.rb +7 -1
  55. data/lib/anthropic/models/message_count_tokens_params.rb +1 -24
  56. data/lib/anthropic/models/message_create_params.rb +1 -24
  57. data/lib/anthropic/models/messages/batch_create_params.rb +2 -28
  58. data/lib/anthropic/models/model.rb +6 -0
  59. data/lib/anthropic/models/tool_use_block.rb +8 -0
  60. data/lib/anthropic/models/usage.rb +9 -1
  61. data/lib/anthropic/models.rb +2 -0
  62. data/lib/anthropic/resources/beta/messages.rb +3 -3
  63. data/lib/anthropic/resources/messages.rb +85 -1
  64. data/lib/anthropic/version.rb +1 -1
  65. data/lib/anthropic.rb +30 -0
  66. data/rbi/anthropic/errors.rbi +2 -2
  67. data/rbi/anthropic/helpers/input_schema/array_of.rbi +16 -0
  68. data/rbi/anthropic/helpers/input_schema/base_model.rbi +21 -0
  69. data/rbi/anthropic/helpers/input_schema/boolean.rbi +11 -0
  70. data/rbi/anthropic/helpers/input_schema/enum_of.rbi +30 -0
  71. data/rbi/anthropic/helpers/input_schema/json_schema_converter.rbi +89 -0
  72. data/rbi/anthropic/helpers/input_schema/union_of.rbi +23 -0
  73. data/rbi/anthropic/helpers/structured_output.rbi +16 -0
  74. data/rbi/anthropic/input_schema.rbi +12 -0
  75. data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block.rbi +33 -0
  76. data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbi +34 -0
  77. data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block.rbi +72 -0
  78. data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbi +77 -0
  79. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbi +86 -0
  80. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbi +110 -0
  81. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbi +101 -0
  82. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbi +101 -0
  83. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +72 -0
  84. data/rbi/anthropic/models/beta/beta_content_block.rbi +2 -0
  85. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +2 -0
  86. data/rbi/anthropic/models/beta/beta_message.rbi +2 -0
  87. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +4 -0
  88. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +10 -0
  89. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +10 -0
  90. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbi +41 -0
  91. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbi +41 -0
  92. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbi +73 -0
  93. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbi +73 -0
  94. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbi +90 -0
  95. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbi +118 -0
  96. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbi +110 -0
  97. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbi +110 -0
  98. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbi +118 -0
  99. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbi +118 -0
  100. data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
  101. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +7 -48
  102. data/rbi/anthropic/models/beta/message_create_params.rbi +6 -48
  103. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +6 -48
  104. data/rbi/anthropic/models/beta_error_response.rbi +10 -2
  105. data/rbi/anthropic/models/cache_control_ephemeral.rbi +68 -3
  106. data/rbi/anthropic/models/cache_creation.rbi +45 -0
  107. data/rbi/anthropic/models/error_response.rbi +10 -2
  108. data/rbi/anthropic/models/message_count_tokens_params.rbi +2 -48
  109. data/rbi/anthropic/models/message_create_params.rbi +2 -48
  110. data/rbi/anthropic/models/messages/batch_create_params.rbi +2 -48
  111. data/rbi/anthropic/models/usage.rbi +13 -0
  112. data/rbi/anthropic/models.rbi +2 -0
  113. data/rbi/anthropic/resources/beta/messages.rbi +6 -72
  114. data/rbi/anthropic/resources/messages.rbi +3 -72
  115. data/sig/anthropic/models/beta/beta_bash_code_execution_output_block.rbs +23 -0
  116. data/sig/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbs +23 -0
  117. data/sig/anthropic/models/beta/beta_bash_code_execution_result_block.rbs +44 -0
  118. data/sig/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbs +44 -0
  119. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbs +44 -0
  120. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbs +49 -0
  121. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbs +48 -0
  122. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbs +48 -0
  123. data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +34 -0
  124. data/sig/anthropic/models/beta/beta_content_block.rbs +2 -0
  125. data/sig/anthropic/models/beta/beta_content_block_param.rbs +2 -0
  126. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +2 -0
  127. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +7 -1
  128. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +7 -1
  129. data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbs +29 -0
  130. data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbs +29 -0
  131. data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbs +49 -0
  132. data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs +49 -0
  133. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbs +46 -0
  134. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbs +51 -0
  135. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbs +53 -0
  136. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbs +53 -0
  137. data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbs +61 -0
  138. data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbs +61 -0
  139. data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
  140. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
  141. data/sig/anthropic/models/beta_error_response.rbs +13 -2
  142. data/sig/anthropic/models/cache_control_ephemeral.rbs +27 -3
  143. data/sig/anthropic/models/cache_creation.rbs +25 -0
  144. data/sig/anthropic/models/error_response.rbs +13 -2
  145. data/sig/anthropic/models/usage.rbs +5 -0
  146. data/sig/anthropic/models.rbs +2 -0
  147. metadata +80 -2
@@ -7,7 +7,7 @@ module Anthropic
7
7
  # @!attribute content_block
8
8
  # Response model for a file uploaded to the container.
9
9
  #
10
- # @return [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock]
10
+ # @return [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock]
11
11
  required :content_block, union: -> { Anthropic::Beta::BetaRawContentBlockStartEvent::ContentBlock }
12
12
 
13
13
  # @!attribute index
@@ -21,7 +21,7 @@ module Anthropic
21
21
  required :type, const: :content_block_start
22
22
 
23
23
  # @!method initialize(content_block:, index:, type: :content_block_start)
24
- # @param content_block [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock] Response model for a file uploaded to the container.
24
+ # @param content_block [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock] Response model for a file uploaded to the container.
25
25
  #
26
26
  # @param index [Integer]
27
27
  #
@@ -49,6 +49,11 @@ module Anthropic
49
49
 
50
50
  variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlock }
51
51
 
52
+ variant :bash_code_execution_tool_result, -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock }
53
+
54
+ variant :text_editor_code_execution_tool_result,
55
+ -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock }
56
+
52
57
  variant :mcp_tool_use, -> { Anthropic::Beta::BetaMCPToolUseBlock }
53
58
 
54
59
  variant :mcp_tool_result, -> { Anthropic::Beta::BetaMCPToolResultBlock }
@@ -57,7 +62,7 @@ module Anthropic
57
62
  variant :container_upload, -> { Anthropic::Beta::BetaContainerUploadBlock }
58
63
 
59
64
  # @!method self.variants
60
- # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
65
+ # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
61
66
  end
62
67
  end
63
68
  end
@@ -36,6 +36,8 @@ module Anthropic
36
36
 
37
37
  WEB_SEARCH = :web_search
38
38
  CODE_EXECUTION = :code_execution
39
+ BASH_CODE_EXECUTION = :bash_code_execution
40
+ TEXT_EDITOR_CODE_EXECUTION = :text_editor_code_execution
39
41
 
40
42
  # @!method self.values
41
43
  # @return [Array<Symbol>]
@@ -47,6 +47,8 @@ module Anthropic
47
47
 
48
48
  WEB_SEARCH = :web_search
49
49
  CODE_EXECUTION = :code_execution
50
+ BASH_CODE_EXECUTION = :bash_code_execution
51
+ TEXT_EDITOR_CODE_EXECUTION = :text_editor_code_execution
50
52
 
51
53
  # @!method self.values
52
54
  # @return [Array<Symbol>]
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionCreateResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute is_file_update
8
+ #
9
+ # @return [Boolean]
10
+ required :is_file_update, Anthropic::Internal::Type::Boolean
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :text_editor_code_execution_create_result]
15
+ required :type, const: :text_editor_code_execution_create_result
16
+
17
+ # @!method initialize(is_file_update:, type: :text_editor_code_execution_create_result)
18
+ # @param is_file_update [Boolean]
19
+ # @param type [Symbol, :text_editor_code_execution_create_result]
20
+ end
21
+ end
22
+
23
+ BetaTextEditorCodeExecutionCreateResultBlock = Beta::BetaTextEditorCodeExecutionCreateResultBlock
24
+ end
25
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionCreateResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute is_file_update
8
+ #
9
+ # @return [Boolean]
10
+ required :is_file_update, Anthropic::Internal::Type::Boolean
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :text_editor_code_execution_create_result]
15
+ required :type, const: :text_editor_code_execution_create_result
16
+
17
+ # @!method initialize(is_file_update:, type: :text_editor_code_execution_create_result)
18
+ # @param is_file_update [Boolean]
19
+ # @param type [Symbol, :text_editor_code_execution_create_result]
20
+ end
21
+ end
22
+
23
+ BetaTextEditorCodeExecutionCreateResultBlockParam =
24
+ Beta::BetaTextEditorCodeExecutionCreateResultBlockParam
25
+ end
26
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionStrReplaceResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute lines
8
+ #
9
+ # @return [Array<String>, nil]
10
+ required :lines, Anthropic::Internal::Type::ArrayOf[String], nil?: true
11
+
12
+ # @!attribute new_lines
13
+ #
14
+ # @return [Integer, nil]
15
+ required :new_lines, Integer, nil?: true
16
+
17
+ # @!attribute new_start
18
+ #
19
+ # @return [Integer, nil]
20
+ required :new_start, Integer, nil?: true
21
+
22
+ # @!attribute old_lines
23
+ #
24
+ # @return [Integer, nil]
25
+ required :old_lines, Integer, nil?: true
26
+
27
+ # @!attribute old_start
28
+ #
29
+ # @return [Integer, nil]
30
+ required :old_start, Integer, nil?: true
31
+
32
+ # @!attribute type
33
+ #
34
+ # @return [Symbol, :text_editor_code_execution_str_replace_result]
35
+ required :type, const: :text_editor_code_execution_str_replace_result
36
+
37
+ # @!method initialize(lines:, new_lines:, new_start:, old_lines:, old_start:, type: :text_editor_code_execution_str_replace_result)
38
+ # @param lines [Array<String>, nil]
39
+ # @param new_lines [Integer, nil]
40
+ # @param new_start [Integer, nil]
41
+ # @param old_lines [Integer, nil]
42
+ # @param old_start [Integer, nil]
43
+ # @param type [Symbol, :text_editor_code_execution_str_replace_result]
44
+ end
45
+ end
46
+
47
+ BetaTextEditorCodeExecutionStrReplaceResultBlock = Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock
48
+ end
49
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionStrReplaceResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute type
8
+ #
9
+ # @return [Symbol, :text_editor_code_execution_str_replace_result]
10
+ required :type, const: :text_editor_code_execution_str_replace_result
11
+
12
+ # @!attribute lines
13
+ #
14
+ # @return [Array<String>, nil]
15
+ optional :lines, Anthropic::Internal::Type::ArrayOf[String], nil?: true
16
+
17
+ # @!attribute new_lines
18
+ #
19
+ # @return [Integer, nil]
20
+ optional :new_lines, Integer, nil?: true
21
+
22
+ # @!attribute new_start
23
+ #
24
+ # @return [Integer, nil]
25
+ optional :new_start, Integer, nil?: true
26
+
27
+ # @!attribute old_lines
28
+ #
29
+ # @return [Integer, nil]
30
+ optional :old_lines, Integer, nil?: true
31
+
32
+ # @!attribute old_start
33
+ #
34
+ # @return [Integer, nil]
35
+ optional :old_start, Integer, nil?: true
36
+
37
+ # @!method initialize(lines: nil, new_lines: nil, new_start: nil, old_lines: nil, old_start: nil, type: :text_editor_code_execution_str_replace_result)
38
+ # @param lines [Array<String>, nil]
39
+ # @param new_lines [Integer, nil]
40
+ # @param new_start [Integer, nil]
41
+ # @param old_lines [Integer, nil]
42
+ # @param old_start [Integer, nil]
43
+ # @param type [Symbol, :text_editor_code_execution_str_replace_result]
44
+ end
45
+ end
46
+
47
+ BetaTextEditorCodeExecutionStrReplaceResultBlockParam =
48
+ Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam
49
+ end
50
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock]
10
+ required :content, union: -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock::Content }
11
+
12
+ # @!attribute tool_use_id
13
+ #
14
+ # @return [String]
15
+ required :tool_use_id, String
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, :text_editor_code_execution_tool_result]
20
+ required :type, const: :text_editor_code_execution_tool_result
21
+
22
+ # @!method initialize(content:, tool_use_id:, type: :text_editor_code_execution_tool_result)
23
+ # @param content [Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock]
24
+ # @param tool_use_id [String]
25
+ # @param type [Symbol, :text_editor_code_execution_tool_result]
26
+
27
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock#content
28
+ module Content
29
+ extend Anthropic::Internal::Type::Union
30
+
31
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultError }
32
+
33
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionViewResultBlock }
34
+
35
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionCreateResultBlock }
36
+
37
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock }
38
+
39
+ # @!method self.variants
40
+ # @return [Array(Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock)]
41
+ end
42
+ end
43
+ end
44
+
45
+ BetaTextEditorCodeExecutionToolResultBlock = Beta::BetaTextEditorCodeExecutionToolResultBlock
46
+ end
47
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam]
10
+ required :content, union: -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlockParam::Content }
11
+
12
+ # @!attribute tool_use_id
13
+ #
14
+ # @return [String]
15
+ required :tool_use_id, String
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, :text_editor_code_execution_tool_result]
20
+ required :type, const: :text_editor_code_execution_tool_result
21
+
22
+ # @!attribute cache_control
23
+ # Create a cache control breakpoint at this content block.
24
+ #
25
+ # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
26
+ optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
27
+
28
+ # @!method initialize(content:, tool_use_id:, cache_control: nil, type: :text_editor_code_execution_tool_result)
29
+ # @param content [Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam]
30
+ #
31
+ # @param tool_use_id [String]
32
+ #
33
+ # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
34
+ #
35
+ # @param type [Symbol, :text_editor_code_execution_tool_result]
36
+
37
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam#content
38
+ module Content
39
+ extend Anthropic::Internal::Type::Union
40
+
41
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultErrorParam }
42
+
43
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionViewResultBlockParam }
44
+
45
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionCreateResultBlockParam }
46
+
47
+ variant -> { Anthropic::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam }
48
+
49
+ # @!method self.variants
50
+ # @return [Array(Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionCreateResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam)]
51
+ end
52
+ end
53
+ end
54
+
55
+ BetaTextEditorCodeExecutionToolResultBlockParam = Beta::BetaTextEditorCodeExecutionToolResultBlockParam
56
+ end
57
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute error_code
8
+ #
9
+ # @return [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError::ErrorCode]
10
+ required :error_code, enum: -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultError::ErrorCode }
11
+
12
+ # @!attribute error_message
13
+ #
14
+ # @return [String, nil]
15
+ required :error_message, String, nil?: true
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, :text_editor_code_execution_tool_result_error]
20
+ required :type, const: :text_editor_code_execution_tool_result_error
21
+
22
+ # @!method initialize(error_code:, error_message:, type: :text_editor_code_execution_tool_result_error)
23
+ # @param error_code [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError::ErrorCode]
24
+ # @param error_message [String, nil]
25
+ # @param type [Symbol, :text_editor_code_execution_tool_result_error]
26
+
27
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultError#error_code
28
+ module ErrorCode
29
+ extend Anthropic::Internal::Type::Enum
30
+
31
+ INVALID_TOOL_INPUT = :invalid_tool_input
32
+ UNAVAILABLE = :unavailable
33
+ TOO_MANY_REQUESTS = :too_many_requests
34
+ EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
35
+ FILE_NOT_FOUND = :file_not_found
36
+
37
+ # @!method self.values
38
+ # @return [Array<Symbol>]
39
+ end
40
+ end
41
+ end
42
+
43
+ BetaTextEditorCodeExecutionToolResultError = Beta::BetaTextEditorCodeExecutionToolResultError
44
+ end
45
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute error_code
8
+ #
9
+ # @return [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam::ErrorCode]
10
+ required :error_code,
11
+ enum: -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultErrorParam::ErrorCode }
12
+
13
+ # @!attribute type
14
+ #
15
+ # @return [Symbol, :text_editor_code_execution_tool_result_error]
16
+ required :type, const: :text_editor_code_execution_tool_result_error
17
+
18
+ # @!attribute error_message
19
+ #
20
+ # @return [String, nil]
21
+ optional :error_message, String, nil?: true
22
+
23
+ # @!method initialize(error_code:, error_message: nil, type: :text_editor_code_execution_tool_result_error)
24
+ # @param error_code [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam::ErrorCode]
25
+ # @param error_message [String, nil]
26
+ # @param type [Symbol, :text_editor_code_execution_tool_result_error]
27
+
28
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultErrorParam#error_code
29
+ module ErrorCode
30
+ extend Anthropic::Internal::Type::Enum
31
+
32
+ INVALID_TOOL_INPUT = :invalid_tool_input
33
+ UNAVAILABLE = :unavailable
34
+ TOO_MANY_REQUESTS = :too_many_requests
35
+ EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
36
+ FILE_NOT_FOUND = :file_not_found
37
+
38
+ # @!method self.values
39
+ # @return [Array<Symbol>]
40
+ end
41
+ end
42
+ end
43
+
44
+ BetaTextEditorCodeExecutionToolResultErrorParam = Beta::BetaTextEditorCodeExecutionToolResultErrorParam
45
+ end
46
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionViewResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [String]
10
+ required :content, String
11
+
12
+ # @!attribute file_type
13
+ #
14
+ # @return [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock::FileType]
15
+ required :file_type, enum: -> { Anthropic::Beta::BetaTextEditorCodeExecutionViewResultBlock::FileType }
16
+
17
+ # @!attribute num_lines
18
+ #
19
+ # @return [Integer, nil]
20
+ required :num_lines, Integer, nil?: true
21
+
22
+ # @!attribute start_line
23
+ #
24
+ # @return [Integer, nil]
25
+ required :start_line, Integer, nil?: true
26
+
27
+ # @!attribute total_lines
28
+ #
29
+ # @return [Integer, nil]
30
+ required :total_lines, Integer, nil?: true
31
+
32
+ # @!attribute type
33
+ #
34
+ # @return [Symbol, :text_editor_code_execution_view_result]
35
+ required :type, const: :text_editor_code_execution_view_result
36
+
37
+ # @!method initialize(content:, file_type:, num_lines:, start_line:, total_lines:, type: :text_editor_code_execution_view_result)
38
+ # @param content [String]
39
+ # @param file_type [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock::FileType]
40
+ # @param num_lines [Integer, nil]
41
+ # @param start_line [Integer, nil]
42
+ # @param total_lines [Integer, nil]
43
+ # @param type [Symbol, :text_editor_code_execution_view_result]
44
+
45
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlock#file_type
46
+ module FileType
47
+ extend Anthropic::Internal::Type::Enum
48
+
49
+ TEXT = :text
50
+ IMAGE = :image
51
+ PDF = :pdf
52
+
53
+ # @!method self.values
54
+ # @return [Array<Symbol>]
55
+ end
56
+ end
57
+ end
58
+
59
+ BetaTextEditorCodeExecutionViewResultBlock = Beta::BetaTextEditorCodeExecutionViewResultBlock
60
+ end
61
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTextEditorCodeExecutionViewResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [String]
10
+ required :content, String
11
+
12
+ # @!attribute file_type
13
+ #
14
+ # @return [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam::FileType]
15
+ required :file_type,
16
+ enum: -> { Anthropic::Beta::BetaTextEditorCodeExecutionViewResultBlockParam::FileType }
17
+
18
+ # @!attribute type
19
+ #
20
+ # @return [Symbol, :text_editor_code_execution_view_result]
21
+ required :type, const: :text_editor_code_execution_view_result
22
+
23
+ # @!attribute num_lines
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :num_lines, Integer, nil?: true
27
+
28
+ # @!attribute start_line
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :start_line, Integer, nil?: true
32
+
33
+ # @!attribute total_lines
34
+ #
35
+ # @return [Integer, nil]
36
+ optional :total_lines, Integer, nil?: true
37
+
38
+ # @!method initialize(content:, file_type:, num_lines: nil, start_line: nil, total_lines: nil, type: :text_editor_code_execution_view_result)
39
+ # @param content [String]
40
+ # @param file_type [Symbol, Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam::FileType]
41
+ # @param num_lines [Integer, nil]
42
+ # @param start_line [Integer, nil]
43
+ # @param total_lines [Integer, nil]
44
+ # @param type [Symbol, :text_editor_code_execution_view_result]
45
+
46
+ # @see Anthropic::Models::Beta::BetaTextEditorCodeExecutionViewResultBlockParam#file_type
47
+ module FileType
48
+ extend Anthropic::Internal::Type::Enum
49
+
50
+ TEXT = :text
51
+ IMAGE = :image
52
+ PDF = :pdf
53
+
54
+ # @!method self.values
55
+ # @return [Array<Symbol>]
56
+ end
57
+ end
58
+ end
59
+
60
+ BetaTextEditorCodeExecutionViewResultBlockParam = Beta::BetaTextEditorCodeExecutionViewResultBlockParam
61
+ end
62
+ end
@@ -14,6 +14,8 @@ module Anthropic
14
14
 
15
15
  variant -> { Anthropic::Beta::BetaCodeExecutionTool20250522 }
16
16
 
17
+ variant -> { Anthropic::Beta::BetaCodeExecutionTool20250825 }
18
+
17
19
  variant -> { Anthropic::Beta::BetaToolComputerUse20241022 }
18
20
 
19
21
  variant -> { Anthropic::Beta::BetaToolComputerUse20250124 }
@@ -29,7 +31,7 @@ module Anthropic
29
31
  variant -> { Anthropic::Beta::BetaWebSearchTool20250305 }
30
32
 
31
33
  # @!method self.variants
32
- # @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305)]
34
+ # @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305)]
33
35
  end
34
36
  end
35
37
 
@@ -66,30 +66,7 @@ module Anthropic
66
66
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
67
67
  # ```
68
68
  #
69
- # Starting with Claude 3 models, you can also send image content blocks:
70
- #
71
- # ```json
72
- # {
73
- # "role": "user",
74
- # "content": [
75
- # {
76
- # "type": "image",
77
- # "source": {
78
- # "type": "base64",
79
- # "media_type": "image/jpeg",
80
- # "data": "/9j/4AAQSkZJRg..."
81
- # }
82
- # },
83
- # { "type": "text", "text": "What is in this image?" }
84
- # ]
85
- # }
86
- # ```
87
- #
88
- # We currently support the `base64` source type for images, and the `image/jpeg`,
89
- # `image/png`, `image/gif`, and `image/webp` media types.
90
- #
91
- # See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
92
- # more input examples.
69
+ # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
93
70
  #
94
71
  # Note that if you want to include a
95
72
  # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
@@ -224,11 +201,9 @@ module Anthropic
224
201
  #
225
202
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
226
203
  #
227
- # @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305>, nil]
204
+ # @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305>, nil]
228
205
  optional :tools,
229
- -> {
230
- Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::MessageCountTokensParams::Tool]
231
- }
206
+ -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::MessageCountTokensParams::Tool] }
232
207
 
233
208
  # @!attribute betas
234
209
  # Optional header to specify the beta version(s) you want to use.
@@ -252,7 +227,7 @@ module Anthropic
252
227
  #
253
228
  # @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
254
229
  #
255
- # @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305>] Definitions of tools that the model may use.
230
+ # @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305>] Definitions of tools that the model may use.
256
231
  #
257
232
  # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
258
233
  #
@@ -290,6 +265,8 @@ module Anthropic
290
265
 
291
266
  variant -> { Anthropic::Beta::BetaCodeExecutionTool20250522 }
292
267
 
268
+ variant -> { Anthropic::Beta::BetaCodeExecutionTool20250825 }
269
+
293
270
  variant -> { Anthropic::Beta::BetaToolComputerUse20241022 }
294
271
 
295
272
  variant -> { Anthropic::Beta::BetaToolComputerUse20250124 }
@@ -305,7 +282,7 @@ module Anthropic
305
282
  variant -> { Anthropic::Beta::BetaWebSearchTool20250305 }
306
283
 
307
284
  # @!method self.variants
308
- # @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305)]
285
+ # @return [Array(Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305)]
309
286
  end
310
287
  end
311
288
  end