@zinn-digital/sdk 0.1.1451 → 0.1.1452
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.
|
@@ -24124,7 +24124,7 @@ export interface paths {
|
|
|
24124
24124
|
* Run one chat completion on an open model, paid from Zinn® AI credits.
|
|
24125
24125
|
* @description Serverless AI inference for Zinn® AI Hosting plans (every AI Hosting plan grants `serverless_inference`). Runs in the request, on actual tokens, billed from the org's Zinn® AI credits: plan-included credits first spend here (this is an AI Hosting surface), then bought top-up credit. The platform's small daily included allowance never funds it, and a customer's own provider key is not used.
|
|
24126
24126
|
*
|
|
24127
|
-
* Gates, each before anything is sent or charged: the plan grants `serverless_inference` (else `422 FEATURE_NOT_INCLUDED`); the model is offered and priced (else `422`, `refusal.aiInference.unknownModel`); the org is in good standing (else `422 AI_NOT_IN_GOOD_STANDING`); credit is left (else `422 AI_CREDIT_REQUIRED`, `details[].can_buy`). An answer that stops at the caller's own `max_output_tokens` before it finishes (a reasoning model can spend a small cap thinking) answers `422` with `details[]` `{field: max_output_tokens, maximum}` and a `failure` of class `refused`, code `output_cap_reached` (`aiError.outputCapReached`): raise the cap and send it again. Any other failed model call answers `503` with a `failure` whose class is `our_fault` and names no supplier. Neither charges anything. At most 64 messages of 32,000 characters; `max_output_tokens` 1 to 4,096 (default
|
|
24127
|
+
* Gates, each before anything is sent or charged: the plan grants `serverless_inference` (else `422 FEATURE_NOT_INCLUDED`); the model is offered and priced (else `422`, `refusal.aiInference.unknownModel`); the org is in good standing (else `422 AI_NOT_IN_GOOD_STANDING`); credit is left (else `422 AI_CREDIT_REQUIRED`, `details[].can_buy`). An answer that stops at the caller's own `max_output_tokens` before it finishes (a reasoning model can spend a small cap thinking) answers `422` with `details[]` `{field: max_output_tokens, maximum}` and a `failure` of class `refused`, code `output_cap_reached` (`aiError.outputCapReached`): raise the cap and send it again. Any other failed model call answers `503` with a `failure` whose class is `our_fault` and names no supplier. Neither charges anything. At most 64 messages of 32,000 characters; `max_output_tokens` 1 to 4,096 (default 2,048). A reasoning model's thinking is off unless `reasoning` is `true`; opted in, the thinking counts against `max_output_tokens` and every token is billed. Requires `sites.create`.
|
|
24128
24128
|
*/
|
|
24129
24129
|
post: operations["createAiInferenceChat"];
|
|
24130
24130
|
delete?: never;
|
|
@@ -70549,12 +70549,17 @@ export interface components {
|
|
|
70549
70549
|
data: components["schemas"]["AiImageProviderAvailability"][];
|
|
70550
70550
|
};
|
|
70551
70551
|
AiInferenceChatRequest: {
|
|
70552
|
-
/** @default
|
|
70552
|
+
/** @default 2048 */
|
|
70553
70553
|
max_output_tokens: number;
|
|
70554
70554
|
messages: components["schemas"]["AiInferenceMessage"][];
|
|
70555
70555
|
/** @description A model from `GET /v1/ai/inference/models`; empty means the default. */
|
|
70556
70556
|
model?: string;
|
|
70557
70557
|
org_id?: components["schemas"]["Uuid"];
|
|
70558
|
+
/**
|
|
70559
|
+
* @description Let a reasoning model think before it answers. Off by default, because the thinking is output tokens: opted in, it counts against `max_output_tokens` and is billed like the answer. Models that do not reason ignore it.
|
|
70560
|
+
* @default false
|
|
70561
|
+
*/
|
|
70562
|
+
reasoning: boolean;
|
|
70558
70563
|
};
|
|
70559
70564
|
AiInferenceMessage: {
|
|
70560
70565
|
content: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1452",
|
|
4
4
|
"description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",
|