cadenya 0.4.0 → 0.6.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 +1 -1
- data/lib/cadenya/models/ai_provider_key.rb +37 -1
- data/lib/cadenya/models/ai_provider_key_list_params.rb +13 -1
- data/lib/cadenya/models/ai_provider_key_spec.rb +26 -11
- data/lib/cadenya/models/model.rb +65 -1
- data/lib/cadenya/models/model_list_params.rb +22 -1
- data/lib/cadenya/models/model_swap_params.rb +50 -0
- data/lib/cadenya/models/model_swap_response.rb +8 -0
- data/lib/cadenya/models.rb +2 -0
- data/lib/cadenya/resources/ai_provider_keys.rb +7 -2
- data/lib/cadenya/resources/models.rb +39 -2
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +2 -0
- data/rbi/cadenya/models/ai_provider_key.rbi +61 -3
- data/rbi/cadenya/models/ai_provider_key_list_params.rbi +13 -0
- data/rbi/cadenya/models/ai_provider_key_spec.rbi +60 -18
- data/rbi/cadenya/models/model.rbi +115 -3
- data/rbi/cadenya/models/model_list_params.rbi +26 -0
- data/rbi/cadenya/models/model_swap_params.rbi +99 -0
- data/rbi/cadenya/models/model_swap_response.rbi +7 -0
- data/rbi/cadenya/models.rbi +2 -0
- data/rbi/cadenya/resources/ai_provider_keys.rbi +4 -0
- data/rbi/cadenya/resources/models.rbi +26 -0
- data/sig/cadenya/models/ai_provider_key.rbs +36 -3
- data/sig/cadenya/models/ai_provider_key_list_params.rbs +7 -0
- data/sig/cadenya/models/ai_provider_key_spec.rbs +29 -8
- data/sig/cadenya/models/model.rbs +59 -3
- data/sig/cadenya/models/model_list_params.rbs +14 -0
- data/sig/cadenya/models/model_swap_params.rbs +54 -0
- data/sig/cadenya/models/model_swap_response.rbs +5 -0
- data/sig/cadenya/models.rbs +2 -0
- data/sig/cadenya/resources/ai_provider_keys.rbs +1 -0
- data/sig/cadenya/resources/models.rbs +8 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0488a69eb293e3cb4a745c2db7ed2b94aa1b59c82f6e6c1fbee1fa2bf392b216'
|
|
4
|
+
data.tar.gz: b3dcf3ecdfbbbf92bc8fc62e5293c1f5d456d4ff0341b5e26e0e161a3d630730
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0984e2d2b5c3e8aa4865e9048035a67ff75add28a8def45559155bce5d3c07c3efd685a59f8fd4b9e6f067eeb2379d34aabb07d4a93624e82b33eb816e49c2ea'
|
|
7
|
+
data.tar.gz: ca3bc8d58078c5f0ab8f5968176571bc256433bb230dfdaa4e0abe28b4c673c5ea624bd6038930e7aeb59a8bcf84f8af9c16f4898588430cae636c4ccfb8e985
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2026-06-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/cadenya/cadenya-ruby/compare/v0.5.0...v0.6.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([28a45e6](https://github.com/cadenya/cadenya-ruby/commit/28a45e61e923a2b1e555c73fe23299d38db83c7e))
|
|
10
|
+
|
|
11
|
+
## 0.5.0 (2026-06-07)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/cadenya/cadenya-ruby/compare/v0.4.0...v0.5.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([d88fdeb](https://github.com/cadenya/cadenya-ruby/commit/d88fdeb06d9d9ba77523cb5b36818c74119ec466))
|
|
18
|
+
|
|
3
19
|
## 0.4.0 (2026-06-07)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.3.0...v0.4.0](https://github.com/cadenya/cadenya-ruby/compare/v0.3.0...v0.4.0)
|
data/README.md
CHANGED
|
@@ -15,7 +15,16 @@ module Cadenya
|
|
|
15
15
|
# @return [Cadenya::Models::AIProviderKeySpec]
|
|
16
16
|
required :spec, -> { Cadenya::AIProviderKeySpec }
|
|
17
17
|
|
|
18
|
-
|
|
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)
|
|
19
28
|
# Some parameter documentations has been truncated, see
|
|
20
29
|
# {Cadenya::Models::AIProviderKey} for more details.
|
|
21
30
|
#
|
|
@@ -25,6 +34,33 @@ module Cadenya
|
|
|
25
34
|
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
26
35
|
#
|
|
27
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
|
|
28
64
|
end
|
|
29
65
|
end
|
|
30
66
|
end
|
|
@@ -18,6 +18,13 @@ module Cadenya
|
|
|
18
18
|
# @return [String, nil]
|
|
19
19
|
optional :cursor, String
|
|
20
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
|
+
|
|
21
28
|
# @!attribute limit
|
|
22
29
|
# Maximum number of results to return
|
|
23
30
|
#
|
|
@@ -42,11 +49,16 @@ module Cadenya
|
|
|
42
49
|
# @return [String, nil]
|
|
43
50
|
optional :sort_order, String
|
|
44
51
|
|
|
45
|
-
# @!method initialize(workspace_id:, cursor: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
|
|
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
|
+
#
|
|
46
56
|
# @param workspace_id [String]
|
|
47
57
|
#
|
|
48
58
|
# @param cursor [String] Pagination cursor from previous response
|
|
49
59
|
#
|
|
60
|
+
# @param include_info [Boolean] When true, populate each item's info (model counts), at the cost of extra
|
|
61
|
+
#
|
|
50
62
|
# @param limit [Integer] Maximum number of results to return
|
|
51
63
|
#
|
|
52
64
|
# @param prefix [String] Filter expression (query param: prefix)
|
|
@@ -10,27 +10,42 @@ module Cadenya
|
|
|
10
10
|
# @return [String, nil]
|
|
11
11
|
optional :api_key, String, api_name: :apiKey
|
|
12
12
|
|
|
13
|
-
# @!attribute
|
|
14
|
-
#
|
|
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.
|
|
15
17
|
#
|
|
16
|
-
# @return [
|
|
17
|
-
optional :
|
|
18
|
+
# @return [Object, nil]
|
|
19
|
+
optional :openrouter, Cadenya::Internal::Type::Unknown
|
|
18
20
|
|
|
19
|
-
# @!attribute
|
|
20
|
-
# The provider
|
|
21
|
+
# @!attribute provider
|
|
22
|
+
# The AI provider this key authenticates against.
|
|
21
23
|
#
|
|
22
|
-
# @return [
|
|
23
|
-
optional :
|
|
24
|
+
# @return [Symbol, Cadenya::Models::AIProviderKeySpec::Provider, nil]
|
|
25
|
+
optional :provider, enum: -> { Cadenya::AIProviderKeySpec::Provider }
|
|
24
26
|
|
|
25
|
-
# @!method initialize(api_key: nil,
|
|
27
|
+
# @!method initialize(api_key: nil, openrouter: nil, provider: nil)
|
|
26
28
|
# Some parameter documentations has been truncated, see
|
|
27
29
|
# {Cadenya::Models::AIProviderKeySpec} for more details.
|
|
28
30
|
#
|
|
29
31
|
# @param api_key [String] The provider credential. Accepted on create/update; never populated in
|
|
30
32
|
#
|
|
31
|
-
# @param
|
|
33
|
+
# @param openrouter [Object] OpenRouterConfig holds OpenRouter-specific settings. Empty for now; it exists
|
|
32
34
|
#
|
|
33
|
-
# @param
|
|
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
|
|
34
49
|
end
|
|
35
50
|
end
|
|
36
51
|
end
|
data/lib/cadenya/models/model.rb
CHANGED
|
@@ -16,13 +16,77 @@ 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 agent_variation_count
|
|
41
|
+
# Number of agent variations currently provisioned on this model. Useful for
|
|
42
|
+
# previewing how many variations a swap would affect.
|
|
43
|
+
#
|
|
44
|
+
# @return [Integer, nil]
|
|
45
|
+
optional :agent_variation_count, Integer, api_name: :agentVariationCount
|
|
46
|
+
|
|
47
|
+
# @!attribute ai_provider_key
|
|
48
|
+
# BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
49
|
+
# optional human-readable name. These are used for reference fields where the full
|
|
50
|
+
# metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
51
|
+
# e.g., the tool references inside an agent variation spec or the tools assigned
|
|
52
|
+
# to an objective. Both fields are server-populated; clients provide IDs through
|
|
53
|
+
# sibling fields rather than by constructing a BareMetadata themselves.
|
|
54
|
+
#
|
|
55
|
+
# @return [Cadenya::Models::BareMetadata, nil]
|
|
56
|
+
optional :ai_provider_key, -> { Cadenya::BareMetadata }, api_name: :aiProviderKey
|
|
57
|
+
|
|
58
|
+
# @!attribute provider
|
|
59
|
+
# The AI provider this model routes through (via its provider key).
|
|
60
|
+
#
|
|
61
|
+
# @return [Symbol, Cadenya::Models::Model::Info::Provider, nil]
|
|
62
|
+
optional :provider, enum: -> { Cadenya::Model::Info::Provider }
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# @!method initialize(agent_variation_count: nil, ai_provider_key: nil, provider: nil)
|
|
66
|
+
# Some parameter documentations has been truncated, see
|
|
67
|
+
# {Cadenya::Models::Model::Info} for more details.
|
|
68
|
+
#
|
|
69
|
+
# ModelInfo carries server-derived, read-only details about a model.
|
|
70
|
+
#
|
|
71
|
+
# @param agent_variation_count [Integer] Number of agent variations currently provisioned on this model. Useful for
|
|
72
|
+
#
|
|
73
|
+
# @param ai_provider_key [Cadenya::Models::BareMetadata] BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
74
|
+
#
|
|
75
|
+
# @param provider [Symbol, Cadenya::Models::Model::Info::Provider] The AI provider this model routes through (via its provider key).
|
|
76
|
+
|
|
77
|
+
# The AI provider this model routes through (via its provider key).
|
|
78
|
+
#
|
|
79
|
+
# @see Cadenya::Models::Model::Info#provider
|
|
80
|
+
module Provider
|
|
81
|
+
extend Cadenya::Internal::Type::Enum
|
|
82
|
+
|
|
83
|
+
AI_PROVIDER_UNSPECIFIED = :AI_PROVIDER_UNSPECIFIED
|
|
84
|
+
AI_PROVIDER_OPENROUTER = :AI_PROVIDER_OPENROUTER
|
|
85
|
+
|
|
86
|
+
# @!method self.values
|
|
87
|
+
# @return [Array<Symbol>]
|
|
88
|
+
end
|
|
89
|
+
end
|
|
26
90
|
end
|
|
27
91
|
end
|
|
28
92
|
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
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::Models#swap
|
|
6
|
+
class ModelSwapParams < 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 model_swaps
|
|
16
|
+
# The swaps to perform.
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<Cadenya::Models::ModelSwapParams::ModelSwap>, nil]
|
|
19
|
+
optional :model_swaps,
|
|
20
|
+
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::ModelSwapParams::ModelSwap] },
|
|
21
|
+
api_name: :modelSwaps
|
|
22
|
+
|
|
23
|
+
# @!method initialize(workspace_id:, model_swaps: nil, request_options: {})
|
|
24
|
+
# @param workspace_id [String]
|
|
25
|
+
#
|
|
26
|
+
# @param model_swaps [Array<Cadenya::Models::ModelSwapParams::ModelSwap>] The swaps to perform.
|
|
27
|
+
#
|
|
28
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
29
|
+
|
|
30
|
+
class ModelSwap < Cadenya::Internal::Type::BaseModel
|
|
31
|
+
# @!attribute current_model_id
|
|
32
|
+
# The model variations are currently on. Accepts an id or "external_id:" slug.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :current_model_id, String, api_name: :currentModelId
|
|
36
|
+
|
|
37
|
+
# @!attribute next_model_id
|
|
38
|
+
# The model to move variations to. Accepts an id or "external_id:" slug.
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :next_model_id, String, api_name: :nextModelId
|
|
42
|
+
|
|
43
|
+
# @!method initialize(current_model_id: nil, next_model_id: nil)
|
|
44
|
+
# @param current_model_id [String] The model variations are currently on. Accepts an id or "external_id:" slug.
|
|
45
|
+
#
|
|
46
|
+
# @param next_model_id [String] The model to move variations to. Accepts an id or "external_id:" slug.
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
data/lib/cadenya/models.rb
CHANGED
|
@@ -96,14 +96,19 @@ module Cadenya
|
|
|
96
96
|
)
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# Some parameter documentations has been truncated, see
|
|
100
|
+
# {Cadenya::Models::AIProviderKeyListParams} for more details.
|
|
101
|
+
#
|
|
99
102
|
# Lists all customer-provided AI provider keys in the workspace
|
|
100
103
|
#
|
|
101
|
-
# @overload list(workspace_id, cursor: 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, query: nil, sort_order: nil, request_options: {})
|
|
102
105
|
#
|
|
103
106
|
# @param workspace_id [String] The workspace whose keys will be listed.
|
|
104
107
|
#
|
|
105
108
|
# @param cursor [String] Pagination cursor from previous response
|
|
106
109
|
#
|
|
110
|
+
# @param include_info [Boolean] When true, populate each item's info (model counts), at the cost of extra
|
|
111
|
+
#
|
|
107
112
|
# @param limit [Integer] Maximum number of results to return
|
|
108
113
|
#
|
|
109
114
|
# @param prefix [String] Filter expression (query param: prefix)
|
|
@@ -123,7 +128,7 @@ module Cadenya
|
|
|
123
128
|
@client.request(
|
|
124
129
|
method: :get,
|
|
125
130
|
path: ["v1/workspaces/%1$s/ai_provider_keys", workspace_id],
|
|
126
|
-
query: query.transform_keys(sort_order: "sortOrder"),
|
|
131
|
+
query: query.transform_keys(include_info: "includeInfo", sort_order: "sortOrder"),
|
|
127
132
|
page: Cadenya::Internal::CursorPagination,
|
|
128
133
|
model: Cadenya::AIProviderKey,
|
|
129
134
|
options: options
|
|
@@ -33,16 +33,23 @@ module Cadenya
|
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Cadenya::Models::ModelListParams} for more details.
|
|
38
|
+
#
|
|
36
39
|
# Lists all models in the workspace
|
|
37
40
|
#
|
|
38
|
-
# @overload list(workspace_id, bundle_key: nil, cursor: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, request_options: {})
|
|
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, status: nil, request_options: {})
|
|
39
42
|
#
|
|
40
43
|
# @param workspace_id [String] Workspace ID.
|
|
41
44
|
#
|
|
45
|
+
# @param ai_provider_key_id [String] Filter to models provisioned on a specific AI provider key. Accepts the
|
|
46
|
+
#
|
|
42
47
|
# @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
|
|
43
48
|
#
|
|
44
49
|
# @param cursor [String] Pagination cursor from previous response
|
|
45
50
|
#
|
|
51
|
+
# @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
|
|
52
|
+
#
|
|
46
53
|
# @param limit [Integer] Maximum number of results to return
|
|
47
54
|
#
|
|
48
55
|
# @param prefix [String] Filter by name prefix
|
|
@@ -64,7 +71,12 @@ module Cadenya
|
|
|
64
71
|
@client.request(
|
|
65
72
|
method: :get,
|
|
66
73
|
path: ["v1/workspaces/%1$s/models", workspace_id],
|
|
67
|
-
query: query.transform_keys(
|
|
74
|
+
query: query.transform_keys(
|
|
75
|
+
ai_provider_key_id: "aiProviderKeyId",
|
|
76
|
+
bundle_key: "bundleKey",
|
|
77
|
+
include_info: "includeInfo",
|
|
78
|
+
sort_order: "sortOrder"
|
|
79
|
+
),
|
|
68
80
|
page: Cadenya::Internal::CursorPagination,
|
|
69
81
|
model: Cadenya::Model,
|
|
70
82
|
options: options
|
|
@@ -101,6 +113,31 @@ module Cadenya
|
|
|
101
113
|
)
|
|
102
114
|
end
|
|
103
115
|
|
|
116
|
+
# Reassigns agent variations from one model to another in bulk. Runs
|
|
117
|
+
# asynchronously and returns immediately.
|
|
118
|
+
#
|
|
119
|
+
# @overload swap(workspace_id, model_swaps: nil, request_options: {})
|
|
120
|
+
#
|
|
121
|
+
# @param workspace_id [String] Workspace ID.
|
|
122
|
+
#
|
|
123
|
+
# @param model_swaps [Array<Cadenya::Models::ModelSwapParams::ModelSwap>] The swaps to perform.
|
|
124
|
+
#
|
|
125
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
126
|
+
#
|
|
127
|
+
# @return [Object]
|
|
128
|
+
#
|
|
129
|
+
# @see Cadenya::Models::ModelSwapParams
|
|
130
|
+
def swap(workspace_id, params = {})
|
|
131
|
+
parsed, options = Cadenya::ModelSwapParams.dump_request(params)
|
|
132
|
+
@client.request(
|
|
133
|
+
method: :post,
|
|
134
|
+
path: ["v1/workspaces/%1$s/models:swapModelOnVariations", workspace_id],
|
|
135
|
+
body: parsed,
|
|
136
|
+
model: Cadenya::Internal::Type::Unknown,
|
|
137
|
+
options: options
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
|
|
104
141
|
# @api private
|
|
105
142
|
#
|
|
106
143
|
# @param client [Cadenya::Client]
|
data/lib/cadenya/version.rb
CHANGED
data/lib/cadenya.rb
CHANGED
|
@@ -183,6 +183,8 @@ require_relative "cadenya/models/model_list_params"
|
|
|
183
183
|
require_relative "cadenya/models/model_retrieve_params"
|
|
184
184
|
require_relative "cadenya/models/model_set_status_params"
|
|
185
185
|
require_relative "cadenya/models/model_spec"
|
|
186
|
+
require_relative "cadenya/models/model_swap_params"
|
|
187
|
+
require_relative "cadenya/models/model_swap_response"
|
|
186
188
|
require_relative "cadenya/models/objective"
|
|
187
189
|
require_relative "cadenya/models/objective_cancel_params"
|
|
188
190
|
require_relative "cadenya/models/objective_compact_params"
|
|
@@ -21,18 +21,30 @@ module Cadenya
|
|
|
21
21
|
sig { params(spec: Cadenya::AIProviderKeySpec::OrHash).void }
|
|
22
22
|
attr_writer :spec
|
|
23
23
|
|
|
24
|
+
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
25
|
+
# provider management UIs.
|
|
26
|
+
sig { returns(T.nilable(Cadenya::AIProviderKey::Info)) }
|
|
27
|
+
attr_reader :info
|
|
28
|
+
|
|
29
|
+
sig { params(info: Cadenya::AIProviderKey::Info::OrHash).void }
|
|
30
|
+
attr_writer :info
|
|
31
|
+
|
|
24
32
|
# AIProviderKey is a customer-provided (BYOK) credential for an AI provider,
|
|
25
33
|
# scoped to a workspace. The secret value is never returned in responses.
|
|
26
34
|
sig do
|
|
27
35
|
params(
|
|
28
36
|
metadata: Cadenya::ResourceMetadata::OrHash,
|
|
29
|
-
spec: Cadenya::AIProviderKeySpec::OrHash
|
|
37
|
+
spec: Cadenya::AIProviderKeySpec::OrHash,
|
|
38
|
+
info: Cadenya::AIProviderKey::Info::OrHash
|
|
30
39
|
).returns(T.attached_class)
|
|
31
40
|
end
|
|
32
41
|
def self.new(
|
|
33
42
|
# Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
34
43
|
metadata:,
|
|
35
|
-
spec
|
|
44
|
+
spec:,
|
|
45
|
+
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
46
|
+
# provider management UIs.
|
|
47
|
+
info: nil
|
|
36
48
|
)
|
|
37
49
|
end
|
|
38
50
|
|
|
@@ -40,12 +52,58 @@ module Cadenya
|
|
|
40
52
|
override.returns(
|
|
41
53
|
{
|
|
42
54
|
metadata: Cadenya::ResourceMetadata,
|
|
43
|
-
spec: Cadenya::AIProviderKeySpec
|
|
55
|
+
spec: Cadenya::AIProviderKeySpec,
|
|
56
|
+
info: Cadenya::AIProviderKey::Info
|
|
44
57
|
}
|
|
45
58
|
)
|
|
46
59
|
end
|
|
47
60
|
def to_hash
|
|
48
61
|
end
|
|
62
|
+
|
|
63
|
+
class Info < Cadenya::Internal::Type::BaseModel
|
|
64
|
+
OrHash =
|
|
65
|
+
T.type_alias do
|
|
66
|
+
T.any(Cadenya::AIProviderKey::Info, Cadenya::Internal::AnyHash)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Number of disabled models provisioned on this key.
|
|
70
|
+
sig { returns(T.nilable(Integer)) }
|
|
71
|
+
attr_reader :disabled_model_count
|
|
72
|
+
|
|
73
|
+
sig { params(disabled_model_count: Integer).void }
|
|
74
|
+
attr_writer :disabled_model_count
|
|
75
|
+
|
|
76
|
+
# Number of enabled models provisioned on this key.
|
|
77
|
+
sig { returns(T.nilable(Integer)) }
|
|
78
|
+
attr_reader :enabled_model_count
|
|
79
|
+
|
|
80
|
+
sig { params(enabled_model_count: Integer).void }
|
|
81
|
+
attr_writer :enabled_model_count
|
|
82
|
+
|
|
83
|
+
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
84
|
+
# provider management UIs.
|
|
85
|
+
sig do
|
|
86
|
+
params(
|
|
87
|
+
disabled_model_count: Integer,
|
|
88
|
+
enabled_model_count: Integer
|
|
89
|
+
).returns(T.attached_class)
|
|
90
|
+
end
|
|
91
|
+
def self.new(
|
|
92
|
+
# Number of disabled models provisioned on this key.
|
|
93
|
+
disabled_model_count: nil,
|
|
94
|
+
# Number of enabled models provisioned on this key.
|
|
95
|
+
enabled_model_count: nil
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
override.returns(
|
|
101
|
+
{ disabled_model_count: Integer, enabled_model_count: Integer }
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
def to_hash
|
|
105
|
+
end
|
|
106
|
+
end
|
|
49
107
|
end
|
|
50
108
|
end
|
|
51
109
|
end
|
|
@@ -21,6 +21,14 @@ module Cadenya
|
|
|
21
21
|
sig { params(cursor: String).void }
|
|
22
22
|
attr_writer :cursor
|
|
23
23
|
|
|
24
|
+
# When true, populate each item's info (model counts), at the cost of extra
|
|
25
|
+
# lookups.
|
|
26
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
27
|
+
attr_reader :include_info
|
|
28
|
+
|
|
29
|
+
sig { params(include_info: T::Boolean).void }
|
|
30
|
+
attr_writer :include_info
|
|
31
|
+
|
|
24
32
|
# Maximum number of results to return
|
|
25
33
|
sig { returns(T.nilable(Integer)) }
|
|
26
34
|
attr_reader :limit
|
|
@@ -53,6 +61,7 @@ module Cadenya
|
|
|
53
61
|
params(
|
|
54
62
|
workspace_id: String,
|
|
55
63
|
cursor: String,
|
|
64
|
+
include_info: T::Boolean,
|
|
56
65
|
limit: Integer,
|
|
57
66
|
prefix: String,
|
|
58
67
|
query: String,
|
|
@@ -64,6 +73,9 @@ module Cadenya
|
|
|
64
73
|
workspace_id:,
|
|
65
74
|
# Pagination cursor from previous response
|
|
66
75
|
cursor: nil,
|
|
76
|
+
# When true, populate each item's info (model counts), at the cost of extra
|
|
77
|
+
# lookups.
|
|
78
|
+
include_info: nil,
|
|
67
79
|
# Maximum number of results to return
|
|
68
80
|
limit: nil,
|
|
69
81
|
# Filter expression (query param: prefix)
|
|
@@ -81,6 +93,7 @@ module Cadenya
|
|
|
81
93
|
{
|
|
82
94
|
workspace_id: String,
|
|
83
95
|
cursor: String,
|
|
96
|
+
include_info: T::Boolean,
|
|
84
97
|
limit: Integer,
|
|
85
98
|
prefix: String,
|
|
86
99
|
query: String,
|