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
@@ -0,0 +1,109 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaClearThinking20251015Edit = Beta::BetaClearThinking20251015Edit
6
+
7
+ module Beta
8
+ class BetaClearThinking20251015Edit < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaClearThinking20251015Edit,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Symbol) }
18
+ attr_accessor :type
19
+
20
+ # Number of most recent assistant turns to keep thinking blocks for. Older turns
21
+ # will have their thinking blocks removed.
22
+ sig do
23
+ returns(
24
+ T.nilable(
25
+ T.any(
26
+ Anthropic::Beta::BetaThinkingTurns,
27
+ Anthropic::Beta::BetaAllThinkingTurns,
28
+ Symbol
29
+ )
30
+ )
31
+ )
32
+ end
33
+ attr_reader :keep
34
+
35
+ sig do
36
+ params(
37
+ keep:
38
+ T.any(
39
+ Anthropic::Beta::BetaThinkingTurns::OrHash,
40
+ Anthropic::Beta::BetaAllThinkingTurns::OrHash,
41
+ Symbol
42
+ )
43
+ ).void
44
+ end
45
+ attr_writer :keep
46
+
47
+ sig do
48
+ params(
49
+ keep:
50
+ T.any(
51
+ Anthropic::Beta::BetaThinkingTurns::OrHash,
52
+ Anthropic::Beta::BetaAllThinkingTurns::OrHash,
53
+ Symbol
54
+ ),
55
+ type: Symbol
56
+ ).returns(T.attached_class)
57
+ end
58
+ def self.new(
59
+ # Number of most recent assistant turns to keep thinking blocks for. Older turns
60
+ # will have their thinking blocks removed.
61
+ keep: nil,
62
+ type: :clear_thinking_20251015
63
+ )
64
+ end
65
+
66
+ sig do
67
+ override.returns(
68
+ {
69
+ type: Symbol,
70
+ keep:
71
+ T.any(
72
+ Anthropic::Beta::BetaThinkingTurns,
73
+ Anthropic::Beta::BetaAllThinkingTurns,
74
+ Symbol
75
+ )
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+
82
+ # Number of most recent assistant turns to keep thinking blocks for. Older turns
83
+ # will have their thinking blocks removed.
84
+ module Keep
85
+ extend Anthropic::Internal::Type::Union
86
+
87
+ Variants =
88
+ T.type_alias do
89
+ T.any(
90
+ Anthropic::Beta::BetaThinkingTurns,
91
+ Anthropic::Beta::BetaAllThinkingTurns,
92
+ Symbol
93
+ )
94
+ end
95
+
96
+ sig do
97
+ override.returns(
98
+ T::Array[
99
+ Anthropic::Beta::BetaClearThinking20251015Edit::Keep::Variants
100
+ ]
101
+ )
102
+ end
103
+ def self.variants
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,61 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaClearThinking20251015EditResponse =
6
+ Beta::BetaClearThinking20251015EditResponse
7
+
8
+ module Beta
9
+ class BetaClearThinking20251015EditResponse < Anthropic::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::BetaClearThinking20251015EditResponse,
14
+ Anthropic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Number of input tokens cleared by this edit.
19
+ sig { returns(Integer) }
20
+ attr_accessor :cleared_input_tokens
21
+
22
+ # Number of thinking turns that were cleared.
23
+ sig { returns(Integer) }
24
+ attr_accessor :cleared_thinking_turns
25
+
26
+ # The type of context management edit applied.
27
+ sig { returns(Symbol) }
28
+ attr_accessor :type
29
+
30
+ sig do
31
+ params(
32
+ cleared_input_tokens: Integer,
33
+ cleared_thinking_turns: Integer,
34
+ type: Symbol
35
+ ).returns(T.attached_class)
36
+ end
37
+ def self.new(
38
+ # Number of input tokens cleared by this edit.
39
+ cleared_input_tokens:,
40
+ # Number of thinking turns that were cleared.
41
+ cleared_thinking_turns:,
42
+ # The type of context management edit applied.
43
+ type: :clear_thinking_20251015
44
+ )
45
+ end
46
+
47
+ sig do
48
+ override.returns(
49
+ {
50
+ cleared_input_tokens: Integer,
51
+ cleared_thinking_turns: Integer,
52
+ type: Symbol
53
+ }
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -17,7 +17,14 @@ module Anthropic
17
17
  # List of context management edits to apply
18
18
  sig do
19
19
  returns(
20
- T.nilable(T::Array[Anthropic::Beta::BetaClearToolUses20250919Edit])
20
+ T.nilable(
21
+ T::Array[
22
+ T.any(
23
+ Anthropic::Beta::BetaClearToolUses20250919Edit,
24
+ Anthropic::Beta::BetaClearThinking20251015Edit
25
+ )
26
+ ]
27
+ )
21
28
  )
22
29
  end
23
30
  attr_reader :edits
@@ -25,7 +32,12 @@ module Anthropic
25
32
  sig do
26
33
  params(
27
34
  edits:
28
- T::Array[Anthropic::Beta::BetaClearToolUses20250919Edit::OrHash]
35
+ T::Array[
36
+ T.any(
37
+ Anthropic::Beta::BetaClearToolUses20250919Edit::OrHash,
38
+ Anthropic::Beta::BetaClearThinking20251015Edit::OrHash
39
+ )
40
+ ]
29
41
  ).void
30
42
  end
31
43
  attr_writer :edits
@@ -33,7 +45,12 @@ module Anthropic
33
45
  sig do
34
46
  params(
35
47
  edits:
36
- T::Array[Anthropic::Beta::BetaClearToolUses20250919Edit::OrHash]
48
+ T::Array[
49
+ T.any(
50
+ Anthropic::Beta::BetaClearToolUses20250919Edit::OrHash,
51
+ Anthropic::Beta::BetaClearThinking20251015Edit::OrHash
52
+ )
53
+ ]
37
54
  ).returns(T.attached_class)
38
55
  end
39
56
  def self.new(
@@ -44,11 +61,41 @@ module Anthropic
44
61
 
45
62
  sig do
46
63
  override.returns(
47
- { edits: T::Array[Anthropic::Beta::BetaClearToolUses20250919Edit] }
64
+ {
65
+ edits:
66
+ T::Array[
67
+ T.any(
68
+ Anthropic::Beta::BetaClearToolUses20250919Edit,
69
+ Anthropic::Beta::BetaClearThinking20251015Edit
70
+ )
71
+ ]
72
+ }
48
73
  )
49
74
  end
50
75
  def to_hash
51
76
  end
77
+
78
+ module Edit
79
+ extend Anthropic::Internal::Type::Union
80
+
81
+ Variants =
82
+ T.type_alias do
83
+ T.any(
84
+ Anthropic::Beta::BetaClearToolUses20250919Edit,
85
+ Anthropic::Beta::BetaClearThinking20251015Edit
86
+ )
87
+ end
88
+
89
+ sig do
90
+ override.returns(
91
+ T::Array[
92
+ Anthropic::Beta::BetaContextManagementConfig::Edit::Variants
93
+ ]
94
+ )
95
+ end
96
+ def self.variants
97
+ end
98
+ end
52
99
  end
53
100
  end
54
101
  end
@@ -17,7 +17,9 @@ module Anthropic
17
17
  # List of context management edits that were applied.
18
18
  sig do
19
19
  returns(
20
- T::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
20
+ T::Array[
21
+ Anthropic::Beta::BetaContextManagementResponse::AppliedEdit::Variants
22
+ ]
21
23
  )
22
24
  end
23
25
  attr_accessor :applied_edits
@@ -26,7 +28,10 @@ module Anthropic
26
28
  params(
27
29
  applied_edits:
28
30
  T::Array[
29
- Anthropic::Beta::BetaClearToolUses20250919EditResponse::OrHash
31
+ T.any(
32
+ Anthropic::Beta::BetaClearToolUses20250919EditResponse::OrHash,
33
+ Anthropic::Beta::BetaClearThinking20251015EditResponse::OrHash
34
+ )
30
35
  ]
31
36
  ).returns(T.attached_class)
32
37
  end
@@ -40,12 +45,36 @@ module Anthropic
40
45
  override.returns(
41
46
  {
42
47
  applied_edits:
43
- T::Array[Anthropic::Beta::BetaClearToolUses20250919EditResponse]
48
+ T::Array[
49
+ Anthropic::Beta::BetaContextManagementResponse::AppliedEdit::Variants
50
+ ]
44
51
  }
45
52
  )
46
53
  end
47
54
  def to_hash
48
55
  end
56
+
57
+ module AppliedEdit
58
+ extend Anthropic::Internal::Type::Union
59
+
60
+ Variants =
61
+ T.type_alias do
62
+ T.any(
63
+ Anthropic::Beta::BetaClearToolUses20250919EditResponse,
64
+ Anthropic::Beta::BetaClearThinking20251015EditResponse
65
+ )
66
+ end
67
+
68
+ sig do
69
+ override.returns(
70
+ T::Array[
71
+ Anthropic::Beta::BetaContextManagementResponse::AppliedEdit::Variants
72
+ ]
73
+ )
74
+ end
75
+ def self.variants
76
+ end
77
+ end
49
78
  end
50
79
  end
51
80
  end
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  # The name of the MCP tool
@@ -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
  server_name: String,
40
40
  type: Symbol
@@ -55,7 +55,7 @@ module Anthropic
55
55
  override.returns(
56
56
  {
57
57
  id: String,
58
- input: T.anything,
58
+ input: T::Hash[Symbol, T.anything],
59
59
  name: String,
60
60
  server_name: String,
61
61
  type: Symbol
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  sig { returns(String) }
@@ -45,7 +45,7 @@ module Anthropic
45
45
  sig do
46
46
  params(
47
47
  id: String,
48
- input: T.anything,
48
+ input: T::Hash[Symbol, T.anything],
49
49
  name: String,
50
50
  server_name: String,
51
51
  cache_control:
@@ -69,7 +69,7 @@ module Anthropic
69
69
  override.returns(
70
70
  {
71
71
  id: String,
72
- input: T.anything,
72
+ input: T::Hash[Symbol, T.anything],
73
73
  name: String,
74
74
  server_name: String,
75
75
  type: Symbol,
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  sig do
@@ -31,7 +31,7 @@ module Anthropic
31
31
  sig do
32
32
  params(
33
33
  id: String,
34
- input: T.anything,
34
+ input: T::Hash[Symbol, T.anything],
35
35
  name: Anthropic::Beta::BetaServerToolUseBlock::Name::OrSymbol,
36
36
  type: Symbol
37
37
  ).returns(T.attached_class)
@@ -43,7 +43,7 @@ module Anthropic
43
43
  override.returns(
44
44
  {
45
45
  id: String,
46
- input: T.anything,
46
+ input: T::Hash[Symbol, T.anything],
47
47
  name: Anthropic::Beta::BetaServerToolUseBlock::Name::TaggedSymbol,
48
48
  type: Symbol
49
49
  }
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  sig do
@@ -43,7 +43,7 @@ module Anthropic
43
43
  sig do
44
44
  params(
45
45
  id: String,
46
- input: T.anything,
46
+ input: T::Hash[Symbol, T.anything],
47
47
  name: Anthropic::Beta::BetaServerToolUseBlockParam::Name::OrSymbol,
48
48
  cache_control:
49
49
  T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
@@ -64,7 +64,7 @@ module Anthropic
64
64
  override.returns(
65
65
  {
66
66
  id: String,
67
- input: T.anything,
67
+ input: T::Hash[Symbol, T.anything],
68
68
  name:
69
69
  Anthropic::Beta::BetaServerToolUseBlockParam::Name::OrSymbol,
70
70
  type: Symbol,
@@ -0,0 +1,33 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ BetaThinkingTurns = Beta::BetaThinkingTurns
6
+
7
+ module Beta
8
+ class BetaThinkingTurns < Anthropic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Anthropic::Beta::BetaThinkingTurns,
13
+ Anthropic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Symbol) }
18
+ attr_accessor :type
19
+
20
+ sig { returns(Integer) }
21
+ attr_accessor :value
22
+
23
+ sig { params(value: Integer, type: Symbol).returns(T.attached_class) }
24
+ def self.new(value:, type: :thinking_turns)
25
+ end
26
+
27
+ sig { override.returns({ type: Symbol, value: Integer }) }
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -118,7 +118,7 @@ module Anthropic
118
118
  sig { returns(Symbol) }
119
119
  attr_accessor :type
120
120
 
121
- sig { returns(T.nilable(T.anything)) }
121
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
122
122
  attr_accessor :properties
123
123
 
124
124
  sig { returns(T.nilable(T::Array[String])) }
@@ -130,7 +130,7 @@ module Anthropic
130
130
  # will produce.
131
131
  sig do
132
132
  params(
133
- properties: T.nilable(T.anything),
133
+ properties: T.nilable(T::Hash[Symbol, T.anything]),
134
134
  required: T.nilable(T::Array[String]),
135
135
  type: Symbol
136
136
  ).returns(T.attached_class)
@@ -142,7 +142,7 @@ module Anthropic
142
142
  override.returns(
143
143
  {
144
144
  type: Symbol,
145
- properties: T.nilable(T.anything),
145
+ properties: T.nilable(T::Hash[Symbol, T.anything]),
146
146
  required: T.nilable(T::Array[String])
147
147
  }
148
148
  )
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  sig { returns(String) }
@@ -29,7 +29,7 @@ module Anthropic
29
29
  sig do
30
30
  params(
31
31
  id: String,
32
- input: T.anything,
32
+ input: T::Hash[Symbol, T.anything],
33
33
  name: String,
34
34
  type: Symbol
35
35
  ).returns(T.attached_class)
@@ -39,7 +39,12 @@ module Anthropic
39
39
 
40
40
  sig do
41
41
  override.returns(
42
- { id: String, input: T.anything, name: String, type: Symbol }
42
+ {
43
+ id: String,
44
+ input: T::Hash[Symbol, T.anything],
45
+ name: String,
46
+ type: Symbol
47
+ }
43
48
  )
44
49
  end
45
50
  def to_hash
@@ -17,7 +17,7 @@ module Anthropic
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
- sig { returns(T.anything) }
20
+ sig { returns(T::Hash[Symbol, T.anything]) }
21
21
  attr_accessor :input
22
22
 
23
23
  sig { returns(String) }
@@ -41,7 +41,7 @@ module Anthropic
41
41
  sig do
42
42
  params(
43
43
  id: String,
44
- input: T.anything,
44
+ input: T::Hash[Symbol, T.anything],
45
45
  name: String,
46
46
  cache_control:
47
47
  T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
@@ -62,7 +62,7 @@ module Anthropic
62
62
  override.returns(
63
63
  {
64
64
  id: String,
65
- input: T.anything,
65
+ input: T::Hash[Symbol, T.anything],
66
66
  name: String,
67
67
  type: Symbol,
68
68
  cache_control:
@@ -61,17 +61,6 @@ module Anthropic
61
61
  CLAUDE_SONNET_4_5_20250929 =
62
62
  T.let(:"claude-sonnet-4-5-20250929", Anthropic::Model::TaggedSymbol)
63
63
 
64
- # Our previous most intelligent model
65
- CLAUDE_3_5_SONNET_LATEST =
66
- T.let(:"claude-3-5-sonnet-latest", Anthropic::Model::TaggedSymbol)
67
-
68
- # Our previous most intelligent model
69
- CLAUDE_3_5_SONNET_20241022 =
70
- T.let(:"claude-3-5-sonnet-20241022", Anthropic::Model::TaggedSymbol)
71
-
72
- CLAUDE_3_5_SONNET_20240620 =
73
- T.let(:"claude-3-5-sonnet-20240620", Anthropic::Model::TaggedSymbol)
74
-
75
64
  # Our most capable model
76
65
  CLAUDE_OPUS_4_0 =
77
66
  T.let(:"claude-opus-4-0", Anthropic::Model::TaggedSymbol)
@@ -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(Symbol) }
@@ -23,7 +23,7 @@ module Anthropic
23
23
  sig do
24
24
  params(
25
25
  id: String,
26
- input: T.anything,
26
+ input: T::Hash[Symbol, T.anything],
27
27
  name: Symbol,
28
28
  type: Symbol
29
29
  ).returns(T.attached_class)
@@ -33,7 +33,12 @@ module Anthropic
33
33
 
34
34
  sig do
35
35
  override.returns(
36
- { id: String, input: T.anything, name: Symbol, type: Symbol }
36
+ {
37
+ id: String,
38
+ input: T::Hash[Symbol, T.anything],
39
+ name: Symbol,
40
+ type: Symbol
41
+ }
37
42
  )
38
43
  end
39
44
  def to_hash
@@ -14,7 +14,7 @@ module Anthropic
14
14
  sig { returns(String) }
15
15
  attr_accessor :id
16
16
 
17
- sig { returns(T.anything) }
17
+ sig { returns(T::Hash[Symbol, T.anything]) }
18
18
  attr_accessor :input
19
19
 
20
20
  sig { returns(Symbol) }
@@ -37,7 +37,7 @@ module Anthropic
37
37
  sig do
38
38
  params(
39
39
  id: String,
40
- input: T.anything,
40
+ input: T::Hash[Symbol, T.anything],
41
41
  cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
42
42
  name: Symbol,
43
43
  type: Symbol
@@ -57,7 +57,7 @@ module Anthropic
57
57
  override.returns(
58
58
  {
59
59
  id: String,
60
- input: T.anything,
60
+ input: T::Hash[Symbol, T.anything],
61
61
  name: Symbol,
62
62
  type: Symbol,
63
63
  cache_control: T.nilable(Anthropic::CacheControlEphemeral)
@@ -103,7 +103,7 @@ module Anthropic
103
103
  sig { returns(Symbol) }
104
104
  attr_accessor :type
105
105
 
106
- sig { returns(T.nilable(T.anything)) }
106
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
107
107
  attr_accessor :properties
108
108
 
109
109
  sig { returns(T.nilable(T::Array[String])) }
@@ -115,7 +115,7 @@ module Anthropic
115
115
  # will produce.
116
116
  sig do
117
117
  params(
118
- properties: T.nilable(T.anything),
118
+ properties: T.nilable(T::Hash[Symbol, T.anything]),
119
119
  required: T.nilable(T::Array[String]),
120
120
  type: Symbol
121
121
  ).returns(T.attached_class)
@@ -127,7 +127,7 @@ module Anthropic
127
127
  override.returns(
128
128
  {
129
129
  type: Symbol,
130
- properties: T.nilable(T.anything),
130
+ properties: T.nilable(T::Hash[Symbol, T.anything]),
131
131
  required: T.nilable(T::Array[String])
132
132
  }
133
133
  )
@@ -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) }
@@ -23,7 +23,7 @@ module Anthropic
23
23
  sig do
24
24
  params(
25
25
  id: String,
26
- input: T.anything,
26
+ input: T::Hash[Symbol, T.anything],
27
27
  name: String,
28
28
  type: Symbol
29
29
  ).returns(T.attached_class)
@@ -33,7 +33,12 @@ module Anthropic
33
33
 
34
34
  sig do
35
35
  override.returns(
36
- { id: String, input: T.anything, name: String, type: Symbol }
36
+ {
37
+ id: String,
38
+ input: T::Hash[Symbol, T.anything],
39
+ name: String,
40
+ type: Symbol
41
+ }
37
42
  )
38
43
  end
39
44
  def to_hash