cadenya 0.16.0 → 0.17.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae6a3e7de7658dc3909f5b116f10952737be338c529999a20c5678f9da27512b
4
- data.tar.gz: 3009569366c92b99760b8caea39f18bb848bf8c6f57ff4fc697cb07a6a7032ed
3
+ metadata.gz: 95ccbe7ef557fb4d1a576ba7483e09020bc0d2c026df9f46ed23f1f49eccd13f
4
+ data.tar.gz: a781fcd75e6729b264dea552d6aa92b1d57595437cc02842d101349f04da7a3b
5
5
  SHA512:
6
- metadata.gz: 7dbc099db32c64a045d6468124176665f3a86c431a4f014e0289372bad2475f2fd0095583a441810c59b86990049bc3dee004383f3db5858659541126911d87c
7
- data.tar.gz: fc2609020e4791914a3eb6259f8403039c82ae6cd9756bc680cbbbda589c583927805dfd115c1bba72a3b92d6b2500ba8141cf015b6a64e73b902891d764b811
6
+ metadata.gz: 756a4245fc74b038820f35a617a383558455c2c430e522d61576d2d08ae79db93636fec67feca574094bdbbfe5d82a1966467fc5beb1336a998c6952384c9c9f
7
+ data.tar.gz: 9c538148f62bbfc2c22d7de12e14b426600a24a0a769782998c3f01af4fa6699809dedf204a6c1b0fbce91b7ffc714bf13406d718bb42d9a3fb50eba4a085d28
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0 (2026-06-12)
4
+
5
+ Full Changelog: [v0.16.0...v0.17.0](https://github.com/cadenya/cadenya-ruby/compare/v0.16.0...v0.17.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([6a0f6da](https://github.com/cadenya/cadenya-ruby/commit/6a0f6da77dd3f34b582c40acc9971286bd5ff00f))
10
+
3
11
  ## 0.16.0 (2026-06-12)
4
12
 
5
13
  Full Changelog: [v0.15.0...v0.16.0](https://github.com/cadenya/cadenya-ruby/compare/v0.15.0...v0.16.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "cadenya", "~> 0.16.0"
20
+ gem "cadenya", "~> 0.17.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -28,8 +28,10 @@ module Cadenya
28
28
  # Some parameter documentations has been truncated, see
29
29
  # {Cadenya::Models::AIProviderKey} for more details.
30
30
  #
31
- # AIProviderKey is a customer-provided (BYOK) credential for an AI provider,
32
- # scoped to a workspace. The secret value is never returned in responses.
31
+ # AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
32
+ # keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
33
+ # AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
34
+ # account administrators. The secret value is never returned in responses.
33
35
  #
34
36
  # @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
35
37
  #
@@ -51,15 +53,27 @@ module Cadenya
51
53
  #
52
54
  # @return [Integer, nil]
53
55
  optional :enabled_model_count, Integer, api_name: :enabledModelCount
56
+
57
+ # @!attribute is_promotional
58
+ # Cadenya includes promotional keys (one for onboarding, and potentially more in
59
+ # the future). These are not added or maintained by account administrators.
60
+ #
61
+ # @return [Boolean, nil]
62
+ optional :is_promotional, Cadenya::Internal::Type::Boolean, api_name: :isPromotional
54
63
  end
55
64
 
56
- # @!method initialize(disabled_model_count: nil, enabled_model_count: nil)
65
+ # @!method initialize(disabled_model_count: nil, enabled_model_count: nil, is_promotional: nil)
66
+ # Some parameter documentations has been truncated, see
67
+ # {Cadenya::Models::AIProviderKey::Info} for more details.
68
+ #
57
69
  # AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
58
70
  # provider management UIs.
59
71
  #
60
72
  # @param disabled_model_count [Integer] Number of disabled models provisioned on this key.
61
73
  #
62
74
  # @param enabled_model_count [Integer] Number of enabled models provisioned on this key.
75
+ #
76
+ # @param is_promotional [Boolean] Cadenya includes promotional keys (one for onboarding, and potentially more in t
63
77
  end
64
78
  end
65
79
  end
@@ -37,6 +37,14 @@ module Cadenya
37
37
  # @return [String, nil]
38
38
  optional :prefix, String
39
39
 
40
+ # @!attribute promotional
41
+ # When true, return only promotional keys (provided by Cadenya, e.g. for
42
+ # onboarding). Defaults to returning all keys, customer-provided and promotional
43
+ # alike.
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :promotional, Cadenya::Internal::Type::Boolean
47
+
40
48
  # @!attribute query
41
49
  # Free-form search query
42
50
  #
@@ -49,7 +57,7 @@ module Cadenya
49
57
  # @return [String, nil]
50
58
  optional :sort_order, String
51
59
 
52
- # @!method initialize(workspace_id:, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
60
+ # @!method initialize(workspace_id:, cursor: nil, include_info: nil, limit: nil, prefix: nil, promotional: nil, query: nil, sort_order: nil, request_options: {})
53
61
  # Some parameter documentations has been truncated, see
54
62
  # {Cadenya::Models::AIProviderKeyListParams} for more details.
55
63
  #
@@ -63,6 +71,8 @@ module Cadenya
63
71
  #
64
72
  # @param prefix [String] Filter expression (query param: prefix)
65
73
  #
74
+ # @param promotional [Boolean] When true, return only promotional keys (provided by Cadenya, e.g. for
75
+ #
66
76
  # @param query [String] Free-form search query
67
77
  #
68
78
  # @param sort_order [String] Sort order for results (asc or desc by creation time)
@@ -69,19 +69,22 @@ module Cadenya
69
69
  optional :agent_variation_count, Integer, api_name: :agentVariationCount
70
70
 
71
71
  # @!attribute ai_provider_key
72
- # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
72
+ # AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
73
+ # keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
74
+ # AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
75
+ # account administrators. The secret value is never returned in responses.
73
76
  #
74
- # @return [Cadenya::Models::ResourceMetadata, nil]
75
- optional :ai_provider_key, -> { Cadenya::ResourceMetadata }, api_name: :aiProviderKey
77
+ # @return [Cadenya::Models::AIProviderKey, nil]
78
+ optional :ai_provider_key, -> { Cadenya::AIProviderKey }, api_name: :aiProviderKey
76
79
 
77
- # @!attribute provider
78
- # The AI provider this model routes through (via its provider key).
80
+ # @!attribute last_used_at
81
+ # Represents the last time this model was used in an agent objective
79
82
  #
80
- # @return [Symbol, Cadenya::Models::Model::Info::Provider, nil]
81
- optional :provider, enum: -> { Cadenya::Model::Info::Provider }
83
+ # @return [Time, nil]
84
+ optional :last_used_at, Time, api_name: :lastUsedAt
82
85
  end
83
86
 
84
- # @!method initialize(agent_variation_count: nil, ai_provider_key: nil, provider: nil)
87
+ # @!method initialize(agent_variation_count: nil, ai_provider_key: nil, last_used_at: nil)
85
88
  # Some parameter documentations has been truncated, see
86
89
  # {Cadenya::Models::Model::Info} for more details.
87
90
  #
@@ -89,22 +92,9 @@ module Cadenya
89
92
  #
90
93
  # @param agent_variation_count [Integer] Number of agent variations currently provisioned on this model. Useful for
91
94
  #
92
- # @param ai_provider_key [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
95
+ # @param ai_provider_key [Cadenya::Models::AIProviderKey] AIProviderKey is a credential for an AI provider, scoped to a workspace.
93
96
  #
94
- # @param provider [Symbol, Cadenya::Models::Model::Info::Provider] The AI provider this model routes through (via its provider key).
95
-
96
- # The AI provider this model routes through (via its provider key).
97
- #
98
- # @see Cadenya::Models::Model::Info#provider
99
- module Provider
100
- extend Cadenya::Internal::Type::Enum
101
-
102
- AI_PROVIDER_UNSPECIFIED = :AI_PROVIDER_UNSPECIFIED
103
- AI_PROVIDER_OPENROUTER = :AI_PROVIDER_OPENROUTER
104
-
105
- # @!method self.values
106
- # @return [Array<Symbol>]
107
- end
97
+ # @param last_used_at [Time] Represents the last time this model was used in an agent objective
108
98
  end
109
99
  end
110
100
  end
@@ -38,6 +38,14 @@ module Cadenya
38
38
  # @return [Boolean, nil]
39
39
  optional :include_info, Cadenya::Internal::Type::Boolean
40
40
 
41
+ # @!attribute is_assigned
42
+ # Filter models to only ones assigned to an active agent variation/agent. Draft
43
+ # agents count as assigned; archived agents do not. Assignment does not imply
44
+ # recent traffic — see ModelInfo.last_used_at for that.
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :is_assigned, Cadenya::Internal::Type::Boolean
48
+
41
49
  # @!attribute limit
42
50
  # Maximum number of results to return
43
51
  #
@@ -68,7 +76,7 @@ module Cadenya
68
76
  # @return [Symbol, Cadenya::Models::ModelListParams::State, nil]
69
77
  optional :state, enum: -> { Cadenya::ModelListParams::State }
70
78
 
71
- # @!method initialize(workspace_id:, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
79
+ # @!method initialize(workspace_id:, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, is_assigned: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
72
80
  # Some parameter documentations has been truncated, see
73
81
  # {Cadenya::Models::ModelListParams} for more details.
74
82
  #
@@ -82,6 +90,8 @@ module Cadenya
82
90
  #
83
91
  # @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
84
92
  #
93
+ # @param is_assigned [Boolean] Filter models to only ones assigned to an active agent variation/agent.
94
+ #
85
95
  # @param limit [Integer] Maximum number of results to return
86
96
  #
87
97
  # @param prefix [String] Filter by name prefix
@@ -34,15 +34,25 @@ module Cadenya
34
34
  # @return [String, nil]
35
35
  optional :current_model_id, String, api_name: :currentModelId
36
36
 
37
+ # @!attribute disable_current_after_swap
38
+ # Whether to disable the current model after the swap.
39
+ #
40
+ # @return [Boolean, nil]
41
+ optional :disable_current_after_swap,
42
+ Cadenya::Internal::Type::Boolean,
43
+ api_name: :disableCurrentAfterSwap
44
+
37
45
  # @!attribute next_model_id
38
46
  # The model to move variations to. Accepts an id or "external_id:" slug.
39
47
  #
40
48
  # @return [String, nil]
41
49
  optional :next_model_id, String, api_name: :nextModelId
42
50
 
43
- # @!method initialize(current_model_id: nil, next_model_id: nil)
51
+ # @!method initialize(current_model_id: nil, disable_current_after_swap: nil, next_model_id: nil)
44
52
  # @param current_model_id [String] The model variations are currently on. Accepts an id or "external_id:" slug.
45
53
  #
54
+ # @param disable_current_after_swap [Boolean] Whether to disable the current model after the swap.
55
+ #
46
56
  # @param next_model_id [String] The model to move variations to. Accepts an id or "external_id:" slug.
47
57
  end
48
58
  end
@@ -101,7 +101,7 @@ module Cadenya
101
101
  #
102
102
  # Lists all customer-provided AI provider keys in the workspace
103
103
  #
104
- # @overload list(workspace_id, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
104
+ # @overload list(workspace_id, cursor: nil, include_info: nil, limit: nil, prefix: nil, promotional: nil, query: nil, sort_order: nil, request_options: {})
105
105
  #
106
106
  # @param workspace_id [String] The workspace whose keys will be listed.
107
107
  #
@@ -113,6 +113,8 @@ module Cadenya
113
113
  #
114
114
  # @param prefix [String] Filter expression (query param: prefix)
115
115
  #
116
+ # @param promotional [Boolean] When true, return only promotional keys (provided by Cadenya, e.g. for
117
+ #
116
118
  # @param query [String] Free-form search query
117
119
  #
118
120
  # @param sort_order [String] Sort order for results (asc or desc by creation time)
@@ -38,7 +38,7 @@ module Cadenya
38
38
  #
39
39
  # Lists all models in the workspace
40
40
  #
41
- # @overload list(workspace_id, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
41
+ # @overload list(workspace_id, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, is_assigned: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
42
42
  #
43
43
  # @param workspace_id [String] Workspace ID.
44
44
  #
@@ -50,6 +50,8 @@ module Cadenya
50
50
  #
51
51
  # @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
52
52
  #
53
+ # @param is_assigned [Boolean] Filter models to only ones assigned to an active agent variation/agent.
54
+ #
53
55
  # @param limit [Integer] Maximum number of results to return
54
56
  #
55
57
  # @param prefix [String] Filter by name prefix
@@ -75,6 +77,7 @@ module Cadenya
75
77
  ai_provider_key_id: "aiProviderKeyId",
76
78
  bundle_key: "bundleKey",
77
79
  include_info: "includeInfo",
80
+ is_assigned: "isAssigned",
78
81
  sort_order: "sortOrder"
79
82
  ),
80
83
  page: Cadenya::Internal::CursorPagination,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.16.0"
4
+ VERSION = "0.17.0"
5
5
  end
@@ -29,8 +29,10 @@ module Cadenya
29
29
  sig { params(info: Cadenya::AIProviderKey::Info::OrHash).void }
30
30
  attr_writer :info
31
31
 
32
- # AIProviderKey is a customer-provided (BYOK) credential for an AI provider,
33
- # scoped to a workspace. The secret value is never returned in responses.
32
+ # AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
33
+ # keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
34
+ # AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
35
+ # account administrators. The secret value is never returned in responses.
34
36
  sig do
35
37
  params(
36
38
  metadata: Cadenya::ResourceMetadata::OrHash,
@@ -80,25 +82,41 @@ module Cadenya
80
82
  sig { params(enabled_model_count: Integer).void }
81
83
  attr_writer :enabled_model_count
82
84
 
85
+ # Cadenya includes promotional keys (one for onboarding, and potentially more in
86
+ # the future). These are not added or maintained by account administrators.
87
+ sig { returns(T.nilable(T::Boolean)) }
88
+ attr_reader :is_promotional
89
+
90
+ sig { params(is_promotional: T::Boolean).void }
91
+ attr_writer :is_promotional
92
+
83
93
  # AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
84
94
  # provider management UIs.
85
95
  sig do
86
96
  params(
87
97
  disabled_model_count: Integer,
88
- enabled_model_count: Integer
98
+ enabled_model_count: Integer,
99
+ is_promotional: T::Boolean
89
100
  ).returns(T.attached_class)
90
101
  end
91
102
  def self.new(
92
103
  # Number of disabled models provisioned on this key.
93
104
  disabled_model_count: nil,
94
105
  # Number of enabled models provisioned on this key.
95
- enabled_model_count: nil
106
+ enabled_model_count: nil,
107
+ # Cadenya includes promotional keys (one for onboarding, and potentially more in
108
+ # the future). These are not added or maintained by account administrators.
109
+ is_promotional: nil
96
110
  )
97
111
  end
98
112
 
99
113
  sig do
100
114
  override.returns(
101
- { disabled_model_count: Integer, enabled_model_count: Integer }
115
+ {
116
+ disabled_model_count: Integer,
117
+ enabled_model_count: Integer,
118
+ is_promotional: T::Boolean
119
+ }
102
120
  )
103
121
  end
104
122
  def to_hash
@@ -43,6 +43,15 @@ module Cadenya
43
43
  sig { params(prefix: String).void }
44
44
  attr_writer :prefix
45
45
 
46
+ # When true, return only promotional keys (provided by Cadenya, e.g. for
47
+ # onboarding). Defaults to returning all keys, customer-provided and promotional
48
+ # alike.
49
+ sig { returns(T.nilable(T::Boolean)) }
50
+ attr_reader :promotional
51
+
52
+ sig { params(promotional: T::Boolean).void }
53
+ attr_writer :promotional
54
+
46
55
  # Free-form search query
47
56
  sig { returns(T.nilable(String)) }
48
57
  attr_reader :query
@@ -64,6 +73,7 @@ module Cadenya
64
73
  include_info: T::Boolean,
65
74
  limit: Integer,
66
75
  prefix: String,
76
+ promotional: T::Boolean,
67
77
  query: String,
68
78
  sort_order: String,
69
79
  request_options: Cadenya::RequestOptions::OrHash
@@ -80,6 +90,10 @@ module Cadenya
80
90
  limit: nil,
81
91
  # Filter expression (query param: prefix)
82
92
  prefix: nil,
93
+ # When true, return only promotional keys (provided by Cadenya, e.g. for
94
+ # onboarding). Defaults to returning all keys, customer-provided and promotional
95
+ # alike.
96
+ promotional: nil,
83
97
  # Free-form search query
84
98
  query: nil,
85
99
  # Sort order for results (asc or desc by creation time)
@@ -96,6 +110,7 @@ module Cadenya
96
110
  include_info: T::Boolean,
97
111
  limit: Integer,
98
112
  prefix: String,
113
+ promotional: T::Boolean,
99
114
  query: String,
100
115
  sort_order: String,
101
116
  request_options: Cadenya::RequestOptions
@@ -100,36 +100,42 @@ module Cadenya
100
100
  sig { params(agent_variation_count: Integer).void }
101
101
  attr_writer :agent_variation_count
102
102
 
103
- # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
104
- sig { returns(T.nilable(Cadenya::ResourceMetadata)) }
103
+ # AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
104
+ # keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
105
+ # AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
106
+ # account administrators. The secret value is never returned in responses.
107
+ sig { returns(T.nilable(Cadenya::AIProviderKey)) }
105
108
  attr_reader :ai_provider_key
106
109
 
107
- sig { params(ai_provider_key: Cadenya::ResourceMetadata::OrHash).void }
110
+ sig { params(ai_provider_key: Cadenya::AIProviderKey::OrHash).void }
108
111
  attr_writer :ai_provider_key
109
112
 
110
- # The AI provider this model routes through (via its provider key).
111
- sig { returns(T.nilable(Cadenya::Model::Info::Provider::TaggedSymbol)) }
112
- attr_reader :provider
113
+ # Represents the last time this model was used in an agent objective
114
+ sig { returns(T.nilable(Time)) }
115
+ attr_reader :last_used_at
113
116
 
114
- sig { params(provider: Cadenya::Model::Info::Provider::OrSymbol).void }
115
- attr_writer :provider
117
+ sig { params(last_used_at: Time).void }
118
+ attr_writer :last_used_at
116
119
 
117
120
  # ModelInfo carries server-derived, read-only details about a model.
118
121
  sig do
119
122
  params(
120
123
  agent_variation_count: Integer,
121
- ai_provider_key: Cadenya::ResourceMetadata::OrHash,
122
- provider: Cadenya::Model::Info::Provider::OrSymbol
124
+ ai_provider_key: Cadenya::AIProviderKey::OrHash,
125
+ last_used_at: Time
123
126
  ).returns(T.attached_class)
124
127
  end
125
128
  def self.new(
126
129
  # Number of agent variations currently provisioned on this model. Useful for
127
130
  # previewing how many variations a swap would affect.
128
131
  agent_variation_count: nil,
129
- # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
132
+ # AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
133
+ # keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
134
+ # AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
135
+ # account administrators. The secret value is never returned in responses.
130
136
  ai_provider_key: nil,
131
- # The AI provider this model routes through (via its provider key).
132
- provider: nil
137
+ # Represents the last time this model was used in an agent objective
138
+ last_used_at: nil
133
139
  )
134
140
  end
135
141
 
@@ -137,41 +143,13 @@ module Cadenya
137
143
  override.returns(
138
144
  {
139
145
  agent_variation_count: Integer,
140
- ai_provider_key: Cadenya::ResourceMetadata,
141
- provider: Cadenya::Model::Info::Provider::TaggedSymbol
146
+ ai_provider_key: Cadenya::AIProviderKey,
147
+ last_used_at: Time
142
148
  }
143
149
  )
144
150
  end
145
151
  def to_hash
146
152
  end
147
-
148
- # The AI provider this model routes through (via its provider key).
149
- module Provider
150
- extend Cadenya::Internal::Type::Enum
151
-
152
- TaggedSymbol =
153
- T.type_alias { T.all(Symbol, Cadenya::Model::Info::Provider) }
154
- OrSymbol = T.type_alias { T.any(Symbol, String) }
155
-
156
- AI_PROVIDER_UNSPECIFIED =
157
- T.let(
158
- :AI_PROVIDER_UNSPECIFIED,
159
- Cadenya::Model::Info::Provider::TaggedSymbol
160
- )
161
- AI_PROVIDER_OPENROUTER =
162
- T.let(
163
- :AI_PROVIDER_OPENROUTER,
164
- Cadenya::Model::Info::Provider::TaggedSymbol
165
- )
166
-
167
- sig do
168
- override.returns(
169
- T::Array[Cadenya::Model::Info::Provider::TaggedSymbol]
170
- )
171
- end
172
- def self.values
173
- end
174
- end
175
153
  end
176
154
  end
177
155
  end
@@ -44,6 +44,15 @@ module Cadenya
44
44
  sig { params(include_info: T::Boolean).void }
45
45
  attr_writer :include_info
46
46
 
47
+ # Filter models to only ones assigned to an active agent variation/agent. Draft
48
+ # agents count as assigned; archived agents do not. Assignment does not imply
49
+ # recent traffic — see ModelInfo.last_used_at for that.
50
+ sig { returns(T.nilable(T::Boolean)) }
51
+ attr_reader :is_assigned
52
+
53
+ sig { params(is_assigned: T::Boolean).void }
54
+ attr_writer :is_assigned
55
+
47
56
  # Maximum number of results to return
48
57
  sig { returns(T.nilable(Integer)) }
49
58
  attr_reader :limit
@@ -86,6 +95,7 @@ module Cadenya
86
95
  bundle_key: String,
87
96
  cursor: String,
88
97
  include_info: T::Boolean,
98
+ is_assigned: T::Boolean,
89
99
  limit: Integer,
90
100
  prefix: String,
91
101
  query: String,
@@ -106,6 +116,10 @@ module Cadenya
106
116
  # When true, populate each item's info (e.g. the AI provider), at the cost of
107
117
  # extra lookups.
108
118
  include_info: nil,
119
+ # Filter models to only ones assigned to an active agent variation/agent. Draft
120
+ # agents count as assigned; archived agents do not. Assignment does not imply
121
+ # recent traffic — see ModelInfo.last_used_at for that.
122
+ is_assigned: nil,
109
123
  # Maximum number of results to return
110
124
  limit: nil,
111
125
  # Filter by name prefix
@@ -128,6 +142,7 @@ module Cadenya
128
142
  bundle_key: String,
129
143
  cursor: String,
130
144
  include_info: T::Boolean,
145
+ is_assigned: T::Boolean,
131
146
  limit: Integer,
132
147
  prefix: String,
133
148
  query: String,
@@ -68,6 +68,13 @@ module Cadenya
68
68
  sig { params(current_model_id: String).void }
69
69
  attr_writer :current_model_id
70
70
 
71
+ # Whether to disable the current model after the swap.
72
+ sig { returns(T.nilable(T::Boolean)) }
73
+ attr_reader :disable_current_after_swap
74
+
75
+ sig { params(disable_current_after_swap: T::Boolean).void }
76
+ attr_writer :disable_current_after_swap
77
+
71
78
  # The model to move variations to. Accepts an id or "external_id:" slug.
72
79
  sig { returns(T.nilable(String)) }
73
80
  attr_reader :next_model_id
@@ -76,20 +83,30 @@ module Cadenya
76
83
  attr_writer :next_model_id
77
84
 
78
85
  sig do
79
- params(current_model_id: String, next_model_id: String).returns(
80
- T.attached_class
81
- )
86
+ params(
87
+ current_model_id: String,
88
+ disable_current_after_swap: T::Boolean,
89
+ next_model_id: String
90
+ ).returns(T.attached_class)
82
91
  end
83
92
  def self.new(
84
93
  # The model variations are currently on. Accepts an id or "external_id:" slug.
85
94
  current_model_id: nil,
95
+ # Whether to disable the current model after the swap.
96
+ disable_current_after_swap: nil,
86
97
  # The model to move variations to. Accepts an id or "external_id:" slug.
87
98
  next_model_id: nil
88
99
  )
89
100
  end
90
101
 
91
102
  sig do
92
- override.returns({ current_model_id: String, next_model_id: String })
103
+ override.returns(
104
+ {
105
+ current_model_id: String,
106
+ disable_current_after_swap: T::Boolean,
107
+ next_model_id: String
108
+ }
109
+ )
93
110
  end
94
111
  def to_hash
95
112
  end
@@ -78,6 +78,7 @@ module Cadenya
78
78
  include_info: T::Boolean,
79
79
  limit: Integer,
80
80
  prefix: String,
81
+ promotional: T::Boolean,
81
82
  query: String,
82
83
  sort_order: String,
83
84
  request_options: Cadenya::RequestOptions::OrHash
@@ -95,6 +96,10 @@ module Cadenya
95
96
  limit: nil,
96
97
  # Filter expression (query param: prefix)
97
98
  prefix: nil,
99
+ # When true, return only promotional keys (provided by Cadenya, e.g. for
100
+ # onboarding). Defaults to returning all keys, customer-provided and promotional
101
+ # alike.
102
+ promotional: nil,
98
103
  # Free-form search query
99
104
  query: nil,
100
105
  # Sort order for results (asc or desc by creation time)
@@ -31,6 +31,7 @@ module Cadenya
31
31
  bundle_key: String,
32
32
  cursor: String,
33
33
  include_info: T::Boolean,
34
+ is_assigned: T::Boolean,
34
35
  limit: Integer,
35
36
  prefix: String,
36
37
  query: String,
@@ -52,6 +53,10 @@ module Cadenya
52
53
  # When true, populate each item's info (e.g. the AI provider), at the cost of
53
54
  # extra lookups.
54
55
  include_info: nil,
56
+ # Filter models to only ones assigned to an active agent variation/agent. Draft
57
+ # agents count as assigned; archived agents do not. Assignment does not imply
58
+ # recent traffic — see ModelInfo.last_used_at for that.
59
+ is_assigned: nil,
55
60
  # Maximum number of results to return
56
61
  limit: nil,
57
62
  # Filter by name prefix
@@ -29,7 +29,11 @@ module Cadenya
29
29
  }
30
30
 
31
31
  type info =
32
- { disabled_model_count: Integer, enabled_model_count: Integer }
32
+ {
33
+ disabled_model_count: Integer,
34
+ enabled_model_count: Integer,
35
+ is_promotional: bool
36
+ }
33
37
 
34
38
  class Info < Cadenya::Internal::Type::BaseModel
35
39
  attr_reader disabled_model_count: Integer?
@@ -40,14 +44,20 @@ module Cadenya
40
44
 
41
45
  def enabled_model_count=: (Integer) -> Integer
42
46
 
47
+ attr_reader is_promotional: bool?
48
+
49
+ def is_promotional=: (bool) -> bool
50
+
43
51
  def initialize: (
44
52
  ?disabled_model_count: Integer,
45
- ?enabled_model_count: Integer
53
+ ?enabled_model_count: Integer,
54
+ ?is_promotional: bool
46
55
  ) -> void
47
56
 
48
57
  def to_hash: -> {
49
58
  disabled_model_count: Integer,
50
- enabled_model_count: Integer
59
+ enabled_model_count: Integer,
60
+ is_promotional: bool
51
61
  }
52
62
  end
53
63
  end
@@ -7,6 +7,7 @@ module Cadenya
7
7
  include_info: bool,
8
8
  limit: Integer,
9
9
  prefix: String,
10
+ promotional: bool,
10
11
  query: String,
11
12
  sort_order: String
12
13
  }
@@ -34,6 +35,10 @@ module Cadenya
34
35
 
35
36
  def prefix=: (String) -> String
36
37
 
38
+ attr_reader promotional: bool?
39
+
40
+ def promotional=: (bool) -> bool
41
+
37
42
  attr_reader query: String?
38
43
 
39
44
  def query=: (String) -> String
@@ -48,6 +53,7 @@ module Cadenya
48
53
  ?include_info: bool,
49
54
  ?limit: Integer,
50
55
  ?prefix: String,
56
+ ?promotional: bool,
51
57
  ?query: String,
52
58
  ?sort_order: String,
53
59
  ?request_options: Cadenya::request_opts
@@ -59,6 +65,7 @@ module Cadenya
59
65
  include_info: bool,
60
66
  limit: Integer,
61
67
  prefix: String,
68
+ promotional: bool,
62
69
  query: String,
63
70
  sort_order: String,
64
71
  request_options: Cadenya::RequestOptions
@@ -48,8 +48,8 @@ module Cadenya
48
48
  type info =
49
49
  {
50
50
  agent_variation_count: Integer,
51
- ai_provider_key: Cadenya::ResourceMetadata,
52
- provider: Cadenya::Models::Model::Info::provider
51
+ ai_provider_key: Cadenya::AIProviderKey,
52
+ last_used_at: Time
53
53
  }
54
54
 
55
55
  class Info < Cadenya::Internal::Type::BaseModel
@@ -57,40 +57,25 @@ module Cadenya
57
57
 
58
58
  def agent_variation_count=: (Integer) -> Integer
59
59
 
60
- attr_reader ai_provider_key: Cadenya::ResourceMetadata?
60
+ attr_reader ai_provider_key: Cadenya::AIProviderKey?
61
61
 
62
- def ai_provider_key=: (
63
- Cadenya::ResourceMetadata
64
- ) -> Cadenya::ResourceMetadata
62
+ def ai_provider_key=: (Cadenya::AIProviderKey) -> Cadenya::AIProviderKey
65
63
 
66
- attr_reader provider: Cadenya::Models::Model::Info::provider?
64
+ attr_reader last_used_at: Time?
67
65
 
68
- def provider=: (
69
- Cadenya::Models::Model::Info::provider
70
- ) -> Cadenya::Models::Model::Info::provider
66
+ def last_used_at=: (Time) -> Time
71
67
 
72
68
  def initialize: (
73
69
  ?agent_variation_count: Integer,
74
- ?ai_provider_key: Cadenya::ResourceMetadata,
75
- ?provider: Cadenya::Models::Model::Info::provider
70
+ ?ai_provider_key: Cadenya::AIProviderKey,
71
+ ?last_used_at: Time
76
72
  ) -> void
77
73
 
78
74
  def to_hash: -> {
79
75
  agent_variation_count: Integer,
80
- ai_provider_key: Cadenya::ResourceMetadata,
81
- provider: Cadenya::Models::Model::Info::provider
76
+ ai_provider_key: Cadenya::AIProviderKey,
77
+ last_used_at: Time
82
78
  }
83
-
84
- type provider = :AI_PROVIDER_UNSPECIFIED | :AI_PROVIDER_OPENROUTER
85
-
86
- module Provider
87
- extend Cadenya::Internal::Type::Enum
88
-
89
- AI_PROVIDER_UNSPECIFIED: :AI_PROVIDER_UNSPECIFIED
90
- AI_PROVIDER_OPENROUTER: :AI_PROVIDER_OPENROUTER
91
-
92
- def self?.values: -> ::Array[Cadenya::Models::Model::Info::provider]
93
- end
94
79
  end
95
80
  end
96
81
  end
@@ -7,6 +7,7 @@ module Cadenya
7
7
  bundle_key: String,
8
8
  cursor: String,
9
9
  include_info: bool,
10
+ is_assigned: bool,
10
11
  limit: Integer,
11
12
  prefix: String,
12
13
  query: String,
@@ -37,6 +38,10 @@ module Cadenya
37
38
 
38
39
  def include_info=: (bool) -> bool
39
40
 
41
+ attr_reader is_assigned: bool?
42
+
43
+ def is_assigned=: (bool) -> bool
44
+
40
45
  attr_reader limit: Integer?
41
46
 
42
47
  def limit=: (Integer) -> Integer
@@ -65,6 +70,7 @@ module Cadenya
65
70
  ?bundle_key: String,
66
71
  ?cursor: String,
67
72
  ?include_info: bool,
73
+ ?is_assigned: bool,
68
74
  ?limit: Integer,
69
75
  ?prefix: String,
70
76
  ?query: String,
@@ -79,6 +85,7 @@ module Cadenya
79
85
  bundle_key: String,
80
86
  cursor: String,
81
87
  include_info: bool,
88
+ is_assigned: bool,
82
89
  limit: Integer,
83
90
  prefix: String,
84
91
  query: String,
@@ -31,23 +31,37 @@ module Cadenya
31
31
  request_options: Cadenya::RequestOptions
32
32
  }
33
33
 
34
- type model_swap = { current_model_id: String, next_model_id: String }
34
+ type model_swap =
35
+ {
36
+ current_model_id: String,
37
+ disable_current_after_swap: bool,
38
+ next_model_id: String
39
+ }
35
40
 
36
41
  class ModelSwap < Cadenya::Internal::Type::BaseModel
37
42
  attr_reader current_model_id: String?
38
43
 
39
44
  def current_model_id=: (String) -> String
40
45
 
46
+ attr_reader disable_current_after_swap: bool?
47
+
48
+ def disable_current_after_swap=: (bool) -> bool
49
+
41
50
  attr_reader next_model_id: String?
42
51
 
43
52
  def next_model_id=: (String) -> String
44
53
 
45
54
  def initialize: (
46
55
  ?current_model_id: String,
56
+ ?disable_current_after_swap: bool,
47
57
  ?next_model_id: String
48
58
  ) -> void
49
59
 
50
- def to_hash: -> { current_model_id: String, next_model_id: String }
60
+ def to_hash: -> {
61
+ current_model_id: String,
62
+ disable_current_after_swap: bool,
63
+ next_model_id: String
64
+ }
51
65
  end
52
66
  end
53
67
  end
@@ -29,6 +29,7 @@ module Cadenya
29
29
  ?include_info: bool,
30
30
  ?limit: Integer,
31
31
  ?prefix: String,
32
+ ?promotional: bool,
32
33
  ?query: String,
33
34
  ?sort_order: String,
34
35
  ?request_options: Cadenya::request_opts
@@ -13,6 +13,7 @@ module Cadenya
13
13
  ?bundle_key: String,
14
14
  ?cursor: String,
15
15
  ?include_info: bool,
16
+ ?is_assigned: bool,
16
17
  ?limit: Integer,
17
18
  ?prefix: String,
18
19
  ?query: String,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadenya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cadenya