@openrouter/sdk 1.3.29 → 1.3.30
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/README.md +1 -1
- package/esm/funcs/batchCreateBatches.d.ts +19 -0
- package/esm/funcs/batchCreateBatches.js +98 -0
- package/esm/funcs/batchDelete.d.ts +19 -0
- package/esm/funcs/batchDelete.js +103 -0
- package/esm/funcs/batchGetBatches.d.ts +19 -0
- package/esm/funcs/batchGetBatches.js +103 -0
- package/esm/funcs/batchList.d.ts +21 -0
- package/esm/funcs/batchList.js +134 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/anthropicadvisortoolresult.d.ts +14 -0
- package/esm/models/anthropicadvisortoolresult.js +21 -0
- package/esm/models/anthropicbase64pdfsource.d.ts +17 -2
- package/esm/models/anthropicbase64pdfsource.js +25 -2
- package/esm/models/anthropicbashcodeexecutioncontent.d.ts +11 -0
- package/esm/models/anthropicbashcodeexecutioncontent.js +17 -0
- package/esm/models/anthropicbashcodeexecutionoutput.d.ts +18 -0
- package/esm/models/anthropicbashcodeexecutionoutput.js +25 -0
- package/esm/models/anthropicbashcodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropicbashcodeexecutionresult.js +24 -0
- package/esm/models/anthropicbashcodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropicbashcodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropicbashcodeexecutiontoolresulterror.d.ts +22 -0
- package/esm/models/anthropicbashcodeexecutiontoolresulterror.js +30 -0
- package/esm/models/anthropiccaller.d.ts +12 -0
- package/esm/models/anthropiccaller.js +19 -0
- package/esm/models/anthropiccitationcharlocation.d.ts +16 -0
- package/esm/models/anthropiccitationcharlocation.js +30 -0
- package/esm/models/anthropiccitationcontentblocklocation.d.ts +16 -0
- package/esm/models/anthropiccitationcontentblocklocation.js +30 -0
- package/esm/models/anthropiccitationpagelocation.d.ts +16 -0
- package/esm/models/anthropiccitationpagelocation.js +30 -0
- package/esm/models/anthropiccitationsconfig.d.ts +10 -0
- package/esm/models/anthropiccitationsconfig.js +14 -0
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +16 -0
- package/esm/models/anthropiccitationsearchresultlocation.js +28 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +14 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.js +24 -0
- package/esm/models/anthropiccodeexecution20250825caller.d.ts +11 -0
- package/esm/models/anthropiccodeexecution20250825caller.js +20 -0
- package/esm/models/anthropiccodeexecution20260120caller.d.ts +11 -0
- package/esm/models/anthropiccodeexecution20260120caller.js +20 -0
- package/esm/models/anthropiccodeexecutioncontent.d.ts +12 -0
- package/esm/models/anthropiccodeexecutioncontent.js +19 -0
- package/esm/models/anthropiccodeexecutionoutput.d.ts +18 -0
- package/esm/models/anthropiccodeexecutionoutput.js +25 -0
- package/esm/models/anthropiccodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropiccodeexecutionresult.js +24 -0
- package/esm/models/anthropiccodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropiccodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropiccodeexecutiontoolresulterror.d.ts +12 -0
- package/esm/models/anthropiccodeexecutiontoolresulterror.js +21 -0
- package/esm/models/anthropiccompactionblock.d.ts +12 -0
- package/esm/models/anthropiccompactionblock.js +21 -0
- package/esm/models/anthropiccontainer.d.ts +13 -0
- package/esm/models/anthropiccontainer.js +22 -0
- package/esm/models/anthropiccontainerskill.d.ts +20 -0
- package/esm/models/anthropiccontainerskill.js +28 -0
- package/esm/models/anthropiccontainerupload.d.ts +11 -0
- package/esm/models/anthropiccontainerupload.js +20 -0
- package/esm/models/anthropicdirectcaller.d.ts +10 -0
- package/esm/models/anthropicdirectcaller.js +14 -0
- package/esm/models/anthropicdocumentblock.d.ts +36 -0
- package/esm/models/anthropicdocumentblock.js +45 -0
- package/esm/models/anthropicdocumentblockparam.d.ts +20 -4
- package/esm/models/anthropicdocumentblockparam.js +4 -4
- package/esm/models/anthropicencryptedcodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropicencryptedcodeexecutionresult.js +25 -0
- package/esm/models/anthropicinputtransformation.d.ts +18 -0
- package/esm/models/anthropicinputtransformation.js +16 -0
- package/esm/models/anthropicoutputtokensdetails.d.ts +10 -0
- package/esm/models/anthropicoutputtokensdetails.js +19 -0
- package/esm/models/anthropicplaintextsource.d.ts +17 -2
- package/esm/models/anthropicplaintextsource.js +25 -2
- package/esm/models/anthropicredactedthinkingblock.d.ts +11 -0
- package/esm/models/anthropicredactedthinkingblock.js +15 -0
- package/esm/models/anthropicrefusalstopdetails.d.ts +32 -0
- package/esm/models/anthropicrefusalstopdetails.js +31 -0
- package/esm/models/anthropicservertoolerrorcode.d.ts +12 -0
- package/esm/models/anthropicservertoolerrorcode.js +14 -0
- package/esm/models/anthropicservertoolusage.d.ts +11 -0
- package/esm/models/anthropicservertoolusage.js +21 -0
- package/esm/models/anthropicservicetier.d.ts +11 -0
- package/esm/models/anthropicservicetier.js +13 -0
- package/esm/models/anthropictextblock.d.ts +13 -0
- package/esm/models/anthropictextblock.js +17 -0
- package/esm/models/anthropictextcitation.d.ts +14 -0
- package/esm/models/anthropictextcitation.js +23 -0
- package/esm/models/anthropictexteditorcodeexecutioncontent.d.ts +13 -0
- package/esm/models/anthropictexteditorcodeexecutioncontent.js +21 -0
- package/esm/models/anthropictexteditorcodeexecutioncreateresult.d.ts +11 -0
- package/esm/models/anthropictexteditorcodeexecutioncreateresult.js +20 -0
- package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.d.ts +15 -0
- package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.js +28 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.d.ts +23 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.js +33 -0
- package/esm/models/anthropictexteditorcodeexecutionviewresult.d.ts +24 -0
- package/esm/models/anthropictexteditorcodeexecutionviewresult.js +36 -0
- package/esm/models/anthropicthinkingblock.d.ts +12 -0
- package/esm/models/anthropicthinkingblock.js +16 -0
- package/esm/models/anthropictoolreference.d.ts +18 -0
- package/esm/models/anthropictoolreference.js +25 -0
- package/esm/models/anthropictoolsearchcontent.d.ts +11 -0
- package/esm/models/anthropictoolsearchcontent.js +17 -0
- package/esm/models/anthropictoolsearchresult.d.ts +12 -0
- package/esm/models/anthropictoolsearchresult.js +21 -0
- package/esm/models/anthropictoolsearchresulterror.d.ts +13 -0
- package/esm/models/anthropictoolsearchresulterror.js +23 -0
- package/esm/models/anthropictoolsearchtoolresult.d.ts +13 -0
- package/esm/models/anthropictoolsearchtoolresult.js +22 -0
- package/esm/models/anthropictooluseblock.d.ts +15 -0
- package/esm/models/anthropictooluseblock.js +19 -0
- package/esm/models/anthropicwebfetchblock.d.ts +14 -0
- package/esm/models/anthropicwebfetchblock.js +23 -0
- package/esm/models/anthropicwebfetchcontent.d.ts +11 -0
- package/esm/models/anthropicwebfetchcontent.js +17 -0
- package/esm/models/anthropicwebfetchtoolresult.d.ts +15 -0
- package/esm/models/anthropicwebfetchtoolresult.js +24 -0
- package/esm/models/anthropicwebfetchtoolresulterror.d.ts +25 -0
- package/esm/models/anthropicwebfetchtoolresulterror.js +33 -0
- package/esm/models/anthropicwebsearchresult.d.ts +21 -0
- package/esm/models/anthropicwebsearchresult.js +29 -0
- package/esm/models/anthropicwebsearchtoolresult.d.ts +20 -0
- package/esm/models/anthropicwebsearchtoolresult.js +36 -0
- package/esm/models/anthropicwebsearchtoolresulterror.d.ts +29 -0
- package/esm/models/anthropicwebsearchtoolresulterror.js +37 -0
- package/esm/models/batchdeletedobject.d.ts +26 -0
- package/esm/models/batchdeletedobject.js +22 -0
- package/esm/models/batchdeletionoutcome.d.ts +17 -0
- package/esm/models/batchdeletionoutcome.js +16 -0
- package/esm/models/batchdeletiontargets.d.ts +50 -0
- package/esm/models/batchdeletiontargets.js +32 -0
- package/esm/models/batcherrorresponse.d.ts +11 -0
- package/esm/models/batcherrorresponse.js +15 -0
- package/esm/models/batchlistitem.d.ts +181 -0
- package/esm/models/batchlistitem.js +159 -0
- package/esm/models/batchlistresponse.d.ts +25 -0
- package/esm/models/batchlistresponse.js +31 -0
- package/esm/models/batchliststatus.d.ts +20 -0
- package/esm/models/batchliststatus.js +19 -0
- package/esm/models/batchlisttimestamp.d.ts +12 -0
- package/esm/models/batchlisttimestamp.js +15 -0
- package/esm/models/batchobject.d.ts +750 -0
- package/esm/models/batchobject.js +810 -0
- package/esm/models/batchpaymentrequiredresponseerror.d.ts +159 -0
- package/esm/models/batchpaymentrequiredresponseerror.js +136 -0
- package/esm/models/batchproviderpreferences.d.ts +25 -0
- package/esm/models/batchproviderpreferences.js +20 -0
- package/esm/models/batchsubmitbody.d.ts +62 -0
- package/esm/models/batchsubmitbody.js +51 -0
- package/esm/models/debugevent.d.ts +12 -12
- package/esm/models/debugevent.js +11 -12
- package/esm/models/errors/batcherrorresponse.d.ts +19 -0
- package/esm/models/errors/batcherrorresponse.js +32 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +53 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.js +64 -0
- package/esm/models/errors/index.d.ts +2 -0
- package/esm/models/errors/index.js +2 -0
- package/esm/models/finishreason.d.ts +13 -0
- package/esm/models/finishreason.js +15 -0
- package/esm/models/imagegenerationusage.d.ts +4 -4
- package/esm/models/imagegenerationusage.js +4 -6
- package/esm/models/index.d.ts +75 -0
- package/esm/models/index.js +75 -0
- package/esm/models/internchatchoice.d.ts +4 -4
- package/esm/models/internchatchoice.js +3 -3
- package/esm/models/messagesmessageparam.d.ts +8 -8
- package/esm/models/messagesmessageparam.js +6 -7
- package/esm/models/operations/createbatches.d.ts +59 -0
- package/esm/models/operations/createbatches.js +23 -0
- package/esm/models/operations/deletebatch.d.ts +58 -0
- package/esm/models/operations/deletebatch.js +21 -0
- package/esm/models/operations/getbatches.d.ts +58 -0
- package/esm/models/operations/getbatches.js +21 -0
- package/esm/models/operations/index.d.ts +4 -0
- package/esm/models/operations/index.js +4 -0
- package/esm/models/operations/listbatches.d.ts +87 -0
- package/esm/models/operations/listbatches.js +40 -0
- package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
- package/esm/models/oranthropicbashtoolresult.js +49 -0
- package/esm/models/oranthropiccontentblock.d.ts +25 -0
- package/esm/models/oranthropiccontentblock.js +45 -0
- package/esm/models/oranthropicnullablecaller.d.ts +12 -0
- package/esm/models/oranthropicnullablecaller.js +19 -0
- package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
- package/esm/models/oranthropicservertooluseblock.js +19 -0
- package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
- package/esm/models/oranthropicshelltoolresult.js +50 -0
- package/esm/models/oranthropicstopreason.d.ts +16 -0
- package/esm/models/oranthropicstopreason.js +18 -0
- package/esm/models/outputfusionservertoolitem.d.ts +8 -8
- package/esm/models/outputfusionservertoolitem.js +8 -8
- package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
- package/esm/models/submitgenerationfeedbackrequest.js +3 -4
- package/esm/sdk/batch.d.ts +37 -0
- package/esm/sdk/batch.js +50 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Batch metadata with results withheld (results: null) plus the standard error envelope. Add credits to unlock the already-computed results; the batch is not re-run.
|
|
6
|
+
*/
|
|
7
|
+
export type BatchPaymentRequiredResponseErrorData = {
|
|
8
|
+
completionWindow: models.BatchPaymentRequiredResponseCompletionWindow;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
endpoint: string;
|
|
11
|
+
error: models.BatchPaymentRequiredResponseError;
|
|
12
|
+
finalizedAt: number | null;
|
|
13
|
+
id: string;
|
|
14
|
+
model: string;
|
|
15
|
+
object: models.BatchPaymentRequiredResponseObject;
|
|
16
|
+
requestCounts: models.BatchPaymentRequiredResponseRequestCounts;
|
|
17
|
+
/**
|
|
18
|
+
* Always null: results are withheld until the batch charge is covered.
|
|
19
|
+
*/
|
|
20
|
+
results: any | null;
|
|
21
|
+
status: models.BatchPaymentRequiredResponseStatus;
|
|
22
|
+
usage: models.BatchPaymentRequiredResponseUsage | null;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Batch metadata with results withheld (results: null) plus the standard error envelope. Add credits to unlock the already-computed results; the batch is not re-run.
|
|
26
|
+
*/
|
|
27
|
+
export declare class BatchPaymentRequiredResponseError extends OpenRouterError {
|
|
28
|
+
completionWindow: models.BatchPaymentRequiredResponseCompletionWindow;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
endpoint: string;
|
|
31
|
+
error: models.BatchPaymentRequiredResponseError;
|
|
32
|
+
finalizedAt: number | null;
|
|
33
|
+
id: string;
|
|
34
|
+
model: string;
|
|
35
|
+
object: models.BatchPaymentRequiredResponseObject;
|
|
36
|
+
requestCounts: models.BatchPaymentRequiredResponseRequestCounts;
|
|
37
|
+
/**
|
|
38
|
+
* Always null: results are withheld until the batch charge is covered.
|
|
39
|
+
*/
|
|
40
|
+
results: any | null;
|
|
41
|
+
status: models.BatchPaymentRequiredResponseStatus;
|
|
42
|
+
usage: models.BatchPaymentRequiredResponseUsage | null;
|
|
43
|
+
/** The original data that was passed to this error instance. */
|
|
44
|
+
data$: BatchPaymentRequiredResponseErrorData;
|
|
45
|
+
constructor(err: BatchPaymentRequiredResponseErrorData, httpMeta: {
|
|
46
|
+
response: Response;
|
|
47
|
+
request: Request;
|
|
48
|
+
body: string;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const BatchPaymentRequiredResponseError$inboundSchema: z.ZodType<BatchPaymentRequiredResponseError, unknown>;
|
|
53
|
+
//# sourceMappingURL=batchpaymentrequiredresponseerror.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2d141acc5a71
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { BatchPaymentRequiredResponseCompletionWindow$inboundSchema as models_BatchPaymentRequiredResponseCompletionWindow$inboundSchema, BatchPaymentRequiredResponseError$inboundSchema as models_BatchPaymentRequiredResponseError$inboundSchema, BatchPaymentRequiredResponseObject$inboundSchema as models_BatchPaymentRequiredResponseObject$inboundSchema, BatchPaymentRequiredResponseRequestCounts$inboundSchema as models_BatchPaymentRequiredResponseRequestCounts$inboundSchema, BatchPaymentRequiredResponseStatus$inboundSchema as models_BatchPaymentRequiredResponseStatus$inboundSchema, BatchPaymentRequiredResponseUsage$inboundSchema as models_BatchPaymentRequiredResponseUsage$inboundSchema } from "../batchpaymentrequiredresponseerror.js";
|
|
8
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
9
|
+
/**
|
|
10
|
+
* Batch metadata with results withheld (results: null) plus the standard error envelope. Add credits to unlock the already-computed results; the batch is not re-run.
|
|
11
|
+
*/
|
|
12
|
+
export class BatchPaymentRequiredResponseError extends OpenRouterError {
|
|
13
|
+
constructor(err, httpMeta) {
|
|
14
|
+
const message = err.error?.message
|
|
15
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
16
|
+
super(message, httpMeta);
|
|
17
|
+
this.data$ = err;
|
|
18
|
+
this.completionWindow = err.completionWindow;
|
|
19
|
+
this.createdAt = err.createdAt;
|
|
20
|
+
this.endpoint = err.endpoint;
|
|
21
|
+
this.error = err.error;
|
|
22
|
+
this.finalizedAt = err.finalizedAt;
|
|
23
|
+
this.id = err.id;
|
|
24
|
+
this.model = err.model;
|
|
25
|
+
this.object = err.object;
|
|
26
|
+
this.requestCounts = err.requestCounts;
|
|
27
|
+
this.results = err.results;
|
|
28
|
+
this.status = err.status;
|
|
29
|
+
this.usage = err.usage;
|
|
30
|
+
this.name = "BatchPaymentRequiredResponseError";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const BatchPaymentRequiredResponseError$inboundSchema = z.object({
|
|
35
|
+
completion_window: models_BatchPaymentRequiredResponseCompletionWindow$inboundSchema,
|
|
36
|
+
created_at: z.int(),
|
|
37
|
+
endpoint: z.string(),
|
|
38
|
+
error: z.lazy(() => models_BatchPaymentRequiredResponseError$inboundSchema),
|
|
39
|
+
finalized_at: z.nullable(z.int()),
|
|
40
|
+
id: z.string(),
|
|
41
|
+
model: z.string(),
|
|
42
|
+
object: models_BatchPaymentRequiredResponseObject$inboundSchema,
|
|
43
|
+
request_counts: z.lazy(() => models_BatchPaymentRequiredResponseRequestCounts$inboundSchema),
|
|
44
|
+
results: z.nullable(z.any()),
|
|
45
|
+
status: models_BatchPaymentRequiredResponseStatus$inboundSchema,
|
|
46
|
+
usage: z.nullable(z.lazy(() => models_BatchPaymentRequiredResponseUsage$inboundSchema)),
|
|
47
|
+
request$: z.custom(x => x instanceof Request),
|
|
48
|
+
response$: z.custom(x => x instanceof Response),
|
|
49
|
+
body$: z.string(),
|
|
50
|
+
})
|
|
51
|
+
.transform((v) => {
|
|
52
|
+
const remapped = remap$(v, {
|
|
53
|
+
"completion_window": "completionWindow",
|
|
54
|
+
"created_at": "createdAt",
|
|
55
|
+
"finalized_at": "finalizedAt",
|
|
56
|
+
"request_counts": "requestCounts",
|
|
57
|
+
});
|
|
58
|
+
return new BatchPaymentRequiredResponseError(remapped, {
|
|
59
|
+
request: v.request$,
|
|
60
|
+
response: v.response$,
|
|
61
|
+
body: v.body$,
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=batchpaymentrequiredresponseerror.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./badgatewayresponseerror.js";
|
|
2
2
|
export * from "./badrequestresponseerror.js";
|
|
3
|
+
export * from "./batcherrorresponse.js";
|
|
4
|
+
export * from "./batchpaymentrequiredresponseerror.js";
|
|
3
5
|
export * from "./conflictresponseerror.js";
|
|
4
6
|
export * from "./edgenetworktimeoutresponseerror.js";
|
|
5
7
|
export * from "./forbiddenresponseerror.js";
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export * from "./badgatewayresponseerror.js";
|
|
6
6
|
export * from "./badrequestresponseerror.js";
|
|
7
|
+
export * from "./batcherrorresponse.js";
|
|
8
|
+
export * from "./batchpaymentrequiredresponseerror.js";
|
|
7
9
|
export * from "./conflictresponseerror.js";
|
|
8
10
|
export * from "./edgenetworktimeoutresponseerror.js";
|
|
9
11
|
export * from "./forbiddenresponseerror.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const FinishReason: {
|
|
4
|
+
readonly Stop: "stop";
|
|
5
|
+
readonly Length: "length";
|
|
6
|
+
readonly ToolCalls: "tool_calls";
|
|
7
|
+
readonly ContentFilter: "content_filter";
|
|
8
|
+
readonly FunctionCall: "function_call";
|
|
9
|
+
};
|
|
10
|
+
export type FinishReason = OpenEnum<typeof FinishReason>;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const FinishReason$inboundSchema: z.ZodType<FinishReason, unknown>;
|
|
13
|
+
//# sourceMappingURL=finishreason.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ceaee02b253a
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
export const FinishReason = {
|
|
7
|
+
Stop: "stop",
|
|
8
|
+
Length: "length",
|
|
9
|
+
ToolCalls: "tool_calls",
|
|
10
|
+
ContentFilter: "content_filter",
|
|
11
|
+
FunctionCall: "function_call",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const FinishReason$inboundSchema = openEnums.inboundSchema(FinishReason);
|
|
15
|
+
//# sourceMappingURL=finishreason.js.map
|
|
@@ -47,7 +47,7 @@ export type ImageGenerationUsagePromptTokensDetails = {
|
|
|
47
47
|
/**
|
|
48
48
|
* Usage for server-side tool execution (e.g., web search)
|
|
49
49
|
*/
|
|
50
|
-
export type
|
|
50
|
+
export type ImageGenerationUsageServerToolUse = {
|
|
51
51
|
/**
|
|
52
52
|
* Number of OpenRouter server tool calls that executed and produced a result.
|
|
53
53
|
*/
|
|
@@ -95,7 +95,7 @@ export type ImageGenerationUsage = {
|
|
|
95
95
|
/**
|
|
96
96
|
* Usage for server-side tool execution (e.g., web search)
|
|
97
97
|
*/
|
|
98
|
-
serverToolUse?:
|
|
98
|
+
serverToolUse?: ImageGenerationUsageServerToolUse | null | undefined;
|
|
99
99
|
/**
|
|
100
100
|
* The service tier used by the upstream provider for this request
|
|
101
101
|
*/
|
|
@@ -113,8 +113,8 @@ export declare function imageGenerationUsageCompletionTokensDetailsFromJSON(json
|
|
|
113
113
|
export declare const ImageGenerationUsagePromptTokensDetails$inboundSchema: z.ZodType<ImageGenerationUsagePromptTokensDetails, unknown>;
|
|
114
114
|
export declare function imageGenerationUsagePromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsagePromptTokensDetails, SDKValidationError>;
|
|
115
115
|
/** @internal */
|
|
116
|
-
export declare const
|
|
117
|
-
export declare function
|
|
116
|
+
export declare const ImageGenerationUsageServerToolUse$inboundSchema: z.ZodType<ImageGenerationUsageServerToolUse, unknown>;
|
|
117
|
+
export declare function imageGenerationUsageServerToolUseFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsageServerToolUse, SDKValidationError>;
|
|
118
118
|
/** @internal */
|
|
119
119
|
export declare const ImageGenerationUsage$inboundSchema: z.ZodType<ImageGenerationUsage, unknown>;
|
|
120
120
|
export declare function imageGenerationUsageFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsage, SDKValidationError>;
|
|
@@ -44,8 +44,7 @@ export function imageGenerationUsagePromptTokensDetailsFromJSON(jsonString) {
|
|
|
44
44
|
return safeParse(jsonString, (x) => ImageGenerationUsagePromptTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationUsagePromptTokensDetails' from JSON`);
|
|
45
45
|
}
|
|
46
46
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
.object({
|
|
47
|
+
export const ImageGenerationUsageServerToolUse$inboundSchema = z.object({
|
|
49
48
|
tool_calls_executed: z.nullable(z.int()).optional(),
|
|
50
49
|
tool_calls_requested: z.nullable(z.int()).optional(),
|
|
51
50
|
web_search_requests: z.nullable(z.int()).optional(),
|
|
@@ -56,8 +55,8 @@ export const ServerToolUse$inboundSchema = z
|
|
|
56
55
|
"web_search_requests": "webSearchRequests",
|
|
57
56
|
});
|
|
58
57
|
});
|
|
59
|
-
export function
|
|
60
|
-
return safeParse(jsonString, (x) =>
|
|
58
|
+
export function imageGenerationUsageServerToolUseFromJSON(jsonString) {
|
|
59
|
+
return safeParse(jsonString, (x) => ImageGenerationUsageServerToolUse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageGenerationUsageServerToolUse' from JSON`);
|
|
61
60
|
}
|
|
62
61
|
/** @internal */
|
|
63
62
|
export const ImageGenerationUsage$inboundSchema = z.object({
|
|
@@ -71,8 +70,7 @@ export const ImageGenerationUsage$inboundSchema = z.object({
|
|
|
71
70
|
.optional(),
|
|
72
71
|
prompt_tokens: z.int(),
|
|
73
72
|
prompt_tokens_details: z.nullable(z.lazy(() => ImageGenerationUsagePromptTokensDetails$inboundSchema)).optional(),
|
|
74
|
-
server_tool_use: z.nullable(z.lazy(() =>
|
|
75
|
-
.optional(),
|
|
73
|
+
server_tool_use: z.nullable(z.lazy(() => ImageGenerationUsageServerToolUse$inboundSchema)).optional(),
|
|
76
74
|
service_tier: z.nullable(z.string()).optional(),
|
|
77
75
|
speed: z.nullable(AnthropicSpeed$inboundSchema).optional(),
|
|
78
76
|
total_tokens: z.int(),
|
package/esm/models/index.d.ts
CHANGED
|
@@ -8,19 +8,46 @@ export * from "./advisorservertoolopenrouter.js";
|
|
|
8
8
|
export * from "./agentmessageitem.js";
|
|
9
9
|
export * from "./annotationaddedevent.js";
|
|
10
10
|
export * from "./anthropicadvisormessageusageiteration.js";
|
|
11
|
+
export * from "./anthropicadvisortoolresult.js";
|
|
11
12
|
export * from "./anthropicallowedcallers.js";
|
|
12
13
|
export * from "./anthropicbase64imagesource.js";
|
|
13
14
|
export * from "./anthropicbase64pdfsource.js";
|
|
15
|
+
export * from "./anthropicbashcodeexecutioncontent.js";
|
|
16
|
+
export * from "./anthropicbashcodeexecutionoutput.js";
|
|
17
|
+
export * from "./anthropicbashcodeexecutionresult.js";
|
|
18
|
+
export * from "./anthropicbashcodeexecutiontoolresult.js";
|
|
19
|
+
export * from "./anthropicbashcodeexecutiontoolresulterror.js";
|
|
14
20
|
export * from "./anthropiccachecontroldirective.js";
|
|
15
21
|
export * from "./anthropiccachecontrolttl.js";
|
|
16
22
|
export * from "./anthropiccachecreation.js";
|
|
23
|
+
export * from "./anthropiccaller.js";
|
|
24
|
+
export * from "./anthropiccitationcharlocation.js";
|
|
17
25
|
export * from "./anthropiccitationcharlocationparam.js";
|
|
26
|
+
export * from "./anthropiccitationcontentblocklocation.js";
|
|
18
27
|
export * from "./anthropiccitationcontentblocklocationparam.js";
|
|
28
|
+
export * from "./anthropiccitationpagelocation.js";
|
|
19
29
|
export * from "./anthropiccitationpagelocationparam.js";
|
|
30
|
+
export * from "./anthropiccitationsconfig.js";
|
|
31
|
+
export * from "./anthropiccitationsearchresultlocation.js";
|
|
20
32
|
export * from "./anthropiccitationsearchresultlocationparam.js";
|
|
33
|
+
export * from "./anthropiccitationwebsearchresultlocation.js";
|
|
21
34
|
export * from "./anthropiccitationwebsearchresultlocationparam.js";
|
|
35
|
+
export * from "./anthropiccodeexecution20250825caller.js";
|
|
36
|
+
export * from "./anthropiccodeexecution20260120caller.js";
|
|
37
|
+
export * from "./anthropiccodeexecutioncontent.js";
|
|
38
|
+
export * from "./anthropiccodeexecutionoutput.js";
|
|
39
|
+
export * from "./anthropiccodeexecutionresult.js";
|
|
40
|
+
export * from "./anthropiccodeexecutiontoolresult.js";
|
|
41
|
+
export * from "./anthropiccodeexecutiontoolresulterror.js";
|
|
42
|
+
export * from "./anthropiccompactionblock.js";
|
|
22
43
|
export * from "./anthropiccompactionusageiteration.js";
|
|
44
|
+
export * from "./anthropiccontainer.js";
|
|
45
|
+
export * from "./anthropiccontainerskill.js";
|
|
46
|
+
export * from "./anthropiccontainerupload.js";
|
|
47
|
+
export * from "./anthropicdirectcaller.js";
|
|
48
|
+
export * from "./anthropicdocumentblock.js";
|
|
23
49
|
export * from "./anthropicdocumentblockparam.js";
|
|
50
|
+
export * from "./anthropicencryptedcodeexecutionresult.js";
|
|
24
51
|
export * from "./anthropicfile.js";
|
|
25
52
|
export * from "./anthropicfiledeleted.js";
|
|
26
53
|
export * from "./anthropicfiledocumentsource.js";
|
|
@@ -29,28 +56,57 @@ export * from "./anthropicimageblockparam.js";
|
|
|
29
56
|
export * from "./anthropicimagemimetype.js";
|
|
30
57
|
export * from "./anthropicinputtokensclearatleast.js";
|
|
31
58
|
export * from "./anthropicinputtokenstrigger.js";
|
|
59
|
+
export * from "./anthropicinputtransformation.js";
|
|
32
60
|
export * from "./anthropiciterationcachecreation.js";
|
|
33
61
|
export * from "./anthropicmessageoutputconfig.js";
|
|
34
62
|
export * from "./anthropicmessageusageiteration.js";
|
|
35
63
|
export * from "./anthropicoutputeffort.js";
|
|
64
|
+
export * from "./anthropicoutputtokensdetails.js";
|
|
36
65
|
export * from "./anthropicplaintextsource.js";
|
|
66
|
+
export * from "./anthropicredactedthinkingblock.js";
|
|
67
|
+
export * from "./anthropicrefusalstopdetails.js";
|
|
37
68
|
export * from "./anthropicsafeguard.js";
|
|
38
69
|
export * from "./anthropicsearchresultblockparam.js";
|
|
70
|
+
export * from "./anthropicservertoolerrorcode.js";
|
|
71
|
+
export * from "./anthropicservertoolusage.js";
|
|
72
|
+
export * from "./anthropicservicetier.js";
|
|
39
73
|
export * from "./anthropicspeed.js";
|
|
40
74
|
export * from "./anthropicsystemclearat.js";
|
|
75
|
+
export * from "./anthropictextblock.js";
|
|
41
76
|
export * from "./anthropictextblockparam.js";
|
|
77
|
+
export * from "./anthropictextcitation.js";
|
|
78
|
+
export * from "./anthropictexteditorcodeexecutioncontent.js";
|
|
79
|
+
export * from "./anthropictexteditorcodeexecutioncreateresult.js";
|
|
80
|
+
export * from "./anthropictexteditorcodeexecutionstrreplaceresult.js";
|
|
81
|
+
export * from "./anthropictexteditorcodeexecutiontoolresult.js";
|
|
82
|
+
export * from "./anthropictexteditorcodeexecutiontoolresulterror.js";
|
|
83
|
+
export * from "./anthropictexteditorcodeexecutionviewresult.js";
|
|
84
|
+
export * from "./anthropicthinkingblock.js";
|
|
42
85
|
export * from "./anthropicthinkingblockbinding.js";
|
|
43
86
|
export * from "./anthropicthinkingdisplay.js";
|
|
44
87
|
export * from "./anthropicthinkingturns.js";
|
|
88
|
+
export * from "./anthropictoolreference.js";
|
|
89
|
+
export * from "./anthropictoolsearchcontent.js";
|
|
90
|
+
export * from "./anthropictoolsearchresult.js";
|
|
91
|
+
export * from "./anthropictoolsearchresulterror.js";
|
|
45
92
|
export * from "./anthropictoolsearchtoolbm25.js";
|
|
46
93
|
export * from "./anthropictoolsearchtoolregex.js";
|
|
94
|
+
export * from "./anthropictoolsearchtoolresult.js";
|
|
95
|
+
export * from "./anthropictooluseblock.js";
|
|
47
96
|
export * from "./anthropictooluseskeep.js";
|
|
48
97
|
export * from "./anthropictoolusestrigger.js";
|
|
49
98
|
export * from "./anthropicunknownusageiteration.js";
|
|
50
99
|
export * from "./anthropicurlimagesource.js";
|
|
51
100
|
export * from "./anthropicurlpdfsource.js";
|
|
52
101
|
export * from "./anthropicusageiteration.js";
|
|
102
|
+
export * from "./anthropicwebfetchblock.js";
|
|
103
|
+
export * from "./anthropicwebfetchcontent.js";
|
|
104
|
+
export * from "./anthropicwebfetchtoolresult.js";
|
|
105
|
+
export * from "./anthropicwebfetchtoolresulterror.js";
|
|
106
|
+
export * from "./anthropicwebsearchresult.js";
|
|
53
107
|
export * from "./anthropicwebsearchresultblockparam.js";
|
|
108
|
+
export * from "./anthropicwebsearchtoolresult.js";
|
|
109
|
+
export * from "./anthropicwebsearchtoolresulterror.js";
|
|
54
110
|
export * from "./anthropicwebsearchtooluserlocation.js";
|
|
55
111
|
export * from "./apierrortype.js";
|
|
56
112
|
export * from "./applypatchcallitem.js";
|
|
@@ -78,6 +134,18 @@ export * from "./bashservertool.js";
|
|
|
78
134
|
export * from "./bashservertoolconfig.js";
|
|
79
135
|
export * from "./bashservertoolengine.js";
|
|
80
136
|
export * from "./bashservertoolenvironment.js";
|
|
137
|
+
export * from "./batchdeletedobject.js";
|
|
138
|
+
export * from "./batchdeletionoutcome.js";
|
|
139
|
+
export * from "./batchdeletiontargets.js";
|
|
140
|
+
export * from "./batcherrorresponse.js";
|
|
141
|
+
export * from "./batchlistitem.js";
|
|
142
|
+
export * from "./batchlistresponse.js";
|
|
143
|
+
export * from "./batchliststatus.js";
|
|
144
|
+
export * from "./batchlisttimestamp.js";
|
|
145
|
+
export * from "./batchobject.js";
|
|
146
|
+
export * from "./batchpaymentrequiredresponseerror.js";
|
|
147
|
+
export * from "./batchproviderpreferences.js";
|
|
148
|
+
export * from "./batchsubmitbody.js";
|
|
81
149
|
export * from "./booleancapability.js";
|
|
82
150
|
export * from "./bulkaddworkspacemembersrequest.js";
|
|
83
151
|
export * from "./bulkaddworkspacemembersresponse.js";
|
|
@@ -234,6 +302,7 @@ export * from "./fileresponse.js";
|
|
|
234
302
|
export * from "./filesearchservertool.js";
|
|
235
303
|
export * from "./filesservertool.js";
|
|
236
304
|
export * from "./filesservertoolconfig.js";
|
|
305
|
+
export * from "./finishreason.js";
|
|
237
306
|
export * from "./forbiddenresponseerrordata.js";
|
|
238
307
|
export * from "./formatjsonobjectconfig.js";
|
|
239
308
|
export * from "./formatjsonschemaconfig.js";
|
|
@@ -449,6 +518,12 @@ export * from "./openrouterfiledeleted.js";
|
|
|
449
518
|
export * from "./openrouterfilelist.js";
|
|
450
519
|
export * from "./openroutermetadata.js";
|
|
451
520
|
export * from "./openrouterwebsearchservertool.js";
|
|
521
|
+
export * from "./oranthropicbashtoolresult.js";
|
|
522
|
+
export * from "./oranthropiccontentblock.js";
|
|
523
|
+
export * from "./oranthropicnullablecaller.js";
|
|
524
|
+
export * from "./oranthropicservertooluseblock.js";
|
|
525
|
+
export * from "./oranthropicshelltoolresult.js";
|
|
526
|
+
export * from "./oranthropicstopreason.js";
|
|
452
527
|
export * from "./outputadvisorservertoolitem.js";
|
|
453
528
|
export * from "./outputapplypatchcallitem.js";
|
|
454
529
|
export * from "./outputapplypatchservertoolitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -12,19 +12,46 @@ export * from "./advisorservertoolopenrouter.js";
|
|
|
12
12
|
export * from "./agentmessageitem.js";
|
|
13
13
|
export * from "./annotationaddedevent.js";
|
|
14
14
|
export * from "./anthropicadvisormessageusageiteration.js";
|
|
15
|
+
export * from "./anthropicadvisortoolresult.js";
|
|
15
16
|
export * from "./anthropicallowedcallers.js";
|
|
16
17
|
export * from "./anthropicbase64imagesource.js";
|
|
17
18
|
export * from "./anthropicbase64pdfsource.js";
|
|
19
|
+
export * from "./anthropicbashcodeexecutioncontent.js";
|
|
20
|
+
export * from "./anthropicbashcodeexecutionoutput.js";
|
|
21
|
+
export * from "./anthropicbashcodeexecutionresult.js";
|
|
22
|
+
export * from "./anthropicbashcodeexecutiontoolresult.js";
|
|
23
|
+
export * from "./anthropicbashcodeexecutiontoolresulterror.js";
|
|
18
24
|
export * from "./anthropiccachecontroldirective.js";
|
|
19
25
|
export * from "./anthropiccachecontrolttl.js";
|
|
20
26
|
export * from "./anthropiccachecreation.js";
|
|
27
|
+
export * from "./anthropiccaller.js";
|
|
28
|
+
export * from "./anthropiccitationcharlocation.js";
|
|
21
29
|
export * from "./anthropiccitationcharlocationparam.js";
|
|
30
|
+
export * from "./anthropiccitationcontentblocklocation.js";
|
|
22
31
|
export * from "./anthropiccitationcontentblocklocationparam.js";
|
|
32
|
+
export * from "./anthropiccitationpagelocation.js";
|
|
23
33
|
export * from "./anthropiccitationpagelocationparam.js";
|
|
34
|
+
export * from "./anthropiccitationsconfig.js";
|
|
35
|
+
export * from "./anthropiccitationsearchresultlocation.js";
|
|
24
36
|
export * from "./anthropiccitationsearchresultlocationparam.js";
|
|
37
|
+
export * from "./anthropiccitationwebsearchresultlocation.js";
|
|
25
38
|
export * from "./anthropiccitationwebsearchresultlocationparam.js";
|
|
39
|
+
export * from "./anthropiccodeexecution20250825caller.js";
|
|
40
|
+
export * from "./anthropiccodeexecution20260120caller.js";
|
|
41
|
+
export * from "./anthropiccodeexecutioncontent.js";
|
|
42
|
+
export * from "./anthropiccodeexecutionoutput.js";
|
|
43
|
+
export * from "./anthropiccodeexecutionresult.js";
|
|
44
|
+
export * from "./anthropiccodeexecutiontoolresult.js";
|
|
45
|
+
export * from "./anthropiccodeexecutiontoolresulterror.js";
|
|
46
|
+
export * from "./anthropiccompactionblock.js";
|
|
26
47
|
export * from "./anthropiccompactionusageiteration.js";
|
|
48
|
+
export * from "./anthropiccontainer.js";
|
|
49
|
+
export * from "./anthropiccontainerskill.js";
|
|
50
|
+
export * from "./anthropiccontainerupload.js";
|
|
51
|
+
export * from "./anthropicdirectcaller.js";
|
|
52
|
+
export * from "./anthropicdocumentblock.js";
|
|
27
53
|
export * from "./anthropicdocumentblockparam.js";
|
|
54
|
+
export * from "./anthropicencryptedcodeexecutionresult.js";
|
|
28
55
|
export * from "./anthropicfile.js";
|
|
29
56
|
export * from "./anthropicfiledeleted.js";
|
|
30
57
|
export * from "./anthropicfiledocumentsource.js";
|
|
@@ -33,28 +60,57 @@ export * from "./anthropicimageblockparam.js";
|
|
|
33
60
|
export * from "./anthropicimagemimetype.js";
|
|
34
61
|
export * from "./anthropicinputtokensclearatleast.js";
|
|
35
62
|
export * from "./anthropicinputtokenstrigger.js";
|
|
63
|
+
export * from "./anthropicinputtransformation.js";
|
|
36
64
|
export * from "./anthropiciterationcachecreation.js";
|
|
37
65
|
export * from "./anthropicmessageoutputconfig.js";
|
|
38
66
|
export * from "./anthropicmessageusageiteration.js";
|
|
39
67
|
export * from "./anthropicoutputeffort.js";
|
|
68
|
+
export * from "./anthropicoutputtokensdetails.js";
|
|
40
69
|
export * from "./anthropicplaintextsource.js";
|
|
70
|
+
export * from "./anthropicredactedthinkingblock.js";
|
|
71
|
+
export * from "./anthropicrefusalstopdetails.js";
|
|
41
72
|
export * from "./anthropicsafeguard.js";
|
|
42
73
|
export * from "./anthropicsearchresultblockparam.js";
|
|
74
|
+
export * from "./anthropicservertoolerrorcode.js";
|
|
75
|
+
export * from "./anthropicservertoolusage.js";
|
|
76
|
+
export * from "./anthropicservicetier.js";
|
|
43
77
|
export * from "./anthropicspeed.js";
|
|
44
78
|
export * from "./anthropicsystemclearat.js";
|
|
79
|
+
export * from "./anthropictextblock.js";
|
|
45
80
|
export * from "./anthropictextblockparam.js";
|
|
81
|
+
export * from "./anthropictextcitation.js";
|
|
82
|
+
export * from "./anthropictexteditorcodeexecutioncontent.js";
|
|
83
|
+
export * from "./anthropictexteditorcodeexecutioncreateresult.js";
|
|
84
|
+
export * from "./anthropictexteditorcodeexecutionstrreplaceresult.js";
|
|
85
|
+
export * from "./anthropictexteditorcodeexecutiontoolresult.js";
|
|
86
|
+
export * from "./anthropictexteditorcodeexecutiontoolresulterror.js";
|
|
87
|
+
export * from "./anthropictexteditorcodeexecutionviewresult.js";
|
|
88
|
+
export * from "./anthropicthinkingblock.js";
|
|
46
89
|
export * from "./anthropicthinkingblockbinding.js";
|
|
47
90
|
export * from "./anthropicthinkingdisplay.js";
|
|
48
91
|
export * from "./anthropicthinkingturns.js";
|
|
92
|
+
export * from "./anthropictoolreference.js";
|
|
93
|
+
export * from "./anthropictoolsearchcontent.js";
|
|
94
|
+
export * from "./anthropictoolsearchresult.js";
|
|
95
|
+
export * from "./anthropictoolsearchresulterror.js";
|
|
49
96
|
export * from "./anthropictoolsearchtoolbm25.js";
|
|
50
97
|
export * from "./anthropictoolsearchtoolregex.js";
|
|
98
|
+
export * from "./anthropictoolsearchtoolresult.js";
|
|
99
|
+
export * from "./anthropictooluseblock.js";
|
|
51
100
|
export * from "./anthropictooluseskeep.js";
|
|
52
101
|
export * from "./anthropictoolusestrigger.js";
|
|
53
102
|
export * from "./anthropicunknownusageiteration.js";
|
|
54
103
|
export * from "./anthropicurlimagesource.js";
|
|
55
104
|
export * from "./anthropicurlpdfsource.js";
|
|
56
105
|
export * from "./anthropicusageiteration.js";
|
|
106
|
+
export * from "./anthropicwebfetchblock.js";
|
|
107
|
+
export * from "./anthropicwebfetchcontent.js";
|
|
108
|
+
export * from "./anthropicwebfetchtoolresult.js";
|
|
109
|
+
export * from "./anthropicwebfetchtoolresulterror.js";
|
|
110
|
+
export * from "./anthropicwebsearchresult.js";
|
|
57
111
|
export * from "./anthropicwebsearchresultblockparam.js";
|
|
112
|
+
export * from "./anthropicwebsearchtoolresult.js";
|
|
113
|
+
export * from "./anthropicwebsearchtoolresulterror.js";
|
|
58
114
|
export * from "./anthropicwebsearchtooluserlocation.js";
|
|
59
115
|
export * from "./apierrortype.js";
|
|
60
116
|
export * from "./applypatchcallitem.js";
|
|
@@ -82,6 +138,18 @@ export * from "./bashservertool.js";
|
|
|
82
138
|
export * from "./bashservertoolconfig.js";
|
|
83
139
|
export * from "./bashservertoolengine.js";
|
|
84
140
|
export * from "./bashservertoolenvironment.js";
|
|
141
|
+
export * from "./batchdeletedobject.js";
|
|
142
|
+
export * from "./batchdeletionoutcome.js";
|
|
143
|
+
export * from "./batchdeletiontargets.js";
|
|
144
|
+
export * from "./batcherrorresponse.js";
|
|
145
|
+
export * from "./batchlistitem.js";
|
|
146
|
+
export * from "./batchlistresponse.js";
|
|
147
|
+
export * from "./batchliststatus.js";
|
|
148
|
+
export * from "./batchlisttimestamp.js";
|
|
149
|
+
export * from "./batchobject.js";
|
|
150
|
+
export * from "./batchpaymentrequiredresponseerror.js";
|
|
151
|
+
export * from "./batchproviderpreferences.js";
|
|
152
|
+
export * from "./batchsubmitbody.js";
|
|
85
153
|
export * from "./booleancapability.js";
|
|
86
154
|
export * from "./bulkaddworkspacemembersrequest.js";
|
|
87
155
|
export * from "./bulkaddworkspacemembersresponse.js";
|
|
@@ -238,6 +306,7 @@ export * from "./fileresponse.js";
|
|
|
238
306
|
export * from "./filesearchservertool.js";
|
|
239
307
|
export * from "./filesservertool.js";
|
|
240
308
|
export * from "./filesservertoolconfig.js";
|
|
309
|
+
export * from "./finishreason.js";
|
|
241
310
|
export * from "./forbiddenresponseerrordata.js";
|
|
242
311
|
export * from "./formatjsonobjectconfig.js";
|
|
243
312
|
export * from "./formatjsonschemaconfig.js";
|
|
@@ -453,6 +522,12 @@ export * from "./openrouterfiledeleted.js";
|
|
|
453
522
|
export * from "./openrouterfilelist.js";
|
|
454
523
|
export * from "./openroutermetadata.js";
|
|
455
524
|
export * from "./openrouterwebsearchservertool.js";
|
|
525
|
+
export * from "./oranthropicbashtoolresult.js";
|
|
526
|
+
export * from "./oranthropiccontentblock.js";
|
|
527
|
+
export * from "./oranthropicnullablecaller.js";
|
|
528
|
+
export * from "./oranthropicservertooluseblock.js";
|
|
529
|
+
export * from "./oranthropicshelltoolresult.js";
|
|
530
|
+
export * from "./oranthropicstopreason.js";
|
|
456
531
|
export * from "./outputadvisorservertoolitem.js";
|
|
457
532
|
export * from "./outputapplypatchcallitem.js";
|
|
458
533
|
export * from "./outputapplypatchservertoolitem.js";
|
|
@@ -6,7 +6,7 @@ import { InternChatDelta } from "./internchatdelta.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const InternChatChoiceFinishReason: {
|
|
10
10
|
readonly Error: "error";
|
|
11
11
|
readonly Stop: "stop";
|
|
12
12
|
readonly ToolCalls: "tool_calls";
|
|
@@ -14,7 +14,7 @@ export declare const FinishReason: {
|
|
|
14
14
|
/**
|
|
15
15
|
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type InternChatChoiceFinishReason = OpenEnum<typeof InternChatChoiceFinishReason>;
|
|
18
18
|
/**
|
|
19
19
|
* The single choice this endpoint streams.
|
|
20
20
|
*/
|
|
@@ -26,11 +26,11 @@ export type InternChatChoice = {
|
|
|
26
26
|
/**
|
|
27
27
|
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
28
28
|
*/
|
|
29
|
-
finishReason:
|
|
29
|
+
finishReason: InternChatChoiceFinishReason | null;
|
|
30
30
|
index: number;
|
|
31
31
|
};
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const InternChatChoiceFinishReason$inboundSchema: z.ZodType<InternChatChoiceFinishReason, unknown>;
|
|
34
34
|
/** @internal */
|
|
35
35
|
export declare const InternChatChoice$inboundSchema: z.ZodType<InternChatChoice, unknown>;
|
|
36
36
|
export declare function internChatChoiceFromJSON(jsonString: string): SafeParseResult<InternChatChoice, SDKValidationError>;
|
|
@@ -10,17 +10,17 @@ import { InternChatDelta$inboundSchema, } from "./internchatdelta.js";
|
|
|
10
10
|
/**
|
|
11
11
|
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
12
12
|
*/
|
|
13
|
-
export const
|
|
13
|
+
export const InternChatChoiceFinishReason = {
|
|
14
14
|
Error: "error",
|
|
15
15
|
Stop: "stop",
|
|
16
16
|
ToolCalls: "tool_calls",
|
|
17
17
|
};
|
|
18
18
|
/** @internal */
|
|
19
|
-
export const
|
|
19
|
+
export const InternChatChoiceFinishReason$inboundSchema = openEnums.inboundSchema(InternChatChoiceFinishReason);
|
|
20
20
|
/** @internal */
|
|
21
21
|
export const InternChatChoice$inboundSchema = z.object({
|
|
22
22
|
delta: InternChatDelta$inboundSchema,
|
|
23
|
-
finish_reason: z.nullable(
|
|
23
|
+
finish_reason: z.nullable(InternChatChoiceFinishReason$inboundSchema),
|
|
24
24
|
index: z.int(),
|
|
25
25
|
}).transform((v) => {
|
|
26
26
|
return remap$(v, {
|
|
@@ -22,21 +22,21 @@ export type ContentCompaction = {
|
|
|
22
22
|
encryptedContent?: string | null | undefined;
|
|
23
23
|
type: "compaction";
|
|
24
24
|
};
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const MessagesMessageParamErrorCode: {
|
|
26
26
|
readonly InvalidToolInput: "invalid_tool_input";
|
|
27
27
|
readonly Unavailable: "unavailable";
|
|
28
28
|
readonly MaxUsesExceeded: "max_uses_exceeded";
|
|
29
29
|
readonly TooManyRequests: "too_many_requests";
|
|
30
30
|
readonly QueryTooLong: "query_too_long";
|
|
31
31
|
};
|
|
32
|
-
export type
|
|
33
|
-
export declare const
|
|
32
|
+
export type MessagesMessageParamErrorCode = OpenEnum<typeof MessagesMessageParamErrorCode>;
|
|
33
|
+
export declare const MessagesMessageParamTypeWebSearchToolResultError: {
|
|
34
34
|
readonly WebSearchToolResultError: "web_search_tool_result_error";
|
|
35
35
|
};
|
|
36
|
-
export type
|
|
36
|
+
export type MessagesMessageParamTypeWebSearchToolResultError = ClosedEnum<typeof MessagesMessageParamTypeWebSearchToolResultError>;
|
|
37
37
|
export type ContentWebSearchToolResultError = {
|
|
38
|
-
errorCode:
|
|
39
|
-
type:
|
|
38
|
+
errorCode: MessagesMessageParamErrorCode;
|
|
39
|
+
type: MessagesMessageParamTypeWebSearchToolResultError;
|
|
40
40
|
};
|
|
41
41
|
export type MessagesMessageParamContentUnion3 = ContentWebSearchToolResultError | Array<AnthropicWebSearchResultBlockParam>;
|
|
42
42
|
export type ContentWebSearchToolResult = {
|
|
@@ -121,9 +121,9 @@ export type ContentCompaction$Outbound = {
|
|
|
121
121
|
export declare const ContentCompaction$outboundSchema: z.ZodType<ContentCompaction$Outbound, ContentCompaction>;
|
|
122
122
|
export declare function contentCompactionToJSON(contentCompaction: ContentCompaction): string;
|
|
123
123
|
/** @internal */
|
|
124
|
-
export declare const
|
|
124
|
+
export declare const MessagesMessageParamErrorCode$outboundSchema: z.ZodType<string, MessagesMessageParamErrorCode>;
|
|
125
125
|
/** @internal */
|
|
126
|
-
export declare const
|
|
126
|
+
export declare const MessagesMessageParamTypeWebSearchToolResultError$outboundSchema: z.ZodEnum<typeof MessagesMessageParamTypeWebSearchToolResultError>;
|
|
127
127
|
/** @internal */
|
|
128
128
|
export type ContentWebSearchToolResultError$Outbound = {
|
|
129
129
|
error_code: string;
|
|
@@ -18,14 +18,14 @@ import { MessagesBashToolResultBlock$outboundSchema, } from "./messagesbashtoolr
|
|
|
18
18
|
import { MessagesShellToolResultBlock$outboundSchema, } from "./messagesshelltoolresultblock.js";
|
|
19
19
|
import { MessagesToolAdditionBlock$outboundSchema, } from "./messagestooladditionblock.js";
|
|
20
20
|
import { MessagesToolRemovalBlock$outboundSchema, } from "./messagestoolremovalblock.js";
|
|
21
|
-
export const
|
|
21
|
+
export const MessagesMessageParamErrorCode = {
|
|
22
22
|
InvalidToolInput: "invalid_tool_input",
|
|
23
23
|
Unavailable: "unavailable",
|
|
24
24
|
MaxUsesExceeded: "max_uses_exceeded",
|
|
25
25
|
TooManyRequests: "too_many_requests",
|
|
26
26
|
QueryTooLong: "query_too_long",
|
|
27
27
|
};
|
|
28
|
-
export const
|
|
28
|
+
export const MessagesMessageParamTypeWebSearchToolResultError = {
|
|
29
29
|
WebSearchToolResultError: "web_search_tool_result_error",
|
|
30
30
|
};
|
|
31
31
|
export const MessagesMessageParamRole = {
|
|
@@ -49,14 +49,13 @@ export function contentCompactionToJSON(contentCompaction) {
|
|
|
49
49
|
return JSON.stringify(ContentCompaction$outboundSchema.parse(contentCompaction));
|
|
50
50
|
}
|
|
51
51
|
/** @internal */
|
|
52
|
-
export const
|
|
53
|
-
.outboundSchema(ErrorCode);
|
|
52
|
+
export const MessagesMessageParamErrorCode$outboundSchema = openEnums.outboundSchema(MessagesMessageParamErrorCode);
|
|
54
53
|
/** @internal */
|
|
55
|
-
export const
|
|
54
|
+
export const MessagesMessageParamTypeWebSearchToolResultError$outboundSchema = z.enum(MessagesMessageParamTypeWebSearchToolResultError);
|
|
56
55
|
/** @internal */
|
|
57
56
|
export const ContentWebSearchToolResultError$outboundSchema = z.object({
|
|
58
|
-
errorCode:
|
|
59
|
-
type:
|
|
57
|
+
errorCode: MessagesMessageParamErrorCode$outboundSchema,
|
|
58
|
+
type: MessagesMessageParamTypeWebSearchToolResultError$outboundSchema,
|
|
60
59
|
}).transform((v) => {
|
|
61
60
|
return remap$(v, {
|
|
62
61
|
errorCode: "error_code",
|