anthropic 1.50.0 → 1.52.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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +2 -1
  4. data/lib/anthropic/internal/util.rb +18 -9
  5. data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +2 -2
  6. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +5 -0
  7. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  8. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  9. data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
  10. data/lib/anthropic/models/beta/beta_web_fetch_tool_20260318.rb +167 -0
  11. data/lib/anthropic/models/beta/beta_web_search_tool_20260318.rb +150 -0
  12. data/lib/anthropic/models/beta/message_count_tokens_params.rb +30 -14
  13. data/lib/anthropic/models/beta/message_create_params.rb +22 -16
  14. data/lib/anthropic/models/beta/messages/batch_create_params.rb +28 -19
  15. data/lib/anthropic/models/cache_control_ephemeral.rb +2 -2
  16. data/lib/anthropic/models/completion_create_params.rb +4 -2
  17. data/lib/anthropic/models/message_count_tokens_params.rb +25 -13
  18. data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
  19. data/lib/anthropic/models/message_create_params.rb +22 -16
  20. data/lib/anthropic/models/messages/batch_create_params.rb +28 -19
  21. data/lib/anthropic/models/model.rb +5 -0
  22. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  23. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  24. data/lib/anthropic/models/tool_union.rb +5 -1
  25. data/lib/anthropic/models/web_fetch_tool_20260318.rb +163 -0
  26. data/lib/anthropic/models/web_search_tool_20260318.rb +146 -0
  27. data/lib/anthropic/models.rb +4 -0
  28. data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
  29. data/lib/anthropic/resources/beta/messages.rb +10 -8
  30. data/lib/anthropic/resources/completions.rb +4 -4
  31. data/lib/anthropic/resources/messages/batches.rb +6 -6
  32. data/lib/anthropic/resources/messages.rb +19 -15
  33. data/lib/anthropic/version.rb +1 -1
  34. data/lib/anthropic.rb +4 -0
  35. data/rbi/anthropic/models/beta/beta_cache_control_ephemeral.rbi +3 -3
  36. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +7 -0
  37. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  38. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  39. data/rbi/anthropic/models/beta/beta_tool_union.rbi +2 -0
  40. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260318.rbi +319 -0
  41. data/rbi/anthropic/models/beta/beta_web_search_tool_20260318.rbi +296 -0
  42. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +48 -19
  43. data/rbi/anthropic/models/beta/message_create_params.rbi +45 -26
  44. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +55 -31
  45. data/rbi/anthropic/models/cache_control_ephemeral.rbi +3 -3
  46. data/rbi/anthropic/models/completion_create_params.rbi +8 -4
  47. data/rbi/anthropic/models/message_count_tokens_params.rbi +46 -19
  48. data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -0
  49. data/rbi/anthropic/models/message_create_params.rbi +45 -26
  50. data/rbi/anthropic/models/messages/batch_create_params.rbi +55 -31
  51. data/rbi/anthropic/models/model.rbi +4 -0
  52. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  53. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  54. data/rbi/anthropic/models/tool_union.rbi +2 -0
  55. data/rbi/anthropic/models/web_fetch_tool_20260318.rbi +295 -0
  56. data/rbi/anthropic/models/web_search_tool_20260318.rbi +272 -0
  57. data/rbi/anthropic/models.rbi +4 -0
  58. data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
  59. data/rbi/anthropic/resources/beta/messages.rbi +60 -36
  60. data/rbi/anthropic/resources/completions.rbi +12 -8
  61. data/rbi/anthropic/resources/messages/batches.rbi +6 -6
  62. data/rbi/anthropic/resources/messages.rbi +71 -46
  63. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +5 -1
  64. data/sig/anthropic/models/beta/beta_tool_union.rbs +2 -0
  65. data/sig/anthropic/models/beta/beta_web_fetch_tool_20260318.rbs +126 -0
  66. data/sig/anthropic/models/beta/beta_web_search_tool_20260318.rbs +114 -0
  67. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +10 -1
  68. data/sig/anthropic/models/message_count_tokens_params.rbs +8 -1
  69. data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -0
  70. data/sig/anthropic/models/model.rbs +5 -1
  71. data/sig/anthropic/models/tool_union.rbs +2 -0
  72. data/sig/anthropic/models/web_fetch_tool_20260318.rbs +122 -0
  73. data/sig/anthropic/models/web_search_tool_20260318.rbs +110 -0
  74. data/sig/anthropic/models.rbs +4 -0
  75. data/sig/anthropic/resources/beta/messages.rbs +1 -0
  76. data/sig/anthropic/resources/messages.rbs +1 -0
  77. metadata +14 -2
@@ -17,11 +17,12 @@ module Anthropic
17
17
  # only specifies the absolute maximum number of tokens to generate.
18
18
  #
19
19
  # Set to `0` to populate the
20
- # [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache)
20
+ # [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
21
21
  # without generating a response.
22
22
  #
23
23
  # Different models have different maximum values for this parameter. See
24
- # [models](https://docs.claude.com/en/docs/models-overview) for details.
24
+ # [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
25
+ # details.
25
26
  #
26
27
  # @return [Integer]
27
28
  required :max_tokens, Integer
@@ -84,12 +85,13 @@ module Anthropic
84
85
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
85
86
  # ```
86
87
  #
87
- # See [input examples](https://docs.claude.com/en/api/messages-examples).
88
+ # See
89
+ # [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
88
90
  #
89
91
  # Note that if you want to include a
90
- # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
91
- # top-level `system` parameter — there is no `"system"` role for input messages in
92
- # the Messages API.
92
+ # [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
93
+ # you can use the top-level `system` parameter — there is no `"system"` role for
94
+ # input messages in the Messages API.
93
95
  #
94
96
  # There is a limit of 100,000 messages in a single request.
95
97
  #
@@ -211,7 +213,8 @@ module Anthropic
211
213
  # for this request.
212
214
  #
213
215
  # Anthropic offers different levels of service for your API requests. See
214
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
216
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
217
+ # details.
215
218
  #
216
219
  # @return [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier, nil]
217
220
  optional :service_tier, enum: -> { Anthropic::Beta::MessageCreateParams::ServiceTier }
@@ -242,7 +245,7 @@ module Anthropic
242
245
  #
243
246
  # A system prompt is a way of providing context and instructions to Claude, such
244
247
  # as specifying a particular goal or role. See our
245
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
248
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
246
249
  #
247
250
  # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
248
251
  optional :system_, union: -> { Anthropic::Beta::MessageCreateParams::System }, api_name: :system
@@ -272,7 +275,7 @@ module Anthropic
272
275
  # tokens and counts towards your `max_tokens` limit.
273
276
  #
274
277
  # See
275
- # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
278
+ # [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
276
279
  # for details.
277
280
  #
278
281
  # @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
@@ -295,9 +298,9 @@ module Anthropic
295
298
  #
296
299
  # There are two types of tools: **client tools** and **server tools**. The
297
300
  # behavior described below applies to client tools. For
298
- # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
301
+ # [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
299
302
  # see their individual documentation as each has its own behavior (e.g., the
300
- # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
303
+ # [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
301
304
  #
302
305
  # Each tool definition includes:
303
306
  #
@@ -360,9 +363,11 @@ module Anthropic
360
363
  # functions, or more generally whenever you want the model to produce a particular
361
364
  # JSON structure of output.
362
365
  #
363
- # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
366
+ # See our
367
+ # [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
368
+ # for more details.
364
369
  #
365
- # @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>, nil]
370
+ # @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>, nil]
366
371
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
367
372
 
368
373
  # @!attribute top_k
@@ -454,7 +459,7 @@ module Anthropic
454
459
  #
455
460
  # @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
456
461
  #
457
- # @param tools [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>] Definitions of tools that the model may use.
462
+ # @param tools [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>] Definitions of tools that the model may use.
458
463
  #
459
464
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
460
465
  #
@@ -483,7 +488,8 @@ module Anthropic
483
488
  # for this request.
484
489
  #
485
490
  # Anthropic offers different levels of service for your API requests. See
486
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
491
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
492
+ # details.
487
493
  module ServiceTier
488
494
  extend Anthropic::Internal::Type::Enum
489
495
 
@@ -510,7 +516,7 @@ module Anthropic
510
516
  #
511
517
  # A system prompt is a way of providing context and instructions to Claude, such
512
518
  # as specifying a particular goal or role. See our
513
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
519
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
514
520
  module System
515
521
  extend Anthropic::Internal::Type::Union
516
522
 
@@ -57,7 +57,8 @@ module Anthropic
57
57
  # @!attribute params
58
58
  # Messages API creation parameters for the individual request.
59
59
  #
60
- # See the [Messages API reference](https://docs.claude.com/en/api/messages) for
60
+ # See the
61
+ # [Messages API reference](https://platform.claude.com/docs/en/api/messages) for
61
62
  # full documentation on available parameters.
62
63
  #
63
64
  # @return [Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params]
@@ -81,11 +82,12 @@ module Anthropic
81
82
  # only specifies the absolute maximum number of tokens to generate.
82
83
  #
83
84
  # Set to `0` to populate the
84
- # [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache)
85
+ # [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
85
86
  # without generating a response.
86
87
  #
87
88
  # Different models have different maximum values for this parameter. See
88
- # [models](https://docs.claude.com/en/docs/models-overview) for details.
89
+ # [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
90
+ # details.
89
91
  #
90
92
  # @return [Integer]
91
93
  required :max_tokens, Integer
@@ -148,12 +150,13 @@ module Anthropic
148
150
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
149
151
  # ```
150
152
  #
151
- # See [input examples](https://docs.claude.com/en/api/messages-examples).
153
+ # See
154
+ # [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
152
155
  #
153
156
  # Note that if you want to include a
154
- # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
155
- # top-level `system` parameter — there is no `"system"` role for input messages in
156
- # the Messages API.
157
+ # [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
158
+ # you can use the top-level `system` parameter — there is no `"system"` role for
159
+ # input messages in the Messages API.
157
160
  #
158
161
  # There is a limit of 100,000 messages in a single request.
159
162
  #
@@ -277,7 +280,8 @@ module Anthropic
277
280
  # for this request.
278
281
  #
279
282
  # Anthropic offers different levels of service for your API requests. See
280
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
283
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
284
+ # details.
281
285
  #
282
286
  # @return [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier, nil]
283
287
  optional :service_tier,
@@ -309,7 +313,8 @@ module Anthropic
309
313
  # @!attribute stream
310
314
  # Whether to incrementally stream the response using server-sent events.
311
315
  #
312
- # See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
316
+ # See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
317
+ # for details.
313
318
  #
314
319
  # @return [Boolean, nil]
315
320
  optional :stream, Anthropic::Internal::Type::Boolean
@@ -319,7 +324,7 @@ module Anthropic
319
324
  #
320
325
  # A system prompt is a way of providing context and instructions to Claude, such
321
326
  # as specifying a particular goal or role. See our
322
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
327
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
323
328
  #
324
329
  # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
325
330
  optional :system_,
@@ -351,7 +356,7 @@ module Anthropic
351
356
  # tokens and counts towards your `max_tokens` limit.
352
357
  #
353
358
  # See
354
- # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
359
+ # [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
355
360
  # for details.
356
361
  #
357
362
  # @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
@@ -374,9 +379,9 @@ module Anthropic
374
379
  #
375
380
  # There are two types of tools: **client tools** and **server tools**. The
376
381
  # behavior described below applies to client tools. For
377
- # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
382
+ # [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
378
383
  # see their individual documentation as each has its own behavior (e.g., the
379
- # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
384
+ # [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
380
385
  #
381
386
  # Each tool definition includes:
382
387
  #
@@ -439,9 +444,11 @@ module Anthropic
439
444
  # functions, or more generally whenever you want the model to produce a particular
440
445
  # JSON structure of output.
441
446
  #
442
- # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
447
+ # See our
448
+ # [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
449
+ # for more details.
443
450
  #
444
- # @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>, nil]
451
+ # @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>, nil]
445
452
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
446
453
 
447
454
  # @!attribute top_k
@@ -481,7 +488,8 @@ module Anthropic
481
488
  #
482
489
  # Messages API creation parameters for the individual request.
483
490
  #
484
- # See the [Messages API reference](https://docs.claude.com/en/api/messages) for
491
+ # See the
492
+ # [Messages API reference](https://platform.claude.com/docs/en/api/messages) for
485
493
  # full documentation on available parameters.
486
494
  #
487
495
  # @param max_tokens [Integer] The maximum number of tokens to generate before stopping.
@@ -528,7 +536,7 @@ module Anthropic
528
536
  #
529
537
  # @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
530
538
  #
531
- # @param tools [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>] Definitions of tools that the model may use.
539
+ # @param tools [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>] Definitions of tools that the model may use.
532
540
  #
533
541
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
534
542
  #
@@ -553,7 +561,8 @@ module Anthropic
553
561
  # for this request.
554
562
  #
555
563
  # Anthropic offers different levels of service for your API requests. See
556
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
564
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
565
+ # details.
557
566
  #
558
567
  # @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#service_tier
559
568
  module ServiceTier
@@ -584,7 +593,7 @@ module Anthropic
584
593
  #
585
594
  # A system prompt is a way of providing context and instructions to Claude, such
586
595
  # as specifying a particular goal or role. See our
587
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
596
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
588
597
  #
589
598
  # @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#system_
590
599
  module System
@@ -17,7 +17,7 @@ module Anthropic
17
17
  # - `1h`: 1 hour
18
18
  #
19
19
  # Defaults to `5m`. See
20
- # [prompt caching pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching)
20
+ # [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
21
21
  # for details.
22
22
  #
23
23
  # @return [Symbol, Anthropic::Models::CacheControlEphemeral::TTL, nil]
@@ -39,7 +39,7 @@ module Anthropic
39
39
  # - `1h`: 1 hour
40
40
  #
41
41
  # Defaults to `5m`. See
42
- # [prompt caching pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching)
42
+ # [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
43
43
  # for details.
44
44
  #
45
45
  # @see Anthropic::Models::CacheControlEphemeral#ttl
@@ -37,8 +37,10 @@ module Anthropic
37
37
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
38
38
  # ```
39
39
  #
40
- # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
41
- # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
40
+ # See
41
+ # [prompt validation](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
42
+ # and our guide to
43
+ # [prompt design](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview)
42
44
  # for more details.
43
45
  #
44
46
  # @return [String]
@@ -65,12 +65,13 @@ module Anthropic
65
65
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
66
66
  # ```
67
67
  #
68
- # See [input examples](https://docs.claude.com/en/api/messages-examples).
68
+ # See
69
+ # [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
69
70
  #
70
71
  # Note that if you want to include a
71
- # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
72
- # top-level `system` parameter — there is no `"system"` role for input messages in
73
- # the Messages API.
72
+ # [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
73
+ # you can use the top-level `system` parameter — there is no `"system"` role for
74
+ # input messages in the Messages API.
74
75
  #
75
76
  # There is a limit of 100,000 messages in a single request.
76
77
  #
@@ -104,7 +105,7 @@ module Anthropic
104
105
  #
105
106
  # A system prompt is a way of providing context and instructions to Claude, such
106
107
  # as specifying a particular goal or role. See our
107
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
108
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
108
109
  #
109
110
  # @return [String, Array<Anthropic::Models::TextBlockParam>, nil]
110
111
  optional :system_, union: -> { Anthropic::MessageCountTokensParams::System }, api_name: :system
@@ -117,7 +118,7 @@ module Anthropic
117
118
  # tokens and counts towards your `max_tokens` limit.
118
119
  #
119
120
  # See
120
- # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
121
+ # [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
121
122
  # for details.
122
123
  #
123
124
  # @return [Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, Anthropic::Models::ThinkingConfigAdaptive, nil]
@@ -140,9 +141,9 @@ module Anthropic
140
141
  #
141
142
  # There are two types of tools: **client tools** and **server tools**. The
142
143
  # behavior described below applies to client tools. For
143
- # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
144
+ # [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
144
145
  # see their individual documentation as each has its own behavior (e.g., the
145
- # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
146
+ # [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
146
147
  #
147
148
  # Each tool definition includes:
148
149
  #
@@ -205,12 +206,21 @@ module Anthropic
205
206
  # functions, or more generally whenever you want the model to produce a particular
206
207
  # JSON structure of output.
207
208
  #
208
- # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
209
+ # See our
210
+ # [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
211
+ # for more details.
209
212
  #
210
- # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
213
+ # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::WebSearchTool20260318, Anthropic::Models::WebFetchTool20260318, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
211
214
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::MessageCountTokensTool] }
212
215
 
213
- # @!method initialize(messages:, model:, cache_control: nil, output_config: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, request_options: {})
216
+ # @!attribute user_profile_id
217
+ # The user profile ID to attribute this request to. Use when acting on behalf of a
218
+ # party other than your organization. Requires the `user-profiles` beta header.
219
+ #
220
+ # @return [String, nil]
221
+ optional :user_profile_id, String
222
+
223
+ # @!method initialize(messages:, model:, cache_control: nil, output_config: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, user_profile_id: nil, request_options: {})
214
224
  # Some parameter documentations has been truncated, see
215
225
  # {Anthropic::Models::MessageCountTokensParams} for more details.
216
226
  #
@@ -228,7 +238,9 @@ module Anthropic
228
238
  #
229
239
  # @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
230
240
  #
231
- # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
241
+ # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::WebSearchTool20260318, Anthropic::Models::WebFetchTool20260318, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
242
+ #
243
+ # @param user_profile_id [String] The user profile ID to attribute this request to. Use when acting on behalf of a
232
244
  #
233
245
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
234
246
 
@@ -236,7 +248,7 @@ module Anthropic
236
248
  #
237
249
  # A system prompt is a way of providing context and instructions to Claude, such
238
250
  # as specifying a particular goal or role. See our
239
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
251
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
240
252
  module System
241
253
  extend Anthropic::Internal::Type::Union
242
254
 
@@ -40,12 +40,16 @@ module Anthropic
40
40
  # Web fetch tool with use_cache parameter for bypassing cached content.
41
41
  variant -> { Anthropic::WebFetchTool20260309 }
42
42
 
43
+ variant -> { Anthropic::WebSearchTool20260318 }
44
+
45
+ variant -> { Anthropic::WebFetchTool20260318 }
46
+
43
47
  variant -> { Anthropic::ToolSearchToolBm25_20251119 }
44
48
 
45
49
  variant -> { Anthropic::ToolSearchToolRegex20251119 }
46
50
 
47
51
  # @!method self.variants
48
- # @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
52
+ # @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::WebSearchTool20260318, Anthropic::Models::WebFetchTool20260318, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
49
53
  end
50
54
  end
51
55
  end
@@ -16,11 +16,12 @@ module Anthropic
16
16
  # only specifies the absolute maximum number of tokens to generate.
17
17
  #
18
18
  # Set to `0` to populate the
19
- # [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache)
19
+ # [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
20
20
  # without generating a response.
21
21
  #
22
22
  # Different models have different maximum values for this parameter. See
23
- # [models](https://docs.claude.com/en/docs/models-overview) for details.
23
+ # [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
24
+ # details.
24
25
  #
25
26
  # @return [Integer]
26
27
  required :max_tokens, Integer
@@ -83,12 +84,13 @@ module Anthropic
83
84
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
84
85
  # ```
85
86
  #
86
- # See [input examples](https://docs.claude.com/en/api/messages-examples).
87
+ # See
88
+ # [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
87
89
  #
88
90
  # Note that if you want to include a
89
- # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
90
- # top-level `system` parameter — there is no `"system"` role for input messages in
91
- # the Messages API.
91
+ # [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
92
+ # you can use the top-level `system` parameter — there is no `"system"` role for
93
+ # input messages in the Messages API.
92
94
  #
93
95
  # There is a limit of 100,000 messages in a single request.
94
96
  #
@@ -141,7 +143,8 @@ module Anthropic
141
143
  # for this request.
142
144
  #
143
145
  # Anthropic offers different levels of service for your API requests. See
144
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
146
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
147
+ # details.
145
148
  #
146
149
  # @return [Symbol, Anthropic::Models::MessageCreateParams::ServiceTier, nil]
147
150
  optional :service_tier, enum: -> { Anthropic::MessageCreateParams::ServiceTier }
@@ -165,7 +168,7 @@ module Anthropic
165
168
  #
166
169
  # A system prompt is a way of providing context and instructions to Claude, such
167
170
  # as specifying a particular goal or role. See our
168
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
171
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
169
172
  #
170
173
  # @return [String, Array<Anthropic::Models::TextBlockParam>, nil]
171
174
  optional :system_, union: -> { Anthropic::MessageCreateParams::System }, api_name: :system
@@ -195,7 +198,7 @@ module Anthropic
195
198
  # tokens and counts towards your `max_tokens` limit.
196
199
  #
197
200
  # See
198
- # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
201
+ # [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
199
202
  # for details.
200
203
  #
201
204
  # @return [Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, Anthropic::Models::ThinkingConfigAdaptive, nil]
@@ -218,9 +221,9 @@ module Anthropic
218
221
  #
219
222
  # There are two types of tools: **client tools** and **server tools**. The
220
223
  # behavior described below applies to client tools. For
221
- # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
224
+ # [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
222
225
  # see their individual documentation as each has its own behavior (e.g., the
223
- # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
226
+ # [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
224
227
  #
225
228
  # Each tool definition includes:
226
229
  #
@@ -283,9 +286,11 @@ module Anthropic
283
286
  # functions, or more generally whenever you want the model to produce a particular
284
287
  # JSON structure of output.
285
288
  #
286
- # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
289
+ # See our
290
+ # [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
291
+ # for more details.
287
292
  #
288
- # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
293
+ # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::WebSearchTool20260318, Anthropic::Models::WebFetchTool20260318, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
289
294
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
290
295
 
291
296
  # @!attribute top_k
@@ -357,7 +362,7 @@ module Anthropic
357
362
  #
358
363
  # @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
359
364
  #
360
- # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
365
+ # @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::WebSearchTool20260318, Anthropic::Models::WebFetchTool20260318, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
361
366
  #
362
367
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
363
368
  #
@@ -371,7 +376,8 @@ module Anthropic
371
376
  # for this request.
372
377
  #
373
378
  # Anthropic offers different levels of service for your API requests. See
374
- # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
379
+ # [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
380
+ # details.
375
381
  module ServiceTier
376
382
  extend Anthropic::Internal::Type::Enum
377
383
 
@@ -386,7 +392,7 @@ module Anthropic
386
392
  #
387
393
  # A system prompt is a way of providing context and instructions to Claude, such
388
394
  # as specifying a particular goal or role. See our
389
- # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
395
+ # [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
390
396
  module System
391
397
  extend Anthropic::Internal::Type::Union
392
398