anthropic 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +5 -2
- data/lib/anthropic/helpers/bedrock/client.rb +23 -46
- data/lib/anthropic/internal/transport/base_client.rb +19 -1
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +49 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
- data/lib/anthropic/models/beta/message_create_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/citation_char_location.rb +7 -1
- data/lib/anthropic/models/citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/citation_page_location.rb +7 -1
- data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
- data/lib/anthropic/models/message_count_tokens_tool.rb +4 -34
- data/lib/anthropic/models/message_create_params.rb +2 -2
- data/lib/anthropic/models/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/model.rb +5 -0
- data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -0
- data/lib/anthropic/models/tool_text_editor_20250728.rb +45 -0
- data/lib/anthropic/models/tool_union.rb +4 -33
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/messages.rb +3 -3
- data/lib/anthropic/resources/messages.rb +3 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +3 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +5 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +4 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +4 -0
- data/rbi/anthropic/models/citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +8 -4
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -61
- data/rbi/anthropic/models/message_create_params.rbi +8 -4
- data/rbi/anthropic/models/messages/batch_create_params.rbi +8 -4
- data/rbi/anthropic/models/model.rbi +4 -0
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +62 -0
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +72 -0
- data/rbi/anthropic/models/tool_union.rbi +2 -61
- data/rbi/anthropic/models.rbi +4 -0
- data/rbi/anthropic/resources/beta/messages.rbi +3 -0
- data/rbi/anthropic/resources/messages.rbi +6 -3
- data/sig/anthropic/internal/transport/base_client.rbs +1 -1
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +39 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
- data/sig/anthropic/models/citation_char_location.rbs +5 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/citation_page_location.rbs +5 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -28
- data/sig/anthropic/models/model.rbs +4 -0
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +30 -0
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +35 -0
- data/sig/anthropic/models/tool_union.rbs +2 -28
- data/sig/anthropic/models.rbs +4 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dccfd318c0bef10694a1aa969a9d5bb6e5f0783fb3e64a0beb395622f26f5b5
|
4
|
+
data.tar.gz: 60de84ff4313a79ce191da92d5afda97111f133e90031e823d1a8951357145be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6adf3c9d40f3554544c8e7ec818c47273fc2bc1c4b0afdbc9f0f7f04c316850ec4886d6974ba3fdb91e8d9090c39a41685db95ed40e14e4be071ebd777878a2
|
7
|
+
data.tar.gz: 6f37c51597136d2038d5a648d26811e41b32e0d9ffb7acbc873852748895d8e999a882bd44439223108137d3f4ed588dbbd39900d109d075c6584d9c7897a4de
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.4.1 (2025-08-07)
|
4
|
+
|
5
|
+
Full Changelog: [v1.4.0...v1.4.1](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.4.0...v1.4.1)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* aws bedrock should sign each request follow retries ([#672](https://github.com/anthropics/anthropic-sdk-ruby/issues/672)) ([df9f4e1](https://github.com/anthropics/anthropic-sdk-ruby/commit/df9f4e1aa7e7211dab3d36dd9093092d20649359))
|
10
|
+
|
11
|
+
## 1.4.0 (2025-08-05)
|
12
|
+
|
13
|
+
Full Changelog: [v1.3.0...v1.4.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.3.0...v1.4.0)
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* **api:** add claude-opus-4-1-20250805 ([2477a05](https://github.com/anthropics/anthropic-sdk-ruby/commit/2477a05b8b26b047df178264db7d0764ca954954))
|
18
|
+
* **api:** adds support for text_editor_20250728 tool ([dff36db](https://github.com/anthropics/anthropic-sdk-ruby/commit/dff36db0eb8b7077ba311f3815eb0065422c2fd4))
|
19
|
+
* update streaming error message to say 'required' not 'recommended' ([6272ddd](https://github.com/anthropics/anthropic-sdk-ruby/commit/6272ddd9cd3ae0110afee98159516c3232c65832))
|
20
|
+
|
21
|
+
|
22
|
+
### Chores
|
23
|
+
|
24
|
+
* **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))
|
25
|
+
* **client:** add TextEditor_20250429 tool ([3b344dc](https://github.com/anthropics/anthropic-sdk-ruby/commit/3b344dcf2dc759a0a01a1061573115c7a6c8a449))
|
26
|
+
* **internal:** increase visibility of internal helper method ([72fb96c](https://github.com/anthropics/anthropic-sdk-ruby/commit/72fb96cdcdb2a6436aaf6d908f010ae16c08bd33))
|
27
|
+
|
3
28
|
## 1.3.0 (2025-07-28)
|
4
29
|
|
5
30
|
Full Changelog: [v1.2.0...v1.3.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.2.0...v1.3.0)
|
data/README.md
CHANGED
data/lib/anthropic/client.rb
CHANGED
@@ -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
|
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
|
@@ -50,10 +50,10 @@ module Anthropic
|
|
50
50
|
def initialize(
|
51
51
|
aws_region: nil,
|
52
52
|
base_url: nil,
|
53
|
-
max_retries: DEFAULT_MAX_RETRIES,
|
54
|
-
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
|
55
|
-
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
|
56
|
-
max_retry_delay: DEFAULT_MAX_RETRY_DELAY,
|
53
|
+
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
54
|
+
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
55
|
+
initial_retry_delay: self.class::DEFAULT_INITIAL_RETRY_DELAY,
|
56
|
+
max_retry_delay: self.class::DEFAULT_MAX_RETRY_DELAY,
|
57
57
|
aws_access_key: nil,
|
58
58
|
aws_secret_key: nil,
|
59
59
|
aws_session_token: nil,
|
@@ -113,56 +113,33 @@ module Anthropic
|
|
113
113
|
|
114
114
|
# @api private
|
115
115
|
#
|
116
|
-
#
|
116
|
+
# Very private API, do not use
|
117
117
|
#
|
118
|
-
#
|
118
|
+
# @param request [Hash{Symbol=>Object}] .
|
119
119
|
#
|
120
|
-
# @option
|
120
|
+
# @option request [Symbol] :method
|
121
121
|
#
|
122
|
-
# @option
|
122
|
+
# @option request [URI::Generic] :url
|
123
123
|
#
|
124
|
-
# @option
|
124
|
+
# @option request [Hash{String=>String}] :headers
|
125
125
|
#
|
126
|
-
# @option
|
126
|
+
# @option request [Object] :body
|
127
127
|
#
|
128
|
-
#
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
# @option opts [String, nil] :idempotency_key
|
139
|
-
#
|
140
|
-
# @option opts [Hash{String=>Array<String>, String, nil}, nil] :extra_query
|
141
|
-
#
|
142
|
-
# @option opts [Hash{String=>String, nil}, nil] :extra_headers
|
143
|
-
#
|
144
|
-
# @option opts [Object, nil] :extra_body
|
145
|
-
#
|
146
|
-
# @option opts [Integer, nil] :max_retries
|
147
|
-
#
|
148
|
-
# @option opts [Float, nil] :timeout
|
149
|
-
#
|
150
|
-
# @return [Hash{Symbol=>Object}]
|
151
|
-
private def build_request(req, opts)
|
152
|
-
fit_req_to_bedrock_specs!(req)
|
153
|
-
|
154
|
-
request_input = super
|
155
|
-
|
156
|
-
signed_request = @signer.sign_request(
|
157
|
-
http_method: request_input[:method],
|
158
|
-
url: request_input[:url],
|
159
|
-
headers: request_input[:headers],
|
160
|
-
body: request_input[:body]
|
161
|
-
)
|
128
|
+
# @return [Hash{Symbol, Object}]
|
129
|
+
protected def transform_request(request)
|
130
|
+
fit_req_to_bedrock_specs!(request)
|
131
|
+
sliced = super.slice(
|
132
|
+
:method,
|
133
|
+
:url,
|
134
|
+
:headers,
|
135
|
+
:body
|
136
|
+
).transform_keys(method: :http_method)
|
137
|
+
body = StringIO.new(body.to_a.join) if (body = sliced.fetch(:body)).is_a?(Enumerator)
|
162
138
|
|
163
|
-
|
139
|
+
signed = @signer.sign_request({**sliced, body: body})
|
164
140
|
|
165
|
-
|
141
|
+
headers = Anthropic::Internal::Util.normalized_headers(request.fetch(:headers), signed.headers)
|
142
|
+
{**request, headers: headers}
|
166
143
|
end
|
167
144
|
|
168
145
|
# @param aws_region [String, nil]
|
@@ -341,6 +341,23 @@ module Anthropic
|
|
341
341
|
(@initial_retry_delay * scale * jitter).clamp(0, @max_retry_delay)
|
342
342
|
end
|
343
343
|
|
344
|
+
# @api private
|
345
|
+
#
|
346
|
+
# Very private API, do not use
|
347
|
+
#
|
348
|
+
# @param request [Hash{Symbol=>Object}] .
|
349
|
+
#
|
350
|
+
# @option request [Symbol] :method
|
351
|
+
#
|
352
|
+
# @option request [URI::Generic] :url
|
353
|
+
#
|
354
|
+
# @option request [Hash{String=>String}] :headers
|
355
|
+
#
|
356
|
+
# @option request [Object] :body
|
357
|
+
#
|
358
|
+
# @return [Hash{Symbol, Object}]
|
359
|
+
protected def transform_request(request) = request
|
360
|
+
|
344
361
|
# @api private
|
345
362
|
#
|
346
363
|
# @param request [Hash{Symbol=>Object}] .
|
@@ -365,7 +382,8 @@ module Anthropic
|
|
365
382
|
#
|
366
383
|
# @raise [Anthropic::Errors::APIError]
|
367
384
|
# @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
|
368
|
-
|
385
|
+
def send_request(request, redirect_count:, retry_count:, send_retry_header:)
|
386
|
+
request = transform_request(request)
|
369
387
|
url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout)
|
370
388
|
input = {**request.except(:timeout), deadline: Anthropic::Internal::Util.monotonic_secs + timeout}
|
371
389
|
|
@@ -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::
|
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::
|
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::
|
14
|
+
variant -> { Anthropic::ToolTextEditor20250429 }
|
15
15
|
|
16
|
-
variant -> { Anthropic::
|
16
|
+
variant -> { Anthropic::ToolTextEditor20250728 }
|
17
17
|
|
18
|
-
|
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::
|
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::
|
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::
|
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::
|
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::
|
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,6 +34,8 @@ 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 }
|
@@ -89,6 +91,9 @@ module Anthropic
|
|
89
91
|
# Our most capable model
|
90
92
|
CLAUDE_4_OPUS_20250514 = :"claude-4-opus-20250514"
|
91
93
|
|
94
|
+
# Our most capable model
|
95
|
+
CLAUDE_OPUS_4_1_20250805 = :"claude-opus-4-1-20250805"
|
96
|
+
|
92
97
|
# Excels at writing and complex tasks
|
93
98
|
# @deprecated Will reach end-of-life on January 5th, 2026. Please migrate to a newer model.
|
94
99
|
# Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
|