@openrouter/sdk 1.3.28 → 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.
Files changed (216) hide show
  1. package/README.md +1 -1
  2. package/esm/funcs/batchCreateBatches.d.ts +19 -0
  3. package/esm/funcs/batchCreateBatches.js +98 -0
  4. package/esm/funcs/batchDelete.d.ts +19 -0
  5. package/esm/funcs/batchDelete.js +103 -0
  6. package/esm/funcs/batchGetBatches.d.ts +19 -0
  7. package/esm/funcs/batchGetBatches.js +103 -0
  8. package/esm/funcs/batchList.d.ts +21 -0
  9. package/esm/funcs/batchList.js +134 -0
  10. package/esm/lib/config.d.ts +2 -2
  11. package/esm/lib/config.js +2 -2
  12. package/esm/models/anthropicadvisortoolresult.d.ts +14 -0
  13. package/esm/models/anthropicadvisortoolresult.js +21 -0
  14. package/esm/models/anthropicbase64pdfsource.d.ts +17 -2
  15. package/esm/models/anthropicbase64pdfsource.js +25 -2
  16. package/esm/models/anthropicbashcodeexecutioncontent.d.ts +11 -0
  17. package/esm/models/anthropicbashcodeexecutioncontent.js +17 -0
  18. package/esm/models/anthropicbashcodeexecutionoutput.d.ts +18 -0
  19. package/esm/models/anthropicbashcodeexecutionoutput.js +25 -0
  20. package/esm/models/anthropicbashcodeexecutionresult.d.ts +15 -0
  21. package/esm/models/anthropicbashcodeexecutionresult.js +24 -0
  22. package/esm/models/anthropicbashcodeexecutiontoolresult.d.ts +13 -0
  23. package/esm/models/anthropicbashcodeexecutiontoolresult.js +22 -0
  24. package/esm/models/anthropicbashcodeexecutiontoolresulterror.d.ts +22 -0
  25. package/esm/models/anthropicbashcodeexecutiontoolresulterror.js +30 -0
  26. package/esm/models/anthropiccaller.d.ts +12 -0
  27. package/esm/models/anthropiccaller.js +19 -0
  28. package/esm/models/anthropiccitationcharlocation.d.ts +16 -0
  29. package/esm/models/anthropiccitationcharlocation.js +30 -0
  30. package/esm/models/anthropiccitationcontentblocklocation.d.ts +16 -0
  31. package/esm/models/anthropiccitationcontentblocklocation.js +30 -0
  32. package/esm/models/anthropiccitationpagelocation.d.ts +16 -0
  33. package/esm/models/anthropiccitationpagelocation.js +30 -0
  34. package/esm/models/anthropiccitationsconfig.d.ts +10 -0
  35. package/esm/models/anthropiccitationsconfig.js +14 -0
  36. package/esm/models/anthropiccitationsearchresultlocation.d.ts +16 -0
  37. package/esm/models/anthropiccitationsearchresultlocation.js +28 -0
  38. package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +14 -0
  39. package/esm/models/anthropiccitationwebsearchresultlocation.js +24 -0
  40. package/esm/models/anthropiccodeexecution20250825caller.d.ts +11 -0
  41. package/esm/models/anthropiccodeexecution20250825caller.js +20 -0
  42. package/esm/models/anthropiccodeexecution20260120caller.d.ts +11 -0
  43. package/esm/models/anthropiccodeexecution20260120caller.js +20 -0
  44. package/esm/models/anthropiccodeexecutioncontent.d.ts +12 -0
  45. package/esm/models/anthropiccodeexecutioncontent.js +19 -0
  46. package/esm/models/anthropiccodeexecutionoutput.d.ts +18 -0
  47. package/esm/models/anthropiccodeexecutionoutput.js +25 -0
  48. package/esm/models/anthropiccodeexecutionresult.d.ts +15 -0
  49. package/esm/models/anthropiccodeexecutionresult.js +24 -0
  50. package/esm/models/anthropiccodeexecutiontoolresult.d.ts +13 -0
  51. package/esm/models/anthropiccodeexecutiontoolresult.js +22 -0
  52. package/esm/models/anthropiccodeexecutiontoolresulterror.d.ts +12 -0
  53. package/esm/models/anthropiccodeexecutiontoolresulterror.js +21 -0
  54. package/esm/models/anthropiccompactionblock.d.ts +12 -0
  55. package/esm/models/anthropiccompactionblock.js +21 -0
  56. package/esm/models/anthropiccontainer.d.ts +13 -0
  57. package/esm/models/anthropiccontainer.js +22 -0
  58. package/esm/models/anthropiccontainerskill.d.ts +20 -0
  59. package/esm/models/anthropiccontainerskill.js +28 -0
  60. package/esm/models/anthropiccontainerupload.d.ts +11 -0
  61. package/esm/models/anthropiccontainerupload.js +20 -0
  62. package/esm/models/anthropicdirectcaller.d.ts +10 -0
  63. package/esm/models/anthropicdirectcaller.js +14 -0
  64. package/esm/models/anthropicdocumentblock.d.ts +36 -0
  65. package/esm/models/anthropicdocumentblock.js +45 -0
  66. package/esm/models/anthropicdocumentblockparam.d.ts +20 -4
  67. package/esm/models/anthropicdocumentblockparam.js +4 -4
  68. package/esm/models/anthropicencryptedcodeexecutionresult.d.ts +15 -0
  69. package/esm/models/anthropicencryptedcodeexecutionresult.js +25 -0
  70. package/esm/models/anthropicinputtransformation.d.ts +18 -0
  71. package/esm/models/anthropicinputtransformation.js +16 -0
  72. package/esm/models/anthropicoutputtokensdetails.d.ts +10 -0
  73. package/esm/models/anthropicoutputtokensdetails.js +19 -0
  74. package/esm/models/anthropicplaintextsource.d.ts +17 -2
  75. package/esm/models/anthropicplaintextsource.js +25 -2
  76. package/esm/models/anthropicredactedthinkingblock.d.ts +11 -0
  77. package/esm/models/anthropicredactedthinkingblock.js +15 -0
  78. package/esm/models/anthropicrefusalstopdetails.d.ts +32 -0
  79. package/esm/models/anthropicrefusalstopdetails.js +31 -0
  80. package/esm/models/anthropicservertoolerrorcode.d.ts +12 -0
  81. package/esm/models/anthropicservertoolerrorcode.js +14 -0
  82. package/esm/models/anthropicservertoolusage.d.ts +11 -0
  83. package/esm/models/anthropicservertoolusage.js +21 -0
  84. package/esm/models/anthropicservicetier.d.ts +11 -0
  85. package/esm/models/anthropicservicetier.js +13 -0
  86. package/esm/models/anthropictextblock.d.ts +13 -0
  87. package/esm/models/anthropictextblock.js +17 -0
  88. package/esm/models/anthropictextcitation.d.ts +14 -0
  89. package/esm/models/anthropictextcitation.js +23 -0
  90. package/esm/models/anthropictexteditorcodeexecutioncontent.d.ts +13 -0
  91. package/esm/models/anthropictexteditorcodeexecutioncontent.js +21 -0
  92. package/esm/models/anthropictexteditorcodeexecutioncreateresult.d.ts +11 -0
  93. package/esm/models/anthropictexteditorcodeexecutioncreateresult.js +20 -0
  94. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.d.ts +15 -0
  95. package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.js +28 -0
  96. package/esm/models/anthropictexteditorcodeexecutiontoolresult.d.ts +13 -0
  97. package/esm/models/anthropictexteditorcodeexecutiontoolresult.js +22 -0
  98. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.d.ts +23 -0
  99. package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.js +33 -0
  100. package/esm/models/anthropictexteditorcodeexecutionviewresult.d.ts +24 -0
  101. package/esm/models/anthropictexteditorcodeexecutionviewresult.js +36 -0
  102. package/esm/models/anthropicthinkingblock.d.ts +12 -0
  103. package/esm/models/anthropicthinkingblock.js +16 -0
  104. package/esm/models/anthropictoolreference.d.ts +18 -0
  105. package/esm/models/anthropictoolreference.js +25 -0
  106. package/esm/models/anthropictoolsearchcontent.d.ts +11 -0
  107. package/esm/models/anthropictoolsearchcontent.js +17 -0
  108. package/esm/models/anthropictoolsearchresult.d.ts +12 -0
  109. package/esm/models/anthropictoolsearchresult.js +21 -0
  110. package/esm/models/anthropictoolsearchresulterror.d.ts +13 -0
  111. package/esm/models/anthropictoolsearchresulterror.js +23 -0
  112. package/esm/models/anthropictoolsearchtoolresult.d.ts +13 -0
  113. package/esm/models/anthropictoolsearchtoolresult.js +22 -0
  114. package/esm/models/anthropictooluseblock.d.ts +15 -0
  115. package/esm/models/anthropictooluseblock.js +19 -0
  116. package/esm/models/anthropicwebfetchblock.d.ts +14 -0
  117. package/esm/models/anthropicwebfetchblock.js +23 -0
  118. package/esm/models/anthropicwebfetchcontent.d.ts +11 -0
  119. package/esm/models/anthropicwebfetchcontent.js +17 -0
  120. package/esm/models/anthropicwebfetchtoolresult.d.ts +15 -0
  121. package/esm/models/anthropicwebfetchtoolresult.js +24 -0
  122. package/esm/models/anthropicwebfetchtoolresulterror.d.ts +25 -0
  123. package/esm/models/anthropicwebfetchtoolresulterror.js +33 -0
  124. package/esm/models/anthropicwebsearchresult.d.ts +21 -0
  125. package/esm/models/anthropicwebsearchresult.js +29 -0
  126. package/esm/models/anthropicwebsearchtoolresult.d.ts +20 -0
  127. package/esm/models/anthropicwebsearchtoolresult.js +36 -0
  128. package/esm/models/anthropicwebsearchtoolresulterror.d.ts +29 -0
  129. package/esm/models/anthropicwebsearchtoolresulterror.js +37 -0
  130. package/esm/models/batchdeletedobject.d.ts +26 -0
  131. package/esm/models/batchdeletedobject.js +22 -0
  132. package/esm/models/batchdeletionoutcome.d.ts +17 -0
  133. package/esm/models/batchdeletionoutcome.js +16 -0
  134. package/esm/models/batchdeletiontargets.d.ts +50 -0
  135. package/esm/models/batchdeletiontargets.js +32 -0
  136. package/esm/models/batcherrorresponse.d.ts +11 -0
  137. package/esm/models/batcherrorresponse.js +15 -0
  138. package/esm/models/batchlistitem.d.ts +181 -0
  139. package/esm/models/batchlistitem.js +159 -0
  140. package/esm/models/batchlistresponse.d.ts +25 -0
  141. package/esm/models/batchlistresponse.js +31 -0
  142. package/esm/models/batchliststatus.d.ts +20 -0
  143. package/esm/models/batchliststatus.js +19 -0
  144. package/esm/models/batchlisttimestamp.d.ts +12 -0
  145. package/esm/models/batchlisttimestamp.js +15 -0
  146. package/esm/models/batchobject.d.ts +750 -0
  147. package/esm/models/batchobject.js +810 -0
  148. package/esm/models/batchpaymentrequiredresponseerror.d.ts +159 -0
  149. package/esm/models/batchpaymentrequiredresponseerror.js +136 -0
  150. package/esm/models/batchproviderpreferences.d.ts +25 -0
  151. package/esm/models/batchproviderpreferences.js +20 -0
  152. package/esm/models/batchsubmitbody.d.ts +62 -0
  153. package/esm/models/batchsubmitbody.js +51 -0
  154. package/esm/models/debugevent.d.ts +12 -12
  155. package/esm/models/debugevent.js +11 -12
  156. package/esm/models/errors/batcherrorresponse.d.ts +19 -0
  157. package/esm/models/errors/batcherrorresponse.js +32 -0
  158. package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +53 -0
  159. package/esm/models/errors/batchpaymentrequiredresponseerror.js +64 -0
  160. package/esm/models/errors/index.d.ts +2 -0
  161. package/esm/models/errors/index.js +2 -0
  162. package/esm/models/finishreason.d.ts +13 -0
  163. package/esm/models/finishreason.js +15 -0
  164. package/esm/models/imagegenerationusage.d.ts +4 -4
  165. package/esm/models/imagegenerationusage.js +4 -6
  166. package/esm/models/index.d.ts +77 -0
  167. package/esm/models/index.js +77 -0
  168. package/esm/models/internchatchoice.d.ts +4 -4
  169. package/esm/models/internchatchoice.js +3 -3
  170. package/esm/models/messagesmessageparam.d.ts +8 -8
  171. package/esm/models/messagesmessageparam.js +6 -7
  172. package/esm/models/operations/createbatches.d.ts +59 -0
  173. package/esm/models/operations/createbatches.js +23 -0
  174. package/esm/models/operations/deletebatch.d.ts +58 -0
  175. package/esm/models/operations/deletebatch.js +21 -0
  176. package/esm/models/operations/getbatches.d.ts +58 -0
  177. package/esm/models/operations/getbatches.js +21 -0
  178. package/esm/models/operations/index.d.ts +4 -0
  179. package/esm/models/operations/index.js +4 -0
  180. package/esm/models/operations/listbatches.d.ts +87 -0
  181. package/esm/models/operations/listbatches.js +40 -0
  182. package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
  183. package/esm/models/oranthropicbashtoolresult.js +49 -0
  184. package/esm/models/oranthropiccontentblock.d.ts +25 -0
  185. package/esm/models/oranthropiccontentblock.js +45 -0
  186. package/esm/models/oranthropicnullablecaller.d.ts +12 -0
  187. package/esm/models/oranthropicnullablecaller.js +19 -0
  188. package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
  189. package/esm/models/oranthropicservertooluseblock.js +19 -0
  190. package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
  191. package/esm/models/oranthropicshelltoolresult.js +50 -0
  192. package/esm/models/oranthropicstopreason.d.ts +16 -0
  193. package/esm/models/oranthropicstopreason.js +18 -0
  194. package/esm/models/outputfusionservertoolitem.d.ts +8 -8
  195. package/esm/models/outputfusionservertoolitem.js +8 -8
  196. package/esm/models/publicendpoint.d.ts +8 -0
  197. package/esm/models/publicendpoint.js +4 -0
  198. package/esm/models/speechinputreference.d.ts +4 -3
  199. package/esm/models/speechinputreference.js +2 -0
  200. package/esm/models/speechinputreferenceaudio.d.ts +1 -1
  201. package/esm/models/speechinputreferenceaudioinput.d.ts +8 -3
  202. package/esm/models/speechinputreferenceaudioinput.js +2 -1
  203. package/esm/models/speechinputreferenceimage.d.ts +21 -0
  204. package/esm/models/speechinputreferenceimage.js +20 -0
  205. package/esm/models/speechinputreferenceimageinput.d.ts +18 -0
  206. package/esm/models/speechinputreferenceimageinput.js +13 -0
  207. package/esm/models/speechinputreferencetext.d.ts +2 -2
  208. package/esm/models/speechrequest.d.ts +1 -1
  209. package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
  210. package/esm/models/submitgenerationfeedbackrequest.js +3 -4
  211. package/esm/sdk/batch.d.ts +37 -0
  212. package/esm/sdk/batch.js +50 -0
  213. package/esm/sdk/sdk.d.ts +3 -0
  214. package/esm/sdk/sdk.js +4 -0
  215. package/jsr.json +1 -1
  216. package/package.json +7 -7
@@ -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 ServerToolUse = {
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?: ServerToolUse | null | undefined;
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 ServerToolUse$inboundSchema: z.ZodType<ServerToolUse, unknown>;
117
- export declare function serverToolUseFromJSON(jsonString: string): SafeParseResult<ServerToolUse, SDKValidationError>;
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 ServerToolUse$inboundSchema = z
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 serverToolUseFromJSON(jsonString) {
60
- return safeParse(jsonString, (x) => ServerToolUse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServerToolUse' from JSON`);
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(() => ServerToolUse$inboundSchema))
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(),
@@ -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";
@@ -583,6 +658,8 @@ export * from "./shellservertoolopenrouter.js";
583
658
  export * from "./speechinputreference.js";
584
659
  export * from "./speechinputreferenceaudio.js";
585
660
  export * from "./speechinputreferenceaudioinput.js";
661
+ export * from "./speechinputreferenceimage.js";
662
+ export * from "./speechinputreferenceimageinput.js";
586
663
  export * from "./speechinputreferencetext.js";
587
664
  export * from "./speechrequest.js";
588
665
  export * from "./stopservertoolswhencondition.js";
@@ -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";
@@ -587,6 +662,8 @@ export * from "./shellservertoolopenrouter.js";
587
662
  export * from "./speechinputreference.js";
588
663
  export * from "./speechinputreferenceaudio.js";
589
664
  export * from "./speechinputreferenceaudioinput.js";
665
+ export * from "./speechinputreferenceimage.js";
666
+ export * from "./speechinputreferenceimageinput.js";
590
667
  export * from "./speechinputreferencetext.js";
591
668
  export * from "./speechrequest.js";
592
669
  export * from "./stopservertoolswhencondition.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 FinishReason: {
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 FinishReason = OpenEnum<typeof FinishReason>;
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: FinishReason | null;
29
+ finishReason: InternChatChoiceFinishReason | null;
30
30
  index: number;
31
31
  };
32
32
  /** @internal */
33
- export declare const FinishReason$inboundSchema: z.ZodType<FinishReason, unknown>;
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 FinishReason = {
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 FinishReason$inboundSchema = openEnums.inboundSchema(FinishReason);
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(FinishReason$inboundSchema),
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 ErrorCode: {
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 ErrorCode = OpenEnum<typeof ErrorCode>;
33
- export declare const TypeWebSearchToolResultError: {
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 TypeWebSearchToolResultError = ClosedEnum<typeof TypeWebSearchToolResultError>;
36
+ export type MessagesMessageParamTypeWebSearchToolResultError = ClosedEnum<typeof MessagesMessageParamTypeWebSearchToolResultError>;
37
37
  export type ContentWebSearchToolResultError = {
38
- errorCode: ErrorCode;
39
- type: TypeWebSearchToolResultError;
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 ErrorCode$outboundSchema: z.ZodType<string, ErrorCode>;
124
+ export declare const MessagesMessageParamErrorCode$outboundSchema: z.ZodType<string, MessagesMessageParamErrorCode>;
125
125
  /** @internal */
126
- export declare const TypeWebSearchToolResultError$outboundSchema: z.ZodEnum<typeof TypeWebSearchToolResultError>;
126
+ export declare const MessagesMessageParamTypeWebSearchToolResultError$outboundSchema: z.ZodEnum<typeof MessagesMessageParamTypeWebSearchToolResultError>;
127
127
  /** @internal */
128
128
  export type ContentWebSearchToolResultError$Outbound = {
129
129
  error_code: string;