@naturali/cli 0.68.0 → 0.69.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.
- package/dist/index.mjs +159 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.69.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
@@ -2093,6 +2093,45 @@ var ModelRoutes = class {
|
|
|
2093
2093
|
});
|
|
2094
2094
|
}
|
|
2095
2095
|
};
|
|
2096
|
+
var Models = class {
|
|
2097
|
+
/**
|
|
2098
|
+
* List models
|
|
2099
|
+
*
|
|
2100
|
+
* Lists catalog models, sorted by id. Filter by vendor, provider, input/output modality, status, or `managed` — the last being the axis that decides whether a model is usable without bringing your own provider credentials, so `?managed=true&status=available` is the set a project can enable today.
|
|
2101
|
+
*
|
|
2102
|
+
*/
|
|
2103
|
+
static listModels(options) {
|
|
2104
|
+
return (options?.client ?? client).get({
|
|
2105
|
+
url: "/v1/models",
|
|
2106
|
+
...options
|
|
2107
|
+
});
|
|
2108
|
+
}
|
|
2109
|
+
/**
|
|
2110
|
+
* Get a model
|
|
2111
|
+
*/
|
|
2112
|
+
static getModel(options) {
|
|
2113
|
+
return (options.client ?? client).get({
|
|
2114
|
+
url: "/v1/models/{model_id}",
|
|
2115
|
+
...options
|
|
2116
|
+
});
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* Enable a naturali-managed model
|
|
2120
|
+
*
|
|
2121
|
+
* Provisions a managed provider running this model in the project. The provider needs no credentials of yours — it runs on naturali's own model access — and is priced from the catalog the moment it is created, so its usage is metered from the first generation. The created resource is an ordinary provider: read, update and delete it through [`GET /v1/projects/{project_id}/ai-providers/{ai_provider_id}`](/docs/api/ai-providers/get-ai-provider) like any other. Requires the `admin` role in the project. Only models with `managed: true` can be enabled; anything else is a 400.
|
|
2122
|
+
*
|
|
2123
|
+
*/
|
|
2124
|
+
static enableManagedModel(options) {
|
|
2125
|
+
return (options.client ?? client).post({
|
|
2126
|
+
url: "/v1/projects/{project_id}/models/{model_id}/providers",
|
|
2127
|
+
...options,
|
|
2128
|
+
headers: {
|
|
2129
|
+
"Content-Type": "application/json",
|
|
2130
|
+
...options.headers
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2096
2135
|
var Projects = class {
|
|
2097
2136
|
/**
|
|
2098
2137
|
* List projects
|
|
@@ -2789,6 +2828,7 @@ var NaturaliClient = class {
|
|
|
2789
2828
|
evaluations;
|
|
2790
2829
|
generations;
|
|
2791
2830
|
modelRoutes;
|
|
2831
|
+
models;
|
|
2792
2832
|
projects;
|
|
2793
2833
|
secrets;
|
|
2794
2834
|
sessions;
|
|
@@ -2818,6 +2858,7 @@ var NaturaliClient = class {
|
|
|
2818
2858
|
this.evaluations = bindResource(Evaluations, this.http);
|
|
2819
2859
|
this.generations = bindResource(Generations, this.http);
|
|
2820
2860
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
2861
|
+
this.models = bindResource(Models, this.http);
|
|
2821
2862
|
this.projects = bindResource(Projects, this.http);
|
|
2822
2863
|
this.secrets = bindResource(Secrets, this.http);
|
|
2823
2864
|
this.sessions = bindResource(Sessions, this.http);
|
|
@@ -2842,6 +2883,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
2842
2883
|
Evaluations: () => Evaluations,
|
|
2843
2884
|
Generations: () => Generations,
|
|
2844
2885
|
ModelRoutes: () => ModelRoutes,
|
|
2886
|
+
Models: () => Models,
|
|
2845
2887
|
NaturaliClient: () => NaturaliClient,
|
|
2846
2888
|
Projects: () => Projects,
|
|
2847
2889
|
Secrets: () => Secrets,
|
|
@@ -7519,6 +7561,122 @@ const routes = {
|
|
|
7519
7561
|
"in": "path"
|
|
7520
7562
|
}]
|
|
7521
7563
|
},
|
|
7564
|
+
"list-models": {
|
|
7565
|
+
serviceClass: "Models",
|
|
7566
|
+
operationId: "listModels",
|
|
7567
|
+
description: "Lists catalog models, sorted by id. Filter by vendor, provider, input/output modality, status, or `managed` — the last being the axis that decides whether a model is usable without bringing your own provider credentials, so `?managed=true&status=available` is the set a project can enable today.",
|
|
7568
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
7569
|
+
httpMethod: "get",
|
|
7570
|
+
pathParams: [],
|
|
7571
|
+
queryParams: [
|
|
7572
|
+
"limit",
|
|
7573
|
+
"cursor",
|
|
7574
|
+
"vendor",
|
|
7575
|
+
"provider",
|
|
7576
|
+
"modality",
|
|
7577
|
+
"status",
|
|
7578
|
+
"managed"
|
|
7579
|
+
],
|
|
7580
|
+
flags: [
|
|
7581
|
+
{
|
|
7582
|
+
"name": "limit",
|
|
7583
|
+
"description": "Maximum items per page — an integer from 1 to 100 (default 20).",
|
|
7584
|
+
"required": false,
|
|
7585
|
+
"type": "integer",
|
|
7586
|
+
"in": "query"
|
|
7587
|
+
},
|
|
7588
|
+
{
|
|
7589
|
+
"name": "cursor",
|
|
7590
|
+
"description": "Opaque pagination cursor from a previous response's next_cursor.",
|
|
7591
|
+
"required": false,
|
|
7592
|
+
"type": "string",
|
|
7593
|
+
"in": "query"
|
|
7594
|
+
},
|
|
7595
|
+
{
|
|
7596
|
+
"name": "vendor",
|
|
7597
|
+
"description": "Filter by model maker (e.g. anthropic, amazon, meta).",
|
|
7598
|
+
"required": false,
|
|
7599
|
+
"type": "string",
|
|
7600
|
+
"in": "query"
|
|
7601
|
+
},
|
|
7602
|
+
{
|
|
7603
|
+
"name": "provider",
|
|
7604
|
+
"description": "Filter by the provider slug that serves the model.",
|
|
7605
|
+
"required": false,
|
|
7606
|
+
"type": "string",
|
|
7607
|
+
"in": "query"
|
|
7608
|
+
},
|
|
7609
|
+
{
|
|
7610
|
+
"name": "modality",
|
|
7611
|
+
"description": "Filter to models whose input or output modalities include this value (e.g. text, image, embedding, speech).\n",
|
|
7612
|
+
"required": false,
|
|
7613
|
+
"type": "string",
|
|
7614
|
+
"in": "query"
|
|
7615
|
+
},
|
|
7616
|
+
{
|
|
7617
|
+
"name": "status",
|
|
7618
|
+
"description": "Filter by lifecycle status.",
|
|
7619
|
+
"required": false,
|
|
7620
|
+
"type": "string",
|
|
7621
|
+
"in": "query"
|
|
7622
|
+
},
|
|
7623
|
+
{
|
|
7624
|
+
"name": "managed",
|
|
7625
|
+
"description": "Filter by whether the model can be enabled as a naturali-managed provider — `managed=true` is the set you can pass to `POST /v1/projects/{project_id}/models/{model_id}/providers`. Omit to leave the catalog unfiltered on this axis; `false` returns only the BYOK-only models. Any other value is a 400.\n",
|
|
7626
|
+
"required": false,
|
|
7627
|
+
"type": "boolean",
|
|
7628
|
+
"in": "query"
|
|
7629
|
+
}
|
|
7630
|
+
]
|
|
7631
|
+
},
|
|
7632
|
+
"get-model": {
|
|
7633
|
+
serviceClass: "Models",
|
|
7634
|
+
operationId: "getModel",
|
|
7635
|
+
description: "Get a model",
|
|
7636
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
7637
|
+
httpMethod: "get",
|
|
7638
|
+
pathParams: ["model_id"],
|
|
7639
|
+
queryParams: [],
|
|
7640
|
+
flags: [{
|
|
7641
|
+
"name": "model_id",
|
|
7642
|
+
"description": "Public model id.",
|
|
7643
|
+
"required": true,
|
|
7644
|
+
"type": "string",
|
|
7645
|
+
"in": "path"
|
|
7646
|
+
}]
|
|
7647
|
+
},
|
|
7648
|
+
"enable-managed-model": {
|
|
7649
|
+
serviceClass: "Models",
|
|
7650
|
+
operationId: "enableManagedModel",
|
|
7651
|
+
description: "Provisions a managed provider running this model in the project. The provider needs no credentials of yours — it runs on naturali's own model access — and is priced from the catalog the moment it is created, so its usage is metered from the first generation. The created resource is an ordinary provider: read, update and delete it through [`GET /v1/projects/{project_id}/ai-providers/{ai_provider_id}`](/docs/api/ai-providers/get-ai-provider) like any other. Requires the `admin` role in the project. Only models with `managed: true` can be enabled; anything else is a 400.",
|
|
7652
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
7653
|
+
httpMethod: "post",
|
|
7654
|
+
pathParams: ["project_id", "model_id"],
|
|
7655
|
+
queryParams: [],
|
|
7656
|
+
flags: [
|
|
7657
|
+
{
|
|
7658
|
+
"name": "project_id",
|
|
7659
|
+
"description": "Project public ID (proj_ prefix).",
|
|
7660
|
+
"required": true,
|
|
7661
|
+
"type": "string",
|
|
7662
|
+
"in": "path"
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
"name": "model_id",
|
|
7666
|
+
"description": "Public model id.",
|
|
7667
|
+
"required": true,
|
|
7668
|
+
"type": "string",
|
|
7669
|
+
"in": "path"
|
|
7670
|
+
},
|
|
7671
|
+
{
|
|
7672
|
+
"name": "name",
|
|
7673
|
+
"description": "Provider configuration name. Defaults to the model id.",
|
|
7674
|
+
"required": false,
|
|
7675
|
+
"type": "string",
|
|
7676
|
+
"in": "body"
|
|
7677
|
+
}
|
|
7678
|
+
]
|
|
7679
|
+
},
|
|
7522
7680
|
"list-projects": {
|
|
7523
7681
|
serviceClass: "Projects",
|
|
7524
7682
|
operationId: "listProjects",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.23.1",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"@naturali/sdk": "0.
|
|
33
|
+
"@naturali/sdk": "0.69.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|