@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
@@ -5,288 +5,17 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as models from "../index.js";
11
11
 
12
- export type ListModelsRequestRequest = {
12
+ export type ListModelsRequest = {
13
13
  category?: string | undefined;
14
14
  supportedParameters?: string | undefined;
15
15
  useRss?: string | undefined;
16
16
  useRssChatLinks?: string | undefined;
17
17
  };
18
18
 
19
- export type ListModelsPrompt = number | string | any;
20
-
21
- export type ListModelsCompletion = number | string | any;
22
-
23
- export type ModelsListModelsRequest = number | string | any;
24
-
25
- export type ListModelsImage = number | string | any;
26
-
27
- export type ListModelsImageOutput = number | string | any;
28
-
29
- export type ListModelsAudio = number | string | any;
30
-
31
- export type ListModelsInputAudioCache = number | string | any;
32
-
33
- export type ListModelsWebSearch = number | string | any;
34
-
35
- export type ListModelsInternalReasoning = number | string | any;
36
-
37
- export type ListModelsInputCacheRead = number | string | any;
38
-
39
- export type ListModelsInputCacheWrite = number | string | any;
40
-
41
- /**
42
- * Pricing information for the model
43
- */
44
- export type ListModelsPricing = {
45
- prompt?: number | string | any | undefined;
46
- completion?: number | string | any | undefined;
47
- request?: number | string | any | undefined;
48
- image?: number | string | any | undefined;
49
- imageOutput?: number | string | any | undefined;
50
- audio?: number | string | any | undefined;
51
- inputAudioCache?: number | string | any | undefined;
52
- webSearch?: number | string | any | undefined;
53
- internalReasoning?: number | string | any | undefined;
54
- inputCacheRead?: number | string | any | undefined;
55
- inputCacheWrite?: number | string | any | undefined;
56
- discount?: number | undefined;
57
- };
58
-
59
- /**
60
- * Tokenizer type used by the model
61
- */
62
- export const ListModelsTokenizer = {
63
- Router: "Router",
64
- Media: "Media",
65
- Other: "Other",
66
- Gpt: "GPT",
67
- Claude: "Claude",
68
- Gemini: "Gemini",
69
- Grok: "Grok",
70
- Cohere: "Cohere",
71
- Nova: "Nova",
72
- Qwen: "Qwen",
73
- Yi: "Yi",
74
- DeepSeek: "DeepSeek",
75
- Mistral: "Mistral",
76
- Llama2: "Llama2",
77
- Llama3: "Llama3",
78
- Llama4: "Llama4",
79
- PaLM: "PaLM",
80
- Rwkv: "RWKV",
81
- Qwen3: "Qwen3",
82
- } as const;
83
- /**
84
- * Tokenizer type used by the model
85
- */
86
- export type ListModelsTokenizer = ClosedEnum<typeof ListModelsTokenizer>;
87
-
88
- /**
89
- * Instruction format type
90
- */
91
- export const ListModelsInstructType = {
92
- None: "none",
93
- Airoboros: "airoboros",
94
- Alpaca: "alpaca",
95
- AlpacaModif: "alpaca-modif",
96
- Chatml: "chatml",
97
- Claude: "claude",
98
- CodeLlama: "code-llama",
99
- Gemma: "gemma",
100
- Llama2: "llama2",
101
- Llama3: "llama3",
102
- Mistral: "mistral",
103
- Nemotron: "nemotron",
104
- Neural: "neural",
105
- Openchat: "openchat",
106
- Phi3: "phi3",
107
- Rwkv: "rwkv",
108
- Vicuna: "vicuna",
109
- Zephyr: "zephyr",
110
- DeepseekR1: "deepseek-r1",
111
- DeepseekV31: "deepseek-v3.1",
112
- Qwq: "qwq",
113
- Qwen3: "qwen3",
114
- } as const;
115
- /**
116
- * Instruction format type
117
- */
118
- export type ListModelsInstructType = ClosedEnum<typeof ListModelsInstructType>;
119
-
120
- export const ListModelsInputModality = {
121
- Text: "text",
122
- Image: "image",
123
- File: "file",
124
- Audio: "audio",
125
- } as const;
126
- export type ListModelsInputModality = ClosedEnum<
127
- typeof ListModelsInputModality
128
- >;
129
-
130
- export const ListModelsOutputModality = {
131
- Text: "text",
132
- Image: "image",
133
- Embeddings: "embeddings",
134
- } as const;
135
- export type ListModelsOutputModality = ClosedEnum<
136
- typeof ListModelsOutputModality
137
- >;
138
-
139
- /**
140
- * Model architecture information
141
- */
142
- export type ListModelsArchitecture = {
143
- /**
144
- * Tokenizer type used by the model
145
- */
146
- tokenizer?: ListModelsTokenizer | undefined;
147
- /**
148
- * Instruction format type
149
- */
150
- instructType?: ListModelsInstructType | null | undefined;
151
- /**
152
- * Primary modality of the model
153
- */
154
- modality: string | null;
155
- /**
156
- * Supported input modalities
157
- */
158
- inputModalities: Array<ListModelsInputModality>;
159
- /**
160
- * Supported output modalities
161
- */
162
- outputModalities: Array<ListModelsOutputModality>;
163
- };
164
-
165
- /**
166
- * Information about the top provider for this model
167
- */
168
- export type ListModelsTopProvider = {
169
- /**
170
- * Context length from the top provider
171
- */
172
- contextLength?: number | null | undefined;
173
- /**
174
- * Maximum completion tokens from the top provider
175
- */
176
- maxCompletionTokens?: number | null | undefined;
177
- /**
178
- * Whether the top provider moderates content
179
- */
180
- isModerated: boolean;
181
- };
182
-
183
- /**
184
- * Per-request token limits
185
- */
186
- export type ListModelsPerRequestLimits = {
187
- /**
188
- * Maximum prompt tokens per request
189
- */
190
- promptTokens?: any | undefined;
191
- /**
192
- * Maximum completion tokens per request
193
- */
194
- completionTokens?: any | undefined;
195
- };
196
-
197
- export const ListModelsSupportedParameter = {
198
- Temperature: "temperature",
199
- TopP: "top_p",
200
- TopK: "top_k",
201
- MinP: "min_p",
202
- TopA: "top_a",
203
- FrequencyPenalty: "frequency_penalty",
204
- PresencePenalty: "presence_penalty",
205
- RepetitionPenalty: "repetition_penalty",
206
- MaxTokens: "max_tokens",
207
- LogitBias: "logit_bias",
208
- Logprobs: "logprobs",
209
- TopLogprobs: "top_logprobs",
210
- Seed: "seed",
211
- ResponseFormat: "response_format",
212
- StructuredOutputs: "structured_outputs",
213
- Stop: "stop",
214
- Tools: "tools",
215
- ToolChoice: "tool_choice",
216
- ParallelToolCalls: "parallel_tool_calls",
217
- IncludeReasoning: "include_reasoning",
218
- Reasoning: "reasoning",
219
- WebSearchOptions: "web_search_options",
220
- Verbosity: "verbosity",
221
- } as const;
222
- export type ListModelsSupportedParameter = ClosedEnum<
223
- typeof ListModelsSupportedParameter
224
- >;
225
-
226
- /**
227
- * Default parameters for this model
228
- */
229
- export type ListModelsDefaultParameters = {
230
- temperature?: number | null | undefined;
231
- topP?: number | null | undefined;
232
- frequencyPenalty?: number | null | undefined;
233
- };
234
-
235
- export type ListModelsData = {
236
- /**
237
- * Unique identifier for the model
238
- */
239
- id: string;
240
- /**
241
- * Canonical slug for the model
242
- */
243
- canonicalSlug: string;
244
- /**
245
- * Hugging Face model identifier, if applicable
246
- */
247
- huggingFaceId?: string | null | undefined;
248
- /**
249
- * Display name of the model
250
- */
251
- name: string;
252
- /**
253
- * Unix timestamp of when the model was created
254
- */
255
- created: number;
256
- /**
257
- * Description of the model
258
- */
259
- description?: string | undefined;
260
- /**
261
- * Pricing information for the model
262
- */
263
- pricing: ListModelsPricing;
264
- /**
265
- * Maximum context length in tokens
266
- */
267
- contextLength: number | null;
268
- /**
269
- * Model architecture information
270
- */
271
- architecture: ListModelsArchitecture;
272
- /**
273
- * Information about the top provider for this model
274
- */
275
- topProvider: ListModelsTopProvider;
276
- /**
277
- * Per-request token limits
278
- */
279
- perRequestLimits: ListModelsPerRequestLimits | null;
280
- /**
281
- * List of supported parameters for this model
282
- */
283
- supportedParameters: Array<ListModelsSupportedParameter>;
284
- /**
285
- * Default parameters for this model
286
- */
287
- defaultParameters: ListModelsDefaultParameters | null;
288
- };
289
-
290
19
  /**
291
20
  * Returns a list of models or RSS feed
292
21
  */
@@ -294,14 +23,14 @@ export type ListModelsResponseBody = {
294
23
  /**
295
24
  * List of available models
296
25
  */
297
- data: Array<ListModelsData>;
26
+ data: Array<models.ModelsList>;
298
27
  };
299
28
 
300
29
  export type ListModelsResponse = ListModelsResponseBody | string;
301
30
 
302
31
  /** @internal */
303
- export const ListModelsRequestRequest$inboundSchema: z.ZodType<
304
- ListModelsRequestRequest,
32
+ export const ListModelsRequest$inboundSchema: z.ZodType<
33
+ ListModelsRequest,
305
34
  z.ZodTypeDef,
306
35
  unknown
307
36
  > = z.object({
@@ -318,7 +47,7 @@ export const ListModelsRequestRequest$inboundSchema: z.ZodType<
318
47
  });
319
48
 
320
49
  /** @internal */
321
- export type ListModelsRequestRequest$Outbound = {
50
+ export type ListModelsRequest$Outbound = {
322
51
  category?: string | undefined;
323
52
  supported_parameters?: string | undefined;
324
53
  use_rss?: string | undefined;
@@ -326,10 +55,10 @@ export type ListModelsRequestRequest$Outbound = {
326
55
  };
327
56
 
328
57
  /** @internal */
329
- export const ListModelsRequestRequest$outboundSchema: z.ZodType<
330
- ListModelsRequestRequest$Outbound,
58
+ export const ListModelsRequest$outboundSchema: z.ZodType<
59
+ ListModelsRequest$Outbound,
331
60
  z.ZodTypeDef,
332
- ListModelsRequestRequest
61
+ ListModelsRequest
333
62
  > = z.object({
334
63
  category: z.string().optional(),
335
64
  supportedParameters: z.string().optional(),
@@ -347,1169 +76,30 @@ export const ListModelsRequestRequest$outboundSchema: z.ZodType<
347
76
  * @internal
348
77
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
349
78
  */
350
- export namespace ListModelsRequestRequest$ {
351
- /** @deprecated use `ListModelsRequestRequest$inboundSchema` instead. */
352
- export const inboundSchema = ListModelsRequestRequest$inboundSchema;
353
- /** @deprecated use `ListModelsRequestRequest$outboundSchema` instead. */
354
- export const outboundSchema = ListModelsRequestRequest$outboundSchema;
355
- /** @deprecated use `ListModelsRequestRequest$Outbound` instead. */
356
- export type Outbound = ListModelsRequestRequest$Outbound;
357
- }
358
-
359
- export function listModelsRequestRequestToJSON(
360
- listModelsRequestRequest: ListModelsRequestRequest,
361
- ): string {
362
- return JSON.stringify(
363
- ListModelsRequestRequest$outboundSchema.parse(listModelsRequestRequest),
364
- );
365
- }
366
-
367
- export function listModelsRequestRequestFromJSON(
368
- jsonString: string,
369
- ): SafeParseResult<ListModelsRequestRequest, SDKValidationError> {
370
- return safeParse(
371
- jsonString,
372
- (x) => ListModelsRequestRequest$inboundSchema.parse(JSON.parse(x)),
373
- `Failed to parse 'ListModelsRequestRequest' from JSON`,
374
- );
375
- }
376
-
377
- /** @internal */
378
- export const ListModelsPrompt$inboundSchema: z.ZodType<
379
- ListModelsPrompt,
380
- z.ZodTypeDef,
381
- unknown
382
- > = z.union([z.number(), z.string(), z.any()]);
383
-
384
- /** @internal */
385
- export type ListModelsPrompt$Outbound = number | string | any;
386
-
387
- /** @internal */
388
- export const ListModelsPrompt$outboundSchema: z.ZodType<
389
- ListModelsPrompt$Outbound,
390
- z.ZodTypeDef,
391
- ListModelsPrompt
392
- > = z.union([z.number(), z.string(), z.any()]);
393
-
394
- /**
395
- * @internal
396
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
397
- */
398
- export namespace ListModelsPrompt$ {
399
- /** @deprecated use `ListModelsPrompt$inboundSchema` instead. */
400
- export const inboundSchema = ListModelsPrompt$inboundSchema;
401
- /** @deprecated use `ListModelsPrompt$outboundSchema` instead. */
402
- export const outboundSchema = ListModelsPrompt$outboundSchema;
403
- /** @deprecated use `ListModelsPrompt$Outbound` instead. */
404
- export type Outbound = ListModelsPrompt$Outbound;
405
- }
406
-
407
- export function listModelsPromptToJSON(
408
- listModelsPrompt: ListModelsPrompt,
409
- ): string {
410
- return JSON.stringify(
411
- ListModelsPrompt$outboundSchema.parse(listModelsPrompt),
412
- );
413
- }
414
-
415
- export function listModelsPromptFromJSON(
416
- jsonString: string,
417
- ): SafeParseResult<ListModelsPrompt, SDKValidationError> {
418
- return safeParse(
419
- jsonString,
420
- (x) => ListModelsPrompt$inboundSchema.parse(JSON.parse(x)),
421
- `Failed to parse 'ListModelsPrompt' from JSON`,
422
- );
423
- }
424
-
425
- /** @internal */
426
- export const ListModelsCompletion$inboundSchema: z.ZodType<
427
- ListModelsCompletion,
428
- z.ZodTypeDef,
429
- unknown
430
- > = z.union([z.number(), z.string(), z.any()]);
431
-
432
- /** @internal */
433
- export type ListModelsCompletion$Outbound = number | string | any;
434
-
435
- /** @internal */
436
- export const ListModelsCompletion$outboundSchema: z.ZodType<
437
- ListModelsCompletion$Outbound,
438
- z.ZodTypeDef,
439
- ListModelsCompletion
440
- > = z.union([z.number(), z.string(), z.any()]);
441
-
442
- /**
443
- * @internal
444
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
445
- */
446
- export namespace ListModelsCompletion$ {
447
- /** @deprecated use `ListModelsCompletion$inboundSchema` instead. */
448
- export const inboundSchema = ListModelsCompletion$inboundSchema;
449
- /** @deprecated use `ListModelsCompletion$outboundSchema` instead. */
450
- export const outboundSchema = ListModelsCompletion$outboundSchema;
451
- /** @deprecated use `ListModelsCompletion$Outbound` instead. */
452
- export type Outbound = ListModelsCompletion$Outbound;
453
- }
454
-
455
- export function listModelsCompletionToJSON(
456
- listModelsCompletion: ListModelsCompletion,
457
- ): string {
458
- return JSON.stringify(
459
- ListModelsCompletion$outboundSchema.parse(listModelsCompletion),
460
- );
461
- }
462
-
463
- export function listModelsCompletionFromJSON(
464
- jsonString: string,
465
- ): SafeParseResult<ListModelsCompletion, SDKValidationError> {
466
- return safeParse(
467
- jsonString,
468
- (x) => ListModelsCompletion$inboundSchema.parse(JSON.parse(x)),
469
- `Failed to parse 'ListModelsCompletion' from JSON`,
470
- );
471
- }
472
-
473
- /** @internal */
474
- export const ModelsListModelsRequest$inboundSchema: z.ZodType<
475
- ModelsListModelsRequest,
476
- z.ZodTypeDef,
477
- unknown
478
- > = z.union([z.number(), z.string(), z.any()]);
479
-
480
- /** @internal */
481
- export type ModelsListModelsRequest$Outbound = number | string | any;
482
-
483
- /** @internal */
484
- export const ModelsListModelsRequest$outboundSchema: z.ZodType<
485
- ModelsListModelsRequest$Outbound,
486
- z.ZodTypeDef,
487
- ModelsListModelsRequest
488
- > = z.union([z.number(), z.string(), z.any()]);
489
-
490
- /**
491
- * @internal
492
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
493
- */
494
- export namespace ModelsListModelsRequest$ {
495
- /** @deprecated use `ModelsListModelsRequest$inboundSchema` instead. */
496
- export const inboundSchema = ModelsListModelsRequest$inboundSchema;
497
- /** @deprecated use `ModelsListModelsRequest$outboundSchema` instead. */
498
- export const outboundSchema = ModelsListModelsRequest$outboundSchema;
499
- /** @deprecated use `ModelsListModelsRequest$Outbound` instead. */
500
- export type Outbound = ModelsListModelsRequest$Outbound;
501
- }
502
-
503
- export function modelsListModelsRequestToJSON(
504
- modelsListModelsRequest: ModelsListModelsRequest,
505
- ): string {
506
- return JSON.stringify(
507
- ModelsListModelsRequest$outboundSchema.parse(modelsListModelsRequest),
508
- );
509
- }
510
-
511
- export function modelsListModelsRequestFromJSON(
512
- jsonString: string,
513
- ): SafeParseResult<ModelsListModelsRequest, SDKValidationError> {
514
- return safeParse(
515
- jsonString,
516
- (x) => ModelsListModelsRequest$inboundSchema.parse(JSON.parse(x)),
517
- `Failed to parse 'ModelsListModelsRequest' from JSON`,
518
- );
519
- }
520
-
521
- /** @internal */
522
- export const ListModelsImage$inboundSchema: z.ZodType<
523
- ListModelsImage,
524
- z.ZodTypeDef,
525
- unknown
526
- > = z.union([z.number(), z.string(), z.any()]);
527
-
528
- /** @internal */
529
- export type ListModelsImage$Outbound = number | string | any;
530
-
531
- /** @internal */
532
- export const ListModelsImage$outboundSchema: z.ZodType<
533
- ListModelsImage$Outbound,
534
- z.ZodTypeDef,
535
- ListModelsImage
536
- > = z.union([z.number(), z.string(), z.any()]);
537
-
538
- /**
539
- * @internal
540
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
541
- */
542
- export namespace ListModelsImage$ {
543
- /** @deprecated use `ListModelsImage$inboundSchema` instead. */
544
- export const inboundSchema = ListModelsImage$inboundSchema;
545
- /** @deprecated use `ListModelsImage$outboundSchema` instead. */
546
- export const outboundSchema = ListModelsImage$outboundSchema;
547
- /** @deprecated use `ListModelsImage$Outbound` instead. */
548
- export type Outbound = ListModelsImage$Outbound;
549
- }
550
-
551
- export function listModelsImageToJSON(
552
- listModelsImage: ListModelsImage,
553
- ): string {
554
- return JSON.stringify(ListModelsImage$outboundSchema.parse(listModelsImage));
555
- }
556
-
557
- export function listModelsImageFromJSON(
558
- jsonString: string,
559
- ): SafeParseResult<ListModelsImage, SDKValidationError> {
560
- return safeParse(
561
- jsonString,
562
- (x) => ListModelsImage$inboundSchema.parse(JSON.parse(x)),
563
- `Failed to parse 'ListModelsImage' from JSON`,
564
- );
565
- }
566
-
567
- /** @internal */
568
- export const ListModelsImageOutput$inboundSchema: z.ZodType<
569
- ListModelsImageOutput,
570
- z.ZodTypeDef,
571
- unknown
572
- > = z.union([z.number(), z.string(), z.any()]);
573
-
574
- /** @internal */
575
- export type ListModelsImageOutput$Outbound = number | string | any;
576
-
577
- /** @internal */
578
- export const ListModelsImageOutput$outboundSchema: z.ZodType<
579
- ListModelsImageOutput$Outbound,
580
- z.ZodTypeDef,
581
- ListModelsImageOutput
582
- > = z.union([z.number(), z.string(), z.any()]);
583
-
584
- /**
585
- * @internal
586
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
587
- */
588
- export namespace ListModelsImageOutput$ {
589
- /** @deprecated use `ListModelsImageOutput$inboundSchema` instead. */
590
- export const inboundSchema = ListModelsImageOutput$inboundSchema;
591
- /** @deprecated use `ListModelsImageOutput$outboundSchema` instead. */
592
- export const outboundSchema = ListModelsImageOutput$outboundSchema;
593
- /** @deprecated use `ListModelsImageOutput$Outbound` instead. */
594
- export type Outbound = ListModelsImageOutput$Outbound;
79
+ export namespace ListModelsRequest$ {
80
+ /** @deprecated use `ListModelsRequest$inboundSchema` instead. */
81
+ export const inboundSchema = ListModelsRequest$inboundSchema;
82
+ /** @deprecated use `ListModelsRequest$outboundSchema` instead. */
83
+ export const outboundSchema = ListModelsRequest$outboundSchema;
84
+ /** @deprecated use `ListModelsRequest$Outbound` instead. */
85
+ export type Outbound = ListModelsRequest$Outbound;
595
86
  }
596
87
 
597
- export function listModelsImageOutputToJSON(
598
- listModelsImageOutput: ListModelsImageOutput,
88
+ export function listModelsRequestToJSON(
89
+ listModelsRequest: ListModelsRequest,
599
90
  ): string {
600
91
  return JSON.stringify(
601
- ListModelsImageOutput$outboundSchema.parse(listModelsImageOutput),
602
- );
603
- }
604
-
605
- export function listModelsImageOutputFromJSON(
606
- jsonString: string,
607
- ): SafeParseResult<ListModelsImageOutput, SDKValidationError> {
608
- return safeParse(
609
- jsonString,
610
- (x) => ListModelsImageOutput$inboundSchema.parse(JSON.parse(x)),
611
- `Failed to parse 'ListModelsImageOutput' from JSON`,
612
- );
613
- }
614
-
615
- /** @internal */
616
- export const ListModelsAudio$inboundSchema: z.ZodType<
617
- ListModelsAudio,
618
- z.ZodTypeDef,
619
- unknown
620
- > = z.union([z.number(), z.string(), z.any()]);
621
-
622
- /** @internal */
623
- export type ListModelsAudio$Outbound = number | string | any;
624
-
625
- /** @internal */
626
- export const ListModelsAudio$outboundSchema: z.ZodType<
627
- ListModelsAudio$Outbound,
628
- z.ZodTypeDef,
629
- ListModelsAudio
630
- > = z.union([z.number(), z.string(), z.any()]);
631
-
632
- /**
633
- * @internal
634
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
635
- */
636
- export namespace ListModelsAudio$ {
637
- /** @deprecated use `ListModelsAudio$inboundSchema` instead. */
638
- export const inboundSchema = ListModelsAudio$inboundSchema;
639
- /** @deprecated use `ListModelsAudio$outboundSchema` instead. */
640
- export const outboundSchema = ListModelsAudio$outboundSchema;
641
- /** @deprecated use `ListModelsAudio$Outbound` instead. */
642
- export type Outbound = ListModelsAudio$Outbound;
643
- }
644
-
645
- export function listModelsAudioToJSON(
646
- listModelsAudio: ListModelsAudio,
647
- ): string {
648
- return JSON.stringify(ListModelsAudio$outboundSchema.parse(listModelsAudio));
649
- }
650
-
651
- export function listModelsAudioFromJSON(
652
- jsonString: string,
653
- ): SafeParseResult<ListModelsAudio, SDKValidationError> {
654
- return safeParse(
655
- jsonString,
656
- (x) => ListModelsAudio$inboundSchema.parse(JSON.parse(x)),
657
- `Failed to parse 'ListModelsAudio' from JSON`,
92
+ ListModelsRequest$outboundSchema.parse(listModelsRequest),
658
93
  );
659
94
  }
660
95
 
661
- /** @internal */
662
- export const ListModelsInputAudioCache$inboundSchema: z.ZodType<
663
- ListModelsInputAudioCache,
664
- z.ZodTypeDef,
665
- unknown
666
- > = z.union([z.number(), z.string(), z.any()]);
667
-
668
- /** @internal */
669
- export type ListModelsInputAudioCache$Outbound = number | string | any;
670
-
671
- /** @internal */
672
- export const ListModelsInputAudioCache$outboundSchema: z.ZodType<
673
- ListModelsInputAudioCache$Outbound,
674
- z.ZodTypeDef,
675
- ListModelsInputAudioCache
676
- > = z.union([z.number(), z.string(), z.any()]);
677
-
678
- /**
679
- * @internal
680
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
681
- */
682
- export namespace ListModelsInputAudioCache$ {
683
- /** @deprecated use `ListModelsInputAudioCache$inboundSchema` instead. */
684
- export const inboundSchema = ListModelsInputAudioCache$inboundSchema;
685
- /** @deprecated use `ListModelsInputAudioCache$outboundSchema` instead. */
686
- export const outboundSchema = ListModelsInputAudioCache$outboundSchema;
687
- /** @deprecated use `ListModelsInputAudioCache$Outbound` instead. */
688
- export type Outbound = ListModelsInputAudioCache$Outbound;
689
- }
690
-
691
- export function listModelsInputAudioCacheToJSON(
692
- listModelsInputAudioCache: ListModelsInputAudioCache,
693
- ): string {
694
- return JSON.stringify(
695
- ListModelsInputAudioCache$outboundSchema.parse(listModelsInputAudioCache),
696
- );
697
- }
698
-
699
- export function listModelsInputAudioCacheFromJSON(
700
- jsonString: string,
701
- ): SafeParseResult<ListModelsInputAudioCache, SDKValidationError> {
702
- return safeParse(
703
- jsonString,
704
- (x) => ListModelsInputAudioCache$inboundSchema.parse(JSON.parse(x)),
705
- `Failed to parse 'ListModelsInputAudioCache' from JSON`,
706
- );
707
- }
708
-
709
- /** @internal */
710
- export const ListModelsWebSearch$inboundSchema: z.ZodType<
711
- ListModelsWebSearch,
712
- z.ZodTypeDef,
713
- unknown
714
- > = z.union([z.number(), z.string(), z.any()]);
715
-
716
- /** @internal */
717
- export type ListModelsWebSearch$Outbound = number | string | any;
718
-
719
- /** @internal */
720
- export const ListModelsWebSearch$outboundSchema: z.ZodType<
721
- ListModelsWebSearch$Outbound,
722
- z.ZodTypeDef,
723
- ListModelsWebSearch
724
- > = z.union([z.number(), z.string(), z.any()]);
725
-
726
- /**
727
- * @internal
728
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
729
- */
730
- export namespace ListModelsWebSearch$ {
731
- /** @deprecated use `ListModelsWebSearch$inboundSchema` instead. */
732
- export const inboundSchema = ListModelsWebSearch$inboundSchema;
733
- /** @deprecated use `ListModelsWebSearch$outboundSchema` instead. */
734
- export const outboundSchema = ListModelsWebSearch$outboundSchema;
735
- /** @deprecated use `ListModelsWebSearch$Outbound` instead. */
736
- export type Outbound = ListModelsWebSearch$Outbound;
737
- }
738
-
739
- export function listModelsWebSearchToJSON(
740
- listModelsWebSearch: ListModelsWebSearch,
741
- ): string {
742
- return JSON.stringify(
743
- ListModelsWebSearch$outboundSchema.parse(listModelsWebSearch),
744
- );
745
- }
746
-
747
- export function listModelsWebSearchFromJSON(
748
- jsonString: string,
749
- ): SafeParseResult<ListModelsWebSearch, SDKValidationError> {
750
- return safeParse(
751
- jsonString,
752
- (x) => ListModelsWebSearch$inboundSchema.parse(JSON.parse(x)),
753
- `Failed to parse 'ListModelsWebSearch' from JSON`,
754
- );
755
- }
756
-
757
- /** @internal */
758
- export const ListModelsInternalReasoning$inboundSchema: z.ZodType<
759
- ListModelsInternalReasoning,
760
- z.ZodTypeDef,
761
- unknown
762
- > = z.union([z.number(), z.string(), z.any()]);
763
-
764
- /** @internal */
765
- export type ListModelsInternalReasoning$Outbound = number | string | any;
766
-
767
- /** @internal */
768
- export const ListModelsInternalReasoning$outboundSchema: z.ZodType<
769
- ListModelsInternalReasoning$Outbound,
770
- z.ZodTypeDef,
771
- ListModelsInternalReasoning
772
- > = z.union([z.number(), z.string(), z.any()]);
773
-
774
- /**
775
- * @internal
776
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
777
- */
778
- export namespace ListModelsInternalReasoning$ {
779
- /** @deprecated use `ListModelsInternalReasoning$inboundSchema` instead. */
780
- export const inboundSchema = ListModelsInternalReasoning$inboundSchema;
781
- /** @deprecated use `ListModelsInternalReasoning$outboundSchema` instead. */
782
- export const outboundSchema = ListModelsInternalReasoning$outboundSchema;
783
- /** @deprecated use `ListModelsInternalReasoning$Outbound` instead. */
784
- export type Outbound = ListModelsInternalReasoning$Outbound;
785
- }
786
-
787
- export function listModelsInternalReasoningToJSON(
788
- listModelsInternalReasoning: ListModelsInternalReasoning,
789
- ): string {
790
- return JSON.stringify(
791
- ListModelsInternalReasoning$outboundSchema.parse(
792
- listModelsInternalReasoning,
793
- ),
794
- );
795
- }
796
-
797
- export function listModelsInternalReasoningFromJSON(
798
- jsonString: string,
799
- ): SafeParseResult<ListModelsInternalReasoning, SDKValidationError> {
800
- return safeParse(
801
- jsonString,
802
- (x) => ListModelsInternalReasoning$inboundSchema.parse(JSON.parse(x)),
803
- `Failed to parse 'ListModelsInternalReasoning' from JSON`,
804
- );
805
- }
806
-
807
- /** @internal */
808
- export const ListModelsInputCacheRead$inboundSchema: z.ZodType<
809
- ListModelsInputCacheRead,
810
- z.ZodTypeDef,
811
- unknown
812
- > = z.union([z.number(), z.string(), z.any()]);
813
-
814
- /** @internal */
815
- export type ListModelsInputCacheRead$Outbound = number | string | any;
816
-
817
- /** @internal */
818
- export const ListModelsInputCacheRead$outboundSchema: z.ZodType<
819
- ListModelsInputCacheRead$Outbound,
820
- z.ZodTypeDef,
821
- ListModelsInputCacheRead
822
- > = z.union([z.number(), z.string(), z.any()]);
823
-
824
- /**
825
- * @internal
826
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
827
- */
828
- export namespace ListModelsInputCacheRead$ {
829
- /** @deprecated use `ListModelsInputCacheRead$inboundSchema` instead. */
830
- export const inboundSchema = ListModelsInputCacheRead$inboundSchema;
831
- /** @deprecated use `ListModelsInputCacheRead$outboundSchema` instead. */
832
- export const outboundSchema = ListModelsInputCacheRead$outboundSchema;
833
- /** @deprecated use `ListModelsInputCacheRead$Outbound` instead. */
834
- export type Outbound = ListModelsInputCacheRead$Outbound;
835
- }
836
-
837
- export function listModelsInputCacheReadToJSON(
838
- listModelsInputCacheRead: ListModelsInputCacheRead,
839
- ): string {
840
- return JSON.stringify(
841
- ListModelsInputCacheRead$outboundSchema.parse(listModelsInputCacheRead),
842
- );
843
- }
844
-
845
- export function listModelsInputCacheReadFromJSON(
846
- jsonString: string,
847
- ): SafeParseResult<ListModelsInputCacheRead, SDKValidationError> {
848
- return safeParse(
849
- jsonString,
850
- (x) => ListModelsInputCacheRead$inboundSchema.parse(JSON.parse(x)),
851
- `Failed to parse 'ListModelsInputCacheRead' from JSON`,
852
- );
853
- }
854
-
855
- /** @internal */
856
- export const ListModelsInputCacheWrite$inboundSchema: z.ZodType<
857
- ListModelsInputCacheWrite,
858
- z.ZodTypeDef,
859
- unknown
860
- > = z.union([z.number(), z.string(), z.any()]);
861
-
862
- /** @internal */
863
- export type ListModelsInputCacheWrite$Outbound = number | string | any;
864
-
865
- /** @internal */
866
- export const ListModelsInputCacheWrite$outboundSchema: z.ZodType<
867
- ListModelsInputCacheWrite$Outbound,
868
- z.ZodTypeDef,
869
- ListModelsInputCacheWrite
870
- > = z.union([z.number(), z.string(), z.any()]);
871
-
872
- /**
873
- * @internal
874
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
875
- */
876
- export namespace ListModelsInputCacheWrite$ {
877
- /** @deprecated use `ListModelsInputCacheWrite$inboundSchema` instead. */
878
- export const inboundSchema = ListModelsInputCacheWrite$inboundSchema;
879
- /** @deprecated use `ListModelsInputCacheWrite$outboundSchema` instead. */
880
- export const outboundSchema = ListModelsInputCacheWrite$outboundSchema;
881
- /** @deprecated use `ListModelsInputCacheWrite$Outbound` instead. */
882
- export type Outbound = ListModelsInputCacheWrite$Outbound;
883
- }
884
-
885
- export function listModelsInputCacheWriteToJSON(
886
- listModelsInputCacheWrite: ListModelsInputCacheWrite,
887
- ): string {
888
- return JSON.stringify(
889
- ListModelsInputCacheWrite$outboundSchema.parse(listModelsInputCacheWrite),
890
- );
891
- }
892
-
893
- export function listModelsInputCacheWriteFromJSON(
894
- jsonString: string,
895
- ): SafeParseResult<ListModelsInputCacheWrite, SDKValidationError> {
896
- return safeParse(
897
- jsonString,
898
- (x) => ListModelsInputCacheWrite$inboundSchema.parse(JSON.parse(x)),
899
- `Failed to parse 'ListModelsInputCacheWrite' from JSON`,
900
- );
901
- }
902
-
903
- /** @internal */
904
- export const ListModelsPricing$inboundSchema: z.ZodType<
905
- ListModelsPricing,
906
- z.ZodTypeDef,
907
- unknown
908
- > = z.object({
909
- prompt: z.union([z.number(), z.string(), z.any()]).optional(),
910
- completion: z.union([z.number(), z.string(), z.any()]).optional(),
911
- request: z.union([z.number(), z.string(), z.any()]).optional(),
912
- image: z.union([z.number(), z.string(), z.any()]).optional(),
913
- image_output: z.union([z.number(), z.string(), z.any()]).optional(),
914
- audio: z.union([z.number(), z.string(), z.any()]).optional(),
915
- input_audio_cache: z.union([z.number(), z.string(), z.any()]).optional(),
916
- web_search: z.union([z.number(), z.string(), z.any()]).optional(),
917
- internal_reasoning: z.union([z.number(), z.string(), z.any()]).optional(),
918
- input_cache_read: z.union([z.number(), z.string(), z.any()]).optional(),
919
- input_cache_write: z.union([z.number(), z.string(), z.any()]).optional(),
920
- discount: z.number().optional(),
921
- }).transform((v) => {
922
- return remap$(v, {
923
- "image_output": "imageOutput",
924
- "input_audio_cache": "inputAudioCache",
925
- "web_search": "webSearch",
926
- "internal_reasoning": "internalReasoning",
927
- "input_cache_read": "inputCacheRead",
928
- "input_cache_write": "inputCacheWrite",
929
- });
930
- });
931
-
932
- /** @internal */
933
- export type ListModelsPricing$Outbound = {
934
- prompt?: number | string | any | undefined;
935
- completion?: number | string | any | undefined;
936
- request?: number | string | any | undefined;
937
- image?: number | string | any | undefined;
938
- image_output?: number | string | any | undefined;
939
- audio?: number | string | any | undefined;
940
- input_audio_cache?: number | string | any | undefined;
941
- web_search?: number | string | any | undefined;
942
- internal_reasoning?: number | string | any | undefined;
943
- input_cache_read?: number | string | any | undefined;
944
- input_cache_write?: number | string | any | undefined;
945
- discount?: number | undefined;
946
- };
947
-
948
- /** @internal */
949
- export const ListModelsPricing$outboundSchema: z.ZodType<
950
- ListModelsPricing$Outbound,
951
- z.ZodTypeDef,
952
- ListModelsPricing
953
- > = z.object({
954
- prompt: z.union([z.number(), z.string(), z.any()]).optional(),
955
- completion: z.union([z.number(), z.string(), z.any()]).optional(),
956
- request: z.union([z.number(), z.string(), z.any()]).optional(),
957
- image: z.union([z.number(), z.string(), z.any()]).optional(),
958
- imageOutput: z.union([z.number(), z.string(), z.any()]).optional(),
959
- audio: z.union([z.number(), z.string(), z.any()]).optional(),
960
- inputAudioCache: z.union([z.number(), z.string(), z.any()]).optional(),
961
- webSearch: z.union([z.number(), z.string(), z.any()]).optional(),
962
- internalReasoning: z.union([z.number(), z.string(), z.any()]).optional(),
963
- inputCacheRead: z.union([z.number(), z.string(), z.any()]).optional(),
964
- inputCacheWrite: z.union([z.number(), z.string(), z.any()]).optional(),
965
- discount: z.number().optional(),
966
- }).transform((v) => {
967
- return remap$(v, {
968
- imageOutput: "image_output",
969
- inputAudioCache: "input_audio_cache",
970
- webSearch: "web_search",
971
- internalReasoning: "internal_reasoning",
972
- inputCacheRead: "input_cache_read",
973
- inputCacheWrite: "input_cache_write",
974
- });
975
- });
976
-
977
- /**
978
- * @internal
979
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
980
- */
981
- export namespace ListModelsPricing$ {
982
- /** @deprecated use `ListModelsPricing$inboundSchema` instead. */
983
- export const inboundSchema = ListModelsPricing$inboundSchema;
984
- /** @deprecated use `ListModelsPricing$outboundSchema` instead. */
985
- export const outboundSchema = ListModelsPricing$outboundSchema;
986
- /** @deprecated use `ListModelsPricing$Outbound` instead. */
987
- export type Outbound = ListModelsPricing$Outbound;
988
- }
989
-
990
- export function listModelsPricingToJSON(
991
- listModelsPricing: ListModelsPricing,
992
- ): string {
993
- return JSON.stringify(
994
- ListModelsPricing$outboundSchema.parse(listModelsPricing),
995
- );
996
- }
997
-
998
- export function listModelsPricingFromJSON(
999
- jsonString: string,
1000
- ): SafeParseResult<ListModelsPricing, SDKValidationError> {
1001
- return safeParse(
1002
- jsonString,
1003
- (x) => ListModelsPricing$inboundSchema.parse(JSON.parse(x)),
1004
- `Failed to parse 'ListModelsPricing' from JSON`,
1005
- );
1006
- }
1007
-
1008
- /** @internal */
1009
- export const ListModelsTokenizer$inboundSchema: z.ZodNativeEnum<
1010
- typeof ListModelsTokenizer
1011
- > = z.nativeEnum(ListModelsTokenizer);
1012
-
1013
- /** @internal */
1014
- export const ListModelsTokenizer$outboundSchema: z.ZodNativeEnum<
1015
- typeof ListModelsTokenizer
1016
- > = ListModelsTokenizer$inboundSchema;
1017
-
1018
- /**
1019
- * @internal
1020
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1021
- */
1022
- export namespace ListModelsTokenizer$ {
1023
- /** @deprecated use `ListModelsTokenizer$inboundSchema` instead. */
1024
- export const inboundSchema = ListModelsTokenizer$inboundSchema;
1025
- /** @deprecated use `ListModelsTokenizer$outboundSchema` instead. */
1026
- export const outboundSchema = ListModelsTokenizer$outboundSchema;
1027
- }
1028
-
1029
- /** @internal */
1030
- export const ListModelsInstructType$inboundSchema: z.ZodNativeEnum<
1031
- typeof ListModelsInstructType
1032
- > = z.nativeEnum(ListModelsInstructType);
1033
-
1034
- /** @internal */
1035
- export const ListModelsInstructType$outboundSchema: z.ZodNativeEnum<
1036
- typeof ListModelsInstructType
1037
- > = ListModelsInstructType$inboundSchema;
1038
-
1039
- /**
1040
- * @internal
1041
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1042
- */
1043
- export namespace ListModelsInstructType$ {
1044
- /** @deprecated use `ListModelsInstructType$inboundSchema` instead. */
1045
- export const inboundSchema = ListModelsInstructType$inboundSchema;
1046
- /** @deprecated use `ListModelsInstructType$outboundSchema` instead. */
1047
- export const outboundSchema = ListModelsInstructType$outboundSchema;
1048
- }
1049
-
1050
- /** @internal */
1051
- export const ListModelsInputModality$inboundSchema: z.ZodNativeEnum<
1052
- typeof ListModelsInputModality
1053
- > = z.nativeEnum(ListModelsInputModality);
1054
-
1055
- /** @internal */
1056
- export const ListModelsInputModality$outboundSchema: z.ZodNativeEnum<
1057
- typeof ListModelsInputModality
1058
- > = ListModelsInputModality$inboundSchema;
1059
-
1060
- /**
1061
- * @internal
1062
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1063
- */
1064
- export namespace ListModelsInputModality$ {
1065
- /** @deprecated use `ListModelsInputModality$inboundSchema` instead. */
1066
- export const inboundSchema = ListModelsInputModality$inboundSchema;
1067
- /** @deprecated use `ListModelsInputModality$outboundSchema` instead. */
1068
- export const outboundSchema = ListModelsInputModality$outboundSchema;
1069
- }
1070
-
1071
- /** @internal */
1072
- export const ListModelsOutputModality$inboundSchema: z.ZodNativeEnum<
1073
- typeof ListModelsOutputModality
1074
- > = z.nativeEnum(ListModelsOutputModality);
1075
-
1076
- /** @internal */
1077
- export const ListModelsOutputModality$outboundSchema: z.ZodNativeEnum<
1078
- typeof ListModelsOutputModality
1079
- > = ListModelsOutputModality$inboundSchema;
1080
-
1081
- /**
1082
- * @internal
1083
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1084
- */
1085
- export namespace ListModelsOutputModality$ {
1086
- /** @deprecated use `ListModelsOutputModality$inboundSchema` instead. */
1087
- export const inboundSchema = ListModelsOutputModality$inboundSchema;
1088
- /** @deprecated use `ListModelsOutputModality$outboundSchema` instead. */
1089
- export const outboundSchema = ListModelsOutputModality$outboundSchema;
1090
- }
1091
-
1092
- /** @internal */
1093
- export const ListModelsArchitecture$inboundSchema: z.ZodType<
1094
- ListModelsArchitecture,
1095
- z.ZodTypeDef,
1096
- unknown
1097
- > = z.object({
1098
- tokenizer: ListModelsTokenizer$inboundSchema.optional(),
1099
- instruct_type: z.nullable(ListModelsInstructType$inboundSchema).optional(),
1100
- modality: z.nullable(z.string()),
1101
- input_modalities: z.array(ListModelsInputModality$inboundSchema),
1102
- output_modalities: z.array(ListModelsOutputModality$inboundSchema),
1103
- }).transform((v) => {
1104
- return remap$(v, {
1105
- "instruct_type": "instructType",
1106
- "input_modalities": "inputModalities",
1107
- "output_modalities": "outputModalities",
1108
- });
1109
- });
1110
-
1111
- /** @internal */
1112
- export type ListModelsArchitecture$Outbound = {
1113
- tokenizer?: string | undefined;
1114
- instruct_type?: string | null | undefined;
1115
- modality: string | null;
1116
- input_modalities: Array<string>;
1117
- output_modalities: Array<string>;
1118
- };
1119
-
1120
- /** @internal */
1121
- export const ListModelsArchitecture$outboundSchema: z.ZodType<
1122
- ListModelsArchitecture$Outbound,
1123
- z.ZodTypeDef,
1124
- ListModelsArchitecture
1125
- > = z.object({
1126
- tokenizer: ListModelsTokenizer$outboundSchema.optional(),
1127
- instructType: z.nullable(ListModelsInstructType$outboundSchema).optional(),
1128
- modality: z.nullable(z.string()),
1129
- inputModalities: z.array(ListModelsInputModality$outboundSchema),
1130
- outputModalities: z.array(ListModelsOutputModality$outboundSchema),
1131
- }).transform((v) => {
1132
- return remap$(v, {
1133
- instructType: "instruct_type",
1134
- inputModalities: "input_modalities",
1135
- outputModalities: "output_modalities",
1136
- });
1137
- });
1138
-
1139
- /**
1140
- * @internal
1141
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1142
- */
1143
- export namespace ListModelsArchitecture$ {
1144
- /** @deprecated use `ListModelsArchitecture$inboundSchema` instead. */
1145
- export const inboundSchema = ListModelsArchitecture$inboundSchema;
1146
- /** @deprecated use `ListModelsArchitecture$outboundSchema` instead. */
1147
- export const outboundSchema = ListModelsArchitecture$outboundSchema;
1148
- /** @deprecated use `ListModelsArchitecture$Outbound` instead. */
1149
- export type Outbound = ListModelsArchitecture$Outbound;
1150
- }
1151
-
1152
- export function listModelsArchitectureToJSON(
1153
- listModelsArchitecture: ListModelsArchitecture,
1154
- ): string {
1155
- return JSON.stringify(
1156
- ListModelsArchitecture$outboundSchema.parse(listModelsArchitecture),
1157
- );
1158
- }
1159
-
1160
- export function listModelsArchitectureFromJSON(
1161
- jsonString: string,
1162
- ): SafeParseResult<ListModelsArchitecture, SDKValidationError> {
1163
- return safeParse(
1164
- jsonString,
1165
- (x) => ListModelsArchitecture$inboundSchema.parse(JSON.parse(x)),
1166
- `Failed to parse 'ListModelsArchitecture' from JSON`,
1167
- );
1168
- }
1169
-
1170
- /** @internal */
1171
- export const ListModelsTopProvider$inboundSchema: z.ZodType<
1172
- ListModelsTopProvider,
1173
- z.ZodTypeDef,
1174
- unknown
1175
- > = z.object({
1176
- context_length: z.nullable(z.number()).optional(),
1177
- max_completion_tokens: z.nullable(z.number()).optional(),
1178
- is_moderated: z.boolean(),
1179
- }).transform((v) => {
1180
- return remap$(v, {
1181
- "context_length": "contextLength",
1182
- "max_completion_tokens": "maxCompletionTokens",
1183
- "is_moderated": "isModerated",
1184
- });
1185
- });
1186
-
1187
- /** @internal */
1188
- export type ListModelsTopProvider$Outbound = {
1189
- context_length?: number | null | undefined;
1190
- max_completion_tokens?: number | null | undefined;
1191
- is_moderated: boolean;
1192
- };
1193
-
1194
- /** @internal */
1195
- export const ListModelsTopProvider$outboundSchema: z.ZodType<
1196
- ListModelsTopProvider$Outbound,
1197
- z.ZodTypeDef,
1198
- ListModelsTopProvider
1199
- > = z.object({
1200
- contextLength: z.nullable(z.number()).optional(),
1201
- maxCompletionTokens: z.nullable(z.number()).optional(),
1202
- isModerated: z.boolean(),
1203
- }).transform((v) => {
1204
- return remap$(v, {
1205
- contextLength: "context_length",
1206
- maxCompletionTokens: "max_completion_tokens",
1207
- isModerated: "is_moderated",
1208
- });
1209
- });
1210
-
1211
- /**
1212
- * @internal
1213
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1214
- */
1215
- export namespace ListModelsTopProvider$ {
1216
- /** @deprecated use `ListModelsTopProvider$inboundSchema` instead. */
1217
- export const inboundSchema = ListModelsTopProvider$inboundSchema;
1218
- /** @deprecated use `ListModelsTopProvider$outboundSchema` instead. */
1219
- export const outboundSchema = ListModelsTopProvider$outboundSchema;
1220
- /** @deprecated use `ListModelsTopProvider$Outbound` instead. */
1221
- export type Outbound = ListModelsTopProvider$Outbound;
1222
- }
1223
-
1224
- export function listModelsTopProviderToJSON(
1225
- listModelsTopProvider: ListModelsTopProvider,
1226
- ): string {
1227
- return JSON.stringify(
1228
- ListModelsTopProvider$outboundSchema.parse(listModelsTopProvider),
1229
- );
1230
- }
1231
-
1232
- export function listModelsTopProviderFromJSON(
1233
- jsonString: string,
1234
- ): SafeParseResult<ListModelsTopProvider, SDKValidationError> {
1235
- return safeParse(
1236
- jsonString,
1237
- (x) => ListModelsTopProvider$inboundSchema.parse(JSON.parse(x)),
1238
- `Failed to parse 'ListModelsTopProvider' from JSON`,
1239
- );
1240
- }
1241
-
1242
- /** @internal */
1243
- export const ListModelsPerRequestLimits$inboundSchema: z.ZodType<
1244
- ListModelsPerRequestLimits,
1245
- z.ZodTypeDef,
1246
- unknown
1247
- > = z.object({
1248
- prompt_tokens: z.any().optional(),
1249
- completion_tokens: z.any().optional(),
1250
- }).transform((v) => {
1251
- return remap$(v, {
1252
- "prompt_tokens": "promptTokens",
1253
- "completion_tokens": "completionTokens",
1254
- });
1255
- });
1256
-
1257
- /** @internal */
1258
- export type ListModelsPerRequestLimits$Outbound = {
1259
- prompt_tokens?: any | undefined;
1260
- completion_tokens?: any | undefined;
1261
- };
1262
-
1263
- /** @internal */
1264
- export const ListModelsPerRequestLimits$outboundSchema: z.ZodType<
1265
- ListModelsPerRequestLimits$Outbound,
1266
- z.ZodTypeDef,
1267
- ListModelsPerRequestLimits
1268
- > = z.object({
1269
- promptTokens: z.any().optional(),
1270
- completionTokens: z.any().optional(),
1271
- }).transform((v) => {
1272
- return remap$(v, {
1273
- promptTokens: "prompt_tokens",
1274
- completionTokens: "completion_tokens",
1275
- });
1276
- });
1277
-
1278
- /**
1279
- * @internal
1280
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1281
- */
1282
- export namespace ListModelsPerRequestLimits$ {
1283
- /** @deprecated use `ListModelsPerRequestLimits$inboundSchema` instead. */
1284
- export const inboundSchema = ListModelsPerRequestLimits$inboundSchema;
1285
- /** @deprecated use `ListModelsPerRequestLimits$outboundSchema` instead. */
1286
- export const outboundSchema = ListModelsPerRequestLimits$outboundSchema;
1287
- /** @deprecated use `ListModelsPerRequestLimits$Outbound` instead. */
1288
- export type Outbound = ListModelsPerRequestLimits$Outbound;
1289
- }
1290
-
1291
- export function listModelsPerRequestLimitsToJSON(
1292
- listModelsPerRequestLimits: ListModelsPerRequestLimits,
1293
- ): string {
1294
- return JSON.stringify(
1295
- ListModelsPerRequestLimits$outboundSchema.parse(listModelsPerRequestLimits),
1296
- );
1297
- }
1298
-
1299
- export function listModelsPerRequestLimitsFromJSON(
1300
- jsonString: string,
1301
- ): SafeParseResult<ListModelsPerRequestLimits, SDKValidationError> {
1302
- return safeParse(
1303
- jsonString,
1304
- (x) => ListModelsPerRequestLimits$inboundSchema.parse(JSON.parse(x)),
1305
- `Failed to parse 'ListModelsPerRequestLimits' from JSON`,
1306
- );
1307
- }
1308
-
1309
- /** @internal */
1310
- export const ListModelsSupportedParameter$inboundSchema: z.ZodNativeEnum<
1311
- typeof ListModelsSupportedParameter
1312
- > = z.nativeEnum(ListModelsSupportedParameter);
1313
-
1314
- /** @internal */
1315
- export const ListModelsSupportedParameter$outboundSchema: z.ZodNativeEnum<
1316
- typeof ListModelsSupportedParameter
1317
- > = ListModelsSupportedParameter$inboundSchema;
1318
-
1319
- /**
1320
- * @internal
1321
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1322
- */
1323
- export namespace ListModelsSupportedParameter$ {
1324
- /** @deprecated use `ListModelsSupportedParameter$inboundSchema` instead. */
1325
- export const inboundSchema = ListModelsSupportedParameter$inboundSchema;
1326
- /** @deprecated use `ListModelsSupportedParameter$outboundSchema` instead. */
1327
- export const outboundSchema = ListModelsSupportedParameter$outboundSchema;
1328
- }
1329
-
1330
- /** @internal */
1331
- export const ListModelsDefaultParameters$inboundSchema: z.ZodType<
1332
- ListModelsDefaultParameters,
1333
- z.ZodTypeDef,
1334
- unknown
1335
- > = z.object({
1336
- temperature: z.nullable(z.number()).optional(),
1337
- top_p: z.nullable(z.number()).optional(),
1338
- frequency_penalty: z.nullable(z.number()).optional(),
1339
- }).transform((v) => {
1340
- return remap$(v, {
1341
- "top_p": "topP",
1342
- "frequency_penalty": "frequencyPenalty",
1343
- });
1344
- });
1345
-
1346
- /** @internal */
1347
- export type ListModelsDefaultParameters$Outbound = {
1348
- temperature?: number | null | undefined;
1349
- top_p?: number | null | undefined;
1350
- frequency_penalty?: number | null | undefined;
1351
- };
1352
-
1353
- /** @internal */
1354
- export const ListModelsDefaultParameters$outboundSchema: z.ZodType<
1355
- ListModelsDefaultParameters$Outbound,
1356
- z.ZodTypeDef,
1357
- ListModelsDefaultParameters
1358
- > = z.object({
1359
- temperature: z.nullable(z.number()).optional(),
1360
- topP: z.nullable(z.number()).optional(),
1361
- frequencyPenalty: z.nullable(z.number()).optional(),
1362
- }).transform((v) => {
1363
- return remap$(v, {
1364
- topP: "top_p",
1365
- frequencyPenalty: "frequency_penalty",
1366
- });
1367
- });
1368
-
1369
- /**
1370
- * @internal
1371
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1372
- */
1373
- export namespace ListModelsDefaultParameters$ {
1374
- /** @deprecated use `ListModelsDefaultParameters$inboundSchema` instead. */
1375
- export const inboundSchema = ListModelsDefaultParameters$inboundSchema;
1376
- /** @deprecated use `ListModelsDefaultParameters$outboundSchema` instead. */
1377
- export const outboundSchema = ListModelsDefaultParameters$outboundSchema;
1378
- /** @deprecated use `ListModelsDefaultParameters$Outbound` instead. */
1379
- export type Outbound = ListModelsDefaultParameters$Outbound;
1380
- }
1381
-
1382
- export function listModelsDefaultParametersToJSON(
1383
- listModelsDefaultParameters: ListModelsDefaultParameters,
1384
- ): string {
1385
- return JSON.stringify(
1386
- ListModelsDefaultParameters$outboundSchema.parse(
1387
- listModelsDefaultParameters,
1388
- ),
1389
- );
1390
- }
1391
-
1392
- export function listModelsDefaultParametersFromJSON(
1393
- jsonString: string,
1394
- ): SafeParseResult<ListModelsDefaultParameters, SDKValidationError> {
1395
- return safeParse(
1396
- jsonString,
1397
- (x) => ListModelsDefaultParameters$inboundSchema.parse(JSON.parse(x)),
1398
- `Failed to parse 'ListModelsDefaultParameters' from JSON`,
1399
- );
1400
- }
1401
-
1402
- /** @internal */
1403
- export const ListModelsData$inboundSchema: z.ZodType<
1404
- ListModelsData,
1405
- z.ZodTypeDef,
1406
- unknown
1407
- > = z.object({
1408
- id: z.string(),
1409
- canonical_slug: z.string(),
1410
- hugging_face_id: z.nullable(z.string()).optional(),
1411
- name: z.string(),
1412
- created: z.number(),
1413
- description: z.string().optional(),
1414
- pricing: z.lazy(() => ListModelsPricing$inboundSchema),
1415
- context_length: z.nullable(z.number()),
1416
- architecture: z.lazy(() => ListModelsArchitecture$inboundSchema),
1417
- top_provider: z.lazy(() => ListModelsTopProvider$inboundSchema),
1418
- per_request_limits: z.nullable(
1419
- z.lazy(() => ListModelsPerRequestLimits$inboundSchema),
1420
- ),
1421
- supported_parameters: z.array(ListModelsSupportedParameter$inboundSchema),
1422
- default_parameters: z.nullable(
1423
- z.lazy(() => ListModelsDefaultParameters$inboundSchema),
1424
- ),
1425
- }).transform((v) => {
1426
- return remap$(v, {
1427
- "canonical_slug": "canonicalSlug",
1428
- "hugging_face_id": "huggingFaceId",
1429
- "context_length": "contextLength",
1430
- "top_provider": "topProvider",
1431
- "per_request_limits": "perRequestLimits",
1432
- "supported_parameters": "supportedParameters",
1433
- "default_parameters": "defaultParameters",
1434
- });
1435
- });
1436
-
1437
- /** @internal */
1438
- export type ListModelsData$Outbound = {
1439
- id: string;
1440
- canonical_slug: string;
1441
- hugging_face_id?: string | null | undefined;
1442
- name: string;
1443
- created: number;
1444
- description?: string | undefined;
1445
- pricing: ListModelsPricing$Outbound;
1446
- context_length: number | null;
1447
- architecture: ListModelsArchitecture$Outbound;
1448
- top_provider: ListModelsTopProvider$Outbound;
1449
- per_request_limits: ListModelsPerRequestLimits$Outbound | null;
1450
- supported_parameters: Array<string>;
1451
- default_parameters: ListModelsDefaultParameters$Outbound | null;
1452
- };
1453
-
1454
- /** @internal */
1455
- export const ListModelsData$outboundSchema: z.ZodType<
1456
- ListModelsData$Outbound,
1457
- z.ZodTypeDef,
1458
- ListModelsData
1459
- > = z.object({
1460
- id: z.string(),
1461
- canonicalSlug: z.string(),
1462
- huggingFaceId: z.nullable(z.string()).optional(),
1463
- name: z.string(),
1464
- created: z.number(),
1465
- description: z.string().optional(),
1466
- pricing: z.lazy(() => ListModelsPricing$outboundSchema),
1467
- contextLength: z.nullable(z.number()),
1468
- architecture: z.lazy(() => ListModelsArchitecture$outboundSchema),
1469
- topProvider: z.lazy(() => ListModelsTopProvider$outboundSchema),
1470
- perRequestLimits: z.nullable(
1471
- z.lazy(() => ListModelsPerRequestLimits$outboundSchema),
1472
- ),
1473
- supportedParameters: z.array(ListModelsSupportedParameter$outboundSchema),
1474
- defaultParameters: z.nullable(
1475
- z.lazy(() => ListModelsDefaultParameters$outboundSchema),
1476
- ),
1477
- }).transform((v) => {
1478
- return remap$(v, {
1479
- canonicalSlug: "canonical_slug",
1480
- huggingFaceId: "hugging_face_id",
1481
- contextLength: "context_length",
1482
- topProvider: "top_provider",
1483
- perRequestLimits: "per_request_limits",
1484
- supportedParameters: "supported_parameters",
1485
- defaultParameters: "default_parameters",
1486
- });
1487
- });
1488
-
1489
- /**
1490
- * @internal
1491
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1492
- */
1493
- export namespace ListModelsData$ {
1494
- /** @deprecated use `ListModelsData$inboundSchema` instead. */
1495
- export const inboundSchema = ListModelsData$inboundSchema;
1496
- /** @deprecated use `ListModelsData$outboundSchema` instead. */
1497
- export const outboundSchema = ListModelsData$outboundSchema;
1498
- /** @deprecated use `ListModelsData$Outbound` instead. */
1499
- export type Outbound = ListModelsData$Outbound;
1500
- }
1501
-
1502
- export function listModelsDataToJSON(listModelsData: ListModelsData): string {
1503
- return JSON.stringify(ListModelsData$outboundSchema.parse(listModelsData));
1504
- }
1505
-
1506
- export function listModelsDataFromJSON(
96
+ export function listModelsRequestFromJSON(
1507
97
  jsonString: string,
1508
- ): SafeParseResult<ListModelsData, SDKValidationError> {
98
+ ): SafeParseResult<ListModelsRequest, SDKValidationError> {
1509
99
  return safeParse(
1510
100
  jsonString,
1511
- (x) => ListModelsData$inboundSchema.parse(JSON.parse(x)),
1512
- `Failed to parse 'ListModelsData' from JSON`,
101
+ (x) => ListModelsRequest$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'ListModelsRequest' from JSON`,
1513
103
  );
1514
104
  }
1515
105
 
@@ -1519,12 +109,12 @@ export const ListModelsResponseBody$inboundSchema: z.ZodType<
1519
109
  z.ZodTypeDef,
1520
110
  unknown
1521
111
  > = z.object({
1522
- data: z.array(z.lazy(() => ListModelsData$inboundSchema)),
112
+ data: z.array(models.ModelsList$inboundSchema),
1523
113
  });
1524
114
 
1525
115
  /** @internal */
1526
116
  export type ListModelsResponseBody$Outbound = {
1527
- data: Array<ListModelsData$Outbound>;
117
+ data: Array<models.ModelsList$Outbound>;
1528
118
  };
1529
119
 
1530
120
  /** @internal */
@@ -1533,7 +123,7 @@ export const ListModelsResponseBody$outboundSchema: z.ZodType<
1533
123
  z.ZodTypeDef,
1534
124
  ListModelsResponseBody
1535
125
  > = z.object({
1536
- data: z.array(z.lazy(() => ListModelsData$outboundSchema)),
126
+ data: z.array(models.ModelsList$outboundSchema),
1537
127
  });
1538
128
 
1539
129
  /**