anthropic 1.12.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/streaming/message_stream.rb +3 -0
  5. data/lib/anthropic/internal/transport/pooled_net_requester.rb +30 -24
  6. data/lib/anthropic/models/beta/beta_all_thinking_turns.rb +19 -0
  7. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit.rb +48 -0
  8. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rb +36 -0
  9. data/lib/anthropic/models/beta/beta_context_management_config.rb +17 -3
  10. data/lib/anthropic/models/beta/beta_context_management_response.rb +16 -3
  11. data/lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb +3 -3
  12. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -3
  13. data/lib/anthropic/models/beta/beta_thinking_turns.rb +25 -0
  14. data/lib/anthropic/models/beta/beta_tool.rb +5 -3
  15. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +3 -3
  16. data/lib/anthropic/models/model.rb +6 -20
  17. data/lib/anthropic/models/server_tool_use_block_param.rb +3 -3
  18. data/lib/anthropic/models/tool.rb +5 -3
  19. data/lib/anthropic/models/tool_use_block_param.rb +3 -3
  20. data/lib/anthropic/version.rb +1 -1
  21. data/lib/anthropic.rb +4 -0
  22. data/rbi/anthropic/models/beta/beta_all_thinking_turns.rbi +30 -0
  23. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbi +109 -0
  24. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbi +61 -0
  25. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +51 -4
  26. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +32 -3
  27. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi +3 -3
  28. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi +3 -3
  29. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +3 -3
  30. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +3 -3
  31. data/rbi/anthropic/models/beta/beta_thinking_turns.rbi +33 -0
  32. data/rbi/anthropic/models/beta/beta_tool.rbi +3 -3
  33. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +8 -3
  34. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +3 -3
  35. data/rbi/anthropic/models/model.rbi +0 -11
  36. data/rbi/anthropic/models/server_tool_use_block.rbi +8 -3
  37. data/rbi/anthropic/models/server_tool_use_block_param.rbi +3 -3
  38. data/rbi/anthropic/models/tool.rbi +3 -3
  39. data/rbi/anthropic/models/tool_use_block.rbi +8 -3
  40. data/rbi/anthropic/models/tool_use_block_param.rbi +3 -3
  41. data/sig/anthropic/models/beta/beta_all_thinking_turns.rbs +17 -0
  42. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbs +44 -0
  43. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbs +34 -0
  44. data/sig/anthropic/models/beta/beta_context_management_config.rbs +18 -6
  45. data/sig/anthropic/models/beta/beta_context_management_response.rbs +14 -4
  46. data/sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs +4 -4
  47. data/sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs +4 -4
  48. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +4 -4
  49. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +4 -4
  50. data/sig/anthropic/models/beta/beta_thinking_turns.rbs +19 -0
  51. data/sig/anthropic/models/beta/beta_tool.rbs +8 -4
  52. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +9 -4
  53. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +4 -4
  54. data/sig/anthropic/models/model.rbs +0 -11
  55. data/sig/anthropic/models/server_tool_use_block.rbs +9 -4
  56. data/sig/anthropic/models/server_tool_use_block_param.rbs +4 -4
  57. data/sig/anthropic/models/tool.rbs +8 -4
  58. data/sig/anthropic/models/tool_use_block.rbs +9 -4
  59. data/sig/anthropic/models/tool_use_block_param.rbs +4 -4
  60. metadata +14 -2
@@ -11,7 +11,7 @@ module Anthropic
11
11
  sig { returns(String) }
12
12
  attr_accessor :id
13
13
 
14
- sig { returns(T.anything) }
14
+ sig { returns(T::Hash[Symbol, T.anything]) }
15
15
  attr_accessor :input
16
16
 
17
17
  sig { returns(String) }
@@ -34,7 +34,7 @@ module Anthropic
34
34
  sig do
35
35
  params(
36
36
  id: String,
37
- input: T.anything,
37
+ input: T::Hash[Symbol, T.anything],
38
38
  name: String,
39
39
  cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
40
40
  type: Symbol
@@ -54,7 +54,7 @@ module Anthropic
54
54
  override.returns(
55
55
  {
56
56
  id: String,
57
- input: T.anything,
57
+ input: T::Hash[Symbol, T.anything],
58
58
  name: String,
59
59
  type: Symbol,
60
60
  cache_control: T.nilable(Anthropic::CacheControlEphemeral)
@@ -0,0 +1,17 @@
1
+ module Anthropic
2
+ module Models
3
+ class BetaAllThinkingTurns = Beta::BetaAllThinkingTurns
4
+
5
+ module Beta
6
+ type beta_all_thinking_turns = { type: :all }
7
+
8
+ class BetaAllThinkingTurns < Anthropic::Internal::Type::BaseModel
9
+ attr_accessor type: :all
10
+
11
+ def initialize: (?type: :all) -> void
12
+
13
+ def to_hash: -> { type: :all }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,44 @@
1
+ module Anthropic
2
+ module Models
3
+ class BetaClearThinking20251015Edit = Beta::BetaClearThinking20251015Edit
4
+
5
+ module Beta
6
+ type beta_clear_thinking20251015_edit =
7
+ {
8
+ type: :clear_thinking_20251015,
9
+ keep: Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep
10
+ }
11
+
12
+ class BetaClearThinking20251015Edit < Anthropic::Internal::Type::BaseModel
13
+ attr_accessor type: :clear_thinking_20251015
14
+
15
+ attr_reader keep: Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep?
16
+
17
+ def keep=: (
18
+ Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep
19
+ ) -> Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep
20
+
21
+ def initialize: (
22
+ ?keep: Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep,
23
+ ?type: :clear_thinking_20251015
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ type: :clear_thinking_20251015,
28
+ keep: Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep
29
+ }
30
+
31
+ type keep =
32
+ Anthropic::Beta::BetaThinkingTurns
33
+ | Anthropic::Beta::BetaAllThinkingTurns
34
+ | :all
35
+
36
+ module Keep
37
+ extend Anthropic::Internal::Type::Union
38
+
39
+ def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaClearThinking20251015Edit::keep]
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,34 @@
1
+ module Anthropic
2
+ module Models
3
+ class BetaClearThinking20251015EditResponse = Beta::BetaClearThinking20251015EditResponse
4
+
5
+ module Beta
6
+ type beta_clear_thinking20251015_edit_response =
7
+ {
8
+ cleared_input_tokens: Integer,
9
+ cleared_thinking_turns: Integer,
10
+ type: :clear_thinking_20251015
11
+ }
12
+
13
+ class BetaClearThinking20251015EditResponse < Anthropic::Internal::Type::BaseModel
14
+ attr_accessor cleared_input_tokens: Integer
15
+
16
+ attr_accessor cleared_thinking_turns: Integer
17
+
18
+ attr_accessor type: :clear_thinking_20251015
19
+
20
+ def initialize: (
21
+ cleared_input_tokens: Integer,
22
+ cleared_thinking_turns: Integer,
23
+ ?type: :clear_thinking_20251015
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ cleared_input_tokens: Integer,
28
+ cleared_thinking_turns: Integer,
29
+ type: :clear_thinking_20251015
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -4,22 +4,34 @@ module Anthropic
4
4
 
5
5
  module Beta
6
6
  type beta_context_management_config =
7
- { edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit] }
7
+ {
8
+ edits: ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
9
+ }
8
10
 
9
11
  class BetaContextManagementConfig < Anthropic::Internal::Type::BaseModel
10
- attr_reader edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit]?
12
+ attr_reader edits: ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]?
11
13
 
12
14
  def edits=: (
13
- ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit]
14
- ) -> ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit]
15
+ ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
16
+ ) -> ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
15
17
 
16
18
  def initialize: (
17
- ?edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit]
19
+ ?edits: ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
18
20
  ) -> void
19
21
 
20
22
  def to_hash: -> {
21
- edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919Edit]
23
+ edits: ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
22
24
  }
25
+
26
+ type edit =
27
+ Anthropic::Beta::BetaClearToolUses20250919Edit
28
+ | Anthropic::Beta::BetaClearThinking20251015Edit
29
+
30
+ module Edit
31
+ extend Anthropic::Internal::Type::Union
32
+
33
+ def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
34
+ end
23
35
  end
24
36
  end
25
37
  end
@@ -5,19 +5,29 @@ module Anthropic
5
5
  module Beta
6
6
  type beta_context_management_response =
7
7
  {
8
- applied_edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
8
+ applied_edits: ::Array[Anthropic::Models::Beta::BetaContextManagementResponse::applied_edit]
9
9
  }
10
10
 
11
11
  class BetaContextManagementResponse < Anthropic::Internal::Type::BaseModel
12
- attr_accessor applied_edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
12
+ attr_accessor applied_edits: ::Array[Anthropic::Models::Beta::BetaContextManagementResponse::applied_edit]
13
13
 
14
14
  def initialize: (
15
- applied_edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
15
+ applied_edits: ::Array[Anthropic::Models::Beta::BetaContextManagementResponse::applied_edit]
16
16
  ) -> void
17
17
 
18
18
  def to_hash: -> {
19
- applied_edits: ::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
19
+ applied_edits: ::Array[Anthropic::Models::Beta::BetaContextManagementResponse::applied_edit]
20
20
  }
21
+
22
+ type applied_edit =
23
+ Anthropic::Beta::BetaClearToolUses20250919EditResponse
24
+ | Anthropic::Beta::BetaClearThinking20251015EditResponse
25
+
26
+ module AppliedEdit
27
+ extend Anthropic::Internal::Type::Union
28
+
29
+ def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaContextManagementResponse::applied_edit]
30
+ end
21
31
  end
22
32
  end
23
33
  end
@@ -6,7 +6,7 @@ module Anthropic
6
6
  type beta_mcp_tool_use_block =
7
7
  {
8
8
  id: String,
9
- input: top,
9
+ input: ::Hash[Symbol, top],
10
10
  name: String,
11
11
  server_name: String,
12
12
  type: :mcp_tool_use
@@ -15,7 +15,7 @@ module Anthropic
15
15
  class BetaMCPToolUseBlock < Anthropic::Internal::Type::BaseModel
16
16
  attr_accessor id: String
17
17
 
18
- attr_accessor input: top
18
+ attr_accessor input: ::Hash[Symbol, top]
19
19
 
20
20
  attr_accessor name: String
21
21
 
@@ -25,7 +25,7 @@ module Anthropic
25
25
 
26
26
  def initialize: (
27
27
  id: String,
28
- input: top,
28
+ input: ::Hash[Symbol, top],
29
29
  name: String,
30
30
  server_name: String,
31
31
  ?type: :mcp_tool_use
@@ -33,7 +33,7 @@ module Anthropic
33
33
 
34
34
  def to_hash: -> {
35
35
  id: String,
36
- input: top,
36
+ input: ::Hash[Symbol, top],
37
37
  name: String,
38
38
  server_name: String,
39
39
  type: :mcp_tool_use
@@ -6,7 +6,7 @@ module Anthropic
6
6
  type beta_mcp_tool_use_block_param =
7
7
  {
8
8
  id: String,
9
- input: top,
9
+ input: ::Hash[Symbol, top],
10
10
  name: String,
11
11
  server_name: String,
12
12
  type: :mcp_tool_use,
@@ -16,7 +16,7 @@ module Anthropic
16
16
  class BetaMCPToolUseBlockParam < Anthropic::Internal::Type::BaseModel
17
17
  attr_accessor id: String
18
18
 
19
- attr_accessor input: top
19
+ attr_accessor input: ::Hash[Symbol, top]
20
20
 
21
21
  attr_accessor name: String
22
22
 
@@ -28,7 +28,7 @@ module Anthropic
28
28
 
29
29
  def initialize: (
30
30
  id: String,
31
- input: top,
31
+ input: ::Hash[Symbol, top],
32
32
  name: String,
33
33
  server_name: String,
34
34
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
@@ -37,7 +37,7 @@ module Anthropic
37
37
 
38
38
  def to_hash: -> {
39
39
  id: String,
40
- input: top,
40
+ input: ::Hash[Symbol, top],
41
41
  name: String,
42
42
  server_name: String,
43
43
  type: :mcp_tool_use,
@@ -6,7 +6,7 @@ module Anthropic
6
6
  type beta_server_tool_use_block =
7
7
  {
8
8
  id: String,
9
- input: top,
9
+ input: ::Hash[Symbol, top],
10
10
  name: Anthropic::Models::Beta::BetaServerToolUseBlock::name_,
11
11
  type: :server_tool_use
12
12
  }
@@ -14,7 +14,7 @@ module Anthropic
14
14
  class BetaServerToolUseBlock < Anthropic::Internal::Type::BaseModel
15
15
  attr_accessor id: String
16
16
 
17
- attr_accessor input: top
17
+ attr_accessor input: ::Hash[Symbol, top]
18
18
 
19
19
  attr_accessor name: Anthropic::Models::Beta::BetaServerToolUseBlock::name_
20
20
 
@@ -22,14 +22,14 @@ module Anthropic
22
22
 
23
23
  def initialize: (
24
24
  id: String,
25
- input: top,
25
+ input: ::Hash[Symbol, top],
26
26
  name: Anthropic::Models::Beta::BetaServerToolUseBlock::name_,
27
27
  ?type: :server_tool_use
28
28
  ) -> void
29
29
 
30
30
  def to_hash: -> {
31
31
  id: String,
32
- input: top,
32
+ input: ::Hash[Symbol, top],
33
33
  name: Anthropic::Models::Beta::BetaServerToolUseBlock::name_,
34
34
  type: :server_tool_use
35
35
  }
@@ -6,7 +6,7 @@ module Anthropic
6
6
  type beta_server_tool_use_block_param =
7
7
  {
8
8
  id: String,
9
- input: top,
9
+ input: ::Hash[Symbol, top],
10
10
  name: Anthropic::Models::Beta::BetaServerToolUseBlockParam::name_,
11
11
  type: :server_tool_use,
12
12
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
@@ -15,7 +15,7 @@ module Anthropic
15
15
  class BetaServerToolUseBlockParam < Anthropic::Internal::Type::BaseModel
16
16
  attr_accessor id: String
17
17
 
18
- attr_accessor input: top
18
+ attr_accessor input: ::Hash[Symbol, top]
19
19
 
20
20
  attr_accessor name: Anthropic::Models::Beta::BetaServerToolUseBlockParam::name_
21
21
 
@@ -25,7 +25,7 @@ module Anthropic
25
25
 
26
26
  def initialize: (
27
27
  id: String,
28
- input: top,
28
+ input: ::Hash[Symbol, top],
29
29
  name: Anthropic::Models::Beta::BetaServerToolUseBlockParam::name_,
30
30
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
31
31
  ?type: :server_tool_use
@@ -33,7 +33,7 @@ module Anthropic
33
33
 
34
34
  def to_hash: -> {
35
35
  id: String,
36
- input: top,
36
+ input: ::Hash[Symbol, top],
37
37
  name: Anthropic::Models::Beta::BetaServerToolUseBlockParam::name_,
38
38
  type: :server_tool_use,
39
39
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
@@ -0,0 +1,19 @@
1
+ module Anthropic
2
+ module Models
3
+ class BetaThinkingTurns = Beta::BetaThinkingTurns
4
+
5
+ module Beta
6
+ type beta_thinking_turns = { type: :thinking_turns, value: Integer }
7
+
8
+ class BetaThinkingTurns < Anthropic::Internal::Type::BaseModel
9
+ attr_accessor type: :thinking_turns
10
+
11
+ attr_accessor value: Integer
12
+
13
+ def initialize: (value: Integer, ?type: :thinking_turns) -> void
14
+
15
+ def to_hash: -> { type: :thinking_turns, value: Integer }
16
+ end
17
+ end
18
+ end
19
+ end
@@ -42,24 +42,28 @@ module Anthropic
42
42
  }
43
43
 
44
44
  type input_schema =
45
- { type: :object, properties: top?, required: ::Array[String]? }
45
+ {
46
+ type: :object,
47
+ properties: ::Hash[Symbol, top]?,
48
+ required: ::Array[String]?
49
+ }
46
50
 
47
51
  class InputSchema < Anthropic::Internal::Type::BaseModel
48
52
  attr_accessor type: :object
49
53
 
50
- attr_accessor properties: top?
54
+ attr_accessor properties: ::Hash[Symbol, top]?
51
55
 
52
56
  attr_accessor required: ::Array[String]?
53
57
 
54
58
  def initialize: (
55
- ?properties: top?,
59
+ ?properties: ::Hash[Symbol, top]?,
56
60
  ?required: ::Array[String]?,
57
61
  ?type: :object
58
62
  ) -> void
59
63
 
60
64
  def to_hash: -> {
61
65
  type: :object,
62
- properties: top?,
66
+ properties: ::Hash[Symbol, top]?,
63
67
  required: ::Array[String]?
64
68
  }
65
69
  end
@@ -4,12 +4,17 @@ module Anthropic
4
4
 
5
5
  module Beta
6
6
  type beta_tool_use_block =
7
- { id: String, input: top, name: String, type: :tool_use }
7
+ {
8
+ id: String,
9
+ input: ::Hash[Symbol, top],
10
+ name: String,
11
+ type: :tool_use
12
+ }
8
13
 
9
14
  class BetaToolUseBlock < Anthropic::Internal::Type::BaseModel
10
15
  attr_accessor id: String
11
16
 
12
- attr_accessor input: top
17
+ attr_accessor input: ::Hash[Symbol, top]
13
18
 
14
19
  attr_accessor name: String
15
20
 
@@ -17,14 +22,14 @@ module Anthropic
17
22
 
18
23
  def initialize: (
19
24
  id: String,
20
- input: top,
25
+ input: ::Hash[Symbol, top],
21
26
  name: String,
22
27
  ?type: :tool_use
23
28
  ) -> void
24
29
 
25
30
  def to_hash: -> {
26
31
  id: String,
27
- input: top,
32
+ input: ::Hash[Symbol, top],
28
33
  name: String,
29
34
  type: :tool_use
30
35
  }
@@ -6,7 +6,7 @@ module Anthropic
6
6
  type beta_tool_use_block_param =
7
7
  {
8
8
  id: String,
9
- input: top,
9
+ input: ::Hash[Symbol, top],
10
10
  name: String,
11
11
  type: :tool_use,
12
12
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
@@ -15,7 +15,7 @@ module Anthropic
15
15
  class BetaToolUseBlockParam < Anthropic::Internal::Type::BaseModel
16
16
  attr_accessor id: String
17
17
 
18
- attr_accessor input: top
18
+ attr_accessor input: ::Hash[Symbol, top]
19
19
 
20
20
  attr_accessor name: String
21
21
 
@@ -25,7 +25,7 @@ module Anthropic
25
25
 
26
26
  def initialize: (
27
27
  id: String,
28
- input: top,
28
+ input: ::Hash[Symbol, top],
29
29
  name: String,
30
30
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
31
31
  ?type: :tool_use
@@ -33,7 +33,7 @@ module Anthropic
33
33
 
34
34
  def to_hash: -> {
35
35
  id: String,
36
- input: top,
36
+ input: ::Hash[Symbol, top],
37
37
  name: String,
38
38
  type: :tool_use,
39
39
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
@@ -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?
@@ -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?