@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,1138 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- import { remap as remap$ } from "../lib/primitives.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { ResponseIncludable$inboundSchema, ResponseIncludable$outboundSchema, } from "./responseincludable.js";
8
- import { ResponseInput$inboundSchema, ResponseInput$outboundSchema, } from "./responseinput.js";
9
- import { ResponsePrompt$inboundSchema, ResponsePrompt$outboundSchema, } from "./responseprompt.js";
10
- import { ResponseReasoningConfig$inboundSchema, ResponseReasoningConfig$outboundSchema, } from "./responsereasoningconfig.js";
11
- import { ResponseTextConfig$inboundSchema, ResponseTextConfig$outboundSchema, } from "./responsetextconfig.js";
12
- import { Tool$inboundSchema, Tool$outboundSchema, } from "./tool.js";
13
- import { ToolChoice$inboundSchema, ToolChoice$outboundSchema, } from "./toolchoice.js";
14
- export const OpenAIResponsesRequestServiceTier = {
15
- Auto: "auto",
16
- Default: "default",
17
- Flex: "flex",
18
- Priority: "priority",
19
- Scale: "scale",
20
- };
21
- export const OpenAIResponsesRequestTruncation = {
22
- Auto: "auto",
23
- Disabled: "disabled",
24
- };
25
- /**
26
- * Data collection setting. If no available model provider meets the requirement, your request will return an error.
27
- *
28
- * @remarks
29
- * - allow: (default) allow providers which store user data non-transiently and may train on it
30
- * - deny: use only providers which do not collect user data.
31
- */
32
- export const DataCollection = {
33
- Deny: "deny",
34
- Allow: "allow",
35
- };
36
- export const OrderEnum = {
37
- AnyScale: "AnyScale",
38
- CentML: "Cent-ML",
39
- HuggingFace: "HuggingFace",
40
- Hyperbolic2: "Hyperbolic 2",
41
- Lepton: "Lepton",
42
- Lynn2: "Lynn 2",
43
- Lynn: "Lynn",
44
- Mancer: "Mancer",
45
- Modal: "Modal",
46
- OctoAI: "OctoAI",
47
- Recursal: "Recursal",
48
- Reflection: "Reflection",
49
- Replicate: "Replicate",
50
- SambaNova2: "SambaNova 2",
51
- SFCompute: "SF Compute",
52
- Together2: "Together 2",
53
- OneDotAI: "01.AI",
54
- Ai21: "AI21",
55
- AionLabs: "AionLabs",
56
- Alibaba: "Alibaba",
57
- AmazonBedrock: "Amazon Bedrock",
58
- Anthropic: "Anthropic",
59
- AtlasCloud: "AtlasCloud",
60
- Atoma: "Atoma",
61
- Avian: "Avian",
62
- Azure: "Azure",
63
- BaseTen: "BaseTen",
64
- Cerebras: "Cerebras",
65
- Chutes: "Chutes",
66
- Cloudflare: "Cloudflare",
67
- Cohere: "Cohere",
68
- CrofAI: "CrofAI",
69
- Crusoe: "Crusoe",
70
- DeepInfra: "DeepInfra",
71
- DeepSeek: "DeepSeek",
72
- Enfer: "Enfer",
73
- Featherless: "Featherless",
74
- Fireworks: "Fireworks",
75
- Friendli: "Friendli",
76
- GMICloud: "GMICloud",
77
- Google: "Google",
78
- GoogleAIStudio: "Google AI Studio",
79
- Groq: "Groq",
80
- Hyperbolic: "Hyperbolic",
81
- Inception: "Inception",
82
- InferenceNet: "InferenceNet",
83
- Infermatic: "Infermatic",
84
- Inflection: "Inflection",
85
- InoCloud: "InoCloud",
86
- Kluster: "Kluster",
87
- Lambda: "Lambda",
88
- Liquid: "Liquid",
89
- Mancer2: "Mancer 2",
90
- Meta: "Meta",
91
- Minimax: "Minimax",
92
- Mistral: "Mistral",
93
- MoonshotAI: "Moonshot AI",
94
- Morph: "Morph",
95
- NCompass: "NCompass",
96
- Nebius: "Nebius",
97
- NextBit: "NextBit",
98
- Nineteen: "Nineteen",
99
- Novita: "Novita",
100
- Nvidia: "Nvidia",
101
- OpenAI: "OpenAI",
102
- OpenInference: "OpenInference",
103
- Parasail: "Parasail",
104
- Perplexity: "Perplexity",
105
- Phala: "Phala",
106
- Relace: "Relace",
107
- SambaNova: "SambaNova",
108
- SiliconFlow: "SiliconFlow",
109
- Stealth: "Stealth",
110
- Switchpoint: "Switchpoint",
111
- Targon: "Targon",
112
- Together: "Together",
113
- Ubicloud: "Ubicloud",
114
- Venice: "Venice",
115
- WandB: "WandB",
116
- XAI: "xAI",
117
- ZAi: "Z.AI",
118
- FakeProvider: "FakeProvider",
119
- };
120
- export const OnlyEnum = {
121
- AnyScale: "AnyScale",
122
- CentML: "Cent-ML",
123
- HuggingFace: "HuggingFace",
124
- Hyperbolic2: "Hyperbolic 2",
125
- Lepton: "Lepton",
126
- Lynn2: "Lynn 2",
127
- Lynn: "Lynn",
128
- Mancer: "Mancer",
129
- Modal: "Modal",
130
- OctoAI: "OctoAI",
131
- Recursal: "Recursal",
132
- Reflection: "Reflection",
133
- Replicate: "Replicate",
134
- SambaNova2: "SambaNova 2",
135
- SFCompute: "SF Compute",
136
- Together2: "Together 2",
137
- OneDotAI: "01.AI",
138
- Ai21: "AI21",
139
- AionLabs: "AionLabs",
140
- Alibaba: "Alibaba",
141
- AmazonBedrock: "Amazon Bedrock",
142
- Anthropic: "Anthropic",
143
- AtlasCloud: "AtlasCloud",
144
- Atoma: "Atoma",
145
- Avian: "Avian",
146
- Azure: "Azure",
147
- BaseTen: "BaseTen",
148
- Cerebras: "Cerebras",
149
- Chutes: "Chutes",
150
- Cloudflare: "Cloudflare",
151
- Cohere: "Cohere",
152
- CrofAI: "CrofAI",
153
- Crusoe: "Crusoe",
154
- DeepInfra: "DeepInfra",
155
- DeepSeek: "DeepSeek",
156
- Enfer: "Enfer",
157
- Featherless: "Featherless",
158
- Fireworks: "Fireworks",
159
- Friendli: "Friendli",
160
- GMICloud: "GMICloud",
161
- Google: "Google",
162
- GoogleAIStudio: "Google AI Studio",
163
- Groq: "Groq",
164
- Hyperbolic: "Hyperbolic",
165
- Inception: "Inception",
166
- InferenceNet: "InferenceNet",
167
- Infermatic: "Infermatic",
168
- Inflection: "Inflection",
169
- InoCloud: "InoCloud",
170
- Kluster: "Kluster",
171
- Lambda: "Lambda",
172
- Liquid: "Liquid",
173
- Mancer2: "Mancer 2",
174
- Meta: "Meta",
175
- Minimax: "Minimax",
176
- Mistral: "Mistral",
177
- MoonshotAI: "Moonshot AI",
178
- Morph: "Morph",
179
- NCompass: "NCompass",
180
- Nebius: "Nebius",
181
- NextBit: "NextBit",
182
- Nineteen: "Nineteen",
183
- Novita: "Novita",
184
- Nvidia: "Nvidia",
185
- OpenAI: "OpenAI",
186
- OpenInference: "OpenInference",
187
- Parasail: "Parasail",
188
- Perplexity: "Perplexity",
189
- Phala: "Phala",
190
- Relace: "Relace",
191
- SambaNova: "SambaNova",
192
- SiliconFlow: "SiliconFlow",
193
- Stealth: "Stealth",
194
- Switchpoint: "Switchpoint",
195
- Targon: "Targon",
196
- Together: "Together",
197
- Ubicloud: "Ubicloud",
198
- Venice: "Venice",
199
- WandB: "WandB",
200
- XAI: "xAI",
201
- ZAi: "Z.AI",
202
- FakeProvider: "FakeProvider",
203
- };
204
- export const IgnoreEnum = {
205
- AnyScale: "AnyScale",
206
- CentML: "Cent-ML",
207
- HuggingFace: "HuggingFace",
208
- Hyperbolic2: "Hyperbolic 2",
209
- Lepton: "Lepton",
210
- Lynn2: "Lynn 2",
211
- Lynn: "Lynn",
212
- Mancer: "Mancer",
213
- Modal: "Modal",
214
- OctoAI: "OctoAI",
215
- Recursal: "Recursal",
216
- Reflection: "Reflection",
217
- Replicate: "Replicate",
218
- SambaNova2: "SambaNova 2",
219
- SFCompute: "SF Compute",
220
- Together2: "Together 2",
221
- OneDotAI: "01.AI",
222
- Ai21: "AI21",
223
- AionLabs: "AionLabs",
224
- Alibaba: "Alibaba",
225
- AmazonBedrock: "Amazon Bedrock",
226
- Anthropic: "Anthropic",
227
- AtlasCloud: "AtlasCloud",
228
- Atoma: "Atoma",
229
- Avian: "Avian",
230
- Azure: "Azure",
231
- BaseTen: "BaseTen",
232
- Cerebras: "Cerebras",
233
- Chutes: "Chutes",
234
- Cloudflare: "Cloudflare",
235
- Cohere: "Cohere",
236
- CrofAI: "CrofAI",
237
- Crusoe: "Crusoe",
238
- DeepInfra: "DeepInfra",
239
- DeepSeek: "DeepSeek",
240
- Enfer: "Enfer",
241
- Featherless: "Featherless",
242
- Fireworks: "Fireworks",
243
- Friendli: "Friendli",
244
- GMICloud: "GMICloud",
245
- Google: "Google",
246
- GoogleAIStudio: "Google AI Studio",
247
- Groq: "Groq",
248
- Hyperbolic: "Hyperbolic",
249
- Inception: "Inception",
250
- InferenceNet: "InferenceNet",
251
- Infermatic: "Infermatic",
252
- Inflection: "Inflection",
253
- InoCloud: "InoCloud",
254
- Kluster: "Kluster",
255
- Lambda: "Lambda",
256
- Liquid: "Liquid",
257
- Mancer2: "Mancer 2",
258
- Meta: "Meta",
259
- Minimax: "Minimax",
260
- Mistral: "Mistral",
261
- MoonshotAI: "Moonshot AI",
262
- Morph: "Morph",
263
- NCompass: "NCompass",
264
- Nebius: "Nebius",
265
- NextBit: "NextBit",
266
- Nineteen: "Nineteen",
267
- Novita: "Novita",
268
- Nvidia: "Nvidia",
269
- OpenAI: "OpenAI",
270
- OpenInference: "OpenInference",
271
- Parasail: "Parasail",
272
- Perplexity: "Perplexity",
273
- Phala: "Phala",
274
- Relace: "Relace",
275
- SambaNova: "SambaNova",
276
- SiliconFlow: "SiliconFlow",
277
- Stealth: "Stealth",
278
- Switchpoint: "Switchpoint",
279
- Targon: "Targon",
280
- Together: "Together",
281
- Ubicloud: "Ubicloud",
282
- Venice: "Venice",
283
- WandB: "WandB",
284
- XAI: "xAI",
285
- ZAi: "Z.AI",
286
- FakeProvider: "FakeProvider",
287
- };
288
- export const Quantization = {
289
- Int4: "int4",
290
- Int8: "int8",
291
- Fp4: "fp4",
292
- Fp6: "fp6",
293
- Fp8: "fp8",
294
- Fp16: "fp16",
295
- Bf16: "bf16",
296
- Fp32: "fp32",
297
- Unknown: "unknown",
298
- };
299
- /**
300
- * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
301
- */
302
- export const Sort = {
303
- Price: "price",
304
- Throughput: "throughput",
305
- Latency: "latency",
306
- };
307
- export const IdFileParser = {
308
- FileParser: "file-parser",
309
- };
310
- export const PdfEngine = {
311
- MistralOcr: "mistral-ocr",
312
- PdfText: "pdf-text",
313
- Native: "native",
314
- };
315
- export const IdChainOfThought = {
316
- ChainOfThought: "chain-of-thought",
317
- };
318
- export const IdWeb = {
319
- Web: "web",
320
- };
321
- export const Engine = {
322
- Native: "native",
323
- Exa: "exa",
324
- };
325
- export const IdModeration = {
326
- Moderation: "moderation",
327
- };
328
- /** @internal */
329
- export const OpenAIResponsesRequestServiceTier$inboundSchema = z.nativeEnum(OpenAIResponsesRequestServiceTier);
330
- /** @internal */
331
- export const OpenAIResponsesRequestServiceTier$outboundSchema = OpenAIResponsesRequestServiceTier$inboundSchema;
332
- /**
333
- * @internal
334
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
335
- */
336
- export var OpenAIResponsesRequestServiceTier$;
337
- (function (OpenAIResponsesRequestServiceTier$) {
338
- /** @deprecated use `OpenAIResponsesRequestServiceTier$inboundSchema` instead. */
339
- OpenAIResponsesRequestServiceTier$.inboundSchema = OpenAIResponsesRequestServiceTier$inboundSchema;
340
- /** @deprecated use `OpenAIResponsesRequestServiceTier$outboundSchema` instead. */
341
- OpenAIResponsesRequestServiceTier$.outboundSchema = OpenAIResponsesRequestServiceTier$outboundSchema;
342
- })(OpenAIResponsesRequestServiceTier$ || (OpenAIResponsesRequestServiceTier$ = {}));
343
- /** @internal */
344
- export const OpenAIResponsesRequestTruncation$inboundSchema = z.nativeEnum(OpenAIResponsesRequestTruncation);
345
- /** @internal */
346
- export const OpenAIResponsesRequestTruncation$outboundSchema = OpenAIResponsesRequestTruncation$inboundSchema;
347
- /**
348
- * @internal
349
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
350
- */
351
- export var OpenAIResponsesRequestTruncation$;
352
- (function (OpenAIResponsesRequestTruncation$) {
353
- /** @deprecated use `OpenAIResponsesRequestTruncation$inboundSchema` instead. */
354
- OpenAIResponsesRequestTruncation$.inboundSchema = OpenAIResponsesRequestTruncation$inboundSchema;
355
- /** @deprecated use `OpenAIResponsesRequestTruncation$outboundSchema` instead. */
356
- OpenAIResponsesRequestTruncation$.outboundSchema = OpenAIResponsesRequestTruncation$outboundSchema;
357
- })(OpenAIResponsesRequestTruncation$ || (OpenAIResponsesRequestTruncation$ = {}));
358
- /** @internal */
359
- export const DataCollection$inboundSchema = z.nativeEnum(DataCollection);
360
- /** @internal */
361
- export const DataCollection$outboundSchema = DataCollection$inboundSchema;
362
- /**
363
- * @internal
364
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
365
- */
366
- export var DataCollection$;
367
- (function (DataCollection$) {
368
- /** @deprecated use `DataCollection$inboundSchema` instead. */
369
- DataCollection$.inboundSchema = DataCollection$inboundSchema;
370
- /** @deprecated use `DataCollection$outboundSchema` instead. */
371
- DataCollection$.outboundSchema = DataCollection$outboundSchema;
372
- })(DataCollection$ || (DataCollection$ = {}));
373
- /** @internal */
374
- export const OrderEnum$inboundSchema = z
375
- .nativeEnum(OrderEnum);
376
- /** @internal */
377
- export const OrderEnum$outboundSchema = OrderEnum$inboundSchema;
378
- /**
379
- * @internal
380
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
381
- */
382
- export var OrderEnum$;
383
- (function (OrderEnum$) {
384
- /** @deprecated use `OrderEnum$inboundSchema` instead. */
385
- OrderEnum$.inboundSchema = OrderEnum$inboundSchema;
386
- /** @deprecated use `OrderEnum$outboundSchema` instead. */
387
- OrderEnum$.outboundSchema = OrderEnum$outboundSchema;
388
- })(OrderEnum$ || (OrderEnum$ = {}));
389
- /** @internal */
390
- export const Order$inboundSchema = z
391
- .union([OrderEnum$inboundSchema, z.string()]);
392
- /** @internal */
393
- export const Order$outboundSchema = z.union([OrderEnum$outboundSchema, z.string()]);
394
- /**
395
- * @internal
396
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
397
- */
398
- export var Order$;
399
- (function (Order$) {
400
- /** @deprecated use `Order$inboundSchema` instead. */
401
- Order$.inboundSchema = Order$inboundSchema;
402
- /** @deprecated use `Order$outboundSchema` instead. */
403
- Order$.outboundSchema = Order$outboundSchema;
404
- })(Order$ || (Order$ = {}));
405
- export function orderToJSON(order) {
406
- return JSON.stringify(Order$outboundSchema.parse(order));
407
- }
408
- export function orderFromJSON(jsonString) {
409
- return safeParse(jsonString, (x) => Order$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Order' from JSON`);
410
- }
411
- /** @internal */
412
- export const OnlyEnum$inboundSchema = z
413
- .nativeEnum(OnlyEnum);
414
- /** @internal */
415
- export const OnlyEnum$outboundSchema = OnlyEnum$inboundSchema;
416
- /**
417
- * @internal
418
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
- */
420
- export var OnlyEnum$;
421
- (function (OnlyEnum$) {
422
- /** @deprecated use `OnlyEnum$inboundSchema` instead. */
423
- OnlyEnum$.inboundSchema = OnlyEnum$inboundSchema;
424
- /** @deprecated use `OnlyEnum$outboundSchema` instead. */
425
- OnlyEnum$.outboundSchema = OnlyEnum$outboundSchema;
426
- })(OnlyEnum$ || (OnlyEnum$ = {}));
427
- /** @internal */
428
- export const Only$inboundSchema = z
429
- .union([OnlyEnum$inboundSchema, z.string()]);
430
- /** @internal */
431
- export const Only$outboundSchema = z.union([OnlyEnum$outboundSchema, z.string()]);
432
- /**
433
- * @internal
434
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
435
- */
436
- export var Only$;
437
- (function (Only$) {
438
- /** @deprecated use `Only$inboundSchema` instead. */
439
- Only$.inboundSchema = Only$inboundSchema;
440
- /** @deprecated use `Only$outboundSchema` instead. */
441
- Only$.outboundSchema = Only$outboundSchema;
442
- })(Only$ || (Only$ = {}));
443
- export function onlyToJSON(only) {
444
- return JSON.stringify(Only$outboundSchema.parse(only));
445
- }
446
- export function onlyFromJSON(jsonString) {
447
- return safeParse(jsonString, (x) => Only$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Only' from JSON`);
448
- }
449
- /** @internal */
450
- export const IgnoreEnum$inboundSchema = z
451
- .nativeEnum(IgnoreEnum);
452
- /** @internal */
453
- export const IgnoreEnum$outboundSchema = IgnoreEnum$inboundSchema;
454
- /**
455
- * @internal
456
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
457
- */
458
- export var IgnoreEnum$;
459
- (function (IgnoreEnum$) {
460
- /** @deprecated use `IgnoreEnum$inboundSchema` instead. */
461
- IgnoreEnum$.inboundSchema = IgnoreEnum$inboundSchema;
462
- /** @deprecated use `IgnoreEnum$outboundSchema` instead. */
463
- IgnoreEnum$.outboundSchema = IgnoreEnum$outboundSchema;
464
- })(IgnoreEnum$ || (IgnoreEnum$ = {}));
465
- /** @internal */
466
- export const Ignore$inboundSchema = z
467
- .union([IgnoreEnum$inboundSchema, z.string()]);
468
- /** @internal */
469
- export const Ignore$outboundSchema = z.union([IgnoreEnum$outboundSchema, z.string()]);
470
- /**
471
- * @internal
472
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
473
- */
474
- export var Ignore$;
475
- (function (Ignore$) {
476
- /** @deprecated use `Ignore$inboundSchema` instead. */
477
- Ignore$.inboundSchema = Ignore$inboundSchema;
478
- /** @deprecated use `Ignore$outboundSchema` instead. */
479
- Ignore$.outboundSchema = Ignore$outboundSchema;
480
- })(Ignore$ || (Ignore$ = {}));
481
- export function ignoreToJSON(ignore) {
482
- return JSON.stringify(Ignore$outboundSchema.parse(ignore));
483
- }
484
- export function ignoreFromJSON(jsonString) {
485
- return safeParse(jsonString, (x) => Ignore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ignore' from JSON`);
486
- }
487
- /** @internal */
488
- export const Quantization$inboundSchema = z.nativeEnum(Quantization);
489
- /** @internal */
490
- export const Quantization$outboundSchema = Quantization$inboundSchema;
491
- /**
492
- * @internal
493
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
494
- */
495
- export var Quantization$;
496
- (function (Quantization$) {
497
- /** @deprecated use `Quantization$inboundSchema` instead. */
498
- Quantization$.inboundSchema = Quantization$inboundSchema;
499
- /** @deprecated use `Quantization$outboundSchema` instead. */
500
- Quantization$.outboundSchema = Quantization$outboundSchema;
501
- })(Quantization$ || (Quantization$ = {}));
502
- /** @internal */
503
- export const Sort$inboundSchema = z.nativeEnum(Sort);
504
- /** @internal */
505
- export const Sort$outboundSchema = Sort$inboundSchema;
506
- /**
507
- * @internal
508
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
509
- */
510
- export var Sort$;
511
- (function (Sort$) {
512
- /** @deprecated use `Sort$inboundSchema` instead. */
513
- Sort$.inboundSchema = Sort$inboundSchema;
514
- /** @deprecated use `Sort$outboundSchema` instead. */
515
- Sort$.outboundSchema = Sort$outboundSchema;
516
- })(Sort$ || (Sort$ = {}));
517
- /** @internal */
518
- export const OpenAIResponsesRequestPrompt$inboundSchema = z.union([z.number(), z.string(), z.any()]);
519
- /** @internal */
520
- export const OpenAIResponsesRequestPrompt$outboundSchema = z.union([z.number(), z.string(), z.any()]);
521
- /**
522
- * @internal
523
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
524
- */
525
- export var OpenAIResponsesRequestPrompt$;
526
- (function (OpenAIResponsesRequestPrompt$) {
527
- /** @deprecated use `OpenAIResponsesRequestPrompt$inboundSchema` instead. */
528
- OpenAIResponsesRequestPrompt$.inboundSchema = OpenAIResponsesRequestPrompt$inboundSchema;
529
- /** @deprecated use `OpenAIResponsesRequestPrompt$outboundSchema` instead. */
530
- OpenAIResponsesRequestPrompt$.outboundSchema = OpenAIResponsesRequestPrompt$outboundSchema;
531
- })(OpenAIResponsesRequestPrompt$ || (OpenAIResponsesRequestPrompt$ = {}));
532
- export function openAIResponsesRequestPromptToJSON(openAIResponsesRequestPrompt) {
533
- return JSON.stringify(OpenAIResponsesRequestPrompt$outboundSchema.parse(openAIResponsesRequestPrompt));
534
- }
535
- export function openAIResponsesRequestPromptFromJSON(jsonString) {
536
- return safeParse(jsonString, (x) => OpenAIResponsesRequestPrompt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesRequestPrompt' from JSON`);
537
- }
538
- /** @internal */
539
- export const Completion$inboundSchema = z.union([z.number(), z.string(), z.any()]);
540
- /** @internal */
541
- export const Completion$outboundSchema = z.union([z.number(), z.string(), z.any()]);
542
- /**
543
- * @internal
544
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
545
- */
546
- export var Completion$;
547
- (function (Completion$) {
548
- /** @deprecated use `Completion$inboundSchema` instead. */
549
- Completion$.inboundSchema = Completion$inboundSchema;
550
- /** @deprecated use `Completion$outboundSchema` instead. */
551
- Completion$.outboundSchema = Completion$outboundSchema;
552
- })(Completion$ || (Completion$ = {}));
553
- export function completionToJSON(completion) {
554
- return JSON.stringify(Completion$outboundSchema.parse(completion));
555
- }
556
- export function completionFromJSON(jsonString) {
557
- return safeParse(jsonString, (x) => Completion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Completion' from JSON`);
558
- }
559
- /** @internal */
560
- export const Image$inboundSchema = z
561
- .union([z.number(), z.string(), z.any()]);
562
- /** @internal */
563
- export const Image$outboundSchema = z.union([z.number(), z.string(), z.any()]);
564
- /**
565
- * @internal
566
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
567
- */
568
- export var Image$;
569
- (function (Image$) {
570
- /** @deprecated use `Image$inboundSchema` instead. */
571
- Image$.inboundSchema = Image$inboundSchema;
572
- /** @deprecated use `Image$outboundSchema` instead. */
573
- Image$.outboundSchema = Image$outboundSchema;
574
- })(Image$ || (Image$ = {}));
575
- export function imageToJSON(image) {
576
- return JSON.stringify(Image$outboundSchema.parse(image));
577
- }
578
- export function imageFromJSON(jsonString) {
579
- return safeParse(jsonString, (x) => Image$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Image' from JSON`);
580
- }
581
- /** @internal */
582
- export const Audio$inboundSchema = z
583
- .union([z.number(), z.string(), z.any()]);
584
- /** @internal */
585
- export const Audio$outboundSchema = z.union([z.number(), z.string(), z.any()]);
586
- /**
587
- * @internal
588
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
589
- */
590
- export var Audio$;
591
- (function (Audio$) {
592
- /** @deprecated use `Audio$inboundSchema` instead. */
593
- Audio$.inboundSchema = Audio$inboundSchema;
594
- /** @deprecated use `Audio$outboundSchema` instead. */
595
- Audio$.outboundSchema = Audio$outboundSchema;
596
- })(Audio$ || (Audio$ = {}));
597
- export function audioToJSON(audio) {
598
- return JSON.stringify(Audio$outboundSchema.parse(audio));
599
- }
600
- export function audioFromJSON(jsonString) {
601
- return safeParse(jsonString, (x) => Audio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Audio' from JSON`);
602
- }
603
- /** @internal */
604
- export const RequestT$inboundSchema = z.union([z.number(), z.string(), z.any()]);
605
- /** @internal */
606
- export const RequestT$outboundSchema = z.union([z.number(), z.string(), z.any()]);
607
- /**
608
- * @internal
609
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
610
- */
611
- export var RequestT$;
612
- (function (RequestT$) {
613
- /** @deprecated use `RequestT$inboundSchema` instead. */
614
- RequestT$.inboundSchema = RequestT$inboundSchema;
615
- /** @deprecated use `RequestT$outboundSchema` instead. */
616
- RequestT$.outboundSchema = RequestT$outboundSchema;
617
- })(RequestT$ || (RequestT$ = {}));
618
- export function requestToJSON(requestT) {
619
- return JSON.stringify(RequestT$outboundSchema.parse(requestT));
620
- }
621
- export function requestFromJSON(jsonString) {
622
- return safeParse(jsonString, (x) => RequestT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestT' from JSON`);
623
- }
624
- /** @internal */
625
- export const MaxPrice$inboundSchema = z.object({
626
- prompt: z.union([z.number(), z.string(), z.any()]).optional(),
627
- completion: z.union([z.number(), z.string(), z.any()]).optional(),
628
- image: z.union([z.number(), z.string(), z.any()]).optional(),
629
- audio: z.union([z.number(), z.string(), z.any()]).optional(),
630
- request: z.union([z.number(), z.string(), z.any()]).optional(),
631
- });
632
- /** @internal */
633
- export const MaxPrice$outboundSchema = z.object({
634
- prompt: z.union([z.number(), z.string(), z.any()]).optional(),
635
- completion: z.union([z.number(), z.string(), z.any()]).optional(),
636
- image: z.union([z.number(), z.string(), z.any()]).optional(),
637
- audio: z.union([z.number(), z.string(), z.any()]).optional(),
638
- request: z.union([z.number(), z.string(), z.any()]).optional(),
639
- });
640
- /**
641
- * @internal
642
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
643
- */
644
- export var MaxPrice$;
645
- (function (MaxPrice$) {
646
- /** @deprecated use `MaxPrice$inboundSchema` instead. */
647
- MaxPrice$.inboundSchema = MaxPrice$inboundSchema;
648
- /** @deprecated use `MaxPrice$outboundSchema` instead. */
649
- MaxPrice$.outboundSchema = MaxPrice$outboundSchema;
650
- })(MaxPrice$ || (MaxPrice$ = {}));
651
- export function maxPriceToJSON(maxPrice) {
652
- return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice));
653
- }
654
- export function maxPriceFromJSON(jsonString) {
655
- return safeParse(jsonString, (x) => MaxPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MaxPrice' from JSON`);
656
- }
657
- /** @internal */
658
- export const Experimental$inboundSchema = z.object({});
659
- /** @internal */
660
- export const Experimental$outboundSchema = z.object({});
661
- /**
662
- * @internal
663
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
664
- */
665
- export var Experimental$;
666
- (function (Experimental$) {
667
- /** @deprecated use `Experimental$inboundSchema` instead. */
668
- Experimental$.inboundSchema = Experimental$inboundSchema;
669
- /** @deprecated use `Experimental$outboundSchema` instead. */
670
- Experimental$.outboundSchema = Experimental$outboundSchema;
671
- })(Experimental$ || (Experimental$ = {}));
672
- export function experimentalToJSON(experimental) {
673
- return JSON.stringify(Experimental$outboundSchema.parse(experimental));
674
- }
675
- export function experimentalFromJSON(jsonString) {
676
- return safeParse(jsonString, (x) => Experimental$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Experimental' from JSON`);
677
- }
678
- /** @internal */
679
- export const Provider$inboundSchema = z.object({
680
- allow_fallbacks: z.nullable(z.boolean()).optional(),
681
- require_parameters: z.nullable(z.boolean()).optional(),
682
- data_collection: z.nullable(DataCollection$inboundSchema).optional(),
683
- zdr: z.nullable(z.boolean()).optional(),
684
- order: z.nullable(z.array(z.union([OrderEnum$inboundSchema, z.string()])))
685
- .optional(),
686
- only: z.nullable(z.array(z.union([OnlyEnum$inboundSchema, z.string()])))
687
- .optional(),
688
- ignore: z.nullable(z.array(z.union([IgnoreEnum$inboundSchema, z.string()])))
689
- .optional(),
690
- quantizations: z.nullable(z.array(Quantization$inboundSchema)).optional(),
691
- sort: z.nullable(Sort$inboundSchema).optional(),
692
- max_price: z.lazy(() => MaxPrice$inboundSchema).optional(),
693
- experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(),
694
- }).transform((v) => {
695
- return remap$(v, {
696
- "allow_fallbacks": "allowFallbacks",
697
- "require_parameters": "requireParameters",
698
- "data_collection": "dataCollection",
699
- "max_price": "maxPrice",
700
- });
701
- });
702
- /** @internal */
703
- export const Provider$outboundSchema = z.object({
704
- allowFallbacks: z.nullable(z.boolean()).optional(),
705
- requireParameters: z.nullable(z.boolean()).optional(),
706
- dataCollection: z.nullable(DataCollection$outboundSchema).optional(),
707
- zdr: z.nullable(z.boolean()).optional(),
708
- order: z.nullable(z.array(z.union([OrderEnum$outboundSchema, z.string()])))
709
- .optional(),
710
- only: z.nullable(z.array(z.union([OnlyEnum$outboundSchema, z.string()])))
711
- .optional(),
712
- ignore: z.nullable(z.array(z.union([IgnoreEnum$outboundSchema, z.string()])))
713
- .optional(),
714
- quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(),
715
- sort: z.nullable(Sort$outboundSchema).optional(),
716
- maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
717
- experimental: z.nullable(z.lazy(() => Experimental$outboundSchema))
718
- .optional(),
719
- }).transform((v) => {
720
- return remap$(v, {
721
- allowFallbacks: "allow_fallbacks",
722
- requireParameters: "require_parameters",
723
- dataCollection: "data_collection",
724
- maxPrice: "max_price",
725
- });
726
- });
727
- /**
728
- * @internal
729
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
730
- */
731
- export var Provider$;
732
- (function (Provider$) {
733
- /** @deprecated use `Provider$inboundSchema` instead. */
734
- Provider$.inboundSchema = Provider$inboundSchema;
735
- /** @deprecated use `Provider$outboundSchema` instead. */
736
- Provider$.outboundSchema = Provider$outboundSchema;
737
- })(Provider$ || (Provider$ = {}));
738
- export function providerToJSON(provider) {
739
- return JSON.stringify(Provider$outboundSchema.parse(provider));
740
- }
741
- export function providerFromJSON(jsonString) {
742
- return safeParse(jsonString, (x) => Provider$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Provider' from JSON`);
743
- }
744
- /** @internal */
745
- export const IdFileParser$inboundSchema = z.nativeEnum(IdFileParser);
746
- /** @internal */
747
- export const IdFileParser$outboundSchema = IdFileParser$inboundSchema;
748
- /**
749
- * @internal
750
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
751
- */
752
- export var IdFileParser$;
753
- (function (IdFileParser$) {
754
- /** @deprecated use `IdFileParser$inboundSchema` instead. */
755
- IdFileParser$.inboundSchema = IdFileParser$inboundSchema;
756
- /** @deprecated use `IdFileParser$outboundSchema` instead. */
757
- IdFileParser$.outboundSchema = IdFileParser$outboundSchema;
758
- })(IdFileParser$ || (IdFileParser$ = {}));
759
- /** @internal */
760
- export const PdfEngine$inboundSchema = z
761
- .nativeEnum(PdfEngine);
762
- /** @internal */
763
- export const PdfEngine$outboundSchema = PdfEngine$inboundSchema;
764
- /**
765
- * @internal
766
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
767
- */
768
- export var PdfEngine$;
769
- (function (PdfEngine$) {
770
- /** @deprecated use `PdfEngine$inboundSchema` instead. */
771
- PdfEngine$.inboundSchema = PdfEngine$inboundSchema;
772
- /** @deprecated use `PdfEngine$outboundSchema` instead. */
773
- PdfEngine$.outboundSchema = PdfEngine$outboundSchema;
774
- })(PdfEngine$ || (PdfEngine$ = {}));
775
- /** @internal */
776
- export const Pdf$inboundSchema = z
777
- .object({
778
- engine: PdfEngine$inboundSchema.optional(),
779
- });
780
- /** @internal */
781
- export const Pdf$outboundSchema = z
782
- .object({
783
- engine: PdfEngine$outboundSchema.optional(),
784
- });
785
- /**
786
- * @internal
787
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
788
- */
789
- export var Pdf$;
790
- (function (Pdf$) {
791
- /** @deprecated use `Pdf$inboundSchema` instead. */
792
- Pdf$.inboundSchema = Pdf$inboundSchema;
793
- /** @deprecated use `Pdf$outboundSchema` instead. */
794
- Pdf$.outboundSchema = Pdf$outboundSchema;
795
- })(Pdf$ || (Pdf$ = {}));
796
- export function pdfToJSON(pdf) {
797
- return JSON.stringify(Pdf$outboundSchema.parse(pdf));
798
- }
799
- export function pdfFromJSON(jsonString) {
800
- return safeParse(jsonString, (x) => Pdf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pdf' from JSON`);
801
- }
802
- /** @internal */
803
- export const PluginFileParser$inboundSchema = z.object({
804
- id: IdFileParser$inboundSchema,
805
- max_files: z.number().optional(),
806
- pdf: z.lazy(() => Pdf$inboundSchema).optional(),
807
- }).transform((v) => {
808
- return remap$(v, {
809
- "max_files": "maxFiles",
810
- });
811
- });
812
- /** @internal */
813
- export const PluginFileParser$outboundSchema = z.object({
814
- id: IdFileParser$outboundSchema,
815
- maxFiles: z.number().optional(),
816
- pdf: z.lazy(() => Pdf$outboundSchema).optional(),
817
- }).transform((v) => {
818
- return remap$(v, {
819
- maxFiles: "max_files",
820
- });
821
- });
822
- /**
823
- * @internal
824
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
825
- */
826
- export var PluginFileParser$;
827
- (function (PluginFileParser$) {
828
- /** @deprecated use `PluginFileParser$inboundSchema` instead. */
829
- PluginFileParser$.inboundSchema = PluginFileParser$inboundSchema;
830
- /** @deprecated use `PluginFileParser$outboundSchema` instead. */
831
- PluginFileParser$.outboundSchema = PluginFileParser$outboundSchema;
832
- })(PluginFileParser$ || (PluginFileParser$ = {}));
833
- export function pluginFileParserToJSON(pluginFileParser) {
834
- return JSON.stringify(PluginFileParser$outboundSchema.parse(pluginFileParser));
835
- }
836
- export function pluginFileParserFromJSON(jsonString) {
837
- return safeParse(jsonString, (x) => PluginFileParser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginFileParser' from JSON`);
838
- }
839
- /** @internal */
840
- export const IdChainOfThought$inboundSchema = z.nativeEnum(IdChainOfThought);
841
- /** @internal */
842
- export const IdChainOfThought$outboundSchema = IdChainOfThought$inboundSchema;
843
- /**
844
- * @internal
845
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
846
- */
847
- export var IdChainOfThought$;
848
- (function (IdChainOfThought$) {
849
- /** @deprecated use `IdChainOfThought$inboundSchema` instead. */
850
- IdChainOfThought$.inboundSchema = IdChainOfThought$inboundSchema;
851
- /** @deprecated use `IdChainOfThought$outboundSchema` instead. */
852
- IdChainOfThought$.outboundSchema = IdChainOfThought$outboundSchema;
853
- })(IdChainOfThought$ || (IdChainOfThought$ = {}));
854
- /** @internal */
855
- export const PluginChainOfThought$inboundSchema = z.object({
856
- id: IdChainOfThought$inboundSchema,
857
- });
858
- /** @internal */
859
- export const PluginChainOfThought$outboundSchema = z.object({
860
- id: IdChainOfThought$outboundSchema,
861
- });
862
- /**
863
- * @internal
864
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
865
- */
866
- export var PluginChainOfThought$;
867
- (function (PluginChainOfThought$) {
868
- /** @deprecated use `PluginChainOfThought$inboundSchema` instead. */
869
- PluginChainOfThought$.inboundSchema = PluginChainOfThought$inboundSchema;
870
- /** @deprecated use `PluginChainOfThought$outboundSchema` instead. */
871
- PluginChainOfThought$.outboundSchema = PluginChainOfThought$outboundSchema;
872
- })(PluginChainOfThought$ || (PluginChainOfThought$ = {}));
873
- export function pluginChainOfThoughtToJSON(pluginChainOfThought) {
874
- return JSON.stringify(PluginChainOfThought$outboundSchema.parse(pluginChainOfThought));
875
- }
876
- export function pluginChainOfThoughtFromJSON(jsonString) {
877
- return safeParse(jsonString, (x) => PluginChainOfThought$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginChainOfThought' from JSON`);
878
- }
879
- /** @internal */
880
- export const IdWeb$inboundSchema = z.nativeEnum(IdWeb);
881
- /** @internal */
882
- export const IdWeb$outboundSchema = IdWeb$inboundSchema;
883
- /**
884
- * @internal
885
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
886
- */
887
- export var IdWeb$;
888
- (function (IdWeb$) {
889
- /** @deprecated use `IdWeb$inboundSchema` instead. */
890
- IdWeb$.inboundSchema = IdWeb$inboundSchema;
891
- /** @deprecated use `IdWeb$outboundSchema` instead. */
892
- IdWeb$.outboundSchema = IdWeb$outboundSchema;
893
- })(IdWeb$ || (IdWeb$ = {}));
894
- /** @internal */
895
- export const Engine$inboundSchema = z
896
- .nativeEnum(Engine);
897
- /** @internal */
898
- export const Engine$outboundSchema = Engine$inboundSchema;
899
- /**
900
- * @internal
901
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
902
- */
903
- export var Engine$;
904
- (function (Engine$) {
905
- /** @deprecated use `Engine$inboundSchema` instead. */
906
- Engine$.inboundSchema = Engine$inboundSchema;
907
- /** @deprecated use `Engine$outboundSchema` instead. */
908
- Engine$.outboundSchema = Engine$outboundSchema;
909
- })(Engine$ || (Engine$ = {}));
910
- /** @internal */
911
- export const PluginWeb$inboundSchema = z.object({
912
- id: IdWeb$inboundSchema,
913
- max_results: z.number().optional(),
914
- search_prompt: z.string().optional(),
915
- engine: Engine$inboundSchema.optional(),
916
- }).transform((v) => {
917
- return remap$(v, {
918
- "max_results": "maxResults",
919
- "search_prompt": "searchPrompt",
920
- });
921
- });
922
- /** @internal */
923
- export const PluginWeb$outboundSchema = z.object({
924
- id: IdWeb$outboundSchema,
925
- maxResults: z.number().optional(),
926
- searchPrompt: z.string().optional(),
927
- engine: Engine$outboundSchema.optional(),
928
- }).transform((v) => {
929
- return remap$(v, {
930
- maxResults: "max_results",
931
- searchPrompt: "search_prompt",
932
- });
933
- });
934
- /**
935
- * @internal
936
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
937
- */
938
- export var PluginWeb$;
939
- (function (PluginWeb$) {
940
- /** @deprecated use `PluginWeb$inboundSchema` instead. */
941
- PluginWeb$.inboundSchema = PluginWeb$inboundSchema;
942
- /** @deprecated use `PluginWeb$outboundSchema` instead. */
943
- PluginWeb$.outboundSchema = PluginWeb$outboundSchema;
944
- })(PluginWeb$ || (PluginWeb$ = {}));
945
- export function pluginWebToJSON(pluginWeb) {
946
- return JSON.stringify(PluginWeb$outboundSchema.parse(pluginWeb));
947
- }
948
- export function pluginWebFromJSON(jsonString) {
949
- return safeParse(jsonString, (x) => PluginWeb$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginWeb' from JSON`);
950
- }
951
- /** @internal */
952
- export const IdModeration$inboundSchema = z.nativeEnum(IdModeration);
953
- /** @internal */
954
- export const IdModeration$outboundSchema = IdModeration$inboundSchema;
955
- /**
956
- * @internal
957
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
958
- */
959
- export var IdModeration$;
960
- (function (IdModeration$) {
961
- /** @deprecated use `IdModeration$inboundSchema` instead. */
962
- IdModeration$.inboundSchema = IdModeration$inboundSchema;
963
- /** @deprecated use `IdModeration$outboundSchema` instead. */
964
- IdModeration$.outboundSchema = IdModeration$outboundSchema;
965
- })(IdModeration$ || (IdModeration$ = {}));
966
- /** @internal */
967
- export const PluginModeration$inboundSchema = z.object({
968
- id: IdModeration$inboundSchema,
969
- });
970
- /** @internal */
971
- export const PluginModeration$outboundSchema = z.object({
972
- id: IdModeration$outboundSchema,
973
- });
974
- /**
975
- * @internal
976
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
977
- */
978
- export var PluginModeration$;
979
- (function (PluginModeration$) {
980
- /** @deprecated use `PluginModeration$inboundSchema` instead. */
981
- PluginModeration$.inboundSchema = PluginModeration$inboundSchema;
982
- /** @deprecated use `PluginModeration$outboundSchema` instead. */
983
- PluginModeration$.outboundSchema = PluginModeration$outboundSchema;
984
- })(PluginModeration$ || (PluginModeration$ = {}));
985
- export function pluginModerationToJSON(pluginModeration) {
986
- return JSON.stringify(PluginModeration$outboundSchema.parse(pluginModeration));
987
- }
988
- export function pluginModerationFromJSON(jsonString) {
989
- return safeParse(jsonString, (x) => PluginModeration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginModeration' from JSON`);
990
- }
991
- /** @internal */
992
- export const Plugin$inboundSchema = z
993
- .union([
994
- z.lazy(() => PluginModeration$inboundSchema),
995
- z.lazy(() => PluginWeb$inboundSchema),
996
- z.lazy(() => PluginChainOfThought$inboundSchema),
997
- z.lazy(() => PluginFileParser$inboundSchema),
998
- ]);
999
- /** @internal */
1000
- export const Plugin$outboundSchema = z.union([
1001
- z.lazy(() => PluginModeration$outboundSchema),
1002
- z.lazy(() => PluginWeb$outboundSchema),
1003
- z.lazy(() => PluginChainOfThought$outboundSchema),
1004
- z.lazy(() => PluginFileParser$outboundSchema),
1005
- ]);
1006
- /**
1007
- * @internal
1008
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1009
- */
1010
- export var Plugin$;
1011
- (function (Plugin$) {
1012
- /** @deprecated use `Plugin$inboundSchema` instead. */
1013
- Plugin$.inboundSchema = Plugin$inboundSchema;
1014
- /** @deprecated use `Plugin$outboundSchema` instead. */
1015
- Plugin$.outboundSchema = Plugin$outboundSchema;
1016
- })(Plugin$ || (Plugin$ = {}));
1017
- export function pluginToJSON(plugin) {
1018
- return JSON.stringify(Plugin$outboundSchema.parse(plugin));
1019
- }
1020
- export function pluginFromJSON(jsonString) {
1021
- return safeParse(jsonString, (x) => Plugin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Plugin' from JSON`);
1022
- }
1023
- /** @internal */
1024
- export const OpenAIResponsesRequest$inboundSchema = z.object({
1025
- input: ResponseInput$inboundSchema.optional(),
1026
- instructions: z.nullable(z.string()).optional(),
1027
- metadata: z.nullable(z.record(z.string())).optional(),
1028
- tools: z.array(Tool$inboundSchema).optional(),
1029
- tool_choice: ToolChoice$inboundSchema.optional(),
1030
- parallel_tool_calls: z.nullable(z.boolean()).optional(),
1031
- model: z.string().optional(),
1032
- models: z.array(z.string()).optional(),
1033
- text: ResponseTextConfig$inboundSchema.optional(),
1034
- reasoning: z.nullable(ResponseReasoningConfig$inboundSchema).optional(),
1035
- max_output_tokens: z.nullable(z.number()).optional(),
1036
- temperature: z.nullable(z.number()).optional(),
1037
- top_p: z.nullable(z.number()).optional(),
1038
- top_k: z.number().optional(),
1039
- prompt_cache_key: z.string().optional(),
1040
- previous_response_id: z.nullable(z.string()).optional(),
1041
- prompt: z.nullable(ResponsePrompt$inboundSchema).optional(),
1042
- include: z.nullable(z.array(ResponseIncludable$inboundSchema)).optional(),
1043
- background: z.nullable(z.boolean()).optional(),
1044
- safety_identifier: z.string().optional(),
1045
- store: z.nullable(z.boolean()).optional(),
1046
- service_tier: z.nullable(OpenAIResponsesRequestServiceTier$inboundSchema)
1047
- .optional(),
1048
- truncation: z.nullable(OpenAIResponsesRequestTruncation$inboundSchema)
1049
- .optional(),
1050
- stream: z.nullable(z.boolean()).optional(),
1051
- provider: z.nullable(z.lazy(() => Provider$inboundSchema)).optional(),
1052
- plugins: z.array(z.union([
1053
- z.lazy(() => PluginModeration$inboundSchema),
1054
- z.lazy(() => PluginWeb$inboundSchema),
1055
- z.lazy(() => PluginChainOfThought$inboundSchema),
1056
- z.lazy(() => PluginFileParser$inboundSchema),
1057
- ])).optional(),
1058
- user: z.string().optional(),
1059
- }).transform((v) => {
1060
- return remap$(v, {
1061
- "tool_choice": "toolChoice",
1062
- "parallel_tool_calls": "parallelToolCalls",
1063
- "max_output_tokens": "maxOutputTokens",
1064
- "top_p": "topP",
1065
- "top_k": "topK",
1066
- "prompt_cache_key": "promptCacheKey",
1067
- "previous_response_id": "previousResponseId",
1068
- "safety_identifier": "safetyIdentifier",
1069
- "service_tier": "serviceTier",
1070
- });
1071
- });
1072
- /** @internal */
1073
- export const OpenAIResponsesRequest$outboundSchema = z.object({
1074
- input: ResponseInput$outboundSchema.optional(),
1075
- instructions: z.nullable(z.string()).optional(),
1076
- metadata: z.nullable(z.record(z.string())).optional(),
1077
- tools: z.array(Tool$outboundSchema).optional(),
1078
- toolChoice: ToolChoice$outboundSchema.optional(),
1079
- parallelToolCalls: z.nullable(z.boolean()).optional(),
1080
- model: z.string().optional(),
1081
- models: z.array(z.string()).optional(),
1082
- text: ResponseTextConfig$outboundSchema.optional(),
1083
- reasoning: z.nullable(ResponseReasoningConfig$outboundSchema).optional(),
1084
- maxOutputTokens: z.nullable(z.number()).optional(),
1085
- temperature: z.nullable(z.number()).optional(),
1086
- topP: z.nullable(z.number()).optional(),
1087
- topK: z.number().optional(),
1088
- promptCacheKey: z.string().optional(),
1089
- previousResponseId: z.nullable(z.string()).optional(),
1090
- prompt: z.nullable(ResponsePrompt$outboundSchema).optional(),
1091
- include: z.nullable(z.array(ResponseIncludable$outboundSchema)).optional(),
1092
- background: z.nullable(z.boolean()).optional(),
1093
- safetyIdentifier: z.string().optional(),
1094
- store: z.nullable(z.boolean()).optional(),
1095
- serviceTier: z.nullable(OpenAIResponsesRequestServiceTier$outboundSchema)
1096
- .optional(),
1097
- truncation: z.nullable(OpenAIResponsesRequestTruncation$outboundSchema)
1098
- .optional(),
1099
- stream: z.nullable(z.boolean()).optional(),
1100
- provider: z.nullable(z.lazy(() => Provider$outboundSchema)).optional(),
1101
- plugins: z.array(z.union([
1102
- z.lazy(() => PluginModeration$outboundSchema),
1103
- z.lazy(() => PluginWeb$outboundSchema),
1104
- z.lazy(() => PluginChainOfThought$outboundSchema),
1105
- z.lazy(() => PluginFileParser$outboundSchema),
1106
- ])).optional(),
1107
- user: z.string().optional(),
1108
- }).transform((v) => {
1109
- return remap$(v, {
1110
- toolChoice: "tool_choice",
1111
- parallelToolCalls: "parallel_tool_calls",
1112
- maxOutputTokens: "max_output_tokens",
1113
- topP: "top_p",
1114
- topK: "top_k",
1115
- promptCacheKey: "prompt_cache_key",
1116
- previousResponseId: "previous_response_id",
1117
- safetyIdentifier: "safety_identifier",
1118
- serviceTier: "service_tier",
1119
- });
1120
- });
1121
- /**
1122
- * @internal
1123
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1124
- */
1125
- export var OpenAIResponsesRequest$;
1126
- (function (OpenAIResponsesRequest$) {
1127
- /** @deprecated use `OpenAIResponsesRequest$inboundSchema` instead. */
1128
- OpenAIResponsesRequest$.inboundSchema = OpenAIResponsesRequest$inboundSchema;
1129
- /** @deprecated use `OpenAIResponsesRequest$outboundSchema` instead. */
1130
- OpenAIResponsesRequest$.outboundSchema = OpenAIResponsesRequest$outboundSchema;
1131
- })(OpenAIResponsesRequest$ || (OpenAIResponsesRequest$ = {}));
1132
- export function openAIResponsesRequestToJSON(openAIResponsesRequest) {
1133
- return JSON.stringify(OpenAIResponsesRequest$outboundSchema.parse(openAIResponsesRequest));
1134
- }
1135
- export function openAIResponsesRequestFromJSON(jsonString) {
1136
- return safeParse(jsonString, (x) => OpenAIResponsesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesRequest' from JSON`);
1137
- }
1138
- //# sourceMappingURL=openairesponsesrequest.js.map