@openrouter/sdk 0.0.0-beta.32 → 0.0.0-beta.33

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 (168) hide show
  1. package/FUNCTIONS.md +2 -0
  2. package/REACT_QUERY.md +2 -0
  3. package/README.md +12 -0
  4. package/dist/commonjs/funcs/endpointsList.d.ts +1 -1
  5. package/dist/commonjs/funcs/endpointsList.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/endpointsList.js +1 -1
  7. package/dist/commonjs/funcs/endpointsList.js.map +1 -1
  8. package/dist/commonjs/funcs/modelsList.d.ts +1 -1
  9. package/dist/commonjs/funcs/modelsList.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/modelsList.js +1 -1
  11. package/dist/commonjs/funcs/modelsList.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/models/endpointslist.d.ts +768 -0
  15. package/dist/commonjs/models/endpointslist.d.ts.map +1 -0
  16. package/dist/commonjs/models/endpointslist.js +625 -0
  17. package/dist/commonjs/models/endpointslist.js.map +1 -0
  18. package/dist/commonjs/models/index.d.ts +3 -0
  19. package/dist/commonjs/models/index.d.ts.map +1 -1
  20. package/dist/commonjs/models/index.js +3 -0
  21. package/dist/commonjs/models/index.js.map +1 -1
  22. package/dist/commonjs/models/keyinfo.d.ts +155 -0
  23. package/dist/commonjs/models/keyinfo.d.ts.map +1 -0
  24. package/dist/commonjs/models/keyinfo.js +163 -0
  25. package/dist/commonjs/models/keyinfo.js.map +1 -0
  26. package/dist/commonjs/models/modelslist.d.ts +854 -0
  27. package/dist/commonjs/models/modelslist.d.ts.map +1 -0
  28. package/dist/commonjs/models/modelslist.js +768 -0
  29. package/dist/commonjs/models/modelslist.js.map +1 -0
  30. package/dist/commonjs/models/openairesponsesrequest.d.ts +52 -52
  31. package/dist/commonjs/models/openairesponsesrequest.d.ts.map +1 -1
  32. package/dist/commonjs/models/openairesponsesrequest.js +74 -76
  33. package/dist/commonjs/models/openairesponsesrequest.js.map +1 -1
  34. package/dist/commonjs/models/operations/getcurrentkey.d.ts +3 -108
  35. package/dist/commonjs/models/operations/getcurrentkey.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/getcurrentkey.js +4 -88
  37. package/dist/commonjs/models/operations/getcurrentkey.js.map +1 -1
  38. package/dist/commonjs/models/operations/list.d.ts +63 -825
  39. package/dist/commonjs/models/operations/list.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/list.js +86 -667
  41. package/dist/commonjs/models/operations/list.js.map +1 -1
  42. package/dist/commonjs/models/operations/listmodels.d.ts +16 -865
  43. package/dist/commonjs/models/operations/listmodels.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/listmodels.js +19 -742
  45. package/dist/commonjs/models/operations/listmodels.js.map +1 -1
  46. package/dist/commonjs/models/operations/listusermodels.d.ts +3 -852
  47. package/dist/commonjs/models/operations/listusermodels.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/listusermodels.js +4 -730
  49. package/dist/commonjs/models/operations/listusermodels.js.map +1 -1
  50. package/dist/commonjs/models/operations/previewzdr.d.ts +97 -97
  51. package/dist/commonjs/models/operations/previewzdr.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/previewzdr.js +134 -133
  53. package/dist/commonjs/models/operations/previewzdr.js.map +1 -1
  54. package/dist/commonjs/models/responsereasoningconfig.d.ts +4 -0
  55. package/dist/commonjs/models/responsereasoningconfig.d.ts.map +1 -1
  56. package/dist/commonjs/models/responsereasoningconfig.js +13 -0
  57. package/dist/commonjs/models/responsereasoningconfig.js.map +1 -1
  58. package/dist/commonjs/models/responsesusage.d.ts +41 -0
  59. package/dist/commonjs/models/responsesusage.d.ts.map +1 -1
  60. package/dist/commonjs/models/responsesusage.js +54 -1
  61. package/dist/commonjs/models/responsesusage.js.map +1 -1
  62. package/dist/commonjs/react-query/endpointsList.d.ts +4 -4
  63. package/dist/commonjs/react-query/endpointsList.d.ts.map +1 -1
  64. package/dist/commonjs/react-query/endpointsList.js.map +1 -1
  65. package/dist/commonjs/react-query/modelsList.d.ts +4 -4
  66. package/dist/commonjs/react-query/modelsList.d.ts.map +1 -1
  67. package/dist/commonjs/react-query/modelsList.js.map +1 -1
  68. package/dist/commonjs/sdk/endpoints.d.ts +1 -1
  69. package/dist/commonjs/sdk/endpoints.d.ts.map +1 -1
  70. package/dist/commonjs/sdk/endpoints.js.map +1 -1
  71. package/dist/commonjs/sdk/models.d.ts +1 -1
  72. package/dist/commonjs/sdk/models.d.ts.map +1 -1
  73. package/dist/commonjs/sdk/models.js.map +1 -1
  74. package/dist/esm/funcs/endpointsList.d.ts +1 -1
  75. package/dist/esm/funcs/endpointsList.d.ts.map +1 -1
  76. package/dist/esm/funcs/endpointsList.js +1 -1
  77. package/dist/esm/funcs/endpointsList.js.map +1 -1
  78. package/dist/esm/funcs/modelsList.d.ts +1 -1
  79. package/dist/esm/funcs/modelsList.d.ts.map +1 -1
  80. package/dist/esm/funcs/modelsList.js +1 -1
  81. package/dist/esm/funcs/modelsList.js.map +1 -1
  82. package/dist/esm/lib/config.d.ts +2 -2
  83. package/dist/esm/lib/config.js +2 -2
  84. package/dist/esm/models/endpointslist.d.ts +768 -0
  85. package/dist/esm/models/endpointslist.d.ts.map +1 -0
  86. package/dist/esm/models/endpointslist.js +562 -0
  87. package/dist/esm/models/endpointslist.js.map +1 -0
  88. package/dist/esm/models/index.d.ts +3 -0
  89. package/dist/esm/models/index.d.ts.map +1 -1
  90. package/dist/esm/models/index.js +3 -0
  91. package/dist/esm/models/index.js.map +1 -1
  92. package/dist/esm/models/keyinfo.d.ts +155 -0
  93. package/dist/esm/models/keyinfo.d.ts.map +1 -0
  94. package/dist/esm/models/keyinfo.js +123 -0
  95. package/dist/esm/models/keyinfo.js.map +1 -0
  96. package/dist/esm/models/modelslist.d.ts +854 -0
  97. package/dist/esm/models/modelslist.d.ts.map +1 -0
  98. package/dist/esm/models/modelslist.js +697 -0
  99. package/dist/esm/models/modelslist.js.map +1 -0
  100. package/dist/esm/models/openairesponsesrequest.d.ts +52 -52
  101. package/dist/esm/models/openairesponsesrequest.d.ts.map +1 -1
  102. package/dist/esm/models/openairesponsesrequest.js +64 -66
  103. package/dist/esm/models/openairesponsesrequest.js.map +1 -1
  104. package/dist/esm/models/operations/getcurrentkey.d.ts +3 -108
  105. package/dist/esm/models/operations/getcurrentkey.d.ts.map +1 -1
  106. package/dist/esm/models/operations/getcurrentkey.js +3 -83
  107. package/dist/esm/models/operations/getcurrentkey.js.map +1 -1
  108. package/dist/esm/models/operations/list.d.ts +63 -825
  109. package/dist/esm/models/operations/list.d.ts.map +1 -1
  110. package/dist/esm/models/operations/list.js +81 -635
  111. package/dist/esm/models/operations/list.js.map +1 -1
  112. package/dist/esm/models/operations/listmodels.d.ts +16 -865
  113. package/dist/esm/models/operations/listmodels.d.ts.map +1 -1
  114. package/dist/esm/models/operations/listmodels.js +16 -704
  115. package/dist/esm/models/operations/listmodels.js.map +1 -1
  116. package/dist/esm/models/operations/listusermodels.d.ts +3 -852
  117. package/dist/esm/models/operations/listusermodels.d.ts.map +1 -1
  118. package/dist/esm/models/operations/listusermodels.js +3 -694
  119. package/dist/esm/models/operations/listusermodels.js.map +1 -1
  120. package/dist/esm/models/operations/previewzdr.d.ts +97 -97
  121. package/dist/esm/models/operations/previewzdr.d.ts.map +1 -1
  122. package/dist/esm/models/operations/previewzdr.js +118 -117
  123. package/dist/esm/models/operations/previewzdr.js.map +1 -1
  124. package/dist/esm/models/responsereasoningconfig.d.ts +4 -0
  125. package/dist/esm/models/responsereasoningconfig.d.ts.map +1 -1
  126. package/dist/esm/models/responsereasoningconfig.js +13 -0
  127. package/dist/esm/models/responsereasoningconfig.js.map +1 -1
  128. package/dist/esm/models/responsesusage.d.ts +41 -0
  129. package/dist/esm/models/responsesusage.d.ts.map +1 -1
  130. package/dist/esm/models/responsesusage.js +51 -0
  131. package/dist/esm/models/responsesusage.js.map +1 -1
  132. package/dist/esm/react-query/endpointsList.d.ts +4 -4
  133. package/dist/esm/react-query/endpointsList.d.ts.map +1 -1
  134. package/dist/esm/react-query/endpointsList.js.map +1 -1
  135. package/dist/esm/react-query/modelsList.d.ts +4 -4
  136. package/dist/esm/react-query/modelsList.d.ts.map +1 -1
  137. package/dist/esm/react-query/modelsList.js.map +1 -1
  138. package/dist/esm/sdk/endpoints.d.ts +1 -1
  139. package/dist/esm/sdk/endpoints.d.ts.map +1 -1
  140. package/dist/esm/sdk/endpoints.js.map +1 -1
  141. package/dist/esm/sdk/models.d.ts +1 -1
  142. package/dist/esm/sdk/models.d.ts.map +1 -1
  143. package/dist/esm/sdk/models.js.map +1 -1
  144. package/docs/sdks/endpoints/README.md +1 -1
  145. package/docs/sdks/models/README.md +1 -1
  146. package/docs/sdks/responses/README.md +4 -0
  147. package/examples/betaResponsesSendRequest.example.ts +2 -0
  148. package/jsr.json +1 -1
  149. package/package.json +1 -1
  150. package/src/funcs/endpointsList.ts +3 -3
  151. package/src/funcs/modelsList.ts +3 -5
  152. package/src/lib/config.ts +2 -2
  153. package/src/models/endpointslist.ts +1034 -0
  154. package/src/models/index.ts +3 -0
  155. package/src/models/keyinfo.ts +281 -0
  156. package/src/models/modelslist.ts +1394 -0
  157. package/src/models/openairesponsesrequest.ts +133 -94
  158. package/src/models/operations/getcurrentkey.ts +5 -203
  159. package/src/models/operations/list.ts +109 -1106
  160. package/src/models/operations/listmodels.ts +26 -1436
  161. package/src/models/operations/listusermodels.ts +5 -1440
  162. package/src/models/operations/previewzdr.ts +196 -225
  163. package/src/models/responsereasoningconfig.ts +17 -0
  164. package/src/models/responsesusage.ts +96 -0
  165. package/src/react-query/endpointsList.ts +4 -4
  166. package/src/react-query/modelsList.ts +4 -4
  167. package/src/sdk/endpoints.ts +1 -1
  168. package/src/sdk/models.ts +1 -1
@@ -17,21 +17,21 @@ export type EndpointsPreviewZDRRequest = number | string | any;
17
17
 
18
18
  export type PreviewZDRImage = number | string | any;
19
19
 
20
- export type PreviewZDRImageOutput = number | string | any;
20
+ export type ImageOutput = number | string | any;
21
21
 
22
22
  export type PreviewZDRAudio = number | string | any;
23
23
 
24
- export type PreviewZDRInputAudioCache = number | string | any;
24
+ export type InputAudioCache = number | string | any;
25
25
 
26
- export type PreviewZDRWebSearch = number | string | any;
26
+ export type WebSearch = number | string | any;
27
27
 
28
- export type PreviewZDRInternalReasoning = number | string | any;
28
+ export type InternalReasoning = number | string | any;
29
29
 
30
- export type PreviewZDRInputCacheRead = number | string | any;
30
+ export type InputCacheRead = number | string | any;
31
31
 
32
- export type PreviewZDRInputCacheWrite = number | string | any;
32
+ export type InputCacheWrite = number | string | any;
33
33
 
34
- export type PreviewZDRPricing = {
34
+ export type Pricing = {
35
35
  prompt?: number | string | any | undefined;
36
36
  completion?: number | string | any | undefined;
37
37
  request?: number | string | any | undefined;
@@ -46,7 +46,7 @@ export type PreviewZDRPricing = {
46
46
  discount?: number | undefined;
47
47
  };
48
48
 
49
- export const PreviewZDRProviderName = {
49
+ export const ProviderName = {
50
50
  AnyScale: "AnyScale",
51
51
  CentML: "Cent-ML",
52
52
  HuggingFace: "HuggingFace",
@@ -130,7 +130,7 @@ export const PreviewZDRProviderName = {
130
130
  ZAi: "Z.AI",
131
131
  FakeProvider: "FakeProvider",
132
132
  } as const;
133
- export type PreviewZDRProviderName = ClosedEnum<typeof PreviewZDRProviderName>;
133
+ export type ProviderName = ClosedEnum<typeof ProviderName>;
134
134
 
135
135
  export const PreviewZDRQuantization = {
136
136
  Int4: "int4",
@@ -174,7 +174,7 @@ export type PreviewZDRSupportedParameter = ClosedEnum<
174
174
  typeof PreviewZDRSupportedParameter
175
175
  >;
176
176
 
177
- export const PreviewZDRStatus = {
177
+ export const Status = {
178
178
  Zero: 0,
179
179
  Minus1: -1,
180
180
  Minus2: -2,
@@ -182,20 +182,20 @@ export const PreviewZDRStatus = {
182
182
  Minus5: -5,
183
183
  Minus10: -10,
184
184
  } as const;
185
- export type PreviewZDRStatus = ClosedEnum<typeof PreviewZDRStatus>;
185
+ export type Status = ClosedEnum<typeof Status>;
186
186
 
187
187
  export type PreviewZDRData = {
188
188
  name: string;
189
189
  modelName: string;
190
190
  contextLength: number;
191
- pricing: PreviewZDRPricing;
192
- providerName: PreviewZDRProviderName;
191
+ pricing: Pricing;
192
+ providerName: ProviderName;
193
193
  tag: string;
194
194
  quantization: PreviewZDRQuantization | null;
195
195
  maxCompletionTokens: number | null;
196
196
  maxPromptTokens: number | null;
197
197
  supportedParameters: Array<PreviewZDRSupportedParameter>;
198
- status?: PreviewZDRStatus | undefined;
198
+ status?: Status | undefined;
199
199
  uptimeLast30m: number | null;
200
200
  supportsImplicitCaching: boolean;
201
201
  };
@@ -398,50 +398,46 @@ export function previewZDRImageFromJSON(
398
398
  }
399
399
 
400
400
  /** @internal */
401
- export const PreviewZDRImageOutput$inboundSchema: z.ZodType<
402
- PreviewZDRImageOutput,
401
+ export const ImageOutput$inboundSchema: z.ZodType<
402
+ ImageOutput,
403
403
  z.ZodTypeDef,
404
404
  unknown
405
405
  > = z.union([z.number(), z.string(), z.any()]);
406
406
 
407
407
  /** @internal */
408
- export type PreviewZDRImageOutput$Outbound = number | string | any;
408
+ export type ImageOutput$Outbound = number | string | any;
409
409
 
410
410
  /** @internal */
411
- export const PreviewZDRImageOutput$outboundSchema: z.ZodType<
412
- PreviewZDRImageOutput$Outbound,
411
+ export const ImageOutput$outboundSchema: z.ZodType<
412
+ ImageOutput$Outbound,
413
413
  z.ZodTypeDef,
414
- PreviewZDRImageOutput
414
+ ImageOutput
415
415
  > = z.union([z.number(), z.string(), z.any()]);
416
416
 
417
417
  /**
418
418
  * @internal
419
419
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
420
420
  */
421
- export namespace PreviewZDRImageOutput$ {
422
- /** @deprecated use `PreviewZDRImageOutput$inboundSchema` instead. */
423
- export const inboundSchema = PreviewZDRImageOutput$inboundSchema;
424
- /** @deprecated use `PreviewZDRImageOutput$outboundSchema` instead. */
425
- export const outboundSchema = PreviewZDRImageOutput$outboundSchema;
426
- /** @deprecated use `PreviewZDRImageOutput$Outbound` instead. */
427
- export type Outbound = PreviewZDRImageOutput$Outbound;
421
+ export namespace ImageOutput$ {
422
+ /** @deprecated use `ImageOutput$inboundSchema` instead. */
423
+ export const inboundSchema = ImageOutput$inboundSchema;
424
+ /** @deprecated use `ImageOutput$outboundSchema` instead. */
425
+ export const outboundSchema = ImageOutput$outboundSchema;
426
+ /** @deprecated use `ImageOutput$Outbound` instead. */
427
+ export type Outbound = ImageOutput$Outbound;
428
428
  }
429
429
 
430
- export function previewZDRImageOutputToJSON(
431
- previewZDRImageOutput: PreviewZDRImageOutput,
432
- ): string {
433
- return JSON.stringify(
434
- PreviewZDRImageOutput$outboundSchema.parse(previewZDRImageOutput),
435
- );
430
+ export function imageOutputToJSON(imageOutput: ImageOutput): string {
431
+ return JSON.stringify(ImageOutput$outboundSchema.parse(imageOutput));
436
432
  }
437
433
 
438
- export function previewZDRImageOutputFromJSON(
434
+ export function imageOutputFromJSON(
439
435
  jsonString: string,
440
- ): SafeParseResult<PreviewZDRImageOutput, SDKValidationError> {
436
+ ): SafeParseResult<ImageOutput, SDKValidationError> {
441
437
  return safeParse(
442
438
  jsonString,
443
- (x) => PreviewZDRImageOutput$inboundSchema.parse(JSON.parse(x)),
444
- `Failed to parse 'PreviewZDRImageOutput' from JSON`,
439
+ (x) => ImageOutput$inboundSchema.parse(JSON.parse(x)),
440
+ `Failed to parse 'ImageOutput' from JSON`,
445
441
  );
446
442
  }
447
443
 
@@ -492,278 +488,261 @@ export function previewZDRAudioFromJSON(
492
488
  }
493
489
 
494
490
  /** @internal */
495
- export const PreviewZDRInputAudioCache$inboundSchema: z.ZodType<
496
- PreviewZDRInputAudioCache,
491
+ export const InputAudioCache$inboundSchema: z.ZodType<
492
+ InputAudioCache,
497
493
  z.ZodTypeDef,
498
494
  unknown
499
495
  > = z.union([z.number(), z.string(), z.any()]);
500
496
 
501
497
  /** @internal */
502
- export type PreviewZDRInputAudioCache$Outbound = number | string | any;
498
+ export type InputAudioCache$Outbound = number | string | any;
503
499
 
504
500
  /** @internal */
505
- export const PreviewZDRInputAudioCache$outboundSchema: z.ZodType<
506
- PreviewZDRInputAudioCache$Outbound,
501
+ export const InputAudioCache$outboundSchema: z.ZodType<
502
+ InputAudioCache$Outbound,
507
503
  z.ZodTypeDef,
508
- PreviewZDRInputAudioCache
504
+ InputAudioCache
509
505
  > = z.union([z.number(), z.string(), z.any()]);
510
506
 
511
507
  /**
512
508
  * @internal
513
509
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
514
510
  */
515
- export namespace PreviewZDRInputAudioCache$ {
516
- /** @deprecated use `PreviewZDRInputAudioCache$inboundSchema` instead. */
517
- export const inboundSchema = PreviewZDRInputAudioCache$inboundSchema;
518
- /** @deprecated use `PreviewZDRInputAudioCache$outboundSchema` instead. */
519
- export const outboundSchema = PreviewZDRInputAudioCache$outboundSchema;
520
- /** @deprecated use `PreviewZDRInputAudioCache$Outbound` instead. */
521
- export type Outbound = PreviewZDRInputAudioCache$Outbound;
511
+ export namespace InputAudioCache$ {
512
+ /** @deprecated use `InputAudioCache$inboundSchema` instead. */
513
+ export const inboundSchema = InputAudioCache$inboundSchema;
514
+ /** @deprecated use `InputAudioCache$outboundSchema` instead. */
515
+ export const outboundSchema = InputAudioCache$outboundSchema;
516
+ /** @deprecated use `InputAudioCache$Outbound` instead. */
517
+ export type Outbound = InputAudioCache$Outbound;
522
518
  }
523
519
 
524
- export function previewZDRInputAudioCacheToJSON(
525
- previewZDRInputAudioCache: PreviewZDRInputAudioCache,
520
+ export function inputAudioCacheToJSON(
521
+ inputAudioCache: InputAudioCache,
526
522
  ): string {
527
- return JSON.stringify(
528
- PreviewZDRInputAudioCache$outboundSchema.parse(previewZDRInputAudioCache),
529
- );
523
+ return JSON.stringify(InputAudioCache$outboundSchema.parse(inputAudioCache));
530
524
  }
531
525
 
532
- export function previewZDRInputAudioCacheFromJSON(
526
+ export function inputAudioCacheFromJSON(
533
527
  jsonString: string,
534
- ): SafeParseResult<PreviewZDRInputAudioCache, SDKValidationError> {
528
+ ): SafeParseResult<InputAudioCache, SDKValidationError> {
535
529
  return safeParse(
536
530
  jsonString,
537
- (x) => PreviewZDRInputAudioCache$inboundSchema.parse(JSON.parse(x)),
538
- `Failed to parse 'PreviewZDRInputAudioCache' from JSON`,
531
+ (x) => InputAudioCache$inboundSchema.parse(JSON.parse(x)),
532
+ `Failed to parse 'InputAudioCache' from JSON`,
539
533
  );
540
534
  }
541
535
 
542
536
  /** @internal */
543
- export const PreviewZDRWebSearch$inboundSchema: z.ZodType<
544
- PreviewZDRWebSearch,
537
+ export const WebSearch$inboundSchema: z.ZodType<
538
+ WebSearch,
545
539
  z.ZodTypeDef,
546
540
  unknown
547
541
  > = z.union([z.number(), z.string(), z.any()]);
548
542
 
549
543
  /** @internal */
550
- export type PreviewZDRWebSearch$Outbound = number | string | any;
544
+ export type WebSearch$Outbound = number | string | any;
551
545
 
552
546
  /** @internal */
553
- export const PreviewZDRWebSearch$outboundSchema: z.ZodType<
554
- PreviewZDRWebSearch$Outbound,
547
+ export const WebSearch$outboundSchema: z.ZodType<
548
+ WebSearch$Outbound,
555
549
  z.ZodTypeDef,
556
- PreviewZDRWebSearch
550
+ WebSearch
557
551
  > = z.union([z.number(), z.string(), z.any()]);
558
552
 
559
553
  /**
560
554
  * @internal
561
555
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
562
556
  */
563
- export namespace PreviewZDRWebSearch$ {
564
- /** @deprecated use `PreviewZDRWebSearch$inboundSchema` instead. */
565
- export const inboundSchema = PreviewZDRWebSearch$inboundSchema;
566
- /** @deprecated use `PreviewZDRWebSearch$outboundSchema` instead. */
567
- export const outboundSchema = PreviewZDRWebSearch$outboundSchema;
568
- /** @deprecated use `PreviewZDRWebSearch$Outbound` instead. */
569
- export type Outbound = PreviewZDRWebSearch$Outbound;
557
+ export namespace WebSearch$ {
558
+ /** @deprecated use `WebSearch$inboundSchema` instead. */
559
+ export const inboundSchema = WebSearch$inboundSchema;
560
+ /** @deprecated use `WebSearch$outboundSchema` instead. */
561
+ export const outboundSchema = WebSearch$outboundSchema;
562
+ /** @deprecated use `WebSearch$Outbound` instead. */
563
+ export type Outbound = WebSearch$Outbound;
570
564
  }
571
565
 
572
- export function previewZDRWebSearchToJSON(
573
- previewZDRWebSearch: PreviewZDRWebSearch,
574
- ): string {
575
- return JSON.stringify(
576
- PreviewZDRWebSearch$outboundSchema.parse(previewZDRWebSearch),
577
- );
566
+ export function webSearchToJSON(webSearch: WebSearch): string {
567
+ return JSON.stringify(WebSearch$outboundSchema.parse(webSearch));
578
568
  }
579
569
 
580
- export function previewZDRWebSearchFromJSON(
570
+ export function webSearchFromJSON(
581
571
  jsonString: string,
582
- ): SafeParseResult<PreviewZDRWebSearch, SDKValidationError> {
572
+ ): SafeParseResult<WebSearch, SDKValidationError> {
583
573
  return safeParse(
584
574
  jsonString,
585
- (x) => PreviewZDRWebSearch$inboundSchema.parse(JSON.parse(x)),
586
- `Failed to parse 'PreviewZDRWebSearch' from JSON`,
575
+ (x) => WebSearch$inboundSchema.parse(JSON.parse(x)),
576
+ `Failed to parse 'WebSearch' from JSON`,
587
577
  );
588
578
  }
589
579
 
590
580
  /** @internal */
591
- export const PreviewZDRInternalReasoning$inboundSchema: z.ZodType<
592
- PreviewZDRInternalReasoning,
581
+ export const InternalReasoning$inboundSchema: z.ZodType<
582
+ InternalReasoning,
593
583
  z.ZodTypeDef,
594
584
  unknown
595
585
  > = z.union([z.number(), z.string(), z.any()]);
596
586
 
597
587
  /** @internal */
598
- export type PreviewZDRInternalReasoning$Outbound = number | string | any;
588
+ export type InternalReasoning$Outbound = number | string | any;
599
589
 
600
590
  /** @internal */
601
- export const PreviewZDRInternalReasoning$outboundSchema: z.ZodType<
602
- PreviewZDRInternalReasoning$Outbound,
591
+ export const InternalReasoning$outboundSchema: z.ZodType<
592
+ InternalReasoning$Outbound,
603
593
  z.ZodTypeDef,
604
- PreviewZDRInternalReasoning
594
+ InternalReasoning
605
595
  > = z.union([z.number(), z.string(), z.any()]);
606
596
 
607
597
  /**
608
598
  * @internal
609
599
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
610
600
  */
611
- export namespace PreviewZDRInternalReasoning$ {
612
- /** @deprecated use `PreviewZDRInternalReasoning$inboundSchema` instead. */
613
- export const inboundSchema = PreviewZDRInternalReasoning$inboundSchema;
614
- /** @deprecated use `PreviewZDRInternalReasoning$outboundSchema` instead. */
615
- export const outboundSchema = PreviewZDRInternalReasoning$outboundSchema;
616
- /** @deprecated use `PreviewZDRInternalReasoning$Outbound` instead. */
617
- export type Outbound = PreviewZDRInternalReasoning$Outbound;
601
+ export namespace InternalReasoning$ {
602
+ /** @deprecated use `InternalReasoning$inboundSchema` instead. */
603
+ export const inboundSchema = InternalReasoning$inboundSchema;
604
+ /** @deprecated use `InternalReasoning$outboundSchema` instead. */
605
+ export const outboundSchema = InternalReasoning$outboundSchema;
606
+ /** @deprecated use `InternalReasoning$Outbound` instead. */
607
+ export type Outbound = InternalReasoning$Outbound;
618
608
  }
619
609
 
620
- export function previewZDRInternalReasoningToJSON(
621
- previewZDRInternalReasoning: PreviewZDRInternalReasoning,
610
+ export function internalReasoningToJSON(
611
+ internalReasoning: InternalReasoning,
622
612
  ): string {
623
613
  return JSON.stringify(
624
- PreviewZDRInternalReasoning$outboundSchema.parse(
625
- previewZDRInternalReasoning,
626
- ),
614
+ InternalReasoning$outboundSchema.parse(internalReasoning),
627
615
  );
628
616
  }
629
617
 
630
- export function previewZDRInternalReasoningFromJSON(
618
+ export function internalReasoningFromJSON(
631
619
  jsonString: string,
632
- ): SafeParseResult<PreviewZDRInternalReasoning, SDKValidationError> {
620
+ ): SafeParseResult<InternalReasoning, SDKValidationError> {
633
621
  return safeParse(
634
622
  jsonString,
635
- (x) => PreviewZDRInternalReasoning$inboundSchema.parse(JSON.parse(x)),
636
- `Failed to parse 'PreviewZDRInternalReasoning' from JSON`,
623
+ (x) => InternalReasoning$inboundSchema.parse(JSON.parse(x)),
624
+ `Failed to parse 'InternalReasoning' from JSON`,
637
625
  );
638
626
  }
639
627
 
640
628
  /** @internal */
641
- export const PreviewZDRInputCacheRead$inboundSchema: z.ZodType<
642
- PreviewZDRInputCacheRead,
629
+ export const InputCacheRead$inboundSchema: z.ZodType<
630
+ InputCacheRead,
643
631
  z.ZodTypeDef,
644
632
  unknown
645
633
  > = z.union([z.number(), z.string(), z.any()]);
646
634
 
647
635
  /** @internal */
648
- export type PreviewZDRInputCacheRead$Outbound = number | string | any;
636
+ export type InputCacheRead$Outbound = number | string | any;
649
637
 
650
638
  /** @internal */
651
- export const PreviewZDRInputCacheRead$outboundSchema: z.ZodType<
652
- PreviewZDRInputCacheRead$Outbound,
639
+ export const InputCacheRead$outboundSchema: z.ZodType<
640
+ InputCacheRead$Outbound,
653
641
  z.ZodTypeDef,
654
- PreviewZDRInputCacheRead
642
+ InputCacheRead
655
643
  > = z.union([z.number(), z.string(), z.any()]);
656
644
 
657
645
  /**
658
646
  * @internal
659
647
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
660
648
  */
661
- export namespace PreviewZDRInputCacheRead$ {
662
- /** @deprecated use `PreviewZDRInputCacheRead$inboundSchema` instead. */
663
- export const inboundSchema = PreviewZDRInputCacheRead$inboundSchema;
664
- /** @deprecated use `PreviewZDRInputCacheRead$outboundSchema` instead. */
665
- export const outboundSchema = PreviewZDRInputCacheRead$outboundSchema;
666
- /** @deprecated use `PreviewZDRInputCacheRead$Outbound` instead. */
667
- export type Outbound = PreviewZDRInputCacheRead$Outbound;
649
+ export namespace InputCacheRead$ {
650
+ /** @deprecated use `InputCacheRead$inboundSchema` instead. */
651
+ export const inboundSchema = InputCacheRead$inboundSchema;
652
+ /** @deprecated use `InputCacheRead$outboundSchema` instead. */
653
+ export const outboundSchema = InputCacheRead$outboundSchema;
654
+ /** @deprecated use `InputCacheRead$Outbound` instead. */
655
+ export type Outbound = InputCacheRead$Outbound;
668
656
  }
669
657
 
670
- export function previewZDRInputCacheReadToJSON(
671
- previewZDRInputCacheRead: PreviewZDRInputCacheRead,
672
- ): string {
673
- return JSON.stringify(
674
- PreviewZDRInputCacheRead$outboundSchema.parse(previewZDRInputCacheRead),
675
- );
658
+ export function inputCacheReadToJSON(inputCacheRead: InputCacheRead): string {
659
+ return JSON.stringify(InputCacheRead$outboundSchema.parse(inputCacheRead));
676
660
  }
677
661
 
678
- export function previewZDRInputCacheReadFromJSON(
662
+ export function inputCacheReadFromJSON(
679
663
  jsonString: string,
680
- ): SafeParseResult<PreviewZDRInputCacheRead, SDKValidationError> {
664
+ ): SafeParseResult<InputCacheRead, SDKValidationError> {
681
665
  return safeParse(
682
666
  jsonString,
683
- (x) => PreviewZDRInputCacheRead$inboundSchema.parse(JSON.parse(x)),
684
- `Failed to parse 'PreviewZDRInputCacheRead' from JSON`,
667
+ (x) => InputCacheRead$inboundSchema.parse(JSON.parse(x)),
668
+ `Failed to parse 'InputCacheRead' from JSON`,
685
669
  );
686
670
  }
687
671
 
688
672
  /** @internal */
689
- export const PreviewZDRInputCacheWrite$inboundSchema: z.ZodType<
690
- PreviewZDRInputCacheWrite,
673
+ export const InputCacheWrite$inboundSchema: z.ZodType<
674
+ InputCacheWrite,
691
675
  z.ZodTypeDef,
692
676
  unknown
693
677
  > = z.union([z.number(), z.string(), z.any()]);
694
678
 
695
679
  /** @internal */
696
- export type PreviewZDRInputCacheWrite$Outbound = number | string | any;
680
+ export type InputCacheWrite$Outbound = number | string | any;
697
681
 
698
682
  /** @internal */
699
- export const PreviewZDRInputCacheWrite$outboundSchema: z.ZodType<
700
- PreviewZDRInputCacheWrite$Outbound,
683
+ export const InputCacheWrite$outboundSchema: z.ZodType<
684
+ InputCacheWrite$Outbound,
701
685
  z.ZodTypeDef,
702
- PreviewZDRInputCacheWrite
686
+ InputCacheWrite
703
687
  > = z.union([z.number(), z.string(), z.any()]);
704
688
 
705
689
  /**
706
690
  * @internal
707
691
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
708
692
  */
709
- export namespace PreviewZDRInputCacheWrite$ {
710
- /** @deprecated use `PreviewZDRInputCacheWrite$inboundSchema` instead. */
711
- export const inboundSchema = PreviewZDRInputCacheWrite$inboundSchema;
712
- /** @deprecated use `PreviewZDRInputCacheWrite$outboundSchema` instead. */
713
- export const outboundSchema = PreviewZDRInputCacheWrite$outboundSchema;
714
- /** @deprecated use `PreviewZDRInputCacheWrite$Outbound` instead. */
715
- export type Outbound = PreviewZDRInputCacheWrite$Outbound;
693
+ export namespace InputCacheWrite$ {
694
+ /** @deprecated use `InputCacheWrite$inboundSchema` instead. */
695
+ export const inboundSchema = InputCacheWrite$inboundSchema;
696
+ /** @deprecated use `InputCacheWrite$outboundSchema` instead. */
697
+ export const outboundSchema = InputCacheWrite$outboundSchema;
698
+ /** @deprecated use `InputCacheWrite$Outbound` instead. */
699
+ export type Outbound = InputCacheWrite$Outbound;
716
700
  }
717
701
 
718
- export function previewZDRInputCacheWriteToJSON(
719
- previewZDRInputCacheWrite: PreviewZDRInputCacheWrite,
702
+ export function inputCacheWriteToJSON(
703
+ inputCacheWrite: InputCacheWrite,
720
704
  ): string {
721
- return JSON.stringify(
722
- PreviewZDRInputCacheWrite$outboundSchema.parse(previewZDRInputCacheWrite),
723
- );
705
+ return JSON.stringify(InputCacheWrite$outboundSchema.parse(inputCacheWrite));
724
706
  }
725
707
 
726
- export function previewZDRInputCacheWriteFromJSON(
708
+ export function inputCacheWriteFromJSON(
727
709
  jsonString: string,
728
- ): SafeParseResult<PreviewZDRInputCacheWrite, SDKValidationError> {
710
+ ): SafeParseResult<InputCacheWrite, SDKValidationError> {
729
711
  return safeParse(
730
712
  jsonString,
731
- (x) => PreviewZDRInputCacheWrite$inboundSchema.parse(JSON.parse(x)),
732
- `Failed to parse 'PreviewZDRInputCacheWrite' from JSON`,
713
+ (x) => InputCacheWrite$inboundSchema.parse(JSON.parse(x)),
714
+ `Failed to parse 'InputCacheWrite' from JSON`,
733
715
  );
734
716
  }
735
717
 
736
718
  /** @internal */
737
- export const PreviewZDRPricing$inboundSchema: z.ZodType<
738
- PreviewZDRPricing,
739
- z.ZodTypeDef,
740
- unknown
741
- > = z.object({
742
- prompt: z.union([z.number(), z.string(), z.any()]).optional(),
743
- completion: z.union([z.number(), z.string(), z.any()]).optional(),
744
- request: z.union([z.number(), z.string(), z.any()]).optional(),
745
- image: z.union([z.number(), z.string(), z.any()]).optional(),
746
- image_output: z.union([z.number(), z.string(), z.any()]).optional(),
747
- audio: z.union([z.number(), z.string(), z.any()]).optional(),
748
- input_audio_cache: z.union([z.number(), z.string(), z.any()]).optional(),
749
- web_search: z.union([z.number(), z.string(), z.any()]).optional(),
750
- internal_reasoning: z.union([z.number(), z.string(), z.any()]).optional(),
751
- input_cache_read: z.union([z.number(), z.string(), z.any()]).optional(),
752
- input_cache_write: z.union([z.number(), z.string(), z.any()]).optional(),
753
- discount: z.number().optional(),
754
- }).transform((v) => {
755
- return remap$(v, {
756
- "image_output": "imageOutput",
757
- "input_audio_cache": "inputAudioCache",
758
- "web_search": "webSearch",
759
- "internal_reasoning": "internalReasoning",
760
- "input_cache_read": "inputCacheRead",
761
- "input_cache_write": "inputCacheWrite",
719
+ export const Pricing$inboundSchema: z.ZodType<Pricing, z.ZodTypeDef, unknown> =
720
+ z.object({
721
+ prompt: z.union([z.number(), z.string(), z.any()]).optional(),
722
+ completion: z.union([z.number(), z.string(), z.any()]).optional(),
723
+ request: z.union([z.number(), z.string(), z.any()]).optional(),
724
+ image: z.union([z.number(), z.string(), z.any()]).optional(),
725
+ image_output: z.union([z.number(), z.string(), z.any()]).optional(),
726
+ audio: z.union([z.number(), z.string(), z.any()]).optional(),
727
+ input_audio_cache: z.union([z.number(), z.string(), z.any()]).optional(),
728
+ web_search: z.union([z.number(), z.string(), z.any()]).optional(),
729
+ internal_reasoning: z.union([z.number(), z.string(), z.any()]).optional(),
730
+ input_cache_read: z.union([z.number(), z.string(), z.any()]).optional(),
731
+ input_cache_write: z.union([z.number(), z.string(), z.any()]).optional(),
732
+ discount: z.number().optional(),
733
+ }).transform((v) => {
734
+ return remap$(v, {
735
+ "image_output": "imageOutput",
736
+ "input_audio_cache": "inputAudioCache",
737
+ "web_search": "webSearch",
738
+ "internal_reasoning": "internalReasoning",
739
+ "input_cache_read": "inputCacheRead",
740
+ "input_cache_write": "inputCacheWrite",
741
+ });
762
742
  });
763
- });
764
743
 
765
744
  /** @internal */
766
- export type PreviewZDRPricing$Outbound = {
745
+ export type Pricing$Outbound = {
767
746
  prompt?: number | string | any | undefined;
768
747
  completion?: number | string | any | undefined;
769
748
  request?: number | string | any | undefined;
@@ -779,10 +758,10 @@ export type PreviewZDRPricing$Outbound = {
779
758
  };
780
759
 
781
760
  /** @internal */
782
- export const PreviewZDRPricing$outboundSchema: z.ZodType<
783
- PreviewZDRPricing$Outbound,
761
+ export const Pricing$outboundSchema: z.ZodType<
762
+ Pricing$Outbound,
784
763
  z.ZodTypeDef,
785
- PreviewZDRPricing
764
+ Pricing
786
765
  > = z.object({
787
766
  prompt: z.union([z.number(), z.string(), z.any()]).optional(),
788
767
  completion: z.union([z.number(), z.string(), z.any()]).optional(),
@@ -811,52 +790,46 @@ export const PreviewZDRPricing$outboundSchema: z.ZodType<
811
790
  * @internal
812
791
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
813
792
  */
814
- export namespace PreviewZDRPricing$ {
815
- /** @deprecated use `PreviewZDRPricing$inboundSchema` instead. */
816
- export const inboundSchema = PreviewZDRPricing$inboundSchema;
817
- /** @deprecated use `PreviewZDRPricing$outboundSchema` instead. */
818
- export const outboundSchema = PreviewZDRPricing$outboundSchema;
819
- /** @deprecated use `PreviewZDRPricing$Outbound` instead. */
820
- export type Outbound = PreviewZDRPricing$Outbound;
793
+ export namespace Pricing$ {
794
+ /** @deprecated use `Pricing$inboundSchema` instead. */
795
+ export const inboundSchema = Pricing$inboundSchema;
796
+ /** @deprecated use `Pricing$outboundSchema` instead. */
797
+ export const outboundSchema = Pricing$outboundSchema;
798
+ /** @deprecated use `Pricing$Outbound` instead. */
799
+ export type Outbound = Pricing$Outbound;
821
800
  }
822
801
 
823
- export function previewZDRPricingToJSON(
824
- previewZDRPricing: PreviewZDRPricing,
825
- ): string {
826
- return JSON.stringify(
827
- PreviewZDRPricing$outboundSchema.parse(previewZDRPricing),
828
- );
802
+ export function pricingToJSON(pricing: Pricing): string {
803
+ return JSON.stringify(Pricing$outboundSchema.parse(pricing));
829
804
  }
830
805
 
831
- export function previewZDRPricingFromJSON(
806
+ export function pricingFromJSON(
832
807
  jsonString: string,
833
- ): SafeParseResult<PreviewZDRPricing, SDKValidationError> {
808
+ ): SafeParseResult<Pricing, SDKValidationError> {
834
809
  return safeParse(
835
810
  jsonString,
836
- (x) => PreviewZDRPricing$inboundSchema.parse(JSON.parse(x)),
837
- `Failed to parse 'PreviewZDRPricing' from JSON`,
811
+ (x) => Pricing$inboundSchema.parse(JSON.parse(x)),
812
+ `Failed to parse 'Pricing' from JSON`,
838
813
  );
839
814
  }
840
815
 
841
816
  /** @internal */
842
- export const PreviewZDRProviderName$inboundSchema: z.ZodNativeEnum<
843
- typeof PreviewZDRProviderName
844
- > = z.nativeEnum(PreviewZDRProviderName);
817
+ export const ProviderName$inboundSchema: z.ZodNativeEnum<typeof ProviderName> =
818
+ z.nativeEnum(ProviderName);
845
819
 
846
820
  /** @internal */
847
- export const PreviewZDRProviderName$outboundSchema: z.ZodNativeEnum<
848
- typeof PreviewZDRProviderName
849
- > = PreviewZDRProviderName$inboundSchema;
821
+ export const ProviderName$outboundSchema: z.ZodNativeEnum<typeof ProviderName> =
822
+ ProviderName$inboundSchema;
850
823
 
851
824
  /**
852
825
  * @internal
853
826
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
854
827
  */
855
- export namespace PreviewZDRProviderName$ {
856
- /** @deprecated use `PreviewZDRProviderName$inboundSchema` instead. */
857
- export const inboundSchema = PreviewZDRProviderName$inboundSchema;
858
- /** @deprecated use `PreviewZDRProviderName$outboundSchema` instead. */
859
- export const outboundSchema = PreviewZDRProviderName$outboundSchema;
828
+ export namespace ProviderName$ {
829
+ /** @deprecated use `ProviderName$inboundSchema` instead. */
830
+ export const inboundSchema = ProviderName$inboundSchema;
831
+ /** @deprecated use `ProviderName$outboundSchema` instead. */
832
+ export const outboundSchema = ProviderName$outboundSchema;
860
833
  }
861
834
 
862
835
  /** @internal */
@@ -902,24 +875,22 @@ export namespace PreviewZDRSupportedParameter$ {
902
875
  }
903
876
 
904
877
  /** @internal */
905
- export const PreviewZDRStatus$inboundSchema: z.ZodNativeEnum<
906
- typeof PreviewZDRStatus
907
- > = z.nativeEnum(PreviewZDRStatus);
878
+ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
879
+ .nativeEnum(Status);
908
880
 
909
881
  /** @internal */
910
- export const PreviewZDRStatus$outboundSchema: z.ZodNativeEnum<
911
- typeof PreviewZDRStatus
912
- > = PreviewZDRStatus$inboundSchema;
882
+ export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
883
+ Status$inboundSchema;
913
884
 
914
885
  /**
915
886
  * @internal
916
887
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
917
888
  */
918
- export namespace PreviewZDRStatus$ {
919
- /** @deprecated use `PreviewZDRStatus$inboundSchema` instead. */
920
- export const inboundSchema = PreviewZDRStatus$inboundSchema;
921
- /** @deprecated use `PreviewZDRStatus$outboundSchema` instead. */
922
- export const outboundSchema = PreviewZDRStatus$outboundSchema;
889
+ export namespace Status$ {
890
+ /** @deprecated use `Status$inboundSchema` instead. */
891
+ export const inboundSchema = Status$inboundSchema;
892
+ /** @deprecated use `Status$outboundSchema` instead. */
893
+ export const outboundSchema = Status$outboundSchema;
923
894
  }
924
895
 
925
896
  /** @internal */
@@ -931,14 +902,14 @@ export const PreviewZDRData$inboundSchema: z.ZodType<
931
902
  name: z.string(),
932
903
  model_name: z.string(),
933
904
  context_length: z.number(),
934
- pricing: z.lazy(() => PreviewZDRPricing$inboundSchema),
935
- provider_name: PreviewZDRProviderName$inboundSchema,
905
+ pricing: z.lazy(() => Pricing$inboundSchema),
906
+ provider_name: ProviderName$inboundSchema,
936
907
  tag: z.string(),
937
908
  quantization: z.nullable(PreviewZDRQuantization$inboundSchema),
938
909
  max_completion_tokens: z.nullable(z.number()),
939
910
  max_prompt_tokens: z.nullable(z.number()),
940
911
  supported_parameters: z.array(PreviewZDRSupportedParameter$inboundSchema),
941
- status: PreviewZDRStatus$inboundSchema.optional(),
912
+ status: Status$inboundSchema.optional(),
942
913
  uptime_last_30m: z.nullable(z.number()),
943
914
  supports_implicit_caching: z.boolean(),
944
915
  }).transform((v) => {
@@ -959,7 +930,7 @@ export type PreviewZDRData$Outbound = {
959
930
  name: string;
960
931
  model_name: string;
961
932
  context_length: number;
962
- pricing: PreviewZDRPricing$Outbound;
933
+ pricing: Pricing$Outbound;
963
934
  provider_name: string;
964
935
  tag: string;
965
936
  quantization: string | null;
@@ -980,14 +951,14 @@ export const PreviewZDRData$outboundSchema: z.ZodType<
980
951
  name: z.string(),
981
952
  modelName: z.string(),
982
953
  contextLength: z.number(),
983
- pricing: z.lazy(() => PreviewZDRPricing$outboundSchema),
984
- providerName: PreviewZDRProviderName$outboundSchema,
954
+ pricing: z.lazy(() => Pricing$outboundSchema),
955
+ providerName: ProviderName$outboundSchema,
985
956
  tag: z.string(),
986
957
  quantization: z.nullable(PreviewZDRQuantization$outboundSchema),
987
958
  maxCompletionTokens: z.nullable(z.number()),
988
959
  maxPromptTokens: z.nullable(z.number()),
989
960
  supportedParameters: z.array(PreviewZDRSupportedParameter$outboundSchema),
990
- status: PreviewZDRStatus$outboundSchema.optional(),
961
+ status: Status$outboundSchema.optional(),
991
962
  uptimeLast30m: z.nullable(z.number()),
992
963
  supportsImplicitCaching: z.boolean(),
993
964
  }).transform((v) => {