anthropic 1.8.0 → 1.9.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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/util.rb +1 -1
  5. data/lib/anthropic/models/beta/beta_citation_config.rb +19 -0
  6. data/lib/anthropic/models/beta/beta_content_block.rb +3 -1
  7. data/lib/anthropic/models/beta/beta_content_block_param.rb +3 -1
  8. data/lib/anthropic/models/beta/beta_document_block.rb +56 -0
  9. data/lib/anthropic/models/beta/beta_message.rb +2 -2
  10. data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
  11. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
  12. data/lib/anthropic/models/beta/beta_request_document_block.rb +2 -2
  13. data/lib/anthropic/models/beta/beta_server_tool_usage.rb +9 -1
  14. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +1 -0
  15. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +1 -0
  16. data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +6 -4
  17. data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
  18. data/lib/anthropic/models/beta/beta_web_fetch_block.rb +42 -0
  19. data/lib/anthropic/models/beta/beta_web_fetch_block_param.rb +42 -0
  20. data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +82 -0
  21. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +43 -0
  22. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +53 -0
  23. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb +25 -0
  24. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb +25 -0
  25. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb +25 -0
  26. data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
  27. data/lib/anthropic/models/beta/message_create_params.rb +2 -2
  28. data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
  29. data/lib/anthropic/models/document_block_param.rb +2 -2
  30. data/lib/anthropic/models/tool_result_block_param.rb +6 -4
  31. data/lib/anthropic/resources/beta/messages.rb +3 -3
  32. data/lib/anthropic/version.rb +1 -1
  33. data/lib/anthropic.rb +10 -0
  34. data/rbi/anthropic/models/beta/beta_citation_config.rbi +30 -0
  35. data/rbi/anthropic/models/beta/beta_content_block.rbi +1 -0
  36. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +1 -0
  37. data/rbi/anthropic/models/beta/beta_document_block.rbi +95 -0
  38. data/rbi/anthropic/models/beta/beta_message.rbi +1 -0
  39. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
  40. data/rbi/anthropic/models/beta/beta_request_document_block.rbi +5 -3
  41. data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +17 -2
  42. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +5 -0
  43. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +5 -0
  44. data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +2 -1
  45. data/rbi/anthropic/models/beta/beta_tool_union.rbi +2 -1
  46. data/rbi/anthropic/models/beta/beta_web_fetch_block.rbi +67 -0
  47. data/rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi +71 -0
  48. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +125 -0
  49. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +81 -0
  50. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +109 -0
  51. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi +51 -0
  52. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi +50 -0
  53. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi +70 -0
  54. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +10 -5
  55. data/rbi/anthropic/models/beta/message_create_params.rbi +8 -4
  56. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +8 -4
  57. data/rbi/anthropic/models/document_block_param.rbi +7 -3
  58. data/rbi/anthropic/models/tool_result_block_param.rbi +2 -1
  59. data/rbi/anthropic/resources/beta/messages.rbi +6 -3
  60. data/sig/anthropic/models/beta/beta_citation_config.rbs +17 -0
  61. data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
  62. data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
  63. data/sig/anthropic/models/beta/beta_document_block.rbs +49 -0
  64. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
  65. data/sig/anthropic/models/beta/beta_request_document_block.rbs +4 -8
  66. data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +12 -3
  67. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +2 -0
  68. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +2 -0
  69. data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +1 -0
  70. data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
  71. data/sig/anthropic/models/beta/beta_web_fetch_block.rbs +39 -0
  72. data/sig/anthropic/models/beta/beta_web_fetch_block_param.rbs +39 -0
  73. data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +59 -0
  74. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +44 -0
  75. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +49 -0
  76. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs +29 -0
  77. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs +29 -0
  78. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs +32 -0
  79. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
  80. data/sig/anthropic/models/document_block_param.rbs +4 -8
  81. data/sig/anthropic/models/tool_result_block_param.rbs +1 -0
  82. metadata +32 -2
@@ -0,0 +1,71 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchBlockParam = Beta::BetaWebFetchBlockParam
6
+
7
+ module Beta
8
+ class BetaWebFetchBlockParam < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaWebFetchBlockParam,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Anthropic::Beta::BetaRequestDocumentBlock) }
18
+ attr_reader :content
19
+
20
+ sig do
21
+ params(
22
+ content: Anthropic::Beta::BetaRequestDocumentBlock::OrHash
23
+ ).void
24
+ end
25
+ attr_writer :content
26
+
27
+ sig { returns(Symbol) }
28
+ attr_accessor :type
29
+
30
+ # Fetched content URL
31
+ sig { returns(String) }
32
+ attr_accessor :url
33
+
34
+ # ISO 8601 timestamp when the content was retrieved
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :retrieved_at
37
+
38
+ sig do
39
+ params(
40
+ content: Anthropic::Beta::BetaRequestDocumentBlock::OrHash,
41
+ url: String,
42
+ retrieved_at: T.nilable(String),
43
+ type: Symbol
44
+ ).returns(T.attached_class)
45
+ end
46
+ def self.new(
47
+ content:,
48
+ # Fetched content URL
49
+ url:,
50
+ # ISO 8601 timestamp when the content was retrieved
51
+ retrieved_at: nil,
52
+ type: :web_fetch_result
53
+ )
54
+ end
55
+
56
+ sig do
57
+ override.returns(
58
+ {
59
+ content: Anthropic::Beta::BetaRequestDocumentBlock,
60
+ type: Symbol,
61
+ url: String,
62
+ retrieved_at: T.nilable(String)
63
+ }
64
+ )
65
+ end
66
+ def to_hash
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,125 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchTool20250910 = Beta::BetaWebFetchTool20250910
6
+
7
+ module Beta
8
+ class BetaWebFetchTool20250910 < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaWebFetchTool20250910,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Name of the tool.
18
+ #
19
+ # This is how the tool will be called by the model and in `tool_use` blocks.
20
+ sig { returns(Symbol) }
21
+ attr_accessor :name
22
+
23
+ sig { returns(Symbol) }
24
+ attr_accessor :type
25
+
26
+ # List of domains to allow fetching from
27
+ sig { returns(T.nilable(T::Array[String])) }
28
+ attr_accessor :allowed_domains
29
+
30
+ # List of domains to block fetching from
31
+ sig { returns(T.nilable(T::Array[String])) }
32
+ attr_accessor :blocked_domains
33
+
34
+ # Create a cache control breakpoint at this content block.
35
+ sig { returns(T.nilable(Anthropic::Beta::BetaCacheControlEphemeral)) }
36
+ attr_reader :cache_control
37
+
38
+ sig do
39
+ params(
40
+ cache_control:
41
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash)
42
+ ).void
43
+ end
44
+ attr_writer :cache_control
45
+
46
+ # Citations configuration for fetched documents. Citations are disabled by
47
+ # default.
48
+ sig { returns(T.nilable(Anthropic::Beta::BetaCitationsConfigParam)) }
49
+ attr_reader :citations
50
+
51
+ sig do
52
+ params(
53
+ citations:
54
+ T.nilable(Anthropic::Beta::BetaCitationsConfigParam::OrHash)
55
+ ).void
56
+ end
57
+ attr_writer :citations
58
+
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
+ sig { returns(T.nilable(Integer)) }
62
+ attr_accessor :max_content_tokens
63
+
64
+ # Maximum number of times the tool can be used in the API request.
65
+ sig { returns(T.nilable(Integer)) }
66
+ attr_accessor :max_uses
67
+
68
+ sig do
69
+ params(
70
+ allowed_domains: T.nilable(T::Array[String]),
71
+ blocked_domains: T.nilable(T::Array[String]),
72
+ cache_control:
73
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
74
+ citations:
75
+ T.nilable(Anthropic::Beta::BetaCitationsConfigParam::OrHash),
76
+ max_content_tokens: T.nilable(Integer),
77
+ max_uses: T.nilable(Integer),
78
+ name: Symbol,
79
+ type: Symbol
80
+ ).returns(T.attached_class)
81
+ end
82
+ def self.new(
83
+ # List of domains to allow fetching from
84
+ allowed_domains: nil,
85
+ # List of domains to block fetching from
86
+ blocked_domains: nil,
87
+ # Create a cache control breakpoint at this content block.
88
+ cache_control: nil,
89
+ # Citations configuration for fetched documents. Citations are disabled by
90
+ # default.
91
+ citations: nil,
92
+ # Maximum number of tokens used by including web page text content in the context.
93
+ # The limit is approximate and does not apply to binary content such as PDFs.
94
+ max_content_tokens: nil,
95
+ # Maximum number of times the tool can be used in the API request.
96
+ max_uses: nil,
97
+ # Name of the tool.
98
+ #
99
+ # This is how the tool will be called by the model and in `tool_use` blocks.
100
+ name: :web_fetch,
101
+ type: :web_fetch_20250910
102
+ )
103
+ end
104
+
105
+ sig do
106
+ override.returns(
107
+ {
108
+ name: Symbol,
109
+ type: Symbol,
110
+ allowed_domains: T.nilable(T::Array[String]),
111
+ blocked_domains: T.nilable(T::Array[String]),
112
+ cache_control:
113
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral),
114
+ citations: T.nilable(Anthropic::Beta::BetaCitationsConfigParam),
115
+ max_content_tokens: T.nilable(Integer),
116
+ max_uses: T.nilable(Integer)
117
+ }
118
+ )
119
+ end
120
+ def to_hash
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,81 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchToolResultBlock = Beta::BetaWebFetchToolResultBlock
6
+
7
+ module Beta
8
+ class BetaWebFetchToolResultBlock < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaWebFetchToolResultBlock,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ returns(
19
+ Anthropic::Beta::BetaWebFetchToolResultBlock::Content::Variants
20
+ )
21
+ end
22
+ attr_accessor :content
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :tool_use_id
26
+
27
+ sig { returns(Symbol) }
28
+ attr_accessor :type
29
+
30
+ sig do
31
+ params(
32
+ content:
33
+ T.any(
34
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlock::OrHash,
35
+ Anthropic::Beta::BetaWebFetchBlock::OrHash
36
+ ),
37
+ tool_use_id: String,
38
+ type: Symbol
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(content:, tool_use_id:, type: :web_fetch_tool_result)
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ content:
48
+ Anthropic::Beta::BetaWebFetchToolResultBlock::Content::Variants,
49
+ tool_use_id: String,
50
+ type: Symbol
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+
57
+ module Content
58
+ extend Anthropic::Internal::Type::Union
59
+
60
+ Variants =
61
+ T.type_alias do
62
+ T.any(
63
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlock,
64
+ Anthropic::Beta::BetaWebFetchBlock
65
+ )
66
+ end
67
+
68
+ sig do
69
+ override.returns(
70
+ T::Array[
71
+ Anthropic::Beta::BetaWebFetchToolResultBlock::Content::Variants
72
+ ]
73
+ )
74
+ end
75
+ def self.variants
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,109 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchToolResultBlockParam = Beta::BetaWebFetchToolResultBlockParam
6
+
7
+ module Beta
8
+ class BetaWebFetchToolResultBlockParam < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaWebFetchToolResultBlockParam,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ returns(
19
+ T.any(
20
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlockParam,
21
+ Anthropic::Beta::BetaWebFetchBlockParam
22
+ )
23
+ )
24
+ end
25
+ attr_accessor :content
26
+
27
+ sig { returns(String) }
28
+ attr_accessor :tool_use_id
29
+
30
+ sig { returns(Symbol) }
31
+ attr_accessor :type
32
+
33
+ # Create a cache control breakpoint at this content block.
34
+ sig { returns(T.nilable(Anthropic::Beta::BetaCacheControlEphemeral)) }
35
+ attr_reader :cache_control
36
+
37
+ sig do
38
+ params(
39
+ cache_control:
40
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash)
41
+ ).void
42
+ end
43
+ attr_writer :cache_control
44
+
45
+ sig do
46
+ params(
47
+ content:
48
+ T.any(
49
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlockParam::OrHash,
50
+ Anthropic::Beta::BetaWebFetchBlockParam::OrHash
51
+ ),
52
+ tool_use_id: String,
53
+ cache_control:
54
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
55
+ type: Symbol
56
+ ).returns(T.attached_class)
57
+ end
58
+ def self.new(
59
+ content:,
60
+ tool_use_id:,
61
+ # Create a cache control breakpoint at this content block.
62
+ cache_control: nil,
63
+ type: :web_fetch_tool_result
64
+ )
65
+ end
66
+
67
+ sig do
68
+ override.returns(
69
+ {
70
+ content:
71
+ T.any(
72
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlockParam,
73
+ Anthropic::Beta::BetaWebFetchBlockParam
74
+ ),
75
+ tool_use_id: String,
76
+ type: Symbol,
77
+ cache_control:
78
+ T.nilable(Anthropic::Beta::BetaCacheControlEphemeral)
79
+ }
80
+ )
81
+ end
82
+ def to_hash
83
+ end
84
+
85
+ module Content
86
+ extend Anthropic::Internal::Type::Union
87
+
88
+ Variants =
89
+ T.type_alias do
90
+ T.any(
91
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlockParam,
92
+ Anthropic::Beta::BetaWebFetchBlockParam
93
+ )
94
+ end
95
+
96
+ sig do
97
+ override.returns(
98
+ T::Array[
99
+ Anthropic::Beta::BetaWebFetchToolResultBlockParam::Content::Variants
100
+ ]
101
+ )
102
+ end
103
+ def self.variants
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,51 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchToolResultErrorBlock = Beta::BetaWebFetchToolResultErrorBlock
6
+
7
+ module Beta
8
+ class BetaWebFetchToolResultErrorBlock < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlock,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ returns(
19
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
20
+ )
21
+ end
22
+ attr_accessor :error_code
23
+
24
+ sig { returns(Symbol) }
25
+ attr_accessor :type
26
+
27
+ sig do
28
+ params(
29
+ error_code:
30
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::OrSymbol,
31
+ type: Symbol
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(error_code:, type: :web_fetch_tool_result_error)
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ {
40
+ error_code:
41
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol,
42
+ type: Symbol
43
+ }
44
+ )
45
+ end
46
+ def to_hash
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,50 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchToolResultErrorBlockParam =
6
+ Beta::BetaWebFetchToolResultErrorBlockParam
7
+
8
+ module Beta
9
+ class BetaWebFetchToolResultErrorBlockParam < Anthropic::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::BetaWebFetchToolResultErrorBlockParam,
14
+ Anthropic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig do
19
+ returns(Anthropic::Beta::BetaWebFetchToolResultErrorCode::OrSymbol)
20
+ end
21
+ attr_accessor :error_code
22
+
23
+ sig { returns(Symbol) }
24
+ attr_accessor :type
25
+
26
+ sig do
27
+ params(
28
+ error_code:
29
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::OrSymbol,
30
+ type: Symbol
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(error_code:, type: :web_fetch_tool_result_error)
34
+ end
35
+
36
+ sig do
37
+ override.returns(
38
+ {
39
+ error_code:
40
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::OrSymbol,
41
+ type: Symbol
42
+ }
43
+ )
44
+ end
45
+ def to_hash
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,70 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaWebFetchToolResultErrorCode = Beta::BetaWebFetchToolResultErrorCode
6
+
7
+ module Beta
8
+ module BetaWebFetchToolResultErrorCode
9
+ extend Anthropic::Internal::Type::Enum
10
+
11
+ TaggedSymbol =
12
+ T.type_alias do
13
+ T.all(Symbol, Anthropic::Beta::BetaWebFetchToolResultErrorCode)
14
+ end
15
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
16
+
17
+ INVALID_TOOL_INPUT =
18
+ T.let(
19
+ :invalid_tool_input,
20
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
21
+ )
22
+ URL_TOO_LONG =
23
+ T.let(
24
+ :url_too_long,
25
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
26
+ )
27
+ URL_NOT_ALLOWED =
28
+ T.let(
29
+ :url_not_allowed,
30
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
31
+ )
32
+ URL_NOT_ACCESSIBLE =
33
+ T.let(
34
+ :url_not_accessible,
35
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
36
+ )
37
+ UNSUPPORTED_CONTENT_TYPE =
38
+ T.let(
39
+ :unsupported_content_type,
40
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
41
+ )
42
+ TOO_MANY_REQUESTS =
43
+ T.let(
44
+ :too_many_requests,
45
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
46
+ )
47
+ MAX_USES_EXCEEDED =
48
+ T.let(
49
+ :max_uses_exceeded,
50
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
51
+ )
52
+ UNAVAILABLE =
53
+ T.let(
54
+ :unavailable,
55
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
56
+ )
57
+
58
+ sig do
59
+ override.returns(
60
+ T::Array[
61
+ Anthropic::Beta::BetaWebFetchToolResultErrorCode::TaggedSymbol
62
+ ]
63
+ )
64
+ end
65
+ def self.values
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -282,7 +282,8 @@ module Anthropic
282
282
  Anthropic::Beta::BetaToolTextEditor20250124,
283
283
  Anthropic::Beta::BetaToolTextEditor20250429,
284
284
  Anthropic::Beta::BetaToolTextEditor20250728,
285
- Anthropic::Beta::BetaWebSearchTool20250305
285
+ Anthropic::Beta::BetaWebSearchTool20250305,
286
+ Anthropic::Beta::BetaWebFetchTool20250910
286
287
  )
287
288
  ]
288
289
  )
@@ -306,7 +307,8 @@ module Anthropic
306
307
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
307
308
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
308
309
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
309
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
310
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
311
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
310
312
  )
311
313
  ]
312
314
  ).void
@@ -366,7 +368,8 @@ module Anthropic
366
368
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
367
369
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
368
370
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
369
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
371
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
372
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
370
373
  )
371
374
  ],
372
375
  betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
@@ -582,7 +585,8 @@ module Anthropic
582
585
  Anthropic::Beta::BetaToolTextEditor20250124,
583
586
  Anthropic::Beta::BetaToolTextEditor20250429,
584
587
  Anthropic::Beta::BetaToolTextEditor20250728,
585
- Anthropic::Beta::BetaWebSearchTool20250305
588
+ Anthropic::Beta::BetaWebSearchTool20250305,
589
+ Anthropic::Beta::BetaWebFetchTool20250910
586
590
  )
587
591
  ],
588
592
  betas:
@@ -643,7 +647,8 @@ module Anthropic
643
647
  Anthropic::Beta::BetaToolTextEditor20250124,
644
648
  Anthropic::Beta::BetaToolTextEditor20250429,
645
649
  Anthropic::Beta::BetaToolTextEditor20250728,
646
- Anthropic::Beta::BetaWebSearchTool20250305
650
+ Anthropic::Beta::BetaWebSearchTool20250305,
651
+ Anthropic::Beta::BetaWebFetchTool20250910
647
652
  )
648
653
  end
649
654
 
@@ -352,7 +352,8 @@ module Anthropic
352
352
  Anthropic::Beta::BetaToolTextEditor20250124,
353
353
  Anthropic::Beta::BetaToolTextEditor20250429,
354
354
  Anthropic::Beta::BetaToolTextEditor20250728,
355
- Anthropic::Beta::BetaWebSearchTool20250305
355
+ Anthropic::Beta::BetaWebSearchTool20250305,
356
+ Anthropic::Beta::BetaWebFetchTool20250910
356
357
  )
357
358
  ]
358
359
  )
@@ -376,7 +377,8 @@ module Anthropic
376
377
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
377
378
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
378
379
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
379
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
380
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
381
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
380
382
  )
381
383
  ]
382
384
  ).void
@@ -470,7 +472,8 @@ module Anthropic
470
472
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
471
473
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
472
474
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
473
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
475
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
476
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
474
477
  )
475
478
  ],
476
479
  top_k: Integer,
@@ -749,7 +752,8 @@ module Anthropic
749
752
  Anthropic::Beta::BetaToolTextEditor20250124,
750
753
  Anthropic::Beta::BetaToolTextEditor20250429,
751
754
  Anthropic::Beta::BetaToolTextEditor20250728,
752
- Anthropic::Beta::BetaWebSearchTool20250305
755
+ Anthropic::Beta::BetaWebSearchTool20250305,
756
+ Anthropic::Beta::BetaWebFetchTool20250910
753
757
  )
754
758
  ],
755
759
  top_k: Integer,
@@ -508,7 +508,8 @@ module Anthropic
508
508
  Anthropic::Beta::BetaToolTextEditor20250124,
509
509
  Anthropic::Beta::BetaToolTextEditor20250429,
510
510
  Anthropic::Beta::BetaToolTextEditor20250728,
511
- Anthropic::Beta::BetaWebSearchTool20250305
511
+ Anthropic::Beta::BetaWebSearchTool20250305,
512
+ Anthropic::Beta::BetaWebFetchTool20250910
512
513
  )
513
514
  ]
514
515
  )
@@ -532,7 +533,8 @@ module Anthropic
532
533
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
533
534
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
534
535
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
535
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
536
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
537
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
536
538
  )
537
539
  ]
538
540
  ).void
@@ -615,7 +617,8 @@ module Anthropic
615
617
  Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
616
618
  Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
617
619
  Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
618
- Anthropic::Beta::BetaWebSearchTool20250305::OrHash
620
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
621
+ Anthropic::Beta::BetaWebFetchTool20250910::OrHash
619
622
  )
620
623
  ],
621
624
  top_k: Integer,
@@ -898,7 +901,8 @@ module Anthropic
898
901
  Anthropic::Beta::BetaToolTextEditor20250124,
899
902
  Anthropic::Beta::BetaToolTextEditor20250429,
900
903
  Anthropic::Beta::BetaToolTextEditor20250728,
901
- Anthropic::Beta::BetaWebSearchTool20250305
904
+ Anthropic::Beta::BetaWebSearchTool20250305,
905
+ Anthropic::Beta::BetaWebFetchTool20250910
902
906
  )
903
907
  ],
904
908
  top_k: Integer,