anthropic 1.49.0 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +1 -1
- data/lib/anthropic/helpers/stainless_helper_header.rb +43 -0
- data/lib/anthropic/helpers/tools/runner.rb +8 -4
- data/lib/anthropic/internal/stream.rb +1 -1
- data/lib/anthropic/internal/util.rb +18 -9
- data/lib/anthropic/models/beta/agent_create_params.rb +3 -1
- data/lib/anthropic/models/beta/agent_update_params.rb +6 -3
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +6 -2
- data/lib/anthropic/models/beta/beta_fallback_refusal_trigger.rb +1 -0
- data/lib/anthropic/models/beta/beta_refusal_stop_details.rb +1 -0
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260318.rb +167 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20260318.rb +150 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +30 -14
- data/lib/anthropic/models/beta/message_create_params.rb +32 -26
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +41 -30
- data/lib/anthropic/models/cache_control_ephemeral.rb +6 -2
- data/lib/anthropic/models/completion_create_params.rb +4 -2
- data/lib/anthropic/models/message_count_tokens_params.rb +25 -13
- data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
- data/lib/anthropic/models/message_create_params.rb +32 -17
- data/lib/anthropic/models/messages/batch_create_params.rb +40 -20
- data/lib/anthropic/models/refusal_stop_details.rb +1 -0
- data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/thinking_config_param.rb +1 -1
- data/lib/anthropic/models/tool_union.rb +5 -1
- data/lib/anthropic/models/web_fetch_tool_20260318.rb +163 -0
- data/lib/anthropic/models/web_search_tool_20260318.rb +146 -0
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +10 -8
- data/lib/anthropic/resources/beta/messages.rb +19 -17
- data/lib/anthropic/resources/completions.rb +4 -4
- data/lib/anthropic/resources/messages/batches.rb +13 -9
- data/lib/anthropic/resources/messages.rb +74 -54
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +5 -0
- data/rbi/anthropic/models/beta/agent_create_params.rbi +6 -2
- data/rbi/anthropic/models/beta/agent_update_params.rbi +10 -4
- data/rbi/anthropic/models/beta/beta_cache_control_ephemeral.rbi +9 -3
- data/rbi/anthropic/models/beta/beta_fallback_refusal_trigger.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_refusal_stop_details.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
- data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260318.rbi +319 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20260318.rbi +296 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +48 -19
- data/rbi/anthropic/models/beta/message_create_params.rbi +58 -36
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +75 -44
- data/rbi/anthropic/models/cache_control_ephemeral.rbi +9 -3
- data/rbi/anthropic/models/completion_create_params.rbi +8 -4
- data/rbi/anthropic/models/message_count_tokens_params.rbi +46 -19
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -0
- data/rbi/anthropic/models/message_create_params.rbi +58 -26
- data/rbi/anthropic/models/messages/batch_create_params.rbi +72 -31
- data/rbi/anthropic/models/refusal_stop_details.rbi +5 -0
- data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
- data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
- data/rbi/anthropic/models/tool_union.rbi +2 -0
- data/rbi/anthropic/models/web_fetch_tool_20260318.rbi +295 -0
- data/rbi/anthropic/models/web_search_tool_20260318.rbi +272 -0
- data/rbi/anthropic/models.rbi +4 -0
- data/rbi/anthropic/resources/beta/agents.rbi +7 -2
- data/rbi/anthropic/resources/beta/messages/batches.rbi +13 -6
- data/rbi/anthropic/resources/beta/messages.rbi +70 -44
- data/rbi/anthropic/resources/completions.rbi +12 -8
- data/rbi/anthropic/resources/messages/batches.rbi +15 -8
- data/rbi/anthropic/resources/messages.rbi +125 -88
- data/rbi/lib/anthropic/helpers/stainless_helper_header.rbi +17 -0
- data/sig/anthropic/models/beta/beta_fallback_refusal_trigger.rbs +7 -1
- data/sig/anthropic/models/beta/beta_refusal_stop_details.rbs +7 -1
- data/sig/anthropic/models/beta/beta_tool_union.rbs +2 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260318.rbs +126 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20260318.rbs +114 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +10 -1
- data/sig/anthropic/models/beta/message_create_params.rbs +8 -6
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +11 -9
- data/sig/anthropic/models/message_count_tokens_params.rbs +8 -1
- data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -0
- data/sig/anthropic/models/message_create_params.rbs +8 -1
- data/sig/anthropic/models/messages/batch_create_params.rbs +10 -1
- data/sig/anthropic/models/refusal_stop_details.rbs +7 -1
- data/sig/anthropic/models/tool_union.rbs +2 -0
- data/sig/anthropic/models/web_fetch_tool_20260318.rbs +122 -0
- data/sig/anthropic/models/web_search_tool_20260318.rbs +110 -0
- data/sig/anthropic/models.rbs +4 -0
- data/sig/anthropic/resources/beta/messages/batches.rbs +1 -0
- data/sig/anthropic/resources/beta/messages.rbs +3 -2
- data/sig/anthropic/resources/messages/batches.rbs +1 -0
- data/sig/anthropic/resources/messages.rbs +3 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a4c0796098c3ebac37542205f404f39263436276c044cd39be1662a1ded8678
|
|
4
|
+
data.tar.gz: 7ca2ad565fec49876126eb5fbe9844d4b6bafb17e458affe3bd55dd886fb3d08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c20d2fda644c967e8a35b355af2507e077e974799b9ff74c52a2541bf713aee633f5bf9a1a15313d9bed76bb17659c5c5bf7ebb423284aefa785548a9a53a2d
|
|
7
|
+
data.tar.gz: 85c59aa18c96f05734279721f01cba261791f4196e1fde65a4e6ee939ca5a8adc9ba11efae83fde00aff36e4f41cd55e8d5596c8142359343655c9d88bb7d3c7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.51.0 (2026-06-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.50.0...v1.51.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.50.0...v1.51.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for 20260318 web fetch and support tools ([bb82831](https://github.com/anthropics/anthropic-sdk-ruby/commit/bb828319b6d9b5965f45c1988c6a182c234abba7))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** merge anthropic-beta header across sources instead of overwriting ([#60](https://github.com/anthropics/anthropic-sdk-ruby/issues/60)) ([fe31ce8](https://github.com/anthropics/anthropic-sdk-ruby/commit/fe31ce853146173fcd00872b1d6dc4db50bbe23c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **api:** accept user profile ID's when counting tokens ([b5f48bb](https://github.com/anthropics/anthropic-sdk-ruby/commit/b5f48bb2236f17f0c8bca19b2722c78e40acc671))
|
|
20
|
+
* **docs:** updates to descriptions and example values ([e8c63fe](https://github.com/anthropics/anthropic-sdk-ruby/commit/e8c63fee97b136259b6f193fbe856886266096a6))
|
|
21
|
+
|
|
22
|
+
## 1.50.0 (2026-06-24)
|
|
23
|
+
|
|
24
|
+
Full Changelog: [v1.49.0...v1.50.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.49.0...v1.50.0)
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **client:** add support for system.message streaming events ([2333173](https://github.com/anthropics/anthropic-sdk-ruby/commit/23331737588b1942dfda599a04ccb23109824f80))
|
|
29
|
+
* **helpers:** single source for x-stainless-helper + tag the BetaToolRunner ([#36](https://github.com/anthropics/anthropic-sdk-ruby/issues/36)) ([95124e5](https://github.com/anthropics/anthropic-sdk-ruby/commit/95124e582c1f413b5dd05f4cc5dafecfe87b6666))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Chores
|
|
33
|
+
|
|
34
|
+
* **api:** add support for new refusal category ([9b5050f](https://github.com/anthropics/anthropic-sdk-ruby/commit/9b5050f677532d60ee8b47e08c62b3e59aacdc7b))
|
|
35
|
+
* **api:** add support for sending User Profile ID in request headers ([4a263e8](https://github.com/anthropics/anthropic-sdk-ruby/commit/4a263e8b43096c92533701eb4423c2abc21e3408))
|
|
36
|
+
|
|
3
37
|
## 1.49.0 (2026-06-18)
|
|
4
38
|
|
|
5
39
|
Full Changelog: [v1.48.2...v1.49.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.48.2...v1.49.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Helpers
|
|
5
|
+
# Single source of truth for the `x-stainless-helper` telemetry header — the
|
|
6
|
+
# key, the closed value vocabulary shared across SDKs, and the comma-append
|
|
7
|
+
# merge.
|
|
8
|
+
#
|
|
9
|
+
# @api private
|
|
10
|
+
module StainlessHelperHeader
|
|
11
|
+
# Telemetry header naming the SDK helper(s) a request came from. Always
|
|
12
|
+
# this lowercase form; header lookups are case-insensitive but a single
|
|
13
|
+
# canonical casing keeps every call site greppable.
|
|
14
|
+
HEADER = "x-stainless-helper"
|
|
15
|
+
|
|
16
|
+
# Closed value vocabulary. Existing values keep their original spellings —
|
|
17
|
+
# telemetry consumers match on them, so renames lose history. New tags are
|
|
18
|
+
# hyphenated lowercase.
|
|
19
|
+
BETA_TOOL_RUNNER = "BetaToolRunner"
|
|
20
|
+
|
|
21
|
+
class << self
|
|
22
|
+
# The {HEADER} value to set after appending `value` to whatever is
|
|
23
|
+
# already present in `headers` — existing tags keep their position, the
|
|
24
|
+
# new tag goes at the end, duplicates are dropped, joined as one
|
|
25
|
+
# comma-separated string. The backend logs the header as one opaque
|
|
26
|
+
# string, so a second header line or a clobbered value loses data.
|
|
27
|
+
#
|
|
28
|
+
# @param headers [Hash{String => String}]
|
|
29
|
+
# @param value [String]
|
|
30
|
+
# @return [String]
|
|
31
|
+
def merged_value(headers, value)
|
|
32
|
+
existing =
|
|
33
|
+
headers
|
|
34
|
+
.filter_map { |k, v| v if k.to_s.casecmp?(HEADER) }
|
|
35
|
+
.flat_map { _1.to_s.split(",") }
|
|
36
|
+
.map(&:strip)
|
|
37
|
+
.reject(&:empty?)
|
|
38
|
+
(existing + [value]).uniq.join(", ")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -25,7 +25,7 @@ module Anthropic
|
|
|
25
25
|
message = nil
|
|
26
26
|
unless finished?
|
|
27
27
|
fold do
|
|
28
|
-
message = @client.beta.messages.create(with_helper_header(_1,
|
|
28
|
+
message = @client.beta.messages.create(with_helper_header(_1, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
29
29
|
[true, message]
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -46,7 +46,7 @@ module Anthropic
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
fold do
|
|
49
|
-
message = @client.beta.messages.create(with_helper_header(_1,
|
|
49
|
+
message = @client.beta.messages.create(with_helper_header(_1, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
50
50
|
blk.call(message)
|
|
51
51
|
[false, message]
|
|
52
52
|
end
|
|
@@ -59,7 +59,7 @@ module Anthropic
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
fold do
|
|
62
|
-
stream = @client.beta.messages.stream(with_helper_header(_1,
|
|
62
|
+
stream = @client.beta.messages.stream(with_helper_header(_1, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
63
63
|
blk.call(stream)
|
|
64
64
|
[false, stream.accumulated_message]
|
|
65
65
|
ensure
|
|
@@ -260,8 +260,12 @@ module Anthropic
|
|
|
260
260
|
private def with_helper_header(params, helper)
|
|
261
261
|
options = params[:request_options] || {}
|
|
262
262
|
headers = options[:extra_headers] || {}
|
|
263
|
+
merged = StainlessHelperHeader.merged_value(headers, helper)
|
|
263
264
|
|
|
264
|
-
{
|
|
265
|
+
{
|
|
266
|
+
**params,
|
|
267
|
+
request_options: {**options, extra_headers: {**headers, StainlessHelperHeader::HEADER => merged}}
|
|
268
|
+
}
|
|
265
269
|
end
|
|
266
270
|
end
|
|
267
271
|
end
|
|
@@ -26,7 +26,7 @@ module Anthropic
|
|
|
26
26
|
unwrapped = Anthropic::Internal::Util.dig(decoded, @unwrap)
|
|
27
27
|
y << Anthropic::Internal::Type::Converter.coerce(@model, unwrapped)
|
|
28
28
|
in {
|
|
29
|
-
event: "message_start" | "message_delta" | "message_stop" | "content_block_start" | "content_block_delta" | "content_block_stop" | "message" | "user.message" | "user.interrupt" | "user.tool_confirmation" | "user.custom_tool_result" | "user.tool_result" | "agent.message" | "agent.thinking" | "agent.tool_use" | "agent.tool_result" | "agent.mcp_tool_use" | "agent.mcp_tool_result" | "agent.custom_tool_use" | "agent.thread_context_compacted" | "session.status_running" | "session.status_idle" | "session.status_rescheduled" | "session.status_terminated" | "session.error" | "session.deleted" | "session.updated" | "span.model_request_start" | "span.model_request_end" | "span.outcome_evaluation_start" | "span.outcome_evaluation_ongoing" | "span.outcome_evaluation_end" | "user.define_outcome" | "agent.thread_message_received" | "agent.thread_message_sent" | "agent.session_thread_message_received" | "agent.session_thread_message_sent" | "session.thread_created" | "session.thread_status_created" | "session.thread_status_running" | "session.thread_status_idle" | "session.thread_status_rescheduled" | "session.thread_status_terminated",
|
|
29
|
+
event: "message_start" | "message_delta" | "message_stop" | "content_block_start" | "content_block_delta" | "content_block_stop" | "message" | "user.message" | "user.interrupt" | "user.tool_confirmation" | "user.custom_tool_result" | "user.tool_result" | "agent.message" | "agent.thinking" | "agent.tool_use" | "agent.tool_result" | "agent.mcp_tool_use" | "agent.mcp_tool_result" | "agent.custom_tool_use" | "agent.thread_context_compacted" | "session.status_running" | "session.status_idle" | "session.status_rescheduled" | "session.status_terminated" | "session.error" | "session.deleted" | "session.updated" | "span.model_request_start" | "span.model_request_end" | "span.outcome_evaluation_start" | "span.outcome_evaluation_ongoing" | "span.outcome_evaluation_end" | "user.define_outcome" | "agent.thread_message_received" | "agent.thread_message_sent" | "agent.session_thread_message_received" | "agent.session_thread_message_sent" | "session.thread_created" | "session.thread_status_created" | "session.thread_status_running" | "session.thread_status_idle" | "session.thread_status_rescheduled" | "session.thread_status_terminated" | "system.message",
|
|
30
30
|
data: String => data
|
|
31
31
|
}
|
|
32
32
|
decoded = JSON.parse(data, symbolize_names: true)
|
|
@@ -412,19 +412,28 @@ module Anthropic
|
|
|
412
412
|
class << self
|
|
413
413
|
# @api private
|
|
414
414
|
#
|
|
415
|
+
# Later hashes take precedence on key collision, except `anthropic-beta`
|
|
416
|
+
# which is additive: values from every input are collected so endpoint
|
|
417
|
+
# defaults don't drop the caller's `betas:` or the client OAuth beta.
|
|
418
|
+
#
|
|
415
419
|
# @param headers [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}]
|
|
416
420
|
#
|
|
417
421
|
# @return [Hash{String=>String}]
|
|
418
422
|
def normalized_headers(*headers)
|
|
419
|
-
{}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
merged = {}
|
|
424
|
+
headers.each do |hdrs|
|
|
425
|
+
hdrs.to_h.each do |key, val|
|
|
426
|
+
k = key.to_s.downcase
|
|
427
|
+
merged[k] = k == "anthropic-beta" && merged.key?(k) ? [*merged[k], *val] : val
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
merged.transform_values do |val|
|
|
431
|
+
case val
|
|
432
|
+
in Array
|
|
433
|
+
val.filter_map { _1&.to_s&.strip }.join(", ")
|
|
434
|
+
else
|
|
435
|
+
val&.to_s&.strip
|
|
436
|
+
end
|
|
428
437
|
end
|
|
429
438
|
end
|
|
430
439
|
end
|
|
@@ -31,7 +31,9 @@ module Anthropic
|
|
|
31
31
|
|
|
32
32
|
# @!attribute mcp_servers
|
|
33
33
|
# MCP servers this agent connects to. Maximum 20. Names must be unique within the
|
|
34
|
-
# array.
|
|
34
|
+
# array. Every server must be referenced by an `mcp_toolset` in `tools`;
|
|
35
|
+
# unreferenced servers are rejected. See the
|
|
36
|
+
# [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector).
|
|
35
37
|
#
|
|
36
38
|
# @return [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil]
|
|
37
39
|
optional :mcp_servers,
|
|
@@ -28,8 +28,11 @@ module Anthropic
|
|
|
28
28
|
optional :description, String, nil?: true
|
|
29
29
|
|
|
30
30
|
# @!attribute mcp_servers
|
|
31
|
-
# MCP servers. Full replacement. Omit to preserve; send empty array or null to
|
|
32
|
-
# clear. Names must be unique. Maximum 20.
|
|
31
|
+
# MCP servers. Full replacement. Omit to preserve; send empty array or `null` to
|
|
32
|
+
# clear. Names must be unique. Maximum 20. Every server must be referenced by an
|
|
33
|
+
# `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are
|
|
34
|
+
# rejected. See the
|
|
35
|
+
# [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector).
|
|
33
36
|
#
|
|
34
37
|
# @return [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil]
|
|
35
38
|
optional :mcp_servers,
|
|
@@ -110,7 +113,7 @@ module Anthropic
|
|
|
110
113
|
#
|
|
111
114
|
# @param description [String, nil] Description. Omit to preserve; send empty string or null to clear.
|
|
112
115
|
#
|
|
113
|
-
# @param mcp_servers [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil] MCP servers. Full replacement. Omit to preserve; send empty array or null to
|
|
116
|
+
# @param mcp_servers [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil] MCP servers. Full replacement. Omit to preserve; send empty array or `null` to c
|
|
114
117
|
#
|
|
115
118
|
# @param metadata [Hash{Symbol=>String, nil}, nil] Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omi
|
|
116
119
|
#
|
|
@@ -17,7 +17,9 @@ module Anthropic
|
|
|
17
17
|
# - `5m`: 5 minutes
|
|
18
18
|
# - `1h`: 1 hour
|
|
19
19
|
#
|
|
20
|
-
# Defaults to `5m`.
|
|
20
|
+
# Defaults to `5m`. See
|
|
21
|
+
# [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
22
|
+
# for details.
|
|
21
23
|
#
|
|
22
24
|
# @return [Symbol, Anthropic::Models::Beta::BetaCacheControlEphemeral::TTL, nil]
|
|
23
25
|
optional :ttl, enum: -> { Anthropic::Beta::BetaCacheControlEphemeral::TTL }
|
|
@@ -37,7 +39,9 @@ module Anthropic
|
|
|
37
39
|
# - `5m`: 5 minutes
|
|
38
40
|
# - `1h`: 1 hour
|
|
39
41
|
#
|
|
40
|
-
# Defaults to `5m`.
|
|
42
|
+
# Defaults to `5m`. See
|
|
43
|
+
# [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
44
|
+
# for details.
|
|
41
45
|
#
|
|
42
46
|
# @see Anthropic::Models::Beta::BetaCacheControlEphemeral#ttl
|
|
43
47
|
module TTL
|
|
@@ -12,7 +12,7 @@ module Anthropic
|
|
|
12
12
|
# Must be ≥1024 and less than `max_tokens`.
|
|
13
13
|
#
|
|
14
14
|
# See
|
|
15
|
-
# [extended thinking](https://
|
|
15
|
+
# [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
16
16
|
# for details.
|
|
17
17
|
#
|
|
18
18
|
# @return [Integer]
|
|
@@ -10,7 +10,7 @@ module Anthropic
|
|
|
10
10
|
# tokens and counts towards your `max_tokens` limit.
|
|
11
11
|
#
|
|
12
12
|
# See
|
|
13
|
-
# [extended thinking](https://
|
|
13
|
+
# [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
14
14
|
# for details.
|
|
15
15
|
module BetaThinkingConfigParam
|
|
16
16
|
extend Anthropic::Internal::Type::Union
|
|
@@ -51,6 +51,10 @@ module Anthropic
|
|
|
51
51
|
# Web fetch tool with use_cache parameter for bypassing cached content.
|
|
52
52
|
variant -> { Anthropic::Beta::BetaWebFetchTool20260309 }
|
|
53
53
|
|
|
54
|
+
variant -> { Anthropic::Beta::BetaWebSearchTool20260318 }
|
|
55
|
+
|
|
56
|
+
variant -> { Anthropic::Beta::BetaWebFetchTool20260318 }
|
|
57
|
+
|
|
54
58
|
variant -> { Anthropic::Beta::BetaAdvisorTool20260301 }
|
|
55
59
|
|
|
56
60
|
variant -> { Anthropic::Beta::BetaToolSearchToolBm25_20251119 }
|
|
@@ -64,7 +68,7 @@ module Anthropic
|
|
|
64
68
|
variant -> { Anthropic::Beta::BetaMCPToolset }
|
|
65
69
|
|
|
66
70
|
# @!method self.variants
|
|
67
|
-
# @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::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
71
|
+
# @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::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset)]
|
|
68
72
|
end
|
|
69
73
|
end
|
|
70
74
|
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebFetchTool20260318 < 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, :web_fetch]
|
|
13
|
+
required :name, const: :web_fetch
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :web_fetch_20260318]
|
|
18
|
+
required :type, const: :web_fetch_20260318
|
|
19
|
+
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaWebFetchTool20260318::AllowedCaller] }
|
|
25
|
+
|
|
26
|
+
# @!attribute allowed_domains
|
|
27
|
+
# List of domains to allow fetching from
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<String>, nil]
|
|
30
|
+
optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute blocked_domains
|
|
33
|
+
# List of domains to block fetching from
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<String>, nil]
|
|
36
|
+
optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute cache_control
|
|
39
|
+
# Create a cache control breakpoint at this content block.
|
|
40
|
+
#
|
|
41
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
42
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute citations
|
|
45
|
+
# Citations configuration for fetched documents. Citations are disabled by
|
|
46
|
+
# default.
|
|
47
|
+
#
|
|
48
|
+
# @return [Anthropic::Models::Beta::BetaCitationsConfigParam, nil]
|
|
49
|
+
optional :citations, -> { Anthropic::Beta::BetaCitationsConfigParam }, nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute defer_loading
|
|
52
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
53
|
+
# returned via tool_reference from tool search.
|
|
54
|
+
#
|
|
55
|
+
# @return [Boolean, nil]
|
|
56
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
57
|
+
|
|
58
|
+
# @!attribute max_content_tokens
|
|
59
|
+
# Maximum number of tokens used by including web page text content in the context.
|
|
60
|
+
# The limit is approximate and does not apply to binary content such as PDFs.
|
|
61
|
+
#
|
|
62
|
+
# @return [Integer, nil]
|
|
63
|
+
optional :max_content_tokens, Integer, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute max_uses
|
|
66
|
+
# Maximum number of times the tool can be used in the API request.
|
|
67
|
+
#
|
|
68
|
+
# @return [Integer, nil]
|
|
69
|
+
optional :max_uses, Integer, nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute response_inclusion
|
|
72
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
73
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
74
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
75
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
76
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
77
|
+
# sent back on the next turn.
|
|
78
|
+
#
|
|
79
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::ResponseInclusion, nil]
|
|
80
|
+
optional :response_inclusion, enum: -> { Anthropic::Beta::BetaWebFetchTool20260318::ResponseInclusion }
|
|
81
|
+
|
|
82
|
+
# @!attribute strict
|
|
83
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
84
|
+
#
|
|
85
|
+
# @return [Boolean, nil]
|
|
86
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
87
|
+
|
|
88
|
+
# @!attribute use_cache
|
|
89
|
+
# Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
90
|
+
# content. Only set to false when the user explicitly requests fresh content or
|
|
91
|
+
# when fetching rapidly-changing sources.
|
|
92
|
+
#
|
|
93
|
+
# @return [Boolean, nil]
|
|
94
|
+
optional :use_cache, Anthropic::Internal::Type::Boolean
|
|
95
|
+
|
|
96
|
+
# @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, defer_loading: nil, max_content_tokens: nil, max_uses: nil, response_inclusion: nil, strict: nil, use_cache: nil, name: :web_fetch, type: :web_fetch_20260318)
|
|
97
|
+
# Some parameter documentations has been truncated, see
|
|
98
|
+
# {Anthropic::Models::Beta::BetaWebFetchTool20260318} for more details.
|
|
99
|
+
#
|
|
100
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::AllowedCaller>]
|
|
101
|
+
#
|
|
102
|
+
# @param allowed_domains [Array<String>, nil] List of domains to allow fetching from
|
|
103
|
+
#
|
|
104
|
+
# @param blocked_domains [Array<String>, nil] List of domains to block fetching from
|
|
105
|
+
#
|
|
106
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
107
|
+
#
|
|
108
|
+
# @param citations [Anthropic::Models::Beta::BetaCitationsConfigParam, nil] Citations configuration for fetched documents. Citations are disabled by default
|
|
109
|
+
#
|
|
110
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
111
|
+
#
|
|
112
|
+
# @param max_content_tokens [Integer, nil] Maximum number of tokens used by including web page text content in the context.
|
|
113
|
+
#
|
|
114
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
|
115
|
+
#
|
|
116
|
+
# @param response_inclusion [Symbol, Anthropic::Models::Beta::BetaWebFetchTool20260318::ResponseInclusion] How this tool's result blocks appear in the API response when the result was con
|
|
117
|
+
#
|
|
118
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
119
|
+
#
|
|
120
|
+
# @param use_cache [Boolean] Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
121
|
+
#
|
|
122
|
+
# @param name [Symbol, :web_fetch] Name of the tool.
|
|
123
|
+
#
|
|
124
|
+
# @param type [Symbol, :web_fetch_20260318]
|
|
125
|
+
|
|
126
|
+
# Specifies who can invoke a tool.
|
|
127
|
+
#
|
|
128
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
129
|
+
# The tool can be called from the code execution environment (v1).
|
|
130
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
131
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
132
|
+
# called from the code execution environment (v2 with persistence).
|
|
133
|
+
module AllowedCaller
|
|
134
|
+
extend Anthropic::Internal::Type::Enum
|
|
135
|
+
|
|
136
|
+
DIRECT = :direct
|
|
137
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
138
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
139
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
140
|
+
|
|
141
|
+
# @!method self.values
|
|
142
|
+
# @return [Array<Symbol>]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
146
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
147
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
148
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
149
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
150
|
+
# sent back on the next turn.
|
|
151
|
+
#
|
|
152
|
+
# @see Anthropic::Models::Beta::BetaWebFetchTool20260318#response_inclusion
|
|
153
|
+
module ResponseInclusion
|
|
154
|
+
extend Anthropic::Internal::Type::Enum
|
|
155
|
+
|
|
156
|
+
FULL = :full
|
|
157
|
+
EXCLUDED = :excluded
|
|
158
|
+
|
|
159
|
+
# @!method self.values
|
|
160
|
+
# @return [Array<Symbol>]
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
BetaWebFetchTool20260318 = Beta::BetaWebFetchTool20260318
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaWebSearchTool20260318 < 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, :web_search]
|
|
13
|
+
required :name, const: :web_search
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :web_search_20260318]
|
|
18
|
+
required :type, const: :web_search_20260318
|
|
19
|
+
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaWebSearchTool20260318::AllowedCaller] }
|
|
25
|
+
|
|
26
|
+
# @!attribute allowed_domains
|
|
27
|
+
# If provided, only these domains will be included in results. Cannot be used
|
|
28
|
+
# alongside `blocked_domains`.
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<String>, nil]
|
|
31
|
+
optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute blocked_domains
|
|
34
|
+
# If provided, these domains will never appear in results. Cannot be used
|
|
35
|
+
# alongside `allowed_domains`.
|
|
36
|
+
#
|
|
37
|
+
# @return [Array<String>, nil]
|
|
38
|
+
optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute cache_control
|
|
41
|
+
# Create a cache control breakpoint at this content block.
|
|
42
|
+
#
|
|
43
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
44
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute defer_loading
|
|
47
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
48
|
+
# returned via tool_reference from tool search.
|
|
49
|
+
#
|
|
50
|
+
# @return [Boolean, nil]
|
|
51
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
52
|
+
|
|
53
|
+
# @!attribute max_uses
|
|
54
|
+
# Maximum number of times the tool can be used in the API request.
|
|
55
|
+
#
|
|
56
|
+
# @return [Integer, nil]
|
|
57
|
+
optional :max_uses, Integer, nil?: true
|
|
58
|
+
|
|
59
|
+
# @!attribute response_inclusion
|
|
60
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
61
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
62
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
63
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
64
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
65
|
+
# sent back on the next turn.
|
|
66
|
+
#
|
|
67
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::ResponseInclusion, nil]
|
|
68
|
+
optional :response_inclusion, enum: -> { Anthropic::Beta::BetaWebSearchTool20260318::ResponseInclusion }
|
|
69
|
+
|
|
70
|
+
# @!attribute strict
|
|
71
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
72
|
+
#
|
|
73
|
+
# @return [Boolean, nil]
|
|
74
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
75
|
+
|
|
76
|
+
# @!attribute user_location
|
|
77
|
+
# Parameters for the user's location. Used to provide more relevant search
|
|
78
|
+
# results.
|
|
79
|
+
#
|
|
80
|
+
# @return [Anthropic::Models::Beta::BetaUserLocation, nil]
|
|
81
|
+
optional :user_location, -> { Anthropic::Beta::BetaUserLocation }, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, defer_loading: nil, max_uses: nil, response_inclusion: nil, strict: nil, user_location: nil, name: :web_search, type: :web_search_20260318)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {Anthropic::Models::Beta::BetaWebSearchTool20260318} for more details.
|
|
86
|
+
#
|
|
87
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::AllowedCaller>]
|
|
88
|
+
#
|
|
89
|
+
# @param allowed_domains [Array<String>, nil] If provided, only these domains will be included in results. Cannot be used alon
|
|
90
|
+
#
|
|
91
|
+
# @param blocked_domains [Array<String>, nil] If provided, these domains will never appear in results. Cannot be used alongsid
|
|
92
|
+
#
|
|
93
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
94
|
+
#
|
|
95
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
96
|
+
#
|
|
97
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
|
98
|
+
#
|
|
99
|
+
# @param response_inclusion [Symbol, Anthropic::Models::Beta::BetaWebSearchTool20260318::ResponseInclusion] How this tool's result blocks appear in the API response when the result was con
|
|
100
|
+
#
|
|
101
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
102
|
+
#
|
|
103
|
+
# @param user_location [Anthropic::Models::Beta::BetaUserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
|
|
104
|
+
#
|
|
105
|
+
# @param name [Symbol, :web_search] Name of the tool.
|
|
106
|
+
#
|
|
107
|
+
# @param type [Symbol, :web_search_20260318]
|
|
108
|
+
|
|
109
|
+
# Specifies who can invoke a tool.
|
|
110
|
+
#
|
|
111
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
112
|
+
# The tool can be called from the code execution environment (v1).
|
|
113
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
114
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
115
|
+
# called from the code execution environment (v2 with persistence).
|
|
116
|
+
module AllowedCaller
|
|
117
|
+
extend Anthropic::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
DIRECT = :direct
|
|
120
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
121
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
122
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
123
|
+
|
|
124
|
+
# @!method self.values
|
|
125
|
+
# @return [Array<Symbol>]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# How this tool's result blocks appear in the API response when the result was
|
|
129
|
+
# consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
130
|
+
# complete content (default). 'excluded' drops the nested server_tool_use and
|
|
131
|
+
# result block pair entirely. Results from direct calls, or from code_execution
|
|
132
|
+
# calls that paused before completing, are always returned in full so they can be
|
|
133
|
+
# sent back on the next turn.
|
|
134
|
+
#
|
|
135
|
+
# @see Anthropic::Models::Beta::BetaWebSearchTool20260318#response_inclusion
|
|
136
|
+
module ResponseInclusion
|
|
137
|
+
extend Anthropic::Internal::Type::Enum
|
|
138
|
+
|
|
139
|
+
FULL = :full
|
|
140
|
+
EXCLUDED = :excluded
|
|
141
|
+
|
|
142
|
+
# @!method self.values
|
|
143
|
+
# @return [Array<Symbol>]
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
BetaWebSearchTool20260318 = Beta::BetaWebSearchTool20260318
|
|
149
|
+
end
|
|
150
|
+
end
|