anthropic 1.14.0 → 1.15.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +8 -1
  5. data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +8 -1
  6. data/lib/anthropic/models/beta/beta_json_output_format.rb +27 -0
  7. data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +8 -1
  8. data/lib/anthropic/models/beta/beta_tool.rb +8 -1
  9. data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +8 -1
  10. data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +8 -1
  11. data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +8 -1
  12. data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +8 -1
  13. data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +8 -1
  14. data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +8 -1
  15. data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +8 -1
  16. data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +8 -1
  17. data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +8 -1
  18. data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +8 -1
  19. data/lib/anthropic/models/beta/message_count_tokens_params.rb +9 -1
  20. data/lib/anthropic/models/beta/message_create_params.rb +9 -1
  21. data/lib/anthropic/models/beta/messages/batch_create_params.rb +9 -1
  22. data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
  23. data/lib/anthropic/resources/beta/messages.rb +14 -6
  24. data/lib/anthropic/resources/messages/batches.rb +6 -6
  25. data/lib/anthropic/resources/messages.rb +5 -3
  26. data/lib/anthropic/version.rb +1 -1
  27. data/lib/anthropic.rb +1 -0
  28. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +10 -1
  29. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +10 -1
  30. data/rbi/anthropic/models/beta/beta_json_output_format.rbi +46 -0
  31. data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +10 -1
  32. data/rbi/anthropic/models/beta/beta_tool.rbi +9 -0
  33. data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +10 -1
  34. data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +10 -1
  35. data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +10 -1
  36. data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +10 -1
  37. data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +10 -1
  38. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +10 -1
  39. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +10 -1
  40. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +10 -1
  41. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +10 -1
  42. data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +9 -0
  43. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +17 -0
  44. data/rbi/anthropic/models/beta/message_create_params.rbi +17 -0
  45. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +18 -0
  46. data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
  47. data/rbi/anthropic/resources/beta/messages.rbi +17 -3
  48. data/rbi/anthropic/resources/messages/batches.rbi +6 -6
  49. data/rbi/anthropic/resources/messages.rbi +5 -3
  50. data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +9 -2
  51. data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +9 -2
  52. data/sig/anthropic/models/beta/beta_json_output_format.rbs +23 -0
  53. data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +9 -2
  54. data/sig/anthropic/models/beta/beta_tool.rbs +7 -0
  55. data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +9 -2
  56. data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +9 -2
  57. data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +9 -2
  58. data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +9 -2
  59. data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +9 -2
  60. data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +9 -2
  61. data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +9 -2
  62. data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +9 -2
  63. data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +9 -2
  64. data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +7 -0
  65. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +5 -0
  66. data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
  67. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +5 -0
  68. data/sig/anthropic/resources/beta/messages.rbs +3 -0
  69. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd00e27834064b69a4c340776b3a6dcc50be9cde619c86fca93663c421cb7dff
4
- data.tar.gz: 8a07090aaa4fc943673bba3a67411ef3d2dede001e8a597487c6be61b17a6d36
3
+ metadata.gz: 96fbec3c8e86823794c9559e8ff4e1967abec7788c4f8933e43891d6700fe911
4
+ data.tar.gz: 45edb4c50ecabd23c527f5f9a3a6a5c636657d6dfd45520d950bd366fc99f036
5
5
  SHA512:
6
- metadata.gz: f50ad464f5deeaf0be1635ca3fe270b82efd88332c145472ca653048b3e970925b531f9e652401d8f5cfe6e055083e540aadd2f3f6ae18b743acb2e58c0a513c
7
- data.tar.gz: 0706ceb70895b9cfedf683a8edbc183a73b45234c62531c15a281860891de1ed2160245f104a3f4f752eb7d82235de0d6ade340bdf66e1a5de99801cf755a951
6
+ metadata.gz: 574a806f729e6eb29debde3a6440f47a6e9dc7703d3c7a9b34ed2865d2240e1e00d3cabedde20c64e8283d1556142adb8f102b17610bb622a7861390f9155de6
7
+ data.tar.gz: 9b10f42e58ff25f85123cac98231a38104e15fe7245779969d0db4f4b1da71441be662071dfe2c6c4e1663de02f22710ec7f66930ea6c31a0e4262b2a1aa3742
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.15.0 (2025-11-14)
4
+
5
+ Full Changelog: [v1.14.0...v1.15.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.14.0...v1.15.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add support for structured outputs beta ([1a4ec00](https://github.com/anthropics/anthropic-sdk-ruby/commit/1a4ec00f3eb519f23fd29eb6a18b256aa2002c11))
10
+
3
11
  ## 1.14.0 (2025-11-07)
4
12
 
5
13
  Full Changelog: [v1.13.0...v1.14.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.13.0...v1.14.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.14.0"
18
+ gem "anthropic", "~> 1.15.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :code_execution, type: :code_execution_20250522)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :code_execution, type: :code_execution_20250522)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaCodeExecutionTool20250522} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :code_execution] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :code_execution_20250522]
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :code_execution, type: :code_execution_20250825)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :code_execution, type: :code_execution_20250825)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaCodeExecutionTool20250825} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :code_execution] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :code_execution_20250825]
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaJSONOutputFormat < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute schema
8
+ # The JSON schema of the format
9
+ #
10
+ # @return [Hash{Symbol=>Object}]
11
+ required :schema, Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]
12
+
13
+ # @!attribute type
14
+ #
15
+ # @return [Symbol, :json_schema]
16
+ required :type, const: :json_schema
17
+
18
+ # @!method initialize(schema:, type: :json_schema)
19
+ # @param schema [Hash{Symbol=>Object}] The JSON schema of the format
20
+ #
21
+ # @param type [Symbol, :json_schema]
22
+ end
23
+ end
24
+
25
+ BetaJSONOutputFormat = Beta::BetaJSONOutputFormat
26
+ end
27
+ end
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :memory, type: :memory_20250818)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :memory, type: :memory_20250818)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaMemoryTool20250818} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :memory] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :memory_20250818]
@@ -38,12 +38,17 @@ module Anthropic
38
38
  # @return [String, nil]
39
39
  optional :description, String
40
40
 
41
+ # @!attribute strict
42
+ #
43
+ # @return [Boolean, nil]
44
+ optional :strict, Anthropic::Internal::Type::Boolean
45
+
41
46
  # @!attribute type
42
47
  #
43
48
  # @return [Symbol, Anthropic::Models::Beta::BetaTool::Type, nil]
44
49
  optional :type, enum: -> { Anthropic::Beta::BetaTool::Type }, nil?: true
45
50
 
46
- # @!method initialize(input_schema:, name:, cache_control: nil, description: nil, type: nil)
51
+ # @!method initialize(input_schema:, name:, cache_control: nil, description: nil, strict: nil, type: nil)
47
52
  # Some parameter documentations has been truncated, see
48
53
  # {Anthropic::Models::Beta::BetaTool} for more details.
49
54
  #
@@ -55,6 +60,8 @@ module Anthropic
55
60
  #
56
61
  # @param description [String] Description of what this tool does.
57
62
  #
63
+ # @param strict [Boolean]
64
+ #
58
65
  # @param type [Symbol, Anthropic::Models::Beta::BetaTool::Type, nil]
59
66
 
60
67
  # @see Anthropic::Models::Beta::BetaTool#input_schema
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :bash, type: :bash_20241022)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :bash, type: :bash_20241022)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaToolBash20241022} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :bash] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :bash_20241022]
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :bash, type: :bash_20250124)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :bash, type: :bash_20250124)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaToolBash20250124} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :bash] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :bash_20250124]
@@ -41,7 +41,12 @@ module Anthropic
41
41
  # @return [Integer, nil]
42
42
  optional :display_number, Integer, nil?: true
43
43
 
44
- # @!method initialize(display_height_px:, display_width_px:, cache_control: nil, display_number: nil, name: :computer, type: :computer_20241022)
44
+ # @!attribute strict
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :strict, Anthropic::Internal::Type::Boolean
48
+
49
+ # @!method initialize(display_height_px:, display_width_px:, cache_control: nil, display_number: nil, strict: nil, name: :computer, type: :computer_20241022)
45
50
  # Some parameter documentations has been truncated, see
46
51
  # {Anthropic::Models::Beta::BetaToolComputerUse20241022} for more details.
47
52
  #
@@ -53,6 +58,8 @@ module Anthropic
53
58
  #
54
59
  # @param display_number [Integer, nil] The X11 display number (e.g. 0, 1) for the display.
55
60
  #
61
+ # @param strict [Boolean]
62
+ #
56
63
  # @param name [Symbol, :computer] Name of the tool.
57
64
  #
58
65
  # @param type [Symbol, :computer_20241022]
@@ -41,7 +41,12 @@ module Anthropic
41
41
  # @return [Integer, nil]
42
42
  optional :display_number, Integer, nil?: true
43
43
 
44
- # @!method initialize(display_height_px:, display_width_px:, cache_control: nil, display_number: nil, name: :computer, type: :computer_20250124)
44
+ # @!attribute strict
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :strict, Anthropic::Internal::Type::Boolean
48
+
49
+ # @!method initialize(display_height_px:, display_width_px:, cache_control: nil, display_number: nil, strict: nil, name: :computer, type: :computer_20250124)
45
50
  # Some parameter documentations has been truncated, see
46
51
  # {Anthropic::Models::Beta::BetaToolComputerUse20250124} for more details.
47
52
  #
@@ -53,6 +58,8 @@ module Anthropic
53
58
  #
54
59
  # @param display_number [Integer, nil] The X11 display number (e.g. 0, 1) for the display.
55
60
  #
61
+ # @param strict [Boolean]
62
+ #
56
63
  # @param name [Symbol, :computer] Name of the tool.
57
64
  #
58
65
  # @param type [Symbol, :computer_20250124]
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :str_replace_editor, type: :text_editor_20241022)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :str_replace_editor, type: :text_editor_20241022)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaToolTextEditor20241022} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :str_replace_editor] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :text_editor_20241022]
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :str_replace_editor, type: :text_editor_20250124)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :str_replace_editor, type: :text_editor_20250124)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaToolTextEditor20250124} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :str_replace_editor] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :text_editor_20250124]
@@ -23,12 +23,19 @@ module Anthropic
23
23
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
24
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
25
 
26
- # @!method initialize(cache_control: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250429)
26
+ # @!attribute strict
27
+ #
28
+ # @return [Boolean, nil]
29
+ optional :strict, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(cache_control: nil, strict: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250429)
27
32
  # Some parameter documentations has been truncated, see
28
33
  # {Anthropic::Models::Beta::BetaToolTextEditor20250429} for more details.
29
34
  #
30
35
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
36
  #
37
+ # @param strict [Boolean]
38
+ #
32
39
  # @param name [Symbol, :str_replace_based_edit_tool] Name of the tool.
33
40
  #
34
41
  # @param type [Symbol, :text_editor_20250429]
@@ -30,7 +30,12 @@ module Anthropic
30
30
  # @return [Integer, nil]
31
31
  optional :max_characters, Integer, nil?: true
32
32
 
33
- # @!method initialize(cache_control: nil, max_characters: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250728)
33
+ # @!attribute strict
34
+ #
35
+ # @return [Boolean, nil]
36
+ optional :strict, Anthropic::Internal::Type::Boolean
37
+
38
+ # @!method initialize(cache_control: nil, max_characters: nil, strict: nil, name: :str_replace_based_edit_tool, type: :text_editor_20250728)
34
39
  # Some parameter documentations has been truncated, see
35
40
  # {Anthropic::Models::Beta::BetaToolTextEditor20250728} for more details.
36
41
  #
@@ -38,6 +43,8 @@ module Anthropic
38
43
  #
39
44
  # @param max_characters [Integer, nil] Maximum number of characters to display when viewing a file. If not specified, d
40
45
  #
46
+ # @param strict [Boolean]
47
+ #
41
48
  # @param name [Symbol, :str_replace_based_edit_tool] Name of the tool.
42
49
  #
43
50
  # @param type [Symbol, :text_editor_20250728]
@@ -55,7 +55,12 @@ module Anthropic
55
55
  # @return [Integer, nil]
56
56
  optional :max_uses, Integer, nil?: true
57
57
 
58
- # @!method initialize(allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, max_content_tokens: nil, max_uses: nil, name: :web_fetch, type: :web_fetch_20250910)
58
+ # @!attribute strict
59
+ #
60
+ # @return [Boolean, nil]
61
+ optional :strict, Anthropic::Internal::Type::Boolean
62
+
63
+ # @!method initialize(allowed_domains: nil, blocked_domains: nil, cache_control: nil, citations: nil, max_content_tokens: nil, max_uses: nil, strict: nil, name: :web_fetch, type: :web_fetch_20250910)
59
64
  # Some parameter documentations has been truncated, see
60
65
  # {Anthropic::Models::Beta::BetaWebFetchTool20250910} for more details.
61
66
  #
@@ -71,6 +76,8 @@ module Anthropic
71
76
  #
72
77
  # @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
73
78
  #
79
+ # @param strict [Boolean]
80
+ #
74
81
  # @param name [Symbol, :web_fetch] Name of the tool.
75
82
  #
76
83
  # @param type [Symbol, :web_fetch_20250910]
@@ -43,6 +43,11 @@ module Anthropic
43
43
  # @return [Integer, nil]
44
44
  optional :max_uses, Integer, nil?: true
45
45
 
46
+ # @!attribute strict
47
+ #
48
+ # @return [Boolean, nil]
49
+ optional :strict, Anthropic::Internal::Type::Boolean
50
+
46
51
  # @!attribute user_location
47
52
  # Parameters for the user's location. Used to provide more relevant search
48
53
  # results.
@@ -50,7 +55,7 @@ module Anthropic
50
55
  # @return [Anthropic::Models::Beta::BetaWebSearchTool20250305::UserLocation, nil]
51
56
  optional :user_location, -> { Anthropic::Beta::BetaWebSearchTool20250305::UserLocation }, nil?: true
52
57
 
53
- # @!method initialize(allowed_domains: nil, blocked_domains: nil, cache_control: nil, max_uses: nil, user_location: nil, name: :web_search, type: :web_search_20250305)
58
+ # @!method initialize(allowed_domains: nil, blocked_domains: nil, cache_control: nil, max_uses: nil, strict: nil, user_location: nil, name: :web_search, type: :web_search_20250305)
54
59
  # Some parameter documentations has been truncated, see
55
60
  # {Anthropic::Models::Beta::BetaWebSearchTool20250305} for more details.
56
61
  #
@@ -62,6 +67,8 @@ module Anthropic
62
67
  #
63
68
  # @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
64
69
  #
70
+ # @param strict [Boolean]
71
+ #
65
72
  # @param user_location [Anthropic::Models::Beta::BetaWebSearchTool20250305::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
66
73
  #
67
74
  # @param name [Symbol, :web_search] Name of the tool.
@@ -102,6 +102,12 @@ module Anthropic
102
102
  optional :mcp_servers,
103
103
  -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaRequestMCPServerURLDefinition] }
104
104
 
105
+ # @!attribute output_format
106
+ # A schema to specify Claude's output format in responses.
107
+ #
108
+ # @return [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
109
+ optional :output_format, -> { Anthropic::Beta::BetaJSONOutputFormat }, nil?: true
110
+
105
111
  # @!attribute system_
106
112
  # System prompt.
107
113
  #
@@ -220,7 +226,7 @@ module Anthropic
220
226
  # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
221
227
  optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
222
228
 
223
- # @!method initialize(messages:, model:, context_management: nil, mcp_servers: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
229
+ # @!method initialize(messages:, model:, context_management: nil, mcp_servers: nil, output_format: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
224
230
  # Some parameter documentations has been truncated, see
225
231
  # {Anthropic::Models::Beta::MessageCountTokensParams} for more details.
226
232
  #
@@ -232,6 +238,8 @@ module Anthropic
232
238
  #
233
239
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaRequestMCPServerURLDefinition>] MCP servers to be utilized in this request
234
240
  #
241
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
242
+ #
235
243
  # @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] System prompt.
236
244
  #
237
245
  # @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled] Configuration for enabling Claude's extended thinking.
@@ -128,6 +128,12 @@ module Anthropic
128
128
  # @return [Anthropic::Models::Beta::BetaMetadata, nil]
129
129
  optional :metadata, -> { Anthropic::Beta::BetaMetadata }
130
130
 
131
+ # @!attribute output_format
132
+ # A schema to specify Claude's output format in responses.
133
+ #
134
+ # @return [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
135
+ optional :output_format, -> { Anthropic::Beta::BetaJSONOutputFormat }, nil?: true
136
+
131
137
  # @!attribute service_tier
132
138
  # Determines whether to use priority capacity (if available) or standard capacity
133
139
  # for this request.
@@ -308,7 +314,7 @@ module Anthropic
308
314
  # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
309
315
  optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
310
316
 
311
- # @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
317
+ # @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
312
318
  # Some parameter documentations has been truncated, see
313
319
  # {Anthropic::Models::Beta::MessageCreateParams} for more details.
314
320
  #
@@ -326,6 +332,8 @@ module Anthropic
326
332
  #
327
333
  # @param metadata [Anthropic::Models::Beta::BetaMetadata] An object describing metadata about the request.
328
334
  #
335
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
336
+ #
329
337
  # @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Determines whether to use priority capacity (if available) or standard capacity
330
338
  #
331
339
  # @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
@@ -183,6 +183,12 @@ module Anthropic
183
183
  # @return [Anthropic::Models::Beta::BetaMetadata, nil]
184
184
  optional :metadata, -> { Anthropic::Beta::BetaMetadata }
185
185
 
186
+ # @!attribute output_format
187
+ # A schema to specify Claude's output format in responses.
188
+ #
189
+ # @return [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
190
+ optional :output_format, -> { Anthropic::Beta::BetaJSONOutputFormat }, nil?: true
191
+
186
192
  # @!attribute service_tier
187
193
  # Determines whether to use priority capacity (if available) or standard capacity
188
194
  # for this request.
@@ -368,7 +374,7 @@ module Anthropic
368
374
  # @return [Float, nil]
369
375
  optional :top_p, Float
370
376
 
371
- # @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil)
377
+ # @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, output_format: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil)
372
378
  # Some parameter documentations has been truncated, see
373
379
  # {Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params} for more
374
380
  # details.
@@ -392,6 +398,8 @@ module Anthropic
392
398
  #
393
399
  # @param metadata [Anthropic::Models::Beta::BetaMetadata] An object describing metadata about the request.
394
400
  #
401
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
402
+ #
395
403
  # @param service_tier [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier] Determines whether to use priority capacity (if available) or standard capacity
396
404
  #
397
405
  # @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
@@ -15,7 +15,7 @@ module Anthropic
15
15
  # can take up to 24 hours to complete.
16
16
  #
17
17
  # Learn more about the Message Batches API in our
18
- # [user guide](/en/docs/build-with-claude/batch-processing)
18
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
19
19
  #
20
20
  # @overload create(requests:, betas: nil, request_options: {})
21
21
  #
@@ -46,7 +46,7 @@ module Anthropic
46
46
  # `results_url` field in the response.
47
47
  #
48
48
  # Learn more about the Message Batches API in our
49
- # [user guide](/en/docs/build-with-claude/batch-processing)
49
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
50
50
  #
51
51
  # @overload retrieve(message_batch_id, betas: nil, request_options: {})
52
52
  #
@@ -77,7 +77,7 @@ module Anthropic
77
77
  # returned first.
78
78
  #
79
79
  # Learn more about the Message Batches API in our
80
- # [user guide](/en/docs/build-with-claude/batch-processing)
80
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
81
81
  #
82
82
  # @overload list(after_id: nil, before_id: nil, limit: nil, betas: nil, request_options: {})
83
83
  #
@@ -114,7 +114,7 @@ module Anthropic
114
114
  # like to delete an in-progress batch, you must first cancel it.
115
115
  #
116
116
  # Learn more about the Message Batches API in our
117
- # [user guide](/en/docs/build-with-claude/batch-processing)
117
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
118
118
  #
119
119
  # @overload delete(message_batch_id, betas: nil, request_options: {})
120
120
  #
@@ -149,7 +149,7 @@ module Anthropic
149
149
  # non-interruptible.
150
150
  #
151
151
  # Learn more about the Message Batches API in our
152
- # [user guide](/en/docs/build-with-claude/batch-processing)
152
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
153
153
  #
154
154
  # @overload cancel(message_batch_id, betas: nil, request_options: {})
155
155
  #
@@ -180,7 +180,7 @@ module Anthropic
180
180
  # requests. Use the `custom_id` field to match results to requests.
181
181
  #
182
182
  # Learn more about the Message Batches API in our
183
- # [user guide](/en/docs/build-with-claude/batch-processing)
183
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
184
184
  #
185
185
  # @overload results_streaming(message_batch_id, betas: nil, request_options: {})
186
186
  #
@@ -25,9 +25,10 @@ module Anthropic
25
25
  # The Messages API can be used for either single queries or stateless multi-turn
26
26
  # conversations.
27
27
  #
28
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
28
+ # Learn more about the Messages API in our
29
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
29
30
  #
30
- # @overload create(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
31
+ # @overload create(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
31
32
  #
32
33
  # @param max_tokens [Integer] Body param: The maximum number of tokens to generate before stopping.
33
34
  #
@@ -43,6 +44,8 @@ module Anthropic
43
44
  #
44
45
  # @param metadata [Anthropic::Models::Beta::BetaMetadata] Body param: An object describing metadata about the request.
45
46
  #
47
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] Body param:
48
+ #
46
49
  # @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Body param: Determines whether to use priority capacity (if available) or standa
47
50
  #
48
51
  # @param stop_sequences [Array<String>] Body param: Custom text sequences that will cause the model to stop generating.
@@ -114,9 +117,10 @@ module Anthropic
114
117
  # The Messages API can be used for either single queries or stateless multi-turn
115
118
  # conversations.
116
119
  #
117
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
120
+ # Learn more about the Messages API in our
121
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
118
122
  #
119
- # @overload stream_raw(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
123
+ # @overload stream_raw(max_tokens:, messages:, model:, container: nil, context_management: nil, mcp_servers: nil, metadata: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
120
124
  #
121
125
  # @param max_tokens [Integer] Body param: The maximum number of tokens to generate before stopping.
122
126
  #
@@ -132,6 +136,8 @@ module Anthropic
132
136
  #
133
137
  # @param metadata [Anthropic::Models::Beta::BetaMetadata] Body param: An object describing metadata about the request.
134
138
  #
139
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] Body param:
140
+ #
135
141
  # @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Body param: Determines whether to use priority capacity (if available) or standa
136
142
  #
137
143
  # @param stop_sequences [Array<String>] Body param: Custom text sequences that will cause the model to stop generating.
@@ -265,9 +271,9 @@ module Anthropic
265
271
  # including tools, images, and documents, without creating it.
266
272
  #
267
273
  # Learn more about token counting in our
268
- # [user guide](/en/docs/build-with-claude/token-counting)
274
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
269
275
  #
270
- # @overload count_tokens(messages:, model:, context_management: nil, mcp_servers: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
276
+ # @overload count_tokens(messages:, model:, context_management: nil, mcp_servers: nil, output_format: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
271
277
  #
272
278
  # @param messages [Array<Anthropic::Models::Beta::BetaMessageParam>] Body param: Input messages.
273
279
  #
@@ -277,6 +283,8 @@ module Anthropic
277
283
  #
278
284
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaRequestMCPServerURLDefinition>] Body param: MCP servers to be utilized in this request
279
285
  #
286
+ # @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] Body param:
287
+ #
280
288
  # @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] Body param: System prompt.
281
289
  #
282
290
  # @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled] Body param: Configuration for enabling Claude's extended thinking.