anthropic 1.46.0 → 1.47.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/streaming/message_stream.rb +4 -0
  5. data/lib/anthropic/models/anthropic_beta.rb +6 -0
  6. data/lib/anthropic/models/beta/beta_content_block.rb +14 -1
  7. data/lib/anthropic/models/beta/beta_content_block_param.rb +18 -1
  8. data/lib/anthropic/models/beta/beta_fallback_block.rb +54 -0
  9. data/lib/anthropic/models/beta/beta_fallback_block_param.rb +51 -0
  10. data/lib/anthropic/models/beta/beta_fallback_info.rb +28 -0
  11. data/lib/anthropic/models/beta/beta_fallback_info_param.rb +28 -0
  12. data/lib/anthropic/models/beta/beta_fallback_message_iteration_usage.rb +81 -0
  13. data/lib/anthropic/models/beta/beta_fallback_param.rb +88 -0
  14. data/lib/anthropic/models/beta/beta_iterations_usage.rb +9 -1
  15. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +5 -0
  16. data/lib/anthropic/models/beta/beta_message.rb +2 -2
  17. data/lib/anthropic/models/beta/beta_message_delta_usage.rb +2 -2
  18. data/lib/anthropic/models/beta/beta_message_iteration_usage.rb +15 -1
  19. data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
  20. data/lib/anthropic/models/beta/beta_model_info.rb +11 -1
  21. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +16 -3
  22. data/lib/anthropic/models/beta/beta_refusal_stop_details.rb +64 -1
  23. data/lib/anthropic/models/beta/beta_usage.rb +2 -2
  24. data/lib/anthropic/models/beta/message_create_params.rb +39 -1
  25. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -1
  26. data/lib/anthropic/models/model.rb +13 -0
  27. data/lib/anthropic/models/refusal_stop_details.rb +1 -0
  28. data/lib/anthropic/resources/beta/messages.rb +10 -2
  29. data/lib/anthropic/version.rb +1 -1
  30. data/lib/anthropic.rb +6 -0
  31. data/rbi/anthropic/models/anthropic_beta.rbi +10 -0
  32. data/rbi/anthropic/models/beta/beta_content_block.rbi +2 -1
  33. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +2 -1
  34. data/rbi/anthropic/models/beta/beta_fallback_block.rbi +83 -0
  35. data/rbi/anthropic/models/beta/beta_fallback_block_param.rbi +81 -0
  36. data/rbi/anthropic/models/beta/beta_fallback_info.rbi +45 -0
  37. data/rbi/anthropic/models/beta/beta_fallback_info_param.rbi +47 -0
  38. data/rbi/anthropic/models/beta/beta_fallback_message_iteration_usage.rbi +113 -0
  39. data/rbi/anthropic/models/beta/beta_fallback_param.rbi +167 -0
  40. data/rbi/anthropic/models/beta/beta_iterations_usage.rbi +2 -1
  41. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +7 -0
  42. data/rbi/anthropic/models/beta/beta_message.rbi +2 -1
  43. data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +2 -1
  44. data/rbi/anthropic/models/beta/beta_message_iteration_usage.rbi +14 -0
  45. data/rbi/anthropic/models/beta/beta_model_info.rbi +12 -0
  46. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +4 -2
  47. data/rbi/anthropic/models/beta/beta_refusal_stop_details.rbi +105 -0
  48. data/rbi/anthropic/models/beta/beta_usage.rbi +2 -1
  49. data/rbi/anthropic/models/beta/message_create_params.rbi +58 -0
  50. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +62 -0
  51. data/rbi/anthropic/models/model.rbi +7 -0
  52. data/rbi/anthropic/models/refusal_stop_details.rbi +5 -0
  53. data/rbi/anthropic/resources/beta/messages.rbi +54 -0
  54. data/sig/anthropic/models/anthropic_beta.rbs +4 -0
  55. data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
  56. data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
  57. data/sig/anthropic/models/beta/beta_fallback_block.rbs +34 -0
  58. data/sig/anthropic/models/beta/beta_fallback_block_param.rbs +34 -0
  59. data/sig/anthropic/models/beta/beta_fallback_info.rbs +17 -0
  60. data/sig/anthropic/models/beta/beta_fallback_info_param.rbs +17 -0
  61. data/sig/anthropic/models/beta/beta_fallback_message_iteration_usage.rbs +54 -0
  62. data/sig/anthropic/models/beta/beta_fallback_param.rbs +66 -0
  63. data/sig/anthropic/models/beta/beta_iterations_usage.rbs +1 -0
  64. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +5 -1
  65. data/sig/anthropic/models/beta/beta_message_iteration_usage.rbs +5 -0
  66. data/sig/anthropic/models/beta/beta_model_info.rbs +5 -0
  67. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
  68. data/sig/anthropic/models/beta/beta_refusal_stop_details.rbs +17 -1
  69. data/sig/anthropic/models/beta/message_create_params.rbs +10 -0
  70. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +10 -0
  71. data/sig/anthropic/models/model.rbs +9 -1
  72. data/sig/anthropic/models/refusal_stop_details.rbs +2 -1
  73. data/sig/anthropic/resources/beta/messages.rbs +4 -0
  74. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a58b5713db9e1ef7b8abebd0a189176ddc46d1b28d04b8f072a32331a9d6be95
4
- data.tar.gz: dc427a2dd0b75d47dbbb8e2b71539e4f2de1ffd5844ac96a77ca0a38d8588de0
3
+ metadata.gz: c4bc5b547e144ce8912f64688a18447637a87c762639cb57e34605698cf26e9b
4
+ data.tar.gz: bfa5bfdf7451e6906b0f51e821495375c0b97226a3b8661994a4de82b533984b
5
5
  SHA512:
6
- metadata.gz: 40c8be3263202fb1abec20744d6448cd395d28a778c0375f104059038f26adc03f001e40e286afb5cb5c0d11045ed5e5fce106c96f9fbad46207c0331e1cec36
7
- data.tar.gz: 928a92d2e651601606d99d1bca07e5b46e601068b715478a53458d6a788a12791672df06bd80153efbc78cd9964fd2b18dc81c578b3c038a1bb59337279abd31
6
+ metadata.gz: 80450518d0be5fb60fe3b1d1f909ed2d0b6b740d6ecd38e6335a2235728dd0171a026c4654ba484a971e20de4626444b6f5ce6e8591cd83854b92266159bae11
7
+ data.tar.gz: 22072523e6e0df8c4530a54738498b6098d71b274bdd2b97de552a275105b6cb92f53f4102512ff7791834ad3e487f8790b411856342b3cf79cb67815004bb30
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.47.0 (2026-06-09)
4
+
5
+ Full Changelog: [v1.46.0...v1.47.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.46.0...v1.47.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add support for claude-mythos-5 and claude-fable-5, with support for server-side fallbacks on refusal ([41e21c3](https://github.com/anthropics/anthropic-sdk-ruby/commit/41e21c3a17ba4d5b930e50701ffc395844fb1dd9))
10
+
3
11
  ## 1.46.0 (2026-06-06)
4
12
 
5
13
  Full Changelog: [v1.45.0...v1.46.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.45.0...v1.46.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ Add to your application's Gemfile:
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.46.0"
18
+ gem "anthropic", "~> 1.47.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -113,6 +113,10 @@ module Anthropic
113
113
  return Anthropic::Internal::Type::Converter.coerce(Anthropic::Models::BetaMessage, event.message)
114
114
  in Anthropic::Models::RawContentBlockStartEvent | Anthropic::Models::BetaRawContentBlockStartEvent
115
115
  current_snapshot.content = (current_snapshot.content || []) + [event.content_block]
116
+
117
+ # The final hop's fallback block names the model that served the response —
118
+ # keeps the snapshot consistent with the relabeled non-streaming message.
119
+ current_snapshot.model = event.content_block.to.model if event.content_block.type == :fallback
116
120
  in Anthropic::Models::RawContentBlockDeltaEvent | Anthropic::Models::BetaRawContentBlockDeltaEvent
117
121
  content = current_snapshot.content[event.index]
118
122
 
@@ -59,6 +59,10 @@ module Anthropic
59
59
 
60
60
  variant const: -> { Anthropic::Models::AnthropicBeta::THINKING_TOKEN_COUNT_2026_05_13 }
61
61
 
62
+ variant const: -> { Anthropic::Models::AnthropicBeta::SERVER_SIDE_FALLBACK_2026_06_01 }
63
+
64
+ variant const: -> { Anthropic::Models::AnthropicBeta::FALLBACK_CREDIT_2026_06_01 }
65
+
62
66
  # @!method self.variants
63
67
  # @return [Array(String, Symbol)]
64
68
 
@@ -94,6 +98,8 @@ module Anthropic
94
98
  MANAGED_AGENTS_2026_04_01 = :"managed-agents-2026-04-01"
95
99
  CACHE_DIAGNOSIS_2026_04_07 = :"cache-diagnosis-2026-04-07"
96
100
  THINKING_TOKEN_COUNT_2026_05_13 = :"thinking-token-count-2026-05-13"
101
+ SERVER_SIDE_FALLBACK_2026_06_01 = :"server-side-fallback-2026-06-01"
102
+ FALLBACK_CREDIT_2026_06_01 = :"fallback-credit-2026-06-01"
97
103
 
98
104
  # @!endgroup
99
105
  end
@@ -48,8 +48,21 @@ module Anthropic
48
48
  # compaction blocks with null content; the server treats them as no-ops.
49
49
  variant :compaction, -> { Anthropic::Beta::BetaCompactionBlock }
50
50
 
51
+ # Marks the point in `content` where one model's output gives way to the next.
52
+ #
53
+ # One block appears per hop where a preceding model actually ran this turn and
54
+ # declined. A turn routed directly by the sticky decision has no such boundary
55
+ # and carries no block — the signal for whether a fallback model served the
56
+ # response is the presence of a `fallback_message` entry in
57
+ # `usage.iterations`, not this block.
58
+ #
59
+ # The block is treated like a server-tool content block for streaming: it
60
+ # arrives via the standard `content_block_start` / `content_block_stop`
61
+ # pair and carries no deltas.
62
+ variant :fallback, -> { Anthropic::Beta::BetaFallbackBlock }
63
+
51
64
  # @!method self.variants
52
- # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock)]
65
+ # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock, Anthropic::Models::Beta::BetaFallbackBlock)]
53
66
  end
54
67
  end
55
68
 
@@ -74,8 +74,25 @@ module Anthropic
74
74
  # point in the conversation, rather than only via the top-level `system` parameter.
75
75
  variant :mid_conv_system, -> { Anthropic::Beta::BetaMidConversationSystemBlockParam }
76
76
 
77
+ # A `fallback` block echoed back from a prior response.
78
+ #
79
+ # Accepted in `messages[].content` and never rendered into the prompt,
80
+ # not validated against the request's `fallbacks` chain or top-level
81
+ # `model`, and stripped before the sticky-routing cache key is computed.
82
+ #
83
+ # Callers should echo the assistant turn verbatim — block included. The
84
+ # block's position is load-bearing for thinking verification: the thinking
85
+ # runs on either side of a fallback hop carry independently-rooted
86
+ # verification hash chains, and this block is the only record of where one
87
+ # chain ends and the next begins. When thinking runs flank the boundary,
88
+ # omitting the block merges the runs into one contiguous span whose hashes
89
+ # cannot verify (the request is rejected), and moving it into the middle of
90
+ # a single run splits that run's chain and is likewise rejected; between
91
+ # non-thinking blocks the block's placement has no verification effect.
92
+ variant :fallback, -> { Anthropic::Beta::BetaFallbackBlockParam }
93
+
77
94
  # @!method self.variants
78
- # @return [Array(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam)]
95
+ # @return [Array(Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam, Anthropic::Models::Beta::BetaFallbackBlockParam)]
79
96
  end
80
97
  end
81
98
 
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute from
8
+ # The model whose output ends at this point — the model that declined at this hop.
9
+ # When the declining hop is the requested model, its `model` echoes the top-level
10
+ # `model` string the caller sent (alias or canonical); when the declining hop is a
11
+ # fallback model, its `model` is that model's canonical id.
12
+ #
13
+ # @return [Anthropic::Models::Beta::BetaFallbackInfo]
14
+ required :from, -> { Anthropic::Beta::BetaFallbackInfo }
15
+
16
+ # @!attribute to
17
+ # The fallback model producing the content that follows this block. Its `model` is
18
+ # always the canonical id.
19
+ #
20
+ # @return [Anthropic::Models::Beta::BetaFallbackInfo]
21
+ required :to, -> { Anthropic::Beta::BetaFallbackInfo }
22
+
23
+ # @!attribute type
24
+ #
25
+ # @return [Symbol, :fallback]
26
+ required :type, const: :fallback
27
+
28
+ # @!method initialize(from:, to:, type: :fallback)
29
+ # Some parameter documentations has been truncated, see
30
+ # {Anthropic::Models::Beta::BetaFallbackBlock} for more details.
31
+ #
32
+ # Marks the point in `content` where one model's output gives way to the next.
33
+ #
34
+ # One block appears per hop where a preceding model actually ran this turn and
35
+ # declined. A turn routed directly by the sticky decision has no such boundary and
36
+ # carries no block — the signal for whether a fallback model served the response
37
+ # is the presence of a `fallback_message` entry in `usage.iterations`, not this
38
+ # block.
39
+ #
40
+ # The block is treated like a server-tool content block for streaming: it arrives
41
+ # via the standard `content_block_start` / `content_block_stop` pair and carries
42
+ # no deltas.
43
+ #
44
+ # @param from [Anthropic::Models::Beta::BetaFallbackInfo] The model whose output ends at this point — the model that declined at this hop.
45
+ #
46
+ # @param to [Anthropic::Models::Beta::BetaFallbackInfo] The fallback model producing the content that follows this block. Its `model` is
47
+ #
48
+ # @param type [Symbol, :fallback]
49
+ end
50
+ end
51
+
52
+ BetaFallbackBlock = Beta::BetaFallbackBlock
53
+ end
54
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute from
8
+ # Identifies one hop of a fallback transition.
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaFallbackInfoParam]
11
+ required :from, -> { Anthropic::Beta::BetaFallbackInfoParam }
12
+
13
+ # @!attribute to
14
+ # Identifies one hop of a fallback transition.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaFallbackInfoParam]
17
+ required :to, -> { Anthropic::Beta::BetaFallbackInfoParam }
18
+
19
+ # @!attribute type
20
+ #
21
+ # @return [Symbol, :fallback]
22
+ required :type, const: :fallback
23
+
24
+ # @!method initialize(from:, to:, type: :fallback)
25
+ # A `fallback` block echoed back from a prior response.
26
+ #
27
+ # Accepted in `messages[].content` and never rendered into the prompt, not
28
+ # validated against the request's `fallbacks` chain or top-level `model`, and
29
+ # stripped before the sticky-routing cache key is computed.
30
+ #
31
+ # Callers should echo the assistant turn verbatim — block included. The block's
32
+ # position is load-bearing for thinking verification: the thinking runs on either
33
+ # side of a fallback hop carry independently-rooted verification hash chains, and
34
+ # this block is the only record of where one chain ends and the next begins. When
35
+ # thinking runs flank the boundary, omitting the block merges the runs into one
36
+ # contiguous span whose hashes cannot verify (the request is rejected), and moving
37
+ # it into the middle of a single run splits that run's chain and is likewise
38
+ # rejected; between non-thinking blocks the block's placement has no verification
39
+ # effect.
40
+ #
41
+ # @param from [Anthropic::Models::Beta::BetaFallbackInfoParam] Identifies one hop of a fallback transition.
42
+ #
43
+ # @param to [Anthropic::Models::Beta::BetaFallbackInfoParam] Identifies one hop of a fallback transition.
44
+ #
45
+ # @param type [Symbol, :fallback]
46
+ end
47
+ end
48
+
49
+ BetaFallbackBlockParam = Beta::BetaFallbackBlockParam
50
+ end
51
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackInfo < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute model
8
+ # The model that will complete your prompt.
9
+ #
10
+ # See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
11
+ # details and options.
12
+ #
13
+ # @return [Symbol, String, Anthropic::Models::Model]
14
+ required :model, union: -> { Anthropic::Model }
15
+
16
+ # @!method initialize(model:)
17
+ # Some parameter documentations has been truncated, see
18
+ # {Anthropic::Models::Beta::BetaFallbackInfo} for more details.
19
+ #
20
+ # Identifies one hop of a fallback transition.
21
+ #
22
+ # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.
23
+ end
24
+ end
25
+
26
+ BetaFallbackInfo = Beta::BetaFallbackInfo
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackInfoParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute model
8
+ # The model that will complete your prompt.
9
+ #
10
+ # See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
11
+ # details and options.
12
+ #
13
+ # @return [Symbol, String, Anthropic::Models::Model]
14
+ required :model, union: -> { Anthropic::Model }
15
+
16
+ # @!method initialize(model:)
17
+ # Some parameter documentations has been truncated, see
18
+ # {Anthropic::Models::Beta::BetaFallbackInfoParam} for more details.
19
+ #
20
+ # Identifies one hop of a fallback transition.
21
+ #
22
+ # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.
23
+ end
24
+ end
25
+
26
+ BetaFallbackInfoParam = Beta::BetaFallbackInfoParam
27
+ end
28
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackMessageIterationUsage < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute cache_creation
8
+ # Breakdown of cached tokens by TTL
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaCacheCreation, nil]
11
+ required :cache_creation, -> { Anthropic::Beta::BetaCacheCreation }, nil?: true
12
+
13
+ # @!attribute cache_creation_input_tokens
14
+ # The number of input tokens used to create the cache entry.
15
+ #
16
+ # @return [Integer]
17
+ required :cache_creation_input_tokens, Integer
18
+
19
+ # @!attribute cache_read_input_tokens
20
+ # The number of input tokens read from the cache.
21
+ #
22
+ # @return [Integer]
23
+ required :cache_read_input_tokens, Integer
24
+
25
+ # @!attribute input_tokens
26
+ # The number of input tokens which were used.
27
+ #
28
+ # @return [Integer]
29
+ required :input_tokens, Integer
30
+
31
+ # @!attribute model
32
+ # The model that will complete your prompt.
33
+ #
34
+ # See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
35
+ # details and options.
36
+ #
37
+ # @return [Symbol, String, Anthropic::Models::Model]
38
+ required :model, union: -> { Anthropic::Model }
39
+
40
+ # @!attribute output_tokens
41
+ # The number of output tokens which were used.
42
+ #
43
+ # @return [Integer]
44
+ required :output_tokens, Integer
45
+
46
+ # @!attribute type
47
+ # Usage for the fallback-model attempt that served the response
48
+ #
49
+ # @return [Symbol, :fallback_message]
50
+ required :type, const: :fallback_message
51
+
52
+ # @!method initialize(cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:, type: :fallback_message)
53
+ # Some parameter documentations has been truncated, see
54
+ # {Anthropic::Models::Beta::BetaFallbackMessageIterationUsage} for more details.
55
+ #
56
+ # Token usage for the fallback-model attempt of a server-side fallback request.
57
+ #
58
+ # Produced in place of a `message` entry for whichever hop served the response. A
59
+ # declined hop produces the existing `message` entry. Whether a fallback model
60
+ # served the response is signalled by the presence of this entry in
61
+ # `usage.iterations`.
62
+ #
63
+ # @param cache_creation [Anthropic::Models::Beta::BetaCacheCreation, nil] Breakdown of cached tokens by TTL
64
+ #
65
+ # @param cache_creation_input_tokens [Integer] The number of input tokens used to create the cache entry.
66
+ #
67
+ # @param cache_read_input_tokens [Integer] The number of input tokens read from the cache.
68
+ #
69
+ # @param input_tokens [Integer] The number of input tokens which were used.
70
+ #
71
+ # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.
72
+ #
73
+ # @param output_tokens [Integer] The number of output tokens which were used.
74
+ #
75
+ # @param type [Symbol, :fallback_message] Usage for the fallback-model attempt that served the response
76
+ end
77
+ end
78
+
79
+ BetaFallbackMessageIterationUsage = Beta::BetaFallbackMessageIterationUsage
80
+ end
81
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaFallbackParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute model
8
+ # The model that will complete your prompt.
9
+ #
10
+ # See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
11
+ # details and options.
12
+ #
13
+ # @return [Symbol, String, Anthropic::Models::Model]
14
+ required :model, union: -> { Anthropic::Model }
15
+
16
+ # @!attribute max_tokens
17
+ #
18
+ # @return [Integer, nil]
19
+ optional :max_tokens, Integer, nil?: true
20
+
21
+ # @!attribute output_config
22
+ #
23
+ # @return [Anthropic::Models::Beta::BetaOutputConfig, nil]
24
+ optional :output_config, -> { Anthropic::Beta::BetaOutputConfig }, nil?: true
25
+
26
+ # @!attribute speed
27
+ #
28
+ # @return [Symbol, Anthropic::Models::Beta::BetaFallbackParam::Speed, nil]
29
+ optional :speed, enum: -> { Anthropic::Beta::BetaFallbackParam::Speed }, nil?: true
30
+
31
+ # @!attribute thinking
32
+ #
33
+ # @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
34
+ optional :thinking, union: -> { Anthropic::Beta::BetaFallbackParam::Thinking }, nil?: true
35
+
36
+ # @!method initialize(model:, max_tokens: nil, output_config: nil, speed: nil, thinking: nil)
37
+ # Some parameter documentations has been truncated, see
38
+ # {Anthropic::Models::Beta::BetaFallbackParam} for more details.
39
+ #
40
+ # One entry in the `fallbacks` chain on a `/v1/messages` request.
41
+ #
42
+ # `model` is required. The four override fields (`max_tokens`, `thinking`,
43
+ # `output_config`, and `speed`) replace the corresponding top-level field for this
44
+ # attempt only and are validated as if the request were made to `model`. Any other
45
+ # key is rejected at parse time.
46
+ #
47
+ # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.
48
+ #
49
+ # @param max_tokens [Integer, nil]
50
+ #
51
+ # @param output_config [Anthropic::Models::Beta::BetaOutputConfig, nil]
52
+ #
53
+ # @param speed [Symbol, Anthropic::Models::Beta::BetaFallbackParam::Speed, nil]
54
+ #
55
+ # @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
56
+
57
+ # @see Anthropic::Models::Beta::BetaFallbackParam#speed
58
+ module Speed
59
+ extend Anthropic::Internal::Type::Enum
60
+
61
+ STANDARD = :standard
62
+ FAST = :fast
63
+
64
+ # @!method self.values
65
+ # @return [Array<Symbol>]
66
+ end
67
+
68
+ # @see Anthropic::Models::Beta::BetaFallbackParam#thinking
69
+ module Thinking
70
+ extend Anthropic::Internal::Type::Union
71
+
72
+ discriminator :type
73
+
74
+ variant :enabled, -> { Anthropic::Beta::BetaThinkingConfigEnabled }
75
+
76
+ variant :disabled, -> { Anthropic::Beta::BetaThinkingConfigDisabled }
77
+
78
+ variant :adaptive, -> { Anthropic::Beta::BetaThinkingConfigAdaptive }
79
+
80
+ # @!method self.variants
81
+ # @return [Array(Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive)]
82
+ end
83
+ end
84
+ end
85
+
86
+ BetaFallbackParam = Beta::BetaFallbackParam
87
+ end
88
+ end
@@ -18,8 +18,16 @@ module Anthropic
18
18
  # Token usage for an advisor sub-inference iteration.
19
19
  variant :advisor_message, -> { Anthropic::Beta::BetaAdvisorMessageIterationUsage }
20
20
 
21
+ # Token usage for the fallback-model attempt of a server-side fallback request.
22
+ #
23
+ # Produced in place of a `message` entry for whichever hop served the
24
+ # response. A declined hop produces the existing `message` entry. Whether
25
+ # a fallback model served the response is signalled by the presence of this
26
+ # entry in `usage.iterations`.
27
+ variant :fallback_message, -> { Anthropic::Beta::BetaFallbackMessageIterationUsage }
28
+
21
29
  # @!method self.variants
22
- # @return [Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage)]
30
+ # @return [Array(Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage, Anthropic::Models::Beta::BetaFallbackMessageIterationUsage)]
23
31
  end
24
32
 
25
33
  # @type [Anthropic::Internal::Type::Converter]
@@ -10,6 +10,8 @@ module Anthropic
10
10
  module BetaManagedAgentsModel
11
11
  extend Anthropic::Internal::Type::Union
12
12
 
13
+ variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_FABLE_5 }
14
+
13
15
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_OPUS_4_8 }
14
16
 
15
17
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_OPUS_4_7 }
@@ -41,6 +43,9 @@ module Anthropic
41
43
 
42
44
  # @!group
43
45
 
46
+ # Next generation of intelligence for the hardest knowledge work and coding problems
47
+ CLAUDE_FABLE_5 = :"claude-fable-5"
48
+
44
49
  # Frontier intelligence for long-running agents and coding
45
50
  CLAUDE_OPUS_4_8 = :"claude-opus-4-8"
46
51
 
@@ -56,7 +56,7 @@ module Anthropic
56
56
  # [{ "type": "text", "text": "B)" }]
57
57
  # ```
58
58
  #
59
- # @return [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock>]
59
+ # @return [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock, Anthropic::Models::Beta::BetaFallbackBlock>]
60
60
  required :content, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaContentBlock] }
61
61
 
62
62
  # parsed value of response when a JSON output schema object has been specified via :output_format
@@ -174,7 +174,7 @@ module Anthropic
174
174
  #
175
175
  # @param container [Anthropic::Models::Beta::BetaContainer, nil] Information about the container used in the request (for the code execution tool
176
176
  #
177
- # @param content [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock>] Content generated by the model.
177
+ # @param content [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaAdvisorToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaCompactionBlock, Anthropic::Models::Beta::BetaFallbackBlock>] Content generated by the model.
178
178
  #
179
179
  # @param context_management [Anthropic::Models::Beta::BetaContextManagementResponse, nil] Context management response.
180
180
  #
@@ -32,7 +32,7 @@ module Anthropic
32
32
  # - Calculate the true context window size from the last iteration
33
33
  # - Understand token accumulation across server-side tool use loops
34
34
  #
35
- # @return [Array<Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage>, nil]
35
+ # @return [Array<Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage, Anthropic::Models::Beta::BetaFallbackMessageIterationUsage>, nil]
36
36
  required :iterations,
37
37
  -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaIterationsUsageItem] },
38
38
  nil?: true
@@ -70,7 +70,7 @@ module Anthropic
70
70
  #
71
71
  # @param input_tokens [Integer, nil] The cumulative number of input tokens which were used.
72
72
  #
73
- # @param iterations [Array<Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage>, nil] Per-iteration token usage breakdown.
73
+ # @param iterations [Array<Anthropic::Models::Beta::BetaMessageIterationUsage, Anthropic::Models::Beta::BetaCompactionIterationUsage, Anthropic::Models::Beta::BetaAdvisorMessageIterationUsage, Anthropic::Models::Beta::BetaFallbackMessageIterationUsage>, nil] Per-iteration token usage breakdown.
74
74
  #
75
75
  # @param output_tokens [Integer] The cumulative number of output tokens which were used.
76
76
  #
@@ -28,6 +28,15 @@ module Anthropic
28
28
  # @return [Integer]
29
29
  required :input_tokens, Integer
30
30
 
31
+ # @!attribute model
32
+ # The model that will complete your prompt.
33
+ #
34
+ # See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
35
+ # details and options.
36
+ #
37
+ # @return [Symbol, String, Anthropic::Models::Model]
38
+ required :model, union: -> { Anthropic::Model }
39
+
31
40
  # @!attribute output_tokens
32
41
  # The number of output tokens which were used.
33
42
  #
@@ -40,7 +49,10 @@ module Anthropic
40
49
  # @return [Symbol, :message]
41
50
  required :type, const: :message
42
51
 
43
- # @!method initialize(cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, output_tokens:, type: :message)
52
+ # @!method initialize(cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, model:, output_tokens:, type: :message)
53
+ # Some parameter documentations has been truncated, see
54
+ # {Anthropic::Models::Beta::BetaMessageIterationUsage} for more details.
55
+ #
44
56
  # Token usage for a sampling iteration.
45
57
  #
46
58
  # @param cache_creation [Anthropic::Models::Beta::BetaCacheCreation, nil] Breakdown of cached tokens by TTL
@@ -51,6 +63,8 @@ module Anthropic
51
63
  #
52
64
  # @param input_tokens [Integer] The number of input tokens which were used.
53
65
  #
66
+ # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.
67
+ #
54
68
  # @param output_tokens [Integer] The number of output tokens which were used.
55
69
  #
56
70
  # @param type [Symbol, :message] Usage for a sampling iteration
@@ -6,7 +6,7 @@ module Anthropic
6
6
  class BetaMessageParam < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute content
8
8
  #
9
- # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam>]
9
+ # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam, Anthropic::Models::Beta::BetaFallbackBlockParam>]
10
10
  required :content, union: -> { Anthropic::Beta::BetaMessageParam::Content }
11
11
 
12
12
  # @!attribute role
@@ -15,7 +15,7 @@ module Anthropic
15
15
  required :role, enum: -> { Anthropic::Beta::BetaMessageParam::Role }
16
16
 
17
17
  # @!method initialize(content:, role:)
18
- # @param content [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam>]
18
+ # @param content [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam, Anthropic::Models::Beta::BetaFallbackBlockParam>]
19
19
  # @param role [Symbol, Anthropic::Models::Beta::BetaMessageParam::Role]
20
20
 
21
21
  # @see Anthropic::Models::Beta::BetaMessageParam#content
@@ -27,7 +27,7 @@ module Anthropic
27
27
  variant -> { Anthropic::Models::Beta::BetaMessageParam::Content::BetaContentBlockParamArray }
28
28
 
29
29
  # @!method self.variants
30
- # @return [Array(String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam>)]
30
+ # @return [Array(String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaAdvisorToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam, Anthropic::Models::Beta::BetaCompactionBlockParam, Anthropic::Models::Beta::BetaMidConversationSystemBlockParam, Anthropic::Models::Beta::BetaFallbackBlockParam>)]
31
31
 
32
32
  # @type [Anthropic::Internal::Type::Converter]
33
33
  BetaContentBlockParamArray =