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
@@ -124,6 +124,18 @@ module Anthropic
124
124
  end
125
125
  attr_writer :mcp_servers
126
126
 
127
+ # A schema to specify Claude's output format in responses.
128
+ sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
129
+ attr_reader :output_format
130
+
131
+ sig do
132
+ params(
133
+ output_format:
134
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash)
135
+ ).void
136
+ end
137
+ attr_writer :output_format
138
+
127
139
  # System prompt.
128
140
  #
129
141
  # A system prompt is a way of providing context and instructions to Claude, such
@@ -359,6 +371,8 @@ module Anthropic
359
371
  T::Array[
360
372
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
361
373
  ],
374
+ output_format:
375
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
362
376
  system_:
363
377
  Anthropic::Beta::MessageCountTokensParams::System::Variants,
364
378
  thinking:
@@ -474,6 +488,8 @@ module Anthropic
474
488
  context_management: nil,
475
489
  # MCP servers to be utilized in this request
476
490
  mcp_servers: nil,
491
+ # A schema to specify Claude's output format in responses.
492
+ output_format: nil,
477
493
  # System prompt.
478
494
  #
479
495
  # A system prompt is a way of providing context and instructions to Claude, such
@@ -584,6 +600,7 @@ module Anthropic
584
600
  T.nilable(Anthropic::Beta::BetaContextManagementConfig),
585
601
  mcp_servers:
586
602
  T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
603
+ output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
587
604
  system_:
588
605
  Anthropic::Beta::MessageCountTokensParams::System::Variants,
589
606
  thinking:
@@ -149,6 +149,18 @@ module Anthropic
149
149
  sig { params(metadata: Anthropic::Beta::BetaMetadata::OrHash).void }
150
150
  attr_writer :metadata
151
151
 
152
+ # A schema to specify Claude's output format in responses.
153
+ sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
154
+ attr_reader :output_format
155
+
156
+ sig do
157
+ params(
158
+ output_format:
159
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash)
160
+ ).void
161
+ end
162
+ attr_writer :output_format
163
+
152
164
  # Determines whether to use priority capacity (if available) or standard capacity
153
165
  # for this request.
154
166
  #
@@ -467,6 +479,8 @@ module Anthropic
467
479
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
468
480
  ],
469
481
  metadata: Anthropic::Beta::BetaMetadata::OrHash,
482
+ output_format:
483
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
470
484
  service_tier:
471
485
  Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
472
486
  stop_sequences: T::Array[String],
@@ -599,6 +613,8 @@ module Anthropic
599
613
  mcp_servers: nil,
600
614
  # An object describing metadata about the request.
601
615
  metadata: nil,
616
+ # A schema to specify Claude's output format in responses.
617
+ output_format: nil,
602
618
  # Determines whether to use priority capacity (if available) or standard capacity
603
619
  # for this request.
604
620
  #
@@ -756,6 +772,7 @@ module Anthropic
756
772
  mcp_servers:
757
773
  T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
758
774
  metadata: Anthropic::Beta::BetaMetadata,
775
+ output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
759
776
  service_tier:
760
777
  Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
761
778
  stop_sequences: T::Array[String],
@@ -296,6 +296,18 @@ module Anthropic
296
296
  end
297
297
  attr_writer :metadata
298
298
 
299
+ # A schema to specify Claude's output format in responses.
300
+ sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
301
+ attr_reader :output_format
302
+
303
+ sig do
304
+ params(
305
+ output_format:
306
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash)
307
+ ).void
308
+ end
309
+ attr_writer :output_format
310
+
299
311
  # Determines whether to use priority capacity (if available) or standard capacity
300
312
  # for this request.
301
313
  #
@@ -618,6 +630,8 @@ module Anthropic
618
630
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
619
631
  ],
620
632
  metadata: Anthropic::Beta::BetaMetadata::OrHash,
633
+ output_format:
634
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
621
635
  service_tier:
622
636
  Anthropic::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier::OrSymbol,
623
637
  stop_sequences: T::Array[String],
@@ -750,6 +764,8 @@ module Anthropic
750
764
  mcp_servers: nil,
751
765
  # An object describing metadata about the request.
752
766
  metadata: nil,
767
+ # A schema to specify Claude's output format in responses.
768
+ output_format: nil,
753
769
  # Determines whether to use priority capacity (if available) or standard capacity
754
770
  # for this request.
755
771
  #
@@ -912,6 +928,8 @@ module Anthropic
912
928
  Anthropic::Beta::BetaRequestMCPServerURLDefinition
913
929
  ],
914
930
  metadata: Anthropic::Beta::BetaMetadata,
931
+ output_format:
932
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
915
933
  service_tier:
916
934
  Anthropic::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier::OrSymbol,
917
935
  stop_sequences: T::Array[String],
@@ -12,7 +12,7 @@ module Anthropic
12
12
  # can take up to 24 hours to complete.
13
13
  #
14
14
  # Learn more about the Message Batches API in our
15
- # [user guide](/en/docs/build-with-claude/batch-processing)
15
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
16
16
  sig do
17
17
  params(
18
18
  requests:
@@ -39,7 +39,7 @@ module Anthropic
39
39
  # `results_url` field in the response.
40
40
  #
41
41
  # Learn more about the Message Batches API in our
42
- # [user guide](/en/docs/build-with-claude/batch-processing)
42
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
43
43
  sig do
44
44
  params(
45
45
  message_batch_id: String,
@@ -61,7 +61,7 @@ module Anthropic
61
61
  # returned first.
62
62
  #
63
63
  # Learn more about the Message Batches API in our
64
- # [user guide](/en/docs/build-with-claude/batch-processing)
64
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
65
65
  sig do
66
66
  params(
67
67
  after_id: String,
@@ -99,7 +99,7 @@ module Anthropic
99
99
  # like to delete an in-progress batch, you must first cancel it.
100
100
  #
101
101
  # Learn more about the Message Batches API in our
102
- # [user guide](/en/docs/build-with-claude/batch-processing)
102
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
103
103
  sig do
104
104
  params(
105
105
  message_batch_id: String,
@@ -128,7 +128,7 @@ module Anthropic
128
128
  # non-interruptible.
129
129
  #
130
130
  # Learn more about the Message Batches API in our
131
- # [user guide](/en/docs/build-with-claude/batch-processing)
131
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
132
132
  sig do
133
133
  params(
134
134
  message_batch_id: String,
@@ -153,7 +153,7 @@ module Anthropic
153
153
  # requests. Use the `custom_id` field to match results to requests.
154
154
  #
155
155
  # Learn more about the Message Batches API in our
156
- # [user guide](/en/docs/build-with-claude/batch-processing)
156
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
157
157
  sig do
158
158
  params(
159
159
  message_batch_id: String,
@@ -311,7 +311,8 @@ module Anthropic
311
311
  # The Messages API can be used for either single queries or stateless multi-turn
312
312
  # conversations.
313
313
  #
314
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
314
+ # Learn more about the Messages API in our
315
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
315
316
  sig do
316
317
  params(
317
318
  max_tokens: Integer,
@@ -328,6 +329,8 @@ module Anthropic
328
329
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
329
330
  ],
330
331
  metadata: Anthropic::Beta::BetaMetadata::OrHash,
332
+ output_format:
333
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
331
334
  service_tier:
332
335
  Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
333
336
  stop_sequences: T::Array[String],
@@ -461,6 +464,8 @@ module Anthropic
461
464
  mcp_servers: nil,
462
465
  # Body param: An object describing metadata about the request.
463
466
  metadata: nil,
467
+ # Body param: A schema to specify Claude's output format in responses.
468
+ output_format: nil,
464
469
  # Body param: Determines whether to use priority capacity (if available) or
465
470
  # standard capacity for this request.
466
471
  #
@@ -616,7 +621,8 @@ module Anthropic
616
621
  # The Messages API can be used for either single queries or stateless multi-turn
617
622
  # conversations.
618
623
  #
619
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
624
+ # Learn more about the Messages API in our
625
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
620
626
  sig do
621
627
  params(
622
628
  max_tokens: Integer,
@@ -633,6 +639,8 @@ module Anthropic
633
639
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
634
640
  ],
635
641
  metadata: Anthropic::Beta::BetaMetadata::OrHash,
642
+ output_format:
643
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
636
644
  service_tier:
637
645
  Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
638
646
  stop_sequences: T::Array[String],
@@ -770,6 +778,8 @@ module Anthropic
770
778
  mcp_servers: nil,
771
779
  # Body param: An object describing metadata about the request.
772
780
  metadata: nil,
781
+ # Body param: A schema to specify Claude's output format in responses.
782
+ output_format: nil,
773
783
  # Body param: Determines whether to use priority capacity (if available) or
774
784
  # standard capacity for this request.
775
785
  #
@@ -923,7 +933,7 @@ module Anthropic
923
933
  # including tools, images, and documents, without creating it.
924
934
  #
925
935
  # Learn more about token counting in our
926
- # [user guide](/en/docs/build-with-claude/token-counting)
936
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
927
937
  sig do
928
938
  params(
929
939
  messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
@@ -934,6 +944,8 @@ module Anthropic
934
944
  T::Array[
935
945
  Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
936
946
  ],
947
+ output_format:
948
+ T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
937
949
  system_:
938
950
  Anthropic::Beta::MessageCountTokensParams::System::Variants,
939
951
  thinking:
@@ -1049,6 +1061,8 @@ module Anthropic
1049
1061
  context_management: nil,
1050
1062
  # Body param: MCP servers to be utilized in this request
1051
1063
  mcp_servers: nil,
1064
+ # Body param: A schema to specify Claude's output format in responses.
1065
+ output_format: nil,
1052
1066
  # Body param: System prompt.
1053
1067
  #
1054
1068
  # A system prompt is a way of providing context and instructions to Claude, such
@@ -11,7 +11,7 @@ module Anthropic
11
11
  # can take up to 24 hours to complete.
12
12
  #
13
13
  # Learn more about the Message Batches API in our
14
- # [user guide](/en/docs/build-with-claude/batch-processing)
14
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
15
15
  sig do
16
16
  params(
17
17
  requests:
@@ -32,7 +32,7 @@ module Anthropic
32
32
  # `results_url` field in the response.
33
33
  #
34
34
  # Learn more about the Message Batches API in our
35
- # [user guide](/en/docs/build-with-claude/batch-processing)
35
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
36
36
  sig do
37
37
  params(
38
38
  message_batch_id: String,
@@ -50,7 +50,7 @@ module Anthropic
50
50
  # returned first.
51
51
  #
52
52
  # Learn more about the Message Batches API in our
53
- # [user guide](/en/docs/build-with-claude/batch-processing)
53
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
54
54
  sig do
55
55
  params(
56
56
  after_id: String,
@@ -82,7 +82,7 @@ module Anthropic
82
82
  # like to delete an in-progress batch, you must first cancel it.
83
83
  #
84
84
  # Learn more about the Message Batches API in our
85
- # [user guide](/en/docs/build-with-claude/batch-processing)
85
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
86
86
  sig do
87
87
  params(
88
88
  message_batch_id: String,
@@ -107,7 +107,7 @@ module Anthropic
107
107
  # non-interruptible.
108
108
  #
109
109
  # Learn more about the Message Batches API in our
110
- # [user guide](/en/docs/build-with-claude/batch-processing)
110
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
111
111
  sig do
112
112
  params(
113
113
  message_batch_id: String,
@@ -128,7 +128,7 @@ module Anthropic
128
128
  # requests. Use the `custom_id` field to match results to requests.
129
129
  #
130
130
  # Learn more about the Message Batches API in our
131
- # [user guide](/en/docs/build-with-claude/batch-processing)
131
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
132
132
  sig do
133
133
  params(
134
134
  message_batch_id: String,
@@ -14,7 +14,8 @@ module Anthropic
14
14
  # The Messages API can be used for either single queries or stateless multi-turn
15
15
  # conversations.
16
16
  #
17
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
17
+ # Learn more about the Messages API in our
18
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
18
19
  sig do
19
20
  params(
20
21
  max_tokens: Integer,
@@ -288,7 +289,8 @@ module Anthropic
288
289
  # The Messages API can be used for either single queries or stateless multi-turn
289
290
  # conversations.
290
291
  #
291
- # Learn more about the Messages API in our [user guide](/en/docs/initial-setup)
292
+ # Learn more about the Messages API in our
293
+ # [user guide](https://docs.claude.com/en/docs/initial-setup)
292
294
  sig do
293
295
  params(
294
296
  max_tokens: Integer,
@@ -855,7 +857,7 @@ module Anthropic
855
857
  # including tools, images, and documents, without creating it.
856
858
  #
857
859
  # Learn more about token counting in our
858
- # [user guide](/en/docs/build-with-claude/token-counting)
860
+ # [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
859
861
  sig do
860
862
  params(
861
863
  messages: T::Array[Anthropic::MessageParam::OrHash],
@@ -7,7 +7,8 @@ module Anthropic
7
7
  {
8
8
  name: :code_execution,
9
9
  type: :code_execution_20250522,
10
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
10
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
+ strict: bool
11
12
  }
12
13
 
13
14
  class BetaCodeExecutionTool20250522 < Anthropic::Internal::Type::BaseModel
@@ -17,8 +18,13 @@ module Anthropic
17
18
 
18
19
  attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
19
20
 
21
+ attr_reader strict: bool?
22
+
23
+ def strict=: (bool) -> bool
24
+
20
25
  def initialize: (
21
26
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
27
+ ?strict: bool,
22
28
  ?name: :code_execution,
23
29
  ?type: :code_execution_20250522
24
30
  ) -> void
@@ -26,7 +32,8 @@ module Anthropic
26
32
  def to_hash: -> {
27
33
  name: :code_execution,
28
34
  type: :code_execution_20250522,
29
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
35
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
36
+ strict: bool
30
37
  }
31
38
  end
32
39
  end
@@ -7,7 +7,8 @@ module Anthropic
7
7
  {
8
8
  name: :code_execution,
9
9
  type: :code_execution_20250825,
10
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
10
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
+ strict: bool
11
12
  }
12
13
 
13
14
  class BetaCodeExecutionTool20250825 < Anthropic::Internal::Type::BaseModel
@@ -17,8 +18,13 @@ module Anthropic
17
18
 
18
19
  attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
19
20
 
21
+ attr_reader strict: bool?
22
+
23
+ def strict=: (bool) -> bool
24
+
20
25
  def initialize: (
21
26
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
27
+ ?strict: bool,
22
28
  ?name: :code_execution,
23
29
  ?type: :code_execution_20250825
24
30
  ) -> void
@@ -26,7 +32,8 @@ module Anthropic
26
32
  def to_hash: -> {
27
33
  name: :code_execution,
28
34
  type: :code_execution_20250825,
29
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
35
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
36
+ strict: bool
30
37
  }
31
38
  end
32
39
  end
@@ -0,0 +1,23 @@
1
+ module Anthropic
2
+ module Models
3
+ class BetaJSONOutputFormat = Beta::BetaJSONOutputFormat
4
+
5
+ module Beta
6
+ type beta_json_output_format =
7
+ { schema: ::Hash[Symbol, top], type: :json_schema }
8
+
9
+ class BetaJSONOutputFormat < Anthropic::Internal::Type::BaseModel
10
+ attr_accessor schema: ::Hash[Symbol, top]
11
+
12
+ attr_accessor type: :json_schema
13
+
14
+ def initialize: (
15
+ schema: ::Hash[Symbol, top],
16
+ ?type: :json_schema
17
+ ) -> void
18
+
19
+ def to_hash: -> { schema: ::Hash[Symbol, top], type: :json_schema }
20
+ end
21
+ end
22
+ end
23
+ end
@@ -7,7 +7,8 @@ module Anthropic
7
7
  {
8
8
  name: :memory,
9
9
  type: :memory_20250818,
10
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
10
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
+ strict: bool
11
12
  }
12
13
 
13
14
  class BetaMemoryTool20250818 < Anthropic::Internal::Type::BaseModel
@@ -17,8 +18,13 @@ module Anthropic
17
18
 
18
19
  attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
19
20
 
21
+ attr_reader strict: bool?
22
+
23
+ def strict=: (bool) -> bool
24
+
20
25
  def initialize: (
21
26
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
27
+ ?strict: bool,
22
28
  ?name: :memory,
23
29
  ?type: :memory_20250818
24
30
  ) -> void
@@ -26,7 +32,8 @@ module Anthropic
26
32
  def to_hash: -> {
27
33
  name: :memory,
28
34
  type: :memory_20250818,
29
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
35
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
36
+ strict: bool
30
37
  }
31
38
  end
32
39
  end
@@ -9,6 +9,7 @@ module Anthropic
9
9
  name: String,
10
10
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
11
  description: String,
12
+ strict: bool,
12
13
  type: Anthropic::Models::Beta::BetaTool::type_?
13
14
  }
14
15
 
@@ -23,6 +24,10 @@ module Anthropic
23
24
 
24
25
  def description=: (String) -> String
25
26
 
27
+ attr_reader strict: bool?
28
+
29
+ def strict=: (bool) -> bool
30
+
26
31
  attr_accessor type: Anthropic::Models::Beta::BetaTool::type_?
27
32
 
28
33
  def initialize: (
@@ -30,6 +35,7 @@ module Anthropic
30
35
  name: String,
31
36
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
32
37
  ?description: String,
38
+ ?strict: bool,
33
39
  ?type: Anthropic::Models::Beta::BetaTool::type_?
34
40
  ) -> void
35
41
 
@@ -38,6 +44,7 @@ module Anthropic
38
44
  name: String,
39
45
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
40
46
  description: String,
47
+ strict: bool,
41
48
  type: Anthropic::Models::Beta::BetaTool::type_?
42
49
  }
43
50
 
@@ -7,7 +7,8 @@ module Anthropic
7
7
  {
8
8
  name: :bash,
9
9
  type: :bash_20241022,
10
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
10
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
+ strict: bool
11
12
  }
12
13
 
13
14
  class BetaToolBash20241022 < Anthropic::Internal::Type::BaseModel
@@ -17,8 +18,13 @@ module Anthropic
17
18
 
18
19
  attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
19
20
 
21
+ attr_reader strict: bool?
22
+
23
+ def strict=: (bool) -> bool
24
+
20
25
  def initialize: (
21
26
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
27
+ ?strict: bool,
22
28
  ?name: :bash,
23
29
  ?type: :bash_20241022
24
30
  ) -> void
@@ -26,7 +32,8 @@ module Anthropic
26
32
  def to_hash: -> {
27
33
  name: :bash,
28
34
  type: :bash_20241022,
29
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
35
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
36
+ strict: bool
30
37
  }
31
38
  end
32
39
  end
@@ -7,7 +7,8 @@ module Anthropic
7
7
  {
8
8
  name: :bash,
9
9
  type: :bash_20250124,
10
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
10
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
11
+ strict: bool
11
12
  }
12
13
 
13
14
  class BetaToolBash20250124 < Anthropic::Internal::Type::BaseModel
@@ -17,8 +18,13 @@ module Anthropic
17
18
 
18
19
  attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
19
20
 
21
+ attr_reader strict: bool?
22
+
23
+ def strict=: (bool) -> bool
24
+
20
25
  def initialize: (
21
26
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
27
+ ?strict: bool,
22
28
  ?name: :bash,
23
29
  ?type: :bash_20250124
24
30
  ) -> void
@@ -26,7 +32,8 @@ module Anthropic
26
32
  def to_hash: -> {
27
33
  name: :bash,
28
34
  type: :bash_20250124,
29
- cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
35
+ cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
36
+ strict: bool
30
37
  }
31
38
  end
32
39
  end
@@ -10,7 +10,8 @@ module Anthropic
10
10
  name: :computer,
11
11
  type: :computer_20241022,
12
12
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
13
- display_number: Integer?
13
+ display_number: Integer?,
14
+ strict: bool
14
15
  }
15
16
 
16
17
  class BetaToolComputerUse20241022 < Anthropic::Internal::Type::BaseModel
@@ -26,11 +27,16 @@ module Anthropic
26
27
 
27
28
  attr_accessor display_number: Integer?
28
29
 
30
+ attr_reader strict: bool?
31
+
32
+ def strict=: (bool) -> bool
33
+
29
34
  def initialize: (
30
35
  display_height_px: Integer,
31
36
  display_width_px: Integer,
32
37
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
33
38
  ?display_number: Integer?,
39
+ ?strict: bool,
34
40
  ?name: :computer,
35
41
  ?type: :computer_20241022
36
42
  ) -> void
@@ -41,7 +47,8 @@ module Anthropic
41
47
  name: :computer,
42
48
  type: :computer_20241022,
43
49
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
44
- display_number: Integer?
50
+ display_number: Integer?,
51
+ strict: bool
45
52
  }
46
53
  end
47
54
  end
@@ -10,7 +10,8 @@ module Anthropic
10
10
  name: :computer,
11
11
  type: :computer_20250124,
12
12
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
13
- display_number: Integer?
13
+ display_number: Integer?,
14
+ strict: bool
14
15
  }
15
16
 
16
17
  class BetaToolComputerUse20250124 < Anthropic::Internal::Type::BaseModel
@@ -26,11 +27,16 @@ module Anthropic
26
27
 
27
28
  attr_accessor display_number: Integer?
28
29
 
30
+ attr_reader strict: bool?
31
+
32
+ def strict=: (bool) -> bool
33
+
29
34
  def initialize: (
30
35
  display_height_px: Integer,
31
36
  display_width_px: Integer,
32
37
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
33
38
  ?display_number: Integer?,
39
+ ?strict: bool,
34
40
  ?name: :computer,
35
41
  ?type: :computer_20250124
36
42
  ) -> void
@@ -41,7 +47,8 @@ module Anthropic
41
47
  name: :computer,
42
48
  type: :computer_20250124,
43
49
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
44
- display_number: Integer?
50
+ display_number: Integer?,
51
+ strict: bool
45
52
  }
46
53
  end
47
54
  end