@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
@@ -353,7 +353,7 @@ export type IgnoreEnum = ClosedEnum<typeof IgnoreEnum>;
353
353
 
354
354
  export type Ignore = IgnoreEnum | string;
355
355
 
356
- export const Quantization = {
356
+ export const OpenAIResponsesRequestQuantization = {
357
357
  Int4: "int4",
358
358
  Int8: "int8",
359
359
  Fp4: "fp4",
@@ -364,7 +364,9 @@ export const Quantization = {
364
364
  Fp32: "fp32",
365
365
  Unknown: "unknown",
366
366
  } as const;
367
- export type Quantization = ClosedEnum<typeof Quantization>;
367
+ export type OpenAIResponsesRequestQuantization = ClosedEnum<
368
+ typeof OpenAIResponsesRequestQuantization
369
+ >;
368
370
 
369
371
  /**
370
372
  * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
@@ -381,13 +383,13 @@ export type Sort = ClosedEnum<typeof Sort>;
381
383
 
382
384
  export type OpenAIResponsesRequestPrompt = number | string | any;
383
385
 
384
- export type Completion = number | string | any;
386
+ export type OpenAIResponsesRequestCompletion = number | string | any;
385
387
 
386
- export type Image = number | string | any;
388
+ export type OpenAIResponsesRequestImage = number | string | any;
387
389
 
388
- export type Audio = number | string | any;
390
+ export type OpenAIResponsesRequestAudio = number | string | any;
389
391
 
390
- export type RequestT = number | string | any;
392
+ export type OpenAIResponsesRequestRequest = number | string | any;
391
393
 
392
394
  /**
393
395
  * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
@@ -445,7 +447,7 @@ export type Provider = {
445
447
  /**
446
448
  * A list of quantization levels to filter the provider by.
447
449
  */
448
- quantizations?: Array<Quantization> | null | undefined;
450
+ quantizations?: Array<OpenAIResponsesRequestQuantization> | null | undefined;
449
451
  /**
450
452
  * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
451
453
  */
@@ -827,22 +829,25 @@ export function ignoreFromJSON(
827
829
  }
828
830
 
829
831
  /** @internal */
830
- export const Quantization$inboundSchema: z.ZodNativeEnum<typeof Quantization> =
831
- z.nativeEnum(Quantization);
832
+ export const OpenAIResponsesRequestQuantization$inboundSchema: z.ZodNativeEnum<
833
+ typeof OpenAIResponsesRequestQuantization
834
+ > = z.nativeEnum(OpenAIResponsesRequestQuantization);
832
835
 
833
836
  /** @internal */
834
- export const Quantization$outboundSchema: z.ZodNativeEnum<typeof Quantization> =
835
- Quantization$inboundSchema;
837
+ export const OpenAIResponsesRequestQuantization$outboundSchema: z.ZodNativeEnum<
838
+ typeof OpenAIResponsesRequestQuantization
839
+ > = OpenAIResponsesRequestQuantization$inboundSchema;
836
840
 
837
841
  /**
838
842
  * @internal
839
843
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
840
844
  */
841
- export namespace Quantization$ {
842
- /** @deprecated use `Quantization$inboundSchema` instead. */
843
- export const inboundSchema = Quantization$inboundSchema;
844
- /** @deprecated use `Quantization$outboundSchema` instead. */
845
- export const outboundSchema = Quantization$outboundSchema;
845
+ export namespace OpenAIResponsesRequestQuantization$ {
846
+ /** @deprecated use `OpenAIResponsesRequestQuantization$inboundSchema` instead. */
847
+ export const inboundSchema = OpenAIResponsesRequestQuantization$inboundSchema;
848
+ /** @deprecated use `OpenAIResponsesRequestQuantization$outboundSchema` instead. */
849
+ export const outboundSchema =
850
+ OpenAIResponsesRequestQuantization$outboundSchema;
846
851
  }
847
852
 
848
853
  /** @internal */
@@ -916,172 +921,202 @@ export function openAIResponsesRequestPromptFromJSON(
916
921
  }
917
922
 
918
923
  /** @internal */
919
- export const Completion$inboundSchema: z.ZodType<
920
- Completion,
924
+ export const OpenAIResponsesRequestCompletion$inboundSchema: z.ZodType<
925
+ OpenAIResponsesRequestCompletion,
921
926
  z.ZodTypeDef,
922
927
  unknown
923
928
  > = z.union([z.number(), z.string(), z.any()]);
924
929
 
925
930
  /** @internal */
926
- export type Completion$Outbound = number | string | any;
931
+ export type OpenAIResponsesRequestCompletion$Outbound = number | string | any;
927
932
 
928
933
  /** @internal */
929
- export const Completion$outboundSchema: z.ZodType<
930
- Completion$Outbound,
934
+ export const OpenAIResponsesRequestCompletion$outboundSchema: z.ZodType<
935
+ OpenAIResponsesRequestCompletion$Outbound,
931
936
  z.ZodTypeDef,
932
- Completion
937
+ OpenAIResponsesRequestCompletion
933
938
  > = z.union([z.number(), z.string(), z.any()]);
934
939
 
935
940
  /**
936
941
  * @internal
937
942
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
938
943
  */
939
- export namespace Completion$ {
940
- /** @deprecated use `Completion$inboundSchema` instead. */
941
- export const inboundSchema = Completion$inboundSchema;
942
- /** @deprecated use `Completion$outboundSchema` instead. */
943
- export const outboundSchema = Completion$outboundSchema;
944
- /** @deprecated use `Completion$Outbound` instead. */
945
- export type Outbound = Completion$Outbound;
944
+ export namespace OpenAIResponsesRequestCompletion$ {
945
+ /** @deprecated use `OpenAIResponsesRequestCompletion$inboundSchema` instead. */
946
+ export const inboundSchema = OpenAIResponsesRequestCompletion$inboundSchema;
947
+ /** @deprecated use `OpenAIResponsesRequestCompletion$outboundSchema` instead. */
948
+ export const outboundSchema = OpenAIResponsesRequestCompletion$outboundSchema;
949
+ /** @deprecated use `OpenAIResponsesRequestCompletion$Outbound` instead. */
950
+ export type Outbound = OpenAIResponsesRequestCompletion$Outbound;
946
951
  }
947
952
 
948
- export function completionToJSON(completion: Completion): string {
949
- return JSON.stringify(Completion$outboundSchema.parse(completion));
953
+ export function openAIResponsesRequestCompletionToJSON(
954
+ openAIResponsesRequestCompletion: OpenAIResponsesRequestCompletion,
955
+ ): string {
956
+ return JSON.stringify(
957
+ OpenAIResponsesRequestCompletion$outboundSchema.parse(
958
+ openAIResponsesRequestCompletion,
959
+ ),
960
+ );
950
961
  }
951
962
 
952
- export function completionFromJSON(
963
+ export function openAIResponsesRequestCompletionFromJSON(
953
964
  jsonString: string,
954
- ): SafeParseResult<Completion, SDKValidationError> {
965
+ ): SafeParseResult<OpenAIResponsesRequestCompletion, SDKValidationError> {
955
966
  return safeParse(
956
967
  jsonString,
957
- (x) => Completion$inboundSchema.parse(JSON.parse(x)),
958
- `Failed to parse 'Completion' from JSON`,
968
+ (x) => OpenAIResponsesRequestCompletion$inboundSchema.parse(JSON.parse(x)),
969
+ `Failed to parse 'OpenAIResponsesRequestCompletion' from JSON`,
959
970
  );
960
971
  }
961
972
 
962
973
  /** @internal */
963
- export const Image$inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown> = z
964
- .union([z.number(), z.string(), z.any()]);
974
+ export const OpenAIResponsesRequestImage$inboundSchema: z.ZodType<
975
+ OpenAIResponsesRequestImage,
976
+ z.ZodTypeDef,
977
+ unknown
978
+ > = z.union([z.number(), z.string(), z.any()]);
965
979
 
966
980
  /** @internal */
967
- export type Image$Outbound = number | string | any;
981
+ export type OpenAIResponsesRequestImage$Outbound = number | string | any;
968
982
 
969
983
  /** @internal */
970
- export const Image$outboundSchema: z.ZodType<
971
- Image$Outbound,
984
+ export const OpenAIResponsesRequestImage$outboundSchema: z.ZodType<
985
+ OpenAIResponsesRequestImage$Outbound,
972
986
  z.ZodTypeDef,
973
- Image
987
+ OpenAIResponsesRequestImage
974
988
  > = z.union([z.number(), z.string(), z.any()]);
975
989
 
976
990
  /**
977
991
  * @internal
978
992
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
979
993
  */
980
- export namespace Image$ {
981
- /** @deprecated use `Image$inboundSchema` instead. */
982
- export const inboundSchema = Image$inboundSchema;
983
- /** @deprecated use `Image$outboundSchema` instead. */
984
- export const outboundSchema = Image$outboundSchema;
985
- /** @deprecated use `Image$Outbound` instead. */
986
- export type Outbound = Image$Outbound;
994
+ export namespace OpenAIResponsesRequestImage$ {
995
+ /** @deprecated use `OpenAIResponsesRequestImage$inboundSchema` instead. */
996
+ export const inboundSchema = OpenAIResponsesRequestImage$inboundSchema;
997
+ /** @deprecated use `OpenAIResponsesRequestImage$outboundSchema` instead. */
998
+ export const outboundSchema = OpenAIResponsesRequestImage$outboundSchema;
999
+ /** @deprecated use `OpenAIResponsesRequestImage$Outbound` instead. */
1000
+ export type Outbound = OpenAIResponsesRequestImage$Outbound;
987
1001
  }
988
1002
 
989
- export function imageToJSON(image: Image): string {
990
- return JSON.stringify(Image$outboundSchema.parse(image));
1003
+ export function openAIResponsesRequestImageToJSON(
1004
+ openAIResponsesRequestImage: OpenAIResponsesRequestImage,
1005
+ ): string {
1006
+ return JSON.stringify(
1007
+ OpenAIResponsesRequestImage$outboundSchema.parse(
1008
+ openAIResponsesRequestImage,
1009
+ ),
1010
+ );
991
1011
  }
992
1012
 
993
- export function imageFromJSON(
1013
+ export function openAIResponsesRequestImageFromJSON(
994
1014
  jsonString: string,
995
- ): SafeParseResult<Image, SDKValidationError> {
1015
+ ): SafeParseResult<OpenAIResponsesRequestImage, SDKValidationError> {
996
1016
  return safeParse(
997
1017
  jsonString,
998
- (x) => Image$inboundSchema.parse(JSON.parse(x)),
999
- `Failed to parse 'Image' from JSON`,
1018
+ (x) => OpenAIResponsesRequestImage$inboundSchema.parse(JSON.parse(x)),
1019
+ `Failed to parse 'OpenAIResponsesRequestImage' from JSON`,
1000
1020
  );
1001
1021
  }
1002
1022
 
1003
1023
  /** @internal */
1004
- export const Audio$inboundSchema: z.ZodType<Audio, z.ZodTypeDef, unknown> = z
1005
- .union([z.number(), z.string(), z.any()]);
1024
+ export const OpenAIResponsesRequestAudio$inboundSchema: z.ZodType<
1025
+ OpenAIResponsesRequestAudio,
1026
+ z.ZodTypeDef,
1027
+ unknown
1028
+ > = z.union([z.number(), z.string(), z.any()]);
1006
1029
 
1007
1030
  /** @internal */
1008
- export type Audio$Outbound = number | string | any;
1031
+ export type OpenAIResponsesRequestAudio$Outbound = number | string | any;
1009
1032
 
1010
1033
  /** @internal */
1011
- export const Audio$outboundSchema: z.ZodType<
1012
- Audio$Outbound,
1034
+ export const OpenAIResponsesRequestAudio$outboundSchema: z.ZodType<
1035
+ OpenAIResponsesRequestAudio$Outbound,
1013
1036
  z.ZodTypeDef,
1014
- Audio
1037
+ OpenAIResponsesRequestAudio
1015
1038
  > = z.union([z.number(), z.string(), z.any()]);
1016
1039
 
1017
1040
  /**
1018
1041
  * @internal
1019
1042
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1020
1043
  */
1021
- export namespace Audio$ {
1022
- /** @deprecated use `Audio$inboundSchema` instead. */
1023
- export const inboundSchema = Audio$inboundSchema;
1024
- /** @deprecated use `Audio$outboundSchema` instead. */
1025
- export const outboundSchema = Audio$outboundSchema;
1026
- /** @deprecated use `Audio$Outbound` instead. */
1027
- export type Outbound = Audio$Outbound;
1044
+ export namespace OpenAIResponsesRequestAudio$ {
1045
+ /** @deprecated use `OpenAIResponsesRequestAudio$inboundSchema` instead. */
1046
+ export const inboundSchema = OpenAIResponsesRequestAudio$inboundSchema;
1047
+ /** @deprecated use `OpenAIResponsesRequestAudio$outboundSchema` instead. */
1048
+ export const outboundSchema = OpenAIResponsesRequestAudio$outboundSchema;
1049
+ /** @deprecated use `OpenAIResponsesRequestAudio$Outbound` instead. */
1050
+ export type Outbound = OpenAIResponsesRequestAudio$Outbound;
1028
1051
  }
1029
1052
 
1030
- export function audioToJSON(audio: Audio): string {
1031
- return JSON.stringify(Audio$outboundSchema.parse(audio));
1053
+ export function openAIResponsesRequestAudioToJSON(
1054
+ openAIResponsesRequestAudio: OpenAIResponsesRequestAudio,
1055
+ ): string {
1056
+ return JSON.stringify(
1057
+ OpenAIResponsesRequestAudio$outboundSchema.parse(
1058
+ openAIResponsesRequestAudio,
1059
+ ),
1060
+ );
1032
1061
  }
1033
1062
 
1034
- export function audioFromJSON(
1063
+ export function openAIResponsesRequestAudioFromJSON(
1035
1064
  jsonString: string,
1036
- ): SafeParseResult<Audio, SDKValidationError> {
1065
+ ): SafeParseResult<OpenAIResponsesRequestAudio, SDKValidationError> {
1037
1066
  return safeParse(
1038
1067
  jsonString,
1039
- (x) => Audio$inboundSchema.parse(JSON.parse(x)),
1040
- `Failed to parse 'Audio' from JSON`,
1068
+ (x) => OpenAIResponsesRequestAudio$inboundSchema.parse(JSON.parse(x)),
1069
+ `Failed to parse 'OpenAIResponsesRequestAudio' from JSON`,
1041
1070
  );
1042
1071
  }
1043
1072
 
1044
1073
  /** @internal */
1045
- export const RequestT$inboundSchema: z.ZodType<
1046
- RequestT,
1074
+ export const OpenAIResponsesRequestRequest$inboundSchema: z.ZodType<
1075
+ OpenAIResponsesRequestRequest,
1047
1076
  z.ZodTypeDef,
1048
1077
  unknown
1049
1078
  > = z.union([z.number(), z.string(), z.any()]);
1050
1079
 
1051
1080
  /** @internal */
1052
- export type RequestT$Outbound = number | string | any;
1081
+ export type OpenAIResponsesRequestRequest$Outbound = number | string | any;
1053
1082
 
1054
1083
  /** @internal */
1055
- export const RequestT$outboundSchema: z.ZodType<
1056
- RequestT$Outbound,
1084
+ export const OpenAIResponsesRequestRequest$outboundSchema: z.ZodType<
1085
+ OpenAIResponsesRequestRequest$Outbound,
1057
1086
  z.ZodTypeDef,
1058
- RequestT
1087
+ OpenAIResponsesRequestRequest
1059
1088
  > = z.union([z.number(), z.string(), z.any()]);
1060
1089
 
1061
1090
  /**
1062
1091
  * @internal
1063
1092
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1064
1093
  */
1065
- export namespace RequestT$ {
1066
- /** @deprecated use `RequestT$inboundSchema` instead. */
1067
- export const inboundSchema = RequestT$inboundSchema;
1068
- /** @deprecated use `RequestT$outboundSchema` instead. */
1069
- export const outboundSchema = RequestT$outboundSchema;
1070
- /** @deprecated use `RequestT$Outbound` instead. */
1071
- export type Outbound = RequestT$Outbound;
1094
+ export namespace OpenAIResponsesRequestRequest$ {
1095
+ /** @deprecated use `OpenAIResponsesRequestRequest$inboundSchema` instead. */
1096
+ export const inboundSchema = OpenAIResponsesRequestRequest$inboundSchema;
1097
+ /** @deprecated use `OpenAIResponsesRequestRequest$outboundSchema` instead. */
1098
+ export const outboundSchema = OpenAIResponsesRequestRequest$outboundSchema;
1099
+ /** @deprecated use `OpenAIResponsesRequestRequest$Outbound` instead. */
1100
+ export type Outbound = OpenAIResponsesRequestRequest$Outbound;
1072
1101
  }
1073
1102
 
1074
- export function requestToJSON(requestT: RequestT): string {
1075
- return JSON.stringify(RequestT$outboundSchema.parse(requestT));
1103
+ export function openAIResponsesRequestRequestToJSON(
1104
+ openAIResponsesRequestRequest: OpenAIResponsesRequestRequest,
1105
+ ): string {
1106
+ return JSON.stringify(
1107
+ OpenAIResponsesRequestRequest$outboundSchema.parse(
1108
+ openAIResponsesRequestRequest,
1109
+ ),
1110
+ );
1076
1111
  }
1077
1112
 
1078
- export function requestFromJSON(
1113
+ export function openAIResponsesRequestRequestFromJSON(
1079
1114
  jsonString: string,
1080
- ): SafeParseResult<RequestT, SDKValidationError> {
1115
+ ): SafeParseResult<OpenAIResponsesRequestRequest, SDKValidationError> {
1081
1116
  return safeParse(
1082
1117
  jsonString,
1083
- (x) => RequestT$inboundSchema.parse(JSON.parse(x)),
1084
- `Failed to parse 'RequestT' from JSON`,
1118
+ (x) => OpenAIResponsesRequestRequest$inboundSchema.parse(JSON.parse(x)),
1119
+ `Failed to parse 'OpenAIResponsesRequestRequest' from JSON`,
1085
1120
  );
1086
1121
  }
1087
1122
 
@@ -1207,7 +1242,9 @@ export const Provider$inboundSchema: z.ZodType<
1207
1242
  .optional(),
1208
1243
  ignore: z.nullable(z.array(z.union([IgnoreEnum$inboundSchema, z.string()])))
1209
1244
  .optional(),
1210
- quantizations: z.nullable(z.array(Quantization$inboundSchema)).optional(),
1245
+ quantizations: z.nullable(
1246
+ z.array(OpenAIResponsesRequestQuantization$inboundSchema),
1247
+ ).optional(),
1211
1248
  sort: z.nullable(Sort$inboundSchema).optional(),
1212
1249
  max_price: z.lazy(() => MaxPrice$inboundSchema).optional(),
1213
1250
  experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(),
@@ -1251,7 +1288,9 @@ export const Provider$outboundSchema: z.ZodType<
1251
1288
  .optional(),
1252
1289
  ignore: z.nullable(z.array(z.union([IgnoreEnum$outboundSchema, z.string()])))
1253
1290
  .optional(),
1254
- quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(),
1291
+ quantizations: z.nullable(
1292
+ z.array(OpenAIResponsesRequestQuantization$outboundSchema),
1293
+ ).optional(),
1255
1294
  sort: z.nullable(Sort$outboundSchema).optional(),
1256
1295
  maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
1257
1296
  experimental: z.nullable(z.lazy(() => Experimental$outboundSchema))
@@ -3,66 +3,10 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
6
  import { safeParse } from "../../lib/schemas.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * Legacy rate limit information about a key. Will always return -1.
13
- *
14
- * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
15
- */
16
- export type RateLimit = {
17
- /**
18
- * Number of requests allowed per interval
19
- */
20
- requests: number;
21
- /**
22
- * Rate limit interval
23
- */
24
- interval: string;
25
- /**
26
- * Note about the rate limit
27
- */
28
- note: string;
29
- };
30
-
31
- /**
32
- * Current API key information
33
- */
34
- export type GetCurrentKeyData = {
35
- /**
36
- * Human-readable label for the API key
37
- */
38
- label: string;
39
- /**
40
- * Spending limit for the API key in USD
41
- */
42
- limit: number | null;
43
- /**
44
- * Current usage of the API key in USD
45
- */
46
- usage: number;
47
- /**
48
- * Whether this is a free tier API key
49
- */
50
- isFreeTier: boolean;
51
- /**
52
- * Whether this is a provisioning key
53
- */
54
- isProvisioningKey: boolean;
55
- /**
56
- * Remaining spending limit in USD
57
- */
58
- limitRemaining: number | null;
59
- /**
60
- * Legacy rate limit information about a key. Will always return -1.
61
- *
62
- * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
63
- */
64
- rateLimit: RateLimit;
65
- };
9
+ import * as models from "../index.js";
66
10
 
67
11
  /**
68
12
  * API key details
@@ -71,163 +15,21 @@ export type GetCurrentKeyResponse = {
71
15
  /**
72
16
  * Current API key information
73
17
  */
74
- data: GetCurrentKeyData;
75
- };
76
-
77
- /** @internal */
78
- export const RateLimit$inboundSchema: z.ZodType<
79
- RateLimit,
80
- z.ZodTypeDef,
81
- unknown
82
- > = z.object({
83
- requests: z.number(),
84
- interval: z.string(),
85
- note: z.string(),
86
- });
87
-
88
- /** @internal */
89
- export type RateLimit$Outbound = {
90
- requests: number;
91
- interval: string;
92
- note: string;
18
+ data: models.KeyInfo;
93
19
  };
94
20
 
95
- /** @internal */
96
- export const RateLimit$outboundSchema: z.ZodType<
97
- RateLimit$Outbound,
98
- z.ZodTypeDef,
99
- RateLimit
100
- > = z.object({
101
- requests: z.number(),
102
- interval: z.string(),
103
- note: z.string(),
104
- });
105
-
106
- /**
107
- * @internal
108
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
109
- */
110
- export namespace RateLimit$ {
111
- /** @deprecated use `RateLimit$inboundSchema` instead. */
112
- export const inboundSchema = RateLimit$inboundSchema;
113
- /** @deprecated use `RateLimit$outboundSchema` instead. */
114
- export const outboundSchema = RateLimit$outboundSchema;
115
- /** @deprecated use `RateLimit$Outbound` instead. */
116
- export type Outbound = RateLimit$Outbound;
117
- }
118
-
119
- export function rateLimitToJSON(rateLimit: RateLimit): string {
120
- return JSON.stringify(RateLimit$outboundSchema.parse(rateLimit));
121
- }
122
-
123
- export function rateLimitFromJSON(
124
- jsonString: string,
125
- ): SafeParseResult<RateLimit, SDKValidationError> {
126
- return safeParse(
127
- jsonString,
128
- (x) => RateLimit$inboundSchema.parse(JSON.parse(x)),
129
- `Failed to parse 'RateLimit' from JSON`,
130
- );
131
- }
132
-
133
- /** @internal */
134
- export const GetCurrentKeyData$inboundSchema: z.ZodType<
135
- GetCurrentKeyData,
136
- z.ZodTypeDef,
137
- unknown
138
- > = z.object({
139
- label: z.string(),
140
- limit: z.nullable(z.number()),
141
- usage: z.number(),
142
- is_free_tier: z.boolean(),
143
- is_provisioning_key: z.boolean(),
144
- limit_remaining: z.nullable(z.number()),
145
- rate_limit: z.lazy(() => RateLimit$inboundSchema),
146
- }).transform((v) => {
147
- return remap$(v, {
148
- "is_free_tier": "isFreeTier",
149
- "is_provisioning_key": "isProvisioningKey",
150
- "limit_remaining": "limitRemaining",
151
- "rate_limit": "rateLimit",
152
- });
153
- });
154
-
155
- /** @internal */
156
- export type GetCurrentKeyData$Outbound = {
157
- label: string;
158
- limit: number | null;
159
- usage: number;
160
- is_free_tier: boolean;
161
- is_provisioning_key: boolean;
162
- limit_remaining: number | null;
163
- rate_limit: RateLimit$Outbound;
164
- };
165
-
166
- /** @internal */
167
- export const GetCurrentKeyData$outboundSchema: z.ZodType<
168
- GetCurrentKeyData$Outbound,
169
- z.ZodTypeDef,
170
- GetCurrentKeyData
171
- > = z.object({
172
- label: z.string(),
173
- limit: z.nullable(z.number()),
174
- usage: z.number(),
175
- isFreeTier: z.boolean(),
176
- isProvisioningKey: z.boolean(),
177
- limitRemaining: z.nullable(z.number()),
178
- rateLimit: z.lazy(() => RateLimit$outboundSchema),
179
- }).transform((v) => {
180
- return remap$(v, {
181
- isFreeTier: "is_free_tier",
182
- isProvisioningKey: "is_provisioning_key",
183
- limitRemaining: "limit_remaining",
184
- rateLimit: "rate_limit",
185
- });
186
- });
187
-
188
- /**
189
- * @internal
190
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
191
- */
192
- export namespace GetCurrentKeyData$ {
193
- /** @deprecated use `GetCurrentKeyData$inboundSchema` instead. */
194
- export const inboundSchema = GetCurrentKeyData$inboundSchema;
195
- /** @deprecated use `GetCurrentKeyData$outboundSchema` instead. */
196
- export const outboundSchema = GetCurrentKeyData$outboundSchema;
197
- /** @deprecated use `GetCurrentKeyData$Outbound` instead. */
198
- export type Outbound = GetCurrentKeyData$Outbound;
199
- }
200
-
201
- export function getCurrentKeyDataToJSON(
202
- getCurrentKeyData: GetCurrentKeyData,
203
- ): string {
204
- return JSON.stringify(
205
- GetCurrentKeyData$outboundSchema.parse(getCurrentKeyData),
206
- );
207
- }
208
-
209
- export function getCurrentKeyDataFromJSON(
210
- jsonString: string,
211
- ): SafeParseResult<GetCurrentKeyData, SDKValidationError> {
212
- return safeParse(
213
- jsonString,
214
- (x) => GetCurrentKeyData$inboundSchema.parse(JSON.parse(x)),
215
- `Failed to parse 'GetCurrentKeyData' from JSON`,
216
- );
217
- }
218
-
219
21
  /** @internal */
220
22
  export const GetCurrentKeyResponse$inboundSchema: z.ZodType<
221
23
  GetCurrentKeyResponse,
222
24
  z.ZodTypeDef,
223
25
  unknown
224
26
  > = z.object({
225
- data: z.lazy(() => GetCurrentKeyData$inboundSchema),
27
+ data: models.KeyInfo$inboundSchema,
226
28
  });
227
29
 
228
30
  /** @internal */
229
31
  export type GetCurrentKeyResponse$Outbound = {
230
- data: GetCurrentKeyData$Outbound;
32
+ data: models.KeyInfo$Outbound;
231
33
  };
232
34
 
233
35
  /** @internal */
@@ -236,7 +38,7 @@ export const GetCurrentKeyResponse$outboundSchema: z.ZodType<
236
38
  z.ZodTypeDef,
237
39
  GetCurrentKeyResponse
238
40
  > = z.object({
239
- data: z.lazy(() => GetCurrentKeyData$outboundSchema),
41
+ data: models.KeyInfo$outboundSchema,
240
42
  });
241
43
 
242
44
  /**