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

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