anthropic 1.24.0 → 1.25.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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/type/enum.rb +11 -11
  5. data/lib/anthropic/models/beta/beta_capability_support.rb +22 -0
  6. data/lib/anthropic/models/beta/beta_context_management_capability.rb +46 -0
  7. data/lib/anthropic/models/beta/beta_effort_capability.rb +54 -0
  8. data/lib/anthropic/models/beta/beta_model_capabilities.rb +86 -0
  9. data/lib/anthropic/models/beta/beta_model_info.rb +25 -1
  10. data/lib/anthropic/models/beta/beta_thinking_capability.rb +30 -0
  11. data/lib/anthropic/models/beta/beta_thinking_types.rb +30 -0
  12. data/lib/anthropic/models/capability_support.rb +18 -0
  13. data/lib/anthropic/models/context_management_capability.rb +42 -0
  14. data/lib/anthropic/models/effort_capability.rb +50 -0
  15. data/lib/anthropic/models/error_type.rb +22 -0
  16. data/lib/anthropic/models/model_capabilities.rb +82 -0
  17. data/lib/anthropic/models/model_info.rb +25 -1
  18. data/lib/anthropic/models/thinking_capability.rb +26 -0
  19. data/lib/anthropic/models/thinking_types.rb +26 -0
  20. data/lib/anthropic/models.rb +14 -0
  21. data/lib/anthropic/version.rb +1 -1
  22. data/lib/anthropic.rb +13 -0
  23. data/rbi/anthropic/models/beta/beta_capability_support.rbi +35 -0
  24. data/rbi/anthropic/models/beta/beta_context_management_capability.rbi +99 -0
  25. data/rbi/anthropic/models/beta/beta_effort_capability.rbi +93 -0
  26. data/rbi/anthropic/models/beta/beta_model_capabilities.rbi +165 -0
  27. data/rbi/anthropic/models/beta/beta_model_info.rbi +39 -1
  28. data/rbi/anthropic/models/beta/beta_thinking_capability.rbi +53 -0
  29. data/rbi/anthropic/models/beta/beta_thinking_types.rbi +63 -0
  30. data/rbi/anthropic/models/capability_support.rbi +28 -0
  31. data/rbi/anthropic/models/context_management_capability.rbi +90 -0
  32. data/rbi/anthropic/models/effort_capability.rbi +82 -0
  33. data/rbi/anthropic/models/error_type.rbi +32 -0
  34. data/rbi/anthropic/models/model_capabilities.rbi +135 -0
  35. data/rbi/anthropic/models/model_info.rbi +37 -1
  36. data/rbi/anthropic/models/thinking_capability.rbi +46 -0
  37. data/rbi/anthropic/models/thinking_types.rbi +52 -0
  38. data/rbi/anthropic/models.rbi +14 -0
  39. data/sig/anthropic/models/beta/beta_capability_support.rbs +17 -0
  40. data/sig/anthropic/models/beta/beta_context_management_capability.rbs +39 -0
  41. data/sig/anthropic/models/beta/beta_effort_capability.rbs +44 -0
  42. data/sig/anthropic/models/beta/beta_model_capabilities.rbs +64 -0
  43. data/sig/anthropic/models/beta/beta_model_info.rbs +21 -1
  44. data/sig/anthropic/models/beta/beta_thinking_capability.rbs +26 -0
  45. data/sig/anthropic/models/beta/beta_thinking_types.rbs +29 -0
  46. data/sig/anthropic/models/capability_support.rbs +13 -0
  47. data/sig/anthropic/models/context_management_capability.rbs +35 -0
  48. data/sig/anthropic/models/effort_capability.rbs +40 -0
  49. data/sig/anthropic/models/error_type.rbs +30 -0
  50. data/sig/anthropic/models/model_capabilities.rbs +60 -0
  51. data/sig/anthropic/models/model_info.rbs +21 -1
  52. data/sig/anthropic/models/thinking_capability.rbs +16 -0
  53. data/sig/anthropic/models/thinking_types.rbs +25 -0
  54. data/sig/anthropic/models.rbs +14 -0
  55. metadata +41 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8e994ed4ea60cbaf7aee144bcabab2da5406df0c604d5dab2687b8ba226ec47
4
- data.tar.gz: 963a20b35842c61557dc0cd60a1afbf00116653cfa120f1291fc840c4562933b
3
+ metadata.gz: 5bfde8fb8238b702db1198ffaaa13365d3274c4222f67795ef642cdf3400071b
4
+ data.tar.gz: 971877b395273eca3fbadf30a18b30b94adb797b423ef0ed0a05e9bb53e487bb
5
5
  SHA512:
6
- metadata.gz: 2df975c4dde315c09393d07959e77315ce1bf725e0955c56085c0c0f444207b988e07ee7e2a78a688fb50df1781448f2c9c6a6ec00ea40a42ccb3597aa615308
7
- data.tar.gz: 466afa0cd510de890dcd18e075a8ebb378877ce10636184eda10bc185c11ce4d4095d81cc778aa314b07011d8f476ce62ca30694993c60826992ee5f0a135882
6
+ metadata.gz: 991b93e8ddf7187a7b08598ca4f5b3b374f680337f1efb2a7ad5160e3ff0f2da5271320177a0abcf169e61a2502a56553d994449a1f493beebe80a49b0c3ed40
7
+ data.tar.gz: b4778e9aec53cc412a43baadd0c382c130e3e16bc72f260eed7927bb0d04cd8707eec9582030abda572ccf104ce7537382bea6b771668354bcadad5ec0f78b2e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.0 (2026-03-18)
4
+
5
+ Full Changelog: [v1.24.0...v1.25.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.24.0...v1.25.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([b08cc0d](https://github.com/anthropics/anthropic-sdk-ruby/commit/b08cc0d8165bb47207e1fabe6738f7a8f59cdaa8))
10
+ * **api:** manual updates ([6e54a17](https://github.com/anthropics/anthropic-sdk-ruby/commit/6e54a172886f85bc936fb570a01a1e105fba2efb))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **internal:** tweak CI branches ([3870094](https://github.com/anthropics/anthropic-sdk-ruby/commit/387009475a97f22752895b4e4abec8c751ba23d4))
16
+
3
17
  ## 1.24.0 (2026-03-16)
4
18
 
5
19
  Full Changelog: [v1.23.0...v1.24.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.23.0...v1.24.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ Add to your application's Gemfile:
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.24.0"
18
+ gem "anthropic", "~> 1.25.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -17,28 +17,28 @@ module Anthropic
17
17
  # values safely.
18
18
  #
19
19
  # @example
20
- # # `bash_code_execution_tool_result_error_code` is a `Anthropic::BashCodeExecutionToolResultErrorCode`
21
- # case bash_code_execution_tool_result_error_code
22
- # when Anthropic::BashCodeExecutionToolResultErrorCode::INVALID_TOOL_INPUT
20
+ # # `error_type` is a `Anthropic::ErrorType`
21
+ # case error_type
22
+ # when Anthropic::ErrorType::INVALID_REQUEST_ERROR
23
23
  # # ...
24
- # when Anthropic::BashCodeExecutionToolResultErrorCode::UNAVAILABLE
24
+ # when Anthropic::ErrorType::AUTHENTICATION_ERROR
25
25
  # # ...
26
- # when Anthropic::BashCodeExecutionToolResultErrorCode::TOO_MANY_REQUESTS
26
+ # when Anthropic::ErrorType::PERMISSION_ERROR
27
27
  # # ...
28
28
  # else
29
- # puts(bash_code_execution_tool_result_error_code)
29
+ # puts(error_type)
30
30
  # end
31
31
  #
32
32
  # @example
33
- # case bash_code_execution_tool_result_error_code
34
- # in :invalid_tool_input
33
+ # case error_type
34
+ # in :invalid_request_error
35
35
  # # ...
36
- # in :unavailable
36
+ # in :authentication_error
37
37
  # # ...
38
- # in :too_many_requests
38
+ # in :permission_error
39
39
  # # ...
40
40
  # else
41
- # puts(bash_code_execution_tool_result_error_code)
41
+ # puts(error_type)
42
42
  # end
43
43
  module Enum
44
44
  include Anthropic::Internal::Type::Converter
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCapabilitySupport < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute supported
8
+ # Whether this capability is supported by the model.
9
+ #
10
+ # @return [Boolean]
11
+ required :supported, Anthropic::Internal::Type::Boolean
12
+
13
+ # @!method initialize(supported:)
14
+ # Indicates whether a capability is supported.
15
+ #
16
+ # @param supported [Boolean] Whether this capability is supported by the model.
17
+ end
18
+ end
19
+
20
+ BetaCapabilitySupport = Beta::BetaCapabilitySupport
21
+ end
22
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaContextManagementCapability < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute clear_thinking_20251015
8
+ # Indicates whether a capability is supported.
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport, nil]
11
+ required :clear_thinking_20251015, -> { Anthropic::Beta::BetaCapabilitySupport }, nil?: true
12
+
13
+ # @!attribute clear_tool_uses_20250919
14
+ # Indicates whether a capability is supported.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport, nil]
17
+ required :clear_tool_uses_20250919, -> { Anthropic::Beta::BetaCapabilitySupport }, nil?: true
18
+
19
+ # @!attribute compact_20260112
20
+ # Indicates whether a capability is supported.
21
+ #
22
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport, nil]
23
+ required :compact_20260112, -> { Anthropic::Beta::BetaCapabilitySupport }, nil?: true
24
+
25
+ # @!attribute supported
26
+ # Whether this capability is supported by the model.
27
+ #
28
+ # @return [Boolean]
29
+ required :supported, Anthropic::Internal::Type::Boolean
30
+
31
+ # @!method initialize(clear_thinking_20251015:, clear_tool_uses_20250919:, compact_20260112:, supported:)
32
+ # Context management capability details.
33
+ #
34
+ # @param clear_thinking_20251015 [Anthropic::Models::Beta::BetaCapabilitySupport, nil] Indicates whether a capability is supported.
35
+ #
36
+ # @param clear_tool_uses_20250919 [Anthropic::Models::Beta::BetaCapabilitySupport, nil] Indicates whether a capability is supported.
37
+ #
38
+ # @param compact_20260112 [Anthropic::Models::Beta::BetaCapabilitySupport, nil] Indicates whether a capability is supported.
39
+ #
40
+ # @param supported [Boolean] Whether this capability is supported by the model.
41
+ end
42
+ end
43
+
44
+ BetaContextManagementCapability = Beta::BetaContextManagementCapability
45
+ end
46
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaEffortCapability < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute high
8
+ # Whether the model supports high effort level.
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
11
+ required :high, -> { Anthropic::Beta::BetaCapabilitySupport }
12
+
13
+ # @!attribute low
14
+ # Whether the model supports low effort level.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
17
+ required :low, -> { Anthropic::Beta::BetaCapabilitySupport }
18
+
19
+ # @!attribute max
20
+ # Whether the model supports max effort level.
21
+ #
22
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
23
+ required :max, -> { Anthropic::Beta::BetaCapabilitySupport }
24
+
25
+ # @!attribute medium
26
+ # Whether the model supports medium effort level.
27
+ #
28
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
29
+ required :medium, -> { Anthropic::Beta::BetaCapabilitySupport }
30
+
31
+ # @!attribute supported
32
+ # Whether this capability is supported by the model.
33
+ #
34
+ # @return [Boolean]
35
+ required :supported, Anthropic::Internal::Type::Boolean
36
+
37
+ # @!method initialize(high:, low:, max:, medium:, supported:)
38
+ # Effort (reasoning_effort) capability details.
39
+ #
40
+ # @param high [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports high effort level.
41
+ #
42
+ # @param low [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports low effort level.
43
+ #
44
+ # @param max [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports max effort level.
45
+ #
46
+ # @param medium [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports medium effort level.
47
+ #
48
+ # @param supported [Boolean] Whether this capability is supported by the model.
49
+ end
50
+ end
51
+
52
+ BetaEffortCapability = Beta::BetaEffortCapability
53
+ end
54
+ end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaModelCapabilities < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute batch
8
+ # Whether the model supports the Batch API.
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
11
+ required :batch, -> { Anthropic::Beta::BetaCapabilitySupport }
12
+
13
+ # @!attribute citations
14
+ # Whether the model supports citation generation.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
17
+ required :citations, -> { Anthropic::Beta::BetaCapabilitySupport }
18
+
19
+ # @!attribute code_execution
20
+ # Whether the model supports code execution tools.
21
+ #
22
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
23
+ required :code_execution, -> { Anthropic::Beta::BetaCapabilitySupport }
24
+
25
+ # @!attribute context_management
26
+ # Context management support and available strategies.
27
+ #
28
+ # @return [Anthropic::Models::Beta::BetaContextManagementCapability]
29
+ required :context_management, -> { Anthropic::Beta::BetaContextManagementCapability }
30
+
31
+ # @!attribute effort
32
+ # Effort (reasoning_effort) support and available levels.
33
+ #
34
+ # @return [Anthropic::Models::Beta::BetaEffortCapability]
35
+ required :effort, -> { Anthropic::Beta::BetaEffortCapability }
36
+
37
+ # @!attribute image_input
38
+ # Whether the model accepts image content blocks.
39
+ #
40
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
41
+ required :image_input, -> { Anthropic::Beta::BetaCapabilitySupport }
42
+
43
+ # @!attribute pdf_input
44
+ # Whether the model accepts PDF content blocks.
45
+ #
46
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
47
+ required :pdf_input, -> { Anthropic::Beta::BetaCapabilitySupport }
48
+
49
+ # @!attribute structured_outputs
50
+ # Whether the model supports structured output / JSON mode / strict tool schemas.
51
+ #
52
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
53
+ required :structured_outputs, -> { Anthropic::Beta::BetaCapabilitySupport }
54
+
55
+ # @!attribute thinking
56
+ # Thinking capability and supported type configurations.
57
+ #
58
+ # @return [Anthropic::Models::Beta::BetaThinkingCapability]
59
+ required :thinking, -> { Anthropic::Beta::BetaThinkingCapability }
60
+
61
+ # @!method initialize(batch:, citations:, code_execution:, context_management:, effort:, image_input:, pdf_input:, structured_outputs:, thinking:)
62
+ # Model capability information.
63
+ #
64
+ # @param batch [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports the Batch API.
65
+ #
66
+ # @param citations [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports citation generation.
67
+ #
68
+ # @param code_execution [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports code execution tools.
69
+ #
70
+ # @param context_management [Anthropic::Models::Beta::BetaContextManagementCapability] Context management support and available strategies.
71
+ #
72
+ # @param effort [Anthropic::Models::Beta::BetaEffortCapability] Effort (reasoning_effort) support and available levels.
73
+ #
74
+ # @param image_input [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model accepts image content blocks.
75
+ #
76
+ # @param pdf_input [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model accepts PDF content blocks.
77
+ #
78
+ # @param structured_outputs [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports structured output / JSON mode / strict tool schemas.
79
+ #
80
+ # @param thinking [Anthropic::Models::Beta::BetaThinkingCapability] Thinking capability and supported type configurations.
81
+ end
82
+ end
83
+
84
+ BetaModelCapabilities = Beta::BetaModelCapabilities
85
+ end
86
+ end
@@ -11,6 +11,12 @@ module Anthropic
11
11
  # @return [String]
12
12
  required :id, String
13
13
 
14
+ # @!attribute capabilities
15
+ # Model capability information.
16
+ #
17
+ # @return [Anthropic::Models::Beta::BetaModelCapabilities, nil]
18
+ required :capabilities, -> { Anthropic::Beta::BetaModelCapabilities }, nil?: true
19
+
14
20
  # @!attribute created_at
15
21
  # RFC 3339 datetime string representing the time at which the model was released.
16
22
  # May be set to an epoch value if the release date is unknown.
@@ -24,6 +30,18 @@ module Anthropic
24
30
  # @return [String]
25
31
  required :display_name, String
26
32
 
33
+ # @!attribute max_input_tokens
34
+ # Maximum input context window size in tokens for this model.
35
+ #
36
+ # @return [Integer, nil]
37
+ required :max_input_tokens, Integer, nil?: true
38
+
39
+ # @!attribute max_tokens
40
+ # Maximum value for the `max_tokens` parameter when using this model.
41
+ #
42
+ # @return [Integer, nil]
43
+ required :max_tokens, Integer, nil?: true
44
+
27
45
  # @!attribute type
28
46
  # Object type.
29
47
  #
@@ -32,16 +50,22 @@ module Anthropic
32
50
  # @return [Symbol, :model]
33
51
  required :type, const: :model
34
52
 
35
- # @!method initialize(id:, created_at:, display_name:, type: :model)
53
+ # @!method initialize(id:, capabilities:, created_at:, display_name:, max_input_tokens:, max_tokens:, type: :model)
36
54
  # Some parameter documentations has been truncated, see
37
55
  # {Anthropic::Models::Beta::BetaModelInfo} for more details.
38
56
  #
39
57
  # @param id [String] Unique model identifier.
40
58
  #
59
+ # @param capabilities [Anthropic::Models::Beta::BetaModelCapabilities, nil] Model capability information.
60
+ #
41
61
  # @param created_at [Time] RFC 3339 datetime string representing the time at which the model was released.
42
62
  #
43
63
  # @param display_name [String] A human-readable name for the model.
44
64
  #
65
+ # @param max_input_tokens [Integer, nil] Maximum input context window size in tokens for this model.
66
+ #
67
+ # @param max_tokens [Integer, nil] Maximum value for the `max_tokens` parameter when using this model.
68
+ #
45
69
  # @param type [Symbol, :model] Object type.
46
70
  end
47
71
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaThinkingCapability < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute supported
8
+ # Whether this capability is supported by the model.
9
+ #
10
+ # @return [Boolean]
11
+ required :supported, Anthropic::Internal::Type::Boolean
12
+
13
+ # @!attribute types
14
+ # Supported thinking type configurations.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaThinkingTypes]
17
+ required :types, -> { Anthropic::Beta::BetaThinkingTypes }
18
+
19
+ # @!method initialize(supported:, types:)
20
+ # Thinking capability details.
21
+ #
22
+ # @param supported [Boolean] Whether this capability is supported by the model.
23
+ #
24
+ # @param types [Anthropic::Models::Beta::BetaThinkingTypes] Supported thinking type configurations.
25
+ end
26
+ end
27
+
28
+ BetaThinkingCapability = Beta::BetaThinkingCapability
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaThinkingTypes < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute adaptive
8
+ # Whether the model supports thinking with type 'adaptive' (auto).
9
+ #
10
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
11
+ required :adaptive, -> { Anthropic::Beta::BetaCapabilitySupport }
12
+
13
+ # @!attribute enabled
14
+ # Whether the model supports thinking with type 'enabled'.
15
+ #
16
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport]
17
+ required :enabled, -> { Anthropic::Beta::BetaCapabilitySupport }
18
+
19
+ # @!method initialize(adaptive:, enabled:)
20
+ # Supported thinking type configurations.
21
+ #
22
+ # @param adaptive [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports thinking with type 'adaptive' (auto).
23
+ #
24
+ # @param enabled [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports thinking with type 'enabled'.
25
+ end
26
+ end
27
+
28
+ BetaThinkingTypes = Beta::BetaThinkingTypes
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class CapabilitySupport < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute supported
7
+ # Whether this capability is supported by the model.
8
+ #
9
+ # @return [Boolean]
10
+ required :supported, Anthropic::Internal::Type::Boolean
11
+
12
+ # @!method initialize(supported:)
13
+ # Indicates whether a capability is supported.
14
+ #
15
+ # @param supported [Boolean] Whether this capability is supported by the model.
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class ContextManagementCapability < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute clear_thinking_20251015
7
+ # Indicates whether a capability is supported.
8
+ #
9
+ # @return [Anthropic::Models::CapabilitySupport, nil]
10
+ required :clear_thinking_20251015, -> { Anthropic::CapabilitySupport }, nil?: true
11
+
12
+ # @!attribute clear_tool_uses_20250919
13
+ # Indicates whether a capability is supported.
14
+ #
15
+ # @return [Anthropic::Models::CapabilitySupport, nil]
16
+ required :clear_tool_uses_20250919, -> { Anthropic::CapabilitySupport }, nil?: true
17
+
18
+ # @!attribute compact_20260112
19
+ # Indicates whether a capability is supported.
20
+ #
21
+ # @return [Anthropic::Models::CapabilitySupport, nil]
22
+ required :compact_20260112, -> { Anthropic::CapabilitySupport }, nil?: true
23
+
24
+ # @!attribute supported
25
+ # Whether this capability is supported by the model.
26
+ #
27
+ # @return [Boolean]
28
+ required :supported, Anthropic::Internal::Type::Boolean
29
+
30
+ # @!method initialize(clear_thinking_20251015:, clear_tool_uses_20250919:, compact_20260112:, supported:)
31
+ # Context management capability details.
32
+ #
33
+ # @param clear_thinking_20251015 [Anthropic::Models::CapabilitySupport, nil] Indicates whether a capability is supported.
34
+ #
35
+ # @param clear_tool_uses_20250919 [Anthropic::Models::CapabilitySupport, nil] Indicates whether a capability is supported.
36
+ #
37
+ # @param compact_20260112 [Anthropic::Models::CapabilitySupport, nil] Indicates whether a capability is supported.
38
+ #
39
+ # @param supported [Boolean] Whether this capability is supported by the model.
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class EffortCapability < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute high
7
+ # Whether the model supports high effort level.
8
+ #
9
+ # @return [Anthropic::Models::CapabilitySupport]
10
+ required :high, -> { Anthropic::CapabilitySupport }
11
+
12
+ # @!attribute low
13
+ # Whether the model supports low effort level.
14
+ #
15
+ # @return [Anthropic::Models::CapabilitySupport]
16
+ required :low, -> { Anthropic::CapabilitySupport }
17
+
18
+ # @!attribute max
19
+ # Whether the model supports max effort level.
20
+ #
21
+ # @return [Anthropic::Models::CapabilitySupport]
22
+ required :max, -> { Anthropic::CapabilitySupport }
23
+
24
+ # @!attribute medium
25
+ # Whether the model supports medium effort level.
26
+ #
27
+ # @return [Anthropic::Models::CapabilitySupport]
28
+ required :medium, -> { Anthropic::CapabilitySupport }
29
+
30
+ # @!attribute supported
31
+ # Whether this capability is supported by the model.
32
+ #
33
+ # @return [Boolean]
34
+ required :supported, Anthropic::Internal::Type::Boolean
35
+
36
+ # @!method initialize(high:, low:, max:, medium:, supported:)
37
+ # Effort (reasoning_effort) capability details.
38
+ #
39
+ # @param high [Anthropic::Models::CapabilitySupport] Whether the model supports high effort level.
40
+ #
41
+ # @param low [Anthropic::Models::CapabilitySupport] Whether the model supports low effort level.
42
+ #
43
+ # @param max [Anthropic::Models::CapabilitySupport] Whether the model supports max effort level.
44
+ #
45
+ # @param medium [Anthropic::Models::CapabilitySupport] Whether the model supports medium effort level.
46
+ #
47
+ # @param supported [Boolean] Whether this capability is supported by the model.
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module ErrorType
6
+ extend Anthropic::Internal::Type::Enum
7
+
8
+ INVALID_REQUEST_ERROR = :invalid_request_error
9
+ AUTHENTICATION_ERROR = :authentication_error
10
+ PERMISSION_ERROR = :permission_error
11
+ NOT_FOUND_ERROR = :not_found_error
12
+ RATE_LIMIT_ERROR = :rate_limit_error
13
+ TIMEOUT_ERROR = :timeout_error
14
+ OVERLOADED_ERROR = :overloaded_error
15
+ API_ERROR = :api_error
16
+ BILLING_ERROR = :billing_error
17
+
18
+ # @!method self.values
19
+ # @return [Array<Symbol>]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class ModelCapabilities < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute batch
7
+ # Whether the model supports the Batch API.
8
+ #
9
+ # @return [Anthropic::Models::CapabilitySupport]
10
+ required :batch, -> { Anthropic::CapabilitySupport }
11
+
12
+ # @!attribute citations
13
+ # Whether the model supports citation generation.
14
+ #
15
+ # @return [Anthropic::Models::CapabilitySupport]
16
+ required :citations, -> { Anthropic::CapabilitySupport }
17
+
18
+ # @!attribute code_execution
19
+ # Whether the model supports code execution tools.
20
+ #
21
+ # @return [Anthropic::Models::CapabilitySupport]
22
+ required :code_execution, -> { Anthropic::CapabilitySupport }
23
+
24
+ # @!attribute context_management
25
+ # Context management support and available strategies.
26
+ #
27
+ # @return [Anthropic::Models::ContextManagementCapability]
28
+ required :context_management, -> { Anthropic::ContextManagementCapability }
29
+
30
+ # @!attribute effort
31
+ # Effort (reasoning_effort) support and available levels.
32
+ #
33
+ # @return [Anthropic::Models::EffortCapability]
34
+ required :effort, -> { Anthropic::EffortCapability }
35
+
36
+ # @!attribute image_input
37
+ # Whether the model accepts image content blocks.
38
+ #
39
+ # @return [Anthropic::Models::CapabilitySupport]
40
+ required :image_input, -> { Anthropic::CapabilitySupport }
41
+
42
+ # @!attribute pdf_input
43
+ # Whether the model accepts PDF content blocks.
44
+ #
45
+ # @return [Anthropic::Models::CapabilitySupport]
46
+ required :pdf_input, -> { Anthropic::CapabilitySupport }
47
+
48
+ # @!attribute structured_outputs
49
+ # Whether the model supports structured output / JSON mode / strict tool schemas.
50
+ #
51
+ # @return [Anthropic::Models::CapabilitySupport]
52
+ required :structured_outputs, -> { Anthropic::CapabilitySupport }
53
+
54
+ # @!attribute thinking
55
+ # Thinking capability and supported type configurations.
56
+ #
57
+ # @return [Anthropic::Models::ThinkingCapability]
58
+ required :thinking, -> { Anthropic::ThinkingCapability }
59
+
60
+ # @!method initialize(batch:, citations:, code_execution:, context_management:, effort:, image_input:, pdf_input:, structured_outputs:, thinking:)
61
+ # Model capability information.
62
+ #
63
+ # @param batch [Anthropic::Models::CapabilitySupport] Whether the model supports the Batch API.
64
+ #
65
+ # @param citations [Anthropic::Models::CapabilitySupport] Whether the model supports citation generation.
66
+ #
67
+ # @param code_execution [Anthropic::Models::CapabilitySupport] Whether the model supports code execution tools.
68
+ #
69
+ # @param context_management [Anthropic::Models::ContextManagementCapability] Context management support and available strategies.
70
+ #
71
+ # @param effort [Anthropic::Models::EffortCapability] Effort (reasoning_effort) support and available levels.
72
+ #
73
+ # @param image_input [Anthropic::Models::CapabilitySupport] Whether the model accepts image content blocks.
74
+ #
75
+ # @param pdf_input [Anthropic::Models::CapabilitySupport] Whether the model accepts PDF content blocks.
76
+ #
77
+ # @param structured_outputs [Anthropic::Models::CapabilitySupport] Whether the model supports structured output / JSON mode / strict tool schemas.
78
+ #
79
+ # @param thinking [Anthropic::Models::ThinkingCapability] Thinking capability and supported type configurations.
80
+ end
81
+ end
82
+ end