anthropic 1.11.0 → 1.13.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 (177) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/streaming/message_stream.rb +3 -0
  5. data/lib/anthropic/internal/page_cursor.rb +92 -0
  6. data/lib/anthropic/internal/token_page.rb +92 -0
  7. data/lib/anthropic/internal/transport/pooled_net_requester.rb +30 -24
  8. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  9. data/lib/anthropic/models/beta/beta_all_thinking_turns.rb +19 -0
  10. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit.rb +48 -0
  11. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rb +36 -0
  12. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  13. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  14. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  15. data/lib/anthropic/models/beta/beta_context_management_config.rb +17 -5
  16. data/lib/anthropic/models/beta/beta_context_management_response.rb +16 -5
  17. data/lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb +3 -3
  18. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  19. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  20. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -3
  21. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  22. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  23. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  24. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  25. data/lib/anthropic/models/beta/beta_thinking_turns.rb +25 -0
  26. data/lib/anthropic/models/beta/beta_tool.rb +5 -3
  27. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +3 -3
  28. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  29. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  30. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  31. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  32. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  33. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  34. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  35. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  36. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  37. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  38. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  39. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  40. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  41. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  42. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  43. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  44. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  45. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  46. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  47. data/lib/anthropic/models/completion_create_params.rb +3 -4
  48. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  49. data/lib/anthropic/models/message_create_params.rb +13 -13
  50. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  51. data/lib/anthropic/models/model.rb +6 -20
  52. data/lib/anthropic/models/server_tool_use_block_param.rb +3 -3
  53. data/lib/anthropic/models/stop_reason.rb +0 -1
  54. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  55. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  56. data/lib/anthropic/models/tool.rb +5 -3
  57. data/lib/anthropic/models/tool_use_block_param.rb +3 -3
  58. data/lib/anthropic/resources/beta/messages.rb +5 -5
  59. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  60. data/lib/anthropic/resources/beta/skills.rb +144 -0
  61. data/lib/anthropic/resources/beta.rb +4 -0
  62. data/lib/anthropic/resources/completions.rb +4 -4
  63. data/lib/anthropic/version.rb +1 -1
  64. data/lib/anthropic.rb +27 -0
  65. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  66. data/rbi/anthropic/internal/token_page.rbi +25 -0
  67. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  68. data/rbi/anthropic/models/beta/beta_all_thinking_turns.rbi +30 -0
  69. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbi +109 -0
  70. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbi +61 -0
  71. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  72. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  73. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  74. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +51 -5
  75. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +32 -4
  76. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi +3 -3
  77. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi +3 -3
  78. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  79. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  80. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +3 -3
  81. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +3 -3
  82. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  83. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  84. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  85. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  86. data/rbi/anthropic/models/beta/beta_thinking_turns.rbi +33 -0
  87. data/rbi/anthropic/models/beta/beta_tool.rbi +3 -3
  88. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +8 -3
  89. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +3 -3
  90. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  91. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  92. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  93. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  94. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  95. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  96. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  97. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  98. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  99. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  100. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  101. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  102. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  103. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  104. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  105. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  106. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  107. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  108. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  109. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  110. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  111. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  112. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  113. data/rbi/anthropic/models/model.rbi +0 -11
  114. data/rbi/anthropic/models/server_tool_use_block.rbi +8 -3
  115. data/rbi/anthropic/models/server_tool_use_block_param.rbi +3 -3
  116. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  117. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  118. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  119. data/rbi/anthropic/models/tool.rbi +3 -3
  120. data/rbi/anthropic/models/tool_use_block.rbi +8 -3
  121. data/rbi/anthropic/models/tool_use_block_param.rbi +3 -3
  122. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  123. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  124. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  125. data/rbi/anthropic/resources/beta.rbi +3 -0
  126. data/rbi/anthropic/resources/completions.rbi +10 -12
  127. data/rbi/anthropic/resources/messages.rbi +31 -31
  128. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  129. data/sig/anthropic/internal/token_page.rbs +15 -0
  130. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  131. data/sig/anthropic/models/beta/beta_all_thinking_turns.rbs +17 -0
  132. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbs +44 -0
  133. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbs +34 -0
  134. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  135. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  136. data/sig/anthropic/models/beta/beta_context_management_config.rbs +18 -6
  137. data/sig/anthropic/models/beta/beta_context_management_response.rbs +14 -4
  138. data/sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs +4 -4
  139. data/sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs +4 -4
  140. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +4 -4
  141. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +4 -4
  142. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  143. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  144. data/sig/anthropic/models/beta/beta_thinking_turns.rbs +19 -0
  145. data/sig/anthropic/models/beta/beta_tool.rbs +8 -4
  146. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +9 -4
  147. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +4 -4
  148. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  149. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  150. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  151. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  152. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  153. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  154. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  155. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  156. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  157. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  158. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  159. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  160. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  161. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  162. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  163. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  164. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  165. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  166. data/sig/anthropic/models/model.rbs +0 -11
  167. data/sig/anthropic/models/server_tool_use_block.rbs +9 -4
  168. data/sig/anthropic/models/server_tool_use_block_param.rbs +4 -4
  169. data/sig/anthropic/models/stop_reason.rbs +0 -2
  170. data/sig/anthropic/models/tool.rbs +8 -4
  171. data/sig/anthropic/models/tool_use_block.rbs +9 -4
  172. data/sig/anthropic/models/tool_use_block_param.rbs +4 -4
  173. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  174. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  175. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  176. data/sig/anthropic/resources/beta.rbs +2 -0
  177. metadata +83 -2
@@ -0,0 +1,59 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_create_response =
6
+ {
7
+ id: String,
8
+ created_at: String,
9
+ description: String,
10
+ directory: String,
11
+ name: String,
12
+ skill_id: String,
13
+ type: String,
14
+ version: String
15
+ }
16
+
17
+ class VersionCreateResponse < Anthropic::Internal::Type::BaseModel
18
+ attr_accessor id: String
19
+
20
+ attr_accessor created_at: String
21
+
22
+ attr_accessor description: String
23
+
24
+ attr_accessor directory: String
25
+
26
+ attr_accessor name: String
27
+
28
+ attr_accessor skill_id: String
29
+
30
+ attr_accessor type: String
31
+
32
+ attr_accessor version: String
33
+
34
+ def initialize: (
35
+ id: String,
36
+ created_at: String,
37
+ description: String,
38
+ directory: String,
39
+ name: String,
40
+ skill_id: String,
41
+ type: String,
42
+ version: String
43
+ ) -> void
44
+
45
+ def to_hash: -> {
46
+ id: String,
47
+ created_at: String,
48
+ description: String,
49
+ directory: String,
50
+ name: String,
51
+ skill_id: String,
52
+ type: String,
53
+ version: String
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,39 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_delete_params =
6
+ {
7
+ skill_id: String,
8
+ betas: ::Array[Anthropic::Models::anthropic_beta]
9
+ }
10
+ & Anthropic::Internal::Type::request_parameters
11
+
12
+ class VersionDeleteParams < Anthropic::Internal::Type::BaseModel
13
+ extend Anthropic::Internal::Type::RequestParameters::Converter
14
+ include Anthropic::Internal::Type::RequestParameters
15
+
16
+ attr_accessor skill_id: String
17
+
18
+ attr_reader betas: ::Array[Anthropic::Models::anthropic_beta]?
19
+
20
+ def betas=: (
21
+ ::Array[Anthropic::Models::anthropic_beta]
22
+ ) -> ::Array[Anthropic::Models::anthropic_beta]
23
+
24
+ def initialize: (
25
+ skill_id: String,
26
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
27
+ ?request_options: Anthropic::request_opts
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ skill_id: String,
32
+ betas: ::Array[Anthropic::Models::anthropic_beta],
33
+ request_options: Anthropic::RequestOptions
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,19 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_delete_response = { id: String, type: String }
6
+
7
+ class VersionDeleteResponse < Anthropic::Internal::Type::BaseModel
8
+ attr_accessor id: String
9
+
10
+ attr_accessor type: String
11
+
12
+ def initialize: (id: String, type: String) -> void
13
+
14
+ def to_hash: -> { id: String, type: String }
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,44 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_list_params =
6
+ {
7
+ limit: Integer?,
8
+ page: String?,
9
+ betas: ::Array[Anthropic::Models::anthropic_beta]
10
+ }
11
+ & Anthropic::Internal::Type::request_parameters
12
+
13
+ class VersionListParams < Anthropic::Internal::Type::BaseModel
14
+ extend Anthropic::Internal::Type::RequestParameters::Converter
15
+ include Anthropic::Internal::Type::RequestParameters
16
+
17
+ attr_accessor limit: Integer?
18
+
19
+ attr_accessor page: String?
20
+
21
+ attr_reader betas: ::Array[Anthropic::Models::anthropic_beta]?
22
+
23
+ def betas=: (
24
+ ::Array[Anthropic::Models::anthropic_beta]
25
+ ) -> ::Array[Anthropic::Models::anthropic_beta]
26
+
27
+ def initialize: (
28
+ ?limit: Integer?,
29
+ ?page: String?,
30
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
31
+ ?request_options: Anthropic::request_opts
32
+ ) -> void
33
+
34
+ def to_hash: -> {
35
+ limit: Integer?,
36
+ page: String?,
37
+ betas: ::Array[Anthropic::Models::anthropic_beta],
38
+ request_options: Anthropic::RequestOptions
39
+ }
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,59 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_list_response =
6
+ {
7
+ id: String,
8
+ created_at: String,
9
+ description: String,
10
+ directory: String,
11
+ name: String,
12
+ skill_id: String,
13
+ type: String,
14
+ version: String
15
+ }
16
+
17
+ class VersionListResponse < Anthropic::Internal::Type::BaseModel
18
+ attr_accessor id: String
19
+
20
+ attr_accessor created_at: String
21
+
22
+ attr_accessor description: String
23
+
24
+ attr_accessor directory: String
25
+
26
+ attr_accessor name: String
27
+
28
+ attr_accessor skill_id: String
29
+
30
+ attr_accessor type: String
31
+
32
+ attr_accessor version: String
33
+
34
+ def initialize: (
35
+ id: String,
36
+ created_at: String,
37
+ description: String,
38
+ directory: String,
39
+ name: String,
40
+ skill_id: String,
41
+ type: String,
42
+ version: String
43
+ ) -> void
44
+
45
+ def to_hash: -> {
46
+ id: String,
47
+ created_at: String,
48
+ description: String,
49
+ directory: String,
50
+ name: String,
51
+ skill_id: String,
52
+ type: String,
53
+ version: String
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,39 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_retrieve_params =
6
+ {
7
+ skill_id: String,
8
+ betas: ::Array[Anthropic::Models::anthropic_beta]
9
+ }
10
+ & Anthropic::Internal::Type::request_parameters
11
+
12
+ class VersionRetrieveParams < Anthropic::Internal::Type::BaseModel
13
+ extend Anthropic::Internal::Type::RequestParameters::Converter
14
+ include Anthropic::Internal::Type::RequestParameters
15
+
16
+ attr_accessor skill_id: String
17
+
18
+ attr_reader betas: ::Array[Anthropic::Models::anthropic_beta]?
19
+
20
+ def betas=: (
21
+ ::Array[Anthropic::Models::anthropic_beta]
22
+ ) -> ::Array[Anthropic::Models::anthropic_beta]
23
+
24
+ def initialize: (
25
+ skill_id: String,
26
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
27
+ ?request_options: Anthropic::request_opts
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ skill_id: String,
32
+ betas: ::Array[Anthropic::Models::anthropic_beta],
33
+ request_options: Anthropic::RequestOptions
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,59 @@
1
+ module Anthropic
2
+ module Models
3
+ module Beta
4
+ module Skills
5
+ type version_retrieve_response =
6
+ {
7
+ id: String,
8
+ created_at: String,
9
+ description: String,
10
+ directory: String,
11
+ name: String,
12
+ skill_id: String,
13
+ type: String,
14
+ version: String
15
+ }
16
+
17
+ class VersionRetrieveResponse < Anthropic::Internal::Type::BaseModel
18
+ attr_accessor id: String
19
+
20
+ attr_accessor created_at: String
21
+
22
+ attr_accessor description: String
23
+
24
+ attr_accessor directory: String
25
+
26
+ attr_accessor name: String
27
+
28
+ attr_accessor skill_id: String
29
+
30
+ attr_accessor type: String
31
+
32
+ attr_accessor version: String
33
+
34
+ def initialize: (
35
+ id: String,
36
+ created_at: String,
37
+ description: String,
38
+ directory: String,
39
+ name: String,
40
+ skill_id: String,
41
+ type: String,
42
+ version: String
43
+ ) -> void
44
+
45
+ def to_hash: -> {
46
+ id: String,
47
+ created_at: String,
48
+ description: String,
49
+ directory: String,
50
+ name: String,
51
+ skill_id: String,
52
+ type: String,
53
+ version: String
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -12,9 +12,6 @@ module Anthropic
12
12
  | :"claude-4-sonnet-20250514"
13
13
  | :"claude-sonnet-4-5"
14
14
  | :"claude-sonnet-4-5-20250929"
15
- | :"claude-3-5-sonnet-latest"
16
- | :"claude-3-5-sonnet-20241022"
17
- | :"claude-3-5-sonnet-20240620"
18
15
  | :"claude-opus-4-0"
19
16
  | :"claude-opus-4-20250514"
20
17
  | :"claude-4-opus-20250514"
@@ -62,14 +59,6 @@ module Anthropic
62
59
  # Our best model for real-world agents and coding
63
60
  CLAUDE_SONNET_4_5_20250929: :"claude-sonnet-4-5-20250929"
64
61
 
65
- # Our previous most intelligent model
66
- CLAUDE_3_5_SONNET_LATEST: :"claude-3-5-sonnet-latest"
67
-
68
- # Our previous most intelligent model
69
- CLAUDE_3_5_SONNET_20241022: :"claude-3-5-sonnet-20241022"
70
-
71
- CLAUDE_3_5_SONNET_20240620: :"claude-3-5-sonnet-20240620"
72
-
73
62
  # Our most capable model
74
63
  CLAUDE_OPUS_4_0: :"claude-opus-4-0"
75
64
 
@@ -1,12 +1,17 @@
1
1
  module Anthropic
2
2
  module Models
3
3
  type server_tool_use_block =
4
- { id: String, input: top, name: :web_search, type: :server_tool_use }
4
+ {
5
+ id: String,
6
+ input: ::Hash[Symbol, top],
7
+ name: :web_search,
8
+ type: :server_tool_use
9
+ }
5
10
 
6
11
  class ServerToolUseBlock < Anthropic::Internal::Type::BaseModel
7
12
  attr_accessor id: String
8
13
 
9
- attr_accessor input: top
14
+ attr_accessor input: ::Hash[Symbol, top]
10
15
 
11
16
  attr_accessor name: :web_search
12
17
 
@@ -14,14 +19,14 @@ module Anthropic
14
19
 
15
20
  def initialize: (
16
21
  id: String,
17
- input: top,
22
+ input: ::Hash[Symbol, top],
18
23
  ?name: :web_search,
19
24
  ?type: :server_tool_use
20
25
  ) -> void
21
26
 
22
27
  def to_hash: -> {
23
28
  id: String,
24
- input: top,
29
+ input: ::Hash[Symbol, top],
25
30
  name: :web_search,
26
31
  type: :server_tool_use
27
32
  }
@@ -3,7 +3,7 @@ module Anthropic
3
3
  type server_tool_use_block_param =
4
4
  {
5
5
  id: String,
6
- input: top,
6
+ input: ::Hash[Symbol, top],
7
7
  name: :web_search,
8
8
  type: :server_tool_use,
9
9
  cache_control: Anthropic::CacheControlEphemeral?
@@ -12,7 +12,7 @@ module Anthropic
12
12
  class ServerToolUseBlockParam < Anthropic::Internal::Type::BaseModel
13
13
  attr_accessor id: String
14
14
 
15
- attr_accessor input: top
15
+ attr_accessor input: ::Hash[Symbol, top]
16
16
 
17
17
  attr_accessor name: :web_search
18
18
 
@@ -22,7 +22,7 @@ module Anthropic
22
22
 
23
23
  def initialize: (
24
24
  id: String,
25
- input: top,
25
+ input: ::Hash[Symbol, top],
26
26
  ?cache_control: Anthropic::CacheControlEphemeral?,
27
27
  ?name: :web_search,
28
28
  ?type: :server_tool_use
@@ -30,7 +30,7 @@ module Anthropic
30
30
 
31
31
  def to_hash: -> {
32
32
  id: String,
33
- input: top,
33
+ input: ::Hash[Symbol, top],
34
34
  name: :web_search,
35
35
  type: :server_tool_use,
36
36
  cache_control: Anthropic::CacheControlEphemeral?
@@ -7,7 +7,6 @@ module Anthropic
7
7
  | :tool_use
8
8
  | :pause_turn
9
9
  | :refusal
10
- | :model_context_window_exceeded
11
10
 
12
11
  module StopReason
13
12
  extend Anthropic::Internal::Type::Enum
@@ -18,7 +17,6 @@ module Anthropic
18
17
  TOOL_USE: :tool_use
19
18
  PAUSE_TURN: :pause_turn
20
19
  REFUSAL: :refusal
21
- MODEL_CONTEXT_WINDOW_EXCEEDED: :model_context_window_exceeded
22
20
 
23
21
  def self?.values: -> ::Array[Anthropic::Models::stop_reason]
24
22
  end
@@ -39,24 +39,28 @@ module Anthropic
39
39
  }
40
40
 
41
41
  type input_schema =
42
- { type: :object, properties: top?, required: ::Array[String]? }
42
+ {
43
+ type: :object,
44
+ properties: ::Hash[Symbol, top]?,
45
+ required: ::Array[String]?
46
+ }
43
47
 
44
48
  class InputSchema < Anthropic::Internal::Type::BaseModel
45
49
  attr_accessor type: :object
46
50
 
47
- attr_accessor properties: top?
51
+ attr_accessor properties: ::Hash[Symbol, top]?
48
52
 
49
53
  attr_accessor required: ::Array[String]?
50
54
 
51
55
  def initialize: (
52
- ?properties: top?,
56
+ ?properties: ::Hash[Symbol, top]?,
53
57
  ?required: ::Array[String]?,
54
58
  ?type: :object
55
59
  ) -> void
56
60
 
57
61
  def to_hash: -> {
58
62
  type: :object,
59
- properties: top?,
63
+ properties: ::Hash[Symbol, top]?,
60
64
  required: ::Array[String]?
61
65
  }
62
66
  end
@@ -1,12 +1,12 @@
1
1
  module Anthropic
2
2
  module Models
3
3
  type tool_use_block =
4
- { id: String, input: top, name: String, type: :tool_use }
4
+ { id: String, input: ::Hash[Symbol, top], name: String, type: :tool_use }
5
5
 
6
6
  class ToolUseBlock < Anthropic::Internal::Type::BaseModel
7
7
  attr_accessor id: String
8
8
 
9
- attr_accessor input: top
9
+ attr_accessor input: ::Hash[Symbol, top]
10
10
 
11
11
  attr_accessor name: String
12
12
 
@@ -14,12 +14,17 @@ module Anthropic
14
14
 
15
15
  def initialize: (
16
16
  id: String,
17
- input: top,
17
+ input: ::Hash[Symbol, top],
18
18
  name: String,
19
19
  ?type: :tool_use
20
20
  ) -> void
21
21
 
22
- def to_hash: -> { id: String, input: top, name: String, type: :tool_use }
22
+ def to_hash: -> {
23
+ id: String,
24
+ input: ::Hash[Symbol, top],
25
+ name: String,
26
+ type: :tool_use
27
+ }
23
28
  end
24
29
  end
25
30
  end
@@ -3,7 +3,7 @@ module Anthropic
3
3
  type tool_use_block_param =
4
4
  {
5
5
  id: String,
6
- input: top,
6
+ input: ::Hash[Symbol, top],
7
7
  name: String,
8
8
  type: :tool_use,
9
9
  cache_control: Anthropic::CacheControlEphemeral?
@@ -12,7 +12,7 @@ module Anthropic
12
12
  class ToolUseBlockParam < Anthropic::Internal::Type::BaseModel
13
13
  attr_accessor id: String
14
14
 
15
- attr_accessor input: top
15
+ attr_accessor input: ::Hash[Symbol, top]
16
16
 
17
17
  attr_accessor name: String
18
18
 
@@ -22,7 +22,7 @@ module Anthropic
22
22
 
23
23
  def initialize: (
24
24
  id: String,
25
- input: top,
25
+ input: ::Hash[Symbol, top],
26
26
  name: String,
27
27
  ?cache_control: Anthropic::CacheControlEphemeral?,
28
28
  ?type: :tool_use
@@ -30,7 +30,7 @@ module Anthropic
30
30
 
31
31
  def to_hash: -> {
32
32
  id: String,
33
- input: top,
33
+ input: ::Hash[Symbol, top],
34
34
  name: String,
35
35
  type: :tool_use,
36
36
  cache_control: Anthropic::CacheControlEphemeral?
@@ -8,7 +8,7 @@ module Anthropic
8
8
  max_tokens: Integer,
9
9
  messages: ::Array[Anthropic::Beta::BetaMessageParam],
10
10
  model: Anthropic::Models::model,
11
- ?container: String?,
11
+ ?container: Anthropic::Models::Beta::MessageCreateParams::container?,
12
12
  ?context_management: Anthropic::Beta::BetaContextManagementConfig?,
13
13
  ?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
14
14
  ?metadata: Anthropic::Beta::BetaMetadata,
@@ -29,7 +29,7 @@ module Anthropic
29
29
  max_tokens: Integer,
30
30
  messages: ::Array[Anthropic::Beta::BetaMessageParam],
31
31
  model: Anthropic::Models::model,
32
- ?container: String?,
32
+ ?container: Anthropic::Models::Beta::MessageCreateParams::container?,
33
33
  ?context_management: Anthropic::Beta::BetaContextManagementConfig?,
34
34
  ?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
35
35
  ?metadata: Anthropic::Beta::BetaMetadata,
@@ -0,0 +1,40 @@
1
+ module Anthropic
2
+ module Resources
3
+ class Beta
4
+ class Skills
5
+ class Versions
6
+ def create: (
7
+ String skill_id,
8
+ ?files: ::Array[Anthropic::Internal::file_input]?,
9
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
10
+ ?request_options: Anthropic::request_opts
11
+ ) -> Anthropic::Models::Beta::Skills::VersionCreateResponse
12
+
13
+ def retrieve: (
14
+ String version,
15
+ skill_id: String,
16
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
17
+ ?request_options: Anthropic::request_opts
18
+ ) -> Anthropic::Models::Beta::Skills::VersionRetrieveResponse
19
+
20
+ def list: (
21
+ String skill_id,
22
+ ?limit: Integer?,
23
+ ?page: String?,
24
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
25
+ ?request_options: Anthropic::request_opts
26
+ ) -> Anthropic::Internal::PageCursor[Anthropic::Models::Beta::Skills::VersionListResponse]
27
+
28
+ def delete: (
29
+ String version,
30
+ skill_id: String,
31
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
32
+ ?request_options: Anthropic::request_opts
33
+ ) -> Anthropic::Models::Beta::Skills::VersionDeleteResponse
34
+
35
+ def initialize: (client: Anthropic::Client) -> void
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,38 @@
1
+ module Anthropic
2
+ module Resources
3
+ class Beta
4
+ class Skills
5
+ attr_reader versions: Anthropic::Resources::Beta::Skills::Versions
6
+
7
+ def create: (
8
+ ?display_title: String?,
9
+ ?files: ::Array[Anthropic::Internal::file_input]?,
10
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
11
+ ?request_options: Anthropic::request_opts
12
+ ) -> Anthropic::Models::Beta::SkillCreateResponse
13
+
14
+ def retrieve: (
15
+ String skill_id,
16
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
17
+ ?request_options: Anthropic::request_opts
18
+ ) -> Anthropic::Models::Beta::SkillRetrieveResponse
19
+
20
+ def list: (
21
+ ?limit: Integer,
22
+ ?page: String?,
23
+ ?source: String?,
24
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
25
+ ?request_options: Anthropic::request_opts
26
+ ) -> Anthropic::Internal::PageCursor[Anthropic::Models::Beta::SkillListResponse]
27
+
28
+ def delete: (
29
+ String skill_id,
30
+ ?betas: ::Array[Anthropic::Models::anthropic_beta],
31
+ ?request_options: Anthropic::request_opts
32
+ ) -> Anthropic::Models::Beta::SkillDeleteResponse
33
+
34
+ def initialize: (client: Anthropic::Client) -> void
35
+ end
36
+ end
37
+ end
38
+ end
@@ -7,6 +7,8 @@ module Anthropic
7
7
 
8
8
  attr_reader files: Anthropic::Resources::Beta::Files
9
9
 
10
+ attr_reader skills: Anthropic::Resources::Beta::Skills
11
+
10
12
  def initialize: (client: Anthropic::Client) -> void
11
13
  end
12
14
  end