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

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 (286) hide show
  1. package/FUNCTIONS.md +3 -3
  2. package/REACT_QUERY.md +4 -4
  3. package/README.md +9 -9
  4. package/dist/commonjs/funcs/betaResponsesSend.d.ts +26 -0
  5. package/dist/commonjs/funcs/betaResponsesSend.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/{betaResponsesSendRequest.js → betaResponsesSend.js} +5 -13
  7. package/dist/commonjs/funcs/betaResponsesSend.js.map +1 -0
  8. package/dist/commonjs/funcs/chatSend.d.ts +3 -13
  9. package/dist/commonjs/funcs/chatSend.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/chatSend.js +1 -8
  11. package/dist/commonjs/funcs/chatSend.js.map +1 -1
  12. package/dist/commonjs/funcs/modelsList.d.ts +1 -7
  13. package/dist/commonjs/funcs/modelsList.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/modelsList.js +1 -8
  15. package/dist/commonjs/funcs/modelsList.js.map +1 -1
  16. package/dist/commonjs/lib/config.d.ts +3 -3
  17. package/dist/commonjs/lib/config.js +3 -3
  18. package/dist/commonjs/models/createapikeydata.d.ts +120 -0
  19. package/dist/commonjs/models/createapikeydata.d.ts.map +1 -0
  20. package/dist/commonjs/models/createapikeydata.js +134 -0
  21. package/dist/commonjs/models/createapikeydata.js.map +1 -0
  22. package/dist/commonjs/models/endpointslist.d.ts +8 -8
  23. package/dist/commonjs/models/endpointslist.d.ts.map +1 -1
  24. package/dist/commonjs/models/endpointslist.js +13 -13
  25. package/dist/commonjs/models/endpointslist.js.map +1 -1
  26. package/dist/commonjs/models/getapikeydata.d.ts +120 -0
  27. package/dist/commonjs/models/getapikeydata.d.ts.map +1 -0
  28. package/dist/commonjs/models/getapikeydata.js +134 -0
  29. package/dist/commonjs/models/getapikeydata.js.map +1 -0
  30. package/dist/commonjs/models/index.d.ts +5 -4
  31. package/dist/commonjs/models/index.d.ts.map +1 -1
  32. package/dist/commonjs/models/index.js +5 -4
  33. package/dist/commonjs/models/index.js.map +1 -1
  34. package/dist/commonjs/models/keyinfo.d.ts +8 -8
  35. package/dist/commonjs/models/listapikeysdata.d.ts +117 -0
  36. package/dist/commonjs/models/listapikeysdata.d.ts.map +1 -0
  37. package/dist/commonjs/models/listapikeysdata.js +134 -0
  38. package/dist/commonjs/models/listapikeysdata.js.map +1 -0
  39. package/dist/commonjs/models/operations/create.d.ts +43 -68
  40. package/dist/commonjs/models/operations/create.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/create.js +31 -54
  42. package/dist/commonjs/models/operations/create.js.map +1 -1
  43. package/dist/commonjs/models/operations/generate.d.ts +103 -103
  44. package/dist/commonjs/models/operations/generate.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/generate.js +142 -153
  46. package/dist/commonjs/models/operations/generate.js.map +1 -1
  47. package/dist/commonjs/models/operations/getapikey.d.ts +3 -68
  48. package/dist/commonjs/models/operations/getapikey.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/getapikey.js +4 -55
  50. package/dist/commonjs/models/operations/getapikey.js.map +1 -1
  51. package/dist/commonjs/models/operations/listapikeys.d.ts +3 -65
  52. package/dist/commonjs/models/operations/listapikeys.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/listapikeys.js +4 -54
  54. package/dist/commonjs/models/operations/listapikeys.js.map +1 -1
  55. package/dist/commonjs/models/operations/sendresponsesrequest.d.ts +1693 -0
  56. package/dist/commonjs/models/operations/sendresponsesrequest.d.ts.map +1 -1
  57. package/dist/commonjs/models/operations/sendresponsesrequest.js +1156 -1
  58. package/dist/commonjs/models/operations/sendresponsesrequest.js.map +1 -1
  59. package/dist/commonjs/models/operations/update.d.ts +43 -68
  60. package/dist/commonjs/models/operations/update.d.ts.map +1 -1
  61. package/dist/commonjs/models/operations/update.js +31 -54
  62. package/dist/commonjs/models/operations/update.js.map +1 -1
  63. package/dist/commonjs/models/responsesnonstreamingresponse.d.ts +19 -19
  64. package/dist/commonjs/models/responsesnonstreamingresponse.d.ts.map +1 -1
  65. package/dist/commonjs/models/responsesnonstreamingresponse.js +30 -32
  66. package/dist/commonjs/models/responsesnonstreamingresponse.js.map +1 -1
  67. package/dist/commonjs/models/responsesoutputitemreasoning.d.ts +3 -0
  68. package/dist/commonjs/models/responsesoutputitemreasoning.d.ts.map +1 -1
  69. package/dist/commonjs/models/responsesoutputitemreasoning.js +1 -0
  70. package/dist/commonjs/models/responsesoutputitemreasoning.js.map +1 -1
  71. package/dist/commonjs/models/{toolchoice.d.ts → toolchoiceunion.d.ts} +95 -16
  72. package/dist/commonjs/models/toolchoiceunion.d.ts.map +1 -0
  73. package/dist/commonjs/models/{toolchoice.js → toolchoiceunion.js} +94 -21
  74. package/dist/commonjs/models/toolchoiceunion.js.map +1 -0
  75. package/dist/commonjs/models/updateapikeydata.d.ts +120 -0
  76. package/dist/commonjs/models/updateapikeydata.d.ts.map +1 -0
  77. package/dist/commonjs/models/updateapikeydata.js +134 -0
  78. package/dist/commonjs/models/updateapikeydata.js.map +1 -0
  79. package/dist/commonjs/react-query/betaResponsesSend.d.ts +23 -0
  80. package/dist/commonjs/react-query/betaResponsesSend.d.ts.map +1 -0
  81. package/dist/commonjs/react-query/betaResponsesSend.js +47 -0
  82. package/dist/commonjs/react-query/betaResponsesSend.js.map +1 -0
  83. package/dist/commonjs/react-query/chatSend.d.ts +1 -5
  84. package/dist/commonjs/react-query/chatSend.d.ts.map +1 -1
  85. package/dist/commonjs/react-query/chatSend.js +0 -3
  86. package/dist/commonjs/react-query/chatSend.js.map +1 -1
  87. package/dist/commonjs/react-query/index.d.ts +1 -1
  88. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  89. package/dist/commonjs/react-query/index.js +1 -1
  90. package/dist/commonjs/react-query/index.js.map +1 -1
  91. package/dist/commonjs/react-query/modelsList.d.ts +1 -5
  92. package/dist/commonjs/react-query/modelsList.d.ts.map +1 -1
  93. package/dist/commonjs/react-query/modelsList.js +0 -3
  94. package/dist/commonjs/react-query/modelsList.js.map +1 -1
  95. package/dist/commonjs/sdk/chat.d.ts +3 -11
  96. package/dist/commonjs/sdk/chat.d.ts.map +1 -1
  97. package/dist/commonjs/sdk/chat.js +1 -3
  98. package/dist/commonjs/sdk/chat.js.map +1 -1
  99. package/dist/commonjs/sdk/models.d.ts +1 -5
  100. package/dist/commonjs/sdk/models.d.ts.map +1 -1
  101. package/dist/commonjs/sdk/models.js +1 -3
  102. package/dist/commonjs/sdk/models.js.map +1 -1
  103. package/dist/commonjs/sdk/responses.d.ts +5 -13
  104. package/dist/commonjs/sdk/responses.d.ts.map +1 -1
  105. package/dist/commonjs/sdk/responses.js +4 -6
  106. package/dist/commonjs/sdk/responses.js.map +1 -1
  107. package/dist/esm/funcs/betaResponsesSend.d.ts +26 -0
  108. package/dist/esm/funcs/betaResponsesSend.d.ts.map +1 -0
  109. package/dist/esm/funcs/{betaResponsesSendRequest.js → betaResponsesSend.js} +4 -11
  110. package/dist/esm/funcs/betaResponsesSend.js.map +1 -0
  111. package/dist/esm/funcs/chatSend.d.ts +3 -13
  112. package/dist/esm/funcs/chatSend.d.ts.map +1 -1
  113. package/dist/esm/funcs/chatSend.js +1 -7
  114. package/dist/esm/funcs/chatSend.js.map +1 -1
  115. package/dist/esm/funcs/modelsList.d.ts +1 -7
  116. package/dist/esm/funcs/modelsList.d.ts.map +1 -1
  117. package/dist/esm/funcs/modelsList.js +1 -7
  118. package/dist/esm/funcs/modelsList.js.map +1 -1
  119. package/dist/esm/lib/config.d.ts +3 -3
  120. package/dist/esm/lib/config.js +3 -3
  121. package/dist/esm/models/createapikeydata.d.ts +120 -0
  122. package/dist/esm/models/createapikeydata.d.ts.map +1 -0
  123. package/dist/esm/models/createapikeydata.js +96 -0
  124. package/dist/esm/models/createapikeydata.js.map +1 -0
  125. package/dist/esm/models/endpointslist.d.ts +8 -8
  126. package/dist/esm/models/endpointslist.d.ts.map +1 -1
  127. package/dist/esm/models/endpointslist.js +12 -12
  128. package/dist/esm/models/endpointslist.js.map +1 -1
  129. package/dist/esm/models/getapikeydata.d.ts +120 -0
  130. package/dist/esm/models/getapikeydata.d.ts.map +1 -0
  131. package/dist/esm/models/getapikeydata.js +96 -0
  132. package/dist/esm/models/getapikeydata.js.map +1 -0
  133. package/dist/esm/models/index.d.ts +5 -4
  134. package/dist/esm/models/index.d.ts.map +1 -1
  135. package/dist/esm/models/index.js +5 -4
  136. package/dist/esm/models/index.js.map +1 -1
  137. package/dist/esm/models/keyinfo.d.ts +8 -8
  138. package/dist/esm/models/listapikeysdata.d.ts +117 -0
  139. package/dist/esm/models/listapikeysdata.d.ts.map +1 -0
  140. package/dist/esm/models/listapikeysdata.js +96 -0
  141. package/dist/esm/models/listapikeysdata.js.map +1 -0
  142. package/dist/esm/models/operations/create.d.ts +43 -68
  143. package/dist/esm/models/operations/create.d.ts.map +1 -1
  144. package/dist/esm/models/operations/create.js +30 -51
  145. package/dist/esm/models/operations/create.js.map +1 -1
  146. package/dist/esm/models/operations/generate.d.ts +103 -103
  147. package/dist/esm/models/operations/generate.d.ts.map +1 -1
  148. package/dist/esm/models/operations/generate.js +138 -149
  149. package/dist/esm/models/operations/generate.js.map +1 -1
  150. package/dist/esm/models/operations/getapikey.d.ts +3 -68
  151. package/dist/esm/models/operations/getapikey.d.ts.map +1 -1
  152. package/dist/esm/models/operations/getapikey.js +3 -52
  153. package/dist/esm/models/operations/getapikey.js.map +1 -1
  154. package/dist/esm/models/operations/listapikeys.d.ts +3 -65
  155. package/dist/esm/models/operations/listapikeys.d.ts.map +1 -1
  156. package/dist/esm/models/operations/listapikeys.js +3 -51
  157. package/dist/esm/models/operations/listapikeys.js.map +1 -1
  158. package/dist/esm/models/operations/sendresponsesrequest.d.ts +1693 -0
  159. package/dist/esm/models/operations/sendresponsesrequest.d.ts.map +1 -1
  160. package/dist/esm/models/operations/sendresponsesrequest.js +1117 -0
  161. package/dist/esm/models/operations/sendresponsesrequest.js.map +1 -1
  162. package/dist/esm/models/operations/update.d.ts +43 -68
  163. package/dist/esm/models/operations/update.d.ts.map +1 -1
  164. package/dist/esm/models/operations/update.js +30 -51
  165. package/dist/esm/models/operations/update.js.map +1 -1
  166. package/dist/esm/models/responsesnonstreamingresponse.d.ts +19 -19
  167. package/dist/esm/models/responsesnonstreamingresponse.d.ts.map +1 -1
  168. package/dist/esm/models/responsesnonstreamingresponse.js +29 -31
  169. package/dist/esm/models/responsesnonstreamingresponse.js.map +1 -1
  170. package/dist/esm/models/responsesoutputitemreasoning.d.ts +3 -0
  171. package/dist/esm/models/responsesoutputitemreasoning.d.ts.map +1 -1
  172. package/dist/esm/models/responsesoutputitemreasoning.js +1 -0
  173. package/dist/esm/models/responsesoutputitemreasoning.js.map +1 -1
  174. package/dist/esm/models/{toolchoice.d.ts → toolchoiceunion.d.ts} +95 -16
  175. package/dist/esm/models/toolchoiceunion.d.ts.map +1 -0
  176. package/dist/esm/models/toolchoiceunion.js +164 -0
  177. package/dist/esm/models/toolchoiceunion.js.map +1 -0
  178. package/dist/esm/models/updateapikeydata.d.ts +120 -0
  179. package/dist/esm/models/updateapikeydata.d.ts.map +1 -0
  180. package/dist/esm/models/updateapikeydata.js +96 -0
  181. package/dist/esm/models/updateapikeydata.js.map +1 -0
  182. package/dist/esm/react-query/betaResponsesSend.d.ts +23 -0
  183. package/dist/esm/react-query/betaResponsesSend.d.ts.map +1 -0
  184. package/dist/esm/react-query/{betaResponsesSendRequest.js → betaResponsesSend.js} +10 -11
  185. package/dist/esm/react-query/betaResponsesSend.js.map +1 -0
  186. package/dist/esm/react-query/chatSend.d.ts +1 -5
  187. package/dist/esm/react-query/chatSend.d.ts.map +1 -1
  188. package/dist/esm/react-query/chatSend.js +0 -1
  189. package/dist/esm/react-query/chatSend.js.map +1 -1
  190. package/dist/esm/react-query/index.d.ts +1 -1
  191. package/dist/esm/react-query/index.d.ts.map +1 -1
  192. package/dist/esm/react-query/index.js +1 -1
  193. package/dist/esm/react-query/index.js.map +1 -1
  194. package/dist/esm/react-query/modelsList.d.ts +1 -5
  195. package/dist/esm/react-query/modelsList.d.ts.map +1 -1
  196. package/dist/esm/react-query/modelsList.js +0 -1
  197. package/dist/esm/react-query/modelsList.js.map +1 -1
  198. package/dist/esm/sdk/chat.d.ts +3 -11
  199. package/dist/esm/sdk/chat.d.ts.map +1 -1
  200. package/dist/esm/sdk/chat.js +0 -1
  201. package/dist/esm/sdk/chat.js.map +1 -1
  202. package/dist/esm/sdk/models.d.ts +1 -5
  203. package/dist/esm/sdk/models.d.ts.map +1 -1
  204. package/dist/esm/sdk/models.js +0 -1
  205. package/dist/esm/sdk/models.js.map +1 -1
  206. package/dist/esm/sdk/responses.d.ts +5 -13
  207. package/dist/esm/sdk/responses.d.ts.map +1 -1
  208. package/dist/esm/sdk/responses.js +3 -4
  209. package/dist/esm/sdk/responses.js.map +1 -1
  210. package/docs/sdks/apikeys/README.md +4 -0
  211. package/docs/sdks/responses/README.md +9 -9
  212. package/examples/{betaResponsesSendRequest.example.ts → betaResponsesSend.example.ts} +2 -2
  213. package/jsr.json +1 -1
  214. package/package.json +1 -1
  215. package/src/funcs/{betaResponsesSendRequest.ts → betaResponsesSend.ts} +17 -22
  216. package/src/funcs/chatSend.ts +6 -12
  217. package/src/funcs/modelsList.ts +3 -9
  218. package/src/lib/config.ts +3 -3
  219. package/src/models/createapikeydata.ts +222 -0
  220. package/src/models/endpointslist.ts +14 -18
  221. package/src/models/getapikeydata.ts +218 -0
  222. package/src/models/index.ts +5 -4
  223. package/src/models/keyinfo.ts +8 -8
  224. package/src/models/listapikeysdata.ts +217 -0
  225. package/src/models/operations/create.ts +49 -123
  226. package/src/models/operations/generate.ts +232 -188
  227. package/src/models/operations/getapikey.ts +5 -124
  228. package/src/models/operations/listapikeys.ts +5 -122
  229. package/src/models/operations/sendresponsesrequest.ts +2005 -0
  230. package/src/models/operations/update.ts +49 -123
  231. package/src/models/responsesnonstreamingresponse.ts +37 -55
  232. package/src/models/responsesoutputitemreasoning.ts +1 -0
  233. package/src/models/{toolchoice.ts → toolchoiceunion.ts} +181 -37
  234. package/src/models/updateapikeydata.ts +222 -0
  235. package/src/react-query/{betaResponsesSendRequest.ts → betaResponsesSend.ts} +20 -26
  236. package/src/react-query/chatSend.ts +2 -4
  237. package/src/react-query/index.ts +1 -1
  238. package/src/react-query/modelsList.ts +2 -4
  239. package/src/sdk/chat.ts +5 -7
  240. package/src/sdk/models.ts +2 -4
  241. package/src/sdk/responses.ts +16 -19
  242. package/dist/commonjs/funcs/betaResponsesSendRequest.d.ts +0 -36
  243. package/dist/commonjs/funcs/betaResponsesSendRequest.d.ts.map +0 -1
  244. package/dist/commonjs/funcs/betaResponsesSendRequest.js.map +0 -1
  245. package/dist/commonjs/models/openairesponsesrequest.d.ts +0 -1704
  246. package/dist/commonjs/models/openairesponsesrequest.d.ts.map +0 -1
  247. package/dist/commonjs/models/openairesponsesrequest.js +0 -1210
  248. package/dist/commonjs/models/openairesponsesrequest.js.map +0 -1
  249. package/dist/commonjs/models/toolchoice.d.ts.map +0 -1
  250. package/dist/commonjs/models/toolchoice.js.map +0 -1
  251. package/dist/commonjs/models/toolchoicefunction.d.ts +0 -57
  252. package/dist/commonjs/models/toolchoicefunction.d.ts.map +0 -1
  253. package/dist/commonjs/models/toolchoicefunction.js +0 -89
  254. package/dist/commonjs/models/toolchoicefunction.js.map +0 -1
  255. package/dist/commonjs/models/toolchoicetypes.d.ts +0 -33
  256. package/dist/commonjs/models/toolchoicetypes.d.ts.map +0 -1
  257. package/dist/commonjs/models/toolchoicetypes.js +0 -70
  258. package/dist/commonjs/models/toolchoicetypes.js.map +0 -1
  259. package/dist/commonjs/react-query/betaResponsesSendRequest.d.ts +0 -28
  260. package/dist/commonjs/react-query/betaResponsesSendRequest.d.ts.map +0 -1
  261. package/dist/commonjs/react-query/betaResponsesSendRequest.js +0 -50
  262. package/dist/commonjs/react-query/betaResponsesSendRequest.js.map +0 -1
  263. package/dist/esm/funcs/betaResponsesSendRequest.d.ts +0 -36
  264. package/dist/esm/funcs/betaResponsesSendRequest.d.ts.map +0 -1
  265. package/dist/esm/funcs/betaResponsesSendRequest.js.map +0 -1
  266. package/dist/esm/models/openairesponsesrequest.d.ts +0 -1704
  267. package/dist/esm/models/openairesponsesrequest.d.ts.map +0 -1
  268. package/dist/esm/models/openairesponsesrequest.js +0 -1136
  269. package/dist/esm/models/openairesponsesrequest.js.map +0 -1
  270. package/dist/esm/models/toolchoice.d.ts.map +0 -1
  271. package/dist/esm/models/toolchoice.js +0 -95
  272. package/dist/esm/models/toolchoice.js.map +0 -1
  273. package/dist/esm/models/toolchoicefunction.d.ts +0 -57
  274. package/dist/esm/models/toolchoicefunction.d.ts.map +0 -1
  275. package/dist/esm/models/toolchoicefunction.js +0 -51
  276. package/dist/esm/models/toolchoicefunction.js.map +0 -1
  277. package/dist/esm/models/toolchoicetypes.d.ts +0 -33
  278. package/dist/esm/models/toolchoicetypes.d.ts.map +0 -1
  279. package/dist/esm/models/toolchoicetypes.js +0 -32
  280. package/dist/esm/models/toolchoicetypes.js.map +0 -1
  281. package/dist/esm/react-query/betaResponsesSendRequest.d.ts +0 -28
  282. package/dist/esm/react-query/betaResponsesSendRequest.d.ts.map +0 -1
  283. package/dist/esm/react-query/betaResponsesSendRequest.js.map +0 -1
  284. package/src/models/openairesponsesrequest.ts +0 -1974
  285. package/src/models/toolchoicefunction.ts +0 -100
  286. package/src/models/toolchoicetypes.ts +0 -73
@@ -4,11 +4,562 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { EventStream } from "../../lib/event-streams.js";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
7
8
  import { safeParse } from "../../lib/schemas.js";
9
+ import { ClosedEnum } from "../../types/enums.js";
8
10
  import { Result as SafeParseResult } from "../../types/fp.js";
9
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
12
  import * as models from "../index.js";
11
13
 
14
+ export const ServiceTier = {
15
+ Auto: "auto",
16
+ Default: "default",
17
+ Flex: "flex",
18
+ Priority: "priority",
19
+ Scale: "scale",
20
+ } as const;
21
+ export type ServiceTier = ClosedEnum<typeof ServiceTier>;
22
+
23
+ export const Truncation = {
24
+ Auto: "auto",
25
+ Disabled: "disabled",
26
+ } as const;
27
+ export type Truncation = ClosedEnum<typeof Truncation>;
28
+
29
+ /**
30
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
31
+ *
32
+ * @remarks
33
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
34
+ * - deny: use only providers which do not collect user data.
35
+ */
36
+ export const SendResponsesRequestDataCollection = {
37
+ Deny: "deny",
38
+ Allow: "allow",
39
+ } as const;
40
+ /**
41
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
42
+ *
43
+ * @remarks
44
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
45
+ * - deny: use only providers which do not collect user data.
46
+ */
47
+ export type SendResponsesRequestDataCollection = ClosedEnum<
48
+ typeof SendResponsesRequestDataCollection
49
+ >;
50
+
51
+ export const SendResponsesRequestOrderEnum = {
52
+ AnyScale: "AnyScale",
53
+ CentML: "Cent-ML",
54
+ HuggingFace: "HuggingFace",
55
+ Hyperbolic2: "Hyperbolic 2",
56
+ Lepton: "Lepton",
57
+ Lynn2: "Lynn 2",
58
+ Lynn: "Lynn",
59
+ Mancer: "Mancer",
60
+ Modal: "Modal",
61
+ OctoAI: "OctoAI",
62
+ Recursal: "Recursal",
63
+ Reflection: "Reflection",
64
+ Replicate: "Replicate",
65
+ SambaNova2: "SambaNova 2",
66
+ SFCompute: "SF Compute",
67
+ Together2: "Together 2",
68
+ OneDotAI: "01.AI",
69
+ Ai21: "AI21",
70
+ AionLabs: "AionLabs",
71
+ Alibaba: "Alibaba",
72
+ AmazonBedrock: "Amazon Bedrock",
73
+ Anthropic: "Anthropic",
74
+ AtlasCloud: "AtlasCloud",
75
+ Atoma: "Atoma",
76
+ Avian: "Avian",
77
+ Azure: "Azure",
78
+ BaseTen: "BaseTen",
79
+ Cerebras: "Cerebras",
80
+ Chutes: "Chutes",
81
+ Cloudflare: "Cloudflare",
82
+ Cohere: "Cohere",
83
+ CrofAI: "CrofAI",
84
+ Crusoe: "Crusoe",
85
+ DeepInfra: "DeepInfra",
86
+ DeepSeek: "DeepSeek",
87
+ Enfer: "Enfer",
88
+ Featherless: "Featherless",
89
+ Fireworks: "Fireworks",
90
+ Friendli: "Friendli",
91
+ GMICloud: "GMICloud",
92
+ Google: "Google",
93
+ GoogleAIStudio: "Google AI Studio",
94
+ Groq: "Groq",
95
+ Hyperbolic: "Hyperbolic",
96
+ Inception: "Inception",
97
+ InferenceNet: "InferenceNet",
98
+ Infermatic: "Infermatic",
99
+ Inflection: "Inflection",
100
+ InoCloud: "InoCloud",
101
+ Kluster: "Kluster",
102
+ Lambda: "Lambda",
103
+ Liquid: "Liquid",
104
+ Mancer2: "Mancer 2",
105
+ Meta: "Meta",
106
+ Minimax: "Minimax",
107
+ Mistral: "Mistral",
108
+ MoonshotAI: "Moonshot AI",
109
+ Morph: "Morph",
110
+ NCompass: "NCompass",
111
+ Nebius: "Nebius",
112
+ NextBit: "NextBit",
113
+ Nineteen: "Nineteen",
114
+ Novita: "Novita",
115
+ Nvidia: "Nvidia",
116
+ OpenAI: "OpenAI",
117
+ OpenInference: "OpenInference",
118
+ Parasail: "Parasail",
119
+ Perplexity: "Perplexity",
120
+ Phala: "Phala",
121
+ Relace: "Relace",
122
+ SambaNova: "SambaNova",
123
+ SiliconFlow: "SiliconFlow",
124
+ Stealth: "Stealth",
125
+ Switchpoint: "Switchpoint",
126
+ Targon: "Targon",
127
+ Together: "Together",
128
+ Ubicloud: "Ubicloud",
129
+ Venice: "Venice",
130
+ WandB: "WandB",
131
+ XAI: "xAI",
132
+ ZAi: "Z.AI",
133
+ FakeProvider: "FakeProvider",
134
+ } as const;
135
+ export type SendResponsesRequestOrderEnum = ClosedEnum<
136
+ typeof SendResponsesRequestOrderEnum
137
+ >;
138
+
139
+ export type SendResponsesRequestOrderUnion =
140
+ | SendResponsesRequestOrderEnum
141
+ | string;
142
+
143
+ export const SendResponsesRequestOnlyEnum = {
144
+ AnyScale: "AnyScale",
145
+ CentML: "Cent-ML",
146
+ HuggingFace: "HuggingFace",
147
+ Hyperbolic2: "Hyperbolic 2",
148
+ Lepton: "Lepton",
149
+ Lynn2: "Lynn 2",
150
+ Lynn: "Lynn",
151
+ Mancer: "Mancer",
152
+ Modal: "Modal",
153
+ OctoAI: "OctoAI",
154
+ Recursal: "Recursal",
155
+ Reflection: "Reflection",
156
+ Replicate: "Replicate",
157
+ SambaNova2: "SambaNova 2",
158
+ SFCompute: "SF Compute",
159
+ Together2: "Together 2",
160
+ OneDotAI: "01.AI",
161
+ Ai21: "AI21",
162
+ AionLabs: "AionLabs",
163
+ Alibaba: "Alibaba",
164
+ AmazonBedrock: "Amazon Bedrock",
165
+ Anthropic: "Anthropic",
166
+ AtlasCloud: "AtlasCloud",
167
+ Atoma: "Atoma",
168
+ Avian: "Avian",
169
+ Azure: "Azure",
170
+ BaseTen: "BaseTen",
171
+ Cerebras: "Cerebras",
172
+ Chutes: "Chutes",
173
+ Cloudflare: "Cloudflare",
174
+ Cohere: "Cohere",
175
+ CrofAI: "CrofAI",
176
+ Crusoe: "Crusoe",
177
+ DeepInfra: "DeepInfra",
178
+ DeepSeek: "DeepSeek",
179
+ Enfer: "Enfer",
180
+ Featherless: "Featherless",
181
+ Fireworks: "Fireworks",
182
+ Friendli: "Friendli",
183
+ GMICloud: "GMICloud",
184
+ Google: "Google",
185
+ GoogleAIStudio: "Google AI Studio",
186
+ Groq: "Groq",
187
+ Hyperbolic: "Hyperbolic",
188
+ Inception: "Inception",
189
+ InferenceNet: "InferenceNet",
190
+ Infermatic: "Infermatic",
191
+ Inflection: "Inflection",
192
+ InoCloud: "InoCloud",
193
+ Kluster: "Kluster",
194
+ Lambda: "Lambda",
195
+ Liquid: "Liquid",
196
+ Mancer2: "Mancer 2",
197
+ Meta: "Meta",
198
+ Minimax: "Minimax",
199
+ Mistral: "Mistral",
200
+ MoonshotAI: "Moonshot AI",
201
+ Morph: "Morph",
202
+ NCompass: "NCompass",
203
+ Nebius: "Nebius",
204
+ NextBit: "NextBit",
205
+ Nineteen: "Nineteen",
206
+ Novita: "Novita",
207
+ Nvidia: "Nvidia",
208
+ OpenAI: "OpenAI",
209
+ OpenInference: "OpenInference",
210
+ Parasail: "Parasail",
211
+ Perplexity: "Perplexity",
212
+ Phala: "Phala",
213
+ Relace: "Relace",
214
+ SambaNova: "SambaNova",
215
+ SiliconFlow: "SiliconFlow",
216
+ Stealth: "Stealth",
217
+ Switchpoint: "Switchpoint",
218
+ Targon: "Targon",
219
+ Together: "Together",
220
+ Ubicloud: "Ubicloud",
221
+ Venice: "Venice",
222
+ WandB: "WandB",
223
+ XAI: "xAI",
224
+ ZAi: "Z.AI",
225
+ FakeProvider: "FakeProvider",
226
+ } as const;
227
+ export type SendResponsesRequestOnlyEnum = ClosedEnum<
228
+ typeof SendResponsesRequestOnlyEnum
229
+ >;
230
+
231
+ export type SendResponsesRequestOnlyUnion =
232
+ | SendResponsesRequestOnlyEnum
233
+ | string;
234
+
235
+ export const SendResponsesRequestIgnoreEnum = {
236
+ AnyScale: "AnyScale",
237
+ CentML: "Cent-ML",
238
+ HuggingFace: "HuggingFace",
239
+ Hyperbolic2: "Hyperbolic 2",
240
+ Lepton: "Lepton",
241
+ Lynn2: "Lynn 2",
242
+ Lynn: "Lynn",
243
+ Mancer: "Mancer",
244
+ Modal: "Modal",
245
+ OctoAI: "OctoAI",
246
+ Recursal: "Recursal",
247
+ Reflection: "Reflection",
248
+ Replicate: "Replicate",
249
+ SambaNova2: "SambaNova 2",
250
+ SFCompute: "SF Compute",
251
+ Together2: "Together 2",
252
+ OneDotAI: "01.AI",
253
+ Ai21: "AI21",
254
+ AionLabs: "AionLabs",
255
+ Alibaba: "Alibaba",
256
+ AmazonBedrock: "Amazon Bedrock",
257
+ Anthropic: "Anthropic",
258
+ AtlasCloud: "AtlasCloud",
259
+ Atoma: "Atoma",
260
+ Avian: "Avian",
261
+ Azure: "Azure",
262
+ BaseTen: "BaseTen",
263
+ Cerebras: "Cerebras",
264
+ Chutes: "Chutes",
265
+ Cloudflare: "Cloudflare",
266
+ Cohere: "Cohere",
267
+ CrofAI: "CrofAI",
268
+ Crusoe: "Crusoe",
269
+ DeepInfra: "DeepInfra",
270
+ DeepSeek: "DeepSeek",
271
+ Enfer: "Enfer",
272
+ Featherless: "Featherless",
273
+ Fireworks: "Fireworks",
274
+ Friendli: "Friendli",
275
+ GMICloud: "GMICloud",
276
+ Google: "Google",
277
+ GoogleAIStudio: "Google AI Studio",
278
+ Groq: "Groq",
279
+ Hyperbolic: "Hyperbolic",
280
+ Inception: "Inception",
281
+ InferenceNet: "InferenceNet",
282
+ Infermatic: "Infermatic",
283
+ Inflection: "Inflection",
284
+ InoCloud: "InoCloud",
285
+ Kluster: "Kluster",
286
+ Lambda: "Lambda",
287
+ Liquid: "Liquid",
288
+ Mancer2: "Mancer 2",
289
+ Meta: "Meta",
290
+ Minimax: "Minimax",
291
+ Mistral: "Mistral",
292
+ MoonshotAI: "Moonshot AI",
293
+ Morph: "Morph",
294
+ NCompass: "NCompass",
295
+ Nebius: "Nebius",
296
+ NextBit: "NextBit",
297
+ Nineteen: "Nineteen",
298
+ Novita: "Novita",
299
+ Nvidia: "Nvidia",
300
+ OpenAI: "OpenAI",
301
+ OpenInference: "OpenInference",
302
+ Parasail: "Parasail",
303
+ Perplexity: "Perplexity",
304
+ Phala: "Phala",
305
+ Relace: "Relace",
306
+ SambaNova: "SambaNova",
307
+ SiliconFlow: "SiliconFlow",
308
+ Stealth: "Stealth",
309
+ Switchpoint: "Switchpoint",
310
+ Targon: "Targon",
311
+ Together: "Together",
312
+ Ubicloud: "Ubicloud",
313
+ Venice: "Venice",
314
+ WandB: "WandB",
315
+ XAI: "xAI",
316
+ ZAi: "Z.AI",
317
+ FakeProvider: "FakeProvider",
318
+ } as const;
319
+ export type SendResponsesRequestIgnoreEnum = ClosedEnum<
320
+ typeof SendResponsesRequestIgnoreEnum
321
+ >;
322
+
323
+ export type SendResponsesRequestIgnoreUnion =
324
+ | SendResponsesRequestIgnoreEnum
325
+ | string;
326
+
327
+ export const SendResponsesRequestQuantization = {
328
+ Int4: "int4",
329
+ Int8: "int8",
330
+ Fp4: "fp4",
331
+ Fp6: "fp6",
332
+ Fp8: "fp8",
333
+ Fp16: "fp16",
334
+ Bf16: "bf16",
335
+ Fp32: "fp32",
336
+ Unknown: "unknown",
337
+ } as const;
338
+ export type SendResponsesRequestQuantization = ClosedEnum<
339
+ typeof SendResponsesRequestQuantization
340
+ >;
341
+
342
+ /**
343
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
344
+ */
345
+ export const SendResponsesRequestSort = {
346
+ Price: "price",
347
+ Throughput: "throughput",
348
+ Latency: "latency",
349
+ } as const;
350
+ /**
351
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
352
+ */
353
+ export type SendResponsesRequestSort = ClosedEnum<
354
+ typeof SendResponsesRequestSort
355
+ >;
356
+
357
+ export type SendResponsesRequestPrompt = number | string | any;
358
+
359
+ export type SendResponsesRequestCompletion = number | string | any;
360
+
361
+ export type SendResponsesRequestImage = number | string | any;
362
+
363
+ export type SendResponsesRequestAudio = number | string | any;
364
+
365
+ export type SendResponsesRequestRequestUnion = number | string | any;
366
+
367
+ /**
368
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
369
+ */
370
+ export type SendResponsesRequestMaxPrice = {
371
+ prompt?: number | string | any | undefined;
372
+ completion?: number | string | any | undefined;
373
+ image?: number | string | any | undefined;
374
+ audio?: number | string | any | undefined;
375
+ request?: number | string | any | undefined;
376
+ };
377
+
378
+ export type SendResponsesRequestExperimental = {};
379
+
380
+ /**
381
+ * When multiple model providers are available, optionally indicate your routing preference.
382
+ */
383
+ export type SendResponsesRequestProvider = {
384
+ /**
385
+ * Whether to allow backup providers to serve requests
386
+ *
387
+ * @remarks
388
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
389
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
390
+ */
391
+ allowFallbacks?: boolean | null | undefined;
392
+ /**
393
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
394
+ */
395
+ requireParameters?: boolean | null | undefined;
396
+ /**
397
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
398
+ *
399
+ * @remarks
400
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
401
+ * - deny: use only providers which do not collect user data.
402
+ */
403
+ dataCollection?: SendResponsesRequestDataCollection | null | undefined;
404
+ /**
405
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
406
+ */
407
+ zdr?: boolean | null | undefined;
408
+ /**
409
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
410
+ */
411
+ order?: Array<SendResponsesRequestOrderEnum | string> | null | undefined;
412
+ /**
413
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
414
+ */
415
+ only?: Array<SendResponsesRequestOnlyEnum | string> | null | undefined;
416
+ /**
417
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
418
+ */
419
+ ignore?: Array<SendResponsesRequestIgnoreEnum | string> | null | undefined;
420
+ /**
421
+ * A list of quantization levels to filter the provider by.
422
+ */
423
+ quantizations?: Array<SendResponsesRequestQuantization> | null | undefined;
424
+ /**
425
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
426
+ */
427
+ sort?: SendResponsesRequestSort | null | undefined;
428
+ /**
429
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
430
+ */
431
+ maxPrice?: SendResponsesRequestMaxPrice | undefined;
432
+ experimental?: SendResponsesRequestExperimental | null | undefined;
433
+ };
434
+
435
+ export const IdFileParser = {
436
+ FileParser: "file-parser",
437
+ } as const;
438
+ export type IdFileParser = ClosedEnum<typeof IdFileParser>;
439
+
440
+ export const PdfEngine = {
441
+ MistralOcr: "mistral-ocr",
442
+ PdfText: "pdf-text",
443
+ Native: "native",
444
+ } as const;
445
+ export type PdfEngine = ClosedEnum<typeof PdfEngine>;
446
+
447
+ export type Pdf = {
448
+ engine?: PdfEngine | undefined;
449
+ };
450
+
451
+ export type PluginFileParser = {
452
+ id: IdFileParser;
453
+ maxFiles?: number | undefined;
454
+ pdf?: Pdf | undefined;
455
+ };
456
+
457
+ export const IdChainOfThought = {
458
+ ChainOfThought: "chain-of-thought",
459
+ } as const;
460
+ export type IdChainOfThought = ClosedEnum<typeof IdChainOfThought>;
461
+
462
+ export type PluginChainOfThought = {
463
+ id: IdChainOfThought;
464
+ };
465
+
466
+ export const IdWeb = {
467
+ Web: "web",
468
+ } as const;
469
+ export type IdWeb = ClosedEnum<typeof IdWeb>;
470
+
471
+ export const Engine = {
472
+ Native: "native",
473
+ Exa: "exa",
474
+ } as const;
475
+ export type Engine = ClosedEnum<typeof Engine>;
476
+
477
+ export type PluginWeb = {
478
+ id: IdWeb;
479
+ maxResults?: number | undefined;
480
+ searchPrompt?: string | undefined;
481
+ engine?: Engine | undefined;
482
+ };
483
+
484
+ export const IdModeration = {
485
+ Moderation: "moderation",
486
+ } as const;
487
+ export type IdModeration = ClosedEnum<typeof IdModeration>;
488
+
489
+ export type PluginModeration = {
490
+ id: IdModeration;
491
+ };
492
+
493
+ export type Plugin =
494
+ | PluginModeration
495
+ | PluginWeb
496
+ | PluginChainOfThought
497
+ | PluginFileParser;
498
+
499
+ /**
500
+ * Request schema for OpenAI-compatible Responses API
501
+ */
502
+ export type SendResponsesRequestRequest = {
503
+ /**
504
+ * Input for Responses API (can be a string or array of input items)
505
+ */
506
+ input?: models.ResponseInput | undefined;
507
+ instructions?: string | null | undefined;
508
+ /**
509
+ * Metadata for Responses API requests (max 16 pairs, keys ≤64 chars, values ≤512 chars)
510
+ */
511
+ metadata?: { [k: string]: string } | null | undefined;
512
+ tools?: Array<models.Tool> | undefined;
513
+ /**
514
+ * Tool choice configuration
515
+ */
516
+ toolChoice?: models.ToolChoiceUnion | undefined;
517
+ parallelToolCalls?: boolean | null | undefined;
518
+ model?: string | undefined;
519
+ models?: Array<string> | undefined;
520
+ /**
521
+ * Text configuration for Responses API
522
+ */
523
+ text?: models.ResponseTextConfig | undefined;
524
+ /**
525
+ * Reasoning configuration for Responses API
526
+ */
527
+ reasoning?: models.ResponseReasoningConfig | null | undefined;
528
+ maxOutputTokens?: number | null | undefined;
529
+ temperature?: number | null | undefined;
530
+ topP?: number | null | undefined;
531
+ topK?: number | undefined;
532
+ promptCacheKey?: string | undefined;
533
+ previousResponseId?: string | null | undefined;
534
+ /**
535
+ * Prompt configuration with variables
536
+ */
537
+ prompt?: models.ResponsePrompt | null | undefined;
538
+ include?: Array<models.ResponseIncludable> | null | undefined;
539
+ background?: boolean | null | undefined;
540
+ safetyIdentifier?: string | undefined;
541
+ store?: boolean | null | undefined;
542
+ serviceTier?: ServiceTier | null | undefined;
543
+ truncation?: Truncation | null | undefined;
544
+ stream?: boolean | null | undefined;
545
+ /**
546
+ * When multiple model providers are available, optionally indicate your routing preference.
547
+ */
548
+ provider?: SendResponsesRequestProvider | null | undefined;
549
+ /**
550
+ * Plugins you want to enable for this request, including their settings.
551
+ */
552
+ plugins?:
553
+ | Array<
554
+ PluginModeration | PluginWeb | PluginChainOfThought | PluginFileParser
555
+ >
556
+ | undefined;
557
+ /**
558
+ * A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters.
559
+ */
560
+ user?: string | undefined;
561
+ };
562
+
12
563
  /**
13
564
  * Successful response
14
565
  */
@@ -23,6 +574,1460 @@ export type SendResponsesRequestResponse =
23
574
  | models.ResponsesNonStreamingResponse
24
575
  | EventStream<SendResponsesRequestResponseBody>;
25
576
 
577
+ /** @internal */
578
+ export const ServiceTier$inboundSchema: z.ZodNativeEnum<typeof ServiceTier> = z
579
+ .nativeEnum(ServiceTier);
580
+
581
+ /** @internal */
582
+ export const ServiceTier$outboundSchema: z.ZodNativeEnum<typeof ServiceTier> =
583
+ ServiceTier$inboundSchema;
584
+
585
+ /**
586
+ * @internal
587
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
588
+ */
589
+ export namespace ServiceTier$ {
590
+ /** @deprecated use `ServiceTier$inboundSchema` instead. */
591
+ export const inboundSchema = ServiceTier$inboundSchema;
592
+ /** @deprecated use `ServiceTier$outboundSchema` instead. */
593
+ export const outboundSchema = ServiceTier$outboundSchema;
594
+ }
595
+
596
+ /** @internal */
597
+ export const Truncation$inboundSchema: z.ZodNativeEnum<typeof Truncation> = z
598
+ .nativeEnum(Truncation);
599
+
600
+ /** @internal */
601
+ export const Truncation$outboundSchema: z.ZodNativeEnum<typeof Truncation> =
602
+ Truncation$inboundSchema;
603
+
604
+ /**
605
+ * @internal
606
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
607
+ */
608
+ export namespace Truncation$ {
609
+ /** @deprecated use `Truncation$inboundSchema` instead. */
610
+ export const inboundSchema = Truncation$inboundSchema;
611
+ /** @deprecated use `Truncation$outboundSchema` instead. */
612
+ export const outboundSchema = Truncation$outboundSchema;
613
+ }
614
+
615
+ /** @internal */
616
+ export const SendResponsesRequestDataCollection$inboundSchema: z.ZodNativeEnum<
617
+ typeof SendResponsesRequestDataCollection
618
+ > = z.nativeEnum(SendResponsesRequestDataCollection);
619
+
620
+ /** @internal */
621
+ export const SendResponsesRequestDataCollection$outboundSchema: z.ZodNativeEnum<
622
+ typeof SendResponsesRequestDataCollection
623
+ > = SendResponsesRequestDataCollection$inboundSchema;
624
+
625
+ /**
626
+ * @internal
627
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
628
+ */
629
+ export namespace SendResponsesRequestDataCollection$ {
630
+ /** @deprecated use `SendResponsesRequestDataCollection$inboundSchema` instead. */
631
+ export const inboundSchema = SendResponsesRequestDataCollection$inboundSchema;
632
+ /** @deprecated use `SendResponsesRequestDataCollection$outboundSchema` instead. */
633
+ export const outboundSchema =
634
+ SendResponsesRequestDataCollection$outboundSchema;
635
+ }
636
+
637
+ /** @internal */
638
+ export const SendResponsesRequestOrderEnum$inboundSchema: z.ZodNativeEnum<
639
+ typeof SendResponsesRequestOrderEnum
640
+ > = z.nativeEnum(SendResponsesRequestOrderEnum);
641
+
642
+ /** @internal */
643
+ export const SendResponsesRequestOrderEnum$outboundSchema: z.ZodNativeEnum<
644
+ typeof SendResponsesRequestOrderEnum
645
+ > = SendResponsesRequestOrderEnum$inboundSchema;
646
+
647
+ /**
648
+ * @internal
649
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
650
+ */
651
+ export namespace SendResponsesRequestOrderEnum$ {
652
+ /** @deprecated use `SendResponsesRequestOrderEnum$inboundSchema` instead. */
653
+ export const inboundSchema = SendResponsesRequestOrderEnum$inboundSchema;
654
+ /** @deprecated use `SendResponsesRequestOrderEnum$outboundSchema` instead. */
655
+ export const outboundSchema = SendResponsesRequestOrderEnum$outboundSchema;
656
+ }
657
+
658
+ /** @internal */
659
+ export const SendResponsesRequestOrderUnion$inboundSchema: z.ZodType<
660
+ SendResponsesRequestOrderUnion,
661
+ z.ZodTypeDef,
662
+ unknown
663
+ > = z.union([SendResponsesRequestOrderEnum$inboundSchema, z.string()]);
664
+
665
+ /** @internal */
666
+ export type SendResponsesRequestOrderUnion$Outbound = string | string;
667
+
668
+ /** @internal */
669
+ export const SendResponsesRequestOrderUnion$outboundSchema: z.ZodType<
670
+ SendResponsesRequestOrderUnion$Outbound,
671
+ z.ZodTypeDef,
672
+ SendResponsesRequestOrderUnion
673
+ > = z.union([SendResponsesRequestOrderEnum$outboundSchema, z.string()]);
674
+
675
+ /**
676
+ * @internal
677
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
678
+ */
679
+ export namespace SendResponsesRequestOrderUnion$ {
680
+ /** @deprecated use `SendResponsesRequestOrderUnion$inboundSchema` instead. */
681
+ export const inboundSchema = SendResponsesRequestOrderUnion$inboundSchema;
682
+ /** @deprecated use `SendResponsesRequestOrderUnion$outboundSchema` instead. */
683
+ export const outboundSchema = SendResponsesRequestOrderUnion$outboundSchema;
684
+ /** @deprecated use `SendResponsesRequestOrderUnion$Outbound` instead. */
685
+ export type Outbound = SendResponsesRequestOrderUnion$Outbound;
686
+ }
687
+
688
+ export function sendResponsesRequestOrderUnionToJSON(
689
+ sendResponsesRequestOrderUnion: SendResponsesRequestOrderUnion,
690
+ ): string {
691
+ return JSON.stringify(
692
+ SendResponsesRequestOrderUnion$outboundSchema.parse(
693
+ sendResponsesRequestOrderUnion,
694
+ ),
695
+ );
696
+ }
697
+
698
+ export function sendResponsesRequestOrderUnionFromJSON(
699
+ jsonString: string,
700
+ ): SafeParseResult<SendResponsesRequestOrderUnion, SDKValidationError> {
701
+ return safeParse(
702
+ jsonString,
703
+ (x) => SendResponsesRequestOrderUnion$inboundSchema.parse(JSON.parse(x)),
704
+ `Failed to parse 'SendResponsesRequestOrderUnion' from JSON`,
705
+ );
706
+ }
707
+
708
+ /** @internal */
709
+ export const SendResponsesRequestOnlyEnum$inboundSchema: z.ZodNativeEnum<
710
+ typeof SendResponsesRequestOnlyEnum
711
+ > = z.nativeEnum(SendResponsesRequestOnlyEnum);
712
+
713
+ /** @internal */
714
+ export const SendResponsesRequestOnlyEnum$outboundSchema: z.ZodNativeEnum<
715
+ typeof SendResponsesRequestOnlyEnum
716
+ > = SendResponsesRequestOnlyEnum$inboundSchema;
717
+
718
+ /**
719
+ * @internal
720
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
721
+ */
722
+ export namespace SendResponsesRequestOnlyEnum$ {
723
+ /** @deprecated use `SendResponsesRequestOnlyEnum$inboundSchema` instead. */
724
+ export const inboundSchema = SendResponsesRequestOnlyEnum$inboundSchema;
725
+ /** @deprecated use `SendResponsesRequestOnlyEnum$outboundSchema` instead. */
726
+ export const outboundSchema = SendResponsesRequestOnlyEnum$outboundSchema;
727
+ }
728
+
729
+ /** @internal */
730
+ export const SendResponsesRequestOnlyUnion$inboundSchema: z.ZodType<
731
+ SendResponsesRequestOnlyUnion,
732
+ z.ZodTypeDef,
733
+ unknown
734
+ > = z.union([SendResponsesRequestOnlyEnum$inboundSchema, z.string()]);
735
+
736
+ /** @internal */
737
+ export type SendResponsesRequestOnlyUnion$Outbound = string | string;
738
+
739
+ /** @internal */
740
+ export const SendResponsesRequestOnlyUnion$outboundSchema: z.ZodType<
741
+ SendResponsesRequestOnlyUnion$Outbound,
742
+ z.ZodTypeDef,
743
+ SendResponsesRequestOnlyUnion
744
+ > = z.union([SendResponsesRequestOnlyEnum$outboundSchema, z.string()]);
745
+
746
+ /**
747
+ * @internal
748
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
749
+ */
750
+ export namespace SendResponsesRequestOnlyUnion$ {
751
+ /** @deprecated use `SendResponsesRequestOnlyUnion$inboundSchema` instead. */
752
+ export const inboundSchema = SendResponsesRequestOnlyUnion$inboundSchema;
753
+ /** @deprecated use `SendResponsesRequestOnlyUnion$outboundSchema` instead. */
754
+ export const outboundSchema = SendResponsesRequestOnlyUnion$outboundSchema;
755
+ /** @deprecated use `SendResponsesRequestOnlyUnion$Outbound` instead. */
756
+ export type Outbound = SendResponsesRequestOnlyUnion$Outbound;
757
+ }
758
+
759
+ export function sendResponsesRequestOnlyUnionToJSON(
760
+ sendResponsesRequestOnlyUnion: SendResponsesRequestOnlyUnion,
761
+ ): string {
762
+ return JSON.stringify(
763
+ SendResponsesRequestOnlyUnion$outboundSchema.parse(
764
+ sendResponsesRequestOnlyUnion,
765
+ ),
766
+ );
767
+ }
768
+
769
+ export function sendResponsesRequestOnlyUnionFromJSON(
770
+ jsonString: string,
771
+ ): SafeParseResult<SendResponsesRequestOnlyUnion, SDKValidationError> {
772
+ return safeParse(
773
+ jsonString,
774
+ (x) => SendResponsesRequestOnlyUnion$inboundSchema.parse(JSON.parse(x)),
775
+ `Failed to parse 'SendResponsesRequestOnlyUnion' from JSON`,
776
+ );
777
+ }
778
+
779
+ /** @internal */
780
+ export const SendResponsesRequestIgnoreEnum$inboundSchema: z.ZodNativeEnum<
781
+ typeof SendResponsesRequestIgnoreEnum
782
+ > = z.nativeEnum(SendResponsesRequestIgnoreEnum);
783
+
784
+ /** @internal */
785
+ export const SendResponsesRequestIgnoreEnum$outboundSchema: z.ZodNativeEnum<
786
+ typeof SendResponsesRequestIgnoreEnum
787
+ > = SendResponsesRequestIgnoreEnum$inboundSchema;
788
+
789
+ /**
790
+ * @internal
791
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
792
+ */
793
+ export namespace SendResponsesRequestIgnoreEnum$ {
794
+ /** @deprecated use `SendResponsesRequestIgnoreEnum$inboundSchema` instead. */
795
+ export const inboundSchema = SendResponsesRequestIgnoreEnum$inboundSchema;
796
+ /** @deprecated use `SendResponsesRequestIgnoreEnum$outboundSchema` instead. */
797
+ export const outboundSchema = SendResponsesRequestIgnoreEnum$outboundSchema;
798
+ }
799
+
800
+ /** @internal */
801
+ export const SendResponsesRequestIgnoreUnion$inboundSchema: z.ZodType<
802
+ SendResponsesRequestIgnoreUnion,
803
+ z.ZodTypeDef,
804
+ unknown
805
+ > = z.union([SendResponsesRequestIgnoreEnum$inboundSchema, z.string()]);
806
+
807
+ /** @internal */
808
+ export type SendResponsesRequestIgnoreUnion$Outbound = string | string;
809
+
810
+ /** @internal */
811
+ export const SendResponsesRequestIgnoreUnion$outboundSchema: z.ZodType<
812
+ SendResponsesRequestIgnoreUnion$Outbound,
813
+ z.ZodTypeDef,
814
+ SendResponsesRequestIgnoreUnion
815
+ > = z.union([SendResponsesRequestIgnoreEnum$outboundSchema, z.string()]);
816
+
817
+ /**
818
+ * @internal
819
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
820
+ */
821
+ export namespace SendResponsesRequestIgnoreUnion$ {
822
+ /** @deprecated use `SendResponsesRequestIgnoreUnion$inboundSchema` instead. */
823
+ export const inboundSchema = SendResponsesRequestIgnoreUnion$inboundSchema;
824
+ /** @deprecated use `SendResponsesRequestIgnoreUnion$outboundSchema` instead. */
825
+ export const outboundSchema = SendResponsesRequestIgnoreUnion$outboundSchema;
826
+ /** @deprecated use `SendResponsesRequestIgnoreUnion$Outbound` instead. */
827
+ export type Outbound = SendResponsesRequestIgnoreUnion$Outbound;
828
+ }
829
+
830
+ export function sendResponsesRequestIgnoreUnionToJSON(
831
+ sendResponsesRequestIgnoreUnion: SendResponsesRequestIgnoreUnion,
832
+ ): string {
833
+ return JSON.stringify(
834
+ SendResponsesRequestIgnoreUnion$outboundSchema.parse(
835
+ sendResponsesRequestIgnoreUnion,
836
+ ),
837
+ );
838
+ }
839
+
840
+ export function sendResponsesRequestIgnoreUnionFromJSON(
841
+ jsonString: string,
842
+ ): SafeParseResult<SendResponsesRequestIgnoreUnion, SDKValidationError> {
843
+ return safeParse(
844
+ jsonString,
845
+ (x) => SendResponsesRequestIgnoreUnion$inboundSchema.parse(JSON.parse(x)),
846
+ `Failed to parse 'SendResponsesRequestIgnoreUnion' from JSON`,
847
+ );
848
+ }
849
+
850
+ /** @internal */
851
+ export const SendResponsesRequestQuantization$inboundSchema: z.ZodNativeEnum<
852
+ typeof SendResponsesRequestQuantization
853
+ > = z.nativeEnum(SendResponsesRequestQuantization);
854
+
855
+ /** @internal */
856
+ export const SendResponsesRequestQuantization$outboundSchema: z.ZodNativeEnum<
857
+ typeof SendResponsesRequestQuantization
858
+ > = SendResponsesRequestQuantization$inboundSchema;
859
+
860
+ /**
861
+ * @internal
862
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
863
+ */
864
+ export namespace SendResponsesRequestQuantization$ {
865
+ /** @deprecated use `SendResponsesRequestQuantization$inboundSchema` instead. */
866
+ export const inboundSchema = SendResponsesRequestQuantization$inboundSchema;
867
+ /** @deprecated use `SendResponsesRequestQuantization$outboundSchema` instead. */
868
+ export const outboundSchema = SendResponsesRequestQuantization$outboundSchema;
869
+ }
870
+
871
+ /** @internal */
872
+ export const SendResponsesRequestSort$inboundSchema: z.ZodNativeEnum<
873
+ typeof SendResponsesRequestSort
874
+ > = z.nativeEnum(SendResponsesRequestSort);
875
+
876
+ /** @internal */
877
+ export const SendResponsesRequestSort$outboundSchema: z.ZodNativeEnum<
878
+ typeof SendResponsesRequestSort
879
+ > = SendResponsesRequestSort$inboundSchema;
880
+
881
+ /**
882
+ * @internal
883
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
884
+ */
885
+ export namespace SendResponsesRequestSort$ {
886
+ /** @deprecated use `SendResponsesRequestSort$inboundSchema` instead. */
887
+ export const inboundSchema = SendResponsesRequestSort$inboundSchema;
888
+ /** @deprecated use `SendResponsesRequestSort$outboundSchema` instead. */
889
+ export const outboundSchema = SendResponsesRequestSort$outboundSchema;
890
+ }
891
+
892
+ /** @internal */
893
+ export const SendResponsesRequestPrompt$inboundSchema: z.ZodType<
894
+ SendResponsesRequestPrompt,
895
+ z.ZodTypeDef,
896
+ unknown
897
+ > = z.union([z.number(), z.string(), z.any()]);
898
+
899
+ /** @internal */
900
+ export type SendResponsesRequestPrompt$Outbound = number | string | any;
901
+
902
+ /** @internal */
903
+ export const SendResponsesRequestPrompt$outboundSchema: z.ZodType<
904
+ SendResponsesRequestPrompt$Outbound,
905
+ z.ZodTypeDef,
906
+ SendResponsesRequestPrompt
907
+ > = z.union([z.number(), z.string(), z.any()]);
908
+
909
+ /**
910
+ * @internal
911
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
912
+ */
913
+ export namespace SendResponsesRequestPrompt$ {
914
+ /** @deprecated use `SendResponsesRequestPrompt$inboundSchema` instead. */
915
+ export const inboundSchema = SendResponsesRequestPrompt$inboundSchema;
916
+ /** @deprecated use `SendResponsesRequestPrompt$outboundSchema` instead. */
917
+ export const outboundSchema = SendResponsesRequestPrompt$outboundSchema;
918
+ /** @deprecated use `SendResponsesRequestPrompt$Outbound` instead. */
919
+ export type Outbound = SendResponsesRequestPrompt$Outbound;
920
+ }
921
+
922
+ export function sendResponsesRequestPromptToJSON(
923
+ sendResponsesRequestPrompt: SendResponsesRequestPrompt,
924
+ ): string {
925
+ return JSON.stringify(
926
+ SendResponsesRequestPrompt$outboundSchema.parse(sendResponsesRequestPrompt),
927
+ );
928
+ }
929
+
930
+ export function sendResponsesRequestPromptFromJSON(
931
+ jsonString: string,
932
+ ): SafeParseResult<SendResponsesRequestPrompt, SDKValidationError> {
933
+ return safeParse(
934
+ jsonString,
935
+ (x) => SendResponsesRequestPrompt$inboundSchema.parse(JSON.parse(x)),
936
+ `Failed to parse 'SendResponsesRequestPrompt' from JSON`,
937
+ );
938
+ }
939
+
940
+ /** @internal */
941
+ export const SendResponsesRequestCompletion$inboundSchema: z.ZodType<
942
+ SendResponsesRequestCompletion,
943
+ z.ZodTypeDef,
944
+ unknown
945
+ > = z.union([z.number(), z.string(), z.any()]);
946
+
947
+ /** @internal */
948
+ export type SendResponsesRequestCompletion$Outbound = number | string | any;
949
+
950
+ /** @internal */
951
+ export const SendResponsesRequestCompletion$outboundSchema: z.ZodType<
952
+ SendResponsesRequestCompletion$Outbound,
953
+ z.ZodTypeDef,
954
+ SendResponsesRequestCompletion
955
+ > = z.union([z.number(), z.string(), z.any()]);
956
+
957
+ /**
958
+ * @internal
959
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
960
+ */
961
+ export namespace SendResponsesRequestCompletion$ {
962
+ /** @deprecated use `SendResponsesRequestCompletion$inboundSchema` instead. */
963
+ export const inboundSchema = SendResponsesRequestCompletion$inboundSchema;
964
+ /** @deprecated use `SendResponsesRequestCompletion$outboundSchema` instead. */
965
+ export const outboundSchema = SendResponsesRequestCompletion$outboundSchema;
966
+ /** @deprecated use `SendResponsesRequestCompletion$Outbound` instead. */
967
+ export type Outbound = SendResponsesRequestCompletion$Outbound;
968
+ }
969
+
970
+ export function sendResponsesRequestCompletionToJSON(
971
+ sendResponsesRequestCompletion: SendResponsesRequestCompletion,
972
+ ): string {
973
+ return JSON.stringify(
974
+ SendResponsesRequestCompletion$outboundSchema.parse(
975
+ sendResponsesRequestCompletion,
976
+ ),
977
+ );
978
+ }
979
+
980
+ export function sendResponsesRequestCompletionFromJSON(
981
+ jsonString: string,
982
+ ): SafeParseResult<SendResponsesRequestCompletion, SDKValidationError> {
983
+ return safeParse(
984
+ jsonString,
985
+ (x) => SendResponsesRequestCompletion$inboundSchema.parse(JSON.parse(x)),
986
+ `Failed to parse 'SendResponsesRequestCompletion' from JSON`,
987
+ );
988
+ }
989
+
990
+ /** @internal */
991
+ export const SendResponsesRequestImage$inboundSchema: z.ZodType<
992
+ SendResponsesRequestImage,
993
+ z.ZodTypeDef,
994
+ unknown
995
+ > = z.union([z.number(), z.string(), z.any()]);
996
+
997
+ /** @internal */
998
+ export type SendResponsesRequestImage$Outbound = number | string | any;
999
+
1000
+ /** @internal */
1001
+ export const SendResponsesRequestImage$outboundSchema: z.ZodType<
1002
+ SendResponsesRequestImage$Outbound,
1003
+ z.ZodTypeDef,
1004
+ SendResponsesRequestImage
1005
+ > = z.union([z.number(), z.string(), z.any()]);
1006
+
1007
+ /**
1008
+ * @internal
1009
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1010
+ */
1011
+ export namespace SendResponsesRequestImage$ {
1012
+ /** @deprecated use `SendResponsesRequestImage$inboundSchema` instead. */
1013
+ export const inboundSchema = SendResponsesRequestImage$inboundSchema;
1014
+ /** @deprecated use `SendResponsesRequestImage$outboundSchema` instead. */
1015
+ export const outboundSchema = SendResponsesRequestImage$outboundSchema;
1016
+ /** @deprecated use `SendResponsesRequestImage$Outbound` instead. */
1017
+ export type Outbound = SendResponsesRequestImage$Outbound;
1018
+ }
1019
+
1020
+ export function sendResponsesRequestImageToJSON(
1021
+ sendResponsesRequestImage: SendResponsesRequestImage,
1022
+ ): string {
1023
+ return JSON.stringify(
1024
+ SendResponsesRequestImage$outboundSchema.parse(sendResponsesRequestImage),
1025
+ );
1026
+ }
1027
+
1028
+ export function sendResponsesRequestImageFromJSON(
1029
+ jsonString: string,
1030
+ ): SafeParseResult<SendResponsesRequestImage, SDKValidationError> {
1031
+ return safeParse(
1032
+ jsonString,
1033
+ (x) => SendResponsesRequestImage$inboundSchema.parse(JSON.parse(x)),
1034
+ `Failed to parse 'SendResponsesRequestImage' from JSON`,
1035
+ );
1036
+ }
1037
+
1038
+ /** @internal */
1039
+ export const SendResponsesRequestAudio$inboundSchema: z.ZodType<
1040
+ SendResponsesRequestAudio,
1041
+ z.ZodTypeDef,
1042
+ unknown
1043
+ > = z.union([z.number(), z.string(), z.any()]);
1044
+
1045
+ /** @internal */
1046
+ export type SendResponsesRequestAudio$Outbound = number | string | any;
1047
+
1048
+ /** @internal */
1049
+ export const SendResponsesRequestAudio$outboundSchema: z.ZodType<
1050
+ SendResponsesRequestAudio$Outbound,
1051
+ z.ZodTypeDef,
1052
+ SendResponsesRequestAudio
1053
+ > = z.union([z.number(), z.string(), z.any()]);
1054
+
1055
+ /**
1056
+ * @internal
1057
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1058
+ */
1059
+ export namespace SendResponsesRequestAudio$ {
1060
+ /** @deprecated use `SendResponsesRequestAudio$inboundSchema` instead. */
1061
+ export const inboundSchema = SendResponsesRequestAudio$inboundSchema;
1062
+ /** @deprecated use `SendResponsesRequestAudio$outboundSchema` instead. */
1063
+ export const outboundSchema = SendResponsesRequestAudio$outboundSchema;
1064
+ /** @deprecated use `SendResponsesRequestAudio$Outbound` instead. */
1065
+ export type Outbound = SendResponsesRequestAudio$Outbound;
1066
+ }
1067
+
1068
+ export function sendResponsesRequestAudioToJSON(
1069
+ sendResponsesRequestAudio: SendResponsesRequestAudio,
1070
+ ): string {
1071
+ return JSON.stringify(
1072
+ SendResponsesRequestAudio$outboundSchema.parse(sendResponsesRequestAudio),
1073
+ );
1074
+ }
1075
+
1076
+ export function sendResponsesRequestAudioFromJSON(
1077
+ jsonString: string,
1078
+ ): SafeParseResult<SendResponsesRequestAudio, SDKValidationError> {
1079
+ return safeParse(
1080
+ jsonString,
1081
+ (x) => SendResponsesRequestAudio$inboundSchema.parse(JSON.parse(x)),
1082
+ `Failed to parse 'SendResponsesRequestAudio' from JSON`,
1083
+ );
1084
+ }
1085
+
1086
+ /** @internal */
1087
+ export const SendResponsesRequestRequestUnion$inboundSchema: z.ZodType<
1088
+ SendResponsesRequestRequestUnion,
1089
+ z.ZodTypeDef,
1090
+ unknown
1091
+ > = z.union([z.number(), z.string(), z.any()]);
1092
+
1093
+ /** @internal */
1094
+ export type SendResponsesRequestRequestUnion$Outbound = number | string | any;
1095
+
1096
+ /** @internal */
1097
+ export const SendResponsesRequestRequestUnion$outboundSchema: z.ZodType<
1098
+ SendResponsesRequestRequestUnion$Outbound,
1099
+ z.ZodTypeDef,
1100
+ SendResponsesRequestRequestUnion
1101
+ > = z.union([z.number(), z.string(), z.any()]);
1102
+
1103
+ /**
1104
+ * @internal
1105
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1106
+ */
1107
+ export namespace SendResponsesRequestRequestUnion$ {
1108
+ /** @deprecated use `SendResponsesRequestRequestUnion$inboundSchema` instead. */
1109
+ export const inboundSchema = SendResponsesRequestRequestUnion$inboundSchema;
1110
+ /** @deprecated use `SendResponsesRequestRequestUnion$outboundSchema` instead. */
1111
+ export const outboundSchema = SendResponsesRequestRequestUnion$outboundSchema;
1112
+ /** @deprecated use `SendResponsesRequestRequestUnion$Outbound` instead. */
1113
+ export type Outbound = SendResponsesRequestRequestUnion$Outbound;
1114
+ }
1115
+
1116
+ export function sendResponsesRequestRequestUnionToJSON(
1117
+ sendResponsesRequestRequestUnion: SendResponsesRequestRequestUnion,
1118
+ ): string {
1119
+ return JSON.stringify(
1120
+ SendResponsesRequestRequestUnion$outboundSchema.parse(
1121
+ sendResponsesRequestRequestUnion,
1122
+ ),
1123
+ );
1124
+ }
1125
+
1126
+ export function sendResponsesRequestRequestUnionFromJSON(
1127
+ jsonString: string,
1128
+ ): SafeParseResult<SendResponsesRequestRequestUnion, SDKValidationError> {
1129
+ return safeParse(
1130
+ jsonString,
1131
+ (x) => SendResponsesRequestRequestUnion$inboundSchema.parse(JSON.parse(x)),
1132
+ `Failed to parse 'SendResponsesRequestRequestUnion' from JSON`,
1133
+ );
1134
+ }
1135
+
1136
+ /** @internal */
1137
+ export const SendResponsesRequestMaxPrice$inboundSchema: z.ZodType<
1138
+ SendResponsesRequestMaxPrice,
1139
+ z.ZodTypeDef,
1140
+ unknown
1141
+ > = z.object({
1142
+ prompt: z.union([z.number(), z.string(), z.any()]).optional(),
1143
+ completion: z.union([z.number(), z.string(), z.any()]).optional(),
1144
+ image: z.union([z.number(), z.string(), z.any()]).optional(),
1145
+ audio: z.union([z.number(), z.string(), z.any()]).optional(),
1146
+ request: z.union([z.number(), z.string(), z.any()]).optional(),
1147
+ });
1148
+
1149
+ /** @internal */
1150
+ export type SendResponsesRequestMaxPrice$Outbound = {
1151
+ prompt?: number | string | any | undefined;
1152
+ completion?: number | string | any | undefined;
1153
+ image?: number | string | any | undefined;
1154
+ audio?: number | string | any | undefined;
1155
+ request?: number | string | any | undefined;
1156
+ };
1157
+
1158
+ /** @internal */
1159
+ export const SendResponsesRequestMaxPrice$outboundSchema: z.ZodType<
1160
+ SendResponsesRequestMaxPrice$Outbound,
1161
+ z.ZodTypeDef,
1162
+ SendResponsesRequestMaxPrice
1163
+ > = z.object({
1164
+ prompt: z.union([z.number(), z.string(), z.any()]).optional(),
1165
+ completion: z.union([z.number(), z.string(), z.any()]).optional(),
1166
+ image: z.union([z.number(), z.string(), z.any()]).optional(),
1167
+ audio: z.union([z.number(), z.string(), z.any()]).optional(),
1168
+ request: z.union([z.number(), z.string(), z.any()]).optional(),
1169
+ });
1170
+
1171
+ /**
1172
+ * @internal
1173
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1174
+ */
1175
+ export namespace SendResponsesRequestMaxPrice$ {
1176
+ /** @deprecated use `SendResponsesRequestMaxPrice$inboundSchema` instead. */
1177
+ export const inboundSchema = SendResponsesRequestMaxPrice$inboundSchema;
1178
+ /** @deprecated use `SendResponsesRequestMaxPrice$outboundSchema` instead. */
1179
+ export const outboundSchema = SendResponsesRequestMaxPrice$outboundSchema;
1180
+ /** @deprecated use `SendResponsesRequestMaxPrice$Outbound` instead. */
1181
+ export type Outbound = SendResponsesRequestMaxPrice$Outbound;
1182
+ }
1183
+
1184
+ export function sendResponsesRequestMaxPriceToJSON(
1185
+ sendResponsesRequestMaxPrice: SendResponsesRequestMaxPrice,
1186
+ ): string {
1187
+ return JSON.stringify(
1188
+ SendResponsesRequestMaxPrice$outboundSchema.parse(
1189
+ sendResponsesRequestMaxPrice,
1190
+ ),
1191
+ );
1192
+ }
1193
+
1194
+ export function sendResponsesRequestMaxPriceFromJSON(
1195
+ jsonString: string,
1196
+ ): SafeParseResult<SendResponsesRequestMaxPrice, SDKValidationError> {
1197
+ return safeParse(
1198
+ jsonString,
1199
+ (x) => SendResponsesRequestMaxPrice$inboundSchema.parse(JSON.parse(x)),
1200
+ `Failed to parse 'SendResponsesRequestMaxPrice' from JSON`,
1201
+ );
1202
+ }
1203
+
1204
+ /** @internal */
1205
+ export const SendResponsesRequestExperimental$inboundSchema: z.ZodType<
1206
+ SendResponsesRequestExperimental,
1207
+ z.ZodTypeDef,
1208
+ unknown
1209
+ > = z.object({});
1210
+
1211
+ /** @internal */
1212
+ export type SendResponsesRequestExperimental$Outbound = {};
1213
+
1214
+ /** @internal */
1215
+ export const SendResponsesRequestExperimental$outboundSchema: z.ZodType<
1216
+ SendResponsesRequestExperimental$Outbound,
1217
+ z.ZodTypeDef,
1218
+ SendResponsesRequestExperimental
1219
+ > = z.object({});
1220
+
1221
+ /**
1222
+ * @internal
1223
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1224
+ */
1225
+ export namespace SendResponsesRequestExperimental$ {
1226
+ /** @deprecated use `SendResponsesRequestExperimental$inboundSchema` instead. */
1227
+ export const inboundSchema = SendResponsesRequestExperimental$inboundSchema;
1228
+ /** @deprecated use `SendResponsesRequestExperimental$outboundSchema` instead. */
1229
+ export const outboundSchema = SendResponsesRequestExperimental$outboundSchema;
1230
+ /** @deprecated use `SendResponsesRequestExperimental$Outbound` instead. */
1231
+ export type Outbound = SendResponsesRequestExperimental$Outbound;
1232
+ }
1233
+
1234
+ export function sendResponsesRequestExperimentalToJSON(
1235
+ sendResponsesRequestExperimental: SendResponsesRequestExperimental,
1236
+ ): string {
1237
+ return JSON.stringify(
1238
+ SendResponsesRequestExperimental$outboundSchema.parse(
1239
+ sendResponsesRequestExperimental,
1240
+ ),
1241
+ );
1242
+ }
1243
+
1244
+ export function sendResponsesRequestExperimentalFromJSON(
1245
+ jsonString: string,
1246
+ ): SafeParseResult<SendResponsesRequestExperimental, SDKValidationError> {
1247
+ return safeParse(
1248
+ jsonString,
1249
+ (x) => SendResponsesRequestExperimental$inboundSchema.parse(JSON.parse(x)),
1250
+ `Failed to parse 'SendResponsesRequestExperimental' from JSON`,
1251
+ );
1252
+ }
1253
+
1254
+ /** @internal */
1255
+ export const SendResponsesRequestProvider$inboundSchema: z.ZodType<
1256
+ SendResponsesRequestProvider,
1257
+ z.ZodTypeDef,
1258
+ unknown
1259
+ > = z.object({
1260
+ allow_fallbacks: z.nullable(z.boolean()).optional(),
1261
+ require_parameters: z.nullable(z.boolean()).optional(),
1262
+ data_collection: z.nullable(SendResponsesRequestDataCollection$inboundSchema)
1263
+ .optional(),
1264
+ zdr: z.nullable(z.boolean()).optional(),
1265
+ order: z.nullable(
1266
+ z.array(z.union([SendResponsesRequestOrderEnum$inboundSchema, z.string()])),
1267
+ ).optional(),
1268
+ only: z.nullable(
1269
+ z.array(z.union([SendResponsesRequestOnlyEnum$inboundSchema, z.string()])),
1270
+ ).optional(),
1271
+ ignore: z.nullable(
1272
+ z.array(
1273
+ z.union([SendResponsesRequestIgnoreEnum$inboundSchema, z.string()]),
1274
+ ),
1275
+ ).optional(),
1276
+ quantizations: z.nullable(
1277
+ z.array(SendResponsesRequestQuantization$inboundSchema),
1278
+ ).optional(),
1279
+ sort: z.nullable(SendResponsesRequestSort$inboundSchema).optional(),
1280
+ max_price: z.lazy(() => SendResponsesRequestMaxPrice$inboundSchema)
1281
+ .optional(),
1282
+ experimental: z.nullable(
1283
+ z.lazy(() => SendResponsesRequestExperimental$inboundSchema),
1284
+ ).optional(),
1285
+ }).transform((v) => {
1286
+ return remap$(v, {
1287
+ "allow_fallbacks": "allowFallbacks",
1288
+ "require_parameters": "requireParameters",
1289
+ "data_collection": "dataCollection",
1290
+ "max_price": "maxPrice",
1291
+ });
1292
+ });
1293
+
1294
+ /** @internal */
1295
+ export type SendResponsesRequestProvider$Outbound = {
1296
+ allow_fallbacks?: boolean | null | undefined;
1297
+ require_parameters?: boolean | null | undefined;
1298
+ data_collection?: string | null | undefined;
1299
+ zdr?: boolean | null | undefined;
1300
+ order?: Array<string | string> | null | undefined;
1301
+ only?: Array<string | string> | null | undefined;
1302
+ ignore?: Array<string | string> | null | undefined;
1303
+ quantizations?: Array<string> | null | undefined;
1304
+ sort?: string | null | undefined;
1305
+ max_price?: SendResponsesRequestMaxPrice$Outbound | undefined;
1306
+ experimental?: SendResponsesRequestExperimental$Outbound | null | undefined;
1307
+ };
1308
+
1309
+ /** @internal */
1310
+ export const SendResponsesRequestProvider$outboundSchema: z.ZodType<
1311
+ SendResponsesRequestProvider$Outbound,
1312
+ z.ZodTypeDef,
1313
+ SendResponsesRequestProvider
1314
+ > = z.object({
1315
+ allowFallbacks: z.nullable(z.boolean()).optional(),
1316
+ requireParameters: z.nullable(z.boolean()).optional(),
1317
+ dataCollection: z.nullable(SendResponsesRequestDataCollection$outboundSchema)
1318
+ .optional(),
1319
+ zdr: z.nullable(z.boolean()).optional(),
1320
+ order: z.nullable(
1321
+ z.array(
1322
+ z.union([SendResponsesRequestOrderEnum$outboundSchema, z.string()]),
1323
+ ),
1324
+ ).optional(),
1325
+ only: z.nullable(
1326
+ z.array(z.union([SendResponsesRequestOnlyEnum$outboundSchema, z.string()])),
1327
+ ).optional(),
1328
+ ignore: z.nullable(
1329
+ z.array(
1330
+ z.union([SendResponsesRequestIgnoreEnum$outboundSchema, z.string()]),
1331
+ ),
1332
+ ).optional(),
1333
+ quantizations: z.nullable(
1334
+ z.array(SendResponsesRequestQuantization$outboundSchema),
1335
+ ).optional(),
1336
+ sort: z.nullable(SendResponsesRequestSort$outboundSchema).optional(),
1337
+ maxPrice: z.lazy(() => SendResponsesRequestMaxPrice$outboundSchema)
1338
+ .optional(),
1339
+ experimental: z.nullable(
1340
+ z.lazy(() => SendResponsesRequestExperimental$outboundSchema),
1341
+ ).optional(),
1342
+ }).transform((v) => {
1343
+ return remap$(v, {
1344
+ allowFallbacks: "allow_fallbacks",
1345
+ requireParameters: "require_parameters",
1346
+ dataCollection: "data_collection",
1347
+ maxPrice: "max_price",
1348
+ });
1349
+ });
1350
+
1351
+ /**
1352
+ * @internal
1353
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1354
+ */
1355
+ export namespace SendResponsesRequestProvider$ {
1356
+ /** @deprecated use `SendResponsesRequestProvider$inboundSchema` instead. */
1357
+ export const inboundSchema = SendResponsesRequestProvider$inboundSchema;
1358
+ /** @deprecated use `SendResponsesRequestProvider$outboundSchema` instead. */
1359
+ export const outboundSchema = SendResponsesRequestProvider$outboundSchema;
1360
+ /** @deprecated use `SendResponsesRequestProvider$Outbound` instead. */
1361
+ export type Outbound = SendResponsesRequestProvider$Outbound;
1362
+ }
1363
+
1364
+ export function sendResponsesRequestProviderToJSON(
1365
+ sendResponsesRequestProvider: SendResponsesRequestProvider,
1366
+ ): string {
1367
+ return JSON.stringify(
1368
+ SendResponsesRequestProvider$outboundSchema.parse(
1369
+ sendResponsesRequestProvider,
1370
+ ),
1371
+ );
1372
+ }
1373
+
1374
+ export function sendResponsesRequestProviderFromJSON(
1375
+ jsonString: string,
1376
+ ): SafeParseResult<SendResponsesRequestProvider, SDKValidationError> {
1377
+ return safeParse(
1378
+ jsonString,
1379
+ (x) => SendResponsesRequestProvider$inboundSchema.parse(JSON.parse(x)),
1380
+ `Failed to parse 'SendResponsesRequestProvider' from JSON`,
1381
+ );
1382
+ }
1383
+
1384
+ /** @internal */
1385
+ export const IdFileParser$inboundSchema: z.ZodNativeEnum<typeof IdFileParser> =
1386
+ z.nativeEnum(IdFileParser);
1387
+
1388
+ /** @internal */
1389
+ export const IdFileParser$outboundSchema: z.ZodNativeEnum<typeof IdFileParser> =
1390
+ IdFileParser$inboundSchema;
1391
+
1392
+ /**
1393
+ * @internal
1394
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1395
+ */
1396
+ export namespace IdFileParser$ {
1397
+ /** @deprecated use `IdFileParser$inboundSchema` instead. */
1398
+ export const inboundSchema = IdFileParser$inboundSchema;
1399
+ /** @deprecated use `IdFileParser$outboundSchema` instead. */
1400
+ export const outboundSchema = IdFileParser$outboundSchema;
1401
+ }
1402
+
1403
+ /** @internal */
1404
+ export const PdfEngine$inboundSchema: z.ZodNativeEnum<typeof PdfEngine> = z
1405
+ .nativeEnum(PdfEngine);
1406
+
1407
+ /** @internal */
1408
+ export const PdfEngine$outboundSchema: z.ZodNativeEnum<typeof PdfEngine> =
1409
+ PdfEngine$inboundSchema;
1410
+
1411
+ /**
1412
+ * @internal
1413
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1414
+ */
1415
+ export namespace PdfEngine$ {
1416
+ /** @deprecated use `PdfEngine$inboundSchema` instead. */
1417
+ export const inboundSchema = PdfEngine$inboundSchema;
1418
+ /** @deprecated use `PdfEngine$outboundSchema` instead. */
1419
+ export const outboundSchema = PdfEngine$outboundSchema;
1420
+ }
1421
+
1422
+ /** @internal */
1423
+ export const Pdf$inboundSchema: z.ZodType<Pdf, z.ZodTypeDef, unknown> = z
1424
+ .object({
1425
+ engine: PdfEngine$inboundSchema.optional(),
1426
+ });
1427
+
1428
+ /** @internal */
1429
+ export type Pdf$Outbound = {
1430
+ engine?: string | undefined;
1431
+ };
1432
+
1433
+ /** @internal */
1434
+ export const Pdf$outboundSchema: z.ZodType<Pdf$Outbound, z.ZodTypeDef, Pdf> = z
1435
+ .object({
1436
+ engine: PdfEngine$outboundSchema.optional(),
1437
+ });
1438
+
1439
+ /**
1440
+ * @internal
1441
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1442
+ */
1443
+ export namespace Pdf$ {
1444
+ /** @deprecated use `Pdf$inboundSchema` instead. */
1445
+ export const inboundSchema = Pdf$inboundSchema;
1446
+ /** @deprecated use `Pdf$outboundSchema` instead. */
1447
+ export const outboundSchema = Pdf$outboundSchema;
1448
+ /** @deprecated use `Pdf$Outbound` instead. */
1449
+ export type Outbound = Pdf$Outbound;
1450
+ }
1451
+
1452
+ export function pdfToJSON(pdf: Pdf): string {
1453
+ return JSON.stringify(Pdf$outboundSchema.parse(pdf));
1454
+ }
1455
+
1456
+ export function pdfFromJSON(
1457
+ jsonString: string,
1458
+ ): SafeParseResult<Pdf, SDKValidationError> {
1459
+ return safeParse(
1460
+ jsonString,
1461
+ (x) => Pdf$inboundSchema.parse(JSON.parse(x)),
1462
+ `Failed to parse 'Pdf' from JSON`,
1463
+ );
1464
+ }
1465
+
1466
+ /** @internal */
1467
+ export const PluginFileParser$inboundSchema: z.ZodType<
1468
+ PluginFileParser,
1469
+ z.ZodTypeDef,
1470
+ unknown
1471
+ > = z.object({
1472
+ id: IdFileParser$inboundSchema,
1473
+ max_files: z.number().optional(),
1474
+ pdf: z.lazy(() => Pdf$inboundSchema).optional(),
1475
+ }).transform((v) => {
1476
+ return remap$(v, {
1477
+ "max_files": "maxFiles",
1478
+ });
1479
+ });
1480
+
1481
+ /** @internal */
1482
+ export type PluginFileParser$Outbound = {
1483
+ id: string;
1484
+ max_files?: number | undefined;
1485
+ pdf?: Pdf$Outbound | undefined;
1486
+ };
1487
+
1488
+ /** @internal */
1489
+ export const PluginFileParser$outboundSchema: z.ZodType<
1490
+ PluginFileParser$Outbound,
1491
+ z.ZodTypeDef,
1492
+ PluginFileParser
1493
+ > = z.object({
1494
+ id: IdFileParser$outboundSchema,
1495
+ maxFiles: z.number().optional(),
1496
+ pdf: z.lazy(() => Pdf$outboundSchema).optional(),
1497
+ }).transform((v) => {
1498
+ return remap$(v, {
1499
+ maxFiles: "max_files",
1500
+ });
1501
+ });
1502
+
1503
+ /**
1504
+ * @internal
1505
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1506
+ */
1507
+ export namespace PluginFileParser$ {
1508
+ /** @deprecated use `PluginFileParser$inboundSchema` instead. */
1509
+ export const inboundSchema = PluginFileParser$inboundSchema;
1510
+ /** @deprecated use `PluginFileParser$outboundSchema` instead. */
1511
+ export const outboundSchema = PluginFileParser$outboundSchema;
1512
+ /** @deprecated use `PluginFileParser$Outbound` instead. */
1513
+ export type Outbound = PluginFileParser$Outbound;
1514
+ }
1515
+
1516
+ export function pluginFileParserToJSON(
1517
+ pluginFileParser: PluginFileParser,
1518
+ ): string {
1519
+ return JSON.stringify(
1520
+ PluginFileParser$outboundSchema.parse(pluginFileParser),
1521
+ );
1522
+ }
1523
+
1524
+ export function pluginFileParserFromJSON(
1525
+ jsonString: string,
1526
+ ): SafeParseResult<PluginFileParser, SDKValidationError> {
1527
+ return safeParse(
1528
+ jsonString,
1529
+ (x) => PluginFileParser$inboundSchema.parse(JSON.parse(x)),
1530
+ `Failed to parse 'PluginFileParser' from JSON`,
1531
+ );
1532
+ }
1533
+
1534
+ /** @internal */
1535
+ export const IdChainOfThought$inboundSchema: z.ZodNativeEnum<
1536
+ typeof IdChainOfThought
1537
+ > = z.nativeEnum(IdChainOfThought);
1538
+
1539
+ /** @internal */
1540
+ export const IdChainOfThought$outboundSchema: z.ZodNativeEnum<
1541
+ typeof IdChainOfThought
1542
+ > = IdChainOfThought$inboundSchema;
1543
+
1544
+ /**
1545
+ * @internal
1546
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1547
+ */
1548
+ export namespace IdChainOfThought$ {
1549
+ /** @deprecated use `IdChainOfThought$inboundSchema` instead. */
1550
+ export const inboundSchema = IdChainOfThought$inboundSchema;
1551
+ /** @deprecated use `IdChainOfThought$outboundSchema` instead. */
1552
+ export const outboundSchema = IdChainOfThought$outboundSchema;
1553
+ }
1554
+
1555
+ /** @internal */
1556
+ export const PluginChainOfThought$inboundSchema: z.ZodType<
1557
+ PluginChainOfThought,
1558
+ z.ZodTypeDef,
1559
+ unknown
1560
+ > = z.object({
1561
+ id: IdChainOfThought$inboundSchema,
1562
+ });
1563
+
1564
+ /** @internal */
1565
+ export type PluginChainOfThought$Outbound = {
1566
+ id: string;
1567
+ };
1568
+
1569
+ /** @internal */
1570
+ export const PluginChainOfThought$outboundSchema: z.ZodType<
1571
+ PluginChainOfThought$Outbound,
1572
+ z.ZodTypeDef,
1573
+ PluginChainOfThought
1574
+ > = z.object({
1575
+ id: IdChainOfThought$outboundSchema,
1576
+ });
1577
+
1578
+ /**
1579
+ * @internal
1580
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1581
+ */
1582
+ export namespace PluginChainOfThought$ {
1583
+ /** @deprecated use `PluginChainOfThought$inboundSchema` instead. */
1584
+ export const inboundSchema = PluginChainOfThought$inboundSchema;
1585
+ /** @deprecated use `PluginChainOfThought$outboundSchema` instead. */
1586
+ export const outboundSchema = PluginChainOfThought$outboundSchema;
1587
+ /** @deprecated use `PluginChainOfThought$Outbound` instead. */
1588
+ export type Outbound = PluginChainOfThought$Outbound;
1589
+ }
1590
+
1591
+ export function pluginChainOfThoughtToJSON(
1592
+ pluginChainOfThought: PluginChainOfThought,
1593
+ ): string {
1594
+ return JSON.stringify(
1595
+ PluginChainOfThought$outboundSchema.parse(pluginChainOfThought),
1596
+ );
1597
+ }
1598
+
1599
+ export function pluginChainOfThoughtFromJSON(
1600
+ jsonString: string,
1601
+ ): SafeParseResult<PluginChainOfThought, SDKValidationError> {
1602
+ return safeParse(
1603
+ jsonString,
1604
+ (x) => PluginChainOfThought$inboundSchema.parse(JSON.parse(x)),
1605
+ `Failed to parse 'PluginChainOfThought' from JSON`,
1606
+ );
1607
+ }
1608
+
1609
+ /** @internal */
1610
+ export const IdWeb$inboundSchema: z.ZodNativeEnum<typeof IdWeb> = z.nativeEnum(
1611
+ IdWeb,
1612
+ );
1613
+
1614
+ /** @internal */
1615
+ export const IdWeb$outboundSchema: z.ZodNativeEnum<typeof IdWeb> =
1616
+ IdWeb$inboundSchema;
1617
+
1618
+ /**
1619
+ * @internal
1620
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1621
+ */
1622
+ export namespace IdWeb$ {
1623
+ /** @deprecated use `IdWeb$inboundSchema` instead. */
1624
+ export const inboundSchema = IdWeb$inboundSchema;
1625
+ /** @deprecated use `IdWeb$outboundSchema` instead. */
1626
+ export const outboundSchema = IdWeb$outboundSchema;
1627
+ }
1628
+
1629
+ /** @internal */
1630
+ export const Engine$inboundSchema: z.ZodNativeEnum<typeof Engine> = z
1631
+ .nativeEnum(Engine);
1632
+
1633
+ /** @internal */
1634
+ export const Engine$outboundSchema: z.ZodNativeEnum<typeof Engine> =
1635
+ Engine$inboundSchema;
1636
+
1637
+ /**
1638
+ * @internal
1639
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1640
+ */
1641
+ export namespace Engine$ {
1642
+ /** @deprecated use `Engine$inboundSchema` instead. */
1643
+ export const inboundSchema = Engine$inboundSchema;
1644
+ /** @deprecated use `Engine$outboundSchema` instead. */
1645
+ export const outboundSchema = Engine$outboundSchema;
1646
+ }
1647
+
1648
+ /** @internal */
1649
+ export const PluginWeb$inboundSchema: z.ZodType<
1650
+ PluginWeb,
1651
+ z.ZodTypeDef,
1652
+ unknown
1653
+ > = z.object({
1654
+ id: IdWeb$inboundSchema,
1655
+ max_results: z.number().optional(),
1656
+ search_prompt: z.string().optional(),
1657
+ engine: Engine$inboundSchema.optional(),
1658
+ }).transform((v) => {
1659
+ return remap$(v, {
1660
+ "max_results": "maxResults",
1661
+ "search_prompt": "searchPrompt",
1662
+ });
1663
+ });
1664
+
1665
+ /** @internal */
1666
+ export type PluginWeb$Outbound = {
1667
+ id: string;
1668
+ max_results?: number | undefined;
1669
+ search_prompt?: string | undefined;
1670
+ engine?: string | undefined;
1671
+ };
1672
+
1673
+ /** @internal */
1674
+ export const PluginWeb$outboundSchema: z.ZodType<
1675
+ PluginWeb$Outbound,
1676
+ z.ZodTypeDef,
1677
+ PluginWeb
1678
+ > = z.object({
1679
+ id: IdWeb$outboundSchema,
1680
+ maxResults: z.number().optional(),
1681
+ searchPrompt: z.string().optional(),
1682
+ engine: Engine$outboundSchema.optional(),
1683
+ }).transform((v) => {
1684
+ return remap$(v, {
1685
+ maxResults: "max_results",
1686
+ searchPrompt: "search_prompt",
1687
+ });
1688
+ });
1689
+
1690
+ /**
1691
+ * @internal
1692
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1693
+ */
1694
+ export namespace PluginWeb$ {
1695
+ /** @deprecated use `PluginWeb$inboundSchema` instead. */
1696
+ export const inboundSchema = PluginWeb$inboundSchema;
1697
+ /** @deprecated use `PluginWeb$outboundSchema` instead. */
1698
+ export const outboundSchema = PluginWeb$outboundSchema;
1699
+ /** @deprecated use `PluginWeb$Outbound` instead. */
1700
+ export type Outbound = PluginWeb$Outbound;
1701
+ }
1702
+
1703
+ export function pluginWebToJSON(pluginWeb: PluginWeb): string {
1704
+ return JSON.stringify(PluginWeb$outboundSchema.parse(pluginWeb));
1705
+ }
1706
+
1707
+ export function pluginWebFromJSON(
1708
+ jsonString: string,
1709
+ ): SafeParseResult<PluginWeb, SDKValidationError> {
1710
+ return safeParse(
1711
+ jsonString,
1712
+ (x) => PluginWeb$inboundSchema.parse(JSON.parse(x)),
1713
+ `Failed to parse 'PluginWeb' from JSON`,
1714
+ );
1715
+ }
1716
+
1717
+ /** @internal */
1718
+ export const IdModeration$inboundSchema: z.ZodNativeEnum<typeof IdModeration> =
1719
+ z.nativeEnum(IdModeration);
1720
+
1721
+ /** @internal */
1722
+ export const IdModeration$outboundSchema: z.ZodNativeEnum<typeof IdModeration> =
1723
+ IdModeration$inboundSchema;
1724
+
1725
+ /**
1726
+ * @internal
1727
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1728
+ */
1729
+ export namespace IdModeration$ {
1730
+ /** @deprecated use `IdModeration$inboundSchema` instead. */
1731
+ export const inboundSchema = IdModeration$inboundSchema;
1732
+ /** @deprecated use `IdModeration$outboundSchema` instead. */
1733
+ export const outboundSchema = IdModeration$outboundSchema;
1734
+ }
1735
+
1736
+ /** @internal */
1737
+ export const PluginModeration$inboundSchema: z.ZodType<
1738
+ PluginModeration,
1739
+ z.ZodTypeDef,
1740
+ unknown
1741
+ > = z.object({
1742
+ id: IdModeration$inboundSchema,
1743
+ });
1744
+
1745
+ /** @internal */
1746
+ export type PluginModeration$Outbound = {
1747
+ id: string;
1748
+ };
1749
+
1750
+ /** @internal */
1751
+ export const PluginModeration$outboundSchema: z.ZodType<
1752
+ PluginModeration$Outbound,
1753
+ z.ZodTypeDef,
1754
+ PluginModeration
1755
+ > = z.object({
1756
+ id: IdModeration$outboundSchema,
1757
+ });
1758
+
1759
+ /**
1760
+ * @internal
1761
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1762
+ */
1763
+ export namespace PluginModeration$ {
1764
+ /** @deprecated use `PluginModeration$inboundSchema` instead. */
1765
+ export const inboundSchema = PluginModeration$inboundSchema;
1766
+ /** @deprecated use `PluginModeration$outboundSchema` instead. */
1767
+ export const outboundSchema = PluginModeration$outboundSchema;
1768
+ /** @deprecated use `PluginModeration$Outbound` instead. */
1769
+ export type Outbound = PluginModeration$Outbound;
1770
+ }
1771
+
1772
+ export function pluginModerationToJSON(
1773
+ pluginModeration: PluginModeration,
1774
+ ): string {
1775
+ return JSON.stringify(
1776
+ PluginModeration$outboundSchema.parse(pluginModeration),
1777
+ );
1778
+ }
1779
+
1780
+ export function pluginModerationFromJSON(
1781
+ jsonString: string,
1782
+ ): SafeParseResult<PluginModeration, SDKValidationError> {
1783
+ return safeParse(
1784
+ jsonString,
1785
+ (x) => PluginModeration$inboundSchema.parse(JSON.parse(x)),
1786
+ `Failed to parse 'PluginModeration' from JSON`,
1787
+ );
1788
+ }
1789
+
1790
+ /** @internal */
1791
+ export const Plugin$inboundSchema: z.ZodType<Plugin, z.ZodTypeDef, unknown> = z
1792
+ .union([
1793
+ z.lazy(() => PluginModeration$inboundSchema),
1794
+ z.lazy(() => PluginWeb$inboundSchema),
1795
+ z.lazy(() => PluginChainOfThought$inboundSchema),
1796
+ z.lazy(() => PluginFileParser$inboundSchema),
1797
+ ]);
1798
+
1799
+ /** @internal */
1800
+ export type Plugin$Outbound =
1801
+ | PluginModeration$Outbound
1802
+ | PluginWeb$Outbound
1803
+ | PluginChainOfThought$Outbound
1804
+ | PluginFileParser$Outbound;
1805
+
1806
+ /** @internal */
1807
+ export const Plugin$outboundSchema: z.ZodType<
1808
+ Plugin$Outbound,
1809
+ z.ZodTypeDef,
1810
+ Plugin
1811
+ > = z.union([
1812
+ z.lazy(() => PluginModeration$outboundSchema),
1813
+ z.lazy(() => PluginWeb$outboundSchema),
1814
+ z.lazy(() => PluginChainOfThought$outboundSchema),
1815
+ z.lazy(() => PluginFileParser$outboundSchema),
1816
+ ]);
1817
+
1818
+ /**
1819
+ * @internal
1820
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1821
+ */
1822
+ export namespace Plugin$ {
1823
+ /** @deprecated use `Plugin$inboundSchema` instead. */
1824
+ export const inboundSchema = Plugin$inboundSchema;
1825
+ /** @deprecated use `Plugin$outboundSchema` instead. */
1826
+ export const outboundSchema = Plugin$outboundSchema;
1827
+ /** @deprecated use `Plugin$Outbound` instead. */
1828
+ export type Outbound = Plugin$Outbound;
1829
+ }
1830
+
1831
+ export function pluginToJSON(plugin: Plugin): string {
1832
+ return JSON.stringify(Plugin$outboundSchema.parse(plugin));
1833
+ }
1834
+
1835
+ export function pluginFromJSON(
1836
+ jsonString: string,
1837
+ ): SafeParseResult<Plugin, SDKValidationError> {
1838
+ return safeParse(
1839
+ jsonString,
1840
+ (x) => Plugin$inboundSchema.parse(JSON.parse(x)),
1841
+ `Failed to parse 'Plugin' from JSON`,
1842
+ );
1843
+ }
1844
+
1845
+ /** @internal */
1846
+ export const SendResponsesRequestRequest$inboundSchema: z.ZodType<
1847
+ SendResponsesRequestRequest,
1848
+ z.ZodTypeDef,
1849
+ unknown
1850
+ > = z.object({
1851
+ input: models.ResponseInput$inboundSchema.optional(),
1852
+ instructions: z.nullable(z.string()).optional(),
1853
+ metadata: z.nullable(z.record(z.string())).optional(),
1854
+ tools: z.array(models.Tool$inboundSchema).optional(),
1855
+ tool_choice: models.ToolChoiceUnion$inboundSchema.optional(),
1856
+ parallel_tool_calls: z.nullable(z.boolean()).optional(),
1857
+ model: z.string().optional(),
1858
+ models: z.array(z.string()).optional(),
1859
+ text: models.ResponseTextConfig$inboundSchema.optional(),
1860
+ reasoning: z.nullable(models.ResponseReasoningConfig$inboundSchema)
1861
+ .optional(),
1862
+ max_output_tokens: z.nullable(z.number()).optional(),
1863
+ temperature: z.nullable(z.number()).optional(),
1864
+ top_p: z.nullable(z.number()).optional(),
1865
+ top_k: z.number().optional(),
1866
+ prompt_cache_key: z.string().optional(),
1867
+ previous_response_id: z.nullable(z.string()).optional(),
1868
+ prompt: z.nullable(models.ResponsePrompt$inboundSchema).optional(),
1869
+ include: z.nullable(z.array(models.ResponseIncludable$inboundSchema))
1870
+ .optional(),
1871
+ background: z.nullable(z.boolean()).optional(),
1872
+ safety_identifier: z.string().optional(),
1873
+ store: z.nullable(z.boolean()).optional(),
1874
+ service_tier: z.nullable(ServiceTier$inboundSchema).optional(),
1875
+ truncation: z.nullable(Truncation$inboundSchema).optional(),
1876
+ stream: z.nullable(z.boolean()).optional(),
1877
+ provider: z.nullable(z.lazy(() => SendResponsesRequestProvider$inboundSchema))
1878
+ .optional(),
1879
+ plugins: z.array(
1880
+ z.union([
1881
+ z.lazy(() => PluginModeration$inboundSchema),
1882
+ z.lazy(() => PluginWeb$inboundSchema),
1883
+ z.lazy(() => PluginChainOfThought$inboundSchema),
1884
+ z.lazy(() => PluginFileParser$inboundSchema),
1885
+ ]),
1886
+ ).optional(),
1887
+ user: z.string().optional(),
1888
+ }).transform((v) => {
1889
+ return remap$(v, {
1890
+ "tool_choice": "toolChoice",
1891
+ "parallel_tool_calls": "parallelToolCalls",
1892
+ "max_output_tokens": "maxOutputTokens",
1893
+ "top_p": "topP",
1894
+ "top_k": "topK",
1895
+ "prompt_cache_key": "promptCacheKey",
1896
+ "previous_response_id": "previousResponseId",
1897
+ "safety_identifier": "safetyIdentifier",
1898
+ "service_tier": "serviceTier",
1899
+ });
1900
+ });
1901
+
1902
+ /** @internal */
1903
+ export type SendResponsesRequestRequest$Outbound = {
1904
+ input?: models.ResponseInput$Outbound | undefined;
1905
+ instructions?: string | null | undefined;
1906
+ metadata?: { [k: string]: string } | null | undefined;
1907
+ tools?: Array<models.Tool$Outbound> | undefined;
1908
+ tool_choice?: models.ToolChoiceUnion$Outbound | undefined;
1909
+ parallel_tool_calls?: boolean | null | undefined;
1910
+ model?: string | undefined;
1911
+ models?: Array<string> | undefined;
1912
+ text?: models.ResponseTextConfig$Outbound | undefined;
1913
+ reasoning?: models.ResponseReasoningConfig$Outbound | null | undefined;
1914
+ max_output_tokens?: number | null | undefined;
1915
+ temperature?: number | null | undefined;
1916
+ top_p?: number | null | undefined;
1917
+ top_k?: number | undefined;
1918
+ prompt_cache_key?: string | undefined;
1919
+ previous_response_id?: string | null | undefined;
1920
+ prompt?: models.ResponsePrompt$Outbound | null | undefined;
1921
+ include?: Array<string> | null | undefined;
1922
+ background?: boolean | null | undefined;
1923
+ safety_identifier?: string | undefined;
1924
+ store?: boolean | null | undefined;
1925
+ service_tier?: string | null | undefined;
1926
+ truncation?: string | null | undefined;
1927
+ stream?: boolean | null | undefined;
1928
+ provider?: SendResponsesRequestProvider$Outbound | null | undefined;
1929
+ plugins?:
1930
+ | Array<
1931
+ | PluginModeration$Outbound
1932
+ | PluginWeb$Outbound
1933
+ | PluginChainOfThought$Outbound
1934
+ | PluginFileParser$Outbound
1935
+ >
1936
+ | undefined;
1937
+ user?: string | undefined;
1938
+ };
1939
+
1940
+ /** @internal */
1941
+ export const SendResponsesRequestRequest$outboundSchema: z.ZodType<
1942
+ SendResponsesRequestRequest$Outbound,
1943
+ z.ZodTypeDef,
1944
+ SendResponsesRequestRequest
1945
+ > = z.object({
1946
+ input: models.ResponseInput$outboundSchema.optional(),
1947
+ instructions: z.nullable(z.string()).optional(),
1948
+ metadata: z.nullable(z.record(z.string())).optional(),
1949
+ tools: z.array(models.Tool$outboundSchema).optional(),
1950
+ toolChoice: models.ToolChoiceUnion$outboundSchema.optional(),
1951
+ parallelToolCalls: z.nullable(z.boolean()).optional(),
1952
+ model: z.string().optional(),
1953
+ models: z.array(z.string()).optional(),
1954
+ text: models.ResponseTextConfig$outboundSchema.optional(),
1955
+ reasoning: z.nullable(models.ResponseReasoningConfig$outboundSchema)
1956
+ .optional(),
1957
+ maxOutputTokens: z.nullable(z.number()).optional(),
1958
+ temperature: z.nullable(z.number()).optional(),
1959
+ topP: z.nullable(z.number()).optional(),
1960
+ topK: z.number().optional(),
1961
+ promptCacheKey: z.string().optional(),
1962
+ previousResponseId: z.nullable(z.string()).optional(),
1963
+ prompt: z.nullable(models.ResponsePrompt$outboundSchema).optional(),
1964
+ include: z.nullable(z.array(models.ResponseIncludable$outboundSchema))
1965
+ .optional(),
1966
+ background: z.nullable(z.boolean()).optional(),
1967
+ safetyIdentifier: z.string().optional(),
1968
+ store: z.nullable(z.boolean()).optional(),
1969
+ serviceTier: z.nullable(ServiceTier$outboundSchema).optional(),
1970
+ truncation: z.nullable(Truncation$outboundSchema).optional(),
1971
+ stream: z.nullable(z.boolean()).optional(),
1972
+ provider: z.nullable(
1973
+ z.lazy(() => SendResponsesRequestProvider$outboundSchema),
1974
+ ).optional(),
1975
+ plugins: z.array(
1976
+ z.union([
1977
+ z.lazy(() => PluginModeration$outboundSchema),
1978
+ z.lazy(() => PluginWeb$outboundSchema),
1979
+ z.lazy(() => PluginChainOfThought$outboundSchema),
1980
+ z.lazy(() => PluginFileParser$outboundSchema),
1981
+ ]),
1982
+ ).optional(),
1983
+ user: z.string().optional(),
1984
+ }).transform((v) => {
1985
+ return remap$(v, {
1986
+ toolChoice: "tool_choice",
1987
+ parallelToolCalls: "parallel_tool_calls",
1988
+ maxOutputTokens: "max_output_tokens",
1989
+ topP: "top_p",
1990
+ topK: "top_k",
1991
+ promptCacheKey: "prompt_cache_key",
1992
+ previousResponseId: "previous_response_id",
1993
+ safetyIdentifier: "safety_identifier",
1994
+ serviceTier: "service_tier",
1995
+ });
1996
+ });
1997
+
1998
+ /**
1999
+ * @internal
2000
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2001
+ */
2002
+ export namespace SendResponsesRequestRequest$ {
2003
+ /** @deprecated use `SendResponsesRequestRequest$inboundSchema` instead. */
2004
+ export const inboundSchema = SendResponsesRequestRequest$inboundSchema;
2005
+ /** @deprecated use `SendResponsesRequestRequest$outboundSchema` instead. */
2006
+ export const outboundSchema = SendResponsesRequestRequest$outboundSchema;
2007
+ /** @deprecated use `SendResponsesRequestRequest$Outbound` instead. */
2008
+ export type Outbound = SendResponsesRequestRequest$Outbound;
2009
+ }
2010
+
2011
+ export function sendResponsesRequestRequestToJSON(
2012
+ sendResponsesRequestRequest: SendResponsesRequestRequest,
2013
+ ): string {
2014
+ return JSON.stringify(
2015
+ SendResponsesRequestRequest$outboundSchema.parse(
2016
+ sendResponsesRequestRequest,
2017
+ ),
2018
+ );
2019
+ }
2020
+
2021
+ export function sendResponsesRequestRequestFromJSON(
2022
+ jsonString: string,
2023
+ ): SafeParseResult<SendResponsesRequestRequest, SDKValidationError> {
2024
+ return safeParse(
2025
+ jsonString,
2026
+ (x) => SendResponsesRequestRequest$inboundSchema.parse(JSON.parse(x)),
2027
+ `Failed to parse 'SendResponsesRequestRequest' from JSON`,
2028
+ );
2029
+ }
2030
+
26
2031
  /** @internal */
27
2032
  export const SendResponsesRequestResponseBody$inboundSchema: z.ZodType<
28
2033
  SendResponsesRequestResponseBody,