anthropic 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/client.rb +5 -2
  5. data/lib/anthropic/internal/transport/base_client.rb +1 -1
  6. data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -1
  7. data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -1
  8. data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -1
  9. data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +49 -0
  10. data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
  11. data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
  12. data/lib/anthropic/models/beta/message_create_params.rb +2 -2
  13. data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
  14. data/lib/anthropic/models/citation_char_location.rb +7 -1
  15. data/lib/anthropic/models/citation_content_block_location.rb +7 -1
  16. data/lib/anthropic/models/citation_page_location.rb +7 -1
  17. data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
  18. data/lib/anthropic/models/message_count_tokens_tool.rb +4 -34
  19. data/lib/anthropic/models/message_create_params.rb +2 -2
  20. data/lib/anthropic/models/messages/batch_create_params.rb +2 -2
  21. data/lib/anthropic/models/model.rb +5 -22
  22. data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -0
  23. data/lib/anthropic/models/tool_text_editor_20250728.rb +45 -0
  24. data/lib/anthropic/models/tool_union.rb +4 -33
  25. data/lib/anthropic/models.rb +4 -0
  26. data/lib/anthropic/resources/beta/messages.rb +70 -3
  27. data/lib/anthropic/resources/messages.rb +3 -3
  28. data/lib/anthropic/version.rb +1 -1
  29. data/lib/anthropic.rb +3 -0
  30. data/rbi/anthropic/helpers/bedrock/client.rbi +17 -6
  31. data/rbi/anthropic/helpers/streaming/events.rbi +12 -2
  32. data/rbi/anthropic/helpers/streaming/message_stream.rbi +48 -34
  33. data/rbi/anthropic/helpers/vertex/client.rbi +17 -6
  34. data/rbi/anthropic/internal/transport/base_client.rbi +1 -1
  35. data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +6 -0
  36. data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +6 -0
  37. data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +6 -0
  38. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +82 -0
  39. data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
  40. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +5 -0
  41. data/rbi/anthropic/models/beta/message_create_params.rbi +4 -0
  42. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +4 -0
  43. data/rbi/anthropic/models/citation_char_location.rbi +6 -0
  44. data/rbi/anthropic/models/citation_content_block_location.rbi +6 -0
  45. data/rbi/anthropic/models/citation_page_location.rbi +6 -0
  46. data/rbi/anthropic/models/message_count_tokens_params.rbi +8 -4
  47. data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -61
  48. data/rbi/anthropic/models/message_create_params.rbi +8 -4
  49. data/rbi/anthropic/models/messages/batch_create_params.rbi +8 -4
  50. data/rbi/anthropic/models/model.rbi +4 -8
  51. data/rbi/anthropic/models/tool_text_editor_20250429.rbi +62 -0
  52. data/rbi/anthropic/models/tool_text_editor_20250728.rbi +72 -0
  53. data/rbi/anthropic/models/tool_union.rbi +2 -61
  54. data/rbi/anthropic/models.rbi +4 -0
  55. data/rbi/anthropic/resources/beta/messages.rbi +3 -0
  56. data/rbi/anthropic/resources/messages.rbi +53 -28
  57. data/sig/anthropic/helpers/streaming/events.rbs +30 -32
  58. data/sig/anthropic/helpers/streaming/message_stream.rbs +4 -2
  59. data/sig/anthropic/internal/transport/base_client.rbs +1 -1
  60. data/sig/anthropic/models/beta/beta_citation_char_location.rbs +5 -0
  61. data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +5 -0
  62. data/sig/anthropic/models/beta/beta_citation_page_location.rbs +5 -0
  63. data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +39 -0
  64. data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
  65. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
  66. data/sig/anthropic/models/citation_char_location.rbs +5 -0
  67. data/sig/anthropic/models/citation_content_block_location.rbs +5 -0
  68. data/sig/anthropic/models/citation_page_location.rbs +5 -0
  69. data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -28
  70. data/sig/anthropic/models/model.rbs +4 -10
  71. data/sig/anthropic/models/tool_text_editor_20250429.rbs +30 -0
  72. data/sig/anthropic/models/tool_text_editor_20250728.rbs +35 -0
  73. data/sig/anthropic/models/tool_union.rbs +2 -28
  74. data/sig/anthropic/models.rbs +4 -0
  75. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d36e1f15e69568a09c53f6050d60cf715dd92adf8df94877f9ea59693a58f16
4
- data.tar.gz: 862a093342067fecddb4c2cc2c9365c2a0a69ffd6d93661c7ee5c70056606bba
3
+ metadata.gz: a3aeac8c8f19023ee694cd9c7ad3e5dd99e0e7048a811454efff82c00fe7a12b
4
+ data.tar.gz: 8fd8babb73990354a553654be7613e5c182432e50b81b89080da9e0b450bfb63
5
5
  SHA512:
6
- metadata.gz: 4ce2b4e8c467b715b86b3e2756ffaa3a7b7df6b37eff492c8d0b552adaaa5b1c6efb3172308d0b61f9abecdfa2f392c70a3ac850678b1c92806865eaad1851c5
7
- data.tar.gz: 80fc591eac84e7d9e95cae8b7d5ed51a7a68ae19f3c66c1a27442f3f46838050e50d939132e019452218766eec3fc6d7d40db5092fbedfdaec25c970c3ccceed
6
+ metadata.gz: b47bef5c4483f716d55955a14d6692baacc3cacdee9be3c2470ec89f334f74fdacec4267181e20ac6971f3624c474d6e154579084ed73162d131fd4407621c56
7
+ data.tar.gz: d91553e354390a3447f50d1927e60244783ee1070aca2acd28aeaa02e4365bf0926c01ab3d9f8810c7e54219985d43ef5e24d0decfb9a62af5ea7d42880ae970
data/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0 (2025-08-05)
4
+
5
+ Full Changelog: [v1.3.0...v1.4.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.3.0...v1.4.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add claude-opus-4-1-20250805 ([2477a05](https://github.com/anthropics/anthropic-sdk-ruby/commit/2477a05b8b26b047df178264db7d0764ca954954))
10
+ * **api:** adds support for text_editor_20250728 tool ([dff36db](https://github.com/anthropics/anthropic-sdk-ruby/commit/dff36db0eb8b7077ba311f3815eb0065422c2fd4))
11
+ * update streaming error message to say 'required' not 'recommended' ([6272ddd](https://github.com/anthropics/anthropic-sdk-ruby/commit/6272ddd9cd3ae0110afee98159516c3232c65832))
12
+
13
+
14
+ ### Chores
15
+
16
+ * **ci:** setup Ruby on release job ([#111](https://github.com/anthropics/anthropic-sdk-ruby/issues/111)) ([bb5d08f](https://github.com/anthropics/anthropic-sdk-ruby/commit/bb5d08f052b3e65f70d345c45ce59e3e8fe282f3))
17
+ * **client:** add TextEditor_20250429 tool ([3b344dc](https://github.com/anthropics/anthropic-sdk-ruby/commit/3b344dcf2dc759a0a01a1061573115c7a6c8a449))
18
+ * **internal:** increase visibility of internal helper method ([72fb96c](https://github.com/anthropics/anthropic-sdk-ruby/commit/72fb96cdcdb2a6436aaf6d908f010ae16c08bd33))
19
+
20
+ ## 1.3.0 (2025-07-28)
21
+
22
+ Full Changelog: [v1.2.0...v1.3.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.2.0...v1.3.0)
23
+
24
+ ### Features
25
+
26
+ * **api:** removed older deprecated models ([47de6c2](https://github.com/anthropics/anthropic-sdk-ruby/commit/47de6c2860fabd344374aed733df1bcb17988454))
27
+ * **client:** add beta stream implementation and fine grained tool streaming example ([2856b81](https://github.com/anthropics/anthropic-sdk-ruby/commit/2856b8119b99e6487093df3f49216ecc8d1bd3e3))
28
+ * **client:** add beta stream implementation and fine grained tool streaming example ([bc87fd4](https://github.com/anthropics/anthropic-sdk-ruby/commit/bc87fd4afd94a48301fec548a0e7b21f44a24a59))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **internal:** ensure sorbet test always runs serially ([0b39a19](https://github.com/anthropics/anthropic-sdk-ruby/commit/0b39a1908587597ca5836872333541307f24bdf2))
34
+ * **internal:** ensure vertex client test ordering ([#667](https://github.com/anthropics/anthropic-sdk-ruby/issues/667)) ([d7439fa](https://github.com/anthropics/anthropic-sdk-ruby/commit/d7439fa58664d9a533cacca6a299b3dbbe43ec7f))
35
+
36
+
37
+ ### Chores
38
+
39
+ * add basic tool use example ([#107](https://github.com/anthropics/anthropic-sdk-ruby/issues/107)) ([4452119](https://github.com/anthropics/anthropic-sdk-ruby/commit/445211929b09ff0be9406aad1b3f3604d8bf3794))
40
+ * add Darwin to PLATFORMS in Gemfile.lock ([#104](https://github.com/anthropics/anthropic-sdk-ruby/issues/104)) ([aa5bcbe](https://github.com/anthropics/anthropic-sdk-ruby/commit/aa5bcbedc48cc9a49ba14050fa3ad934a6f95c99))
41
+ * **internal:** run formatter ([87ce979](https://github.com/anthropics/anthropic-sdk-ruby/commit/87ce979a06108f980e8c867d43166fbeeff02ec3))
42
+ * update contribute.md ([aa928a0](https://github.com/anthropics/anthropic-sdk-ruby/commit/aa928a09f08250c9e6e93b884761eb35a9d5b6b4))
43
+
3
44
  ## 1.2.0 (2025-07-18)
4
45
 
5
46
  Full Changelog: [v1.1.1...v1.2.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.1.1...v1.2.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.2.0"
18
+ gem "anthropic", "~> 1.4.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -21,7 +21,10 @@ module Anthropic
21
21
  "claude-opus-4-0": 8_192,
22
22
  "claude-4-opus-20250514": 8_192,
23
23
  "anthropic.claude-opus-4-20250514-v1:0": 8_192,
24
- "claude-opus-4@20250514": 8_192
24
+ "claude-opus-4@20250514": 8_192,
25
+ "claude-opus-4-1-20250805": 8192,
26
+ "anthropic.claude-opus-4-1-20250805-v1:0": 8192,
27
+ "claude-opus-4-1@20250805": 8192
25
28
  }.freeze
26
29
 
27
30
  # @return [String, nil]
@@ -78,7 +81,7 @@ module Anthropic
78
81
  expected_time = maximum_time * max_tokens / 128_000.0
79
82
  if expected_time > default_time || (max_nonstreaming_tokens && max_tokens > max_nonstreaming_tokens)
80
83
  raise ArgumentError.new(
81
- "Streaming is strongly recommended for operations that may take longer than 10 minutes. " \
84
+ "Streaming is required for operations that may take longer than 10 minutes. " \
82
85
  "See https://github.com/anthropics/anthropic-sdk-ruby#long-requests for more details"
83
86
  )
84
87
  end
@@ -365,7 +365,7 @@ module Anthropic
365
365
  #
366
366
  # @raise [Anthropic::Errors::APIError]
367
367
  # @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
368
- private def send_request(request, redirect_count:, retry_count:, send_retry_header:)
368
+ def send_request(request, redirect_count:, retry_count:, send_retry_header:)
369
369
  url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout)
370
370
  input = {**request.except(:timeout), deadline: Anthropic::Internal::Util.monotonic_secs + timeout}
371
371
 
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_char_index, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_char_index
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :char_location]
35
40
  required :type, const: :char_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, start_char_index:, type: :char_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, file_id:, start_char_index:, type: :char_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_char_index [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_char_index [Integer]
43
49
  # @param type [Symbol, :char_location]
44
50
  end
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_block_index, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_block_index
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :content_block_location]
35
40
  required :type, const: :content_block_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, start_block_index:, type: :content_block_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, file_id:, start_block_index:, type: :content_block_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_block_index [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_block_index [Integer]
43
49
  # @param type [Symbol, :content_block_location]
44
50
  end
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_page_number, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_page_number
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :page_location]
35
40
  required :type, const: :page_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, start_page_number:, type: :page_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, file_id:, start_page_number:, type: :page_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_page_number [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_page_number [Integer]
43
49
  # @param type [Symbol, :page_location]
44
50
  end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaToolTextEditor20250728 < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute name
8
+ # Name of the tool.
9
+ #
10
+ # This is how the tool will be called by the model and in `tool_use` blocks.
11
+ #
12
+ # @return [Symbol, :str_replace_based_edit_tool]
13
+ required :name, const: :str_replace_based_edit_tool
14
+
15
+ # @!attribute type
16
+ #
17
+ # @return [Symbol, :text_editor_20250728]
18
+ required :type, const: :text_editor_20250728
19
+
20
+ # @!attribute cache_control
21
+ # Create a cache control breakpoint at this content block.
22
+ #
23
+ # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
+ optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
+
26
+ # @!attribute max_characters
27
+ # Maximum number of characters to display when viewing a file. If not specified,
28
+ # defaults to displaying the full file.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :max_characters, Integer, nil?: true
32
+
33
+ # @!method initialize(cache_control: nil, max_characters: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250728)
34
+ # Some parameter documentations has been truncated, see
35
+ # {Anthropic::Models::Beta::BetaToolTextEditor20250728} for more details.
36
+ #
37
+ # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
38
+ #
39
+ # @param max_characters [Integer, nil] Maximum number of characters to display when viewing a file. If not specified, d
40
+ #
41
+ # @param name [Symbol, :str_replace_based_edit_tool] Name of the tool.
42
+ #
43
+ # @param type [Symbol, :text_editor_20250728]
44
+ end
45
+ end
46
+
47
+ BetaToolTextEditor20250728 = Beta::BetaToolTextEditor20250728
48
+ end
49
+ end
@@ -24,10 +24,12 @@ module Anthropic
24
24
 
25
25
  variant -> { Anthropic::Beta::BetaToolTextEditor20250429 }
26
26
 
27
+ variant -> { Anthropic::Beta::BetaToolTextEditor20250728 }
28
+
27
29
  variant -> { Anthropic::Beta::BetaWebSearchTool20250305 }
28
30
 
29
31
  # @!method self.variants
30
- # @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::BetaWebSearchTool20250305)]
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)]
31
33
  end
32
34
  end
33
35
 
@@ -224,7 +224,7 @@ module Anthropic
224
224
  #
225
225
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
226
226
  #
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::BetaWebSearchTool20250305>, nil]
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]
228
228
  optional :tools,
229
229
  -> {
230
230
  Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::MessageCountTokensParams::Tool]
@@ -252,7 +252,7 @@ module Anthropic
252
252
  #
253
253
  # @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
254
  #
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::BetaWebSearchTool20250305>] Definitions of tools that the model may use.
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.
256
256
  #
257
257
  # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
258
258
  #
@@ -300,10 +300,12 @@ module Anthropic
300
300
 
301
301
  variant -> { Anthropic::Beta::BetaToolTextEditor20250429 }
302
302
 
303
+ variant -> { Anthropic::Beta::BetaToolTextEditor20250728 }
304
+
303
305
  variant -> { Anthropic::Beta::BetaWebSearchTool20250305 }
304
306
 
305
307
  # @!method self.variants
306
- # @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::BetaWebSearchTool20250305)]
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)]
307
309
  end
308
310
  end
309
311
  end
@@ -287,7 +287,7 @@ module Anthropic
287
287
  #
288
288
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
289
289
  #
290
- # @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::BetaWebSearchTool20250305>, nil]
290
+ # @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]
291
291
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
292
292
 
293
293
  # @!attribute top_k
@@ -350,7 +350,7 @@ module Anthropic
350
350
  #
351
351
  # @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,
352
352
  #
353
- # @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::BetaWebSearchTool20250305>] Definitions of tools that the model may use.
353
+ # @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.
354
354
  #
355
355
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
356
356
  #
@@ -356,7 +356,7 @@ module Anthropic
356
356
  #
357
357
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
358
358
  #
359
- # @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::BetaWebSearchTool20250305>, nil]
359
+ # @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]
360
360
  optional :tools,
361
361
  -> {
362
362
  Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion]
@@ -424,7 +424,7 @@ module Anthropic
424
424
  #
425
425
  # @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,
426
426
  #
427
- # @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::BetaWebSearchTool20250305>] Definitions of tools that the model may use.
427
+ # @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.
428
428
  #
429
429
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
430
430
  #
@@ -23,6 +23,11 @@ module Anthropic
23
23
  # @return [Integer]
24
24
  required :end_char_index, Integer
25
25
 
26
+ # @!attribute file_id
27
+ #
28
+ # @return [String, nil]
29
+ required :file_id, String, nil?: true
30
+
26
31
  # @!attribute start_char_index
27
32
  #
28
33
  # @return [Integer]
@@ -33,11 +38,12 @@ module Anthropic
33
38
  # @return [Symbol, :char_location]
34
39
  required :type, const: :char_location
35
40
 
36
- # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, start_char_index:, type: :char_location)
41
+ # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, file_id:, start_char_index:, type: :char_location)
37
42
  # @param cited_text [String]
38
43
  # @param document_index [Integer]
39
44
  # @param document_title [String, nil]
40
45
  # @param end_char_index [Integer]
46
+ # @param file_id [String, nil]
41
47
  # @param start_char_index [Integer]
42
48
  # @param type [Symbol, :char_location]
43
49
  end
@@ -23,6 +23,11 @@ module Anthropic
23
23
  # @return [Integer]
24
24
  required :end_block_index, Integer
25
25
 
26
+ # @!attribute file_id
27
+ #
28
+ # @return [String, nil]
29
+ required :file_id, String, nil?: true
30
+
26
31
  # @!attribute start_block_index
27
32
  #
28
33
  # @return [Integer]
@@ -33,11 +38,12 @@ module Anthropic
33
38
  # @return [Symbol, :content_block_location]
34
39
  required :type, const: :content_block_location
35
40
 
36
- # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, start_block_index:, type: :content_block_location)
41
+ # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, file_id:, start_block_index:, type: :content_block_location)
37
42
  # @param cited_text [String]
38
43
  # @param document_index [Integer]
39
44
  # @param document_title [String, nil]
40
45
  # @param end_block_index [Integer]
46
+ # @param file_id [String, nil]
41
47
  # @param start_block_index [Integer]
42
48
  # @param type [Symbol, :content_block_location]
43
49
  end
@@ -23,6 +23,11 @@ module Anthropic
23
23
  # @return [Integer]
24
24
  required :end_page_number, Integer
25
25
 
26
+ # @!attribute file_id
27
+ #
28
+ # @return [String, nil]
29
+ required :file_id, String, nil?: true
30
+
26
31
  # @!attribute start_page_number
27
32
  #
28
33
  # @return [Integer]
@@ -33,11 +38,12 @@ module Anthropic
33
38
  # @return [Symbol, :page_location]
34
39
  required :type, const: :page_location
35
40
 
36
- # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, start_page_number:, type: :page_location)
41
+ # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, file_id:, start_page_number:, type: :page_location)
37
42
  # @param cited_text [String]
38
43
  # @param document_index [Integer]
39
44
  # @param document_title [String, nil]
40
45
  # @param end_page_number [Integer]
46
+ # @param file_id [String, nil]
41
47
  # @param start_page_number [Integer]
42
48
  # @param type [Symbol, :page_location]
43
49
  end
@@ -216,7 +216,7 @@ module Anthropic
216
216
  #
217
217
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
218
218
  #
219
- # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::MessageCountTokensTool::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>, nil]
219
+ # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
220
220
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::MessageCountTokensTool] }
221
221
 
222
222
  # @!method initialize(messages:, model:, system_: nil, thinking: nil, tool_choice: nil, tools: nil, request_options: {})
@@ -233,7 +233,7 @@ module Anthropic
233
233
  #
234
234
  # @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
235
235
  #
236
- # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::MessageCountTokensTool::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
236
+ # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
237
237
  #
238
238
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
239
239
 
@@ -11,44 +11,14 @@ module Anthropic
11
11
 
12
12
  variant -> { Anthropic::ToolTextEditor20250124 }
13
13
 
14
- variant -> { Anthropic::MessageCountTokensTool::TextEditor20250429 }
14
+ variant -> { Anthropic::ToolTextEditor20250429 }
15
15
 
16
- variant -> { Anthropic::WebSearchTool20250305 }
16
+ variant -> { Anthropic::ToolTextEditor20250728 }
17
17
 
18
- class TextEditor20250429 < Anthropic::Internal::Type::BaseModel
19
- # @!attribute name
20
- # Name of the tool.
21
- #
22
- # This is how the tool will be called by the model and in `tool_use` blocks.
23
- #
24
- # @return [Symbol, :str_replace_based_edit_tool]
25
- required :name, const: :str_replace_based_edit_tool
26
-
27
- # @!attribute type
28
- #
29
- # @return [Symbol, :text_editor_20250429]
30
- required :type, const: :text_editor_20250429
31
-
32
- # @!attribute cache_control
33
- # Create a cache control breakpoint at this content block.
34
- #
35
- # @return [Anthropic::Models::CacheControlEphemeral, nil]
36
- optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
37
-
38
- # @!method initialize(cache_control: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250429)
39
- # Some parameter documentations has been truncated, see
40
- # {Anthropic::Models::MessageCountTokensTool::TextEditor20250429} for more
41
- # details.
42
- #
43
- # @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
44
- #
45
- # @param name [Symbol, :str_replace_based_edit_tool] Name of the tool.
46
- #
47
- # @param type [Symbol, :text_editor_20250429]
48
- end
18
+ variant -> { Anthropic::WebSearchTool20250305 }
49
19
 
50
20
  # @!method self.variants
51
- # @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::MessageCountTokensTool::TextEditor20250429, Anthropic::Models::WebSearchTool20250305)]
21
+ # @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305)]
52
22
  end
53
23
  end
54
24
  end
@@ -273,7 +273,7 @@ module Anthropic
273
273
  #
274
274
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
275
275
  #
276
- # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolUnion::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>, nil]
276
+ # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
277
277
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
278
278
 
279
279
  # @!attribute top_k
@@ -326,7 +326,7 @@ module Anthropic
326
326
  #
327
327
  # @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
328
328
  #
329
- # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolUnion::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
329
+ # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
330
330
  #
331
331
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
332
332
  #
@@ -331,7 +331,7 @@ module Anthropic
331
331
  #
332
332
  # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
333
333
  #
334
- # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolUnion::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>, nil]
334
+ # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
335
335
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
336
336
 
337
337
  # @!attribute top_k
@@ -392,7 +392,7 @@ module Anthropic
392
392
  #
393
393
  # @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
394
394
  #
395
- # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolUnion::TextEditor20250429, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
395
+ # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>] Definitions of tools that the model may use.
396
396
  #
397
397
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
398
398
  #
@@ -34,18 +34,14 @@ module Anthropic
34
34
 
35
35
  variant const: -> { Anthropic::Models::Model::CLAUDE_4_OPUS_20250514 }
36
36
 
37
+ variant const: -> { Anthropic::Models::Model::CLAUDE_OPUS_4_1_20250805 }
38
+
37
39
  variant const: -> { Anthropic::Models::Model::CLAUDE_3_OPUS_LATEST }
38
40
 
39
41
  variant const: -> { Anthropic::Models::Model::CLAUDE_3_OPUS_20240229 }
40
42
 
41
- variant const: -> { Anthropic::Models::Model::CLAUDE_3_SONNET_20240229 }
42
-
43
43
  variant const: -> { Anthropic::Models::Model::CLAUDE_3_HAIKU_20240307 }
44
44
 
45
- variant const: -> { Anthropic::Models::Model::CLAUDE_2_1 }
46
-
47
- variant const: -> { Anthropic::Models::Model::CLAUDE_2_0 }
48
-
49
45
  variant String
50
46
 
51
47
  # @!method self.variants
@@ -95,6 +91,9 @@ module Anthropic
95
91
  # Our most capable model
96
92
  CLAUDE_4_OPUS_20250514 = :"claude-4-opus-20250514"
97
93
 
94
+ # Our most capable model
95
+ CLAUDE_OPUS_4_1_20250805 = :"claude-opus-4-1-20250805"
96
+
98
97
  # Excels at writing and complex tasks
99
98
  # @deprecated Will reach end-of-life on January 5th, 2026. Please migrate to a newer model.
100
99
  # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
@@ -107,25 +106,9 @@ module Anthropic
107
106
  # information.
108
107
  CLAUDE_3_OPUS_20240229 = :"claude-3-opus-20240229"
109
108
 
110
- # Balance of speed and intelligence
111
- # @deprecated Will reach end-of-life on July 21st, 2025. Please migrate to a newer model.
112
- # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
113
- # information.
114
- CLAUDE_3_SONNET_20240229 = :"claude-3-sonnet-20240229"
115
-
116
109
  # Our previous most fast and cost-effective
117
110
  CLAUDE_3_HAIKU_20240307 = :"claude-3-haiku-20240307"
118
111
 
119
- # @deprecated Will reach end-of-life on July 21st, 2025. Please migrate to a newer model.
120
- # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
121
- # information.
122
- CLAUDE_2_1 = :"claude-2.1"
123
-
124
- # @deprecated Will reach end-of-life on July 21st, 2025. Please migrate to a newer model.
125
- # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
126
- # information.
127
- CLAUDE_2_0 = :"claude-2.0"
128
-
129
112
  # @!endgroup
130
113
  end
131
114
  end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class ToolTextEditor20250429 < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute name
7
+ # Name of the tool.
8
+ #
9
+ # This is how the tool will be called by the model and in `tool_use` blocks.
10
+ #
11
+ # @return [Symbol, :str_replace_based_edit_tool]
12
+ required :name, const: :str_replace_based_edit_tool
13
+
14
+ # @!attribute type
15
+ #
16
+ # @return [Symbol, :text_editor_20250429]
17
+ required :type, const: :text_editor_20250429
18
+
19
+ # @!attribute cache_control
20
+ # Create a cache control breakpoint at this content block.
21
+ #
22
+ # @return [Anthropic::Models::CacheControlEphemeral, nil]
23
+ optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
24
+
25
+ # @!method initialize(cache_control: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250429)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Anthropic::Models::ToolTextEditor20250429} for more details.
28
+ #
29
+ # @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
30
+ #
31
+ # @param name [Symbol, :str_replace_based_edit_tool] Name of the tool.
32
+ #
33
+ # @param type [Symbol, :text_editor_20250429]
34
+ end
35
+ end
36
+ end