anthropic 1.34.0 → 1.35.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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  5. data/lib/anthropic/models/beta/beta_compaction_block.rb +9 -1
  6. data/lib/anthropic/models/beta/beta_compaction_block_param.rb +9 -1
  7. data/lib/anthropic/models/beta/beta_compaction_content_block_delta.rb +10 -1
  8. data/lib/anthropic/models/beta/beta_effort_capability.rb +9 -1
  9. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +5 -0
  10. data/lib/anthropic/models/beta/beta_output_config.rb +10 -1
  11. data/lib/anthropic/models/beta/beta_token_task_budget.rb +42 -0
  12. data/lib/anthropic/models/beta/beta_user_profile.rb +87 -0
  13. data/lib/anthropic/models/beta/beta_user_profile_enrollment_url.rb +49 -0
  14. data/lib/anthropic/models/beta/beta_user_profile_trust_grant.rb +34 -0
  15. data/lib/anthropic/models/beta/message_create_params.rb +10 -1
  16. data/lib/anthropic/models/beta/messages/batch_create_params.rb +10 -1
  17. data/lib/anthropic/models/beta/user_profile_create_enrollment_url_params.rb +31 -0
  18. data/lib/anthropic/models/beta/user_profile_create_params.rb +46 -0
  19. data/lib/anthropic/models/beta/user_profile_list_params.rb +59 -0
  20. data/lib/anthropic/models/beta/user_profile_retrieve_params.rb +31 -0
  21. data/lib/anthropic/models/beta/user_profile_update_params.rb +54 -0
  22. data/lib/anthropic/models/effort_capability.rb +9 -1
  23. data/lib/anthropic/models/model.rb +5 -0
  24. data/lib/anthropic/models/output_config.rb +1 -0
  25. data/lib/anthropic/resources/beta/messages.rb +6 -2
  26. data/lib/anthropic/resources/beta/user_profiles.rb +160 -0
  27. data/lib/anthropic/resources/beta.rb +4 -0
  28. data/lib/anthropic/resources/messages.rb +1 -1
  29. data/lib/anthropic/version.rb +1 -1
  30. data/lib/anthropic.rb +10 -0
  31. data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
  32. data/rbi/anthropic/models/beta/beta_compaction_block.rbi +20 -4
  33. data/rbi/anthropic/models/beta/beta_compaction_block_param.rbi +9 -1
  34. data/rbi/anthropic/models/beta/beta_compaction_content_block_delta.rbi +24 -5
  35. data/rbi/anthropic/models/beta/beta_effort_capability.rbi +18 -3
  36. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +7 -0
  37. data/rbi/anthropic/models/beta/beta_output_config.rbi +23 -3
  38. data/rbi/anthropic/models/beta/beta_token_task_budget.rbi +59 -0
  39. data/rbi/anthropic/models/beta/beta_user_profile.rbi +128 -0
  40. data/rbi/anthropic/models/beta/beta_user_profile_enrollment_url.rbi +92 -0
  41. data/rbi/anthropic/models/beta/beta_user_profile_trust_grant.rbi +86 -0
  42. data/rbi/anthropic/models/beta/message_create_params.rbi +10 -0
  43. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +13 -3
  44. data/rbi/anthropic/models/beta/user_profile_create_enrollment_url_params.rbi +68 -0
  45. data/rbi/anthropic/models/beta/user_profile_create_params.rbi +87 -0
  46. data/rbi/anthropic/models/beta/user_profile_list_params.rbi +135 -0
  47. data/rbi/anthropic/models/beta/user_profile_retrieve_params.rbi +68 -0
  48. data/rbi/anthropic/models/beta/user_profile_update_params.rbi +95 -0
  49. data/rbi/anthropic/models/effort_capability.rbi +16 -3
  50. data/rbi/anthropic/models/model.rbi +4 -0
  51. data/rbi/anthropic/models/output_config.rbi +1 -0
  52. data/rbi/anthropic/resources/beta/messages.rbi +8 -0
  53. data/rbi/anthropic/resources/beta/user_profiles.rbi +123 -0
  54. data/rbi/anthropic/resources/beta.rbi +3 -0
  55. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  56. data/sig/anthropic/models/beta/beta_compaction_block.rbs +14 -3
  57. data/sig/anthropic/models/beta/beta_compaction_block_param.rbs +7 -2
  58. data/sig/anthropic/models/beta/beta_compaction_content_block_delta.rbs +17 -3
  59. data/sig/anthropic/models/beta/beta_effort_capability.rbs +8 -3
  60. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +5 -1
  61. data/sig/anthropic/models/beta/beta_output_config.rbs +10 -4
  62. data/sig/anthropic/models/beta/beta_token_task_budget.rbs +26 -0
  63. data/sig/anthropic/models/beta/beta_user_profile.rbs +64 -0
  64. data/sig/anthropic/models/beta/beta_user_profile_enrollment_url.rbs +44 -0
  65. data/sig/anthropic/models/beta/beta_user_profile_trust_grant.rbs +34 -0
  66. data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
  67. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +8 -3
  68. data/sig/anthropic/models/beta/user_profile_create_enrollment_url_params.rbs +37 -0
  69. data/sig/anthropic/models/beta/user_profile_create_params.rbs +44 -0
  70. data/sig/anthropic/models/beta/user_profile_list_params.rbs +66 -0
  71. data/sig/anthropic/models/beta/user_profile_retrieve_params.rbs +37 -0
  72. data/sig/anthropic/models/beta/user_profile_update_params.rbs +49 -0
  73. data/sig/anthropic/models/effort_capability.rbs +8 -3
  74. data/sig/anthropic/models/model.rbs +5 -1
  75. data/sig/anthropic/models/output_config.rbs +2 -1
  76. data/sig/anthropic/resources/beta/messages.rbs +2 -0
  77. data/sig/anthropic/resources/beta/user_profiles.rbs +44 -0
  78. data/sig/anthropic/resources/beta.rbs +2 -0
  79. metadata +32 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3520cc299f08e53c7dc6c5d584b3e1abc0a0d099b9c1c484a1cfb0348ded7d22
4
- data.tar.gz: 454ce95234f9551764cf232e8a0d5a858d6fc8d513760f139cc3bc91c8285722
3
+ metadata.gz: 5db1f4f469b9a2e1aad1435777496f6d191945ff0017fdf8ff5a04522da40370
4
+ data.tar.gz: 35dac1ad2c116e55ec90da2acd486c45c91ad1925181876600170a16e52b4ed1
5
5
  SHA512:
6
- metadata.gz: e7acdd0330a5c6c341cf7f00d491202cf802a1078ce32e21035f1201e8b8780298aefc32d22dcbf5b7f296f82eb5110289ed35e9b0af3e844a029907f4b8db13
7
- data.tar.gz: 3c53d0ac26574660c5008719db5510effd5321bd27755e8ec28ceef98e02408cf7fd4f70f0b3064cee31039cb10545e3671a72eee55beda2a4c3a4e9a67996ec
6
+ metadata.gz: dc6e88fb4aa8d98beabeb4755b6d7c45d1faf5e59daf133ae75b57922ebd21e86f4ff5d22f3ec0686efc1c2746fda89ba135b5510ed83360a3e215924bfc611d
7
+ data.tar.gz: 5f3f2d032b2f67f5f04025048470ed175afc85705e8ea2f3faded5f44f13cdc43eda11cbaddbdb7078acbdb2c9beb61b150dd4f2abde8d4122ca7f965a3f094e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.35.0 (2026-04-16)
4
+
5
+ Full Changelog: [v1.34.0...v1.35.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.34.0...v1.35.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add claude-opus-4-7, token budgets and user_profiles ([026649a](https://github.com/anthropics/anthropic-sdk-ruby/commit/026649ae9a26108258ef8de6532eb02e429e87d9))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **ci:** remove release-doctor workflow ([0947aca](https://github.com/anthropics/anthropic-sdk-ruby/commit/0947acaf0af66d9918f6a6faea03ab8f129932af))
15
+
3
16
  ## 1.34.0 (2026-04-14)
4
17
 
5
18
  Full Changelog: [v1.33.1...v1.34.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.33.1...v1.34.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.34.0"
18
+ gem "anthropic", "~> 1.35.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -51,6 +51,8 @@ module Anthropic
51
51
 
52
52
  variant const: -> { Anthropic::Models::AnthropicBeta::ADVISOR_TOOL_2026_03_01 }
53
53
 
54
+ variant const: -> { Anthropic::Models::AnthropicBeta::USER_PROFILES_2026_03_24 }
55
+
54
56
  # @!method self.variants
55
57
  # @return [Array(String, Symbol)]
56
58
 
@@ -82,6 +84,7 @@ module Anthropic
82
84
  FAST_MODE_2026_02_01 = :"fast-mode-2026-02-01"
83
85
  OUTPUT_300K_2026_03_24 = :"output-300k-2026-03-24"
84
86
  ADVISOR_TOOL_2026_03_01 = :"advisor-tool-2026-03-01"
87
+ USER_PROFILES_2026_03_24 = :"user-profiles-2026-03-24"
85
88
 
86
89
  # @!endgroup
87
90
  end
@@ -10,12 +10,18 @@ module Anthropic
10
10
  # @return [String, nil]
11
11
  required :content, String, nil?: true
12
12
 
13
+ # @!attribute encrypted_content
14
+ # Opaque metadata from prior compaction, to be round-tripped verbatim
15
+ #
16
+ # @return [String, nil]
17
+ required :encrypted_content, String, nil?: true
18
+
13
19
  # @!attribute type
14
20
  #
15
21
  # @return [Symbol, :compaction]
16
22
  required :type, const: :compaction
17
23
 
18
- # @!method initialize(content:, type: :compaction)
24
+ # @!method initialize(content:, encrypted_content:, type: :compaction)
19
25
  # A compaction block returned when autocompact is triggered.
20
26
  #
21
27
  # When content is None, it indicates the compaction failed to produce a valid
@@ -24,6 +30,8 @@ module Anthropic
24
30
  #
25
31
  # @param content [String, nil] Summary of compacted content, or null if compaction failed
26
32
  #
33
+ # @param encrypted_content [String, nil] Opaque metadata from prior compaction, to be round-tripped verbatim
34
+ #
27
35
  # @param type [Symbol, :compaction]
28
36
  end
29
37
  end
@@ -21,7 +21,13 @@ module Anthropic
21
21
  # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
22
22
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
23
23
 
24
- # @!method initialize(content:, cache_control: nil, type: :compaction)
24
+ # @!attribute encrypted_content
25
+ # Opaque metadata from prior compaction, to be round-tripped verbatim
26
+ #
27
+ # @return [String, nil]
28
+ optional :encrypted_content, String, nil?: true
29
+
30
+ # @!method initialize(content:, cache_control: nil, encrypted_content: nil, type: :compaction)
25
31
  # A compaction block containing summary of previous context.
26
32
  #
27
33
  # Users should round-trip these blocks from responses to subsequent requests to
@@ -34,6 +40,8 @@ module Anthropic
34
40
  #
35
41
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
36
42
  #
43
+ # @param encrypted_content [String, nil] Opaque metadata from prior compaction, to be round-tripped verbatim
44
+ #
37
45
  # @param type [Symbol, :compaction]
38
46
  end
39
47
  end
@@ -9,13 +9,22 @@ module Anthropic
9
9
  # @return [String, nil]
10
10
  required :content, String, nil?: true
11
11
 
12
+ # @!attribute encrypted_content
13
+ # Opaque metadata from prior compaction, to be round-tripped verbatim
14
+ #
15
+ # @return [String, nil]
16
+ required :encrypted_content, String, nil?: true
17
+
12
18
  # @!attribute type
13
19
  #
14
20
  # @return [Symbol, :compaction_delta]
15
21
  required :type, const: :compaction_delta
16
22
 
17
- # @!method initialize(content:, type: :compaction_delta)
23
+ # @!method initialize(content:, encrypted_content:, type: :compaction_delta)
18
24
  # @param content [String, nil]
25
+ #
26
+ # @param encrypted_content [String, nil] Opaque metadata from prior compaction, to be round-tripped verbatim
27
+ #
19
28
  # @param type [Symbol, :compaction_delta]
20
29
  end
21
30
  end
@@ -34,7 +34,13 @@ module Anthropic
34
34
  # @return [Boolean]
35
35
  required :supported, Anthropic::Internal::Type::Boolean
36
36
 
37
- # @!method initialize(high:, low:, max:, medium:, supported:)
37
+ # @!attribute xhigh
38
+ # Indicates whether a capability is supported.
39
+ #
40
+ # @return [Anthropic::Models::Beta::BetaCapabilitySupport, nil]
41
+ required :xhigh, -> { Anthropic::Beta::BetaCapabilitySupport }, nil?: true
42
+
43
+ # @!method initialize(high:, low:, max:, medium:, supported:, xhigh:)
38
44
  # Effort (reasoning_effort) capability details.
39
45
  #
40
46
  # @param high [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports high effort level.
@@ -46,6 +52,8 @@ module Anthropic
46
52
  # @param medium [Anthropic::Models::Beta::BetaCapabilitySupport] Whether the model supports medium effort level.
47
53
  #
48
54
  # @param supported [Boolean] Whether this capability is supported by the model.
55
+ #
56
+ # @param xhigh [Anthropic::Models::Beta::BetaCapabilitySupport, nil] Indicates whether a capability is supported.
49
57
  end
50
58
  end
51
59
 
@@ -9,6 +9,8 @@ module Anthropic
9
9
  module BetaManagedAgentsModel
10
10
  extend Anthropic::Internal::Type::Union
11
11
 
12
+ variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_OPUS_4_7 }
13
+
12
14
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_OPUS_4_6 }
13
15
 
14
16
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_SONNET_4_6 }
@@ -36,6 +38,9 @@ module Anthropic
36
38
 
37
39
  # @!group
38
40
 
41
+ # Frontier intelligence for long-running agents and coding
42
+ CLAUDE_OPUS_4_7 = :"claude-opus-4-7"
43
+
39
44
  # Most intelligent model for building agents and coding
40
45
  CLAUDE_OPUS_4_6 = :"claude-opus-4-6"
41
46
 
@@ -17,13 +17,21 @@ module Anthropic
17
17
  # @return [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
18
18
  optional :format_, -> { Anthropic::Beta::BetaJSONOutputFormat }, api_name: :format, nil?: true
19
19
 
20
- # @!method initialize(effort: nil, format_: nil)
20
+ # @!attribute task_budget
21
+ # User-configurable total token budget across contexts.
22
+ #
23
+ # @return [Anthropic::Models::Beta::BetaTokenTaskBudget, nil]
24
+ optional :task_budget, -> { Anthropic::Beta::BetaTokenTaskBudget }, nil?: true
25
+
26
+ # @!method initialize(effort: nil, format_: nil, task_budget: nil)
21
27
  # Some parameter documentations has been truncated, see
22
28
  # {Anthropic::Models::Beta::BetaOutputConfig} for more details.
23
29
  #
24
30
  # @param effort [Symbol, Anthropic::Models::Beta::BetaOutputConfig::Effort, nil] All possible effort levels.
25
31
  #
26
32
  # @param format_ [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] A schema to specify Claude's output format in responses. See [structured outputs
33
+ #
34
+ # @param task_budget [Anthropic::Models::Beta::BetaTokenTaskBudget, nil] User-configurable total token budget across contexts.
27
35
 
28
36
  # All possible effort levels.
29
37
  #
@@ -34,6 +42,7 @@ module Anthropic
34
42
  LOW = :low
35
43
  MEDIUM = :medium
36
44
  HIGH = :high
45
+ XHIGH = :xhigh
37
46
  MAX = :max
38
47
 
39
48
  # @!method self.values
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaTokenTaskBudget < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute total
8
+ # Total token budget across all contexts in the session.
9
+ #
10
+ # @return [Integer]
11
+ required :total, Integer
12
+
13
+ # @!attribute type
14
+ # The budget type. Currently only 'tokens' is supported.
15
+ #
16
+ # @return [Symbol, :tokens]
17
+ required :type, const: :tokens
18
+
19
+ # @!attribute remaining
20
+ # Remaining tokens in the budget. Use this to track usage across contexts when
21
+ # implementing compaction client-side. Defaults to total if not provided.
22
+ #
23
+ # @return [Integer, nil]
24
+ optional :remaining, Integer, nil?: true
25
+
26
+ # @!method initialize(total:, remaining: nil, type: :tokens)
27
+ # Some parameter documentations has been truncated, see
28
+ # {Anthropic::Models::Beta::BetaTokenTaskBudget} for more details.
29
+ #
30
+ # User-configurable total token budget across contexts.
31
+ #
32
+ # @param total [Integer] Total token budget across all contexts in the session.
33
+ #
34
+ # @param remaining [Integer, nil] Remaining tokens in the budget. Use this to track usage across contexts when imp
35
+ #
36
+ # @param type [Symbol, :tokens] The budget type. Currently only 'tokens' is supported.
37
+ end
38
+ end
39
+
40
+ BetaTokenTaskBudget = Beta::BetaTokenTaskBudget
41
+ end
42
+ end
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#create
7
+ class BetaUserProfile < Anthropic::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # Unique identifier for this user profile, prefixed `uprof_`.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute created_at
15
+ # A timestamp in RFC 3339 format
16
+ #
17
+ # @return [Time]
18
+ required :created_at, Time
19
+
20
+ # @!attribute metadata
21
+ # Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up
22
+ # to 512 chars.
23
+ #
24
+ # @return [Hash{Symbol=>String}]
25
+ required :metadata, Anthropic::Internal::Type::HashOf[String]
26
+
27
+ # @!attribute trust_grants
28
+ # Trust grants for this profile, keyed by grant name. Key omitted when no grant is
29
+ # active or in flight.
30
+ #
31
+ # @return [Hash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant}]
32
+ required :trust_grants,
33
+ -> { Anthropic::Internal::Type::HashOf[Anthropic::Beta::BetaUserProfileTrustGrant] }
34
+
35
+ # @!attribute type
36
+ # Object type. Always `user_profile`.
37
+ #
38
+ # @return [Symbol, Anthropic::Models::Beta::BetaUserProfile::Type]
39
+ required :type, enum: -> { Anthropic::Beta::BetaUserProfile::Type }
40
+
41
+ # @!attribute updated_at
42
+ # A timestamp in RFC 3339 format
43
+ #
44
+ # @return [Time]
45
+ required :updated_at, Time
46
+
47
+ # @!attribute external_id
48
+ # Platform's own identifier for this user. Not enforced unique.
49
+ #
50
+ # @return [String, nil]
51
+ optional :external_id, String, nil?: true
52
+
53
+ # @!method initialize(id:, created_at:, metadata:, trust_grants:, type:, updated_at:, external_id: nil)
54
+ # Some parameter documentations has been truncated, see
55
+ # {Anthropic::Models::Beta::BetaUserProfile} for more details.
56
+ #
57
+ # @param id [String] Unique identifier for this user profile, prefixed `uprof_`.
58
+ #
59
+ # @param created_at [Time] A timestamp in RFC 3339 format
60
+ #
61
+ # @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up t
62
+ #
63
+ # @param trust_grants [Hash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant}] Trust grants for this profile, keyed by grant name. Key omitted when no grant is
64
+ #
65
+ # @param type [Symbol, Anthropic::Models::Beta::BetaUserProfile::Type] Object type. Always `user_profile`.
66
+ #
67
+ # @param updated_at [Time] A timestamp in RFC 3339 format
68
+ #
69
+ # @param external_id [String, nil] Platform's own identifier for this user. Not enforced unique.
70
+
71
+ # Object type. Always `user_profile`.
72
+ #
73
+ # @see Anthropic::Models::Beta::BetaUserProfile#type
74
+ module Type
75
+ extend Anthropic::Internal::Type::Enum
76
+
77
+ USER_PROFILE = :user_profile
78
+
79
+ # @!method self.values
80
+ # @return [Array<Symbol>]
81
+ end
82
+ end
83
+ end
84
+
85
+ BetaUserProfile = Beta::BetaUserProfile
86
+ end
87
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#create_enrollment_url
7
+ class BetaUserProfileEnrollmentURL < Anthropic::Internal::Type::BaseModel
8
+ # @!attribute expires_at
9
+ # A timestamp in RFC 3339 format
10
+ #
11
+ # @return [Time]
12
+ required :expires_at, Time
13
+
14
+ # @!attribute type
15
+ # Object type. Always `enrollment_url`.
16
+ #
17
+ # @return [Symbol, Anthropic::Models::Beta::BetaUserProfileEnrollmentURL::Type]
18
+ required :type, enum: -> { Anthropic::Beta::BetaUserProfileEnrollmentURL::Type }
19
+
20
+ # @!attribute url
21
+ # Enrollment URL to send to the end user. Valid until `expires_at`.
22
+ #
23
+ # @return [String]
24
+ required :url, String
25
+
26
+ # @!method initialize(expires_at:, type:, url:)
27
+ # @param expires_at [Time] A timestamp in RFC 3339 format
28
+ #
29
+ # @param type [Symbol, Anthropic::Models::Beta::BetaUserProfileEnrollmentURL::Type] Object type. Always `enrollment_url`.
30
+ #
31
+ # @param url [String] Enrollment URL to send to the end user. Valid until `expires_at`.
32
+
33
+ # Object type. Always `enrollment_url`.
34
+ #
35
+ # @see Anthropic::Models::Beta::BetaUserProfileEnrollmentURL#type
36
+ module Type
37
+ extend Anthropic::Internal::Type::Enum
38
+
39
+ ENROLLMENT_URL = :enrollment_url
40
+
41
+ # @!method self.values
42
+ # @return [Array<Symbol>]
43
+ end
44
+ end
45
+ end
46
+
47
+ BetaUserProfileEnrollmentURL = Beta::BetaUserProfileEnrollmentURL
48
+ end
49
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaUserProfileTrustGrant < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute status
8
+ # Status of the trust grant.
9
+ #
10
+ # @return [Symbol, Anthropic::Models::Beta::BetaUserProfileTrustGrant::Status]
11
+ required :status, enum: -> { Anthropic::Beta::BetaUserProfileTrustGrant::Status }
12
+
13
+ # @!method initialize(status:)
14
+ # @param status [Symbol, Anthropic::Models::Beta::BetaUserProfileTrustGrant::Status] Status of the trust grant.
15
+
16
+ # Status of the trust grant.
17
+ #
18
+ # @see Anthropic::Models::Beta::BetaUserProfileTrustGrant#status
19
+ module Status
20
+ extend Anthropic::Internal::Type::Enum
21
+
22
+ ACTIVE = :active
23
+ PENDING = :pending
24
+ REJECTED = :rejected
25
+
26
+ # @!method self.values
27
+ # @return [Array<Symbol>]
28
+ end
29
+ end
30
+ end
31
+
32
+ BetaUserProfileTrustGrant = Beta::BetaUserProfileTrustGrant
33
+ end
34
+ end
@@ -352,13 +352,20 @@ module Anthropic
352
352
  # @return [Float, nil]
353
353
  optional :top_p, Float
354
354
 
355
+ # @!attribute user_profile_id
356
+ # The user profile ID to attribute this request to. Use when acting on behalf of a
357
+ # party other than your organization.
358
+ #
359
+ # @return [String, nil]
360
+ optional :user_profile_id, String, nil?: true
361
+
355
362
  # @!attribute betas
356
363
  # Optional header to specify the beta version(s) you want to use.
357
364
  #
358
365
  # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
359
366
  optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
360
367
 
361
- # @!method initialize(max_tokens:, messages:, model:, cache_control: nil, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
368
+ # @!method initialize(max_tokens:, messages:, model:, cache_control: nil, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, user_profile_id: nil, betas: nil, request_options: {})
362
369
  # Some parameter documentations has been truncated, see
363
370
  # {Anthropic::Models::Beta::MessageCreateParams} for more details.
364
371
  #
@@ -404,6 +411,8 @@ module Anthropic
404
411
  #
405
412
  # @param top_p [Float] Use nucleus sampling.
406
413
  #
414
+ # @param user_profile_id [String, nil] The user profile ID to attribute this request to. Use when acting on behalf of a
415
+ #
407
416
  # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
408
417
  #
409
418
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
@@ -420,7 +420,14 @@ module Anthropic
420
420
  # @return [Float, nil]
421
421
  optional :top_p, Float
422
422
 
423
- # @!method initialize(max_tokens:, messages:, model:, cache_control: nil, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil)
423
+ # @!attribute user_profile_id
424
+ # The user profile ID to attribute this request to. Use when acting on behalf of a
425
+ # party other than your organization.
426
+ #
427
+ # @return [String, nil]
428
+ optional :user_profile_id, String, nil?: true
429
+
430
+ # @!method initialize(max_tokens:, messages:, model:, cache_control: nil, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, user_profile_id: nil)
424
431
  # Some parameter documentations has been truncated, see
425
432
  # {Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params} for more
426
433
  # details.
@@ -473,6 +480,8 @@ module Anthropic
473
480
  # @param top_k [Integer] Only sample from the top K options for each subsequent token.
474
481
  #
475
482
  # @param top_p [Float] Use nucleus sampling.
483
+ #
484
+ # @param user_profile_id [String, nil] The user profile ID to attribute this request to. Use when acting on behalf of a
476
485
 
477
486
  # Container identifier for reuse across requests.
478
487
  #
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#create_enrollment_url
7
+ class UserProfileCreateEnrollmentURLParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute user_profile_id
12
+ #
13
+ # @return [String]
14
+ required :user_profile_id, String
15
+
16
+ # @!attribute betas
17
+ # Optional header to specify the beta version(s) you want to use.
18
+ #
19
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
20
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
21
+
22
+ # @!method initialize(user_profile_id:, betas: nil, request_options: {})
23
+ # @param user_profile_id [String]
24
+ #
25
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
26
+ #
27
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#create
7
+ class UserProfileCreateParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute external_id
12
+ # Platform's own identifier for this user. Not enforced unique. Maximum 255
13
+ # characters.
14
+ #
15
+ # @return [String, nil]
16
+ optional :external_id, String, nil?: true
17
+
18
+ # @!attribute metadata
19
+ # Free-form key-value data to attach to this user profile. Maximum 16 keys, with
20
+ # keys up to 64 characters and values up to 512 characters. Values must be
21
+ # non-empty strings.
22
+ #
23
+ # @return [Hash{Symbol=>String}, nil]
24
+ optional :metadata, Anthropic::Internal::Type::HashOf[String]
25
+
26
+ # @!attribute betas
27
+ # Optional header to specify the beta version(s) you want to use.
28
+ #
29
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
30
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
31
+
32
+ # @!method initialize(external_id: nil, metadata: nil, betas: nil, request_options: {})
33
+ # Some parameter documentations has been truncated, see
34
+ # {Anthropic::Models::Beta::UserProfileCreateParams} for more details.
35
+ #
36
+ # @param external_id [String, nil] Platform's own identifier for this user. Not enforced unique. Maximum 255 charac
37
+ #
38
+ # @param metadata [Hash{Symbol=>String}] Free-form key-value data to attach to this user profile. Maximum 16 keys, with k
39
+ #
40
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
41
+ #
42
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#list
7
+ class UserProfileListParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute limit
12
+ # Query parameter for limit
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :limit, Integer
16
+
17
+ # @!attribute order
18
+ # Query parameter for order
19
+ #
20
+ # @return [Symbol, Anthropic::Models::Beta::UserProfileListParams::Order, nil]
21
+ optional :order, enum: -> { Anthropic::Beta::UserProfileListParams::Order }
22
+
23
+ # @!attribute page
24
+ # Query parameter for page
25
+ #
26
+ # @return [String, nil]
27
+ optional :page, String
28
+
29
+ # @!attribute betas
30
+ # Optional header to specify the beta version(s) you want to use.
31
+ #
32
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
33
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
34
+
35
+ # @!method initialize(limit: nil, order: nil, page: nil, betas: nil, request_options: {})
36
+ # @param limit [Integer] Query parameter for limit
37
+ #
38
+ # @param order [Symbol, Anthropic::Models::Beta::UserProfileListParams::Order] Query parameter for order
39
+ #
40
+ # @param page [String] Query parameter for page
41
+ #
42
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
43
+ #
44
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
45
+
46
+ # Query parameter for order
47
+ module Order
48
+ extend Anthropic::Internal::Type::Enum
49
+
50
+ ASC = :asc
51
+ DESC = :desc
52
+
53
+ # @!method self.values
54
+ # @return [Array<Symbol>]
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::UserProfiles#retrieve
7
+ class UserProfileRetrieveParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute user_profile_id
12
+ #
13
+ # @return [String]
14
+ required :user_profile_id, String
15
+
16
+ # @!attribute betas
17
+ # Optional header to specify the beta version(s) you want to use.
18
+ #
19
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
20
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
21
+
22
+ # @!method initialize(user_profile_id:, betas: nil, request_options: {})
23
+ # @param user_profile_id [String]
24
+ #
25
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
26
+ #
27
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
31
+ end