@naturali/sdk 0.77.2 → 0.78.1
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.cjs +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.mts +12 -4
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2965,7 +2965,7 @@ var Models = class {
|
|
|
2965
2965
|
/**
|
|
2966
2966
|
* Enable naturali models
|
|
2967
2967
|
*
|
|
2968
|
-
* Provisions the project's managed provider — the
|
|
2968
|
+
* Provisions the project's managed provider for one catalog source (`bedrock` by default) — the provider through which every model that source marks `managed: true` is available. It needs no credentials of yours (it runs on naturali's own model access) and is priced from the catalog for all managed models the moment it is created, so any of them is usable from an agent's `model` field — set it to the catalog's `provider_model` — and metered from the first generation. Models that join the catalog later are priced onto the provider automatically by the daily sync; enabling is a one-time act per project per source, not per model, and calling it again for the same source returns the existing provider as a `200` instead of creating a duplicate. 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.
|
|
2969
2969
|
*
|
|
2970
2970
|
*/
|
|
2971
2971
|
static enableManagedModels(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -3312,7 +3312,8 @@ type Model = {
|
|
|
3312
3312
|
*/
|
|
3313
3313
|
input_per_1k_tokens: number;
|
|
3314
3314
|
/**
|
|
3315
|
-
* USD per 1K output tokens.
|
|
3315
|
+
* USD per 1K output tokens. Reasoning ("thinking") tokens are output tokens: on a model that reasons by default they are counted in `output_tokens` and billed at this rate, and can be most of the output on a short answer. A rate alone therefore does not size a request on such a model.
|
|
3316
|
+
*
|
|
3316
3317
|
*/
|
|
3317
3318
|
output_per_1k_tokens: number;
|
|
3318
3319
|
/**
|
|
@@ -4036,6 +4037,7 @@ type UsageTokens = {
|
|
|
4036
4037
|
type UsageComponent = {
|
|
4037
4038
|
/**
|
|
4038
4039
|
* The measured dimension — input_tokens, cached_tokens, output_tokens, reasoning_tokens, compute_second, request, gb_day, …
|
|
4040
|
+
* Components are not always disjoint. `reasoning_tokens` is the part of `output_tokens` a reasoning model spent thinking: it is reported for visibility and priced as output, so its own `cost_usd` is null to keep it from being counted twice. On a model that reasons by default it can be most of the output — and most of the bill — for a short answer.
|
|
4039
4041
|
*
|
|
4040
4042
|
*/
|
|
4041
4043
|
component: string;
|
|
@@ -4049,7 +4051,7 @@ type UsageComponent = {
|
|
|
4049
4051
|
*/
|
|
4050
4052
|
quantity: number;
|
|
4051
4053
|
/**
|
|
4052
|
-
* Billing-grade cost in USD for this component; null when it was not priced. The quantity is still measured — null never means free.
|
|
4054
|
+
* Billing-grade cost in USD for this component; null when it was not priced, or when another component already prices it (as `output_tokens` prices `reasoning_tokens`). The quantity is still measured — null never means free.
|
|
4053
4055
|
*
|
|
4054
4056
|
*/
|
|
4055
4057
|
cost_usd: number | null;
|
|
@@ -12972,7 +12974,13 @@ type GetModelResponse = GetModelResponses[keyof GetModelResponses];
|
|
|
12972
12974
|
type EnableManagedModelsData = {
|
|
12973
12975
|
body?: {
|
|
12974
12976
|
/**
|
|
12975
|
-
*
|
|
12977
|
+
* Which catalog source to enable. A managed provider serves the models of one source, so a project that wants both enables both — each call returns its own provider, and each is priced only for the models it can actually serve.
|
|
12978
|
+
*
|
|
12979
|
+
*/
|
|
12980
|
+
provider?: 'bedrock' | 'vertex';
|
|
12981
|
+
/**
|
|
12982
|
+
* Provider configuration name. Defaults to `naturali` for `bedrock` and `naturali-<provider>` for every other source, so a project that enables more than one keeps them apart.
|
|
12983
|
+
*
|
|
12976
12984
|
*/
|
|
12977
12985
|
name?: string;
|
|
12978
12986
|
/**
|
|
@@ -17876,7 +17884,7 @@ declare class Models {
|
|
|
17876
17884
|
/**
|
|
17877
17885
|
* Enable naturali models
|
|
17878
17886
|
*
|
|
17879
|
-
* Provisions the project's managed provider — the
|
|
17887
|
+
* Provisions the project's managed provider for one catalog source (`bedrock` by default) — the provider through which every model that source marks `managed: true` is available. It needs no credentials of yours (it runs on naturali's own model access) and is priced from the catalog for all managed models the moment it is created, so any of them is usable from an agent's `model` field — set it to the catalog's `provider_model` — and metered from the first generation. Models that join the catalog later are priced onto the provider automatically by the daily sync; enabling is a one-time act per project per source, not per model, and calling it again for the same source returns the existing provider as a `200` instead of creating a duplicate. 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.
|
|
17880
17888
|
*
|
|
17881
17889
|
*/
|
|
17882
17890
|
static enableManagedModels<ThrowOnError extends boolean = false>(options: Options<EnableManagedModelsData, ThrowOnError>): RequestResult<EnableManagedModelsResponses, EnableManagedModelsErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -3312,7 +3312,8 @@ type Model = {
|
|
|
3312
3312
|
*/
|
|
3313
3313
|
input_per_1k_tokens: number;
|
|
3314
3314
|
/**
|
|
3315
|
-
* USD per 1K output tokens.
|
|
3315
|
+
* USD per 1K output tokens. Reasoning ("thinking") tokens are output tokens: on a model that reasons by default they are counted in `output_tokens` and billed at this rate, and can be most of the output on a short answer. A rate alone therefore does not size a request on such a model.
|
|
3316
|
+
*
|
|
3316
3317
|
*/
|
|
3317
3318
|
output_per_1k_tokens: number;
|
|
3318
3319
|
/**
|
|
@@ -4036,6 +4037,7 @@ type UsageTokens = {
|
|
|
4036
4037
|
type UsageComponent = {
|
|
4037
4038
|
/**
|
|
4038
4039
|
* The measured dimension — input_tokens, cached_tokens, output_tokens, reasoning_tokens, compute_second, request, gb_day, …
|
|
4040
|
+
* Components are not always disjoint. `reasoning_tokens` is the part of `output_tokens` a reasoning model spent thinking: it is reported for visibility and priced as output, so its own `cost_usd` is null to keep it from being counted twice. On a model that reasons by default it can be most of the output — and most of the bill — for a short answer.
|
|
4039
4041
|
*
|
|
4040
4042
|
*/
|
|
4041
4043
|
component: string;
|
|
@@ -4049,7 +4051,7 @@ type UsageComponent = {
|
|
|
4049
4051
|
*/
|
|
4050
4052
|
quantity: number;
|
|
4051
4053
|
/**
|
|
4052
|
-
* Billing-grade cost in USD for this component; null when it was not priced. The quantity is still measured — null never means free.
|
|
4054
|
+
* Billing-grade cost in USD for this component; null when it was not priced, or when another component already prices it (as `output_tokens` prices `reasoning_tokens`). The quantity is still measured — null never means free.
|
|
4053
4055
|
*
|
|
4054
4056
|
*/
|
|
4055
4057
|
cost_usd: number | null;
|
|
@@ -12972,7 +12974,13 @@ type GetModelResponse = GetModelResponses[keyof GetModelResponses];
|
|
|
12972
12974
|
type EnableManagedModelsData = {
|
|
12973
12975
|
body?: {
|
|
12974
12976
|
/**
|
|
12975
|
-
*
|
|
12977
|
+
* Which catalog source to enable. A managed provider serves the models of one source, so a project that wants both enables both — each call returns its own provider, and each is priced only for the models it can actually serve.
|
|
12978
|
+
*
|
|
12979
|
+
*/
|
|
12980
|
+
provider?: 'bedrock' | 'vertex';
|
|
12981
|
+
/**
|
|
12982
|
+
* Provider configuration name. Defaults to `naturali` for `bedrock` and `naturali-<provider>` for every other source, so a project that enables more than one keeps them apart.
|
|
12983
|
+
*
|
|
12976
12984
|
*/
|
|
12977
12985
|
name?: string;
|
|
12978
12986
|
/**
|
|
@@ -17876,7 +17884,7 @@ declare class Models {
|
|
|
17876
17884
|
/**
|
|
17877
17885
|
* Enable naturali models
|
|
17878
17886
|
*
|
|
17879
|
-
* Provisions the project's managed provider — the
|
|
17887
|
+
* Provisions the project's managed provider for one catalog source (`bedrock` by default) — the provider through which every model that source marks `managed: true` is available. It needs no credentials of yours (it runs on naturali's own model access) and is priced from the catalog for all managed models the moment it is created, so any of them is usable from an agent's `model` field — set it to the catalog's `provider_model` — and metered from the first generation. Models that join the catalog later are priced onto the provider automatically by the daily sync; enabling is a one-time act per project per source, not per model, and calling it again for the same source returns the existing provider as a `200` instead of creating a duplicate. 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.
|
|
17880
17888
|
*
|
|
17881
17889
|
*/
|
|
17882
17890
|
static enableManagedModels<ThrowOnError extends boolean = false>(options: Options<EnableManagedModelsData, ThrowOnError>): RequestResult<EnableManagedModelsResponses, EnableManagedModelsErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -2964,7 +2964,7 @@ var Models = class {
|
|
|
2964
2964
|
/**
|
|
2965
2965
|
* Enable naturali models
|
|
2966
2966
|
*
|
|
2967
|
-
* Provisions the project's managed provider — the
|
|
2967
|
+
* Provisions the project's managed provider for one catalog source (`bedrock` by default) — the provider through which every model that source marks `managed: true` is available. It needs no credentials of yours (it runs on naturali's own model access) and is priced from the catalog for all managed models the moment it is created, so any of them is usable from an agent's `model` field — set it to the catalog's `provider_model` — and metered from the first generation. Models that join the catalog later are priced onto the provider automatically by the daily sync; enabling is a one-time act per project per source, not per model, and calling it again for the same source returns the existing provider as a `200` instead of creating a duplicate. 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.
|
|
2968
2968
|
*
|
|
2969
2969
|
*/
|
|
2970
2970
|
static enableManagedModels(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"tsx": "^4.23.1",
|
|
38
38
|
"typescript": "~6.0.3",
|
|
39
39
|
"vitest": "^4.1.10",
|
|
40
|
-
"@naturali/api": "0.
|
|
40
|
+
"@naturali/api": "0.78.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|