anthropic 1.11.0 → 1.12.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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/page_cursor.rb +92 -0
  5. data/lib/anthropic/internal/token_page.rb +92 -0
  6. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  7. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  8. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  9. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  10. data/lib/anthropic/models/beta/beta_context_management_config.rb +0 -2
  11. data/lib/anthropic/models/beta/beta_context_management_response.rb +0 -2
  12. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  13. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  14. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  15. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  16. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  17. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  18. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  19. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  20. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  21. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  22. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  23. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  24. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  25. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  26. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  27. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  28. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  29. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  30. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  31. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  32. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  33. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  34. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  35. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  36. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  37. data/lib/anthropic/models/completion_create_params.rb +3 -4
  38. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  39. data/lib/anthropic/models/message_create_params.rb +13 -13
  40. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  41. data/lib/anthropic/models/stop_reason.rb +0 -1
  42. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  43. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  44. data/lib/anthropic/resources/beta/messages.rb +5 -5
  45. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  46. data/lib/anthropic/resources/beta/skills.rb +144 -0
  47. data/lib/anthropic/resources/beta.rb +4 -0
  48. data/lib/anthropic/resources/completions.rb +4 -4
  49. data/lib/anthropic/version.rb +1 -1
  50. data/lib/anthropic.rb +23 -0
  51. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  52. data/rbi/anthropic/internal/token_page.rbi +25 -0
  53. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  54. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  55. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  56. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  57. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +0 -1
  58. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +0 -1
  59. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  60. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  61. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  62. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  63. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  64. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  65. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  66. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  67. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  68. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  69. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  70. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  71. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  72. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  73. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  74. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  75. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  76. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  77. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  78. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  79. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  80. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  81. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  82. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  83. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  84. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  85. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  86. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  87. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  88. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  89. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  90. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  91. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  92. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  93. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  94. data/rbi/anthropic/resources/beta.rbi +3 -0
  95. data/rbi/anthropic/resources/completions.rbi +10 -12
  96. data/rbi/anthropic/resources/messages.rbi +31 -31
  97. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  98. data/sig/anthropic/internal/token_page.rbs +15 -0
  99. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  100. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  101. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  102. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  103. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  104. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  105. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  106. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  107. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  108. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  109. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  110. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  111. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  112. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  113. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  114. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  115. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  116. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  117. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  118. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  119. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  120. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  121. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  122. data/sig/anthropic/models/stop_reason.rbs +0 -2
  123. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  124. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  125. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  126. data/sig/anthropic/resources/beta.rbs +2 -0
  127. metadata +71 -2
data/lib/anthropic.rb CHANGED
@@ -58,6 +58,8 @@ require_relative "anthropic/vertex"
58
58
  require_relative "anthropic/internal/stream"
59
59
  require_relative "anthropic/internal/jsonl_stream"
60
60
  require_relative "anthropic/internal/page"
61
+ require_relative "anthropic/internal/page_cursor"
62
+ require_relative "anthropic/internal/token_page"
61
63
  require_relative "anthropic/models/beta/beta_request_document_block"
62
64
  require_relative "anthropic/models/anthropic_beta"
63
65
  require_relative "anthropic/models/api_error_object"
@@ -106,6 +108,7 @@ require_relative "anthropic/models/beta/beta_code_execution_tool_result_error"
106
108
  require_relative "anthropic/models/beta/beta_code_execution_tool_result_error_code"
107
109
  require_relative "anthropic/models/beta/beta_code_execution_tool_result_error_param"
108
110
  require_relative "anthropic/models/beta/beta_container"
111
+ require_relative "anthropic/models/beta/beta_container_params"
109
112
  require_relative "anthropic/models/beta/beta_container_upload_block"
110
113
  require_relative "anthropic/models/beta/beta_container_upload_block_param"
111
114
  require_relative "anthropic/models/beta/beta_content_block"
@@ -158,6 +161,8 @@ require_relative "anthropic/models/beta/beta_server_tool_usage"
158
161
  require_relative "anthropic/models/beta/beta_server_tool_use_block"
159
162
  require_relative "anthropic/models/beta/beta_server_tool_use_block_param"
160
163
  require_relative "anthropic/models/beta/beta_signature_delta"
164
+ require_relative "anthropic/models/beta/beta_skill"
165
+ require_relative "anthropic/models/beta/beta_skill_params"
161
166
  require_relative "anthropic/models/beta/beta_stop_reason"
162
167
  require_relative "anthropic/models/beta/beta_text_block"
163
168
  require_relative "anthropic/models/beta/beta_text_block_param"
@@ -247,6 +252,22 @@ require_relative "anthropic/models/beta/messages/beta_message_batch_result"
247
252
  require_relative "anthropic/models/beta/messages/beta_message_batch_succeeded_result"
248
253
  require_relative "anthropic/models/beta/model_list_params"
249
254
  require_relative "anthropic/models/beta/model_retrieve_params"
255
+ require_relative "anthropic/models/beta/skill_create_params"
256
+ require_relative "anthropic/models/beta/skill_create_response"
257
+ require_relative "anthropic/models/beta/skill_delete_params"
258
+ require_relative "anthropic/models/beta/skill_delete_response"
259
+ require_relative "anthropic/models/beta/skill_list_params"
260
+ require_relative "anthropic/models/beta/skill_list_response"
261
+ require_relative "anthropic/models/beta/skill_retrieve_params"
262
+ require_relative "anthropic/models/beta/skill_retrieve_response"
263
+ require_relative "anthropic/models/beta/skills/version_create_params"
264
+ require_relative "anthropic/models/beta/skills/version_create_response"
265
+ require_relative "anthropic/models/beta/skills/version_delete_params"
266
+ require_relative "anthropic/models/beta/skills/version_delete_response"
267
+ require_relative "anthropic/models/beta/skills/version_list_params"
268
+ require_relative "anthropic/models/beta/skills/version_list_response"
269
+ require_relative "anthropic/models/beta/skills/version_retrieve_params"
270
+ require_relative "anthropic/models/beta/skills/version_retrieve_response"
250
271
  require_relative "anthropic/models/beta_api_error"
251
272
  require_relative "anthropic/models/beta_authentication_error"
252
273
  require_relative "anthropic/models/beta_billing_error"
@@ -381,6 +402,8 @@ require_relative "anthropic/resources/beta/files"
381
402
  require_relative "anthropic/resources/beta/messages"
382
403
  require_relative "anthropic/resources/beta/messages/batches"
383
404
  require_relative "anthropic/resources/beta/models"
405
+ require_relative "anthropic/resources/beta/skills"
406
+ require_relative "anthropic/resources/beta/skills/versions"
384
407
  require_relative "anthropic/resources/completions"
385
408
  require_relative "anthropic/resources/messages"
386
409
  require_relative "anthropic/resources/messages/batches"
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Internal
5
+ class PageCursor
6
+ include Anthropic::Internal::Type::BasePage
7
+
8
+ Elem = type_member
9
+
10
+ sig { returns(T.nilable(T::Array[Elem])) }
11
+ attr_accessor :data
12
+
13
+ sig { returns(T::Boolean) }
14
+ attr_accessor :has_more
15
+
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :next_page_
18
+
19
+ # @api private
20
+ sig { returns(String) }
21
+ def inspect
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Internal
5
+ class TokenPage
6
+ include Anthropic::Internal::Type::BasePage
7
+
8
+ Elem = type_member
9
+
10
+ sig { returns(T.nilable(T::Array[Elem])) }
11
+ attr_accessor :data
12
+
13
+ sig { returns(T::Boolean) }
14
+ attr_accessor :has_more
15
+
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :next_page_
18
+
19
+ # @api private
20
+ sig { returns(String) }
21
+ def inspect
22
+ end
23
+ end
24
+ end
25
+ end
@@ -85,6 +85,8 @@ module Anthropic
85
85
  :"model-context-window-exceeded-2025-08-26",
86
86
  Anthropic::AnthropicBeta::TaggedSymbol
87
87
  )
88
+ SKILLS_2025_10_02 =
89
+ T.let(:"skills-2025-10-02", Anthropic::AnthropicBeta::TaggedSymbol)
88
90
  end
89
91
  end
90
92
  end
@@ -27,7 +27,6 @@ module Anthropic
27
27
  sig { returns(Symbol) }
28
28
  attr_accessor :type
29
29
 
30
- # Results for clear_tool_uses_20250919 edit.
31
30
  sig do
32
31
  params(
33
32
  cleared_input_tokens: Integer,
@@ -19,18 +19,38 @@ module Anthropic
19
19
  sig { returns(Time) }
20
20
  attr_accessor :expires_at
21
21
 
22
+ # Skills loaded in the container
23
+ sig { returns(T.nilable(T::Array[Anthropic::Beta::BetaSkill])) }
24
+ attr_accessor :skills
25
+
22
26
  # Information about the container used in the request (for the code execution
23
27
  # tool)
24
- sig { params(id: String, expires_at: Time).returns(T.attached_class) }
28
+ sig do
29
+ params(
30
+ id: String,
31
+ expires_at: Time,
32
+ skills: T.nilable(T::Array[Anthropic::Beta::BetaSkill::OrHash])
33
+ ).returns(T.attached_class)
34
+ end
25
35
  def self.new(
26
36
  # Identifier for the container used in this request
27
37
  id:,
28
38
  # The time at which the container will expire.
29
- expires_at:
39
+ expires_at:,
40
+ # Skills loaded in the container
41
+ skills:
30
42
  )
31
43
  end
32
44
 
33
- sig { override.returns({ id: String, expires_at: Time }) }
45
+ sig do
46
+ override.returns(
47
+ {
48
+ id: String,
49
+ expires_at: Time,
50
+ skills: T.nilable(T::Array[Anthropic::Beta::BetaSkill])
51
+ }
52
+ )
53
+ end
34
54
  def to_hash
35
55
  end
36
56
  end
@@ -0,0 +1,54 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaContainerParams = Beta::BetaContainerParams
6
+
7
+ module Beta
8
+ class BetaContainerParams < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaContainerParams,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Container id
18
+ sig { returns(T.nilable(String)) }
19
+ attr_accessor :id
20
+
21
+ # List of skills to load in the container
22
+ sig { returns(T.nilable(T::Array[Anthropic::Beta::BetaSkillParams])) }
23
+ attr_accessor :skills
24
+
25
+ # Container parameters with skills to be loaded.
26
+ sig do
27
+ params(
28
+ id: T.nilable(String),
29
+ skills:
30
+ T.nilable(T::Array[Anthropic::Beta::BetaSkillParams::OrHash])
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ # Container id
35
+ id: nil,
36
+ # List of skills to load in the container
37
+ skills: nil
38
+ )
39
+ end
40
+
41
+ sig do
42
+ override.returns(
43
+ {
44
+ id: T.nilable(String),
45
+ skills: T.nilable(T::Array[Anthropic::Beta::BetaSkillParams])
46
+ }
47
+ )
48
+ end
49
+ def to_hash
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -30,7 +30,6 @@ module Anthropic
30
30
  end
31
31
  attr_writer :edits
32
32
 
33
- # Configuration for context management operations.
34
33
  sig do
35
34
  params(
36
35
  edits:
@@ -22,7 +22,6 @@ module Anthropic
22
22
  end
23
23
  attr_accessor :applied_edits
24
24
 
25
- # Information about context management operations applied during the request.
26
25
  sig do
27
26
  params(
28
27
  applied_edits:
@@ -64,7 +64,9 @@ module Anthropic
64
64
  sig { returns(T::Array[Anthropic::Beta::BetaContentBlock::Variants]) }
65
65
  attr_accessor :content
66
66
 
67
- # Information about context management operations applied during the request.
67
+ # Context management response.
68
+ #
69
+ # Information about context management strategies applied during the request.
68
70
  sig do
69
71
  returns(T.nilable(Anthropic::Beta::BetaContextManagementResponse))
70
72
  end
@@ -217,7 +219,9 @@ module Anthropic
217
219
  # [{ "type": "text", "text": "B)" }]
218
220
  # ```
219
221
  content:,
220
- # Information about context management operations applied during the request.
222
+ # Context management response.
223
+ #
224
+ # Information about context management strategies applied during the request.
221
225
  context_management:,
222
226
  # The model that will complete your prompt.\n\nSee
223
227
  # [models](https://docs.anthropic.com/en/docs/models-overview) for additional
@@ -14,7 +14,7 @@ module Anthropic
14
14
  )
15
15
  end
16
16
 
17
- # Information about context management operations applied during the request.
17
+ # Information about context management strategies applied during the request
18
18
  sig do
19
19
  returns(T.nilable(Anthropic::Beta::BetaContextManagementResponse))
20
20
  end
@@ -74,7 +74,7 @@ module Anthropic
74
74
  ).returns(T.attached_class)
75
75
  end
76
76
  def self.new(
77
- # Information about context management operations applied during the request.
77
+ # Information about context management strategies applied during the request
78
78
  context_management:,
79
79
  delta:,
80
80
  # Billing and rate-limit usage.
@@ -0,0 +1,80 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaSkill = Beta::BetaSkill
6
+
7
+ module Beta
8
+ class BetaSkill < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Anthropic::Beta::BetaSkill, Anthropic::Internal::AnyHash)
12
+ end
13
+
14
+ # Skill ID
15
+ sig { returns(String) }
16
+ attr_accessor :skill_id
17
+
18
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
19
+ sig { returns(Anthropic::Beta::BetaSkill::Type::TaggedSymbol) }
20
+ attr_accessor :type
21
+
22
+ # Skill version or 'latest' for most recent version
23
+ sig { returns(String) }
24
+ attr_accessor :version
25
+
26
+ # A skill that was loaded in a container (response model).
27
+ sig do
28
+ params(
29
+ skill_id: String,
30
+ type: Anthropic::Beta::BetaSkill::Type::OrSymbol,
31
+ version: String
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+ # Skill ID
36
+ skill_id:,
37
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
38
+ type:,
39
+ # Skill version or 'latest' for most recent version
40
+ version:
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ skill_id: String,
48
+ type: Anthropic::Beta::BetaSkill::Type::TaggedSymbol,
49
+ version: String
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+
56
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
57
+ module Type
58
+ extend Anthropic::Internal::Type::Enum
59
+
60
+ TaggedSymbol =
61
+ T.type_alias { T.all(Symbol, Anthropic::Beta::BetaSkill::Type) }
62
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
63
+
64
+ ANTHROPIC =
65
+ T.let(:anthropic, Anthropic::Beta::BetaSkill::Type::TaggedSymbol)
66
+ CUSTOM =
67
+ T.let(:custom, Anthropic::Beta::BetaSkill::Type::TaggedSymbol)
68
+
69
+ sig do
70
+ override.returns(
71
+ T::Array[Anthropic::Beta::BetaSkill::Type::TaggedSymbol]
72
+ )
73
+ end
74
+ def self.values
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,91 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaSkillParams = Beta::BetaSkillParams
6
+
7
+ module Beta
8
+ class BetaSkillParams < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaSkillParams,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Skill ID
18
+ sig { returns(String) }
19
+ attr_accessor :skill_id
20
+
21
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
22
+ sig { returns(Anthropic::Beta::BetaSkillParams::Type::OrSymbol) }
23
+ attr_accessor :type
24
+
25
+ # Skill version or 'latest' for most recent version
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :version
28
+
29
+ sig { params(version: String).void }
30
+ attr_writer :version
31
+
32
+ # Specification for a skill to be loaded in a container (request model).
33
+ sig do
34
+ params(
35
+ skill_id: String,
36
+ type: Anthropic::Beta::BetaSkillParams::Type::OrSymbol,
37
+ version: String
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ # Skill ID
42
+ skill_id:,
43
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
44
+ type:,
45
+ # Skill version or 'latest' for most recent version
46
+ version: nil
47
+ )
48
+ end
49
+
50
+ sig do
51
+ override.returns(
52
+ {
53
+ skill_id: String,
54
+ type: Anthropic::Beta::BetaSkillParams::Type::OrSymbol,
55
+ version: String
56
+ }
57
+ )
58
+ end
59
+ def to_hash
60
+ end
61
+
62
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
63
+ module Type
64
+ extend Anthropic::Internal::Type::Enum
65
+
66
+ TaggedSymbol =
67
+ T.type_alias do
68
+ T.all(Symbol, Anthropic::Beta::BetaSkillParams::Type)
69
+ end
70
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
71
+
72
+ ANTHROPIC =
73
+ T.let(
74
+ :anthropic,
75
+ Anthropic::Beta::BetaSkillParams::Type::TaggedSymbol
76
+ )
77
+ CUSTOM =
78
+ T.let(:custom, Anthropic::Beta::BetaSkillParams::Type::TaggedSymbol)
79
+
80
+ sig do
81
+ override.returns(
82
+ T::Array[Anthropic::Beta::BetaSkillParams::Type::TaggedSymbol]
83
+ )
84
+ end
85
+ def self.values
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
@@ -21,7 +21,7 @@ module Anthropic
21
21
  # Must be ≥1024 and less than `max_tokens`.
22
22
  #
23
23
  # See
24
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
24
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
25
25
  # for details.
26
26
  sig { returns(Integer) }
27
27
  attr_accessor :budget_tokens
@@ -40,7 +40,7 @@ module Anthropic
40
40
  # Must be ≥1024 and less than `max_tokens`.
41
41
  #
42
42
  # See
43
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
43
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
44
44
  # for details.
45
45
  budget_tokens:,
46
46
  type: :enabled
@@ -12,7 +12,7 @@ module Anthropic
12
12
  # tokens and counts towards your `max_tokens` limit.
13
13
  #
14
14
  # See
15
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
15
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
16
16
  # for details.
17
17
  module BetaThinkingConfigParam
18
18
  extend Anthropic::Internal::Type::Union
@@ -72,12 +72,12 @@ module Anthropic
72
72
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
73
73
  # ```
74
74
  #
75
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
75
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
76
76
  #
77
77
  # Note that if you want to include a
78
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
79
- # the top-level `system` parameter — there is no `"system"` role for input
80
- # messages in the Messages API.
78
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
79
+ # top-level `system` parameter — there is no `"system"` role for input messages in
80
+ # the Messages API.
81
81
  #
82
82
  # There is a limit of 100,000 messages in a single request.
83
83
  sig { returns(T::Array[Anthropic::Beta::BetaMessageParam]) }
@@ -89,7 +89,10 @@ module Anthropic
89
89
  sig { returns(T.any(Anthropic::Model::OrSymbol, String)) }
90
90
  attr_accessor :model
91
91
 
92
- # Configuration for context management operations.
92
+ # Context management configuration.
93
+ #
94
+ # This allows you to control how Claude manages context across multiple requests,
95
+ # such as whether to clear function results or not.
93
96
  sig { returns(T.nilable(Anthropic::Beta::BetaContextManagementConfig)) }
94
97
  attr_reader :context_management
95
98
 
@@ -125,7 +128,7 @@ module Anthropic
125
128
  #
126
129
  # A system prompt is a way of providing context and instructions to Claude, such
127
130
  # as specifying a particular goal or role. See our
128
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
131
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
129
132
  sig do
130
133
  returns(
131
134
  T.nilable(
@@ -149,7 +152,7 @@ module Anthropic
149
152
  # tokens and counts towards your `max_tokens` limit.
150
153
  #
151
154
  # See
152
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
155
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
153
156
  # for details.
154
157
  sig do
155
158
  returns(
@@ -212,9 +215,9 @@ module Anthropic
212
215
  #
213
216
  # There are two types of tools: **client tools** and **server tools**. The
214
217
  # behavior described below applies to client tools. For
215
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
218
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
216
219
  # see their individual documentation as each has its own behavior (e.g., the
217
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
220
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
218
221
  #
219
222
  # Each tool definition includes:
220
223
  #
@@ -277,7 +280,7 @@ module Anthropic
277
280
  # functions, or more generally whenever you want the model to produce a particular
278
281
  # JSON structure of output.
279
282
  #
280
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
283
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
281
284
  sig do
282
285
  returns(
283
286
  T.nilable(
@@ -451,12 +454,12 @@ module Anthropic
451
454
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
452
455
  # ```
453
456
  #
454
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
457
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
455
458
  #
456
459
  # Note that if you want to include a
457
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
458
- # the top-level `system` parameter — there is no `"system"` role for input
459
- # messages in the Messages API.
460
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
461
+ # top-level `system` parameter — there is no `"system"` role for input messages in
462
+ # the Messages API.
460
463
  #
461
464
  # There is a limit of 100,000 messages in a single request.
462
465
  messages:,
@@ -464,7 +467,10 @@ module Anthropic
464
467
  # [models](https://docs.anthropic.com/en/docs/models-overview) for additional
465
468
  # details and options.
466
469
  model:,
467
- # Configuration for context management operations.
470
+ # Context management configuration.
471
+ #
472
+ # This allows you to control how Claude manages context across multiple requests,
473
+ # such as whether to clear function results or not.
468
474
  context_management: nil,
469
475
  # MCP servers to be utilized in this request
470
476
  mcp_servers: nil,
@@ -472,7 +478,7 @@ module Anthropic
472
478
  #
473
479
  # A system prompt is a way of providing context and instructions to Claude, such
474
480
  # as specifying a particular goal or role. See our
475
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
481
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
476
482
  system_: nil,
477
483
  # Configuration for enabling Claude's extended thinking.
478
484
  #
@@ -481,7 +487,7 @@ module Anthropic
481
487
  # tokens and counts towards your `max_tokens` limit.
482
488
  #
483
489
  # See
484
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
490
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
485
491
  # for details.
486
492
  thinking: nil,
487
493
  # How the model should use the provided tools. The model can use a specific tool,
@@ -496,9 +502,9 @@ module Anthropic
496
502
  #
497
503
  # There are two types of tools: **client tools** and **server tools**. The
498
504
  # behavior described below applies to client tools. For
499
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
505
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
500
506
  # see their individual documentation as each has its own behavior (e.g., the
501
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
507
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
502
508
  #
503
509
  # Each tool definition includes:
504
510
  #
@@ -561,7 +567,7 @@ module Anthropic
561
567
  # functions, or more generally whenever you want the model to produce a particular
562
568
  # JSON structure of output.
563
569
  #
564
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
570
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
565
571
  tools: nil,
566
572
  # Optional header to specify the beta version(s) you want to use.
567
573
  betas: nil,
@@ -624,7 +630,7 @@ module Anthropic
624
630
  #
625
631
  # A system prompt is a way of providing context and instructions to Claude, such
626
632
  # as specifying a particular goal or role. See our
627
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
633
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
628
634
  module System
629
635
  extend Anthropic::Internal::Type::Union
630
636