anthropic 1.21.0 → 1.22.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0cb095656f34acdf22be107efb79087c1a80fea2d873f11010fb374d8965d7b
4
- data.tar.gz: 706ea210c80c1ba1462fa7ee93b23dd8a8067aeddbb37c0b549d7cc7402832a7
3
+ metadata.gz: a0996202a97866aa77581bea57874600ea56b6c5732a86016bcc019e81e8af9f
4
+ data.tar.gz: 8301fcd9d00b52e4debc7c379ed286009e3251dd3ec8168e69044f4b7bcfce88
5
5
  SHA512:
6
- metadata.gz: a35a161860f9e605e035c773160948f014185031108c81f108dc1b54656ae655ef9a0455d39eb79aaf1dbe4ef0a5d9c3268bd2293cd6601568efc11adff7a8f8
7
- data.tar.gz: 3259249d2d3ac3c716f6d365e71d91dab168a634dc679d256647d22d161ddce1991da94f04c47c034572d3fe63d42cc2c9be16fa22d23eb53a530995d70b44fd
6
+ metadata.gz: 7ffb5be3bb3a8396f11b911d2e48d6b444ac0699c55633492118228f21f800aceb8dc2347c01c4f2995a970657c71aa975d6f359790aa5c418dd3d8ba541be4e
7
+ data.tar.gz: d49e253f5fd6c083790d8ff878bfb8cee1e3e968b5c44dc2b370def67bb684a0bae7c756e426526157315e6590870bb35370d42bbb26a5f5472b13b6f3a34b5e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.22.0 (2026-02-18)
4
+
5
+ Full Changelog: [v1.21.0...v1.22.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.21.0...v1.22.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** fix shared UserLocation and error code types ([b1e9684](https://github.com/anthropics/anthropic-sdk-ruby/commit/b1e9684d4eb5e9af91798d8e22e28f003312ffe6))
10
+
3
11
  ## 1.21.0 (2026-02-18)
4
12
 
5
13
  Full Changelog: [v1.20.0...v1.21.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.20.0...v1.21.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.21.0"
18
+ gem "anthropic", "~> 1.22.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class UserLocation < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute type
7
+ #
8
+ # @return [Symbol, :approximate]
9
+ required :type, const: :approximate
10
+
11
+ # @!attribute city
12
+ # The city of the user.
13
+ #
14
+ # @return [String, nil]
15
+ optional :city, String, nil?: true
16
+
17
+ # @!attribute country
18
+ # The two letter
19
+ # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
20
+ # user.
21
+ #
22
+ # @return [String, nil]
23
+ optional :country, String, nil?: true
24
+
25
+ # @!attribute region
26
+ # The region of the user.
27
+ #
28
+ # @return [String, nil]
29
+ optional :region, String, nil?: true
30
+
31
+ # @!attribute timezone
32
+ # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
33
+ #
34
+ # @return [String, nil]
35
+ optional :timezone, String, nil?: true
36
+
37
+ # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate)
38
+ # Some parameter documentations has been truncated, see
39
+ # {Anthropic::Models::UserLocation} for more details.
40
+ #
41
+ # @param city [String, nil] The city of the user.
42
+ #
43
+ # @param country [String, nil] The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha
44
+ #
45
+ # @param region [String, nil] The region of the user.
46
+ #
47
+ # @param timezone [String, nil] The [IANA timezone](https://nodatime.org/TimeZones) of the user.
48
+ #
49
+ # @param type [Symbol, :approximate]
50
+ end
51
+ end
52
+ end
@@ -65,8 +65,8 @@ module Anthropic
65
65
  # Parameters for the user's location. Used to provide more relevant search
66
66
  # results.
67
67
  #
68
- # @return [Anthropic::Models::WebSearchTool20250305::UserLocation, nil]
69
- optional :user_location, -> { Anthropic::WebSearchTool20250305::UserLocation }, nil?: true
68
+ # @return [Anthropic::Models::UserLocation, nil]
69
+ optional :user_location, -> { Anthropic::UserLocation }, nil?: true
70
70
 
71
71
  # @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, defer_loading: nil, max_uses: nil, strict: nil, user_location: nil, name: :web_search, type: :web_search_20250305)
72
72
  # Some parameter documentations has been truncated, see
@@ -86,7 +86,7 @@ module Anthropic
86
86
  #
87
87
  # @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
88
88
  #
89
- # @param user_location [Anthropic::Models::WebSearchTool20250305::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
89
+ # @param user_location [Anthropic::Models::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
90
90
  #
91
91
  # @param name [Symbol, :web_search] Name of the tool.
92
92
  #
@@ -103,56 +103,8 @@ module Anthropic
103
103
  # @return [Array<Symbol>]
104
104
  end
105
105
 
106
- # @see Anthropic::Models::WebSearchTool20250305#user_location
107
- class UserLocation < Anthropic::Internal::Type::BaseModel
108
- # @!attribute type
109
- #
110
- # @return [Symbol, :approximate]
111
- required :type, const: :approximate
112
-
113
- # @!attribute city
114
- # The city of the user.
115
- #
116
- # @return [String, nil]
117
- optional :city, String, nil?: true
118
-
119
- # @!attribute country
120
- # The two letter
121
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
122
- # user.
123
- #
124
- # @return [String, nil]
125
- optional :country, String, nil?: true
126
-
127
- # @!attribute region
128
- # The region of the user.
129
- #
130
- # @return [String, nil]
131
- optional :region, String, nil?: true
132
-
133
- # @!attribute timezone
134
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
135
- #
136
- # @return [String, nil]
137
- optional :timezone, String, nil?: true
138
-
139
- # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate)
140
- # Some parameter documentations has been truncated, see
141
- # {Anthropic::Models::WebSearchTool20250305::UserLocation} for more details.
142
- #
143
- # Parameters for the user's location. Used to provide more relevant search
144
- # results.
145
- #
146
- # @param city [String, nil] The city of the user.
147
- #
148
- # @param country [String, nil] The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha
149
- #
150
- # @param region [String, nil] The region of the user.
151
- #
152
- # @param timezone [String, nil] The [IANA timezone](https://nodatime.org/TimeZones) of the user.
153
- #
154
- # @param type [Symbol, :approximate]
155
- end
106
+ # @deprecated Use {Anthropic::Models::UserLocation} instead.
107
+ UserLocation = Anthropic::Models::UserLocation
156
108
  end
157
109
  end
158
110
  end
@@ -65,8 +65,8 @@ module Anthropic
65
65
  # Parameters for the user's location. Used to provide more relevant search
66
66
  # results.
67
67
  #
68
- # @return [Anthropic::Models::WebSearchTool20260209::UserLocation, nil]
69
- optional :user_location, -> { Anthropic::WebSearchTool20260209::UserLocation }, nil?: true
68
+ # @return [Anthropic::Models::UserLocation, nil]
69
+ optional :user_location, -> { Anthropic::UserLocation }, nil?: true
70
70
 
71
71
  # @!method initialize(allowed_callers: nil, allowed_domains: nil, blocked_domains: nil, cache_control: nil, defer_loading: nil, max_uses: nil, strict: nil, user_location: nil, name: :web_search, type: :web_search_20260209)
72
72
  # Some parameter documentations has been truncated, see
@@ -86,7 +86,7 @@ module Anthropic
86
86
  #
87
87
  # @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
88
88
  #
89
- # @param user_location [Anthropic::Models::WebSearchTool20260209::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
89
+ # @param user_location [Anthropic::Models::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
90
90
  #
91
91
  # @param name [Symbol, :web_search] Name of the tool.
92
92
  #
@@ -103,56 +103,8 @@ module Anthropic
103
103
  # @return [Array<Symbol>]
104
104
  end
105
105
 
106
- # @see Anthropic::Models::WebSearchTool20260209#user_location
107
- class UserLocation < Anthropic::Internal::Type::BaseModel
108
- # @!attribute type
109
- #
110
- # @return [Symbol, :approximate]
111
- required :type, const: :approximate
112
-
113
- # @!attribute city
114
- # The city of the user.
115
- #
116
- # @return [String, nil]
117
- optional :city, String, nil?: true
118
-
119
- # @!attribute country
120
- # The two letter
121
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
122
- # user.
123
- #
124
- # @return [String, nil]
125
- optional :country, String, nil?: true
126
-
127
- # @!attribute region
128
- # The region of the user.
129
- #
130
- # @return [String, nil]
131
- optional :region, String, nil?: true
132
-
133
- # @!attribute timezone
134
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
135
- #
136
- # @return [String, nil]
137
- optional :timezone, String, nil?: true
138
-
139
- # @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate)
140
- # Some parameter documentations has been truncated, see
141
- # {Anthropic::Models::WebSearchTool20260209::UserLocation} for more details.
142
- #
143
- # Parameters for the user's location. Used to provide more relevant search
144
- # results.
145
- #
146
- # @param city [String, nil] The city of the user.
147
- #
148
- # @param country [String, nil] The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha
149
- #
150
- # @param region [String, nil] The region of the user.
151
- #
152
- # @param timezone [String, nil] The [IANA timezone](https://nodatime.org/TimeZones) of the user.
153
- #
154
- # @param type [Symbol, :approximate]
155
- end
106
+ # @deprecated Use {Anthropic::Models::UserLocation} instead.
107
+ UserLocation = Anthropic::Models::UserLocation
156
108
  end
157
109
  end
158
110
  end
@@ -5,8 +5,8 @@ module Anthropic
5
5
  class WebSearchToolRequestError < Anthropic::Internal::Type::BaseModel
6
6
  # @!attribute error_code
7
7
  #
8
- # @return [Symbol, Anthropic::Models::WebSearchToolRequestError::ErrorCode]
9
- required :error_code, enum: -> { Anthropic::WebSearchToolRequestError::ErrorCode }
8
+ # @return [Symbol, Anthropic::Models::WebSearchToolResultErrorCode]
9
+ required :error_code, enum: -> { Anthropic::WebSearchToolResultErrorCode }
10
10
 
11
11
  # @!attribute type
12
12
  #
@@ -14,23 +14,8 @@ module Anthropic
14
14
  required :type, const: :web_search_tool_result_error
15
15
 
16
16
  # @!method initialize(error_code:, type: :web_search_tool_result_error)
17
- # @param error_code [Symbol, Anthropic::Models::WebSearchToolRequestError::ErrorCode]
17
+ # @param error_code [Symbol, Anthropic::Models::WebSearchToolResultErrorCode]
18
18
  # @param type [Symbol, :web_search_tool_result_error]
19
-
20
- # @see Anthropic::Models::WebSearchToolRequestError#error_code
21
- module ErrorCode
22
- extend Anthropic::Internal::Type::Enum
23
-
24
- INVALID_TOOL_INPUT = :invalid_tool_input
25
- UNAVAILABLE = :unavailable
26
- MAX_USES_EXCEEDED = :max_uses_exceeded
27
- TOO_MANY_REQUESTS = :too_many_requests
28
- QUERY_TOO_LONG = :query_too_long
29
- REQUEST_TOO_LARGE = :request_too_large
30
-
31
- # @!method self.values
32
- # @return [Array<Symbol>]
33
- end
34
19
  end
35
20
  end
36
21
  end
@@ -5,8 +5,8 @@ module Anthropic
5
5
  class WebSearchToolResultError < Anthropic::Internal::Type::BaseModel
6
6
  # @!attribute error_code
7
7
  #
8
- # @return [Symbol, Anthropic::Models::WebSearchToolResultError::ErrorCode]
9
- required :error_code, enum: -> { Anthropic::WebSearchToolResultError::ErrorCode }
8
+ # @return [Symbol, Anthropic::Models::WebSearchToolResultErrorCode]
9
+ required :error_code, enum: -> { Anthropic::WebSearchToolResultErrorCode }
10
10
 
11
11
  # @!attribute type
12
12
  #
@@ -14,23 +14,8 @@ module Anthropic
14
14
  required :type, const: :web_search_tool_result_error
15
15
 
16
16
  # @!method initialize(error_code:, type: :web_search_tool_result_error)
17
- # @param error_code [Symbol, Anthropic::Models::WebSearchToolResultError::ErrorCode]
17
+ # @param error_code [Symbol, Anthropic::Models::WebSearchToolResultErrorCode]
18
18
  # @param type [Symbol, :web_search_tool_result_error]
19
-
20
- # @see Anthropic::Models::WebSearchToolResultError#error_code
21
- module ErrorCode
22
- extend Anthropic::Internal::Type::Enum
23
-
24
- INVALID_TOOL_INPUT = :invalid_tool_input
25
- UNAVAILABLE = :unavailable
26
- MAX_USES_EXCEEDED = :max_uses_exceeded
27
- TOO_MANY_REQUESTS = :too_many_requests
28
- QUERY_TOO_LONG = :query_too_long
29
- REQUEST_TOO_LARGE = :request_too_large
30
-
31
- # @!method self.values
32
- # @return [Array<Symbol>]
33
- end
34
19
  end
35
20
  end
36
21
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module WebSearchToolResultErrorCode
6
+ extend Anthropic::Internal::Type::Enum
7
+
8
+ INVALID_TOOL_INPUT = :invalid_tool_input
9
+ UNAVAILABLE = :unavailable
10
+ MAX_USES_EXCEEDED = :max_uses_exceeded
11
+ TOO_MANY_REQUESTS = :too_many_requests
12
+ QUERY_TOO_LONG = :query_too_long
13
+ REQUEST_TOO_LARGE = :request_too_large
14
+
15
+ # @!method self.values
16
+ # @return [Array<Symbol>]
17
+ end
18
+
19
+ # @deprecated Use {Anthropic::Models::WebSearchToolResultErrorCode} instead.
20
+ WebSearchToolRequestError::ErrorCode = Anthropic::Models::WebSearchToolResultErrorCode
21
+
22
+ # @deprecated Use {Anthropic::Models::WebSearchToolResultErrorCode} instead.
23
+ WebSearchToolResultError::ErrorCode = Anthropic::Models::WebSearchToolResultErrorCode
24
+ end
25
+ end
@@ -378,6 +378,8 @@ module Anthropic
378
378
 
379
379
  Usage = Anthropic::Models::Usage
380
380
 
381
+ UserLocation = Anthropic::Models::UserLocation
382
+
381
383
  WebFetchBlock = Anthropic::Models::WebFetchBlock
382
384
 
383
385
  WebFetchBlockParam = Anthropic::Models::WebFetchBlockParam
@@ -415,4 +417,6 @@ module Anthropic
415
417
  WebSearchToolResultBlockParamContent = Anthropic::Models::WebSearchToolResultBlockParamContent
416
418
 
417
419
  WebSearchToolResultError = Anthropic::Models::WebSearchToolResultError
420
+
421
+ WebSearchToolResultErrorCode = Anthropic::Models::WebSearchToolResultErrorCode
418
422
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "1.21.0"
4
+ VERSION = "1.22.0"
5
5
  end
data/lib/anthropic.rb CHANGED
@@ -492,6 +492,7 @@ require_relative "anthropic/models/tool_use_block_param"
492
492
  require_relative "anthropic/models/url_image_source"
493
493
  require_relative "anthropic/models/url_pdf_source"
494
494
  require_relative "anthropic/models/usage"
495
+ require_relative "anthropic/models/user_location"
495
496
  require_relative "anthropic/models/web_fetch_block"
496
497
  require_relative "anthropic/models/web_fetch_block_param"
497
498
  require_relative "anthropic/models/web_fetch_tool_20250910"
@@ -511,6 +512,7 @@ require_relative "anthropic/models/web_search_tool_result_block_content"
511
512
  require_relative "anthropic/models/web_search_tool_result_block_param"
512
513
  require_relative "anthropic/models/web_search_tool_result_block_param_content"
513
514
  require_relative "anthropic/models/web_search_tool_result_error"
515
+ require_relative "anthropic/models/web_search_tool_result_error_code"
514
516
  require_relative "anthropic/helpers/streaming/events"
515
517
  require_relative "anthropic/helpers/streaming/message_stream"
516
518
  require_relative "anthropic/helpers/streaming"
@@ -0,0 +1,71 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ class UserLocation < Anthropic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Anthropic::UserLocation, Anthropic::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(Symbol) }
12
+ attr_accessor :type
13
+
14
+ # The city of the user.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_accessor :city
17
+
18
+ # The two letter
19
+ # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
20
+ # user.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_accessor :country
23
+
24
+ # The region of the user.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :region
27
+
28
+ # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :timezone
31
+
32
+ sig do
33
+ params(
34
+ city: T.nilable(String),
35
+ country: T.nilable(String),
36
+ region: T.nilable(String),
37
+ timezone: T.nilable(String),
38
+ type: Symbol
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # The city of the user.
43
+ city: nil,
44
+ # The two letter
45
+ # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
46
+ # user.
47
+ country: nil,
48
+ # The region of the user.
49
+ region: nil,
50
+ # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
51
+ timezone: nil,
52
+ type: :approximate
53
+ )
54
+ end
55
+
56
+ sig do
57
+ override.returns(
58
+ {
59
+ type: Symbol,
60
+ city: T.nilable(String),
61
+ country: T.nilable(String),
62
+ region: T.nilable(String),
63
+ timezone: T.nilable(String)
64
+ }
65
+ )
66
+ end
67
+ def to_hash
68
+ end
69
+ end
70
+ end
71
+ end
@@ -76,14 +76,11 @@ module Anthropic
76
76
 
77
77
  # Parameters for the user's location. Used to provide more relevant search
78
78
  # results.
79
- sig { returns(T.nilable(Anthropic::WebSearchTool20250305::UserLocation)) }
79
+ sig { returns(T.nilable(Anthropic::UserLocation)) }
80
80
  attr_reader :user_location
81
81
 
82
82
  sig do
83
- params(
84
- user_location:
85
- T.nilable(Anthropic::WebSearchTool20250305::UserLocation::OrHash)
86
- ).void
83
+ params(user_location: T.nilable(Anthropic::UserLocation::OrHash)).void
87
84
  end
88
85
  attr_writer :user_location
89
86
 
@@ -97,8 +94,7 @@ module Anthropic
97
94
  defer_loading: T::Boolean,
98
95
  max_uses: T.nilable(Integer),
99
96
  strict: T::Boolean,
100
- user_location:
101
- T.nilable(Anthropic::WebSearchTool20250305::UserLocation::OrHash),
97
+ user_location: T.nilable(Anthropic::UserLocation::OrHash),
102
98
  name: Symbol,
103
99
  type: Symbol
104
100
  ).returns(T.attached_class)
@@ -146,8 +142,7 @@ module Anthropic
146
142
  defer_loading: T::Boolean,
147
143
  max_uses: T.nilable(Integer),
148
144
  strict: T::Boolean,
149
- user_location:
150
- T.nilable(Anthropic::WebSearchTool20250305::UserLocation)
145
+ user_location: T.nilable(Anthropic::UserLocation)
151
146
  }
152
147
  )
153
148
  end
@@ -189,77 +184,6 @@ module Anthropic
189
184
  def self.values
190
185
  end
191
186
  end
192
-
193
- class UserLocation < Anthropic::Internal::Type::BaseModel
194
- OrHash =
195
- T.type_alias do
196
- T.any(
197
- Anthropic::WebSearchTool20250305::UserLocation,
198
- Anthropic::Internal::AnyHash
199
- )
200
- end
201
-
202
- sig { returns(Symbol) }
203
- attr_accessor :type
204
-
205
- # The city of the user.
206
- sig { returns(T.nilable(String)) }
207
- attr_accessor :city
208
-
209
- # The two letter
210
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
211
- # user.
212
- sig { returns(T.nilable(String)) }
213
- attr_accessor :country
214
-
215
- # The region of the user.
216
- sig { returns(T.nilable(String)) }
217
- attr_accessor :region
218
-
219
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
220
- sig { returns(T.nilable(String)) }
221
- attr_accessor :timezone
222
-
223
- # Parameters for the user's location. Used to provide more relevant search
224
- # results.
225
- sig do
226
- params(
227
- city: T.nilable(String),
228
- country: T.nilable(String),
229
- region: T.nilable(String),
230
- timezone: T.nilable(String),
231
- type: Symbol
232
- ).returns(T.attached_class)
233
- end
234
- def self.new(
235
- # The city of the user.
236
- city: nil,
237
- # The two letter
238
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
239
- # user.
240
- country: nil,
241
- # The region of the user.
242
- region: nil,
243
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
244
- timezone: nil,
245
- type: :approximate
246
- )
247
- end
248
-
249
- sig do
250
- override.returns(
251
- {
252
- type: Symbol,
253
- city: T.nilable(String),
254
- country: T.nilable(String),
255
- region: T.nilable(String),
256
- timezone: T.nilable(String)
257
- }
258
- )
259
- end
260
- def to_hash
261
- end
262
- end
263
187
  end
264
188
  end
265
189
  end
@@ -76,14 +76,11 @@ module Anthropic
76
76
 
77
77
  # Parameters for the user's location. Used to provide more relevant search
78
78
  # results.
79
- sig { returns(T.nilable(Anthropic::WebSearchTool20260209::UserLocation)) }
79
+ sig { returns(T.nilable(Anthropic::UserLocation)) }
80
80
  attr_reader :user_location
81
81
 
82
82
  sig do
83
- params(
84
- user_location:
85
- T.nilable(Anthropic::WebSearchTool20260209::UserLocation::OrHash)
86
- ).void
83
+ params(user_location: T.nilable(Anthropic::UserLocation::OrHash)).void
87
84
  end
88
85
  attr_writer :user_location
89
86
 
@@ -97,8 +94,7 @@ module Anthropic
97
94
  defer_loading: T::Boolean,
98
95
  max_uses: T.nilable(Integer),
99
96
  strict: T::Boolean,
100
- user_location:
101
- T.nilable(Anthropic::WebSearchTool20260209::UserLocation::OrHash),
97
+ user_location: T.nilable(Anthropic::UserLocation::OrHash),
102
98
  name: Symbol,
103
99
  type: Symbol
104
100
  ).returns(T.attached_class)
@@ -146,8 +142,7 @@ module Anthropic
146
142
  defer_loading: T::Boolean,
147
143
  max_uses: T.nilable(Integer),
148
144
  strict: T::Boolean,
149
- user_location:
150
- T.nilable(Anthropic::WebSearchTool20260209::UserLocation)
145
+ user_location: T.nilable(Anthropic::UserLocation)
151
146
  }
152
147
  )
153
148
  end
@@ -189,77 +184,6 @@ module Anthropic
189
184
  def self.values
190
185
  end
191
186
  end
192
-
193
- class UserLocation < Anthropic::Internal::Type::BaseModel
194
- OrHash =
195
- T.type_alias do
196
- T.any(
197
- Anthropic::WebSearchTool20260209::UserLocation,
198
- Anthropic::Internal::AnyHash
199
- )
200
- end
201
-
202
- sig { returns(Symbol) }
203
- attr_accessor :type
204
-
205
- # The city of the user.
206
- sig { returns(T.nilable(String)) }
207
- attr_accessor :city
208
-
209
- # The two letter
210
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
211
- # user.
212
- sig { returns(T.nilable(String)) }
213
- attr_accessor :country
214
-
215
- # The region of the user.
216
- sig { returns(T.nilable(String)) }
217
- attr_accessor :region
218
-
219
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
220
- sig { returns(T.nilable(String)) }
221
- attr_accessor :timezone
222
-
223
- # Parameters for the user's location. Used to provide more relevant search
224
- # results.
225
- sig do
226
- params(
227
- city: T.nilable(String),
228
- country: T.nilable(String),
229
- region: T.nilable(String),
230
- timezone: T.nilable(String),
231
- type: Symbol
232
- ).returns(T.attached_class)
233
- end
234
- def self.new(
235
- # The city of the user.
236
- city: nil,
237
- # The two letter
238
- # [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
239
- # user.
240
- country: nil,
241
- # The region of the user.
242
- region: nil,
243
- # The [IANA timezone](https://nodatime.org/TimeZones) of the user.
244
- timezone: nil,
245
- type: :approximate
246
- )
247
- end
248
-
249
- sig do
250
- override.returns(
251
- {
252
- type: Symbol,
253
- city: T.nilable(String),
254
- country: T.nilable(String),
255
- region: T.nilable(String),
256
- timezone: T.nilable(String)
257
- }
258
- )
259
- end
260
- def to_hash
261
- end
262
- end
263
187
  end
264
188
  end
265
189
  end
@@ -11,7 +11,7 @@ module Anthropic
11
11
  )
12
12
  end
13
13
 
14
- sig { returns(Anthropic::WebSearchToolRequestError::ErrorCode::OrSymbol) }
14
+ sig { returns(Anthropic::WebSearchToolResultErrorCode::OrSymbol) }
15
15
  attr_accessor :error_code
16
16
 
17
17
  sig { returns(Symbol) }
@@ -19,7 +19,7 @@ module Anthropic
19
19
 
20
20
  sig do
21
21
  params(
22
- error_code: Anthropic::WebSearchToolRequestError::ErrorCode::OrSymbol,
22
+ error_code: Anthropic::WebSearchToolResultErrorCode::OrSymbol,
23
23
  type: Symbol
24
24
  ).returns(T.attached_class)
25
25
  end
@@ -29,65 +29,13 @@ module Anthropic
29
29
  sig do
30
30
  override.returns(
31
31
  {
32
- error_code:
33
- Anthropic::WebSearchToolRequestError::ErrorCode::OrSymbol,
32
+ error_code: Anthropic::WebSearchToolResultErrorCode::OrSymbol,
34
33
  type: Symbol
35
34
  }
36
35
  )
37
36
  end
38
37
  def to_hash
39
38
  end
40
-
41
- module ErrorCode
42
- extend Anthropic::Internal::Type::Enum
43
-
44
- TaggedSymbol =
45
- T.type_alias do
46
- T.all(Symbol, Anthropic::WebSearchToolRequestError::ErrorCode)
47
- end
48
- OrSymbol = T.type_alias { T.any(Symbol, String) }
49
-
50
- INVALID_TOOL_INPUT =
51
- T.let(
52
- :invalid_tool_input,
53
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
54
- )
55
- UNAVAILABLE =
56
- T.let(
57
- :unavailable,
58
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
59
- )
60
- MAX_USES_EXCEEDED =
61
- T.let(
62
- :max_uses_exceeded,
63
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
64
- )
65
- TOO_MANY_REQUESTS =
66
- T.let(
67
- :too_many_requests,
68
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
69
- )
70
- QUERY_TOO_LONG =
71
- T.let(
72
- :query_too_long,
73
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
74
- )
75
- REQUEST_TOO_LARGE =
76
- T.let(
77
- :request_too_large,
78
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
79
- )
80
-
81
- sig do
82
- override.returns(
83
- T::Array[
84
- Anthropic::WebSearchToolRequestError::ErrorCode::TaggedSymbol
85
- ]
86
- )
87
- end
88
- def self.values
89
- end
90
- end
91
39
  end
92
40
  end
93
41
  end
@@ -11,9 +11,7 @@ module Anthropic
11
11
  )
12
12
  end
13
13
 
14
- sig do
15
- returns(Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol)
16
- end
14
+ sig { returns(Anthropic::WebSearchToolResultErrorCode::TaggedSymbol) }
17
15
  attr_accessor :error_code
18
16
 
19
17
  sig { returns(Symbol) }
@@ -21,7 +19,7 @@ module Anthropic
21
19
 
22
20
  sig do
23
21
  params(
24
- error_code: Anthropic::WebSearchToolResultError::ErrorCode::OrSymbol,
22
+ error_code: Anthropic::WebSearchToolResultErrorCode::OrSymbol,
25
23
  type: Symbol
26
24
  ).returns(T.attached_class)
27
25
  end
@@ -31,65 +29,13 @@ module Anthropic
31
29
  sig do
32
30
  override.returns(
33
31
  {
34
- error_code:
35
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol,
32
+ error_code: Anthropic::WebSearchToolResultErrorCode::TaggedSymbol,
36
33
  type: Symbol
37
34
  }
38
35
  )
39
36
  end
40
37
  def to_hash
41
38
  end
42
-
43
- module ErrorCode
44
- extend Anthropic::Internal::Type::Enum
45
-
46
- TaggedSymbol =
47
- T.type_alias do
48
- T.all(Symbol, Anthropic::WebSearchToolResultError::ErrorCode)
49
- end
50
- OrSymbol = T.type_alias { T.any(Symbol, String) }
51
-
52
- INVALID_TOOL_INPUT =
53
- T.let(
54
- :invalid_tool_input,
55
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
56
- )
57
- UNAVAILABLE =
58
- T.let(
59
- :unavailable,
60
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
61
- )
62
- MAX_USES_EXCEEDED =
63
- T.let(
64
- :max_uses_exceeded,
65
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
66
- )
67
- TOO_MANY_REQUESTS =
68
- T.let(
69
- :too_many_requests,
70
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
71
- )
72
- QUERY_TOO_LONG =
73
- T.let(
74
- :query_too_long,
75
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
76
- )
77
- REQUEST_TOO_LARGE =
78
- T.let(
79
- :request_too_large,
80
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
81
- )
82
-
83
- sig do
84
- override.returns(
85
- T::Array[
86
- Anthropic::WebSearchToolResultError::ErrorCode::TaggedSymbol
87
- ]
88
- )
89
- end
90
- def self.values
91
- end
92
- end
93
39
  end
94
40
  end
95
41
  end
@@ -0,0 +1,52 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module WebSearchToolResultErrorCode
6
+ extend Anthropic::Internal::Type::Enum
7
+
8
+ TaggedSymbol =
9
+ T.type_alias { T.all(Symbol, Anthropic::WebSearchToolResultErrorCode) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ INVALID_TOOL_INPUT =
13
+ T.let(
14
+ :invalid_tool_input,
15
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
16
+ )
17
+ UNAVAILABLE =
18
+ T.let(
19
+ :unavailable,
20
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
21
+ )
22
+ MAX_USES_EXCEEDED =
23
+ T.let(
24
+ :max_uses_exceeded,
25
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
26
+ )
27
+ TOO_MANY_REQUESTS =
28
+ T.let(
29
+ :too_many_requests,
30
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
31
+ )
32
+ QUERY_TOO_LONG =
33
+ T.let(
34
+ :query_too_long,
35
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
36
+ )
37
+ REQUEST_TOO_LARGE =
38
+ T.let(
39
+ :request_too_large,
40
+ Anthropic::WebSearchToolResultErrorCode::TaggedSymbol
41
+ )
42
+
43
+ sig do
44
+ override.returns(
45
+ T::Array[Anthropic::WebSearchToolResultErrorCode::TaggedSymbol]
46
+ )
47
+ end
48
+ def self.values
49
+ end
50
+ end
51
+ end
52
+ end
@@ -370,6 +370,8 @@ module Anthropic
370
370
 
371
371
  Usage = Anthropic::Models::Usage
372
372
 
373
+ UserLocation = Anthropic::Models::UserLocation
374
+
373
375
  WebFetchBlock = Anthropic::Models::WebFetchBlock
374
376
 
375
377
  WebFetchBlockParam = Anthropic::Models::WebFetchBlockParam
@@ -411,4 +413,6 @@ module Anthropic
411
413
  Anthropic::Models::WebSearchToolResultBlockParamContent
412
414
 
413
415
  WebSearchToolResultError = Anthropic::Models::WebSearchToolResultError
416
+
417
+ WebSearchToolResultErrorCode = Anthropic::Models::WebSearchToolResultErrorCode
414
418
  end
@@ -0,0 +1,40 @@
1
+ module Anthropic
2
+ module Models
3
+ type user_location =
4
+ {
5
+ type: :approximate,
6
+ city: String?,
7
+ country: String?,
8
+ region: String?,
9
+ timezone: String?
10
+ }
11
+
12
+ class UserLocation < Anthropic::Internal::Type::BaseModel
13
+ attr_accessor type: :approximate
14
+
15
+ attr_accessor city: String?
16
+
17
+ attr_accessor country: String?
18
+
19
+ attr_accessor region: String?
20
+
21
+ attr_accessor timezone: String?
22
+
23
+ def initialize: (
24
+ ?city: String?,
25
+ ?country: String?,
26
+ ?region: String?,
27
+ ?timezone: String?,
28
+ ?type: :approximate
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ type: :approximate,
33
+ city: String?,
34
+ country: String?,
35
+ region: String?,
36
+ timezone: String?
37
+ }
38
+ end
39
+ end
40
+ end
@@ -11,7 +11,7 @@ module Anthropic
11
11
  defer_loading: bool,
12
12
  max_uses: Integer?,
13
13
  strict: bool,
14
- user_location: Anthropic::WebSearchTool20250305::UserLocation?
14
+ user_location: Anthropic::UserLocation?
15
15
  }
16
16
 
17
17
  class WebSearchTool20250305 < Anthropic::Internal::Type::BaseModel
@@ -41,7 +41,7 @@ module Anthropic
41
41
 
42
42
  def strict=: (bool) -> bool
43
43
 
44
- attr_accessor user_location: Anthropic::WebSearchTool20250305::UserLocation?
44
+ attr_accessor user_location: Anthropic::UserLocation?
45
45
 
46
46
  def initialize: (
47
47
  ?allowed_callers: ::Array[Anthropic::Models::WebSearchTool20250305::allowed_caller],
@@ -51,7 +51,7 @@ module Anthropic
51
51
  ?defer_loading: bool,
52
52
  ?max_uses: Integer?,
53
53
  ?strict: bool,
54
- ?user_location: Anthropic::WebSearchTool20250305::UserLocation?,
54
+ ?user_location: Anthropic::UserLocation?,
55
55
  ?name: :web_search,
56
56
  ?type: :web_search_20250305
57
57
  ) -> void
@@ -66,7 +66,7 @@ module Anthropic
66
66
  defer_loading: bool,
67
67
  max_uses: Integer?,
68
68
  strict: bool,
69
- user_location: Anthropic::WebSearchTool20250305::UserLocation?
69
+ user_location: Anthropic::UserLocation?
70
70
  }
71
71
 
72
72
  type allowed_caller =
@@ -81,43 +81,6 @@ module Anthropic
81
81
 
82
82
  def self?.values: -> ::Array[Anthropic::Models::WebSearchTool20250305::allowed_caller]
83
83
  end
84
-
85
- type user_location =
86
- {
87
- type: :approximate,
88
- city: String?,
89
- country: String?,
90
- region: String?,
91
- timezone: String?
92
- }
93
-
94
- class UserLocation < Anthropic::Internal::Type::BaseModel
95
- attr_accessor type: :approximate
96
-
97
- attr_accessor city: String?
98
-
99
- attr_accessor country: String?
100
-
101
- attr_accessor region: String?
102
-
103
- attr_accessor timezone: String?
104
-
105
- def initialize: (
106
- ?city: String?,
107
- ?country: String?,
108
- ?region: String?,
109
- ?timezone: String?,
110
- ?type: :approximate
111
- ) -> void
112
-
113
- def to_hash: -> {
114
- type: :approximate,
115
- city: String?,
116
- country: String?,
117
- region: String?,
118
- timezone: String?
119
- }
120
- end
121
84
  end
122
85
  end
123
86
  end
@@ -11,7 +11,7 @@ module Anthropic
11
11
  defer_loading: bool,
12
12
  max_uses: Integer?,
13
13
  strict: bool,
14
- user_location: Anthropic::WebSearchTool20260209::UserLocation?
14
+ user_location: Anthropic::UserLocation?
15
15
  }
16
16
 
17
17
  class WebSearchTool20260209 < Anthropic::Internal::Type::BaseModel
@@ -41,7 +41,7 @@ module Anthropic
41
41
 
42
42
  def strict=: (bool) -> bool
43
43
 
44
- attr_accessor user_location: Anthropic::WebSearchTool20260209::UserLocation?
44
+ attr_accessor user_location: Anthropic::UserLocation?
45
45
 
46
46
  def initialize: (
47
47
  ?allowed_callers: ::Array[Anthropic::Models::WebSearchTool20260209::allowed_caller],
@@ -51,7 +51,7 @@ module Anthropic
51
51
  ?defer_loading: bool,
52
52
  ?max_uses: Integer?,
53
53
  ?strict: bool,
54
- ?user_location: Anthropic::WebSearchTool20260209::UserLocation?,
54
+ ?user_location: Anthropic::UserLocation?,
55
55
  ?name: :web_search,
56
56
  ?type: :web_search_20260209
57
57
  ) -> void
@@ -66,7 +66,7 @@ module Anthropic
66
66
  defer_loading: bool,
67
67
  max_uses: Integer?,
68
68
  strict: bool,
69
- user_location: Anthropic::WebSearchTool20260209::UserLocation?
69
+ user_location: Anthropic::UserLocation?
70
70
  }
71
71
 
72
72
  type allowed_caller =
@@ -81,43 +81,6 @@ module Anthropic
81
81
 
82
82
  def self?.values: -> ::Array[Anthropic::Models::WebSearchTool20260209::allowed_caller]
83
83
  end
84
-
85
- type user_location =
86
- {
87
- type: :approximate,
88
- city: String?,
89
- country: String?,
90
- region: String?,
91
- timezone: String?
92
- }
93
-
94
- class UserLocation < Anthropic::Internal::Type::BaseModel
95
- attr_accessor type: :approximate
96
-
97
- attr_accessor city: String?
98
-
99
- attr_accessor country: String?
100
-
101
- attr_accessor region: String?
102
-
103
- attr_accessor timezone: String?
104
-
105
- def initialize: (
106
- ?city: String?,
107
- ?country: String?,
108
- ?region: String?,
109
- ?timezone: String?,
110
- ?type: :approximate
111
- ) -> void
112
-
113
- def to_hash: -> {
114
- type: :approximate,
115
- city: String?,
116
- country: String?,
117
- region: String?,
118
- timezone: String?
119
- }
120
- end
121
84
  end
122
85
  end
123
86
  end
@@ -2,45 +2,24 @@ module Anthropic
2
2
  module Models
3
3
  type web_search_tool_request_error =
4
4
  {
5
- error_code: Anthropic::Models::WebSearchToolRequestError::error_code,
5
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
6
6
  type: :web_search_tool_result_error
7
7
  }
8
8
 
9
9
  class WebSearchToolRequestError < Anthropic::Internal::Type::BaseModel
10
- attr_accessor error_code: Anthropic::Models::WebSearchToolRequestError::error_code
10
+ attr_accessor error_code: Anthropic::Models::web_search_tool_result_error_code
11
11
 
12
12
  attr_accessor type: :web_search_tool_result_error
13
13
 
14
14
  def initialize: (
15
- error_code: Anthropic::Models::WebSearchToolRequestError::error_code,
15
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
16
16
  ?type: :web_search_tool_result_error
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
- error_code: Anthropic::Models::WebSearchToolRequestError::error_code,
20
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
21
21
  type: :web_search_tool_result_error
22
22
  }
23
-
24
- type error_code =
25
- :invalid_tool_input
26
- | :unavailable
27
- | :max_uses_exceeded
28
- | :too_many_requests
29
- | :query_too_long
30
- | :request_too_large
31
-
32
- module ErrorCode
33
- extend Anthropic::Internal::Type::Enum
34
-
35
- INVALID_TOOL_INPUT: :invalid_tool_input
36
- UNAVAILABLE: :unavailable
37
- MAX_USES_EXCEEDED: :max_uses_exceeded
38
- TOO_MANY_REQUESTS: :too_many_requests
39
- QUERY_TOO_LONG: :query_too_long
40
- REQUEST_TOO_LARGE: :request_too_large
41
-
42
- def self?.values: -> ::Array[Anthropic::Models::WebSearchToolRequestError::error_code]
43
- end
44
23
  end
45
24
  end
46
25
  end
@@ -2,45 +2,24 @@ module Anthropic
2
2
  module Models
3
3
  type web_search_tool_result_error =
4
4
  {
5
- error_code: Anthropic::Models::WebSearchToolResultError::error_code,
5
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
6
6
  type: :web_search_tool_result_error
7
7
  }
8
8
 
9
9
  class WebSearchToolResultError < Anthropic::Internal::Type::BaseModel
10
- attr_accessor error_code: Anthropic::Models::WebSearchToolResultError::error_code
10
+ attr_accessor error_code: Anthropic::Models::web_search_tool_result_error_code
11
11
 
12
12
  attr_accessor type: :web_search_tool_result_error
13
13
 
14
14
  def initialize: (
15
- error_code: Anthropic::Models::WebSearchToolResultError::error_code,
15
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
16
16
  ?type: :web_search_tool_result_error
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
- error_code: Anthropic::Models::WebSearchToolResultError::error_code,
20
+ error_code: Anthropic::Models::web_search_tool_result_error_code,
21
21
  type: :web_search_tool_result_error
22
22
  }
23
-
24
- type error_code =
25
- :invalid_tool_input
26
- | :unavailable
27
- | :max_uses_exceeded
28
- | :too_many_requests
29
- | :query_too_long
30
- | :request_too_large
31
-
32
- module ErrorCode
33
- extend Anthropic::Internal::Type::Enum
34
-
35
- INVALID_TOOL_INPUT: :invalid_tool_input
36
- UNAVAILABLE: :unavailable
37
- MAX_USES_EXCEEDED: :max_uses_exceeded
38
- TOO_MANY_REQUESTS: :too_many_requests
39
- QUERY_TOO_LONG: :query_too_long
40
- REQUEST_TOO_LARGE: :request_too_large
41
-
42
- def self?.values: -> ::Array[Anthropic::Models::WebSearchToolResultError::error_code]
43
- end
44
23
  end
45
24
  end
46
25
  end
@@ -0,0 +1,24 @@
1
+ module Anthropic
2
+ module Models
3
+ type web_search_tool_result_error_code =
4
+ :invalid_tool_input
5
+ | :unavailable
6
+ | :max_uses_exceeded
7
+ | :too_many_requests
8
+ | :query_too_long
9
+ | :request_too_large
10
+
11
+ module WebSearchToolResultErrorCode
12
+ extend Anthropic::Internal::Type::Enum
13
+
14
+ INVALID_TOOL_INPUT: :invalid_tool_input
15
+ UNAVAILABLE: :unavailable
16
+ MAX_USES_EXCEEDED: :max_uses_exceeded
17
+ TOO_MANY_REQUESTS: :too_many_requests
18
+ QUERY_TOO_LONG: :query_too_long
19
+ REQUEST_TOO_LARGE: :request_too_large
20
+
21
+ def self?.values: -> ::Array[Anthropic::Models::web_search_tool_result_error_code]
22
+ end
23
+ end
24
+ end
@@ -331,6 +331,8 @@ module Anthropic
331
331
 
332
332
  class Usage = Anthropic::Models::Usage
333
333
 
334
+ class UserLocation = Anthropic::Models::UserLocation
335
+
334
336
  class WebFetchBlock = Anthropic::Models::WebFetchBlock
335
337
 
336
338
  class WebFetchBlockParam = Anthropic::Models::WebFetchBlockParam
@@ -368,4 +370,6 @@ module Anthropic
368
370
  module WebSearchToolResultBlockParamContent = Anthropic::Models::WebSearchToolResultBlockParamContent
369
371
 
370
372
  class WebSearchToolResultError = Anthropic::Models::WebSearchToolResultError
373
+
374
+ module WebSearchToolResultErrorCode = Anthropic::Models::WebSearchToolResultErrorCode
371
375
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anthropic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthropic
@@ -515,6 +515,7 @@ files:
515
515
  - lib/anthropic/models/url_image_source.rb
516
516
  - lib/anthropic/models/url_pdf_source.rb
517
517
  - lib/anthropic/models/usage.rb
518
+ - lib/anthropic/models/user_location.rb
518
519
  - lib/anthropic/models/web_fetch_block.rb
519
520
  - lib/anthropic/models/web_fetch_block_param.rb
520
521
  - lib/anthropic/models/web_fetch_tool_20250910.rb
@@ -534,6 +535,7 @@ files:
534
535
  - lib/anthropic/models/web_search_tool_result_block_param.rb
535
536
  - lib/anthropic/models/web_search_tool_result_block_param_content.rb
536
537
  - lib/anthropic/models/web_search_tool_result_error.rb
538
+ - lib/anthropic/models/web_search_tool_result_error_code.rb
537
539
  - lib/anthropic/request_options.rb
538
540
  - lib/anthropic/resources/beta.rb
539
541
  - lib/anthropic/resources/beta/files.rb
@@ -1010,6 +1012,7 @@ files:
1010
1012
  - rbi/anthropic/models/url_image_source.rbi
1011
1013
  - rbi/anthropic/models/url_pdf_source.rbi
1012
1014
  - rbi/anthropic/models/usage.rbi
1015
+ - rbi/anthropic/models/user_location.rbi
1013
1016
  - rbi/anthropic/models/web_fetch_block.rbi
1014
1017
  - rbi/anthropic/models/web_fetch_block_param.rbi
1015
1018
  - rbi/anthropic/models/web_fetch_tool_20250910.rbi
@@ -1029,6 +1032,7 @@ files:
1029
1032
  - rbi/anthropic/models/web_search_tool_result_block_param.rbi
1030
1033
  - rbi/anthropic/models/web_search_tool_result_block_param_content.rbi
1031
1034
  - rbi/anthropic/models/web_search_tool_result_error.rbi
1035
+ - rbi/anthropic/models/web_search_tool_result_error_code.rbi
1032
1036
  - rbi/anthropic/request_options.rbi
1033
1037
  - rbi/anthropic/resources/beta.rbi
1034
1038
  - rbi/anthropic/resources/beta/files.rbi
@@ -1493,6 +1497,7 @@ files:
1493
1497
  - sig/anthropic/models/url_image_source.rbs
1494
1498
  - sig/anthropic/models/url_pdf_source.rbs
1495
1499
  - sig/anthropic/models/usage.rbs
1500
+ - sig/anthropic/models/user_location.rbs
1496
1501
  - sig/anthropic/models/web_fetch_block.rbs
1497
1502
  - sig/anthropic/models/web_fetch_block_param.rbs
1498
1503
  - sig/anthropic/models/web_fetch_tool_20250910.rbs
@@ -1512,6 +1517,7 @@ files:
1512
1517
  - sig/anthropic/models/web_search_tool_result_block_param.rbs
1513
1518
  - sig/anthropic/models/web_search_tool_result_block_param_content.rbs
1514
1519
  - sig/anthropic/models/web_search_tool_result_error.rbs
1520
+ - sig/anthropic/models/web_search_tool_result_error_code.rbs
1515
1521
  - sig/anthropic/request_options.rbs
1516
1522
  - sig/anthropic/resources/beta.rbs
1517
1523
  - sig/anthropic/resources/beta/files.rbs