cadenya 0.3.0 → 0.5.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +6 -6
- data/lib/cadenya/client.rb +4 -0
- data/lib/cadenya/internal/cursor_pagination.rb +2 -2
- data/lib/cadenya/models/ai_provider_key.rb +66 -0
- data/lib/cadenya/models/ai_provider_key_create_params.rb +41 -0
- data/lib/cadenya/models/ai_provider_key_delete_params.rb +26 -0
- data/lib/cadenya/models/ai_provider_key_list_params.rb +73 -0
- data/lib/cadenya/models/ai_provider_key_retrieve_params.rb +26 -0
- data/lib/cadenya/models/ai_provider_key_spec.rb +51 -0
- data/lib/cadenya/models/ai_provider_key_update_params.rb +56 -0
- data/lib/cadenya/models/model.rb +56 -1
- data/lib/cadenya/models/model_list_params.rb +22 -1
- data/lib/cadenya/models.rb +14 -0
- data/lib/cadenya/resources/ai_provider_keys.rb +173 -0
- data/lib/cadenya/resources/models.rb +14 -2
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +8 -0
- data/rbi/cadenya/client.rbi +3 -0
- data/rbi/cadenya/models/ai_provider_key.rbi +109 -0
- data/rbi/cadenya/models/ai_provider_key_create_params.rbi +65 -0
- data/rbi/cadenya/models/ai_provider_key_delete_params.rbi +43 -0
- data/rbi/cadenya/models/ai_provider_key_list_params.rbi +109 -0
- data/rbi/cadenya/models/ai_provider_key_retrieve_params.rbi +46 -0
- data/rbi/cadenya/models/ai_provider_key_spec.rbi +98 -0
- data/rbi/cadenya/models/ai_provider_key_update_params.rbi +82 -0
- data/rbi/cadenya/models/model.rbi +102 -3
- data/rbi/cadenya/models/model_list_params.rbi +26 -0
- data/rbi/cadenya/models.rbi +14 -0
- data/rbi/cadenya/resources/ai_provider_keys.rbi +129 -0
- data/rbi/cadenya/resources/models.rbi +8 -0
- data/sig/cadenya/client.rbs +2 -0
- data/sig/cadenya/models/ai_provider_key.rbs +55 -0
- data/sig/cadenya/models/ai_provider_key_create_params.rbs +36 -0
- data/sig/cadenya/models/ai_provider_key_delete_params.rbs +28 -0
- data/sig/cadenya/models/ai_provider_key_list_params.rbs +68 -0
- data/sig/cadenya/models/ai_provider_key_retrieve_params.rbs +28 -0
- data/sig/cadenya/models/ai_provider_key_spec.rbs +49 -0
- data/sig/cadenya/models/ai_provider_key_update_params.rbs +54 -0
- data/sig/cadenya/models/model.rbs +52 -3
- data/sig/cadenya/models/model_list_params.rbs +14 -0
- data/sig/cadenya/models.rbs +14 -0
- data/sig/cadenya/resources/ai_provider_keys.rbs +46 -0
- data/sig/cadenya/resources/models.rbs +2 -0
- metadata +26 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2d3ccc2b08967b6c09113b9f86077582cecb2ff914643efd624d35f590ee2e9
|
|
4
|
+
data.tar.gz: 7e2cfc5c58da2c628a855f586bc46aba2b96c936ac13611c3cb0761b54c0e028
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 577b0a9463ee0830ec2f85033e6e858172101ca5580f398c919c4c45b6c5d5867358fa2c3e1dc18f316040ce50bde17065d18991a7bc053a8d4a4dcae936ac54
|
|
7
|
+
data.tar.gz: 623d30dc59554aeb07440ac9c163fc99ff2cb45120c36601a74133b3cb7cb02301f37b5abcf47addf165eacdc2652254846a81d9bf0f2d02ce49d71ac3f091f3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-06-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/cadenya/cadenya-ruby/compare/v0.4.0...v0.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([d88fdeb](https://github.com/cadenya/cadenya-ruby/commit/d88fdeb06d9d9ba77523cb5b36818c74119ec466))
|
|
10
|
+
|
|
11
|
+
## 0.4.0 (2026-06-07)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/cadenya/cadenya-ruby/compare/v0.3.0...v0.4.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* Add AI Provider CRUD endpoints ([91caf5c](https://github.com/cadenya/cadenya-ruby/commit/91caf5c762a8e75460076b4a9a864c9a34345720))
|
|
18
|
+
|
|
3
19
|
## 0.3.0 (2026-06-05)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.2.0...v0.3.0](https://github.com/cadenya/cadenya-ruby/compare/v0.2.0...v0.3.0)
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "cadenya", "~> 0.
|
|
29
|
+
gem "cadenya", "~> 0.5.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -53,15 +53,15 @@ List methods in the Cadenya API are paginated.
|
|
|
53
53
|
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
|
|
54
54
|
|
|
55
55
|
```ruby
|
|
56
|
-
page = cadenya.
|
|
56
|
+
page = cadenya.ai_provider_keys.list
|
|
57
57
|
|
|
58
58
|
# Fetch single item from page.
|
|
59
|
-
|
|
60
|
-
puts(
|
|
59
|
+
ai_provider_key = page.items[0]
|
|
60
|
+
puts(ai_provider_key.metadata)
|
|
61
61
|
|
|
62
62
|
# Automatically fetches more pages as needed.
|
|
63
|
-
page.auto_paging_each do |
|
|
64
|
-
puts(
|
|
63
|
+
page.auto_paging_each do |ai_provider_key|
|
|
64
|
+
puts(ai_provider_key.metadata)
|
|
65
65
|
end
|
|
66
66
|
```
|
|
67
67
|
|
data/lib/cadenya/client.rb
CHANGED
|
@@ -21,6 +21,9 @@ module Cadenya
|
|
|
21
21
|
# @return [String, nil]
|
|
22
22
|
attr_reader :webhook_key
|
|
23
23
|
|
|
24
|
+
# @return [Cadenya::Resources::AIProviderKeys]
|
|
25
|
+
attr_reader :ai_provider_keys
|
|
26
|
+
|
|
24
27
|
# Manage the authenticated account. Accounts are the top-level organizational unit
|
|
25
28
|
# and contain one or more workspaces.
|
|
26
29
|
# @return [Cadenya::Resources::Account]
|
|
@@ -163,6 +166,7 @@ module Cadenya
|
|
|
163
166
|
headers: headers
|
|
164
167
|
)
|
|
165
168
|
|
|
169
|
+
@ai_provider_keys = Cadenya::Resources::AIProviderKeys.new(client: self)
|
|
166
170
|
@account = Cadenya::Resources::Account.new(client: self)
|
|
167
171
|
@agents = Cadenya::Resources::Agents.new(client: self)
|
|
168
172
|
@objectives = Cadenya::Resources::Objectives.new(client: self)
|
|
@@ -10,8 +10,8 @@ module Cadenya
|
|
|
10
10
|
# end
|
|
11
11
|
#
|
|
12
12
|
# @example
|
|
13
|
-
# cursor_pagination.auto_paging_each do |
|
|
14
|
-
# puts(
|
|
13
|
+
# cursor_pagination.auto_paging_each do |ai_provider_key|
|
|
14
|
+
# puts(ai_provider_key)
|
|
15
15
|
# end
|
|
16
16
|
class CursorPagination
|
|
17
17
|
include Cadenya::Internal::Type::BasePage
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#create
|
|
6
|
+
class AIProviderKey < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute metadata
|
|
8
|
+
# Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
9
|
+
#
|
|
10
|
+
# @return [Cadenya::Models::ResourceMetadata]
|
|
11
|
+
required :metadata, -> { Cadenya::ResourceMetadata }
|
|
12
|
+
|
|
13
|
+
# @!attribute spec
|
|
14
|
+
#
|
|
15
|
+
# @return [Cadenya::Models::AIProviderKeySpec]
|
|
16
|
+
required :spec, -> { Cadenya::AIProviderKeySpec }
|
|
17
|
+
|
|
18
|
+
response_only do
|
|
19
|
+
# @!attribute info
|
|
20
|
+
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
21
|
+
# provider management UIs.
|
|
22
|
+
#
|
|
23
|
+
# @return [Cadenya::Models::AIProviderKey::Info, nil]
|
|
24
|
+
optional :info, -> { Cadenya::AIProviderKey::Info }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @!method initialize(metadata:, spec:, info: nil)
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Cadenya::Models::AIProviderKey} for more details.
|
|
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.
|
|
33
|
+
#
|
|
34
|
+
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
35
|
+
#
|
|
36
|
+
# @param spec [Cadenya::Models::AIProviderKeySpec]
|
|
37
|
+
#
|
|
38
|
+
# @param info [Cadenya::Models::AIProviderKey::Info] AIProviderKeyInfo carries server-derived, read-only details about a key, for
|
|
39
|
+
|
|
40
|
+
# @see Cadenya::Models::AIProviderKey#info
|
|
41
|
+
class Info < Cadenya::Internal::Type::BaseModel
|
|
42
|
+
response_only do
|
|
43
|
+
# @!attribute disabled_model_count
|
|
44
|
+
# Number of disabled models provisioned on this key.
|
|
45
|
+
#
|
|
46
|
+
# @return [Integer, nil]
|
|
47
|
+
optional :disabled_model_count, Integer, api_name: :disabledModelCount
|
|
48
|
+
|
|
49
|
+
# @!attribute enabled_model_count
|
|
50
|
+
# Number of enabled models provisioned on this key.
|
|
51
|
+
#
|
|
52
|
+
# @return [Integer, nil]
|
|
53
|
+
optional :enabled_model_count, Integer, api_name: :enabledModelCount
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @!method initialize(disabled_model_count: nil, enabled_model_count: nil)
|
|
57
|
+
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
58
|
+
# provider management UIs.
|
|
59
|
+
#
|
|
60
|
+
# @param disabled_model_count [Integer] Number of disabled models provisioned on this key.
|
|
61
|
+
#
|
|
62
|
+
# @param enabled_model_count [Integer] Number of enabled models provisioned on this key.
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#create
|
|
6
|
+
class AIProviderKeyCreateParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute metadata
|
|
16
|
+
# CreateResourceMetadata contains the user-provided fields for creating a
|
|
17
|
+
# workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
18
|
+
# profile_id, created_at) are excluded since they are set by the server.
|
|
19
|
+
#
|
|
20
|
+
# @return [Cadenya::Models::CreateResourceMetadata]
|
|
21
|
+
required :metadata, -> { Cadenya::CreateResourceMetadata }
|
|
22
|
+
|
|
23
|
+
# @!attribute spec
|
|
24
|
+
#
|
|
25
|
+
# @return [Cadenya::Models::AIProviderKeySpec]
|
|
26
|
+
required :spec, -> { Cadenya::AIProviderKeySpec }
|
|
27
|
+
|
|
28
|
+
# @!method initialize(workspace_id:, metadata:, spec:, request_options: {})
|
|
29
|
+
# Some parameter documentations has been truncated, see
|
|
30
|
+
# {Cadenya::Models::AIProviderKeyCreateParams} for more details.
|
|
31
|
+
#
|
|
32
|
+
# @param workspace_id [String]
|
|
33
|
+
#
|
|
34
|
+
# @param metadata [Cadenya::Models::CreateResourceMetadata] CreateResourceMetadata contains the user-provided fields for creating
|
|
35
|
+
#
|
|
36
|
+
# @param spec [Cadenya::Models::AIProviderKeySpec]
|
|
37
|
+
#
|
|
38
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#delete
|
|
6
|
+
class AIProviderKeyDeleteParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(workspace_id:, id:, request_options: {})
|
|
21
|
+
# @param workspace_id [String]
|
|
22
|
+
# @param id [String]
|
|
23
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#list
|
|
6
|
+
class AIProviderKeyListParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute cursor
|
|
16
|
+
# Pagination cursor from previous response
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :cursor, String
|
|
20
|
+
|
|
21
|
+
# @!attribute include_info
|
|
22
|
+
# When true, populate each item's info (model counts), at the cost of extra
|
|
23
|
+
# lookups.
|
|
24
|
+
#
|
|
25
|
+
# @return [Boolean, nil]
|
|
26
|
+
optional :include_info, Cadenya::Internal::Type::Boolean
|
|
27
|
+
|
|
28
|
+
# @!attribute limit
|
|
29
|
+
# Maximum number of results to return
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :limit, Integer
|
|
33
|
+
|
|
34
|
+
# @!attribute prefix
|
|
35
|
+
# Filter expression (query param: prefix)
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :prefix, String
|
|
39
|
+
|
|
40
|
+
# @!attribute query
|
|
41
|
+
# Free-form search query
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :query, String
|
|
45
|
+
|
|
46
|
+
# @!attribute sort_order
|
|
47
|
+
# Sort order for results (asc or desc by creation time)
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :sort_order, String
|
|
51
|
+
|
|
52
|
+
# @!method initialize(workspace_id:, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {Cadenya::Models::AIProviderKeyListParams} for more details.
|
|
55
|
+
#
|
|
56
|
+
# @param workspace_id [String]
|
|
57
|
+
#
|
|
58
|
+
# @param cursor [String] Pagination cursor from previous response
|
|
59
|
+
#
|
|
60
|
+
# @param include_info [Boolean] When true, populate each item's info (model counts), at the cost of extra
|
|
61
|
+
#
|
|
62
|
+
# @param limit [Integer] Maximum number of results to return
|
|
63
|
+
#
|
|
64
|
+
# @param prefix [String] Filter expression (query param: prefix)
|
|
65
|
+
#
|
|
66
|
+
# @param query [String] Free-form search query
|
|
67
|
+
#
|
|
68
|
+
# @param sort_order [String] Sort order for results (asc or desc by creation time)
|
|
69
|
+
#
|
|
70
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#retrieve
|
|
6
|
+
class AIProviderKeyRetrieveParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(workspace_id:, id:, request_options: {})
|
|
21
|
+
# @param workspace_id [String]
|
|
22
|
+
# @param id [String]
|
|
23
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
class AIProviderKeySpec < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute api_key
|
|
7
|
+
# The provider credential. Accepted on create/update; never populated in responses
|
|
8
|
+
# (the server returns an empty value to avoid leaking it).
|
|
9
|
+
#
|
|
10
|
+
# @return [String, nil]
|
|
11
|
+
optional :api_key, String, api_name: :apiKey
|
|
12
|
+
|
|
13
|
+
# @!attribute openrouter
|
|
14
|
+
# OpenRouterConfig holds OpenRouter-specific settings. Empty for now; it exists as
|
|
15
|
+
# the oneof seam so provider-specific options (region, base URL, etc.) can be
|
|
16
|
+
# added later without restructuring the spec.
|
|
17
|
+
#
|
|
18
|
+
# @return [Object, nil]
|
|
19
|
+
optional :openrouter, Cadenya::Internal::Type::Unknown
|
|
20
|
+
|
|
21
|
+
# @!attribute provider
|
|
22
|
+
# The AI provider this key authenticates against.
|
|
23
|
+
#
|
|
24
|
+
# @return [Symbol, Cadenya::Models::AIProviderKeySpec::Provider, nil]
|
|
25
|
+
optional :provider, enum: -> { Cadenya::AIProviderKeySpec::Provider }
|
|
26
|
+
|
|
27
|
+
# @!method initialize(api_key: nil, openrouter: nil, provider: nil)
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Cadenya::Models::AIProviderKeySpec} for more details.
|
|
30
|
+
#
|
|
31
|
+
# @param api_key [String] The provider credential. Accepted on create/update; never populated in
|
|
32
|
+
#
|
|
33
|
+
# @param openrouter [Object] OpenRouterConfig holds OpenRouter-specific settings. Empty for now; it exists
|
|
34
|
+
#
|
|
35
|
+
# @param provider [Symbol, Cadenya::Models::AIProviderKeySpec::Provider] The AI provider this key authenticates against.
|
|
36
|
+
|
|
37
|
+
# The AI provider this key authenticates against.
|
|
38
|
+
#
|
|
39
|
+
# @see Cadenya::Models::AIProviderKeySpec#provider
|
|
40
|
+
module Provider
|
|
41
|
+
extend Cadenya::Internal::Type::Enum
|
|
42
|
+
|
|
43
|
+
AI_PROVIDER_UNSPECIFIED = :AI_PROVIDER_UNSPECIFIED
|
|
44
|
+
AI_PROVIDER_OPENROUTER = :AI_PROVIDER_OPENROUTER
|
|
45
|
+
|
|
46
|
+
# @!method self.values
|
|
47
|
+
# @return [Array<Symbol>]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::AIProviderKeys#update
|
|
6
|
+
class AIProviderKeyUpdateParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :id, String
|
|
19
|
+
|
|
20
|
+
# @!attribute metadata
|
|
21
|
+
# UpdateResourceMetadata contains the user-provided fields for updating a
|
|
22
|
+
# workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
23
|
+
# profile_id, created_at) are excluded since they are set by the server.
|
|
24
|
+
#
|
|
25
|
+
# @return [Cadenya::Models::UpdateResourceMetadata, nil]
|
|
26
|
+
optional :metadata, -> { Cadenya::UpdateResourceMetadata }
|
|
27
|
+
|
|
28
|
+
# @!attribute spec
|
|
29
|
+
#
|
|
30
|
+
# @return [Cadenya::Models::AIProviderKeySpec, nil]
|
|
31
|
+
optional :spec, -> { Cadenya::AIProviderKeySpec }
|
|
32
|
+
|
|
33
|
+
# @!attribute update_mask
|
|
34
|
+
# Fields to update.
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :update_mask, String, api_name: :updateMask
|
|
38
|
+
|
|
39
|
+
# @!method initialize(workspace_id:, id:, metadata: nil, spec: nil, update_mask: nil, request_options: {})
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Cadenya::Models::AIProviderKeyUpdateParams} for more details.
|
|
42
|
+
#
|
|
43
|
+
# @param workspace_id [String]
|
|
44
|
+
#
|
|
45
|
+
# @param id [String]
|
|
46
|
+
#
|
|
47
|
+
# @param metadata [Cadenya::Models::UpdateResourceMetadata] UpdateResourceMetadata contains the user-provided fields for updating
|
|
48
|
+
#
|
|
49
|
+
# @param spec [Cadenya::Models::AIProviderKeySpec]
|
|
50
|
+
#
|
|
51
|
+
# @param update_mask [String] Fields to update.
|
|
52
|
+
#
|
|
53
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
data/lib/cadenya/models/model.rb
CHANGED
|
@@ -16,13 +16,68 @@ module Cadenya
|
|
|
16
16
|
# @return [Cadenya::Models::ModelSpec]
|
|
17
17
|
required :spec, -> { Cadenya::ModelSpec }
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
response_only do
|
|
20
|
+
# @!attribute info
|
|
21
|
+
# ModelInfo carries server-derived, read-only details about a model.
|
|
22
|
+
#
|
|
23
|
+
# @return [Cadenya::Models::Model::Info, nil]
|
|
24
|
+
optional :info, -> { Cadenya::Model::Info }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @!method initialize(metadata:, spec:, info: nil)
|
|
20
28
|
# Some parameter documentations has been truncated, see {Cadenya::Models::Model}
|
|
21
29
|
# for more details.
|
|
22
30
|
#
|
|
23
31
|
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
24
32
|
#
|
|
25
33
|
# @param spec [Cadenya::Models::ModelSpec] Model specification
|
|
34
|
+
#
|
|
35
|
+
# @param info [Cadenya::Models::Model::Info] ModelInfo carries server-derived, read-only details about a model.
|
|
36
|
+
|
|
37
|
+
# @see Cadenya::Models::Model#info
|
|
38
|
+
class Info < Cadenya::Internal::Type::BaseModel
|
|
39
|
+
response_only do
|
|
40
|
+
# @!attribute ai_provider_key
|
|
41
|
+
# BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
42
|
+
# optional human-readable name. These are used for reference fields where the full
|
|
43
|
+
# metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
44
|
+
# e.g., the tool references inside an agent variation spec or the tools assigned
|
|
45
|
+
# to an objective. Both fields are server-populated; clients provide IDs through
|
|
46
|
+
# sibling fields rather than by constructing a BareMetadata themselves.
|
|
47
|
+
#
|
|
48
|
+
# @return [Cadenya::Models::BareMetadata, nil]
|
|
49
|
+
optional :ai_provider_key, -> { Cadenya::BareMetadata }, api_name: :aiProviderKey
|
|
50
|
+
|
|
51
|
+
# @!attribute provider
|
|
52
|
+
# The AI provider this model routes through (via its provider key).
|
|
53
|
+
#
|
|
54
|
+
# @return [Symbol, Cadenya::Models::Model::Info::Provider, nil]
|
|
55
|
+
optional :provider, enum: -> { Cadenya::Model::Info::Provider }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @!method initialize(ai_provider_key: nil, provider: nil)
|
|
59
|
+
# Some parameter documentations has been truncated, see
|
|
60
|
+
# {Cadenya::Models::Model::Info} for more details.
|
|
61
|
+
#
|
|
62
|
+
# ModelInfo carries server-derived, read-only details about a model.
|
|
63
|
+
#
|
|
64
|
+
# @param ai_provider_key [Cadenya::Models::BareMetadata] BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
65
|
+
#
|
|
66
|
+
# @param provider [Symbol, Cadenya::Models::Model::Info::Provider] The AI provider this model routes through (via its provider key).
|
|
67
|
+
|
|
68
|
+
# The AI provider this model routes through (via its provider key).
|
|
69
|
+
#
|
|
70
|
+
# @see Cadenya::Models::Model::Info#provider
|
|
71
|
+
module Provider
|
|
72
|
+
extend Cadenya::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
AI_PROVIDER_UNSPECIFIED = :AI_PROVIDER_UNSPECIFIED
|
|
75
|
+
AI_PROVIDER_OPENROUTER = :AI_PROVIDER_OPENROUTER
|
|
76
|
+
|
|
77
|
+
# @!method self.values
|
|
78
|
+
# @return [Array<Symbol>]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
26
81
|
end
|
|
27
82
|
end
|
|
28
83
|
end
|
|
@@ -12,6 +12,13 @@ module Cadenya
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :workspace_id, String
|
|
14
14
|
|
|
15
|
+
# @!attribute ai_provider_key_id
|
|
16
|
+
# Filter to models provisioned on a specific AI provider key. Accepts the key's id
|
|
17
|
+
# or an "external_id:"-prefixed slug.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :ai_provider_key_id, String
|
|
21
|
+
|
|
15
22
|
# @!attribute bundle_key
|
|
16
23
|
# Filter by bundle_key — return only resources owned by this bundle.
|
|
17
24
|
#
|
|
@@ -24,6 +31,13 @@ module Cadenya
|
|
|
24
31
|
# @return [String, nil]
|
|
25
32
|
optional :cursor, String
|
|
26
33
|
|
|
34
|
+
# @!attribute include_info
|
|
35
|
+
# When true, populate each item's info (e.g. the AI provider), at the cost of
|
|
36
|
+
# extra lookups.
|
|
37
|
+
#
|
|
38
|
+
# @return [Boolean, nil]
|
|
39
|
+
optional :include_info, Cadenya::Internal::Type::Boolean
|
|
40
|
+
|
|
27
41
|
# @!attribute limit
|
|
28
42
|
# Maximum number of results to return
|
|
29
43
|
#
|
|
@@ -54,13 +68,20 @@ module Cadenya
|
|
|
54
68
|
# @return [Symbol, Cadenya::Models::ModelListParams::Status, nil]
|
|
55
69
|
optional :status, enum: -> { Cadenya::ModelListParams::Status }
|
|
56
70
|
|
|
57
|
-
# @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, request_options: {})
|
|
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, status: nil, request_options: {})
|
|
72
|
+
# Some parameter documentations has been truncated, see
|
|
73
|
+
# {Cadenya::Models::ModelListParams} for more details.
|
|
74
|
+
#
|
|
58
75
|
# @param workspace_id [String]
|
|
59
76
|
#
|
|
77
|
+
# @param ai_provider_key_id [String] Filter to models provisioned on a specific AI provider key. Accepts the
|
|
78
|
+
#
|
|
60
79
|
# @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
|
|
61
80
|
#
|
|
62
81
|
# @param cursor [String] Pagination cursor from previous response
|
|
63
82
|
#
|
|
83
|
+
# @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
|
|
84
|
+
#
|
|
64
85
|
# @param limit [Integer] Maximum number of results to return
|
|
65
86
|
#
|
|
66
87
|
# @param prefix [String] Filter by name prefix
|
data/lib/cadenya/models.rb
CHANGED
|
@@ -75,6 +75,20 @@ module Cadenya
|
|
|
75
75
|
|
|
76
76
|
AgentVariationEntry = Cadenya::Models::AgentVariationEntry
|
|
77
77
|
|
|
78
|
+
AIProviderKey = Cadenya::Models::AIProviderKey
|
|
79
|
+
|
|
80
|
+
AIProviderKeyCreateParams = Cadenya::Models::AIProviderKeyCreateParams
|
|
81
|
+
|
|
82
|
+
AIProviderKeyDeleteParams = Cadenya::Models::AIProviderKeyDeleteParams
|
|
83
|
+
|
|
84
|
+
AIProviderKeyListParams = Cadenya::Models::AIProviderKeyListParams
|
|
85
|
+
|
|
86
|
+
AIProviderKeyRetrieveParams = Cadenya::Models::AIProviderKeyRetrieveParams
|
|
87
|
+
|
|
88
|
+
AIProviderKeySpec = Cadenya::Models::AIProviderKeySpec
|
|
89
|
+
|
|
90
|
+
AIProviderKeyUpdateParams = Cadenya::Models::AIProviderKeyUpdateParams
|
|
91
|
+
|
|
78
92
|
APIKey = Cadenya::Models::APIKey
|
|
79
93
|
|
|
80
94
|
APIKeyCreateParams = Cadenya::Models::APIKeyCreateParams
|