@orq-ai/node 4.1.0 → 4.1.3

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 (669) hide show
  1. package/README.md +49 -36
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/bin/mcp-server.js +50175 -28131
  5. package/bin/mcp-server.js.map +302 -120
  6. package/examples/package-lock.json +2 -2
  7. package/funcs/conversationsGenerateName.d.ts +18 -0
  8. package/funcs/conversationsGenerateName.d.ts.map +1 -0
  9. package/funcs/conversationsGenerateName.js +128 -0
  10. package/funcs/conversationsGenerateName.js.map +1 -0
  11. package/funcs/conversationsList.js +2 -2
  12. package/funcs/conversationsList.js.map +1 -1
  13. package/funcs/{budgetsDelete.d.ts → evaluatorsGetV2EvaluatorsIdVersions.d.ts} +5 -4
  14. package/funcs/evaluatorsGetV2EvaluatorsIdVersions.d.ts.map +1 -0
  15. package/funcs/{budgetsGet.js → evaluatorsGetV2EvaluatorsIdVersions.js} +19 -9
  16. package/funcs/evaluatorsGetV2EvaluatorsIdVersions.js.map +1 -0
  17. package/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.d.ts +18 -0
  18. package/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.d.ts.map +1 -0
  19. package/funcs/{budgetsUpdate.js → evaluatorsGetV2EvaluatorsIdVersionsVersionId.js} +20 -13
  20. package/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.js.map +1 -0
  21. package/funcs/routerChatCompletions.d.ts +23 -0
  22. package/funcs/routerChatCompletions.d.ts.map +1 -0
  23. package/funcs/routerChatCompletions.js +121 -0
  24. package/funcs/routerChatCompletions.js.map +1 -0
  25. package/funcs/{budgetsList.d.ts → routerImagesGenerate.d.ts} +4 -4
  26. package/funcs/routerImagesGenerate.d.ts.map +1 -0
  27. package/funcs/{budgetsCreate.js → routerImagesGenerate.js} +10 -10
  28. package/funcs/routerImagesGenerate.js.map +1 -0
  29. package/funcs/{budgetsUpdate.d.ts → toolsGetV2ToolsToolIdVersions.d.ts} +5 -4
  30. package/funcs/toolsGetV2ToolsToolIdVersions.d.ts.map +1 -0
  31. package/funcs/{budgetsList.js → toolsGetV2ToolsToolIdVersions.js} +23 -16
  32. package/funcs/toolsGetV2ToolsToolIdVersions.js.map +1 -0
  33. package/funcs/toolsGetV2ToolsToolIdVersionsVersionId.d.ts +18 -0
  34. package/funcs/toolsGetV2ToolsToolIdVersionsVersionId.d.ts.map +1 -0
  35. package/funcs/{budgetsDelete.js → toolsGetV2ToolsToolIdVersionsVersionId.js} +21 -14
  36. package/funcs/toolsGetV2ToolsToolIdVersionsVersionId.js.map +1 -0
  37. package/jsr.json +1 -1
  38. package/lib/config.d.ts +3 -3
  39. package/lib/config.js +3 -3
  40. package/lib/config.js.map +1 -1
  41. package/lib/event-streams.js +1 -1
  42. package/lib/event-streams.js.map +1 -1
  43. package/mcp-server/mcp-server.js +1 -1
  44. package/mcp-server/prompts.d.ts +3 -3
  45. package/mcp-server/prompts.d.ts.map +1 -1
  46. package/mcp-server/prompts.js.map +1 -1
  47. package/mcp-server/resources.d.ts +3 -3
  48. package/mcp-server/resources.d.ts.map +1 -1
  49. package/mcp-server/resources.js.map +1 -1
  50. package/mcp-server/server.d.ts.map +1 -1
  51. package/mcp-server/server.js +15 -11
  52. package/mcp-server/server.js.map +1 -1
  53. package/mcp-server/tools/conversationsGenerateName.d.ts +10 -0
  54. package/mcp-server/tools/conversationsGenerateName.d.ts.map +1 -0
  55. package/mcp-server/tools/conversationsGenerateName.js +66 -0
  56. package/mcp-server/tools/conversationsGenerateName.js.map +1 -0
  57. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.d.ts +8 -0
  58. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.d.ts.map +1 -0
  59. package/mcp-server/tools/{budgetsCreate.js → evaluatorsGetV2EvaluatorsIdVersions.js} +9 -9
  60. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.js.map +1 -0
  61. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.d.ts +8 -0
  62. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.d.ts.map +1 -0
  63. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.js +64 -0
  64. package/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.js.map +1 -0
  65. package/mcp-server/tools/routerChatCompletions.d.ts +8 -0
  66. package/mcp-server/tools/routerChatCompletions.d.ts.map +1 -0
  67. package/mcp-server/tools/{budgetsList.js → routerChatCompletions.js} +9 -9
  68. package/mcp-server/tools/routerChatCompletions.js.map +1 -0
  69. package/mcp-server/tools/routerImagesGenerate.d.ts +8 -0
  70. package/mcp-server/tools/routerImagesGenerate.d.ts.map +1 -0
  71. package/mcp-server/tools/{budgetsGet.js → routerImagesGenerate.js} +9 -9
  72. package/mcp-server/tools/routerImagesGenerate.js.map +1 -0
  73. package/mcp-server/tools/toolsGetV2ToolsToolIdVersions.d.ts +8 -0
  74. package/mcp-server/tools/toolsGetV2ToolsToolIdVersions.d.ts.map +1 -0
  75. package/mcp-server/tools/{budgetsUpdate.js → toolsGetV2ToolsToolIdVersions.js} +9 -9
  76. package/mcp-server/tools/toolsGetV2ToolsToolIdVersions.js.map +1 -0
  77. package/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.d.ts +8 -0
  78. package/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.d.ts.map +1 -0
  79. package/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.js +64 -0
  80. package/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.js.map +1 -0
  81. package/mcp-server/tools.d.ts +3 -3
  82. package/mcp-server/tools.d.ts.map +1 -1
  83. package/mcp-server/tools.js.map +1 -1
  84. package/models/components/agentresponsemessage.d.ts +56 -0
  85. package/models/components/agentresponsemessage.d.ts.map +1 -0
  86. package/models/components/agentresponsemessage.js +116 -0
  87. package/models/components/agentresponsemessage.js.map +1 -0
  88. package/models/components/agentstartedstreamingevent.d.ts +6 -6
  89. package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
  90. package/models/components/agentstartedstreamingevent.js +11 -12
  91. package/models/components/agentstartedstreamingevent.js.map +1 -1
  92. package/models/components/conversationresponse.d.ts +34 -0
  93. package/models/components/conversationresponse.d.ts.map +1 -1
  94. package/models/components/conversationresponse.js +25 -3
  95. package/models/components/conversationresponse.js.map +1 -1
  96. package/models/components/createagentresponse.d.ts +124 -0
  97. package/models/components/createagentresponse.d.ts.map +1 -0
  98. package/models/components/createagentresponse.js +191 -0
  99. package/models/components/createagentresponse.js.map +1 -0
  100. package/models/components/index.d.ts +5 -0
  101. package/models/components/index.d.ts.map +1 -1
  102. package/models/components/index.js +5 -0
  103. package/models/components/index.js.map +1 -1
  104. package/models/components/invokedeploymentrequest.d.ts +12 -12
  105. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  106. package/models/components/invokedeploymentrequest.js +17 -15
  107. package/models/components/invokedeploymentrequest.js.map +1 -1
  108. package/models/components/partdoneevent.js +2 -2
  109. package/models/components/publiccontact.d.ts +52 -0
  110. package/models/components/publiccontact.d.ts.map +1 -0
  111. package/models/components/publiccontact.js +79 -0
  112. package/models/components/publiccontact.js.map +1 -0
  113. package/models/components/reasoningpart.js +2 -2
  114. package/models/components/responsedoneevent.d.ts +24 -24
  115. package/models/components/responsedoneevent.d.ts.map +1 -1
  116. package/models/components/responsedoneevent.js +31 -32
  117. package/models/components/responsedoneevent.js.map +1 -1
  118. package/models/components/thinkingconfigdisabledschema.d.ts +23 -0
  119. package/models/components/thinkingconfigdisabledschema.d.ts.map +1 -0
  120. package/models/{operations/deletebudget.js → components/thinkingconfigdisabledschema.js} +12 -12
  121. package/models/components/thinkingconfigdisabledschema.js.map +1 -0
  122. package/models/components/thinkingconfigenabledschema.d.ts +49 -0
  123. package/models/components/thinkingconfigenabledschema.d.ts.map +1 -0
  124. package/models/components/thinkingconfigenabledschema.js +84 -0
  125. package/models/components/thinkingconfigenabledschema.js.map +1 -0
  126. package/models/errors/generateconversationname.d.ts +55 -0
  127. package/models/errors/generateconversationname.d.ts.map +1 -0
  128. package/models/errors/generateconversationname.js +106 -0
  129. package/models/errors/generateconversationname.js.map +1 -0
  130. package/models/errors/getv2evaluatorsidversions.d.ts +29 -0
  131. package/models/errors/getv2evaluatorsidversions.d.ts.map +1 -0
  132. package/models/errors/getv2evaluatorsidversions.js +74 -0
  133. package/models/errors/getv2evaluatorsidversions.js.map +1 -0
  134. package/models/errors/getv2evaluatorsidversionsversionid.d.ts +29 -0
  135. package/models/errors/getv2evaluatorsidversionsversionid.d.ts.map +1 -0
  136. package/models/errors/getv2evaluatorsidversionsversionid.js +74 -0
  137. package/models/errors/getv2evaluatorsidversionsversionid.js.map +1 -0
  138. package/models/errors/getv2toolstoolidversions.d.ts +29 -0
  139. package/models/errors/getv2toolstoolidversions.d.ts.map +1 -0
  140. package/{mcp-server/tools/budgetsDelete.js → models/errors/getv2toolstoolidversions.js} +36 -25
  141. package/models/errors/getv2toolstoolidversions.js.map +1 -0
  142. package/models/errors/getv2toolstoolidversionsversionid.d.ts +29 -0
  143. package/models/errors/getv2toolstoolidversionsversionid.d.ts.map +1 -0
  144. package/models/errors/getv2toolstoolidversionsversionid.js +74 -0
  145. package/models/errors/getv2toolstoolidversionsversionid.js.map +1 -0
  146. package/models/errors/index.d.ts +5 -0
  147. package/models/errors/index.d.ts.map +1 -1
  148. package/models/errors/index.js +5 -0
  149. package/models/errors/index.js.map +1 -1
  150. package/models/operations/createagentrequest.d.ts +675 -282
  151. package/models/operations/createagentrequest.d.ts.map +1 -1
  152. package/models/operations/createagentrequest.js +635 -260
  153. package/models/operations/createagentrequest.js.map +1 -1
  154. package/models/operations/createagentresponserequest.d.ts +22 -166
  155. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  156. package/models/operations/createagentresponserequest.js +35 -228
  157. package/models/operations/createagentresponserequest.js.map +1 -1
  158. package/models/operations/createchatcompletion.d.ts +3154 -0
  159. package/models/operations/createchatcompletion.d.ts.map +1 -0
  160. package/models/operations/createchatcompletion.js +3400 -0
  161. package/models/operations/createchatcompletion.js.map +1 -0
  162. package/models/operations/createcontact.js +2 -2
  163. package/models/operations/createconversation.d.ts +56 -2
  164. package/models/operations/createconversation.d.ts.map +1 -1
  165. package/models/operations/createconversation.js +49 -5
  166. package/models/operations/createconversation.js.map +1 -1
  167. package/models/operations/createdataset.js +2 -2
  168. package/models/operations/createdatasetitem.d.ts +4 -4
  169. package/models/operations/createdatasetitem.d.ts.map +1 -1
  170. package/models/operations/createdatasetitem.js +12 -12
  171. package/models/operations/createdatasetitem.js.map +1 -1
  172. package/models/operations/createdatasource.js +2 -2
  173. package/models/operations/createeval.d.ts +44 -0
  174. package/models/operations/createeval.d.ts.map +1 -1
  175. package/models/operations/createeval.js +248 -28
  176. package/models/operations/createeval.js.map +1 -1
  177. package/models/operations/createimage.d.ts +433 -0
  178. package/models/operations/createimage.d.ts.map +1 -0
  179. package/models/operations/createimage.js +455 -0
  180. package/models/operations/createimage.js.map +1 -0
  181. package/models/operations/creatememory.d.ts +4 -1
  182. package/models/operations/creatememory.d.ts.map +1 -1
  183. package/models/operations/creatememory.js.map +1 -1
  184. package/models/operations/creatememorydocument.d.ts +5 -2
  185. package/models/operations/creatememorydocument.d.ts.map +1 -1
  186. package/models/operations/creatememorydocument.js.map +1 -1
  187. package/models/operations/createprompt.d.ts +24 -22
  188. package/models/operations/createprompt.d.ts.map +1 -1
  189. package/models/operations/createprompt.js +28 -26
  190. package/models/operations/createprompt.js.map +1 -1
  191. package/models/operations/createtool.js +12 -12
  192. package/models/operations/deploymentcreatemetric.d.ts +4 -4
  193. package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
  194. package/models/operations/deploymentcreatemetric.js +4 -4
  195. package/models/operations/deploymentcreatemetric.js.map +1 -1
  196. package/models/operations/deploymentgetconfig.d.ts +4 -4
  197. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  198. package/models/operations/deploymentgetconfig.js +4 -4
  199. package/models/operations/deploymentgetconfig.js.map +1 -1
  200. package/models/operations/deploymentinvoke.d.ts +38 -6
  201. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  202. package/models/operations/deploymentinvoke.js +71 -11
  203. package/models/operations/deploymentinvoke.js.map +1 -1
  204. package/models/operations/deployments.d.ts +2 -0
  205. package/models/operations/deployments.d.ts.map +1 -1
  206. package/models/operations/deployments.js +2 -0
  207. package/models/operations/deployments.js.map +1 -1
  208. package/models/operations/deploymentstream.d.ts +42 -10
  209. package/models/operations/deploymentstream.d.ts.map +1 -1
  210. package/models/operations/deploymentstream.js +77 -17
  211. package/models/operations/deploymentstream.js.map +1 -1
  212. package/models/operations/fileget.js +2 -2
  213. package/models/operations/filelist.js +2 -2
  214. package/models/operations/fileupload.js +2 -2
  215. package/models/operations/generateconversationname.d.ts +136 -0
  216. package/models/operations/generateconversationname.d.ts.map +1 -0
  217. package/models/operations/generateconversationname.js +157 -0
  218. package/models/operations/generateconversationname.js.map +1 -0
  219. package/models/operations/getallmemories.d.ts +3 -0
  220. package/models/operations/getallmemories.d.ts.map +1 -1
  221. package/models/operations/getallmemories.js.map +1 -1
  222. package/models/operations/getallmemorydocuments.d.ts +3 -0
  223. package/models/operations/getallmemorydocuments.d.ts.map +1 -1
  224. package/models/operations/getallmemorydocuments.js.map +1 -1
  225. package/models/operations/getallprompts.d.ts +10 -8
  226. package/models/operations/getallprompts.d.ts.map +1 -1
  227. package/models/operations/getallprompts.js +13 -12
  228. package/models/operations/getallprompts.js.map +1 -1
  229. package/models/operations/getalltools.js +12 -12
  230. package/models/operations/getevals.d.ts +28 -0
  231. package/models/operations/getevals.d.ts.map +1 -1
  232. package/models/operations/getevals.js +168 -28
  233. package/models/operations/getevals.js.map +1 -1
  234. package/models/operations/getoneprompt.d.ts +2 -0
  235. package/models/operations/getoneprompt.d.ts.map +1 -1
  236. package/models/operations/getoneprompt.js +2 -0
  237. package/models/operations/getoneprompt.js.map +1 -1
  238. package/models/operations/getpromptversion.d.ts +2 -0
  239. package/models/operations/getpromptversion.d.ts.map +1 -1
  240. package/models/operations/getpromptversion.js +2 -0
  241. package/models/operations/getpromptversion.js.map +1 -1
  242. package/models/operations/getv2evaluatorsidversions.d.ts +100 -0
  243. package/models/operations/getv2evaluatorsidversions.d.ts.map +1 -0
  244. package/models/operations/getv2evaluatorsidversions.js +166 -0
  245. package/models/operations/getv2evaluatorsidversions.js.map +1 -0
  246. package/models/operations/getv2evaluatorsidversionsversionid.d.ts +61 -0
  247. package/models/operations/getv2evaluatorsidversionsversionid.d.ts.map +1 -0
  248. package/models/operations/getv2evaluatorsidversionsversionid.js +125 -0
  249. package/models/operations/getv2evaluatorsidversionsversionid.js.map +1 -0
  250. package/models/operations/getv2toolstoolidversions.d.ts +100 -0
  251. package/models/operations/getv2toolstoolidversions.d.ts.map +1 -0
  252. package/models/operations/getv2toolstoolidversions.js +168 -0
  253. package/models/operations/getv2toolstoolidversions.js.map +1 -0
  254. package/models/operations/getv2toolstoolidversionsversionid.d.ts +61 -0
  255. package/models/operations/getv2toolstoolidversionsversionid.d.ts.map +1 -0
  256. package/models/operations/getv2toolstoolidversionsversionid.js +127 -0
  257. package/models/operations/getv2toolstoolidversionsversionid.js.map +1 -0
  258. package/models/operations/index.d.ts +7 -5
  259. package/models/operations/index.d.ts.map +1 -1
  260. package/models/operations/index.js +7 -5
  261. package/models/operations/index.js.map +1 -1
  262. package/models/operations/invokeagent.d.ts +6 -6
  263. package/models/operations/invokeagent.d.ts.map +1 -1
  264. package/models/operations/invokeagent.js +10 -9
  265. package/models/operations/invokeagent.js.map +1 -1
  266. package/models/operations/invokeeval.d.ts +5 -5
  267. package/models/operations/invokeeval.d.ts.map +1 -1
  268. package/models/operations/invokeeval.js +7 -7
  269. package/models/operations/invokeeval.js.map +1 -1
  270. package/models/operations/listagents.d.ts +231 -106
  271. package/models/operations/listagents.d.ts.map +1 -1
  272. package/models/operations/listagents.js +212 -91
  273. package/models/operations/listagents.js.map +1 -1
  274. package/models/operations/listcontacts.js +2 -2
  275. package/models/operations/listconversations.d.ts +4 -4
  276. package/models/operations/listconversations.d.ts.map +1 -1
  277. package/models/operations/listconversations.js +2 -12
  278. package/models/operations/listconversations.js.map +1 -1
  279. package/models/operations/listdatasetdatapoints.d.ts +2 -2
  280. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  281. package/models/operations/listdatasetdatapoints.js +10 -10
  282. package/models/operations/listdatasetdatapoints.js.map +1 -1
  283. package/models/operations/listdatasets.js +2 -2
  284. package/models/operations/listdatasources.js +2 -2
  285. package/models/operations/listpromptversions.d.ts +2 -0
  286. package/models/operations/listpromptversions.d.ts.map +1 -1
  287. package/models/operations/listpromptversions.js +2 -0
  288. package/models/operations/listpromptversions.js.map +1 -1
  289. package/models/operations/retrieveagentrequest.d.ts +231 -106
  290. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  291. package/models/operations/retrieveagentrequest.js +213 -91
  292. package/models/operations/retrieveagentrequest.js.map +1 -1
  293. package/models/operations/retrievecontact.js +2 -2
  294. package/models/operations/retrieveconversation.d.ts +34 -0
  295. package/models/operations/retrieveconversation.d.ts.map +1 -1
  296. package/models/operations/retrieveconversation.js +26 -3
  297. package/models/operations/retrieveconversation.js.map +1 -1
  298. package/models/operations/retrievedatapoint.d.ts +2 -2
  299. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  300. package/models/operations/retrievedatapoint.js +10 -10
  301. package/models/operations/retrievedatapoint.js.map +1 -1
  302. package/models/operations/retrievedataset.js +2 -2
  303. package/models/operations/retrievedatasource.js +2 -2
  304. package/models/operations/retrievememory.d.ts +3 -0
  305. package/models/operations/retrievememory.d.ts.map +1 -1
  306. package/models/operations/retrievememory.js.map +1 -1
  307. package/models/operations/retrievememorydocument.d.ts +3 -0
  308. package/models/operations/retrievememorydocument.d.ts.map +1 -1
  309. package/models/operations/retrievememorydocument.js.map +1 -1
  310. package/models/operations/retrievetool.js +12 -12
  311. package/models/operations/runagent.d.ts +230 -106
  312. package/models/operations/runagent.d.ts.map +1 -1
  313. package/models/operations/runagent.js +218 -98
  314. package/models/operations/runagent.js.map +1 -1
  315. package/models/operations/streamrunagent.d.ts +230 -106
  316. package/models/operations/streamrunagent.d.ts.map +1 -1
  317. package/models/operations/streamrunagent.js +215 -97
  318. package/models/operations/streamrunagent.js.map +1 -1
  319. package/models/operations/updateagent.d.ts +642 -246
  320. package/models/operations/updateagent.d.ts.map +1 -1
  321. package/models/operations/updateagent.js +581 -215
  322. package/models/operations/updateagent.js.map +1 -1
  323. package/models/operations/updatecontact.js +2 -2
  324. package/models/operations/updateconversation.d.ts +57 -0
  325. package/models/operations/updateconversation.d.ts.map +1 -1
  326. package/models/operations/updateconversation.js +47 -3
  327. package/models/operations/updateconversation.js.map +1 -1
  328. package/models/operations/updatedatapoint.d.ts +4 -4
  329. package/models/operations/updatedatapoint.d.ts.map +1 -1
  330. package/models/operations/updatedatapoint.js +12 -12
  331. package/models/operations/updatedatapoint.js.map +1 -1
  332. package/models/operations/updatedataset.js +2 -2
  333. package/models/operations/updatedatasource.js +2 -2
  334. package/models/operations/updateeval.d.ts +44 -0
  335. package/models/operations/updateeval.d.ts.map +1 -1
  336. package/models/operations/updateeval.js +248 -28
  337. package/models/operations/updateeval.js.map +1 -1
  338. package/models/operations/updatememory.d.ts +4 -1
  339. package/models/operations/updatememory.d.ts.map +1 -1
  340. package/models/operations/updatememory.js.map +1 -1
  341. package/models/operations/updatememorydocument.d.ts +5 -2
  342. package/models/operations/updatememorydocument.d.ts.map +1 -1
  343. package/models/operations/updatememorydocument.js.map +1 -1
  344. package/models/operations/updatememorystore.d.ts +2 -0
  345. package/models/operations/updatememorystore.d.ts.map +1 -1
  346. package/models/operations/updatememorystore.js +2 -0
  347. package/models/operations/updatememorystore.js.map +1 -1
  348. package/models/operations/updateprompt.d.ts +6 -2
  349. package/models/operations/updateprompt.d.ts.map +1 -1
  350. package/models/operations/updateprompt.js +6 -2
  351. package/models/operations/updateprompt.js.map +1 -1
  352. package/models/operations/updatetool.js +14 -14
  353. package/package.json +2 -2
  354. package/packages/orq-rc/examples/package-lock.json +2 -2
  355. package/packages/orq-rc/jsr.json +1 -1
  356. package/packages/orq-rc/package-lock.json +603 -98
  357. package/packages/orq-rc/package.json +2 -2
  358. package/{src/funcs/budgetsUpdate.ts → packages/orq-rc/src/funcs/conversationsGenerateName.ts} +45 -18
  359. package/packages/orq-rc/src/funcs/conversationsList.ts +2 -2
  360. package/{src/funcs/budgetsGet.ts → packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts} +32 -15
  361. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +190 -0
  362. package/{src/funcs/budgetsCreate.ts → packages/orq-rc/src/funcs/routerChatCompletions.ts} +29 -17
  363. package/{src/funcs/budgetsDelete.ts → packages/orq-rc/src/funcs/routerImagesGenerate.ts} +19 -26
  364. package/packages/orq-rc/src/funcs/{budgetsList.ts → toolsGetV2ToolsToolIdVersions.ts} +34 -21
  365. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +190 -0
  366. package/packages/orq-rc/src/lib/config.ts +3 -3
  367. package/packages/orq-rc/src/lib/event-streams.ts +1 -1
  368. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  369. package/packages/orq-rc/src/mcp-server/prompts.ts +7 -3
  370. package/packages/orq-rc/src/mcp-server/resources.ts +7 -3
  371. package/packages/orq-rc/src/mcp-server/server.ts +15 -11
  372. package/packages/orq-rc/src/mcp-server/tools/conversationsGenerateName.ts +40 -0
  373. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.ts +39 -0
  374. package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +40 -0
  375. package/packages/orq-rc/src/mcp-server/tools/routerChatCompletions.ts +37 -0
  376. package/packages/orq-rc/src/mcp-server/tools/{budgetsUpdate.ts → routerImagesGenerate.ts} +7 -7
  377. package/{src/mcp-server/tools/budgetsGet.ts → packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersions.ts} +7 -7
  378. package/packages/orq-rc/src/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.ts +39 -0
  379. package/packages/orq-rc/src/mcp-server/tools.ts +7 -3
  380. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +185 -0
  381. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +30 -21
  382. package/packages/orq-rc/src/models/components/conversationresponse.ts +68 -2
  383. package/packages/orq-rc/src/models/components/createagentresponse.ts +340 -0
  384. package/packages/orq-rc/src/models/components/index.ts +5 -0
  385. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +34 -26
  386. package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
  387. package/packages/orq-rc/src/models/components/publiccontact.ts +99 -0
  388. package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
  389. package/packages/orq-rc/src/models/components/responsedoneevent.ts +93 -68
  390. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  391. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  392. package/packages/orq-rc/src/models/errors/generateconversationname.ts +132 -0
  393. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +67 -0
  394. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +69 -0
  395. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +67 -0
  396. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +69 -0
  397. package/packages/orq-rc/src/models/errors/index.ts +5 -0
  398. package/packages/orq-rc/src/models/operations/createagentrequest.ts +1561 -542
  399. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +72 -513
  400. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +8948 -0
  401. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  402. package/packages/orq-rc/src/models/operations/createconversation.ts +141 -6
  403. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  404. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +16 -16
  405. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  406. package/packages/orq-rc/src/models/operations/createeval.ts +292 -28
  407. package/packages/orq-rc/src/models/operations/createimage.ts +966 -0
  408. package/packages/orq-rc/src/models/operations/creatememory.ts +4 -1
  409. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +5 -2
  410. package/packages/orq-rc/src/models/operations/createprompt.ts +54 -52
  411. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  412. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +8 -8
  413. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +9 -9
  414. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +141 -16
  415. package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
  416. package/packages/orq-rc/src/models/operations/deploymentstream.ts +171 -26
  417. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  418. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  419. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  420. package/packages/orq-rc/src/models/operations/generateconversationname.ts +319 -0
  421. package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -0
  422. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +3 -0
  423. package/packages/orq-rc/src/models/operations/getallprompts.ts +47 -38
  424. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  425. package/packages/orq-rc/src/models/operations/getevals.ts +196 -28
  426. package/packages/orq-rc/src/models/operations/getoneprompt.ts +2 -0
  427. package/packages/orq-rc/src/models/operations/getpromptversion.ts +2 -0
  428. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +274 -0
  429. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +193 -0
  430. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +276 -0
  431. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +194 -0
  432. package/packages/orq-rc/src/models/operations/index.ts +7 -5
  433. package/packages/orq-rc/src/models/operations/invokeagent.ts +19 -26
  434. package/packages/orq-rc/src/models/operations/invokeeval.ts +11 -10
  435. package/packages/orq-rc/src/models/operations/listagents.ts +502 -194
  436. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  437. package/packages/orq-rc/src/models/operations/listconversations.ts +6 -16
  438. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +12 -12
  439. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  440. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  441. package/packages/orq-rc/src/models/operations/listpromptversions.ts +2 -0
  442. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +532 -202
  443. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  444. package/packages/orq-rc/src/models/operations/retrieveconversation.ts +75 -2
  445. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +12 -12
  446. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  447. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  448. package/packages/orq-rc/src/models/operations/retrievememory.ts +3 -0
  449. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +3 -0
  450. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  451. package/packages/orq-rc/src/models/operations/runagent.ts +505 -202
  452. package/packages/orq-rc/src/models/operations/streamrunagent.ts +532 -209
  453. package/packages/orq-rc/src/models/operations/updateagent.ts +1491 -465
  454. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  455. package/packages/orq-rc/src/models/operations/updateconversation.ts +140 -2
  456. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +16 -16
  457. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  458. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  459. package/packages/orq-rc/src/models/operations/updateeval.ts +292 -28
  460. package/packages/orq-rc/src/models/operations/updatememory.ts +4 -1
  461. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +5 -2
  462. package/packages/orq-rc/src/models/operations/updatememorystore.ts +2 -0
  463. package/packages/orq-rc/src/models/operations/updateprompt.ts +8 -4
  464. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  465. package/packages/orq-rc/src/sdk/conversations.ts +20 -0
  466. package/packages/orq-rc/src/sdk/evaluators.ts +45 -0
  467. package/packages/orq-rc/src/sdk/router.ts +52 -0
  468. package/packages/orq-rc/src/sdk/sdk.ts +12 -6
  469. package/packages/orq-rc/src/sdk/tools.ts +36 -0
  470. package/sdk/conversations.d.ts +7 -0
  471. package/sdk/conversations.d.ts.map +1 -1
  472. package/sdk/conversations.js +10 -0
  473. package/sdk/conversations.js.map +1 -1
  474. package/sdk/evaluators.d.ts +19 -0
  475. package/sdk/evaluators.d.ts.map +1 -0
  476. package/sdk/evaluators.js +32 -0
  477. package/sdk/evaluators.js.map +1 -0
  478. package/sdk/router.d.ts +23 -0
  479. package/sdk/router.d.ts.map +1 -0
  480. package/sdk/router.js +34 -0
  481. package/sdk/router.js.map +1 -0
  482. package/sdk/sdk.d.ts +6 -3
  483. package/sdk/sdk.d.ts.map +1 -1
  484. package/sdk/sdk.js +8 -4
  485. package/sdk/sdk.js.map +1 -1
  486. package/sdk/tools.d.ts +14 -0
  487. package/sdk/tools.d.ts.map +1 -1
  488. package/sdk/tools.js +20 -0
  489. package/sdk/tools.js.map +1 -1
  490. package/{packages/orq-rc/src/funcs/budgetsUpdate.ts → src/funcs/conversationsGenerateName.ts} +45 -18
  491. package/src/funcs/conversationsList.ts +2 -2
  492. package/{packages/orq-rc/src/funcs/budgetsGet.ts → src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts} +32 -15
  493. package/src/funcs/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +190 -0
  494. package/{packages/orq-rc/src/funcs/budgetsCreate.ts → src/funcs/routerChatCompletions.ts} +29 -17
  495. package/{packages/orq-rc/src/funcs/budgetsDelete.ts → src/funcs/routerImagesGenerate.ts} +19 -26
  496. package/src/funcs/{budgetsList.ts → toolsGetV2ToolsToolIdVersions.ts} +34 -21
  497. package/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +190 -0
  498. package/src/lib/config.ts +3 -3
  499. package/src/lib/event-streams.ts +1 -1
  500. package/src/mcp-server/mcp-server.ts +1 -1
  501. package/src/mcp-server/prompts.ts +7 -3
  502. package/src/mcp-server/resources.ts +7 -3
  503. package/src/mcp-server/server.ts +15 -11
  504. package/src/mcp-server/tools/conversationsGenerateName.ts +40 -0
  505. package/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersions.ts +39 -0
  506. package/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +40 -0
  507. package/src/mcp-server/tools/routerChatCompletions.ts +37 -0
  508. package/{packages/orq-rc/src/mcp-server/tools/budgetsGet.ts → src/mcp-server/tools/routerImagesGenerate.ts} +7 -7
  509. package/src/mcp-server/tools/{budgetsUpdate.ts → toolsGetV2ToolsToolIdVersions.ts} +7 -7
  510. package/src/mcp-server/tools/toolsGetV2ToolsToolIdVersionsVersionId.ts +39 -0
  511. package/src/mcp-server/tools.ts +7 -3
  512. package/src/models/components/agentresponsemessage.ts +185 -0
  513. package/src/models/components/agentstartedstreamingevent.ts +30 -21
  514. package/src/models/components/conversationresponse.ts +68 -2
  515. package/src/models/components/createagentresponse.ts +340 -0
  516. package/src/models/components/index.ts +5 -0
  517. package/src/models/components/invokedeploymentrequest.ts +33 -25
  518. package/src/models/components/partdoneevent.ts +2 -2
  519. package/src/models/components/publiccontact.ts +99 -0
  520. package/src/models/components/reasoningpart.ts +2 -2
  521. package/src/models/components/responsedoneevent.ts +93 -68
  522. package/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  523. package/src/models/components/thinkingconfigenabledschema.ts +106 -0
  524. package/src/models/errors/generateconversationname.ts +132 -0
  525. package/src/models/errors/getv2evaluatorsidversions.ts +67 -0
  526. package/src/models/errors/getv2evaluatorsidversionsversionid.ts +69 -0
  527. package/src/models/errors/getv2toolstoolidversions.ts +67 -0
  528. package/src/models/errors/getv2toolstoolidversionsversionid.ts +69 -0
  529. package/src/models/errors/index.ts +5 -0
  530. package/src/models/operations/createagentrequest.ts +1561 -542
  531. package/src/models/operations/createagentresponserequest.ts +72 -513
  532. package/src/models/operations/createchatcompletion.ts +8948 -0
  533. package/src/models/operations/createcontact.ts +2 -2
  534. package/src/models/operations/createconversation.ts +141 -6
  535. package/src/models/operations/createdataset.ts +2 -2
  536. package/src/models/operations/createdatasetitem.ts +16 -16
  537. package/src/models/operations/createdatasource.ts +2 -2
  538. package/src/models/operations/createeval.ts +292 -28
  539. package/src/models/operations/createimage.ts +966 -0
  540. package/src/models/operations/creatememory.ts +4 -1
  541. package/src/models/operations/creatememorydocument.ts +5 -2
  542. package/src/models/operations/createprompt.ts +54 -52
  543. package/src/models/operations/createtool.ts +12 -12
  544. package/src/models/operations/deploymentcreatemetric.ts +8 -8
  545. package/src/models/operations/deploymentgetconfig.ts +8 -8
  546. package/src/models/operations/deploymentinvoke.ts +141 -16
  547. package/src/models/operations/deployments.ts +2 -0
  548. package/src/models/operations/deploymentstream.ts +170 -25
  549. package/src/models/operations/fileget.ts +2 -2
  550. package/src/models/operations/filelist.ts +2 -2
  551. package/src/models/operations/fileupload.ts +2 -2
  552. package/src/models/operations/generateconversationname.ts +319 -0
  553. package/src/models/operations/getallmemories.ts +3 -0
  554. package/src/models/operations/getallmemorydocuments.ts +3 -0
  555. package/src/models/operations/getallprompts.ts +47 -38
  556. package/src/models/operations/getalltools.ts +12 -12
  557. package/src/models/operations/getevals.ts +196 -28
  558. package/src/models/operations/getoneprompt.ts +2 -0
  559. package/src/models/operations/getpromptversion.ts +2 -0
  560. package/src/models/operations/getv2evaluatorsidversions.ts +274 -0
  561. package/src/models/operations/getv2evaluatorsidversionsversionid.ts +193 -0
  562. package/src/models/operations/getv2toolstoolidversions.ts +276 -0
  563. package/src/models/operations/getv2toolstoolidversionsversionid.ts +194 -0
  564. package/src/models/operations/index.ts +7 -5
  565. package/src/models/operations/invokeagent.ts +19 -26
  566. package/src/models/operations/invokeeval.ts +11 -10
  567. package/src/models/operations/listagents.ts +502 -194
  568. package/src/models/operations/listcontacts.ts +2 -2
  569. package/src/models/operations/listconversations.ts +6 -16
  570. package/src/models/operations/listdatasetdatapoints.ts +12 -12
  571. package/src/models/operations/listdatasets.ts +2 -2
  572. package/src/models/operations/listdatasources.ts +2 -2
  573. package/src/models/operations/listpromptversions.ts +2 -0
  574. package/src/models/operations/retrieveagentrequest.ts +532 -202
  575. package/src/models/operations/retrievecontact.ts +2 -2
  576. package/src/models/operations/retrieveconversation.ts +75 -2
  577. package/src/models/operations/retrievedatapoint.ts +12 -12
  578. package/src/models/operations/retrievedataset.ts +2 -2
  579. package/src/models/operations/retrievedatasource.ts +2 -2
  580. package/src/models/operations/retrievememory.ts +3 -0
  581. package/src/models/operations/retrievememorydocument.ts +3 -0
  582. package/src/models/operations/retrievetool.ts +12 -12
  583. package/src/models/operations/runagent.ts +505 -202
  584. package/src/models/operations/streamrunagent.ts +532 -209
  585. package/src/models/operations/updateagent.ts +1491 -465
  586. package/src/models/operations/updatecontact.ts +2 -2
  587. package/src/models/operations/updateconversation.ts +140 -2
  588. package/src/models/operations/updatedatapoint.ts +16 -16
  589. package/src/models/operations/updatedataset.ts +2 -2
  590. package/src/models/operations/updatedatasource.ts +2 -2
  591. package/src/models/operations/updateeval.ts +292 -28
  592. package/src/models/operations/updatememory.ts +4 -1
  593. package/src/models/operations/updatememorydocument.ts +5 -2
  594. package/src/models/operations/updatememorystore.ts +2 -0
  595. package/src/models/operations/updateprompt.ts +8 -4
  596. package/src/models/operations/updatetool.ts +14 -14
  597. package/src/sdk/conversations.ts +20 -0
  598. package/src/sdk/evaluators.ts +45 -0
  599. package/src/sdk/router.ts +52 -0
  600. package/src/sdk/sdk.ts +12 -6
  601. package/src/sdk/tools.ts +36 -0
  602. package/funcs/budgetsCreate.d.ts +0 -17
  603. package/funcs/budgetsCreate.d.ts.map +0 -1
  604. package/funcs/budgetsCreate.js.map +0 -1
  605. package/funcs/budgetsDelete.d.ts.map +0 -1
  606. package/funcs/budgetsDelete.js.map +0 -1
  607. package/funcs/budgetsGet.d.ts +0 -17
  608. package/funcs/budgetsGet.d.ts.map +0 -1
  609. package/funcs/budgetsGet.js.map +0 -1
  610. package/funcs/budgetsList.d.ts.map +0 -1
  611. package/funcs/budgetsList.js.map +0 -1
  612. package/funcs/budgetsUpdate.d.ts.map +0 -1
  613. package/funcs/budgetsUpdate.js.map +0 -1
  614. package/mcp-server/tools/budgetsCreate.d.ts +0 -8
  615. package/mcp-server/tools/budgetsCreate.d.ts.map +0 -1
  616. package/mcp-server/tools/budgetsCreate.js.map +0 -1
  617. package/mcp-server/tools/budgetsDelete.d.ts +0 -8
  618. package/mcp-server/tools/budgetsDelete.d.ts.map +0 -1
  619. package/mcp-server/tools/budgetsDelete.js.map +0 -1
  620. package/mcp-server/tools/budgetsGet.d.ts +0 -8
  621. package/mcp-server/tools/budgetsGet.d.ts.map +0 -1
  622. package/mcp-server/tools/budgetsGet.js.map +0 -1
  623. package/mcp-server/tools/budgetsList.d.ts +0 -8
  624. package/mcp-server/tools/budgetsList.d.ts.map +0 -1
  625. package/mcp-server/tools/budgetsList.js.map +0 -1
  626. package/mcp-server/tools/budgetsUpdate.d.ts +0 -8
  627. package/mcp-server/tools/budgetsUpdate.d.ts.map +0 -1
  628. package/mcp-server/tools/budgetsUpdate.js.map +0 -1
  629. package/models/operations/createbudget.d.ts +0 -315
  630. package/models/operations/createbudget.d.ts.map +0 -1
  631. package/models/operations/createbudget.js +0 -314
  632. package/models/operations/createbudget.js.map +0 -1
  633. package/models/operations/deletebudget.d.ts +0 -20
  634. package/models/operations/deletebudget.d.ts.map +0 -1
  635. package/models/operations/deletebudget.js.map +0 -1
  636. package/models/operations/getbudget.d.ts +0 -171
  637. package/models/operations/getbudget.d.ts.map +0 -1
  638. package/models/operations/getbudget.js +0 -191
  639. package/models/operations/getbudget.js.map +0 -1
  640. package/models/operations/listbudgets.d.ts +0 -234
  641. package/models/operations/listbudgets.d.ts.map +0 -1
  642. package/models/operations/listbudgets.js +0 -257
  643. package/models/operations/listbudgets.js.map +0 -1
  644. package/models/operations/updatebudget.d.ts +0 -235
  645. package/models/operations/updatebudget.d.ts.map +0 -1
  646. package/models/operations/updatebudget.js +0 -260
  647. package/models/operations/updatebudget.js.map +0 -1
  648. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +0 -37
  649. package/packages/orq-rc/src/mcp-server/tools/budgetsDelete.ts +0 -35
  650. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +0 -37
  651. package/packages/orq-rc/src/models/operations/createbudget.ts +0 -653
  652. package/packages/orq-rc/src/models/operations/deletebudget.ts +0 -54
  653. package/packages/orq-rc/src/models/operations/getbudget.ts +0 -366
  654. package/packages/orq-rc/src/models/operations/listbudgets.ts +0 -503
  655. package/packages/orq-rc/src/models/operations/updatebudget.ts +0 -511
  656. package/packages/orq-rc/src/sdk/budgets.ts +0 -99
  657. package/sdk/budgets.d.ts +0 -40
  658. package/sdk/budgets.d.ts.map +0 -1
  659. package/sdk/budgets.js +0 -62
  660. package/sdk/budgets.js.map +0 -1
  661. package/src/mcp-server/tools/budgetsCreate.ts +0 -37
  662. package/src/mcp-server/tools/budgetsDelete.ts +0 -35
  663. package/src/mcp-server/tools/budgetsList.ts +0 -37
  664. package/src/models/operations/createbudget.ts +0 -653
  665. package/src/models/operations/deletebudget.ts +0 -54
  666. package/src/models/operations/getbudget.ts +0 -366
  667. package/src/models/operations/listbudgets.ts +0 -503
  668. package/src/models/operations/updatebudget.ts +0 -511
  669. package/src/sdk/budgets.ts +0 -99
@@ -0,0 +1,3400 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.CreateChatCompletionMessagesToolCalls$inboundSchema = exports.CreateChatCompletionMessagesFunction$outboundSchema = exports.CreateChatCompletionMessagesFunction$inboundSchema = exports.CreateChatCompletionMessagesType$outboundSchema = exports.CreateChatCompletionMessagesType$inboundSchema = exports.CreateChatCompletionMessagesAudio$outboundSchema = exports.CreateChatCompletionMessagesAudio$inboundSchema = exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$outboundSchema = exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$inboundSchema = exports.CreateChatCompletionContentRouter2$outboundSchema = exports.CreateChatCompletionContentRouter2$inboundSchema = exports.CreateChatCompletionMessagesToolMessage$outboundSchema = exports.CreateChatCompletionMessagesToolMessage$inboundSchema = exports.CreateChatCompletionMessagesCacheControl$outboundSchema = exports.CreateChatCompletionMessagesCacheControl$inboundSchema = exports.CreateChatCompletionMessagesTtl$outboundSchema = exports.CreateChatCompletionMessagesTtl$inboundSchema = exports.CreateChatCompletionMessagesRouterType$outboundSchema = exports.CreateChatCompletionMessagesRouterType$inboundSchema = exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$outboundSchema = exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$inboundSchema = exports.CreateChatCompletionContentRouterRequest2$outboundSchema = exports.CreateChatCompletionContentRouterRequest2$inboundSchema = exports.CreateChatCompletionObject = exports.CreateChatCompletionRole = exports.CreateChatCompletionRouterResponseType = exports.FinishReason = exports.CreateChatCompletionRouterObject = exports.CreateChatCompletionRouterRole = exports.CreateChatCompletionRouterResponse200Type = exports.CreateChatCompletionFinishReason = exports.LoadBalancerType = exports.CreateChatCompletionSearchType = exports.CreateChatCompletionRouterRequestType = exports.Version = exports.CreateChatCompletionExecuteOn = exports.CreateChatCompletionId1 = exports.CreateChatCompletionModalities = exports.CreateChatCompletionToolChoice1 = exports.CreateChatCompletionToolChoiceType = exports.CreateChatCompletionRouterType = exports.CreateChatCompletionType = exports.CreateChatCompletionReasoningEffort = exports.CreateChatCompletionFormat = exports.CreateChatCompletionVoice = exports.CreateChatCompletion2Ttl = exports.CreateChatCompletion2RouterType = exports.CreateChatCompletionMessagesType = exports.CreateChatCompletionMessagesTtl = exports.CreateChatCompletionMessagesRouterType = void 0;
40
+ exports.CreateChatCompletionThinking$inboundSchema = exports.CreateChatCompletionStreamOptions$outboundSchema = exports.CreateChatCompletionStreamOptions$inboundSchema = exports.CreateChatCompletionStop$outboundSchema = exports.CreateChatCompletionStop$inboundSchema = exports.CreateChatCompletionReasoningEffort$outboundSchema = exports.CreateChatCompletionReasoningEffort$inboundSchema = exports.CreateChatCompletionResponseFormat$outboundSchema = exports.CreateChatCompletionResponseFormat$inboundSchema = exports.CreateChatCompletionResponseFormatText$outboundSchema = exports.CreateChatCompletionResponseFormatText$inboundSchema = exports.CreateChatCompletionResponseFormatJSONObject$outboundSchema = exports.CreateChatCompletionResponseFormatJSONObject$inboundSchema = exports.CreateChatCompletionResponseFormatJSONSchema$outboundSchema = exports.CreateChatCompletionResponseFormatJSONSchema$inboundSchema = exports.CreateChatCompletionResponseFormatRouterJsonSchema$outboundSchema = exports.CreateChatCompletionResponseFormatRouterJsonSchema$inboundSchema = exports.CreateChatCompletionAudio$outboundSchema = exports.CreateChatCompletionAudio$inboundSchema = exports.CreateChatCompletionFormat$outboundSchema = exports.CreateChatCompletionFormat$inboundSchema = exports.CreateChatCompletionVoice$outboundSchema = exports.CreateChatCompletionVoice$inboundSchema = exports.CreateChatCompletionMessages$outboundSchema = exports.CreateChatCompletionMessages$inboundSchema = exports.CreateChatCompletionMessagesSystemMessage$outboundSchema = exports.CreateChatCompletionMessagesSystemMessage$inboundSchema = exports.CreateChatCompletionMessagesContent$outboundSchema = exports.CreateChatCompletionMessagesContent$inboundSchema = exports.CreateChatCompletionMessagesDeveloperMessage$outboundSchema = exports.CreateChatCompletionMessagesDeveloperMessage$inboundSchema = exports.CreateChatCompletionMessagesRouterContent$outboundSchema = exports.CreateChatCompletionMessagesRouterContent$inboundSchema = exports.CreateChatCompletionMessagesUserMessage$outboundSchema = exports.CreateChatCompletionMessagesUserMessage$inboundSchema = exports.CreateChatCompletionMessagesRouterRequestContent$outboundSchema = exports.CreateChatCompletionMessagesRouterRequestContent$inboundSchema = exports.CreateChatCompletionContent2$outboundSchema = exports.CreateChatCompletionContent2$inboundSchema = exports.CreateChatCompletion24$outboundSchema = exports.CreateChatCompletion24$inboundSchema = exports.CreateChatCompletion2CacheControl$outboundSchema = exports.CreateChatCompletion2CacheControl$inboundSchema = exports.CreateChatCompletion2Ttl$outboundSchema = exports.CreateChatCompletion2Ttl$inboundSchema = exports.CreateChatCompletion2RouterType$outboundSchema = exports.CreateChatCompletion2RouterType$inboundSchema = exports.CreateChatCompletionMessagesAssistantMessage$outboundSchema = exports.CreateChatCompletionMessagesAssistantMessage$inboundSchema = exports.CreateChatCompletionMessagesToolCalls$outboundSchema = void 0;
41
+ exports.CreateChatCompletionSearchType$inboundSchema = exports.Cache$outboundSchema = exports.Cache$inboundSchema = exports.CreateChatCompletionRouterRequestType$outboundSchema = exports.CreateChatCompletionRouterRequestType$inboundSchema = exports.Inputs$outboundSchema = exports.Inputs$inboundSchema = exports.Inputs2$outboundSchema = exports.Inputs2$inboundSchema = exports.CreateChatCompletionThread$outboundSchema = exports.CreateChatCompletionThread$inboundSchema = exports.Prompt$outboundSchema = exports.Prompt$inboundSchema = exports.Version$outboundSchema = exports.Version$inboundSchema = exports.Fallbacks$outboundSchema = exports.Fallbacks$inboundSchema = exports.CreateChatCompletionRetry$outboundSchema = exports.CreateChatCompletionRetry$inboundSchema = exports.CreateChatCompletionGuardrails$outboundSchema = exports.CreateChatCompletionGuardrails$inboundSchema = exports.CreateChatCompletionExecuteOn$outboundSchema = exports.CreateChatCompletionExecuteOn$inboundSchema = exports.CreateChatCompletionId$outboundSchema = exports.CreateChatCompletionId$inboundSchema = exports.CreateChatCompletionId1$outboundSchema = exports.CreateChatCompletionId1$inboundSchema = exports.CreateChatCompletionModalities$outboundSchema = exports.CreateChatCompletionModalities$inboundSchema = exports.CreateChatCompletionToolChoice$outboundSchema = exports.CreateChatCompletionToolChoice$inboundSchema = exports.CreateChatCompletionToolChoice1$outboundSchema = exports.CreateChatCompletionToolChoice1$inboundSchema = exports.CreateChatCompletionToolChoice2$outboundSchema = exports.CreateChatCompletionToolChoice2$inboundSchema = exports.CreateChatCompletionToolChoiceFunction$outboundSchema = exports.CreateChatCompletionToolChoiceFunction$inboundSchema = exports.CreateChatCompletionToolChoiceType$outboundSchema = exports.CreateChatCompletionToolChoiceType$inboundSchema = exports.CreateChatCompletionTools$outboundSchema = exports.CreateChatCompletionTools$inboundSchema = exports.CreateChatCompletionFunction$outboundSchema = exports.CreateChatCompletionFunction$inboundSchema = exports.CreateChatCompletionParameters$outboundSchema = exports.CreateChatCompletionParameters$inboundSchema = exports.CreateChatCompletionRouterType$outboundSchema = exports.CreateChatCompletionRouterType$inboundSchema = exports.CreateChatCompletionType$outboundSchema = exports.CreateChatCompletionType$inboundSchema = exports.CreateChatCompletionThinking$outboundSchema = void 0;
42
+ exports.CreateChatCompletionAndRouterNe$inboundSchema = exports.CreateChatCompletionAndGt$outboundSchema = exports.CreateChatCompletionAndGt$inboundSchema = exports.CreateChatCompletionAndGte$outboundSchema = exports.CreateChatCompletionAndGte$inboundSchema = exports.CreateChatCompletionAndLt$outboundSchema = exports.CreateChatCompletionAndLt$inboundSchema = exports.CreateChatCompletionAndLte$outboundSchema = exports.CreateChatCompletionAndLte$inboundSchema = exports.CreateChatCompletionAndIn$outboundSchema = exports.CreateChatCompletionAndIn$inboundSchema = exports.CreateChatCompletionAndRouterIn$outboundSchema = exports.CreateChatCompletionAndRouterIn$inboundSchema = exports.CreateChatCompletionAndNin$outboundSchema = exports.CreateChatCompletionAndNin$inboundSchema = exports.CreateChatCompletionAndRouterNin$outboundSchema = exports.CreateChatCompletionAndRouterNin$inboundSchema = exports.CreateChatCompletionAndExists$outboundSchema = exports.CreateChatCompletionAndExists$inboundSchema = exports.CreateChatCompletionFilterByOr$outboundSchema = exports.CreateChatCompletionFilterByOr$inboundSchema = exports.CreateChatCompletionFilterByRouterOr$outboundSchema = exports.CreateChatCompletionFilterByRouterOr$inboundSchema = exports.CreateChatCompletionOrEq$outboundSchema = exports.CreateChatCompletionOrEq$inboundSchema = exports.CreateChatCompletionOrRouterEq$outboundSchema = exports.CreateChatCompletionOrRouterEq$inboundSchema = exports.CreateChatCompletionOrNe$outboundSchema = exports.CreateChatCompletionOrNe$inboundSchema = exports.CreateChatCompletionOrRouterNe$outboundSchema = exports.CreateChatCompletionOrRouterNe$inboundSchema = exports.CreateChatCompletionOrGt$outboundSchema = exports.CreateChatCompletionOrGt$inboundSchema = exports.CreateChatCompletionOrGte$outboundSchema = exports.CreateChatCompletionOrGte$inboundSchema = exports.CreateChatCompletionOrLt$outboundSchema = exports.CreateChatCompletionOrLt$inboundSchema = exports.CreateChatCompletionOrLte$outboundSchema = exports.CreateChatCompletionOrLte$inboundSchema = exports.CreateChatCompletionOrIn$outboundSchema = exports.CreateChatCompletionOrIn$inboundSchema = exports.CreateChatCompletionOrRouterIn$outboundSchema = exports.CreateChatCompletionOrRouterIn$inboundSchema = exports.CreateChatCompletionOrNin$outboundSchema = exports.CreateChatCompletionOrNin$inboundSchema = exports.CreateChatCompletionOrRouterNin$outboundSchema = exports.CreateChatCompletionOrRouterNin$inboundSchema = exports.CreateChatCompletionOrExists$outboundSchema = exports.CreateChatCompletionOrExists$inboundSchema = exports.CreateChatCompletionSearchType$outboundSchema = void 0;
43
+ exports.LoadBalancerType$inboundSchema = exports.CreateChatCompletionKnowledgeBases$outboundSchema = exports.CreateChatCompletionKnowledgeBases$inboundSchema = exports.CreateChatCompletionAgenticRagConfig$outboundSchema = exports.CreateChatCompletionAgenticRagConfig$inboundSchema = exports.CreateChatCompletionRerankConfig$outboundSchema = exports.CreateChatCompletionRerankConfig$inboundSchema = exports.CreateChatCompletionSearchOptions$outboundSchema = exports.CreateChatCompletionSearchOptions$inboundSchema = exports.CreateChatCompletionFilterBy$outboundSchema = exports.CreateChatCompletionFilterBy$inboundSchema = exports.CreateChatCompletionFilterBy1$outboundSchema = exports.CreateChatCompletionFilterBy1$inboundSchema = exports.CreateChatCompletion1Eq$outboundSchema = exports.CreateChatCompletion1Eq$inboundSchema = exports.CreateChatCompletion1RouterEq$outboundSchema = exports.CreateChatCompletion1RouterEq$inboundSchema = exports.CreateChatCompletion1Ne$outboundSchema = exports.CreateChatCompletion1Ne$inboundSchema = exports.CreateChatCompletion1RouterNe$outboundSchema = exports.CreateChatCompletion1RouterNe$inboundSchema = exports.CreateChatCompletion1Gt$outboundSchema = exports.CreateChatCompletion1Gt$inboundSchema = exports.CreateChatCompletion1Gte$outboundSchema = exports.CreateChatCompletion1Gte$inboundSchema = exports.CreateChatCompletion1Lt$outboundSchema = exports.CreateChatCompletion1Lt$inboundSchema = exports.CreateChatCompletion1Lte$outboundSchema = exports.CreateChatCompletion1Lte$inboundSchema = exports.CreateChatCompletion1In$outboundSchema = exports.CreateChatCompletion1In$inboundSchema = exports.CreateChatCompletion1RouterIn$outboundSchema = exports.CreateChatCompletion1RouterIn$inboundSchema = exports.CreateChatCompletion1Nin$outboundSchema = exports.CreateChatCompletion1Nin$inboundSchema = exports.CreateChatCompletion1RouterNin$outboundSchema = exports.CreateChatCompletion1RouterNin$inboundSchema = exports.CreateChatCompletion1Exists$outboundSchema = exports.CreateChatCompletion1Exists$inboundSchema = exports.CreateChatCompletionFilterByAnd$outboundSchema = exports.CreateChatCompletionFilterByAnd$inboundSchema = exports.CreateChatCompletionFilterByRouterAnd$outboundSchema = exports.CreateChatCompletionFilterByRouterAnd$inboundSchema = exports.CreateChatCompletionAndEq$outboundSchema = exports.CreateChatCompletionAndEq$inboundSchema = exports.CreateChatCompletionAndRouterEq$outboundSchema = exports.CreateChatCompletionAndRouterEq$inboundSchema = exports.CreateChatCompletionAndNe$outboundSchema = exports.CreateChatCompletionAndNe$inboundSchema = exports.CreateChatCompletionAndRouterNe$outboundSchema = void 0;
44
+ exports.FinishReason$inboundSchema = exports.CreateChatCompletionRouterResponseBody$outboundSchema = exports.CreateChatCompletionRouterResponseBody$inboundSchema = exports.CreateChatCompletionData$outboundSchema = exports.CreateChatCompletionData$inboundSchema = exports.CreateChatCompletionRouterObject$outboundSchema = exports.CreateChatCompletionRouterObject$inboundSchema = exports.CreateChatCompletionRouterUsage$outboundSchema = exports.CreateChatCompletionRouterUsage$inboundSchema = exports.CreateChatCompletionRouterCompletionTokensDetails$outboundSchema = exports.CreateChatCompletionRouterCompletionTokensDetails$inboundSchema = exports.CreateChatCompletionRouterPromptTokensDetails$outboundSchema = exports.CreateChatCompletionRouterPromptTokensDetails$inboundSchema = exports.CreateChatCompletionRouterChoices$outboundSchema = exports.CreateChatCompletionRouterChoices$inboundSchema = exports.Delta$outboundSchema = exports.Delta$inboundSchema = exports.CreateChatCompletionRouterResponseAudio$outboundSchema = exports.CreateChatCompletionRouterResponseAudio$inboundSchema = exports.CreateChatCompletionRouterRole$outboundSchema = exports.CreateChatCompletionRouterRole$inboundSchema = exports.CreateChatCompletionRouterToolCalls$outboundSchema = exports.CreateChatCompletionRouterToolCalls$inboundSchema = exports.CreateChatCompletionRouterResponseFunction$outboundSchema = exports.CreateChatCompletionRouterResponseFunction$inboundSchema = exports.CreateChatCompletionRouterResponse200Type$outboundSchema = exports.CreateChatCompletionRouterResponse200Type$inboundSchema = exports.CreateChatCompletionLogprobs$outboundSchema = exports.CreateChatCompletionLogprobs$inboundSchema = exports.CreateChatCompletionRefusal$outboundSchema = exports.CreateChatCompletionRefusal$inboundSchema = exports.CreateChatCompletionRouterResponseTopLogprobs$outboundSchema = exports.CreateChatCompletionRouterResponseTopLogprobs$inboundSchema = exports.CreateChatCompletionRouterContent$outboundSchema = exports.CreateChatCompletionRouterContent$inboundSchema = exports.CreateChatCompletionRouterTopLogprobs$outboundSchema = exports.CreateChatCompletionRouterTopLogprobs$inboundSchema = exports.CreateChatCompletionFinishReason$outboundSchema = exports.CreateChatCompletionFinishReason$inboundSchema = exports.CreateChatCompletionRequestBody$outboundSchema = exports.CreateChatCompletionRequestBody$inboundSchema = exports.Orq$outboundSchema = exports.Orq$inboundSchema = exports.Timeout$outboundSchema = exports.Timeout$inboundSchema = exports.LoadBalancer$outboundSchema = exports.LoadBalancer$inboundSchema = exports.LoadBalancer1$outboundSchema = exports.LoadBalancer1$inboundSchema = exports.LoadBalancerType$outboundSchema = void 0;
45
+ exports.CreateChatCompletionResponse$outboundSchema = exports.CreateChatCompletionResponse$inboundSchema = exports.CreateChatCompletionResponseBody$outboundSchema = exports.CreateChatCompletionResponseBody$inboundSchema = exports.CreateChatCompletionObject$outboundSchema = exports.CreateChatCompletionObject$inboundSchema = exports.CreateChatCompletionUsage$outboundSchema = exports.CreateChatCompletionUsage$inboundSchema = exports.CreateChatCompletionCompletionTokensDetails$outboundSchema = exports.CreateChatCompletionCompletionTokensDetails$inboundSchema = exports.CreateChatCompletionPromptTokensDetails$outboundSchema = exports.CreateChatCompletionPromptTokensDetails$inboundSchema = exports.CreateChatCompletionChoices$outboundSchema = exports.CreateChatCompletionChoices$inboundSchema = exports.Logprobs$outboundSchema = exports.Logprobs$inboundSchema = exports.Refusal$outboundSchema = exports.Refusal$inboundSchema = exports.CreateChatCompletionTopLogprobs$outboundSchema = exports.CreateChatCompletionTopLogprobs$inboundSchema = exports.CreateChatCompletionContent$outboundSchema = exports.CreateChatCompletionContent$inboundSchema = exports.TopLogprobs$outboundSchema = exports.TopLogprobs$inboundSchema = exports.CreateChatCompletionMessage$outboundSchema = exports.CreateChatCompletionMessage$inboundSchema = exports.CreateChatCompletionRouterAudio$outboundSchema = exports.CreateChatCompletionRouterAudio$inboundSchema = exports.CreateChatCompletionRole$outboundSchema = exports.CreateChatCompletionRole$inboundSchema = exports.CreateChatCompletionToolCalls$outboundSchema = exports.CreateChatCompletionToolCalls$inboundSchema = exports.CreateChatCompletionRouterFunction$outboundSchema = exports.CreateChatCompletionRouterFunction$inboundSchema = exports.CreateChatCompletionRouterResponseType$outboundSchema = exports.CreateChatCompletionRouterResponseType$inboundSchema = exports.FinishReason$outboundSchema = void 0;
46
+ exports.createChatCompletionContentRouterRequest2ToJSON = createChatCompletionContentRouterRequest2ToJSON;
47
+ exports.createChatCompletionContentRouterRequest2FromJSON = createChatCompletionContentRouterRequest2FromJSON;
48
+ exports.createChatCompletionMessagesRouterRequestRequestBody5ContentToJSON = createChatCompletionMessagesRouterRequestRequestBody5ContentToJSON;
49
+ exports.createChatCompletionMessagesRouterRequestRequestBody5ContentFromJSON = createChatCompletionMessagesRouterRequestRequestBody5ContentFromJSON;
50
+ exports.createChatCompletionMessagesCacheControlToJSON = createChatCompletionMessagesCacheControlToJSON;
51
+ exports.createChatCompletionMessagesCacheControlFromJSON = createChatCompletionMessagesCacheControlFromJSON;
52
+ exports.createChatCompletionMessagesToolMessageToJSON = createChatCompletionMessagesToolMessageToJSON;
53
+ exports.createChatCompletionMessagesToolMessageFromJSON = createChatCompletionMessagesToolMessageFromJSON;
54
+ exports.createChatCompletionContentRouter2ToJSON = createChatCompletionContentRouter2ToJSON;
55
+ exports.createChatCompletionContentRouter2FromJSON = createChatCompletionContentRouter2FromJSON;
56
+ exports.createChatCompletionMessagesRouterRequestRequestBodyContentToJSON = createChatCompletionMessagesRouterRequestRequestBodyContentToJSON;
57
+ exports.createChatCompletionMessagesRouterRequestRequestBodyContentFromJSON = createChatCompletionMessagesRouterRequestRequestBodyContentFromJSON;
58
+ exports.createChatCompletionMessagesAudioToJSON = createChatCompletionMessagesAudioToJSON;
59
+ exports.createChatCompletionMessagesAudioFromJSON = createChatCompletionMessagesAudioFromJSON;
60
+ exports.createChatCompletionMessagesFunctionToJSON = createChatCompletionMessagesFunctionToJSON;
61
+ exports.createChatCompletionMessagesFunctionFromJSON = createChatCompletionMessagesFunctionFromJSON;
62
+ exports.createChatCompletionMessagesToolCallsToJSON = createChatCompletionMessagesToolCallsToJSON;
63
+ exports.createChatCompletionMessagesToolCallsFromJSON = createChatCompletionMessagesToolCallsFromJSON;
64
+ exports.createChatCompletionMessagesAssistantMessageToJSON = createChatCompletionMessagesAssistantMessageToJSON;
65
+ exports.createChatCompletionMessagesAssistantMessageFromJSON = createChatCompletionMessagesAssistantMessageFromJSON;
66
+ exports.createChatCompletion2CacheControlToJSON = createChatCompletion2CacheControlToJSON;
67
+ exports.createChatCompletion2CacheControlFromJSON = createChatCompletion2CacheControlFromJSON;
68
+ exports.createChatCompletion24ToJSON = createChatCompletion24ToJSON;
69
+ exports.createChatCompletion24FromJSON = createChatCompletion24FromJSON;
70
+ exports.createChatCompletionContent2ToJSON = createChatCompletionContent2ToJSON;
71
+ exports.createChatCompletionContent2FromJSON = createChatCompletionContent2FromJSON;
72
+ exports.createChatCompletionMessagesRouterRequestContentToJSON = createChatCompletionMessagesRouterRequestContentToJSON;
73
+ exports.createChatCompletionMessagesRouterRequestContentFromJSON = createChatCompletionMessagesRouterRequestContentFromJSON;
74
+ exports.createChatCompletionMessagesUserMessageToJSON = createChatCompletionMessagesUserMessageToJSON;
75
+ exports.createChatCompletionMessagesUserMessageFromJSON = createChatCompletionMessagesUserMessageFromJSON;
76
+ exports.createChatCompletionMessagesRouterContentToJSON = createChatCompletionMessagesRouterContentToJSON;
77
+ exports.createChatCompletionMessagesRouterContentFromJSON = createChatCompletionMessagesRouterContentFromJSON;
78
+ exports.createChatCompletionMessagesDeveloperMessageToJSON = createChatCompletionMessagesDeveloperMessageToJSON;
79
+ exports.createChatCompletionMessagesDeveloperMessageFromJSON = createChatCompletionMessagesDeveloperMessageFromJSON;
80
+ exports.createChatCompletionMessagesContentToJSON = createChatCompletionMessagesContentToJSON;
81
+ exports.createChatCompletionMessagesContentFromJSON = createChatCompletionMessagesContentFromJSON;
82
+ exports.createChatCompletionMessagesSystemMessageToJSON = createChatCompletionMessagesSystemMessageToJSON;
83
+ exports.createChatCompletionMessagesSystemMessageFromJSON = createChatCompletionMessagesSystemMessageFromJSON;
84
+ exports.createChatCompletionMessagesToJSON = createChatCompletionMessagesToJSON;
85
+ exports.createChatCompletionMessagesFromJSON = createChatCompletionMessagesFromJSON;
86
+ exports.createChatCompletionAudioToJSON = createChatCompletionAudioToJSON;
87
+ exports.createChatCompletionAudioFromJSON = createChatCompletionAudioFromJSON;
88
+ exports.createChatCompletionResponseFormatRouterJsonSchemaToJSON = createChatCompletionResponseFormatRouterJsonSchemaToJSON;
89
+ exports.createChatCompletionResponseFormatRouterJsonSchemaFromJSON = createChatCompletionResponseFormatRouterJsonSchemaFromJSON;
90
+ exports.createChatCompletionResponseFormatJSONSchemaToJSON = createChatCompletionResponseFormatJSONSchemaToJSON;
91
+ exports.createChatCompletionResponseFormatJSONSchemaFromJSON = createChatCompletionResponseFormatJSONSchemaFromJSON;
92
+ exports.createChatCompletionResponseFormatJSONObjectToJSON = createChatCompletionResponseFormatJSONObjectToJSON;
93
+ exports.createChatCompletionResponseFormatJSONObjectFromJSON = createChatCompletionResponseFormatJSONObjectFromJSON;
94
+ exports.createChatCompletionResponseFormatTextToJSON = createChatCompletionResponseFormatTextToJSON;
95
+ exports.createChatCompletionResponseFormatTextFromJSON = createChatCompletionResponseFormatTextFromJSON;
96
+ exports.createChatCompletionResponseFormatToJSON = createChatCompletionResponseFormatToJSON;
97
+ exports.createChatCompletionResponseFormatFromJSON = createChatCompletionResponseFormatFromJSON;
98
+ exports.createChatCompletionStopToJSON = createChatCompletionStopToJSON;
99
+ exports.createChatCompletionStopFromJSON = createChatCompletionStopFromJSON;
100
+ exports.createChatCompletionStreamOptionsToJSON = createChatCompletionStreamOptionsToJSON;
101
+ exports.createChatCompletionStreamOptionsFromJSON = createChatCompletionStreamOptionsFromJSON;
102
+ exports.createChatCompletionThinkingToJSON = createChatCompletionThinkingToJSON;
103
+ exports.createChatCompletionThinkingFromJSON = createChatCompletionThinkingFromJSON;
104
+ exports.createChatCompletionParametersToJSON = createChatCompletionParametersToJSON;
105
+ exports.createChatCompletionParametersFromJSON = createChatCompletionParametersFromJSON;
106
+ exports.createChatCompletionFunctionToJSON = createChatCompletionFunctionToJSON;
107
+ exports.createChatCompletionFunctionFromJSON = createChatCompletionFunctionFromJSON;
108
+ exports.createChatCompletionToolsToJSON = createChatCompletionToolsToJSON;
109
+ exports.createChatCompletionToolsFromJSON = createChatCompletionToolsFromJSON;
110
+ exports.createChatCompletionToolChoiceFunctionToJSON = createChatCompletionToolChoiceFunctionToJSON;
111
+ exports.createChatCompletionToolChoiceFunctionFromJSON = createChatCompletionToolChoiceFunctionFromJSON;
112
+ exports.createChatCompletionToolChoice2ToJSON = createChatCompletionToolChoice2ToJSON;
113
+ exports.createChatCompletionToolChoice2FromJSON = createChatCompletionToolChoice2FromJSON;
114
+ exports.createChatCompletionToolChoiceToJSON = createChatCompletionToolChoiceToJSON;
115
+ exports.createChatCompletionToolChoiceFromJSON = createChatCompletionToolChoiceFromJSON;
116
+ exports.createChatCompletionIdToJSON = createChatCompletionIdToJSON;
117
+ exports.createChatCompletionIdFromJSON = createChatCompletionIdFromJSON;
118
+ exports.createChatCompletionGuardrailsToJSON = createChatCompletionGuardrailsToJSON;
119
+ exports.createChatCompletionGuardrailsFromJSON = createChatCompletionGuardrailsFromJSON;
120
+ exports.createChatCompletionRetryToJSON = createChatCompletionRetryToJSON;
121
+ exports.createChatCompletionRetryFromJSON = createChatCompletionRetryFromJSON;
122
+ exports.fallbacksToJSON = fallbacksToJSON;
123
+ exports.fallbacksFromJSON = fallbacksFromJSON;
124
+ exports.promptToJSON = promptToJSON;
125
+ exports.promptFromJSON = promptFromJSON;
126
+ exports.createChatCompletionThreadToJSON = createChatCompletionThreadToJSON;
127
+ exports.createChatCompletionThreadFromJSON = createChatCompletionThreadFromJSON;
128
+ exports.inputs2ToJSON = inputs2ToJSON;
129
+ exports.inputs2FromJSON = inputs2FromJSON;
130
+ exports.inputsToJSON = inputsToJSON;
131
+ exports.inputsFromJSON = inputsFromJSON;
132
+ exports.cacheToJSON = cacheToJSON;
133
+ exports.cacheFromJSON = cacheFromJSON;
134
+ exports.createChatCompletionOrExistsToJSON = createChatCompletionOrExistsToJSON;
135
+ exports.createChatCompletionOrExistsFromJSON = createChatCompletionOrExistsFromJSON;
136
+ exports.createChatCompletionOrRouterNinToJSON = createChatCompletionOrRouterNinToJSON;
137
+ exports.createChatCompletionOrRouterNinFromJSON = createChatCompletionOrRouterNinFromJSON;
138
+ exports.createChatCompletionOrNinToJSON = createChatCompletionOrNinToJSON;
139
+ exports.createChatCompletionOrNinFromJSON = createChatCompletionOrNinFromJSON;
140
+ exports.createChatCompletionOrRouterInToJSON = createChatCompletionOrRouterInToJSON;
141
+ exports.createChatCompletionOrRouterInFromJSON = createChatCompletionOrRouterInFromJSON;
142
+ exports.createChatCompletionOrInToJSON = createChatCompletionOrInToJSON;
143
+ exports.createChatCompletionOrInFromJSON = createChatCompletionOrInFromJSON;
144
+ exports.createChatCompletionOrLteToJSON = createChatCompletionOrLteToJSON;
145
+ exports.createChatCompletionOrLteFromJSON = createChatCompletionOrLteFromJSON;
146
+ exports.createChatCompletionOrLtToJSON = createChatCompletionOrLtToJSON;
147
+ exports.createChatCompletionOrLtFromJSON = createChatCompletionOrLtFromJSON;
148
+ exports.createChatCompletionOrGteToJSON = createChatCompletionOrGteToJSON;
149
+ exports.createChatCompletionOrGteFromJSON = createChatCompletionOrGteFromJSON;
150
+ exports.createChatCompletionOrGtToJSON = createChatCompletionOrGtToJSON;
151
+ exports.createChatCompletionOrGtFromJSON = createChatCompletionOrGtFromJSON;
152
+ exports.createChatCompletionOrRouterNeToJSON = createChatCompletionOrRouterNeToJSON;
153
+ exports.createChatCompletionOrRouterNeFromJSON = createChatCompletionOrRouterNeFromJSON;
154
+ exports.createChatCompletionOrNeToJSON = createChatCompletionOrNeToJSON;
155
+ exports.createChatCompletionOrNeFromJSON = createChatCompletionOrNeFromJSON;
156
+ exports.createChatCompletionOrRouterEqToJSON = createChatCompletionOrRouterEqToJSON;
157
+ exports.createChatCompletionOrRouterEqFromJSON = createChatCompletionOrRouterEqFromJSON;
158
+ exports.createChatCompletionOrEqToJSON = createChatCompletionOrEqToJSON;
159
+ exports.createChatCompletionOrEqFromJSON = createChatCompletionOrEqFromJSON;
160
+ exports.createChatCompletionFilterByRouterOrToJSON = createChatCompletionFilterByRouterOrToJSON;
161
+ exports.createChatCompletionFilterByRouterOrFromJSON = createChatCompletionFilterByRouterOrFromJSON;
162
+ exports.createChatCompletionFilterByOrToJSON = createChatCompletionFilterByOrToJSON;
163
+ exports.createChatCompletionFilterByOrFromJSON = createChatCompletionFilterByOrFromJSON;
164
+ exports.createChatCompletionAndExistsToJSON = createChatCompletionAndExistsToJSON;
165
+ exports.createChatCompletionAndExistsFromJSON = createChatCompletionAndExistsFromJSON;
166
+ exports.createChatCompletionAndRouterNinToJSON = createChatCompletionAndRouterNinToJSON;
167
+ exports.createChatCompletionAndRouterNinFromJSON = createChatCompletionAndRouterNinFromJSON;
168
+ exports.createChatCompletionAndNinToJSON = createChatCompletionAndNinToJSON;
169
+ exports.createChatCompletionAndNinFromJSON = createChatCompletionAndNinFromJSON;
170
+ exports.createChatCompletionAndRouterInToJSON = createChatCompletionAndRouterInToJSON;
171
+ exports.createChatCompletionAndRouterInFromJSON = createChatCompletionAndRouterInFromJSON;
172
+ exports.createChatCompletionAndInToJSON = createChatCompletionAndInToJSON;
173
+ exports.createChatCompletionAndInFromJSON = createChatCompletionAndInFromJSON;
174
+ exports.createChatCompletionAndLteToJSON = createChatCompletionAndLteToJSON;
175
+ exports.createChatCompletionAndLteFromJSON = createChatCompletionAndLteFromJSON;
176
+ exports.createChatCompletionAndLtToJSON = createChatCompletionAndLtToJSON;
177
+ exports.createChatCompletionAndLtFromJSON = createChatCompletionAndLtFromJSON;
178
+ exports.createChatCompletionAndGteToJSON = createChatCompletionAndGteToJSON;
179
+ exports.createChatCompletionAndGteFromJSON = createChatCompletionAndGteFromJSON;
180
+ exports.createChatCompletionAndGtToJSON = createChatCompletionAndGtToJSON;
181
+ exports.createChatCompletionAndGtFromJSON = createChatCompletionAndGtFromJSON;
182
+ exports.createChatCompletionAndRouterNeToJSON = createChatCompletionAndRouterNeToJSON;
183
+ exports.createChatCompletionAndRouterNeFromJSON = createChatCompletionAndRouterNeFromJSON;
184
+ exports.createChatCompletionAndNeToJSON = createChatCompletionAndNeToJSON;
185
+ exports.createChatCompletionAndNeFromJSON = createChatCompletionAndNeFromJSON;
186
+ exports.createChatCompletionAndRouterEqToJSON = createChatCompletionAndRouterEqToJSON;
187
+ exports.createChatCompletionAndRouterEqFromJSON = createChatCompletionAndRouterEqFromJSON;
188
+ exports.createChatCompletionAndEqToJSON = createChatCompletionAndEqToJSON;
189
+ exports.createChatCompletionAndEqFromJSON = createChatCompletionAndEqFromJSON;
190
+ exports.createChatCompletionFilterByRouterAndToJSON = createChatCompletionFilterByRouterAndToJSON;
191
+ exports.createChatCompletionFilterByRouterAndFromJSON = createChatCompletionFilterByRouterAndFromJSON;
192
+ exports.createChatCompletionFilterByAndToJSON = createChatCompletionFilterByAndToJSON;
193
+ exports.createChatCompletionFilterByAndFromJSON = createChatCompletionFilterByAndFromJSON;
194
+ exports.createChatCompletion1ExistsToJSON = createChatCompletion1ExistsToJSON;
195
+ exports.createChatCompletion1ExistsFromJSON = createChatCompletion1ExistsFromJSON;
196
+ exports.createChatCompletion1RouterNinToJSON = createChatCompletion1RouterNinToJSON;
197
+ exports.createChatCompletion1RouterNinFromJSON = createChatCompletion1RouterNinFromJSON;
198
+ exports.createChatCompletion1NinToJSON = createChatCompletion1NinToJSON;
199
+ exports.createChatCompletion1NinFromJSON = createChatCompletion1NinFromJSON;
200
+ exports.createChatCompletion1RouterInToJSON = createChatCompletion1RouterInToJSON;
201
+ exports.createChatCompletion1RouterInFromJSON = createChatCompletion1RouterInFromJSON;
202
+ exports.createChatCompletion1InToJSON = createChatCompletion1InToJSON;
203
+ exports.createChatCompletion1InFromJSON = createChatCompletion1InFromJSON;
204
+ exports.createChatCompletion1LteToJSON = createChatCompletion1LteToJSON;
205
+ exports.createChatCompletion1LteFromJSON = createChatCompletion1LteFromJSON;
206
+ exports.createChatCompletion1LtToJSON = createChatCompletion1LtToJSON;
207
+ exports.createChatCompletion1LtFromJSON = createChatCompletion1LtFromJSON;
208
+ exports.createChatCompletion1GteToJSON = createChatCompletion1GteToJSON;
209
+ exports.createChatCompletion1GteFromJSON = createChatCompletion1GteFromJSON;
210
+ exports.createChatCompletion1GtToJSON = createChatCompletion1GtToJSON;
211
+ exports.createChatCompletion1GtFromJSON = createChatCompletion1GtFromJSON;
212
+ exports.createChatCompletion1RouterNeToJSON = createChatCompletion1RouterNeToJSON;
213
+ exports.createChatCompletion1RouterNeFromJSON = createChatCompletion1RouterNeFromJSON;
214
+ exports.createChatCompletion1NeToJSON = createChatCompletion1NeToJSON;
215
+ exports.createChatCompletion1NeFromJSON = createChatCompletion1NeFromJSON;
216
+ exports.createChatCompletion1RouterEqToJSON = createChatCompletion1RouterEqToJSON;
217
+ exports.createChatCompletion1RouterEqFromJSON = createChatCompletion1RouterEqFromJSON;
218
+ exports.createChatCompletion1EqToJSON = createChatCompletion1EqToJSON;
219
+ exports.createChatCompletion1EqFromJSON = createChatCompletion1EqFromJSON;
220
+ exports.createChatCompletionFilterBy1ToJSON = createChatCompletionFilterBy1ToJSON;
221
+ exports.createChatCompletionFilterBy1FromJSON = createChatCompletionFilterBy1FromJSON;
222
+ exports.createChatCompletionFilterByToJSON = createChatCompletionFilterByToJSON;
223
+ exports.createChatCompletionFilterByFromJSON = createChatCompletionFilterByFromJSON;
224
+ exports.createChatCompletionSearchOptionsToJSON = createChatCompletionSearchOptionsToJSON;
225
+ exports.createChatCompletionSearchOptionsFromJSON = createChatCompletionSearchOptionsFromJSON;
226
+ exports.createChatCompletionRerankConfigToJSON = createChatCompletionRerankConfigToJSON;
227
+ exports.createChatCompletionRerankConfigFromJSON = createChatCompletionRerankConfigFromJSON;
228
+ exports.createChatCompletionAgenticRagConfigToJSON = createChatCompletionAgenticRagConfigToJSON;
229
+ exports.createChatCompletionAgenticRagConfigFromJSON = createChatCompletionAgenticRagConfigFromJSON;
230
+ exports.createChatCompletionKnowledgeBasesToJSON = createChatCompletionKnowledgeBasesToJSON;
231
+ exports.createChatCompletionKnowledgeBasesFromJSON = createChatCompletionKnowledgeBasesFromJSON;
232
+ exports.loadBalancer1ToJSON = loadBalancer1ToJSON;
233
+ exports.loadBalancer1FromJSON = loadBalancer1FromJSON;
234
+ exports.loadBalancerToJSON = loadBalancerToJSON;
235
+ exports.loadBalancerFromJSON = loadBalancerFromJSON;
236
+ exports.timeoutToJSON = timeoutToJSON;
237
+ exports.timeoutFromJSON = timeoutFromJSON;
238
+ exports.orqToJSON = orqToJSON;
239
+ exports.orqFromJSON = orqFromJSON;
240
+ exports.createChatCompletionRequestBodyToJSON = createChatCompletionRequestBodyToJSON;
241
+ exports.createChatCompletionRequestBodyFromJSON = createChatCompletionRequestBodyFromJSON;
242
+ exports.createChatCompletionRouterTopLogprobsToJSON = createChatCompletionRouterTopLogprobsToJSON;
243
+ exports.createChatCompletionRouterTopLogprobsFromJSON = createChatCompletionRouterTopLogprobsFromJSON;
244
+ exports.createChatCompletionRouterContentToJSON = createChatCompletionRouterContentToJSON;
245
+ exports.createChatCompletionRouterContentFromJSON = createChatCompletionRouterContentFromJSON;
246
+ exports.createChatCompletionRouterResponseTopLogprobsToJSON = createChatCompletionRouterResponseTopLogprobsToJSON;
247
+ exports.createChatCompletionRouterResponseTopLogprobsFromJSON = createChatCompletionRouterResponseTopLogprobsFromJSON;
248
+ exports.createChatCompletionRefusalToJSON = createChatCompletionRefusalToJSON;
249
+ exports.createChatCompletionRefusalFromJSON = createChatCompletionRefusalFromJSON;
250
+ exports.createChatCompletionLogprobsToJSON = createChatCompletionLogprobsToJSON;
251
+ exports.createChatCompletionLogprobsFromJSON = createChatCompletionLogprobsFromJSON;
252
+ exports.createChatCompletionRouterResponseFunctionToJSON = createChatCompletionRouterResponseFunctionToJSON;
253
+ exports.createChatCompletionRouterResponseFunctionFromJSON = createChatCompletionRouterResponseFunctionFromJSON;
254
+ exports.createChatCompletionRouterToolCallsToJSON = createChatCompletionRouterToolCallsToJSON;
255
+ exports.createChatCompletionRouterToolCallsFromJSON = createChatCompletionRouterToolCallsFromJSON;
256
+ exports.createChatCompletionRouterResponseAudioToJSON = createChatCompletionRouterResponseAudioToJSON;
257
+ exports.createChatCompletionRouterResponseAudioFromJSON = createChatCompletionRouterResponseAudioFromJSON;
258
+ exports.deltaToJSON = deltaToJSON;
259
+ exports.deltaFromJSON = deltaFromJSON;
260
+ exports.createChatCompletionRouterChoicesToJSON = createChatCompletionRouterChoicesToJSON;
261
+ exports.createChatCompletionRouterChoicesFromJSON = createChatCompletionRouterChoicesFromJSON;
262
+ exports.createChatCompletionRouterPromptTokensDetailsToJSON = createChatCompletionRouterPromptTokensDetailsToJSON;
263
+ exports.createChatCompletionRouterPromptTokensDetailsFromJSON = createChatCompletionRouterPromptTokensDetailsFromJSON;
264
+ exports.createChatCompletionRouterCompletionTokensDetailsToJSON = createChatCompletionRouterCompletionTokensDetailsToJSON;
265
+ exports.createChatCompletionRouterCompletionTokensDetailsFromJSON = createChatCompletionRouterCompletionTokensDetailsFromJSON;
266
+ exports.createChatCompletionRouterUsageToJSON = createChatCompletionRouterUsageToJSON;
267
+ exports.createChatCompletionRouterUsageFromJSON = createChatCompletionRouterUsageFromJSON;
268
+ exports.createChatCompletionDataToJSON = createChatCompletionDataToJSON;
269
+ exports.createChatCompletionDataFromJSON = createChatCompletionDataFromJSON;
270
+ exports.createChatCompletionRouterResponseBodyToJSON = createChatCompletionRouterResponseBodyToJSON;
271
+ exports.createChatCompletionRouterResponseBodyFromJSON = createChatCompletionRouterResponseBodyFromJSON;
272
+ exports.createChatCompletionRouterFunctionToJSON = createChatCompletionRouterFunctionToJSON;
273
+ exports.createChatCompletionRouterFunctionFromJSON = createChatCompletionRouterFunctionFromJSON;
274
+ exports.createChatCompletionToolCallsToJSON = createChatCompletionToolCallsToJSON;
275
+ exports.createChatCompletionToolCallsFromJSON = createChatCompletionToolCallsFromJSON;
276
+ exports.createChatCompletionRouterAudioToJSON = createChatCompletionRouterAudioToJSON;
277
+ exports.createChatCompletionRouterAudioFromJSON = createChatCompletionRouterAudioFromJSON;
278
+ exports.createChatCompletionMessageToJSON = createChatCompletionMessageToJSON;
279
+ exports.createChatCompletionMessageFromJSON = createChatCompletionMessageFromJSON;
280
+ exports.topLogprobsToJSON = topLogprobsToJSON;
281
+ exports.topLogprobsFromJSON = topLogprobsFromJSON;
282
+ exports.createChatCompletionContentToJSON = createChatCompletionContentToJSON;
283
+ exports.createChatCompletionContentFromJSON = createChatCompletionContentFromJSON;
284
+ exports.createChatCompletionTopLogprobsToJSON = createChatCompletionTopLogprobsToJSON;
285
+ exports.createChatCompletionTopLogprobsFromJSON = createChatCompletionTopLogprobsFromJSON;
286
+ exports.refusalToJSON = refusalToJSON;
287
+ exports.refusalFromJSON = refusalFromJSON;
288
+ exports.logprobsToJSON = logprobsToJSON;
289
+ exports.logprobsFromJSON = logprobsFromJSON;
290
+ exports.createChatCompletionChoicesToJSON = createChatCompletionChoicesToJSON;
291
+ exports.createChatCompletionChoicesFromJSON = createChatCompletionChoicesFromJSON;
292
+ exports.createChatCompletionPromptTokensDetailsToJSON = createChatCompletionPromptTokensDetailsToJSON;
293
+ exports.createChatCompletionPromptTokensDetailsFromJSON = createChatCompletionPromptTokensDetailsFromJSON;
294
+ exports.createChatCompletionCompletionTokensDetailsToJSON = createChatCompletionCompletionTokensDetailsToJSON;
295
+ exports.createChatCompletionCompletionTokensDetailsFromJSON = createChatCompletionCompletionTokensDetailsFromJSON;
296
+ exports.createChatCompletionUsageToJSON = createChatCompletionUsageToJSON;
297
+ exports.createChatCompletionUsageFromJSON = createChatCompletionUsageFromJSON;
298
+ exports.createChatCompletionResponseBodyToJSON = createChatCompletionResponseBodyToJSON;
299
+ exports.createChatCompletionResponseBodyFromJSON = createChatCompletionResponseBodyFromJSON;
300
+ exports.createChatCompletionResponseToJSON = createChatCompletionResponseToJSON;
301
+ exports.createChatCompletionResponseFromJSON = createChatCompletionResponseFromJSON;
302
+ const z = __importStar(require("zod/v3"));
303
+ const event_streams_js_1 = require("../../lib/event-streams.js");
304
+ const primitives_js_1 = require("../../lib/primitives.js");
305
+ const schemas_js_1 = require("../../lib/schemas.js");
306
+ const components = __importStar(require("../components/index.js"));
307
+ /**
308
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
309
+ */
310
+ exports.CreateChatCompletionMessagesRouterType = {
311
+ Ephemeral: "ephemeral",
312
+ };
313
+ /**
314
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
315
+ *
316
+ * @remarks
317
+ *
318
+ * - `5m`: 5 minutes
319
+ * - `1h`: 1 hour
320
+ *
321
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
322
+ */
323
+ exports.CreateChatCompletionMessagesTtl = {
324
+ Fivem: "5m",
325
+ Oneh: "1h",
326
+ };
327
+ /**
328
+ * The type of the tool. Currently, only `function` is supported.
329
+ */
330
+ exports.CreateChatCompletionMessagesType = {
331
+ Function: "function",
332
+ };
333
+ /**
334
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
335
+ */
336
+ exports.CreateChatCompletion2RouterType = {
337
+ Ephemeral: "ephemeral",
338
+ };
339
+ /**
340
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
341
+ *
342
+ * @remarks
343
+ *
344
+ * - `5m`: 5 minutes
345
+ * - `1h`: 1 hour
346
+ *
347
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
348
+ */
349
+ exports.CreateChatCompletion2Ttl = {
350
+ Fivem: "5m",
351
+ Oneh: "1h",
352
+ };
353
+ /**
354
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
355
+ */
356
+ exports.CreateChatCompletionVoice = {
357
+ Alloy: "alloy",
358
+ Echo: "echo",
359
+ Fable: "fable",
360
+ Onyx: "onyx",
361
+ Nova: "nova",
362
+ Shimmer: "shimmer",
363
+ };
364
+ /**
365
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
366
+ */
367
+ exports.CreateChatCompletionFormat = {
368
+ Wav: "wav",
369
+ Mp3: "mp3",
370
+ Flac: "flac",
371
+ Opus: "opus",
372
+ Pcm16: "pcm16",
373
+ };
374
+ /**
375
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
376
+ *
377
+ * @remarks
378
+ *
379
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
380
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
381
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
382
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
383
+ *
384
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
385
+ */
386
+ exports.CreateChatCompletionReasoningEffort = {
387
+ None: "none",
388
+ Minimal: "minimal",
389
+ Low: "low",
390
+ Medium: "medium",
391
+ High: "high",
392
+ Xhigh: "xhigh",
393
+ };
394
+ /**
395
+ * The type of the tool. Currently, only function is supported.
396
+ */
397
+ exports.CreateChatCompletionType = {
398
+ Function: "function",
399
+ };
400
+ exports.CreateChatCompletionRouterType = {
401
+ Object: "object",
402
+ };
403
+ /**
404
+ * The type of the tool. Currently, only function is supported.
405
+ */
406
+ exports.CreateChatCompletionToolChoiceType = {
407
+ Function: "function",
408
+ };
409
+ exports.CreateChatCompletionToolChoice1 = {
410
+ None: "none",
411
+ Auto: "auto",
412
+ Required: "required",
413
+ };
414
+ exports.CreateChatCompletionModalities = {
415
+ Text: "text",
416
+ Audio: "audio",
417
+ };
418
+ /**
419
+ * The key of the guardrail.
420
+ */
421
+ exports.CreateChatCompletionId1 = {
422
+ OrqPiiDetection: "orq_pii_detection",
423
+ OrqSexualModeration: "orq_sexual_moderation",
424
+ OrqHarmfulModeration: "orq_harmful_moderation",
425
+ };
426
+ /**
427
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
428
+ */
429
+ exports.CreateChatCompletionExecuteOn = {
430
+ Input: "input",
431
+ Output: "output",
432
+ };
433
+ /**
434
+ * Version of the prompt to use (currently only "latest" supported)
435
+ */
436
+ exports.Version = {
437
+ Latest: "latest",
438
+ };
439
+ exports.CreateChatCompletionRouterRequestType = {
440
+ ExactMatch: "exact_match",
441
+ };
442
+ /**
443
+ * The type of search to perform. If not provided, will default to the knowledge base configured `retrieval_type`
444
+ */
445
+ exports.CreateChatCompletionSearchType = {
446
+ VectorSearch: "vector_search",
447
+ KeywordSearch: "keyword_search",
448
+ HybridSearch: "hybrid_search",
449
+ };
450
+ exports.LoadBalancerType = {
451
+ WeightBased: "weight_based",
452
+ };
453
+ /**
454
+ * The reason the model stopped generating tokens.
455
+ */
456
+ exports.CreateChatCompletionFinishReason = {
457
+ Stop: "stop",
458
+ Length: "length",
459
+ ToolCalls: "tool_calls",
460
+ ContentFilter: "content_filter",
461
+ FunctionCall: "function_call",
462
+ };
463
+ /**
464
+ * The type of the tool. Currently, only `function` is supported.
465
+ */
466
+ exports.CreateChatCompletionRouterResponse200Type = {
467
+ Function: "function",
468
+ };
469
+ exports.CreateChatCompletionRouterRole = {
470
+ Assistant: "assistant",
471
+ };
472
+ exports.CreateChatCompletionRouterObject = {
473
+ ChatCompletionChunk: "chat.completion.chunk",
474
+ };
475
+ /**
476
+ * The reason the model stopped generating tokens.
477
+ */
478
+ exports.FinishReason = {
479
+ Stop: "stop",
480
+ Length: "length",
481
+ ToolCalls: "tool_calls",
482
+ ContentFilter: "content_filter",
483
+ FunctionCall: "function_call",
484
+ };
485
+ exports.CreateChatCompletionRouterResponseType = {
486
+ Function: "function",
487
+ };
488
+ exports.CreateChatCompletionRole = {
489
+ Assistant: "assistant",
490
+ };
491
+ exports.CreateChatCompletionObject = {
492
+ ChatCompletion: "chat.completion",
493
+ };
494
+ /** @internal */
495
+ exports.CreateChatCompletionContentRouterRequest2$inboundSchema = components.TextContentPartSchema$inboundSchema;
496
+ /** @internal */
497
+ exports.CreateChatCompletionContentRouterRequest2$outboundSchema = components.TextContentPartSchema$outboundSchema;
498
+ function createChatCompletionContentRouterRequest2ToJSON(createChatCompletionContentRouterRequest2) {
499
+ return JSON.stringify(exports.CreateChatCompletionContentRouterRequest2$outboundSchema.parse(createChatCompletionContentRouterRequest2));
500
+ }
501
+ function createChatCompletionContentRouterRequest2FromJSON(jsonString) {
502
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionContentRouterRequest2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionContentRouterRequest2' from JSON`);
503
+ }
504
+ /** @internal */
505
+ exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$inboundSchema = z.union([
506
+ z.string(),
507
+ z.array(components.TextContentPartSchema$inboundSchema),
508
+ ]);
509
+ /** @internal */
510
+ exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$outboundSchema = z.union([
511
+ z.string(),
512
+ z.array(components.TextContentPartSchema$outboundSchema),
513
+ ]);
514
+ function createChatCompletionMessagesRouterRequestRequestBody5ContentToJSON(createChatCompletionMessagesRouterRequestRequestBody5Content) {
515
+ return JSON.stringify(exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$outboundSchema
516
+ .parse(createChatCompletionMessagesRouterRequestRequestBody5Content));
517
+ }
518
+ function createChatCompletionMessagesRouterRequestRequestBody5ContentFromJSON(jsonString) {
519
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesRouterRequestRequestBody5Content$inboundSchema
520
+ .parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesRouterRequestRequestBody5Content' from JSON`);
521
+ }
522
+ /** @internal */
523
+ exports.CreateChatCompletionMessagesRouterType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionMessagesRouterType);
524
+ /** @internal */
525
+ exports.CreateChatCompletionMessagesRouterType$outboundSchema = exports.CreateChatCompletionMessagesRouterType$inboundSchema;
526
+ /** @internal */
527
+ exports.CreateChatCompletionMessagesTtl$inboundSchema = z.nativeEnum(exports.CreateChatCompletionMessagesTtl);
528
+ /** @internal */
529
+ exports.CreateChatCompletionMessagesTtl$outboundSchema = exports.CreateChatCompletionMessagesTtl$inboundSchema;
530
+ /** @internal */
531
+ exports.CreateChatCompletionMessagesCacheControl$inboundSchema = z.object({
532
+ type: exports.CreateChatCompletionMessagesRouterType$inboundSchema,
533
+ ttl: exports.CreateChatCompletionMessagesTtl$inboundSchema.default("5m"),
534
+ });
535
+ /** @internal */
536
+ exports.CreateChatCompletionMessagesCacheControl$outboundSchema = z.object({
537
+ type: exports.CreateChatCompletionMessagesRouterType$outboundSchema,
538
+ ttl: exports.CreateChatCompletionMessagesTtl$outboundSchema.default("5m"),
539
+ });
540
+ function createChatCompletionMessagesCacheControlToJSON(createChatCompletionMessagesCacheControl) {
541
+ return JSON.stringify(exports.CreateChatCompletionMessagesCacheControl$outboundSchema.parse(createChatCompletionMessagesCacheControl));
542
+ }
543
+ function createChatCompletionMessagesCacheControlFromJSON(jsonString) {
544
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesCacheControl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesCacheControl' from JSON`);
545
+ }
546
+ /** @internal */
547
+ exports.CreateChatCompletionMessagesToolMessage$inboundSchema = z.object({
548
+ role: z.literal("tool"),
549
+ content: z.union([
550
+ z.string(),
551
+ z.array(components.TextContentPartSchema$inboundSchema),
552
+ ]),
553
+ tool_call_id: z.nullable(z.string()),
554
+ cache_control: z.lazy(() => exports.CreateChatCompletionMessagesCacheControl$inboundSchema).optional(),
555
+ }).transform((v) => {
556
+ return (0, primitives_js_1.remap)(v, {
557
+ "tool_call_id": "toolCallId",
558
+ "cache_control": "cacheControl",
559
+ });
560
+ });
561
+ /** @internal */
562
+ exports.CreateChatCompletionMessagesToolMessage$outboundSchema = z.object({
563
+ role: z.literal("tool"),
564
+ content: z.union([
565
+ z.string(),
566
+ z.array(components.TextContentPartSchema$outboundSchema),
567
+ ]),
568
+ toolCallId: z.nullable(z.string()),
569
+ cacheControl: z.lazy(() => exports.CreateChatCompletionMessagesCacheControl$outboundSchema).optional(),
570
+ }).transform((v) => {
571
+ return (0, primitives_js_1.remap)(v, {
572
+ toolCallId: "tool_call_id",
573
+ cacheControl: "cache_control",
574
+ });
575
+ });
576
+ function createChatCompletionMessagesToolMessageToJSON(createChatCompletionMessagesToolMessage) {
577
+ return JSON.stringify(exports.CreateChatCompletionMessagesToolMessage$outboundSchema.parse(createChatCompletionMessagesToolMessage));
578
+ }
579
+ function createChatCompletionMessagesToolMessageFromJSON(jsonString) {
580
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesToolMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesToolMessage' from JSON`);
581
+ }
582
+ /** @internal */
583
+ exports.CreateChatCompletionContentRouter2$inboundSchema = z.union([
584
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
585
+ components.RefusalPartSchema$inboundSchema,
586
+ components.ReasoningPartSchema$inboundSchema,
587
+ components.RedactedReasoningPartSchema$inboundSchema,
588
+ ]);
589
+ /** @internal */
590
+ exports.CreateChatCompletionContentRouter2$outboundSchema = z.union([
591
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
592
+ components.RefusalPartSchema$outboundSchema,
593
+ components.ReasoningPartSchema$outboundSchema,
594
+ components.RedactedReasoningPartSchema$outboundSchema,
595
+ ]);
596
+ function createChatCompletionContentRouter2ToJSON(createChatCompletionContentRouter2) {
597
+ return JSON.stringify(exports.CreateChatCompletionContentRouter2$outboundSchema.parse(createChatCompletionContentRouter2));
598
+ }
599
+ function createChatCompletionContentRouter2FromJSON(jsonString) {
600
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionContentRouter2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionContentRouter2' from JSON`);
601
+ }
602
+ /** @internal */
603
+ exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$inboundSchema = z.union([
604
+ z.string(),
605
+ z.array(z.union([
606
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
607
+ components.RefusalPartSchema$inboundSchema,
608
+ components.ReasoningPartSchema$inboundSchema,
609
+ components.RedactedReasoningPartSchema$inboundSchema,
610
+ ])),
611
+ ]);
612
+ /** @internal */
613
+ exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$outboundSchema = z.union([
614
+ z.string(),
615
+ z.array(z.union([
616
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
617
+ components.RefusalPartSchema$outboundSchema,
618
+ components.ReasoningPartSchema$outboundSchema,
619
+ components.RedactedReasoningPartSchema$outboundSchema,
620
+ ])),
621
+ ]);
622
+ function createChatCompletionMessagesRouterRequestRequestBodyContentToJSON(createChatCompletionMessagesRouterRequestRequestBodyContent) {
623
+ return JSON.stringify(exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$outboundSchema
624
+ .parse(createChatCompletionMessagesRouterRequestRequestBodyContent));
625
+ }
626
+ function createChatCompletionMessagesRouterRequestRequestBodyContentFromJSON(jsonString) {
627
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesRouterRequestRequestBodyContent$inboundSchema
628
+ .parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesRouterRequestRequestBodyContent' from JSON`);
629
+ }
630
+ /** @internal */
631
+ exports.CreateChatCompletionMessagesAudio$inboundSchema = z.object({
632
+ id: z.string(),
633
+ });
634
+ /** @internal */
635
+ exports.CreateChatCompletionMessagesAudio$outboundSchema = z.object({
636
+ id: z.string(),
637
+ });
638
+ function createChatCompletionMessagesAudioToJSON(createChatCompletionMessagesAudio) {
639
+ return JSON.stringify(exports.CreateChatCompletionMessagesAudio$outboundSchema.parse(createChatCompletionMessagesAudio));
640
+ }
641
+ function createChatCompletionMessagesAudioFromJSON(jsonString) {
642
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesAudio' from JSON`);
643
+ }
644
+ /** @internal */
645
+ exports.CreateChatCompletionMessagesType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionMessagesType);
646
+ /** @internal */
647
+ exports.CreateChatCompletionMessagesType$outboundSchema = exports.CreateChatCompletionMessagesType$inboundSchema;
648
+ /** @internal */
649
+ exports.CreateChatCompletionMessagesFunction$inboundSchema = z.object({
650
+ name: z.string().optional(),
651
+ arguments: z.string().optional(),
652
+ });
653
+ /** @internal */
654
+ exports.CreateChatCompletionMessagesFunction$outboundSchema = z.object({
655
+ name: z.string().optional(),
656
+ arguments: z.string().optional(),
657
+ });
658
+ function createChatCompletionMessagesFunctionToJSON(createChatCompletionMessagesFunction) {
659
+ return JSON.stringify(exports.CreateChatCompletionMessagesFunction$outboundSchema.parse(createChatCompletionMessagesFunction));
660
+ }
661
+ function createChatCompletionMessagesFunctionFromJSON(jsonString) {
662
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesFunction' from JSON`);
663
+ }
664
+ /** @internal */
665
+ exports.CreateChatCompletionMessagesToolCalls$inboundSchema = z.object({
666
+ id: z.string(),
667
+ type: exports.CreateChatCompletionMessagesType$inboundSchema,
668
+ function: z.lazy(() => exports.CreateChatCompletionMessagesFunction$inboundSchema),
669
+ thought_signature: z.string().optional(),
670
+ }).transform((v) => {
671
+ return (0, primitives_js_1.remap)(v, {
672
+ "thought_signature": "thoughtSignature",
673
+ });
674
+ });
675
+ /** @internal */
676
+ exports.CreateChatCompletionMessagesToolCalls$outboundSchema = z.object({
677
+ id: z.string(),
678
+ type: exports.CreateChatCompletionMessagesType$outboundSchema,
679
+ function: z.lazy(() => exports.CreateChatCompletionMessagesFunction$outboundSchema),
680
+ thoughtSignature: z.string().optional(),
681
+ }).transform((v) => {
682
+ return (0, primitives_js_1.remap)(v, {
683
+ thoughtSignature: "thought_signature",
684
+ });
685
+ });
686
+ function createChatCompletionMessagesToolCallsToJSON(createChatCompletionMessagesToolCalls) {
687
+ return JSON.stringify(exports.CreateChatCompletionMessagesToolCalls$outboundSchema.parse(createChatCompletionMessagesToolCalls));
688
+ }
689
+ function createChatCompletionMessagesToolCallsFromJSON(jsonString) {
690
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesToolCalls$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesToolCalls' from JSON`);
691
+ }
692
+ /** @internal */
693
+ exports.CreateChatCompletionMessagesAssistantMessage$inboundSchema = z.object({
694
+ content: z.nullable(z.union([
695
+ z.string(),
696
+ z.array(z.union([
697
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
698
+ components.RefusalPartSchema$inboundSchema,
699
+ components.ReasoningPartSchema$inboundSchema,
700
+ components.RedactedReasoningPartSchema$inboundSchema,
701
+ ])),
702
+ ])).optional(),
703
+ refusal: z.nullable(z.string()).optional(),
704
+ role: z.literal("assistant"),
705
+ name: z.string().optional(),
706
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionMessagesAudio$inboundSchema)).optional(),
707
+ tool_calls: z.array(z.lazy(() => exports.CreateChatCompletionMessagesToolCalls$inboundSchema)).optional(),
708
+ }).transform((v) => {
709
+ return (0, primitives_js_1.remap)(v, {
710
+ "tool_calls": "toolCalls",
711
+ });
712
+ });
713
+ /** @internal */
714
+ exports.CreateChatCompletionMessagesAssistantMessage$outboundSchema = z.object({
715
+ content: z.nullable(z.union([
716
+ z.string(),
717
+ z.array(z.union([
718
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
719
+ components.RefusalPartSchema$outboundSchema,
720
+ components.ReasoningPartSchema$outboundSchema,
721
+ components.RedactedReasoningPartSchema$outboundSchema,
722
+ ])),
723
+ ])).optional(),
724
+ refusal: z.nullable(z.string()).optional(),
725
+ role: z.literal("assistant"),
726
+ name: z.string().optional(),
727
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionMessagesAudio$outboundSchema)).optional(),
728
+ toolCalls: z.array(z.lazy(() => exports.CreateChatCompletionMessagesToolCalls$outboundSchema)).optional(),
729
+ }).transform((v) => {
730
+ return (0, primitives_js_1.remap)(v, {
731
+ toolCalls: "tool_calls",
732
+ });
733
+ });
734
+ function createChatCompletionMessagesAssistantMessageToJSON(createChatCompletionMessagesAssistantMessage) {
735
+ return JSON.stringify(exports.CreateChatCompletionMessagesAssistantMessage$outboundSchema.parse(createChatCompletionMessagesAssistantMessage));
736
+ }
737
+ function createChatCompletionMessagesAssistantMessageFromJSON(jsonString) {
738
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesAssistantMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesAssistantMessage' from JSON`);
739
+ }
740
+ /** @internal */
741
+ exports.CreateChatCompletion2RouterType$inboundSchema = z.nativeEnum(exports.CreateChatCompletion2RouterType);
742
+ /** @internal */
743
+ exports.CreateChatCompletion2RouterType$outboundSchema = exports.CreateChatCompletion2RouterType$inboundSchema;
744
+ /** @internal */
745
+ exports.CreateChatCompletion2Ttl$inboundSchema = z.nativeEnum(exports.CreateChatCompletion2Ttl);
746
+ /** @internal */
747
+ exports.CreateChatCompletion2Ttl$outboundSchema = exports.CreateChatCompletion2Ttl$inboundSchema;
748
+ /** @internal */
749
+ exports.CreateChatCompletion2CacheControl$inboundSchema = z.object({
750
+ type: exports.CreateChatCompletion2RouterType$inboundSchema,
751
+ ttl: exports.CreateChatCompletion2Ttl$inboundSchema.default("5m"),
752
+ });
753
+ /** @internal */
754
+ exports.CreateChatCompletion2CacheControl$outboundSchema = z.object({
755
+ type: exports.CreateChatCompletion2RouterType$outboundSchema,
756
+ ttl: exports.CreateChatCompletion2Ttl$outboundSchema.default("5m"),
757
+ });
758
+ function createChatCompletion2CacheControlToJSON(createChatCompletion2CacheControl) {
759
+ return JSON.stringify(exports.CreateChatCompletion2CacheControl$outboundSchema.parse(createChatCompletion2CacheControl));
760
+ }
761
+ function createChatCompletion2CacheControlFromJSON(jsonString) {
762
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion2CacheControl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion2CacheControl' from JSON`);
763
+ }
764
+ /** @internal */
765
+ exports.CreateChatCompletion24$inboundSchema = z.object({
766
+ type: z.literal("file"),
767
+ cache_control: z.lazy(() => exports.CreateChatCompletion2CacheControl$inboundSchema)
768
+ .optional(),
769
+ file: components.FileContentPartSchema$inboundSchema,
770
+ }).transform((v) => {
771
+ return (0, primitives_js_1.remap)(v, {
772
+ "cache_control": "cacheControl",
773
+ });
774
+ });
775
+ /** @internal */
776
+ exports.CreateChatCompletion24$outboundSchema = z.object({
777
+ type: z.literal("file"),
778
+ cacheControl: z.lazy(() => exports.CreateChatCompletion2CacheControl$outboundSchema)
779
+ .optional(),
780
+ file: components.FileContentPartSchema$outboundSchema,
781
+ }).transform((v) => {
782
+ return (0, primitives_js_1.remap)(v, {
783
+ cacheControl: "cache_control",
784
+ });
785
+ });
786
+ function createChatCompletion24ToJSON(createChatCompletion24) {
787
+ return JSON.stringify(exports.CreateChatCompletion24$outboundSchema.parse(createChatCompletion24));
788
+ }
789
+ function createChatCompletion24FromJSON(jsonString) {
790
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion24$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion24' from JSON`);
791
+ }
792
+ /** @internal */
793
+ exports.CreateChatCompletionContent2$inboundSchema = z.union([
794
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
795
+ components.ImageContentPartSchema$inboundSchema,
796
+ components.AudioContentPartSchema$inboundSchema,
797
+ z.lazy(() => exports.CreateChatCompletion24$inboundSchema),
798
+ ]);
799
+ /** @internal */
800
+ exports.CreateChatCompletionContent2$outboundSchema = z.union([
801
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
802
+ components.ImageContentPartSchema$outboundSchema,
803
+ components.AudioContentPartSchema$outboundSchema,
804
+ z.lazy(() => exports.CreateChatCompletion24$outboundSchema),
805
+ ]);
806
+ function createChatCompletionContent2ToJSON(createChatCompletionContent2) {
807
+ return JSON.stringify(exports.CreateChatCompletionContent2$outboundSchema.parse(createChatCompletionContent2));
808
+ }
809
+ function createChatCompletionContent2FromJSON(jsonString) {
810
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionContent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionContent2' from JSON`);
811
+ }
812
+ /** @internal */
813
+ exports.CreateChatCompletionMessagesRouterRequestContent$inboundSchema = z.union([
814
+ z.string(),
815
+ z.array(z.union([
816
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
817
+ components.ImageContentPartSchema$inboundSchema,
818
+ components.AudioContentPartSchema$inboundSchema,
819
+ z.lazy(() => exports.CreateChatCompletion24$inboundSchema),
820
+ ])),
821
+ ]);
822
+ /** @internal */
823
+ exports.CreateChatCompletionMessagesRouterRequestContent$outboundSchema = z.union([
824
+ z.string(),
825
+ z.array(z.union([
826
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
827
+ components.ImageContentPartSchema$outboundSchema,
828
+ components.AudioContentPartSchema$outboundSchema,
829
+ z.lazy(() => exports.CreateChatCompletion24$outboundSchema),
830
+ ])),
831
+ ]);
832
+ function createChatCompletionMessagesRouterRequestContentToJSON(createChatCompletionMessagesRouterRequestContent) {
833
+ return JSON.stringify(exports.CreateChatCompletionMessagesRouterRequestContent$outboundSchema.parse(createChatCompletionMessagesRouterRequestContent));
834
+ }
835
+ function createChatCompletionMessagesRouterRequestContentFromJSON(jsonString) {
836
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesRouterRequestContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesRouterRequestContent' from JSON`);
837
+ }
838
+ /** @internal */
839
+ exports.CreateChatCompletionMessagesUserMessage$inboundSchema = z.object({
840
+ role: z.literal("user"),
841
+ name: z.string().optional(),
842
+ content: z.union([
843
+ z.string(),
844
+ z.array(z.union([
845
+ components.TextContentPartSchema$inboundSchema.and(z.object({ type: z.literal("text") })),
846
+ components.ImageContentPartSchema$inboundSchema,
847
+ components.AudioContentPartSchema$inboundSchema,
848
+ z.lazy(() => exports.CreateChatCompletion24$inboundSchema),
849
+ ])),
850
+ ]),
851
+ });
852
+ /** @internal */
853
+ exports.CreateChatCompletionMessagesUserMessage$outboundSchema = z.object({
854
+ role: z.literal("user"),
855
+ name: z.string().optional(),
856
+ content: z.union([
857
+ z.string(),
858
+ z.array(z.union([
859
+ components.TextContentPartSchema$outboundSchema.and(z.object({ type: z.literal("text") })),
860
+ components.ImageContentPartSchema$outboundSchema,
861
+ components.AudioContentPartSchema$outboundSchema,
862
+ z.lazy(() => exports.CreateChatCompletion24$outboundSchema),
863
+ ])),
864
+ ]),
865
+ });
866
+ function createChatCompletionMessagesUserMessageToJSON(createChatCompletionMessagesUserMessage) {
867
+ return JSON.stringify(exports.CreateChatCompletionMessagesUserMessage$outboundSchema.parse(createChatCompletionMessagesUserMessage));
868
+ }
869
+ function createChatCompletionMessagesUserMessageFromJSON(jsonString) {
870
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesUserMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesUserMessage' from JSON`);
871
+ }
872
+ /** @internal */
873
+ exports.CreateChatCompletionMessagesRouterContent$inboundSchema = z.union([
874
+ z.string(),
875
+ z.array(components.TextContentPartSchema$inboundSchema),
876
+ ]);
877
+ /** @internal */
878
+ exports.CreateChatCompletionMessagesRouterContent$outboundSchema = z.union([
879
+ z.string(),
880
+ z.array(components.TextContentPartSchema$outboundSchema),
881
+ ]);
882
+ function createChatCompletionMessagesRouterContentToJSON(createChatCompletionMessagesRouterContent) {
883
+ return JSON.stringify(exports.CreateChatCompletionMessagesRouterContent$outboundSchema.parse(createChatCompletionMessagesRouterContent));
884
+ }
885
+ function createChatCompletionMessagesRouterContentFromJSON(jsonString) {
886
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesRouterContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesRouterContent' from JSON`);
887
+ }
888
+ /** @internal */
889
+ exports.CreateChatCompletionMessagesDeveloperMessage$inboundSchema = z.object({
890
+ role: z.literal("developer"),
891
+ content: z.union([
892
+ z.string(),
893
+ z.array(components.TextContentPartSchema$inboundSchema),
894
+ ]),
895
+ name: z.string().optional(),
896
+ });
897
+ /** @internal */
898
+ exports.CreateChatCompletionMessagesDeveloperMessage$outboundSchema = z.object({
899
+ role: z.literal("developer"),
900
+ content: z.union([
901
+ z.string(),
902
+ z.array(components.TextContentPartSchema$outboundSchema),
903
+ ]),
904
+ name: z.string().optional(),
905
+ });
906
+ function createChatCompletionMessagesDeveloperMessageToJSON(createChatCompletionMessagesDeveloperMessage) {
907
+ return JSON.stringify(exports.CreateChatCompletionMessagesDeveloperMessage$outboundSchema.parse(createChatCompletionMessagesDeveloperMessage));
908
+ }
909
+ function createChatCompletionMessagesDeveloperMessageFromJSON(jsonString) {
910
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesDeveloperMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesDeveloperMessage' from JSON`);
911
+ }
912
+ /** @internal */
913
+ exports.CreateChatCompletionMessagesContent$inboundSchema = z.union([
914
+ z.string(),
915
+ z.array(components.TextContentPartSchema$inboundSchema),
916
+ ]);
917
+ /** @internal */
918
+ exports.CreateChatCompletionMessagesContent$outboundSchema = z.union([
919
+ z.string(),
920
+ z.array(components.TextContentPartSchema$outboundSchema),
921
+ ]);
922
+ function createChatCompletionMessagesContentToJSON(createChatCompletionMessagesContent) {
923
+ return JSON.stringify(exports.CreateChatCompletionMessagesContent$outboundSchema.parse(createChatCompletionMessagesContent));
924
+ }
925
+ function createChatCompletionMessagesContentFromJSON(jsonString) {
926
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesContent' from JSON`);
927
+ }
928
+ /** @internal */
929
+ exports.CreateChatCompletionMessagesSystemMessage$inboundSchema = z.object({
930
+ role: z.literal("system"),
931
+ content: z.union([
932
+ z.string(),
933
+ z.array(components.TextContentPartSchema$inboundSchema),
934
+ ]),
935
+ name: z.string().optional(),
936
+ });
937
+ /** @internal */
938
+ exports.CreateChatCompletionMessagesSystemMessage$outboundSchema = z.object({
939
+ role: z.literal("system"),
940
+ content: z.union([
941
+ z.string(),
942
+ z.array(components.TextContentPartSchema$outboundSchema),
943
+ ]),
944
+ name: z.string().optional(),
945
+ });
946
+ function createChatCompletionMessagesSystemMessageToJSON(createChatCompletionMessagesSystemMessage) {
947
+ return JSON.stringify(exports.CreateChatCompletionMessagesSystemMessage$outboundSchema.parse(createChatCompletionMessagesSystemMessage));
948
+ }
949
+ function createChatCompletionMessagesSystemMessageFromJSON(jsonString) {
950
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessagesSystemMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessagesSystemMessage' from JSON`);
951
+ }
952
+ /** @internal */
953
+ exports.CreateChatCompletionMessages$inboundSchema = z.union([
954
+ z.lazy(() => exports.CreateChatCompletionMessagesSystemMessage$inboundSchema),
955
+ z.lazy(() => exports.CreateChatCompletionMessagesDeveloperMessage$inboundSchema),
956
+ z.lazy(() => exports.CreateChatCompletionMessagesUserMessage$inboundSchema),
957
+ z.lazy(() => exports.CreateChatCompletionMessagesAssistantMessage$inboundSchema),
958
+ z.lazy(() => exports.CreateChatCompletionMessagesToolMessage$inboundSchema),
959
+ ]);
960
+ /** @internal */
961
+ exports.CreateChatCompletionMessages$outboundSchema = z.union([
962
+ z.lazy(() => exports.CreateChatCompletionMessagesSystemMessage$outboundSchema),
963
+ z.lazy(() => exports.CreateChatCompletionMessagesDeveloperMessage$outboundSchema),
964
+ z.lazy(() => exports.CreateChatCompletionMessagesUserMessage$outboundSchema),
965
+ z.lazy(() => exports.CreateChatCompletionMessagesAssistantMessage$outboundSchema),
966
+ z.lazy(() => exports.CreateChatCompletionMessagesToolMessage$outboundSchema),
967
+ ]);
968
+ function createChatCompletionMessagesToJSON(createChatCompletionMessages) {
969
+ return JSON.stringify(exports.CreateChatCompletionMessages$outboundSchema.parse(createChatCompletionMessages));
970
+ }
971
+ function createChatCompletionMessagesFromJSON(jsonString) {
972
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessages' from JSON`);
973
+ }
974
+ /** @internal */
975
+ exports.CreateChatCompletionVoice$inboundSchema = z.nativeEnum(exports.CreateChatCompletionVoice);
976
+ /** @internal */
977
+ exports.CreateChatCompletionVoice$outboundSchema = exports.CreateChatCompletionVoice$inboundSchema;
978
+ /** @internal */
979
+ exports.CreateChatCompletionFormat$inboundSchema = z.nativeEnum(exports.CreateChatCompletionFormat);
980
+ /** @internal */
981
+ exports.CreateChatCompletionFormat$outboundSchema = exports.CreateChatCompletionFormat$inboundSchema;
982
+ /** @internal */
983
+ exports.CreateChatCompletionAudio$inboundSchema = z.object({
984
+ voice: exports.CreateChatCompletionVoice$inboundSchema,
985
+ format: exports.CreateChatCompletionFormat$inboundSchema,
986
+ });
987
+ /** @internal */
988
+ exports.CreateChatCompletionAudio$outboundSchema = z.object({
989
+ voice: exports.CreateChatCompletionVoice$outboundSchema,
990
+ format: exports.CreateChatCompletionFormat$outboundSchema,
991
+ });
992
+ function createChatCompletionAudioToJSON(createChatCompletionAudio) {
993
+ return JSON.stringify(exports.CreateChatCompletionAudio$outboundSchema.parse(createChatCompletionAudio));
994
+ }
995
+ function createChatCompletionAudioFromJSON(jsonString) {
996
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAudio' from JSON`);
997
+ }
998
+ /** @internal */
999
+ exports.CreateChatCompletionResponseFormatRouterJsonSchema$inboundSchema = z.object({
1000
+ description: z.string().optional(),
1001
+ name: z.string(),
1002
+ schema: z.any().optional(),
1003
+ strict: z.boolean().default(false),
1004
+ });
1005
+ /** @internal */
1006
+ exports.CreateChatCompletionResponseFormatRouterJsonSchema$outboundSchema = z.object({
1007
+ description: z.string().optional(),
1008
+ name: z.string(),
1009
+ schema: z.any().optional(),
1010
+ strict: z.boolean().default(false),
1011
+ });
1012
+ function createChatCompletionResponseFormatRouterJsonSchemaToJSON(createChatCompletionResponseFormatRouterJsonSchema) {
1013
+ return JSON.stringify(exports.CreateChatCompletionResponseFormatRouterJsonSchema$outboundSchema.parse(createChatCompletionResponseFormatRouterJsonSchema));
1014
+ }
1015
+ function createChatCompletionResponseFormatRouterJsonSchemaFromJSON(jsonString) {
1016
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseFormatRouterJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseFormatRouterJsonSchema' from JSON`);
1017
+ }
1018
+ /** @internal */
1019
+ exports.CreateChatCompletionResponseFormatJSONSchema$inboundSchema = z.object({
1020
+ type: z.literal("json_schema"),
1021
+ json_schema: z.lazy(() => exports.CreateChatCompletionResponseFormatRouterJsonSchema$inboundSchema),
1022
+ }).transform((v) => {
1023
+ return (0, primitives_js_1.remap)(v, {
1024
+ "json_schema": "jsonSchema",
1025
+ });
1026
+ });
1027
+ /** @internal */
1028
+ exports.CreateChatCompletionResponseFormatJSONSchema$outboundSchema = z.object({
1029
+ type: z.literal("json_schema"),
1030
+ jsonSchema: z.lazy(() => exports.CreateChatCompletionResponseFormatRouterJsonSchema$outboundSchema),
1031
+ }).transform((v) => {
1032
+ return (0, primitives_js_1.remap)(v, {
1033
+ jsonSchema: "json_schema",
1034
+ });
1035
+ });
1036
+ function createChatCompletionResponseFormatJSONSchemaToJSON(createChatCompletionResponseFormatJSONSchema) {
1037
+ return JSON.stringify(exports.CreateChatCompletionResponseFormatJSONSchema$outboundSchema.parse(createChatCompletionResponseFormatJSONSchema));
1038
+ }
1039
+ function createChatCompletionResponseFormatJSONSchemaFromJSON(jsonString) {
1040
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseFormatJSONSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseFormatJSONSchema' from JSON`);
1041
+ }
1042
+ /** @internal */
1043
+ exports.CreateChatCompletionResponseFormatJSONObject$inboundSchema = z.object({
1044
+ type: z.literal("json_object"),
1045
+ });
1046
+ /** @internal */
1047
+ exports.CreateChatCompletionResponseFormatJSONObject$outboundSchema = z.object({
1048
+ type: z.literal("json_object"),
1049
+ });
1050
+ function createChatCompletionResponseFormatJSONObjectToJSON(createChatCompletionResponseFormatJSONObject) {
1051
+ return JSON.stringify(exports.CreateChatCompletionResponseFormatJSONObject$outboundSchema.parse(createChatCompletionResponseFormatJSONObject));
1052
+ }
1053
+ function createChatCompletionResponseFormatJSONObjectFromJSON(jsonString) {
1054
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseFormatJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseFormatJSONObject' from JSON`);
1055
+ }
1056
+ /** @internal */
1057
+ exports.CreateChatCompletionResponseFormatText$inboundSchema = z.object({
1058
+ type: z.literal("text"),
1059
+ });
1060
+ /** @internal */
1061
+ exports.CreateChatCompletionResponseFormatText$outboundSchema = z.object({
1062
+ type: z.literal("text"),
1063
+ });
1064
+ function createChatCompletionResponseFormatTextToJSON(createChatCompletionResponseFormatText) {
1065
+ return JSON.stringify(exports.CreateChatCompletionResponseFormatText$outboundSchema.parse(createChatCompletionResponseFormatText));
1066
+ }
1067
+ function createChatCompletionResponseFormatTextFromJSON(jsonString) {
1068
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseFormatText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseFormatText' from JSON`);
1069
+ }
1070
+ /** @internal */
1071
+ exports.CreateChatCompletionResponseFormat$inboundSchema = z.union([
1072
+ z.lazy(() => exports.CreateChatCompletionResponseFormatText$inboundSchema),
1073
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONObject$inboundSchema),
1074
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONSchema$inboundSchema),
1075
+ ]);
1076
+ /** @internal */
1077
+ exports.CreateChatCompletionResponseFormat$outboundSchema = z.union([
1078
+ z.lazy(() => exports.CreateChatCompletionResponseFormatText$outboundSchema),
1079
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONObject$outboundSchema),
1080
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONSchema$outboundSchema),
1081
+ ]);
1082
+ function createChatCompletionResponseFormatToJSON(createChatCompletionResponseFormat) {
1083
+ return JSON.stringify(exports.CreateChatCompletionResponseFormat$outboundSchema.parse(createChatCompletionResponseFormat));
1084
+ }
1085
+ function createChatCompletionResponseFormatFromJSON(jsonString) {
1086
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseFormat$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseFormat' from JSON`);
1087
+ }
1088
+ /** @internal */
1089
+ exports.CreateChatCompletionReasoningEffort$inboundSchema = z.nativeEnum(exports.CreateChatCompletionReasoningEffort);
1090
+ /** @internal */
1091
+ exports.CreateChatCompletionReasoningEffort$outboundSchema = exports.CreateChatCompletionReasoningEffort$inboundSchema;
1092
+ /** @internal */
1093
+ exports.CreateChatCompletionStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
1094
+ /** @internal */
1095
+ exports.CreateChatCompletionStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
1096
+ function createChatCompletionStopToJSON(createChatCompletionStop) {
1097
+ return JSON.stringify(exports.CreateChatCompletionStop$outboundSchema.parse(createChatCompletionStop));
1098
+ }
1099
+ function createChatCompletionStopFromJSON(jsonString) {
1100
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionStop' from JSON`);
1101
+ }
1102
+ /** @internal */
1103
+ exports.CreateChatCompletionStreamOptions$inboundSchema = z.object({
1104
+ include_usage: z.boolean().optional(),
1105
+ }).transform((v) => {
1106
+ return (0, primitives_js_1.remap)(v, {
1107
+ "include_usage": "includeUsage",
1108
+ });
1109
+ });
1110
+ /** @internal */
1111
+ exports.CreateChatCompletionStreamOptions$outboundSchema = z.object({
1112
+ includeUsage: z.boolean().optional(),
1113
+ }).transform((v) => {
1114
+ return (0, primitives_js_1.remap)(v, {
1115
+ includeUsage: "include_usage",
1116
+ });
1117
+ });
1118
+ function createChatCompletionStreamOptionsToJSON(createChatCompletionStreamOptions) {
1119
+ return JSON.stringify(exports.CreateChatCompletionStreamOptions$outboundSchema.parse(createChatCompletionStreamOptions));
1120
+ }
1121
+ function createChatCompletionStreamOptionsFromJSON(jsonString) {
1122
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionStreamOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionStreamOptions' from JSON`);
1123
+ }
1124
+ /** @internal */
1125
+ exports.CreateChatCompletionThinking$inboundSchema = z.union([
1126
+ components.ThinkingConfigDisabledSchema$inboundSchema,
1127
+ components.ThinkingConfigEnabledSchema$inboundSchema,
1128
+ ]);
1129
+ /** @internal */
1130
+ exports.CreateChatCompletionThinking$outboundSchema = z.union([
1131
+ components.ThinkingConfigDisabledSchema$outboundSchema,
1132
+ components.ThinkingConfigEnabledSchema$outboundSchema,
1133
+ ]);
1134
+ function createChatCompletionThinkingToJSON(createChatCompletionThinking) {
1135
+ return JSON.stringify(exports.CreateChatCompletionThinking$outboundSchema.parse(createChatCompletionThinking));
1136
+ }
1137
+ function createChatCompletionThinkingFromJSON(jsonString) {
1138
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionThinking$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionThinking' from JSON`);
1139
+ }
1140
+ /** @internal */
1141
+ exports.CreateChatCompletionType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionType);
1142
+ /** @internal */
1143
+ exports.CreateChatCompletionType$outboundSchema = exports.CreateChatCompletionType$inboundSchema;
1144
+ /** @internal */
1145
+ exports.CreateChatCompletionRouterType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRouterType);
1146
+ /** @internal */
1147
+ exports.CreateChatCompletionRouterType$outboundSchema = exports.CreateChatCompletionRouterType$inboundSchema;
1148
+ /** @internal */
1149
+ exports.CreateChatCompletionParameters$inboundSchema = z.object({
1150
+ type: exports.CreateChatCompletionRouterType$inboundSchema,
1151
+ properties: z.record(z.any()),
1152
+ required: z.array(z.string()).optional(),
1153
+ additionalProperties: z.boolean().optional(),
1154
+ });
1155
+ /** @internal */
1156
+ exports.CreateChatCompletionParameters$outboundSchema = z.object({
1157
+ type: exports.CreateChatCompletionRouterType$outboundSchema,
1158
+ properties: z.record(z.any()),
1159
+ required: z.array(z.string()).optional(),
1160
+ additionalProperties: z.boolean().optional(),
1161
+ });
1162
+ function createChatCompletionParametersToJSON(createChatCompletionParameters) {
1163
+ return JSON.stringify(exports.CreateChatCompletionParameters$outboundSchema.parse(createChatCompletionParameters));
1164
+ }
1165
+ function createChatCompletionParametersFromJSON(jsonString) {
1166
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionParameters' from JSON`);
1167
+ }
1168
+ /** @internal */
1169
+ exports.CreateChatCompletionFunction$inboundSchema = z.object({
1170
+ name: z.string(),
1171
+ description: z.string().optional(),
1172
+ parameters: z.lazy(() => exports.CreateChatCompletionParameters$inboundSchema)
1173
+ .optional(),
1174
+ strict: z.boolean().optional(),
1175
+ });
1176
+ /** @internal */
1177
+ exports.CreateChatCompletionFunction$outboundSchema = z.object({
1178
+ name: z.string(),
1179
+ description: z.string().optional(),
1180
+ parameters: z.lazy(() => exports.CreateChatCompletionParameters$outboundSchema)
1181
+ .optional(),
1182
+ strict: z.boolean().optional(),
1183
+ });
1184
+ function createChatCompletionFunctionToJSON(createChatCompletionFunction) {
1185
+ return JSON.stringify(exports.CreateChatCompletionFunction$outboundSchema.parse(createChatCompletionFunction));
1186
+ }
1187
+ function createChatCompletionFunctionFromJSON(jsonString) {
1188
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFunction' from JSON`);
1189
+ }
1190
+ /** @internal */
1191
+ exports.CreateChatCompletionTools$inboundSchema = z.object({
1192
+ type: exports.CreateChatCompletionType$inboundSchema.optional(),
1193
+ function: z.lazy(() => exports.CreateChatCompletionFunction$inboundSchema),
1194
+ });
1195
+ /** @internal */
1196
+ exports.CreateChatCompletionTools$outboundSchema = z.object({
1197
+ type: exports.CreateChatCompletionType$outboundSchema.optional(),
1198
+ function: z.lazy(() => exports.CreateChatCompletionFunction$outboundSchema),
1199
+ });
1200
+ function createChatCompletionToolsToJSON(createChatCompletionTools) {
1201
+ return JSON.stringify(exports.CreateChatCompletionTools$outboundSchema.parse(createChatCompletionTools));
1202
+ }
1203
+ function createChatCompletionToolsFromJSON(jsonString) {
1204
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionTools' from JSON`);
1205
+ }
1206
+ /** @internal */
1207
+ exports.CreateChatCompletionToolChoiceType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionToolChoiceType);
1208
+ /** @internal */
1209
+ exports.CreateChatCompletionToolChoiceType$outboundSchema = exports.CreateChatCompletionToolChoiceType$inboundSchema;
1210
+ /** @internal */
1211
+ exports.CreateChatCompletionToolChoiceFunction$inboundSchema = z.object({
1212
+ name: z.string(),
1213
+ });
1214
+ /** @internal */
1215
+ exports.CreateChatCompletionToolChoiceFunction$outboundSchema = z.object({
1216
+ name: z.string(),
1217
+ });
1218
+ function createChatCompletionToolChoiceFunctionToJSON(createChatCompletionToolChoiceFunction) {
1219
+ return JSON.stringify(exports.CreateChatCompletionToolChoiceFunction$outboundSchema.parse(createChatCompletionToolChoiceFunction));
1220
+ }
1221
+ function createChatCompletionToolChoiceFunctionFromJSON(jsonString) {
1222
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionToolChoiceFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionToolChoiceFunction' from JSON`);
1223
+ }
1224
+ /** @internal */
1225
+ exports.CreateChatCompletionToolChoice2$inboundSchema = z.object({
1226
+ type: exports.CreateChatCompletionToolChoiceType$inboundSchema.optional(),
1227
+ function: z.lazy(() => exports.CreateChatCompletionToolChoiceFunction$inboundSchema),
1228
+ });
1229
+ /** @internal */
1230
+ exports.CreateChatCompletionToolChoice2$outboundSchema = z.object({
1231
+ type: exports.CreateChatCompletionToolChoiceType$outboundSchema.optional(),
1232
+ function: z.lazy(() => exports.CreateChatCompletionToolChoiceFunction$outboundSchema),
1233
+ });
1234
+ function createChatCompletionToolChoice2ToJSON(createChatCompletionToolChoice2) {
1235
+ return JSON.stringify(exports.CreateChatCompletionToolChoice2$outboundSchema.parse(createChatCompletionToolChoice2));
1236
+ }
1237
+ function createChatCompletionToolChoice2FromJSON(jsonString) {
1238
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionToolChoice2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionToolChoice2' from JSON`);
1239
+ }
1240
+ /** @internal */
1241
+ exports.CreateChatCompletionToolChoice1$inboundSchema = z.nativeEnum(exports.CreateChatCompletionToolChoice1);
1242
+ /** @internal */
1243
+ exports.CreateChatCompletionToolChoice1$outboundSchema = exports.CreateChatCompletionToolChoice1$inboundSchema;
1244
+ /** @internal */
1245
+ exports.CreateChatCompletionToolChoice$inboundSchema = z.union([
1246
+ z.lazy(() => exports.CreateChatCompletionToolChoice2$inboundSchema),
1247
+ exports.CreateChatCompletionToolChoice1$inboundSchema,
1248
+ ]);
1249
+ /** @internal */
1250
+ exports.CreateChatCompletionToolChoice$outboundSchema = z.union([
1251
+ z.lazy(() => exports.CreateChatCompletionToolChoice2$outboundSchema),
1252
+ exports.CreateChatCompletionToolChoice1$outboundSchema,
1253
+ ]);
1254
+ function createChatCompletionToolChoiceToJSON(createChatCompletionToolChoice) {
1255
+ return JSON.stringify(exports.CreateChatCompletionToolChoice$outboundSchema.parse(createChatCompletionToolChoice));
1256
+ }
1257
+ function createChatCompletionToolChoiceFromJSON(jsonString) {
1258
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionToolChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionToolChoice' from JSON`);
1259
+ }
1260
+ /** @internal */
1261
+ exports.CreateChatCompletionModalities$inboundSchema = z.nativeEnum(exports.CreateChatCompletionModalities);
1262
+ /** @internal */
1263
+ exports.CreateChatCompletionModalities$outboundSchema = exports.CreateChatCompletionModalities$inboundSchema;
1264
+ /** @internal */
1265
+ exports.CreateChatCompletionId1$inboundSchema = z.nativeEnum(exports.CreateChatCompletionId1);
1266
+ /** @internal */
1267
+ exports.CreateChatCompletionId1$outboundSchema = exports.CreateChatCompletionId1$inboundSchema;
1268
+ /** @internal */
1269
+ exports.CreateChatCompletionId$inboundSchema = z.union([exports.CreateChatCompletionId1$inboundSchema, z.string()]);
1270
+ /** @internal */
1271
+ exports.CreateChatCompletionId$outboundSchema = z.union([exports.CreateChatCompletionId1$outboundSchema, z.string()]);
1272
+ function createChatCompletionIdToJSON(createChatCompletionId) {
1273
+ return JSON.stringify(exports.CreateChatCompletionId$outboundSchema.parse(createChatCompletionId));
1274
+ }
1275
+ function createChatCompletionIdFromJSON(jsonString) {
1276
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionId' from JSON`);
1277
+ }
1278
+ /** @internal */
1279
+ exports.CreateChatCompletionExecuteOn$inboundSchema = z.nativeEnum(exports.CreateChatCompletionExecuteOn);
1280
+ /** @internal */
1281
+ exports.CreateChatCompletionExecuteOn$outboundSchema = exports.CreateChatCompletionExecuteOn$inboundSchema;
1282
+ /** @internal */
1283
+ exports.CreateChatCompletionGuardrails$inboundSchema = z.object({
1284
+ id: z.union([exports.CreateChatCompletionId1$inboundSchema, z.string()]),
1285
+ execute_on: exports.CreateChatCompletionExecuteOn$inboundSchema,
1286
+ }).transform((v) => {
1287
+ return (0, primitives_js_1.remap)(v, {
1288
+ "execute_on": "executeOn",
1289
+ });
1290
+ });
1291
+ /** @internal */
1292
+ exports.CreateChatCompletionGuardrails$outboundSchema = z.object({
1293
+ id: z.union([exports.CreateChatCompletionId1$outboundSchema, z.string()]),
1294
+ executeOn: exports.CreateChatCompletionExecuteOn$outboundSchema,
1295
+ }).transform((v) => {
1296
+ return (0, primitives_js_1.remap)(v, {
1297
+ executeOn: "execute_on",
1298
+ });
1299
+ });
1300
+ function createChatCompletionGuardrailsToJSON(createChatCompletionGuardrails) {
1301
+ return JSON.stringify(exports.CreateChatCompletionGuardrails$outboundSchema.parse(createChatCompletionGuardrails));
1302
+ }
1303
+ function createChatCompletionGuardrailsFromJSON(jsonString) {
1304
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionGuardrails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionGuardrails' from JSON`);
1305
+ }
1306
+ /** @internal */
1307
+ exports.CreateChatCompletionRetry$inboundSchema = z.object({
1308
+ count: z.number().default(3),
1309
+ on_codes: z.array(z.number()).optional(),
1310
+ }).transform((v) => {
1311
+ return (0, primitives_js_1.remap)(v, {
1312
+ "on_codes": "onCodes",
1313
+ });
1314
+ });
1315
+ /** @internal */
1316
+ exports.CreateChatCompletionRetry$outboundSchema = z.object({
1317
+ count: z.number().default(3),
1318
+ onCodes: z.array(z.number()).optional(),
1319
+ }).transform((v) => {
1320
+ return (0, primitives_js_1.remap)(v, {
1321
+ onCodes: "on_codes",
1322
+ });
1323
+ });
1324
+ function createChatCompletionRetryToJSON(createChatCompletionRetry) {
1325
+ return JSON.stringify(exports.CreateChatCompletionRetry$outboundSchema.parse(createChatCompletionRetry));
1326
+ }
1327
+ function createChatCompletionRetryFromJSON(jsonString) {
1328
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRetry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRetry' from JSON`);
1329
+ }
1330
+ /** @internal */
1331
+ exports.Fallbacks$inboundSchema = z.object({
1332
+ model: z.string(),
1333
+ });
1334
+ /** @internal */
1335
+ exports.Fallbacks$outboundSchema = z.object({
1336
+ model: z.string(),
1337
+ });
1338
+ function fallbacksToJSON(fallbacks) {
1339
+ return JSON.stringify(exports.Fallbacks$outboundSchema.parse(fallbacks));
1340
+ }
1341
+ function fallbacksFromJSON(jsonString) {
1342
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Fallbacks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Fallbacks' from JSON`);
1343
+ }
1344
+ /** @internal */
1345
+ exports.Version$inboundSchema = z
1346
+ .nativeEnum(exports.Version);
1347
+ /** @internal */
1348
+ exports.Version$outboundSchema = exports.Version$inboundSchema;
1349
+ /** @internal */
1350
+ exports.Prompt$inboundSchema = z
1351
+ .object({
1352
+ id: z.string(),
1353
+ version: exports.Version$inboundSchema,
1354
+ });
1355
+ /** @internal */
1356
+ exports.Prompt$outboundSchema = z.object({
1357
+ id: z.string(),
1358
+ version: exports.Version$outboundSchema,
1359
+ });
1360
+ function promptToJSON(prompt) {
1361
+ return JSON.stringify(exports.Prompt$outboundSchema.parse(prompt));
1362
+ }
1363
+ function promptFromJSON(jsonString) {
1364
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Prompt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Prompt' from JSON`);
1365
+ }
1366
+ /** @internal */
1367
+ exports.CreateChatCompletionThread$inboundSchema = z.object({
1368
+ id: z.string(),
1369
+ tags: z.array(z.string()).optional(),
1370
+ });
1371
+ /** @internal */
1372
+ exports.CreateChatCompletionThread$outboundSchema = z.object({
1373
+ id: z.string(),
1374
+ tags: z.array(z.string()).optional(),
1375
+ });
1376
+ function createChatCompletionThreadToJSON(createChatCompletionThread) {
1377
+ return JSON.stringify(exports.CreateChatCompletionThread$outboundSchema.parse(createChatCompletionThread));
1378
+ }
1379
+ function createChatCompletionThreadFromJSON(jsonString) {
1380
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionThread$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionThread' from JSON`);
1381
+ }
1382
+ /** @internal */
1383
+ exports.Inputs2$inboundSchema = z.object({
1384
+ key: z.string(),
1385
+ value: z.any().optional(),
1386
+ is_pii: z.boolean().optional(),
1387
+ }).transform((v) => {
1388
+ return (0, primitives_js_1.remap)(v, {
1389
+ "is_pii": "isPii",
1390
+ });
1391
+ });
1392
+ /** @internal */
1393
+ exports.Inputs2$outboundSchema = z.object({
1394
+ key: z.string(),
1395
+ value: z.any().optional(),
1396
+ isPii: z.boolean().optional(),
1397
+ }).transform((v) => {
1398
+ return (0, primitives_js_1.remap)(v, {
1399
+ isPii: "is_pii",
1400
+ });
1401
+ });
1402
+ function inputs2ToJSON(inputs2) {
1403
+ return JSON.stringify(exports.Inputs2$outboundSchema.parse(inputs2));
1404
+ }
1405
+ function inputs2FromJSON(jsonString) {
1406
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Inputs2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Inputs2' from JSON`);
1407
+ }
1408
+ /** @internal */
1409
+ exports.Inputs$inboundSchema = z
1410
+ .union([z.record(z.any()), z.array(z.lazy(() => exports.Inputs2$inboundSchema))]);
1411
+ /** @internal */
1412
+ exports.Inputs$outboundSchema = z.union([z.record(z.any()), z.array(z.lazy(() => exports.Inputs2$outboundSchema))]);
1413
+ function inputsToJSON(inputs) {
1414
+ return JSON.stringify(exports.Inputs$outboundSchema.parse(inputs));
1415
+ }
1416
+ function inputsFromJSON(jsonString) {
1417
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Inputs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Inputs' from JSON`);
1418
+ }
1419
+ /** @internal */
1420
+ exports.CreateChatCompletionRouterRequestType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRouterRequestType);
1421
+ /** @internal */
1422
+ exports.CreateChatCompletionRouterRequestType$outboundSchema = exports.CreateChatCompletionRouterRequestType$inboundSchema;
1423
+ /** @internal */
1424
+ exports.Cache$inboundSchema = z
1425
+ .object({
1426
+ ttl: z.number().default(1800),
1427
+ type: exports.CreateChatCompletionRouterRequestType$inboundSchema,
1428
+ });
1429
+ /** @internal */
1430
+ exports.Cache$outboundSchema = z.object({
1431
+ ttl: z.number().default(1800),
1432
+ type: exports.CreateChatCompletionRouterRequestType$outboundSchema,
1433
+ });
1434
+ function cacheToJSON(cache) {
1435
+ return JSON.stringify(exports.Cache$outboundSchema.parse(cache));
1436
+ }
1437
+ function cacheFromJSON(jsonString) {
1438
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Cache$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Cache' from JSON`);
1439
+ }
1440
+ /** @internal */
1441
+ exports.CreateChatCompletionSearchType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionSearchType);
1442
+ /** @internal */
1443
+ exports.CreateChatCompletionSearchType$outboundSchema = exports.CreateChatCompletionSearchType$inboundSchema;
1444
+ /** @internal */
1445
+ exports.CreateChatCompletionOrExists$inboundSchema = z.object({
1446
+ exists: z.boolean(),
1447
+ });
1448
+ /** @internal */
1449
+ exports.CreateChatCompletionOrExists$outboundSchema = z.object({
1450
+ exists: z.boolean(),
1451
+ });
1452
+ function createChatCompletionOrExistsToJSON(createChatCompletionOrExists) {
1453
+ return JSON.stringify(exports.CreateChatCompletionOrExists$outboundSchema.parse(createChatCompletionOrExists));
1454
+ }
1455
+ function createChatCompletionOrExistsFromJSON(jsonString) {
1456
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrExists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrExists' from JSON`);
1457
+ }
1458
+ /** @internal */
1459
+ exports.CreateChatCompletionOrRouterNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1460
+ /** @internal */
1461
+ exports.CreateChatCompletionOrRouterNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1462
+ function createChatCompletionOrRouterNinToJSON(createChatCompletionOrRouterNin) {
1463
+ return JSON.stringify(exports.CreateChatCompletionOrRouterNin$outboundSchema.parse(createChatCompletionOrRouterNin));
1464
+ }
1465
+ function createChatCompletionOrRouterNinFromJSON(jsonString) {
1466
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrRouterNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrRouterNin' from JSON`);
1467
+ }
1468
+ /** @internal */
1469
+ exports.CreateChatCompletionOrNin$inboundSchema = z.object({
1470
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1471
+ });
1472
+ /** @internal */
1473
+ exports.CreateChatCompletionOrNin$outboundSchema = z.object({
1474
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1475
+ });
1476
+ function createChatCompletionOrNinToJSON(createChatCompletionOrNin) {
1477
+ return JSON.stringify(exports.CreateChatCompletionOrNin$outboundSchema.parse(createChatCompletionOrNin));
1478
+ }
1479
+ function createChatCompletionOrNinFromJSON(jsonString) {
1480
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrNin' from JSON`);
1481
+ }
1482
+ /** @internal */
1483
+ exports.CreateChatCompletionOrRouterIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1484
+ /** @internal */
1485
+ exports.CreateChatCompletionOrRouterIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1486
+ function createChatCompletionOrRouterInToJSON(createChatCompletionOrRouterIn) {
1487
+ return JSON.stringify(exports.CreateChatCompletionOrRouterIn$outboundSchema.parse(createChatCompletionOrRouterIn));
1488
+ }
1489
+ function createChatCompletionOrRouterInFromJSON(jsonString) {
1490
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrRouterIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrRouterIn' from JSON`);
1491
+ }
1492
+ /** @internal */
1493
+ exports.CreateChatCompletionOrIn$inboundSchema = z.object({
1494
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1495
+ });
1496
+ /** @internal */
1497
+ exports.CreateChatCompletionOrIn$outboundSchema = z.object({
1498
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1499
+ });
1500
+ function createChatCompletionOrInToJSON(createChatCompletionOrIn) {
1501
+ return JSON.stringify(exports.CreateChatCompletionOrIn$outboundSchema.parse(createChatCompletionOrIn));
1502
+ }
1503
+ function createChatCompletionOrInFromJSON(jsonString) {
1504
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrIn' from JSON`);
1505
+ }
1506
+ /** @internal */
1507
+ exports.CreateChatCompletionOrLte$inboundSchema = z.object({
1508
+ lte: z.number(),
1509
+ });
1510
+ /** @internal */
1511
+ exports.CreateChatCompletionOrLte$outboundSchema = z.object({
1512
+ lte: z.number(),
1513
+ });
1514
+ function createChatCompletionOrLteToJSON(createChatCompletionOrLte) {
1515
+ return JSON.stringify(exports.CreateChatCompletionOrLte$outboundSchema.parse(createChatCompletionOrLte));
1516
+ }
1517
+ function createChatCompletionOrLteFromJSON(jsonString) {
1518
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrLte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrLte' from JSON`);
1519
+ }
1520
+ /** @internal */
1521
+ exports.CreateChatCompletionOrLt$inboundSchema = z.object({
1522
+ lt: z.number(),
1523
+ });
1524
+ /** @internal */
1525
+ exports.CreateChatCompletionOrLt$outboundSchema = z.object({
1526
+ lt: z.number(),
1527
+ });
1528
+ function createChatCompletionOrLtToJSON(createChatCompletionOrLt) {
1529
+ return JSON.stringify(exports.CreateChatCompletionOrLt$outboundSchema.parse(createChatCompletionOrLt));
1530
+ }
1531
+ function createChatCompletionOrLtFromJSON(jsonString) {
1532
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrLt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrLt' from JSON`);
1533
+ }
1534
+ /** @internal */
1535
+ exports.CreateChatCompletionOrGte$inboundSchema = z.object({
1536
+ gte: z.number(),
1537
+ });
1538
+ /** @internal */
1539
+ exports.CreateChatCompletionOrGte$outboundSchema = z.object({
1540
+ gte: z.number(),
1541
+ });
1542
+ function createChatCompletionOrGteToJSON(createChatCompletionOrGte) {
1543
+ return JSON.stringify(exports.CreateChatCompletionOrGte$outboundSchema.parse(createChatCompletionOrGte));
1544
+ }
1545
+ function createChatCompletionOrGteFromJSON(jsonString) {
1546
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrGte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrGte' from JSON`);
1547
+ }
1548
+ /** @internal */
1549
+ exports.CreateChatCompletionOrGt$inboundSchema = z.object({
1550
+ gt: z.number(),
1551
+ });
1552
+ /** @internal */
1553
+ exports.CreateChatCompletionOrGt$outboundSchema = z.object({
1554
+ gt: z.number(),
1555
+ });
1556
+ function createChatCompletionOrGtToJSON(createChatCompletionOrGt) {
1557
+ return JSON.stringify(exports.CreateChatCompletionOrGt$outboundSchema.parse(createChatCompletionOrGt));
1558
+ }
1559
+ function createChatCompletionOrGtFromJSON(jsonString) {
1560
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrGt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrGt' from JSON`);
1561
+ }
1562
+ /** @internal */
1563
+ exports.CreateChatCompletionOrRouterNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1564
+ /** @internal */
1565
+ exports.CreateChatCompletionOrRouterNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1566
+ function createChatCompletionOrRouterNeToJSON(createChatCompletionOrRouterNe) {
1567
+ return JSON.stringify(exports.CreateChatCompletionOrRouterNe$outboundSchema.parse(createChatCompletionOrRouterNe));
1568
+ }
1569
+ function createChatCompletionOrRouterNeFromJSON(jsonString) {
1570
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrRouterNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrRouterNe' from JSON`);
1571
+ }
1572
+ /** @internal */
1573
+ exports.CreateChatCompletionOrNe$inboundSchema = z.object({
1574
+ ne: z.union([z.string(), z.number(), z.boolean()]),
1575
+ });
1576
+ /** @internal */
1577
+ exports.CreateChatCompletionOrNe$outboundSchema = z.object({
1578
+ ne: z.union([z.string(), z.number(), z.boolean()]),
1579
+ });
1580
+ function createChatCompletionOrNeToJSON(createChatCompletionOrNe) {
1581
+ return JSON.stringify(exports.CreateChatCompletionOrNe$outboundSchema.parse(createChatCompletionOrNe));
1582
+ }
1583
+ function createChatCompletionOrNeFromJSON(jsonString) {
1584
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrNe' from JSON`);
1585
+ }
1586
+ /** @internal */
1587
+ exports.CreateChatCompletionOrRouterEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1588
+ /** @internal */
1589
+ exports.CreateChatCompletionOrRouterEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1590
+ function createChatCompletionOrRouterEqToJSON(createChatCompletionOrRouterEq) {
1591
+ return JSON.stringify(exports.CreateChatCompletionOrRouterEq$outboundSchema.parse(createChatCompletionOrRouterEq));
1592
+ }
1593
+ function createChatCompletionOrRouterEqFromJSON(jsonString) {
1594
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrRouterEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrRouterEq' from JSON`);
1595
+ }
1596
+ /** @internal */
1597
+ exports.CreateChatCompletionOrEq$inboundSchema = z.object({
1598
+ eq: z.union([z.string(), z.number(), z.boolean()]),
1599
+ });
1600
+ /** @internal */
1601
+ exports.CreateChatCompletionOrEq$outboundSchema = z.object({
1602
+ eq: z.union([z.string(), z.number(), z.boolean()]),
1603
+ });
1604
+ function createChatCompletionOrEqToJSON(createChatCompletionOrEq) {
1605
+ return JSON.stringify(exports.CreateChatCompletionOrEq$outboundSchema.parse(createChatCompletionOrEq));
1606
+ }
1607
+ function createChatCompletionOrEqFromJSON(jsonString) {
1608
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionOrEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionOrEq' from JSON`);
1609
+ }
1610
+ /** @internal */
1611
+ exports.CreateChatCompletionFilterByRouterOr$inboundSchema = z.union([
1612
+ z.lazy(() => exports.CreateChatCompletionOrEq$inboundSchema),
1613
+ z.lazy(() => exports.CreateChatCompletionOrNe$inboundSchema),
1614
+ z.lazy(() => exports.CreateChatCompletionOrGt$inboundSchema),
1615
+ z.lazy(() => exports.CreateChatCompletionOrGte$inboundSchema),
1616
+ z.lazy(() => exports.CreateChatCompletionOrLt$inboundSchema),
1617
+ z.lazy(() => exports.CreateChatCompletionOrLte$inboundSchema),
1618
+ z.lazy(() => exports.CreateChatCompletionOrIn$inboundSchema),
1619
+ z.lazy(() => exports.CreateChatCompletionOrNin$inboundSchema),
1620
+ z.lazy(() => exports.CreateChatCompletionOrExists$inboundSchema),
1621
+ ]);
1622
+ /** @internal */
1623
+ exports.CreateChatCompletionFilterByRouterOr$outboundSchema = z.union([
1624
+ z.lazy(() => exports.CreateChatCompletionOrEq$outboundSchema),
1625
+ z.lazy(() => exports.CreateChatCompletionOrNe$outboundSchema),
1626
+ z.lazy(() => exports.CreateChatCompletionOrGt$outboundSchema),
1627
+ z.lazy(() => exports.CreateChatCompletionOrGte$outboundSchema),
1628
+ z.lazy(() => exports.CreateChatCompletionOrLt$outboundSchema),
1629
+ z.lazy(() => exports.CreateChatCompletionOrLte$outboundSchema),
1630
+ z.lazy(() => exports.CreateChatCompletionOrIn$outboundSchema),
1631
+ z.lazy(() => exports.CreateChatCompletionOrNin$outboundSchema),
1632
+ z.lazy(() => exports.CreateChatCompletionOrExists$outboundSchema),
1633
+ ]);
1634
+ function createChatCompletionFilterByRouterOrToJSON(createChatCompletionFilterByRouterOr) {
1635
+ return JSON.stringify(exports.CreateChatCompletionFilterByRouterOr$outboundSchema.parse(createChatCompletionFilterByRouterOr));
1636
+ }
1637
+ function createChatCompletionFilterByRouterOrFromJSON(jsonString) {
1638
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterByRouterOr$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterByRouterOr' from JSON`);
1639
+ }
1640
+ /** @internal */
1641
+ exports.CreateChatCompletionFilterByOr$inboundSchema = z.object({
1642
+ or: z.array(z.record(z.union([
1643
+ z.lazy(() => exports.CreateChatCompletionOrEq$inboundSchema),
1644
+ z.lazy(() => exports.CreateChatCompletionOrNe$inboundSchema),
1645
+ z.lazy(() => exports.CreateChatCompletionOrGt$inboundSchema),
1646
+ z.lazy(() => exports.CreateChatCompletionOrGte$inboundSchema),
1647
+ z.lazy(() => exports.CreateChatCompletionOrLt$inboundSchema),
1648
+ z.lazy(() => exports.CreateChatCompletionOrLte$inboundSchema),
1649
+ z.lazy(() => exports.CreateChatCompletionOrIn$inboundSchema),
1650
+ z.lazy(() => exports.CreateChatCompletionOrNin$inboundSchema),
1651
+ z.lazy(() => exports.CreateChatCompletionOrExists$inboundSchema),
1652
+ ]))),
1653
+ });
1654
+ /** @internal */
1655
+ exports.CreateChatCompletionFilterByOr$outboundSchema = z.object({
1656
+ or: z.array(z.record(z.union([
1657
+ z.lazy(() => exports.CreateChatCompletionOrEq$outboundSchema),
1658
+ z.lazy(() => exports.CreateChatCompletionOrNe$outboundSchema),
1659
+ z.lazy(() => exports.CreateChatCompletionOrGt$outboundSchema),
1660
+ z.lazy(() => exports.CreateChatCompletionOrGte$outboundSchema),
1661
+ z.lazy(() => exports.CreateChatCompletionOrLt$outboundSchema),
1662
+ z.lazy(() => exports.CreateChatCompletionOrLte$outboundSchema),
1663
+ z.lazy(() => exports.CreateChatCompletionOrIn$outboundSchema),
1664
+ z.lazy(() => exports.CreateChatCompletionOrNin$outboundSchema),
1665
+ z.lazy(() => exports.CreateChatCompletionOrExists$outboundSchema),
1666
+ ]))),
1667
+ });
1668
+ function createChatCompletionFilterByOrToJSON(createChatCompletionFilterByOr) {
1669
+ return JSON.stringify(exports.CreateChatCompletionFilterByOr$outboundSchema.parse(createChatCompletionFilterByOr));
1670
+ }
1671
+ function createChatCompletionFilterByOrFromJSON(jsonString) {
1672
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterByOr$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterByOr' from JSON`);
1673
+ }
1674
+ /** @internal */
1675
+ exports.CreateChatCompletionAndExists$inboundSchema = z.object({
1676
+ exists: z.boolean(),
1677
+ });
1678
+ /** @internal */
1679
+ exports.CreateChatCompletionAndExists$outboundSchema = z.object({
1680
+ exists: z.boolean(),
1681
+ });
1682
+ function createChatCompletionAndExistsToJSON(createChatCompletionAndExists) {
1683
+ return JSON.stringify(exports.CreateChatCompletionAndExists$outboundSchema.parse(createChatCompletionAndExists));
1684
+ }
1685
+ function createChatCompletionAndExistsFromJSON(jsonString) {
1686
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndExists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndExists' from JSON`);
1687
+ }
1688
+ /** @internal */
1689
+ exports.CreateChatCompletionAndRouterNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1690
+ /** @internal */
1691
+ exports.CreateChatCompletionAndRouterNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1692
+ function createChatCompletionAndRouterNinToJSON(createChatCompletionAndRouterNin) {
1693
+ return JSON.stringify(exports.CreateChatCompletionAndRouterNin$outboundSchema.parse(createChatCompletionAndRouterNin));
1694
+ }
1695
+ function createChatCompletionAndRouterNinFromJSON(jsonString) {
1696
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndRouterNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndRouterNin' from JSON`);
1697
+ }
1698
+ /** @internal */
1699
+ exports.CreateChatCompletionAndNin$inboundSchema = z.object({
1700
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1701
+ });
1702
+ /** @internal */
1703
+ exports.CreateChatCompletionAndNin$outboundSchema = z.object({
1704
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1705
+ });
1706
+ function createChatCompletionAndNinToJSON(createChatCompletionAndNin) {
1707
+ return JSON.stringify(exports.CreateChatCompletionAndNin$outboundSchema.parse(createChatCompletionAndNin));
1708
+ }
1709
+ function createChatCompletionAndNinFromJSON(jsonString) {
1710
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndNin' from JSON`);
1711
+ }
1712
+ /** @internal */
1713
+ exports.CreateChatCompletionAndRouterIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1714
+ /** @internal */
1715
+ exports.CreateChatCompletionAndRouterIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1716
+ function createChatCompletionAndRouterInToJSON(createChatCompletionAndRouterIn) {
1717
+ return JSON.stringify(exports.CreateChatCompletionAndRouterIn$outboundSchema.parse(createChatCompletionAndRouterIn));
1718
+ }
1719
+ function createChatCompletionAndRouterInFromJSON(jsonString) {
1720
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndRouterIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndRouterIn' from JSON`);
1721
+ }
1722
+ /** @internal */
1723
+ exports.CreateChatCompletionAndIn$inboundSchema = z.object({
1724
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1725
+ });
1726
+ /** @internal */
1727
+ exports.CreateChatCompletionAndIn$outboundSchema = z.object({
1728
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1729
+ });
1730
+ function createChatCompletionAndInToJSON(createChatCompletionAndIn) {
1731
+ return JSON.stringify(exports.CreateChatCompletionAndIn$outboundSchema.parse(createChatCompletionAndIn));
1732
+ }
1733
+ function createChatCompletionAndInFromJSON(jsonString) {
1734
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndIn' from JSON`);
1735
+ }
1736
+ /** @internal */
1737
+ exports.CreateChatCompletionAndLte$inboundSchema = z.object({
1738
+ lte: z.number(),
1739
+ });
1740
+ /** @internal */
1741
+ exports.CreateChatCompletionAndLte$outboundSchema = z.object({
1742
+ lte: z.number(),
1743
+ });
1744
+ function createChatCompletionAndLteToJSON(createChatCompletionAndLte) {
1745
+ return JSON.stringify(exports.CreateChatCompletionAndLte$outboundSchema.parse(createChatCompletionAndLte));
1746
+ }
1747
+ function createChatCompletionAndLteFromJSON(jsonString) {
1748
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndLte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndLte' from JSON`);
1749
+ }
1750
+ /** @internal */
1751
+ exports.CreateChatCompletionAndLt$inboundSchema = z.object({
1752
+ lt: z.number(),
1753
+ });
1754
+ /** @internal */
1755
+ exports.CreateChatCompletionAndLt$outboundSchema = z.object({
1756
+ lt: z.number(),
1757
+ });
1758
+ function createChatCompletionAndLtToJSON(createChatCompletionAndLt) {
1759
+ return JSON.stringify(exports.CreateChatCompletionAndLt$outboundSchema.parse(createChatCompletionAndLt));
1760
+ }
1761
+ function createChatCompletionAndLtFromJSON(jsonString) {
1762
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndLt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndLt' from JSON`);
1763
+ }
1764
+ /** @internal */
1765
+ exports.CreateChatCompletionAndGte$inboundSchema = z.object({
1766
+ gte: z.number(),
1767
+ });
1768
+ /** @internal */
1769
+ exports.CreateChatCompletionAndGte$outboundSchema = z.object({
1770
+ gte: z.number(),
1771
+ });
1772
+ function createChatCompletionAndGteToJSON(createChatCompletionAndGte) {
1773
+ return JSON.stringify(exports.CreateChatCompletionAndGte$outboundSchema.parse(createChatCompletionAndGte));
1774
+ }
1775
+ function createChatCompletionAndGteFromJSON(jsonString) {
1776
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndGte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndGte' from JSON`);
1777
+ }
1778
+ /** @internal */
1779
+ exports.CreateChatCompletionAndGt$inboundSchema = z.object({
1780
+ gt: z.number(),
1781
+ });
1782
+ /** @internal */
1783
+ exports.CreateChatCompletionAndGt$outboundSchema = z.object({
1784
+ gt: z.number(),
1785
+ });
1786
+ function createChatCompletionAndGtToJSON(createChatCompletionAndGt) {
1787
+ return JSON.stringify(exports.CreateChatCompletionAndGt$outboundSchema.parse(createChatCompletionAndGt));
1788
+ }
1789
+ function createChatCompletionAndGtFromJSON(jsonString) {
1790
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndGt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndGt' from JSON`);
1791
+ }
1792
+ /** @internal */
1793
+ exports.CreateChatCompletionAndRouterNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1794
+ /** @internal */
1795
+ exports.CreateChatCompletionAndRouterNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1796
+ function createChatCompletionAndRouterNeToJSON(createChatCompletionAndRouterNe) {
1797
+ return JSON.stringify(exports.CreateChatCompletionAndRouterNe$outboundSchema.parse(createChatCompletionAndRouterNe));
1798
+ }
1799
+ function createChatCompletionAndRouterNeFromJSON(jsonString) {
1800
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndRouterNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndRouterNe' from JSON`);
1801
+ }
1802
+ /** @internal */
1803
+ exports.CreateChatCompletionAndNe$inboundSchema = z.object({
1804
+ ne: z.union([z.string(), z.number(), z.boolean()]),
1805
+ });
1806
+ /** @internal */
1807
+ exports.CreateChatCompletionAndNe$outboundSchema = z.object({
1808
+ ne: z.union([z.string(), z.number(), z.boolean()]),
1809
+ });
1810
+ function createChatCompletionAndNeToJSON(createChatCompletionAndNe) {
1811
+ return JSON.stringify(exports.CreateChatCompletionAndNe$outboundSchema.parse(createChatCompletionAndNe));
1812
+ }
1813
+ function createChatCompletionAndNeFromJSON(jsonString) {
1814
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndNe' from JSON`);
1815
+ }
1816
+ /** @internal */
1817
+ exports.CreateChatCompletionAndRouterEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1818
+ /** @internal */
1819
+ exports.CreateChatCompletionAndRouterEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1820
+ function createChatCompletionAndRouterEqToJSON(createChatCompletionAndRouterEq) {
1821
+ return JSON.stringify(exports.CreateChatCompletionAndRouterEq$outboundSchema.parse(createChatCompletionAndRouterEq));
1822
+ }
1823
+ function createChatCompletionAndRouterEqFromJSON(jsonString) {
1824
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndRouterEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndRouterEq' from JSON`);
1825
+ }
1826
+ /** @internal */
1827
+ exports.CreateChatCompletionAndEq$inboundSchema = z.object({
1828
+ eq: z.union([z.string(), z.number(), z.boolean()]),
1829
+ });
1830
+ /** @internal */
1831
+ exports.CreateChatCompletionAndEq$outboundSchema = z.object({
1832
+ eq: z.union([z.string(), z.number(), z.boolean()]),
1833
+ });
1834
+ function createChatCompletionAndEqToJSON(createChatCompletionAndEq) {
1835
+ return JSON.stringify(exports.CreateChatCompletionAndEq$outboundSchema.parse(createChatCompletionAndEq));
1836
+ }
1837
+ function createChatCompletionAndEqFromJSON(jsonString) {
1838
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAndEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAndEq' from JSON`);
1839
+ }
1840
+ /** @internal */
1841
+ exports.CreateChatCompletionFilterByRouterAnd$inboundSchema = z.union([
1842
+ z.lazy(() => exports.CreateChatCompletionAndEq$inboundSchema),
1843
+ z.lazy(() => exports.CreateChatCompletionAndNe$inboundSchema),
1844
+ z.lazy(() => exports.CreateChatCompletionAndGt$inboundSchema),
1845
+ z.lazy(() => exports.CreateChatCompletionAndGte$inboundSchema),
1846
+ z.lazy(() => exports.CreateChatCompletionAndLt$inboundSchema),
1847
+ z.lazy(() => exports.CreateChatCompletionAndLte$inboundSchema),
1848
+ z.lazy(() => exports.CreateChatCompletionAndIn$inboundSchema),
1849
+ z.lazy(() => exports.CreateChatCompletionAndNin$inboundSchema),
1850
+ z.lazy(() => exports.CreateChatCompletionAndExists$inboundSchema),
1851
+ ]);
1852
+ /** @internal */
1853
+ exports.CreateChatCompletionFilterByRouterAnd$outboundSchema = z.union([
1854
+ z.lazy(() => exports.CreateChatCompletionAndEq$outboundSchema),
1855
+ z.lazy(() => exports.CreateChatCompletionAndNe$outboundSchema),
1856
+ z.lazy(() => exports.CreateChatCompletionAndGt$outboundSchema),
1857
+ z.lazy(() => exports.CreateChatCompletionAndGte$outboundSchema),
1858
+ z.lazy(() => exports.CreateChatCompletionAndLt$outboundSchema),
1859
+ z.lazy(() => exports.CreateChatCompletionAndLte$outboundSchema),
1860
+ z.lazy(() => exports.CreateChatCompletionAndIn$outboundSchema),
1861
+ z.lazy(() => exports.CreateChatCompletionAndNin$outboundSchema),
1862
+ z.lazy(() => exports.CreateChatCompletionAndExists$outboundSchema),
1863
+ ]);
1864
+ function createChatCompletionFilterByRouterAndToJSON(createChatCompletionFilterByRouterAnd) {
1865
+ return JSON.stringify(exports.CreateChatCompletionFilterByRouterAnd$outboundSchema.parse(createChatCompletionFilterByRouterAnd));
1866
+ }
1867
+ function createChatCompletionFilterByRouterAndFromJSON(jsonString) {
1868
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterByRouterAnd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterByRouterAnd' from JSON`);
1869
+ }
1870
+ /** @internal */
1871
+ exports.CreateChatCompletionFilterByAnd$inboundSchema = z.object({
1872
+ and: z.array(z.record(z.union([
1873
+ z.lazy(() => exports.CreateChatCompletionAndEq$inboundSchema),
1874
+ z.lazy(() => exports.CreateChatCompletionAndNe$inboundSchema),
1875
+ z.lazy(() => exports.CreateChatCompletionAndGt$inboundSchema),
1876
+ z.lazy(() => exports.CreateChatCompletionAndGte$inboundSchema),
1877
+ z.lazy(() => exports.CreateChatCompletionAndLt$inboundSchema),
1878
+ z.lazy(() => exports.CreateChatCompletionAndLte$inboundSchema),
1879
+ z.lazy(() => exports.CreateChatCompletionAndIn$inboundSchema),
1880
+ z.lazy(() => exports.CreateChatCompletionAndNin$inboundSchema),
1881
+ z.lazy(() => exports.CreateChatCompletionAndExists$inboundSchema),
1882
+ ]))),
1883
+ });
1884
+ /** @internal */
1885
+ exports.CreateChatCompletionFilterByAnd$outboundSchema = z.object({
1886
+ and: z.array(z.record(z.union([
1887
+ z.lazy(() => exports.CreateChatCompletionAndEq$outboundSchema),
1888
+ z.lazy(() => exports.CreateChatCompletionAndNe$outboundSchema),
1889
+ z.lazy(() => exports.CreateChatCompletionAndGt$outboundSchema),
1890
+ z.lazy(() => exports.CreateChatCompletionAndGte$outboundSchema),
1891
+ z.lazy(() => exports.CreateChatCompletionAndLt$outboundSchema),
1892
+ z.lazy(() => exports.CreateChatCompletionAndLte$outboundSchema),
1893
+ z.lazy(() => exports.CreateChatCompletionAndIn$outboundSchema),
1894
+ z.lazy(() => exports.CreateChatCompletionAndNin$outboundSchema),
1895
+ z.lazy(() => exports.CreateChatCompletionAndExists$outboundSchema),
1896
+ ]))),
1897
+ });
1898
+ function createChatCompletionFilterByAndToJSON(createChatCompletionFilterByAnd) {
1899
+ return JSON.stringify(exports.CreateChatCompletionFilterByAnd$outboundSchema.parse(createChatCompletionFilterByAnd));
1900
+ }
1901
+ function createChatCompletionFilterByAndFromJSON(jsonString) {
1902
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterByAnd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterByAnd' from JSON`);
1903
+ }
1904
+ /** @internal */
1905
+ exports.CreateChatCompletion1Exists$inboundSchema = z.object({
1906
+ exists: z.boolean(),
1907
+ });
1908
+ /** @internal */
1909
+ exports.CreateChatCompletion1Exists$outboundSchema = z.object({
1910
+ exists: z.boolean(),
1911
+ });
1912
+ function createChatCompletion1ExistsToJSON(createChatCompletion1Exists) {
1913
+ return JSON.stringify(exports.CreateChatCompletion1Exists$outboundSchema.parse(createChatCompletion1Exists));
1914
+ }
1915
+ function createChatCompletion1ExistsFromJSON(jsonString) {
1916
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Exists$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Exists' from JSON`);
1917
+ }
1918
+ /** @internal */
1919
+ exports.CreateChatCompletion1RouterNin$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1920
+ /** @internal */
1921
+ exports.CreateChatCompletion1RouterNin$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1922
+ function createChatCompletion1RouterNinToJSON(createChatCompletion1RouterNin) {
1923
+ return JSON.stringify(exports.CreateChatCompletion1RouterNin$outboundSchema.parse(createChatCompletion1RouterNin));
1924
+ }
1925
+ function createChatCompletion1RouterNinFromJSON(jsonString) {
1926
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1RouterNin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1RouterNin' from JSON`);
1927
+ }
1928
+ /** @internal */
1929
+ exports.CreateChatCompletion1Nin$inboundSchema = z.object({
1930
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1931
+ });
1932
+ /** @internal */
1933
+ exports.CreateChatCompletion1Nin$outboundSchema = z.object({
1934
+ nin: z.array(z.union([z.string(), z.number(), z.boolean()])),
1935
+ });
1936
+ function createChatCompletion1NinToJSON(createChatCompletion1Nin) {
1937
+ return JSON.stringify(exports.CreateChatCompletion1Nin$outboundSchema.parse(createChatCompletion1Nin));
1938
+ }
1939
+ function createChatCompletion1NinFromJSON(jsonString) {
1940
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Nin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Nin' from JSON`);
1941
+ }
1942
+ /** @internal */
1943
+ exports.CreateChatCompletion1RouterIn$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1944
+ /** @internal */
1945
+ exports.CreateChatCompletion1RouterIn$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
1946
+ function createChatCompletion1RouterInToJSON(createChatCompletion1RouterIn) {
1947
+ return JSON.stringify(exports.CreateChatCompletion1RouterIn$outboundSchema.parse(createChatCompletion1RouterIn));
1948
+ }
1949
+ function createChatCompletion1RouterInFromJSON(jsonString) {
1950
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1RouterIn$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1RouterIn' from JSON`);
1951
+ }
1952
+ /** @internal */
1953
+ exports.CreateChatCompletion1In$inboundSchema = z.object({
1954
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1955
+ });
1956
+ /** @internal */
1957
+ exports.CreateChatCompletion1In$outboundSchema = z.object({
1958
+ in: z.array(z.union([z.string(), z.number(), z.boolean()])),
1959
+ });
1960
+ function createChatCompletion1InToJSON(createChatCompletion1In) {
1961
+ return JSON.stringify(exports.CreateChatCompletion1In$outboundSchema.parse(createChatCompletion1In));
1962
+ }
1963
+ function createChatCompletion1InFromJSON(jsonString) {
1964
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1In$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1In' from JSON`);
1965
+ }
1966
+ /** @internal */
1967
+ exports.CreateChatCompletion1Lte$inboundSchema = z.object({
1968
+ lte: z.number(),
1969
+ });
1970
+ /** @internal */
1971
+ exports.CreateChatCompletion1Lte$outboundSchema = z.object({
1972
+ lte: z.number(),
1973
+ });
1974
+ function createChatCompletion1LteToJSON(createChatCompletion1Lte) {
1975
+ return JSON.stringify(exports.CreateChatCompletion1Lte$outboundSchema.parse(createChatCompletion1Lte));
1976
+ }
1977
+ function createChatCompletion1LteFromJSON(jsonString) {
1978
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Lte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Lte' from JSON`);
1979
+ }
1980
+ /** @internal */
1981
+ exports.CreateChatCompletion1Lt$inboundSchema = z.object({
1982
+ lt: z.number(),
1983
+ });
1984
+ /** @internal */
1985
+ exports.CreateChatCompletion1Lt$outboundSchema = z.object({
1986
+ lt: z.number(),
1987
+ });
1988
+ function createChatCompletion1LtToJSON(createChatCompletion1Lt) {
1989
+ return JSON.stringify(exports.CreateChatCompletion1Lt$outboundSchema.parse(createChatCompletion1Lt));
1990
+ }
1991
+ function createChatCompletion1LtFromJSON(jsonString) {
1992
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Lt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Lt' from JSON`);
1993
+ }
1994
+ /** @internal */
1995
+ exports.CreateChatCompletion1Gte$inboundSchema = z.object({
1996
+ gte: z.number(),
1997
+ });
1998
+ /** @internal */
1999
+ exports.CreateChatCompletion1Gte$outboundSchema = z.object({
2000
+ gte: z.number(),
2001
+ });
2002
+ function createChatCompletion1GteToJSON(createChatCompletion1Gte) {
2003
+ return JSON.stringify(exports.CreateChatCompletion1Gte$outboundSchema.parse(createChatCompletion1Gte));
2004
+ }
2005
+ function createChatCompletion1GteFromJSON(jsonString) {
2006
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Gte$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Gte' from JSON`);
2007
+ }
2008
+ /** @internal */
2009
+ exports.CreateChatCompletion1Gt$inboundSchema = z.object({
2010
+ gt: z.number(),
2011
+ });
2012
+ /** @internal */
2013
+ exports.CreateChatCompletion1Gt$outboundSchema = z.object({
2014
+ gt: z.number(),
2015
+ });
2016
+ function createChatCompletion1GtToJSON(createChatCompletion1Gt) {
2017
+ return JSON.stringify(exports.CreateChatCompletion1Gt$outboundSchema.parse(createChatCompletion1Gt));
2018
+ }
2019
+ function createChatCompletion1GtFromJSON(jsonString) {
2020
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Gt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Gt' from JSON`);
2021
+ }
2022
+ /** @internal */
2023
+ exports.CreateChatCompletion1RouterNe$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
2024
+ /** @internal */
2025
+ exports.CreateChatCompletion1RouterNe$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
2026
+ function createChatCompletion1RouterNeToJSON(createChatCompletion1RouterNe) {
2027
+ return JSON.stringify(exports.CreateChatCompletion1RouterNe$outboundSchema.parse(createChatCompletion1RouterNe));
2028
+ }
2029
+ function createChatCompletion1RouterNeFromJSON(jsonString) {
2030
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1RouterNe$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1RouterNe' from JSON`);
2031
+ }
2032
+ /** @internal */
2033
+ exports.CreateChatCompletion1Ne$inboundSchema = z.object({
2034
+ ne: z.union([z.string(), z.number(), z.boolean()]),
2035
+ });
2036
+ /** @internal */
2037
+ exports.CreateChatCompletion1Ne$outboundSchema = z.object({
2038
+ ne: z.union([z.string(), z.number(), z.boolean()]),
2039
+ });
2040
+ function createChatCompletion1NeToJSON(createChatCompletion1Ne) {
2041
+ return JSON.stringify(exports.CreateChatCompletion1Ne$outboundSchema.parse(createChatCompletion1Ne));
2042
+ }
2043
+ function createChatCompletion1NeFromJSON(jsonString) {
2044
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Ne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Ne' from JSON`);
2045
+ }
2046
+ /** @internal */
2047
+ exports.CreateChatCompletion1RouterEq$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
2048
+ /** @internal */
2049
+ exports.CreateChatCompletion1RouterEq$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
2050
+ function createChatCompletion1RouterEqToJSON(createChatCompletion1RouterEq) {
2051
+ return JSON.stringify(exports.CreateChatCompletion1RouterEq$outboundSchema.parse(createChatCompletion1RouterEq));
2052
+ }
2053
+ function createChatCompletion1RouterEqFromJSON(jsonString) {
2054
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1RouterEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1RouterEq' from JSON`);
2055
+ }
2056
+ /** @internal */
2057
+ exports.CreateChatCompletion1Eq$inboundSchema = z.object({
2058
+ eq: z.union([z.string(), z.number(), z.boolean()]),
2059
+ });
2060
+ /** @internal */
2061
+ exports.CreateChatCompletion1Eq$outboundSchema = z.object({
2062
+ eq: z.union([z.string(), z.number(), z.boolean()]),
2063
+ });
2064
+ function createChatCompletion1EqToJSON(createChatCompletion1Eq) {
2065
+ return JSON.stringify(exports.CreateChatCompletion1Eq$outboundSchema.parse(createChatCompletion1Eq));
2066
+ }
2067
+ function createChatCompletion1EqFromJSON(jsonString) {
2068
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletion1Eq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletion1Eq' from JSON`);
2069
+ }
2070
+ /** @internal */
2071
+ exports.CreateChatCompletionFilterBy1$inboundSchema = z.union([
2072
+ z.lazy(() => exports.CreateChatCompletion1Eq$inboundSchema),
2073
+ z.lazy(() => exports.CreateChatCompletion1Ne$inboundSchema),
2074
+ z.lazy(() => exports.CreateChatCompletion1Gt$inboundSchema),
2075
+ z.lazy(() => exports.CreateChatCompletion1Gte$inboundSchema),
2076
+ z.lazy(() => exports.CreateChatCompletion1Lt$inboundSchema),
2077
+ z.lazy(() => exports.CreateChatCompletion1Lte$inboundSchema),
2078
+ z.lazy(() => exports.CreateChatCompletion1In$inboundSchema),
2079
+ z.lazy(() => exports.CreateChatCompletion1Nin$inboundSchema),
2080
+ z.lazy(() => exports.CreateChatCompletion1Exists$inboundSchema),
2081
+ ]);
2082
+ /** @internal */
2083
+ exports.CreateChatCompletionFilterBy1$outboundSchema = z.union([
2084
+ z.lazy(() => exports.CreateChatCompletion1Eq$outboundSchema),
2085
+ z.lazy(() => exports.CreateChatCompletion1Ne$outboundSchema),
2086
+ z.lazy(() => exports.CreateChatCompletion1Gt$outboundSchema),
2087
+ z.lazy(() => exports.CreateChatCompletion1Gte$outboundSchema),
2088
+ z.lazy(() => exports.CreateChatCompletion1Lt$outboundSchema),
2089
+ z.lazy(() => exports.CreateChatCompletion1Lte$outboundSchema),
2090
+ z.lazy(() => exports.CreateChatCompletion1In$outboundSchema),
2091
+ z.lazy(() => exports.CreateChatCompletion1Nin$outboundSchema),
2092
+ z.lazy(() => exports.CreateChatCompletion1Exists$outboundSchema),
2093
+ ]);
2094
+ function createChatCompletionFilterBy1ToJSON(createChatCompletionFilterBy1) {
2095
+ return JSON.stringify(exports.CreateChatCompletionFilterBy1$outboundSchema.parse(createChatCompletionFilterBy1));
2096
+ }
2097
+ function createChatCompletionFilterBy1FromJSON(jsonString) {
2098
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterBy1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterBy1' from JSON`);
2099
+ }
2100
+ /** @internal */
2101
+ exports.CreateChatCompletionFilterBy$inboundSchema = z.union([
2102
+ z.lazy(() => exports.CreateChatCompletionFilterByAnd$inboundSchema),
2103
+ z.lazy(() => exports.CreateChatCompletionFilterByOr$inboundSchema),
2104
+ z.record(z.union([
2105
+ z.lazy(() => exports.CreateChatCompletion1Eq$inboundSchema),
2106
+ z.lazy(() => exports.CreateChatCompletion1Ne$inboundSchema),
2107
+ z.lazy(() => exports.CreateChatCompletion1Gt$inboundSchema),
2108
+ z.lazy(() => exports.CreateChatCompletion1Gte$inboundSchema),
2109
+ z.lazy(() => exports.CreateChatCompletion1Lt$inboundSchema),
2110
+ z.lazy(() => exports.CreateChatCompletion1Lte$inboundSchema),
2111
+ z.lazy(() => exports.CreateChatCompletion1In$inboundSchema),
2112
+ z.lazy(() => exports.CreateChatCompletion1Nin$inboundSchema),
2113
+ z.lazy(() => exports.CreateChatCompletion1Exists$inboundSchema),
2114
+ ])),
2115
+ ]);
2116
+ /** @internal */
2117
+ exports.CreateChatCompletionFilterBy$outboundSchema = z.union([
2118
+ z.lazy(() => exports.CreateChatCompletionFilterByAnd$outboundSchema),
2119
+ z.lazy(() => exports.CreateChatCompletionFilterByOr$outboundSchema),
2120
+ z.record(z.union([
2121
+ z.lazy(() => exports.CreateChatCompletion1Eq$outboundSchema),
2122
+ z.lazy(() => exports.CreateChatCompletion1Ne$outboundSchema),
2123
+ z.lazy(() => exports.CreateChatCompletion1Gt$outboundSchema),
2124
+ z.lazy(() => exports.CreateChatCompletion1Gte$outboundSchema),
2125
+ z.lazy(() => exports.CreateChatCompletion1Lt$outboundSchema),
2126
+ z.lazy(() => exports.CreateChatCompletion1Lte$outboundSchema),
2127
+ z.lazy(() => exports.CreateChatCompletion1In$outboundSchema),
2128
+ z.lazy(() => exports.CreateChatCompletion1Nin$outboundSchema),
2129
+ z.lazy(() => exports.CreateChatCompletion1Exists$outboundSchema),
2130
+ ])),
2131
+ ]);
2132
+ function createChatCompletionFilterByToJSON(createChatCompletionFilterBy) {
2133
+ return JSON.stringify(exports.CreateChatCompletionFilterBy$outboundSchema.parse(createChatCompletionFilterBy));
2134
+ }
2135
+ function createChatCompletionFilterByFromJSON(jsonString) {
2136
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionFilterBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionFilterBy' from JSON`);
2137
+ }
2138
+ /** @internal */
2139
+ exports.CreateChatCompletionSearchOptions$inboundSchema = z.object({
2140
+ include_vectors: z.boolean().optional(),
2141
+ include_metadata: z.boolean().optional(),
2142
+ include_scores: z.boolean().optional(),
2143
+ }).transform((v) => {
2144
+ return (0, primitives_js_1.remap)(v, {
2145
+ "include_vectors": "includeVectors",
2146
+ "include_metadata": "includeMetadata",
2147
+ "include_scores": "includeScores",
2148
+ });
2149
+ });
2150
+ /** @internal */
2151
+ exports.CreateChatCompletionSearchOptions$outboundSchema = z.object({
2152
+ includeVectors: z.boolean().optional(),
2153
+ includeMetadata: z.boolean().optional(),
2154
+ includeScores: z.boolean().optional(),
2155
+ }).transform((v) => {
2156
+ return (0, primitives_js_1.remap)(v, {
2157
+ includeVectors: "include_vectors",
2158
+ includeMetadata: "include_metadata",
2159
+ includeScores: "include_scores",
2160
+ });
2161
+ });
2162
+ function createChatCompletionSearchOptionsToJSON(createChatCompletionSearchOptions) {
2163
+ return JSON.stringify(exports.CreateChatCompletionSearchOptions$outboundSchema.parse(createChatCompletionSearchOptions));
2164
+ }
2165
+ function createChatCompletionSearchOptionsFromJSON(jsonString) {
2166
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionSearchOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionSearchOptions' from JSON`);
2167
+ }
2168
+ /** @internal */
2169
+ exports.CreateChatCompletionRerankConfig$inboundSchema = z.object({
2170
+ model: z.string(),
2171
+ threshold: z.number().default(0),
2172
+ top_k: z.number().int().default(10),
2173
+ }).transform((v) => {
2174
+ return (0, primitives_js_1.remap)(v, {
2175
+ "top_k": "topK",
2176
+ });
2177
+ });
2178
+ /** @internal */
2179
+ exports.CreateChatCompletionRerankConfig$outboundSchema = z.object({
2180
+ model: z.string(),
2181
+ threshold: z.number().default(0),
2182
+ topK: z.number().int().default(10),
2183
+ }).transform((v) => {
2184
+ return (0, primitives_js_1.remap)(v, {
2185
+ topK: "top_k",
2186
+ });
2187
+ });
2188
+ function createChatCompletionRerankConfigToJSON(createChatCompletionRerankConfig) {
2189
+ return JSON.stringify(exports.CreateChatCompletionRerankConfig$outboundSchema.parse(createChatCompletionRerankConfig));
2190
+ }
2191
+ function createChatCompletionRerankConfigFromJSON(jsonString) {
2192
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRerankConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRerankConfig' from JSON`);
2193
+ }
2194
+ /** @internal */
2195
+ exports.CreateChatCompletionAgenticRagConfig$inboundSchema = z.object({
2196
+ model: z.string(),
2197
+ });
2198
+ /** @internal */
2199
+ exports.CreateChatCompletionAgenticRagConfig$outboundSchema = z.object({
2200
+ model: z.string(),
2201
+ });
2202
+ function createChatCompletionAgenticRagConfigToJSON(createChatCompletionAgenticRagConfig) {
2203
+ return JSON.stringify(exports.CreateChatCompletionAgenticRagConfig$outboundSchema.parse(createChatCompletionAgenticRagConfig));
2204
+ }
2205
+ function createChatCompletionAgenticRagConfigFromJSON(jsonString) {
2206
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionAgenticRagConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionAgenticRagConfig' from JSON`);
2207
+ }
2208
+ /** @internal */
2209
+ exports.CreateChatCompletionKnowledgeBases$inboundSchema = z.object({
2210
+ top_k: z.number().int().optional(),
2211
+ threshold: z.number().optional(),
2212
+ search_type: exports.CreateChatCompletionSearchType$inboundSchema.default("hybrid_search"),
2213
+ filter_by: z.union([
2214
+ z.lazy(() => exports.CreateChatCompletionFilterByAnd$inboundSchema),
2215
+ z.lazy(() => exports.CreateChatCompletionFilterByOr$inboundSchema),
2216
+ z.record(z.union([
2217
+ z.lazy(() => exports.CreateChatCompletion1Eq$inboundSchema),
2218
+ z.lazy(() => exports.CreateChatCompletion1Ne$inboundSchema),
2219
+ z.lazy(() => exports.CreateChatCompletion1Gt$inboundSchema),
2220
+ z.lazy(() => exports.CreateChatCompletion1Gte$inboundSchema),
2221
+ z.lazy(() => exports.CreateChatCompletion1Lt$inboundSchema),
2222
+ z.lazy(() => exports.CreateChatCompletion1Lte$inboundSchema),
2223
+ z.lazy(() => exports.CreateChatCompletion1In$inboundSchema),
2224
+ z.lazy(() => exports.CreateChatCompletion1Nin$inboundSchema),
2225
+ z.lazy(() => exports.CreateChatCompletion1Exists$inboundSchema),
2226
+ ])),
2227
+ ]).optional(),
2228
+ search_options: z.lazy(() => exports.CreateChatCompletionSearchOptions$inboundSchema)
2229
+ .optional(),
2230
+ rerank_config: z.lazy(() => exports.CreateChatCompletionRerankConfig$inboundSchema)
2231
+ .optional(),
2232
+ agentic_rag_config: z.lazy(() => exports.CreateChatCompletionAgenticRagConfig$inboundSchema).optional(),
2233
+ knowledge_id: z.string(),
2234
+ query: z.string().optional(),
2235
+ }).transform((v) => {
2236
+ return (0, primitives_js_1.remap)(v, {
2237
+ "top_k": "topK",
2238
+ "search_type": "searchType",
2239
+ "filter_by": "filterBy",
2240
+ "search_options": "searchOptions",
2241
+ "rerank_config": "rerankConfig",
2242
+ "agentic_rag_config": "agenticRagConfig",
2243
+ "knowledge_id": "knowledgeId",
2244
+ });
2245
+ });
2246
+ /** @internal */
2247
+ exports.CreateChatCompletionKnowledgeBases$outboundSchema = z.object({
2248
+ topK: z.number().int().optional(),
2249
+ threshold: z.number().optional(),
2250
+ searchType: exports.CreateChatCompletionSearchType$outboundSchema.default("hybrid_search"),
2251
+ filterBy: z.union([
2252
+ z.lazy(() => exports.CreateChatCompletionFilterByAnd$outboundSchema),
2253
+ z.lazy(() => exports.CreateChatCompletionFilterByOr$outboundSchema),
2254
+ z.record(z.union([
2255
+ z.lazy(() => exports.CreateChatCompletion1Eq$outboundSchema),
2256
+ z.lazy(() => exports.CreateChatCompletion1Ne$outboundSchema),
2257
+ z.lazy(() => exports.CreateChatCompletion1Gt$outboundSchema),
2258
+ z.lazy(() => exports.CreateChatCompletion1Gte$outboundSchema),
2259
+ z.lazy(() => exports.CreateChatCompletion1Lt$outboundSchema),
2260
+ z.lazy(() => exports.CreateChatCompletion1Lte$outboundSchema),
2261
+ z.lazy(() => exports.CreateChatCompletion1In$outboundSchema),
2262
+ z.lazy(() => exports.CreateChatCompletion1Nin$outboundSchema),
2263
+ z.lazy(() => exports.CreateChatCompletion1Exists$outboundSchema),
2264
+ ])),
2265
+ ]).optional(),
2266
+ searchOptions: z.lazy(() => exports.CreateChatCompletionSearchOptions$outboundSchema)
2267
+ .optional(),
2268
+ rerankConfig: z.lazy(() => exports.CreateChatCompletionRerankConfig$outboundSchema)
2269
+ .optional(),
2270
+ agenticRagConfig: z.lazy(() => exports.CreateChatCompletionAgenticRagConfig$outboundSchema).optional(),
2271
+ knowledgeId: z.string(),
2272
+ query: z.string().optional(),
2273
+ }).transform((v) => {
2274
+ return (0, primitives_js_1.remap)(v, {
2275
+ topK: "top_k",
2276
+ searchType: "search_type",
2277
+ filterBy: "filter_by",
2278
+ searchOptions: "search_options",
2279
+ rerankConfig: "rerank_config",
2280
+ agenticRagConfig: "agentic_rag_config",
2281
+ knowledgeId: "knowledge_id",
2282
+ });
2283
+ });
2284
+ function createChatCompletionKnowledgeBasesToJSON(createChatCompletionKnowledgeBases) {
2285
+ return JSON.stringify(exports.CreateChatCompletionKnowledgeBases$outboundSchema.parse(createChatCompletionKnowledgeBases));
2286
+ }
2287
+ function createChatCompletionKnowledgeBasesFromJSON(jsonString) {
2288
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionKnowledgeBases$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionKnowledgeBases' from JSON`);
2289
+ }
2290
+ /** @internal */
2291
+ exports.LoadBalancerType$inboundSchema = z.nativeEnum(exports.LoadBalancerType);
2292
+ /** @internal */
2293
+ exports.LoadBalancerType$outboundSchema = exports.LoadBalancerType$inboundSchema;
2294
+ /** @internal */
2295
+ exports.LoadBalancer1$inboundSchema = z.object({
2296
+ type: exports.LoadBalancerType$inboundSchema,
2297
+ model: z.string(),
2298
+ weight: z.number().default(0.5),
2299
+ });
2300
+ /** @internal */
2301
+ exports.LoadBalancer1$outboundSchema = z.object({
2302
+ type: exports.LoadBalancerType$outboundSchema,
2303
+ model: z.string(),
2304
+ weight: z.number().default(0.5),
2305
+ });
2306
+ function loadBalancer1ToJSON(loadBalancer1) {
2307
+ return JSON.stringify(exports.LoadBalancer1$outboundSchema.parse(loadBalancer1));
2308
+ }
2309
+ function loadBalancer1FromJSON(jsonString) {
2310
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LoadBalancer1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LoadBalancer1' from JSON`);
2311
+ }
2312
+ /** @internal */
2313
+ exports.LoadBalancer$inboundSchema = z.lazy(() => exports.LoadBalancer1$inboundSchema);
2314
+ /** @internal */
2315
+ exports.LoadBalancer$outboundSchema = z.lazy(() => exports.LoadBalancer1$outboundSchema);
2316
+ function loadBalancerToJSON(loadBalancer) {
2317
+ return JSON.stringify(exports.LoadBalancer$outboundSchema.parse(loadBalancer));
2318
+ }
2319
+ function loadBalancerFromJSON(jsonString) {
2320
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LoadBalancer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LoadBalancer' from JSON`);
2321
+ }
2322
+ /** @internal */
2323
+ exports.Timeout$inboundSchema = z.object({
2324
+ call_timeout: z.number(),
2325
+ }).transform((v) => {
2326
+ return (0, primitives_js_1.remap)(v, {
2327
+ "call_timeout": "callTimeout",
2328
+ });
2329
+ });
2330
+ /** @internal */
2331
+ exports.Timeout$outboundSchema = z.object({
2332
+ callTimeout: z.number(),
2333
+ }).transform((v) => {
2334
+ return (0, primitives_js_1.remap)(v, {
2335
+ callTimeout: "call_timeout",
2336
+ });
2337
+ });
2338
+ function timeoutToJSON(timeout) {
2339
+ return JSON.stringify(exports.Timeout$outboundSchema.parse(timeout));
2340
+ }
2341
+ function timeoutFromJSON(jsonString) {
2342
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Timeout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Timeout' from JSON`);
2343
+ }
2344
+ /** @internal */
2345
+ exports.Orq$inboundSchema = z
2346
+ .object({
2347
+ name: z.string().optional(),
2348
+ retry: z.lazy(() => exports.CreateChatCompletionRetry$inboundSchema).optional(),
2349
+ fallbacks: z.array(z.lazy(() => exports.Fallbacks$inboundSchema)).optional(),
2350
+ prompt: z.lazy(() => exports.Prompt$inboundSchema).optional(),
2351
+ contact: components.PublicContact$inboundSchema.optional(),
2352
+ thread: z.lazy(() => exports.CreateChatCompletionThread$inboundSchema).optional(),
2353
+ inputs: z.union([
2354
+ z.record(z.any()),
2355
+ z.array(z.lazy(() => exports.Inputs2$inboundSchema)),
2356
+ ]).optional(),
2357
+ cache: z.lazy(() => exports.Cache$inboundSchema).optional(),
2358
+ knowledge_bases: z.array(z.lazy(() => exports.CreateChatCompletionKnowledgeBases$inboundSchema)).optional(),
2359
+ load_balancer: z.array(z.lazy(() => exports.LoadBalancer1$inboundSchema))
2360
+ .optional(),
2361
+ timeout: z.lazy(() => exports.Timeout$inboundSchema).optional(),
2362
+ }).transform((v) => {
2363
+ return (0, primitives_js_1.remap)(v, {
2364
+ "knowledge_bases": "knowledgeBases",
2365
+ "load_balancer": "loadBalancer",
2366
+ });
2367
+ });
2368
+ /** @internal */
2369
+ exports.Orq$outboundSchema = z
2370
+ .object({
2371
+ name: z.string().optional(),
2372
+ retry: z.lazy(() => exports.CreateChatCompletionRetry$outboundSchema).optional(),
2373
+ fallbacks: z.array(z.lazy(() => exports.Fallbacks$outboundSchema)).optional(),
2374
+ prompt: z.lazy(() => exports.Prompt$outboundSchema).optional(),
2375
+ contact: components.PublicContact$outboundSchema.optional(),
2376
+ thread: z.lazy(() => exports.CreateChatCompletionThread$outboundSchema).optional(),
2377
+ inputs: z.union([
2378
+ z.record(z.any()),
2379
+ z.array(z.lazy(() => exports.Inputs2$outboundSchema)),
2380
+ ]).optional(),
2381
+ cache: z.lazy(() => exports.Cache$outboundSchema).optional(),
2382
+ knowledgeBases: z.array(z.lazy(() => exports.CreateChatCompletionKnowledgeBases$outboundSchema)).optional(),
2383
+ loadBalancer: z.array(z.lazy(() => exports.LoadBalancer1$outboundSchema))
2384
+ .optional(),
2385
+ timeout: z.lazy(() => exports.Timeout$outboundSchema).optional(),
2386
+ }).transform((v) => {
2387
+ return (0, primitives_js_1.remap)(v, {
2388
+ knowledgeBases: "knowledge_bases",
2389
+ loadBalancer: "load_balancer",
2390
+ });
2391
+ });
2392
+ function orqToJSON(orq) {
2393
+ return JSON.stringify(exports.Orq$outboundSchema.parse(orq));
2394
+ }
2395
+ function orqFromJSON(jsonString) {
2396
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Orq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Orq' from JSON`);
2397
+ }
2398
+ /** @internal */
2399
+ exports.CreateChatCompletionRequestBody$inboundSchema = z.object({
2400
+ messages: z.array(z.union([
2401
+ z.lazy(() => exports.CreateChatCompletionMessagesSystemMessage$inboundSchema),
2402
+ z.lazy(() => exports.CreateChatCompletionMessagesDeveloperMessage$inboundSchema),
2403
+ z.lazy(() => exports.CreateChatCompletionMessagesUserMessage$inboundSchema),
2404
+ z.lazy(() => exports.CreateChatCompletionMessagesAssistantMessage$inboundSchema),
2405
+ z.lazy(() => exports.CreateChatCompletionMessagesToolMessage$inboundSchema),
2406
+ ])),
2407
+ model: z.string(),
2408
+ metadata: z.record(z.string()).optional(),
2409
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionAudio$inboundSchema))
2410
+ .optional(),
2411
+ frequency_penalty: z.nullable(z.number()).optional(),
2412
+ max_tokens: z.nullable(z.number().int()).optional(),
2413
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
2414
+ logprobs: z.nullable(z.boolean()).optional(),
2415
+ top_logprobs: z.nullable(z.number().int()).optional(),
2416
+ n: z.nullable(z.number().int()).optional(),
2417
+ presence_penalty: z.nullable(z.number()).optional(),
2418
+ response_format: z.union([
2419
+ z.lazy(() => exports.CreateChatCompletionResponseFormatText$inboundSchema),
2420
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONObject$inboundSchema),
2421
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONSchema$inboundSchema),
2422
+ ]).optional(),
2423
+ reasoning_effort: exports.CreateChatCompletionReasoningEffort$inboundSchema
2424
+ .optional(),
2425
+ verbosity: z.string().optional(),
2426
+ seed: z.nullable(z.number()).optional(),
2427
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2428
+ stream_options: z.nullable(z.lazy(() => exports.CreateChatCompletionStreamOptions$inboundSchema)).optional(),
2429
+ thinking: z.union([
2430
+ components.ThinkingConfigDisabledSchema$inboundSchema,
2431
+ components.ThinkingConfigEnabledSchema$inboundSchema,
2432
+ ]).optional(),
2433
+ temperature: z.nullable(z.number()).optional(),
2434
+ top_p: z.nullable(z.number()).optional(),
2435
+ top_k: z.nullable(z.number()).optional(),
2436
+ tools: z.array(z.lazy(() => exports.CreateChatCompletionTools$inboundSchema))
2437
+ .optional(),
2438
+ tool_choice: z.union([
2439
+ z.lazy(() => exports.CreateChatCompletionToolChoice2$inboundSchema),
2440
+ exports.CreateChatCompletionToolChoice1$inboundSchema,
2441
+ ]).optional(),
2442
+ parallel_tool_calls: z.boolean().optional(),
2443
+ modalities: z.nullable(z.array(exports.CreateChatCompletionModalities$inboundSchema))
2444
+ .optional(),
2445
+ guardrails: z.array(z.lazy(() => exports.CreateChatCompletionGuardrails$inboundSchema)).optional(),
2446
+ orq: z.lazy(() => exports.Orq$inboundSchema).optional(),
2447
+ stream: z.boolean().default(false),
2448
+ }).transform((v) => {
2449
+ return (0, primitives_js_1.remap)(v, {
2450
+ "frequency_penalty": "frequencyPenalty",
2451
+ "max_tokens": "maxTokens",
2452
+ "max_completion_tokens": "maxCompletionTokens",
2453
+ "top_logprobs": "topLogprobs",
2454
+ "presence_penalty": "presencePenalty",
2455
+ "response_format": "responseFormat",
2456
+ "reasoning_effort": "reasoningEffort",
2457
+ "stream_options": "streamOptions",
2458
+ "top_p": "topP",
2459
+ "top_k": "topK",
2460
+ "tool_choice": "toolChoice",
2461
+ "parallel_tool_calls": "parallelToolCalls",
2462
+ });
2463
+ });
2464
+ /** @internal */
2465
+ exports.CreateChatCompletionRequestBody$outboundSchema = z.object({
2466
+ messages: z.array(z.union([
2467
+ z.lazy(() => exports.CreateChatCompletionMessagesSystemMessage$outboundSchema),
2468
+ z.lazy(() => exports.CreateChatCompletionMessagesDeveloperMessage$outboundSchema),
2469
+ z.lazy(() => exports.CreateChatCompletionMessagesUserMessage$outboundSchema),
2470
+ z.lazy(() => exports.CreateChatCompletionMessagesAssistantMessage$outboundSchema),
2471
+ z.lazy(() => exports.CreateChatCompletionMessagesToolMessage$outboundSchema),
2472
+ ])),
2473
+ model: z.string(),
2474
+ metadata: z.record(z.string()).optional(),
2475
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionAudio$outboundSchema))
2476
+ .optional(),
2477
+ frequencyPenalty: z.nullable(z.number()).optional(),
2478
+ maxTokens: z.nullable(z.number().int()).optional(),
2479
+ maxCompletionTokens: z.nullable(z.number().int()).optional(),
2480
+ logprobs: z.nullable(z.boolean()).optional(),
2481
+ topLogprobs: z.nullable(z.number().int()).optional(),
2482
+ n: z.nullable(z.number().int()).optional(),
2483
+ presencePenalty: z.nullable(z.number()).optional(),
2484
+ responseFormat: z.union([
2485
+ z.lazy(() => exports.CreateChatCompletionResponseFormatText$outboundSchema),
2486
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONObject$outboundSchema),
2487
+ z.lazy(() => exports.CreateChatCompletionResponseFormatJSONSchema$outboundSchema),
2488
+ ]).optional(),
2489
+ reasoningEffort: exports.CreateChatCompletionReasoningEffort$outboundSchema
2490
+ .optional(),
2491
+ verbosity: z.string().optional(),
2492
+ seed: z.nullable(z.number()).optional(),
2493
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2494
+ streamOptions: z.nullable(z.lazy(() => exports.CreateChatCompletionStreamOptions$outboundSchema)).optional(),
2495
+ thinking: z.union([
2496
+ components.ThinkingConfigDisabledSchema$outboundSchema,
2497
+ components.ThinkingConfigEnabledSchema$outboundSchema,
2498
+ ]).optional(),
2499
+ temperature: z.nullable(z.number()).optional(),
2500
+ topP: z.nullable(z.number()).optional(),
2501
+ topK: z.nullable(z.number()).optional(),
2502
+ tools: z.array(z.lazy(() => exports.CreateChatCompletionTools$outboundSchema))
2503
+ .optional(),
2504
+ toolChoice: z.union([
2505
+ z.lazy(() => exports.CreateChatCompletionToolChoice2$outboundSchema),
2506
+ exports.CreateChatCompletionToolChoice1$outboundSchema,
2507
+ ]).optional(),
2508
+ parallelToolCalls: z.boolean().optional(),
2509
+ modalities: z.nullable(z.array(exports.CreateChatCompletionModalities$outboundSchema))
2510
+ .optional(),
2511
+ guardrails: z.array(z.lazy(() => exports.CreateChatCompletionGuardrails$outboundSchema)).optional(),
2512
+ orq: z.lazy(() => exports.Orq$outboundSchema).optional(),
2513
+ stream: z.boolean().default(false),
2514
+ }).transform((v) => {
2515
+ return (0, primitives_js_1.remap)(v, {
2516
+ frequencyPenalty: "frequency_penalty",
2517
+ maxTokens: "max_tokens",
2518
+ maxCompletionTokens: "max_completion_tokens",
2519
+ topLogprobs: "top_logprobs",
2520
+ presencePenalty: "presence_penalty",
2521
+ responseFormat: "response_format",
2522
+ reasoningEffort: "reasoning_effort",
2523
+ streamOptions: "stream_options",
2524
+ topP: "top_p",
2525
+ topK: "top_k",
2526
+ toolChoice: "tool_choice",
2527
+ parallelToolCalls: "parallel_tool_calls",
2528
+ });
2529
+ });
2530
+ function createChatCompletionRequestBodyToJSON(createChatCompletionRequestBody) {
2531
+ return JSON.stringify(exports.CreateChatCompletionRequestBody$outboundSchema.parse(createChatCompletionRequestBody));
2532
+ }
2533
+ function createChatCompletionRequestBodyFromJSON(jsonString) {
2534
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRequestBody' from JSON`);
2535
+ }
2536
+ /** @internal */
2537
+ exports.CreateChatCompletionFinishReason$inboundSchema = z.nativeEnum(exports.CreateChatCompletionFinishReason);
2538
+ /** @internal */
2539
+ exports.CreateChatCompletionFinishReason$outboundSchema = exports.CreateChatCompletionFinishReason$inboundSchema;
2540
+ /** @internal */
2541
+ exports.CreateChatCompletionRouterTopLogprobs$inboundSchema = z.object({
2542
+ token: z.string(),
2543
+ logprob: z.number(),
2544
+ bytes: z.nullable(z.array(z.number())),
2545
+ });
2546
+ /** @internal */
2547
+ exports.CreateChatCompletionRouterTopLogprobs$outboundSchema = z.object({
2548
+ token: z.string(),
2549
+ logprob: z.number(),
2550
+ bytes: z.nullable(z.array(z.number())),
2551
+ });
2552
+ function createChatCompletionRouterTopLogprobsToJSON(createChatCompletionRouterTopLogprobs) {
2553
+ return JSON.stringify(exports.CreateChatCompletionRouterTopLogprobs$outboundSchema.parse(createChatCompletionRouterTopLogprobs));
2554
+ }
2555
+ function createChatCompletionRouterTopLogprobsFromJSON(jsonString) {
2556
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterTopLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterTopLogprobs' from JSON`);
2557
+ }
2558
+ /** @internal */
2559
+ exports.CreateChatCompletionRouterContent$inboundSchema = z.object({
2560
+ token: z.string(),
2561
+ logprob: z.number(),
2562
+ bytes: z.nullable(z.array(z.number())),
2563
+ top_logprobs: z.array(z.lazy(() => exports.CreateChatCompletionRouterTopLogprobs$inboundSchema)),
2564
+ }).transform((v) => {
2565
+ return (0, primitives_js_1.remap)(v, {
2566
+ "top_logprobs": "topLogprobs",
2567
+ });
2568
+ });
2569
+ /** @internal */
2570
+ exports.CreateChatCompletionRouterContent$outboundSchema = z.object({
2571
+ token: z.string(),
2572
+ logprob: z.number(),
2573
+ bytes: z.nullable(z.array(z.number())),
2574
+ topLogprobs: z.array(z.lazy(() => exports.CreateChatCompletionRouterTopLogprobs$outboundSchema)),
2575
+ }).transform((v) => {
2576
+ return (0, primitives_js_1.remap)(v, {
2577
+ topLogprobs: "top_logprobs",
2578
+ });
2579
+ });
2580
+ function createChatCompletionRouterContentToJSON(createChatCompletionRouterContent) {
2581
+ return JSON.stringify(exports.CreateChatCompletionRouterContent$outboundSchema.parse(createChatCompletionRouterContent));
2582
+ }
2583
+ function createChatCompletionRouterContentFromJSON(jsonString) {
2584
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterContent' from JSON`);
2585
+ }
2586
+ /** @internal */
2587
+ exports.CreateChatCompletionRouterResponseTopLogprobs$inboundSchema = z.object({
2588
+ token: z.string(),
2589
+ logprob: z.number(),
2590
+ bytes: z.nullable(z.array(z.number())),
2591
+ });
2592
+ /** @internal */
2593
+ exports.CreateChatCompletionRouterResponseTopLogprobs$outboundSchema = z.object({
2594
+ token: z.string(),
2595
+ logprob: z.number(),
2596
+ bytes: z.nullable(z.array(z.number())),
2597
+ });
2598
+ function createChatCompletionRouterResponseTopLogprobsToJSON(createChatCompletionRouterResponseTopLogprobs) {
2599
+ return JSON.stringify(exports.CreateChatCompletionRouterResponseTopLogprobs$outboundSchema.parse(createChatCompletionRouterResponseTopLogprobs));
2600
+ }
2601
+ function createChatCompletionRouterResponseTopLogprobsFromJSON(jsonString) {
2602
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterResponseTopLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterResponseTopLogprobs' from JSON`);
2603
+ }
2604
+ /** @internal */
2605
+ exports.CreateChatCompletionRefusal$inboundSchema = z.object({
2606
+ token: z.string(),
2607
+ logprob: z.number(),
2608
+ bytes: z.nullable(z.array(z.number())),
2609
+ top_logprobs: z.array(z.lazy(() => exports.CreateChatCompletionRouterResponseTopLogprobs$inboundSchema)),
2610
+ }).transform((v) => {
2611
+ return (0, primitives_js_1.remap)(v, {
2612
+ "top_logprobs": "topLogprobs",
2613
+ });
2614
+ });
2615
+ /** @internal */
2616
+ exports.CreateChatCompletionRefusal$outboundSchema = z.object({
2617
+ token: z.string(),
2618
+ logprob: z.number(),
2619
+ bytes: z.nullable(z.array(z.number())),
2620
+ topLogprobs: z.array(z.lazy(() => exports.CreateChatCompletionRouterResponseTopLogprobs$outboundSchema)),
2621
+ }).transform((v) => {
2622
+ return (0, primitives_js_1.remap)(v, {
2623
+ topLogprobs: "top_logprobs",
2624
+ });
2625
+ });
2626
+ function createChatCompletionRefusalToJSON(createChatCompletionRefusal) {
2627
+ return JSON.stringify(exports.CreateChatCompletionRefusal$outboundSchema.parse(createChatCompletionRefusal));
2628
+ }
2629
+ function createChatCompletionRefusalFromJSON(jsonString) {
2630
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRefusal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRefusal' from JSON`);
2631
+ }
2632
+ /** @internal */
2633
+ exports.CreateChatCompletionLogprobs$inboundSchema = z.object({
2634
+ content: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionRouterContent$inboundSchema))),
2635
+ refusal: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionRefusal$inboundSchema))),
2636
+ });
2637
+ /** @internal */
2638
+ exports.CreateChatCompletionLogprobs$outboundSchema = z.object({
2639
+ content: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionRouterContent$outboundSchema))),
2640
+ refusal: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionRefusal$outboundSchema))),
2641
+ });
2642
+ function createChatCompletionLogprobsToJSON(createChatCompletionLogprobs) {
2643
+ return JSON.stringify(exports.CreateChatCompletionLogprobs$outboundSchema.parse(createChatCompletionLogprobs));
2644
+ }
2645
+ function createChatCompletionLogprobsFromJSON(jsonString) {
2646
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionLogprobs' from JSON`);
2647
+ }
2648
+ /** @internal */
2649
+ exports.CreateChatCompletionRouterResponse200Type$inboundSchema = z
2650
+ .nativeEnum(exports.CreateChatCompletionRouterResponse200Type);
2651
+ /** @internal */
2652
+ exports.CreateChatCompletionRouterResponse200Type$outboundSchema = exports.CreateChatCompletionRouterResponse200Type$inboundSchema;
2653
+ /** @internal */
2654
+ exports.CreateChatCompletionRouterResponseFunction$inboundSchema = z.object({
2655
+ name: z.string().optional(),
2656
+ arguments: z.string().optional(),
2657
+ });
2658
+ /** @internal */
2659
+ exports.CreateChatCompletionRouterResponseFunction$outboundSchema = z.object({
2660
+ name: z.string().optional(),
2661
+ arguments: z.string().optional(),
2662
+ });
2663
+ function createChatCompletionRouterResponseFunctionToJSON(createChatCompletionRouterResponseFunction) {
2664
+ return JSON.stringify(exports.CreateChatCompletionRouterResponseFunction$outboundSchema.parse(createChatCompletionRouterResponseFunction));
2665
+ }
2666
+ function createChatCompletionRouterResponseFunctionFromJSON(jsonString) {
2667
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterResponseFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterResponseFunction' from JSON`);
2668
+ }
2669
+ /** @internal */
2670
+ exports.CreateChatCompletionRouterToolCalls$inboundSchema = z.object({
2671
+ index: z.number().optional(),
2672
+ id: z.string().optional(),
2673
+ type: exports.CreateChatCompletionRouterResponse200Type$inboundSchema.optional(),
2674
+ function: z.lazy(() => exports.CreateChatCompletionRouterResponseFunction$inboundSchema).optional(),
2675
+ thought_signature: z.string().optional(),
2676
+ }).transform((v) => {
2677
+ return (0, primitives_js_1.remap)(v, {
2678
+ "thought_signature": "thoughtSignature",
2679
+ });
2680
+ });
2681
+ /** @internal */
2682
+ exports.CreateChatCompletionRouterToolCalls$outboundSchema = z.object({
2683
+ index: z.number().optional(),
2684
+ id: z.string().optional(),
2685
+ type: exports.CreateChatCompletionRouterResponse200Type$outboundSchema.optional(),
2686
+ function: z.lazy(() => exports.CreateChatCompletionRouterResponseFunction$outboundSchema).optional(),
2687
+ thoughtSignature: z.string().optional(),
2688
+ }).transform((v) => {
2689
+ return (0, primitives_js_1.remap)(v, {
2690
+ thoughtSignature: "thought_signature",
2691
+ });
2692
+ });
2693
+ function createChatCompletionRouterToolCallsToJSON(createChatCompletionRouterToolCalls) {
2694
+ return JSON.stringify(exports.CreateChatCompletionRouterToolCalls$outboundSchema.parse(createChatCompletionRouterToolCalls));
2695
+ }
2696
+ function createChatCompletionRouterToolCallsFromJSON(jsonString) {
2697
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterToolCalls$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterToolCalls' from JSON`);
2698
+ }
2699
+ /** @internal */
2700
+ exports.CreateChatCompletionRouterRole$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRouterRole);
2701
+ /** @internal */
2702
+ exports.CreateChatCompletionRouterRole$outboundSchema = exports.CreateChatCompletionRouterRole$inboundSchema;
2703
+ /** @internal */
2704
+ exports.CreateChatCompletionRouterResponseAudio$inboundSchema = z.object({
2705
+ id: z.string().optional(),
2706
+ transcript: z.string().optional(),
2707
+ data: z.string().optional(),
2708
+ expires_at: z.number().int().optional(),
2709
+ }).transform((v) => {
2710
+ return (0, primitives_js_1.remap)(v, {
2711
+ "expires_at": "expiresAt",
2712
+ });
2713
+ });
2714
+ /** @internal */
2715
+ exports.CreateChatCompletionRouterResponseAudio$outboundSchema = z.object({
2716
+ id: z.string().optional(),
2717
+ transcript: z.string().optional(),
2718
+ data: z.string().optional(),
2719
+ expiresAt: z.number().int().optional(),
2720
+ }).transform((v) => {
2721
+ return (0, primitives_js_1.remap)(v, {
2722
+ expiresAt: "expires_at",
2723
+ });
2724
+ });
2725
+ function createChatCompletionRouterResponseAudioToJSON(createChatCompletionRouterResponseAudio) {
2726
+ return JSON.stringify(exports.CreateChatCompletionRouterResponseAudio$outboundSchema.parse(createChatCompletionRouterResponseAudio));
2727
+ }
2728
+ function createChatCompletionRouterResponseAudioFromJSON(jsonString) {
2729
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterResponseAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterResponseAudio' from JSON`);
2730
+ }
2731
+ /** @internal */
2732
+ exports.Delta$inboundSchema = z
2733
+ .object({
2734
+ content: z.nullable(z.string()).optional(),
2735
+ refusal: z.nullable(z.string()).optional(),
2736
+ tool_calls: z.array(z.lazy(() => exports.CreateChatCompletionRouterToolCalls$inboundSchema)).optional(),
2737
+ role: exports.CreateChatCompletionRouterRole$inboundSchema.optional(),
2738
+ reasoning: z.string().optional(),
2739
+ reasoning_signature: z.string().optional(),
2740
+ redacted_reasoning: z.string().optional(),
2741
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterResponseAudio$inboundSchema)).optional(),
2742
+ }).transform((v) => {
2743
+ return (0, primitives_js_1.remap)(v, {
2744
+ "tool_calls": "toolCalls",
2745
+ "reasoning_signature": "reasoningSignature",
2746
+ "redacted_reasoning": "redactedReasoning",
2747
+ });
2748
+ });
2749
+ /** @internal */
2750
+ exports.Delta$outboundSchema = z.object({
2751
+ content: z.nullable(z.string()).optional(),
2752
+ refusal: z.nullable(z.string()).optional(),
2753
+ toolCalls: z.array(z.lazy(() => exports.CreateChatCompletionRouterToolCalls$outboundSchema)).optional(),
2754
+ role: exports.CreateChatCompletionRouterRole$outboundSchema.optional(),
2755
+ reasoning: z.string().optional(),
2756
+ reasoningSignature: z.string().optional(),
2757
+ redactedReasoning: z.string().optional(),
2758
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterResponseAudio$outboundSchema)).optional(),
2759
+ }).transform((v) => {
2760
+ return (0, primitives_js_1.remap)(v, {
2761
+ toolCalls: "tool_calls",
2762
+ reasoningSignature: "reasoning_signature",
2763
+ redactedReasoning: "redacted_reasoning",
2764
+ });
2765
+ });
2766
+ function deltaToJSON(delta) {
2767
+ return JSON.stringify(exports.Delta$outboundSchema.parse(delta));
2768
+ }
2769
+ function deltaFromJSON(jsonString) {
2770
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Delta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Delta' from JSON`);
2771
+ }
2772
+ /** @internal */
2773
+ exports.CreateChatCompletionRouterChoices$inboundSchema = z.object({
2774
+ finish_reason: z.nullable(exports.CreateChatCompletionFinishReason$inboundSchema),
2775
+ index: z.number().default(0),
2776
+ logprobs: z.nullable(z.lazy(() => exports.CreateChatCompletionLogprobs$inboundSchema))
2777
+ .optional(),
2778
+ delta: z.lazy(() => exports.Delta$inboundSchema),
2779
+ }).transform((v) => {
2780
+ return (0, primitives_js_1.remap)(v, {
2781
+ "finish_reason": "finishReason",
2782
+ });
2783
+ });
2784
+ /** @internal */
2785
+ exports.CreateChatCompletionRouterChoices$outboundSchema = z.object({
2786
+ finishReason: z.nullable(exports.CreateChatCompletionFinishReason$outboundSchema),
2787
+ index: z.number().default(0),
2788
+ logprobs: z.nullable(z.lazy(() => exports.CreateChatCompletionLogprobs$outboundSchema)).optional(),
2789
+ delta: z.lazy(() => exports.Delta$outboundSchema),
2790
+ }).transform((v) => {
2791
+ return (0, primitives_js_1.remap)(v, {
2792
+ finishReason: "finish_reason",
2793
+ });
2794
+ });
2795
+ function createChatCompletionRouterChoicesToJSON(createChatCompletionRouterChoices) {
2796
+ return JSON.stringify(exports.CreateChatCompletionRouterChoices$outboundSchema.parse(createChatCompletionRouterChoices));
2797
+ }
2798
+ function createChatCompletionRouterChoicesFromJSON(jsonString) {
2799
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterChoices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterChoices' from JSON`);
2800
+ }
2801
+ /** @internal */
2802
+ exports.CreateChatCompletionRouterPromptTokensDetails$inboundSchema = z.object({
2803
+ cached_tokens: z.nullable(z.number().int()).optional(),
2804
+ cache_creation_tokens: z.nullable(z.number().int()).optional(),
2805
+ audio_tokens: z.nullable(z.number().int()).optional(),
2806
+ }).transform((v) => {
2807
+ return (0, primitives_js_1.remap)(v, {
2808
+ "cached_tokens": "cachedTokens",
2809
+ "cache_creation_tokens": "cacheCreationTokens",
2810
+ "audio_tokens": "audioTokens",
2811
+ });
2812
+ });
2813
+ /** @internal */
2814
+ exports.CreateChatCompletionRouterPromptTokensDetails$outboundSchema = z.object({
2815
+ cachedTokens: z.nullable(z.number().int()).optional(),
2816
+ cacheCreationTokens: z.nullable(z.number().int()).optional(),
2817
+ audioTokens: z.nullable(z.number().int()).optional(),
2818
+ }).transform((v) => {
2819
+ return (0, primitives_js_1.remap)(v, {
2820
+ cachedTokens: "cached_tokens",
2821
+ cacheCreationTokens: "cache_creation_tokens",
2822
+ audioTokens: "audio_tokens",
2823
+ });
2824
+ });
2825
+ function createChatCompletionRouterPromptTokensDetailsToJSON(createChatCompletionRouterPromptTokensDetails) {
2826
+ return JSON.stringify(exports.CreateChatCompletionRouterPromptTokensDetails$outboundSchema.parse(createChatCompletionRouterPromptTokensDetails));
2827
+ }
2828
+ function createChatCompletionRouterPromptTokensDetailsFromJSON(jsonString) {
2829
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterPromptTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterPromptTokensDetails' from JSON`);
2830
+ }
2831
+ /** @internal */
2832
+ exports.CreateChatCompletionRouterCompletionTokensDetails$inboundSchema = z.object({
2833
+ reasoning_tokens: z.nullable(z.number()).optional(),
2834
+ accepted_prediction_tokens: z.nullable(z.number()).optional(),
2835
+ rejected_prediction_tokens: z.nullable(z.number()).optional(),
2836
+ audio_tokens: z.nullable(z.number().int()).optional(),
2837
+ }).transform((v) => {
2838
+ return (0, primitives_js_1.remap)(v, {
2839
+ "reasoning_tokens": "reasoningTokens",
2840
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
2841
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
2842
+ "audio_tokens": "audioTokens",
2843
+ });
2844
+ });
2845
+ /** @internal */
2846
+ exports.CreateChatCompletionRouterCompletionTokensDetails$outboundSchema = z.object({
2847
+ reasoningTokens: z.nullable(z.number()).optional(),
2848
+ acceptedPredictionTokens: z.nullable(z.number()).optional(),
2849
+ rejectedPredictionTokens: z.nullable(z.number()).optional(),
2850
+ audioTokens: z.nullable(z.number().int()).optional(),
2851
+ }).transform((v) => {
2852
+ return (0, primitives_js_1.remap)(v, {
2853
+ reasoningTokens: "reasoning_tokens",
2854
+ acceptedPredictionTokens: "accepted_prediction_tokens",
2855
+ rejectedPredictionTokens: "rejected_prediction_tokens",
2856
+ audioTokens: "audio_tokens",
2857
+ });
2858
+ });
2859
+ function createChatCompletionRouterCompletionTokensDetailsToJSON(createChatCompletionRouterCompletionTokensDetails) {
2860
+ return JSON.stringify(exports.CreateChatCompletionRouterCompletionTokensDetails$outboundSchema.parse(createChatCompletionRouterCompletionTokensDetails));
2861
+ }
2862
+ function createChatCompletionRouterCompletionTokensDetailsFromJSON(jsonString) {
2863
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterCompletionTokensDetails' from JSON`);
2864
+ }
2865
+ /** @internal */
2866
+ exports.CreateChatCompletionRouterUsage$inboundSchema = z.object({
2867
+ completion_tokens: z.number().optional(),
2868
+ prompt_tokens: z.number().optional(),
2869
+ total_tokens: z.number().optional(),
2870
+ prompt_tokens_details: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterPromptTokensDetails$inboundSchema)).optional(),
2871
+ completion_tokens_details: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterCompletionTokensDetails$inboundSchema)).optional(),
2872
+ }).transform((v) => {
2873
+ return (0, primitives_js_1.remap)(v, {
2874
+ "completion_tokens": "completionTokens",
2875
+ "prompt_tokens": "promptTokens",
2876
+ "total_tokens": "totalTokens",
2877
+ "prompt_tokens_details": "promptTokensDetails",
2878
+ "completion_tokens_details": "completionTokensDetails",
2879
+ });
2880
+ });
2881
+ /** @internal */
2882
+ exports.CreateChatCompletionRouterUsage$outboundSchema = z.object({
2883
+ completionTokens: z.number().optional(),
2884
+ promptTokens: z.number().optional(),
2885
+ totalTokens: z.number().optional(),
2886
+ promptTokensDetails: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterPromptTokensDetails$outboundSchema)).optional(),
2887
+ completionTokensDetails: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterCompletionTokensDetails$outboundSchema)).optional(),
2888
+ }).transform((v) => {
2889
+ return (0, primitives_js_1.remap)(v, {
2890
+ completionTokens: "completion_tokens",
2891
+ promptTokens: "prompt_tokens",
2892
+ totalTokens: "total_tokens",
2893
+ promptTokensDetails: "prompt_tokens_details",
2894
+ completionTokensDetails: "completion_tokens_details",
2895
+ });
2896
+ });
2897
+ function createChatCompletionRouterUsageToJSON(createChatCompletionRouterUsage) {
2898
+ return JSON.stringify(exports.CreateChatCompletionRouterUsage$outboundSchema.parse(createChatCompletionRouterUsage));
2899
+ }
2900
+ function createChatCompletionRouterUsageFromJSON(jsonString) {
2901
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterUsage' from JSON`);
2902
+ }
2903
+ /** @internal */
2904
+ exports.CreateChatCompletionRouterObject$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRouterObject);
2905
+ /** @internal */
2906
+ exports.CreateChatCompletionRouterObject$outboundSchema = exports.CreateChatCompletionRouterObject$inboundSchema;
2907
+ /** @internal */
2908
+ exports.CreateChatCompletionData$inboundSchema = z.object({
2909
+ id: z.string(),
2910
+ choices: z.array(z.lazy(() => exports.CreateChatCompletionRouterChoices$inboundSchema)),
2911
+ created: z.number(),
2912
+ model: z.string(),
2913
+ system_fingerprint: z.nullable(z.string()).optional(),
2914
+ usage: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterUsage$inboundSchema))
2915
+ .optional(),
2916
+ object: exports.CreateChatCompletionRouterObject$inboundSchema,
2917
+ }).transform((v) => {
2918
+ return (0, primitives_js_1.remap)(v, {
2919
+ "system_fingerprint": "systemFingerprint",
2920
+ });
2921
+ });
2922
+ /** @internal */
2923
+ exports.CreateChatCompletionData$outboundSchema = z.object({
2924
+ id: z.string(),
2925
+ choices: z.array(z.lazy(() => exports.CreateChatCompletionRouterChoices$outboundSchema)),
2926
+ created: z.number(),
2927
+ model: z.string(),
2928
+ systemFingerprint: z.nullable(z.string()).optional(),
2929
+ usage: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterUsage$outboundSchema)).optional(),
2930
+ object: exports.CreateChatCompletionRouterObject$outboundSchema,
2931
+ }).transform((v) => {
2932
+ return (0, primitives_js_1.remap)(v, {
2933
+ systemFingerprint: "system_fingerprint",
2934
+ });
2935
+ });
2936
+ function createChatCompletionDataToJSON(createChatCompletionData) {
2937
+ return JSON.stringify(exports.CreateChatCompletionData$outboundSchema.parse(createChatCompletionData));
2938
+ }
2939
+ function createChatCompletionDataFromJSON(jsonString) {
2940
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionData' from JSON`);
2941
+ }
2942
+ /** @internal */
2943
+ exports.CreateChatCompletionRouterResponseBody$inboundSchema = z.object({
2944
+ data: z.string().optional().transform((v, ctx) => {
2945
+ if (v === undefined)
2946
+ return undefined;
2947
+ try {
2948
+ return JSON.parse(v);
2949
+ }
2950
+ catch (err) {
2951
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
2952
+ return z.NEVER;
2953
+ }
2954
+ }).pipe(z.lazy(() => exports.CreateChatCompletionData$inboundSchema).optional()),
2955
+ });
2956
+ /** @internal */
2957
+ exports.CreateChatCompletionRouterResponseBody$outboundSchema = z.object({
2958
+ data: z.lazy(() => exports.CreateChatCompletionData$outboundSchema).optional(),
2959
+ });
2960
+ function createChatCompletionRouterResponseBodyToJSON(createChatCompletionRouterResponseBody) {
2961
+ return JSON.stringify(exports.CreateChatCompletionRouterResponseBody$outboundSchema.parse(createChatCompletionRouterResponseBody));
2962
+ }
2963
+ function createChatCompletionRouterResponseBodyFromJSON(jsonString) {
2964
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterResponseBody' from JSON`);
2965
+ }
2966
+ /** @internal */
2967
+ exports.FinishReason$inboundSchema = z.nativeEnum(exports.FinishReason);
2968
+ /** @internal */
2969
+ exports.FinishReason$outboundSchema = exports.FinishReason$inboundSchema;
2970
+ /** @internal */
2971
+ exports.CreateChatCompletionRouterResponseType$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRouterResponseType);
2972
+ /** @internal */
2973
+ exports.CreateChatCompletionRouterResponseType$outboundSchema = exports.CreateChatCompletionRouterResponseType$inboundSchema;
2974
+ /** @internal */
2975
+ exports.CreateChatCompletionRouterFunction$inboundSchema = z.object({
2976
+ name: z.string().optional(),
2977
+ arguments: z.string().optional(),
2978
+ });
2979
+ /** @internal */
2980
+ exports.CreateChatCompletionRouterFunction$outboundSchema = z.object({
2981
+ name: z.string().optional(),
2982
+ arguments: z.string().optional(),
2983
+ });
2984
+ function createChatCompletionRouterFunctionToJSON(createChatCompletionRouterFunction) {
2985
+ return JSON.stringify(exports.CreateChatCompletionRouterFunction$outboundSchema.parse(createChatCompletionRouterFunction));
2986
+ }
2987
+ function createChatCompletionRouterFunctionFromJSON(jsonString) {
2988
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterFunction' from JSON`);
2989
+ }
2990
+ /** @internal */
2991
+ exports.CreateChatCompletionToolCalls$inboundSchema = z.object({
2992
+ index: z.number().optional(),
2993
+ id: z.string().optional(),
2994
+ type: exports.CreateChatCompletionRouterResponseType$inboundSchema.optional(),
2995
+ function: z.lazy(() => exports.CreateChatCompletionRouterFunction$inboundSchema)
2996
+ .optional(),
2997
+ thought_signature: z.string().optional(),
2998
+ }).transform((v) => {
2999
+ return (0, primitives_js_1.remap)(v, {
3000
+ "thought_signature": "thoughtSignature",
3001
+ });
3002
+ });
3003
+ /** @internal */
3004
+ exports.CreateChatCompletionToolCalls$outboundSchema = z.object({
3005
+ index: z.number().optional(),
3006
+ id: z.string().optional(),
3007
+ type: exports.CreateChatCompletionRouterResponseType$outboundSchema.optional(),
3008
+ function: z.lazy(() => exports.CreateChatCompletionRouterFunction$outboundSchema)
3009
+ .optional(),
3010
+ thoughtSignature: z.string().optional(),
3011
+ }).transform((v) => {
3012
+ return (0, primitives_js_1.remap)(v, {
3013
+ thoughtSignature: "thought_signature",
3014
+ });
3015
+ });
3016
+ function createChatCompletionToolCallsToJSON(createChatCompletionToolCalls) {
3017
+ return JSON.stringify(exports.CreateChatCompletionToolCalls$outboundSchema.parse(createChatCompletionToolCalls));
3018
+ }
3019
+ function createChatCompletionToolCallsFromJSON(jsonString) {
3020
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionToolCalls$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionToolCalls' from JSON`);
3021
+ }
3022
+ /** @internal */
3023
+ exports.CreateChatCompletionRole$inboundSchema = z.nativeEnum(exports.CreateChatCompletionRole);
3024
+ /** @internal */
3025
+ exports.CreateChatCompletionRole$outboundSchema = exports.CreateChatCompletionRole$inboundSchema;
3026
+ /** @internal */
3027
+ exports.CreateChatCompletionRouterAudio$inboundSchema = z.object({
3028
+ id: z.string(),
3029
+ expires_at: z.number().int(),
3030
+ data: z.string(),
3031
+ transcript: z.string(),
3032
+ }).transform((v) => {
3033
+ return (0, primitives_js_1.remap)(v, {
3034
+ "expires_at": "expiresAt",
3035
+ });
3036
+ });
3037
+ /** @internal */
3038
+ exports.CreateChatCompletionRouterAudio$outboundSchema = z.object({
3039
+ id: z.string(),
3040
+ expiresAt: z.number().int(),
3041
+ data: z.string(),
3042
+ transcript: z.string(),
3043
+ }).transform((v) => {
3044
+ return (0, primitives_js_1.remap)(v, {
3045
+ expiresAt: "expires_at",
3046
+ });
3047
+ });
3048
+ function createChatCompletionRouterAudioToJSON(createChatCompletionRouterAudio) {
3049
+ return JSON.stringify(exports.CreateChatCompletionRouterAudio$outboundSchema.parse(createChatCompletionRouterAudio));
3050
+ }
3051
+ function createChatCompletionRouterAudioFromJSON(jsonString) {
3052
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionRouterAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionRouterAudio' from JSON`);
3053
+ }
3054
+ /** @internal */
3055
+ exports.CreateChatCompletionMessage$inboundSchema = z.object({
3056
+ content: z.nullable(z.string()).optional(),
3057
+ refusal: z.nullable(z.string()).optional(),
3058
+ tool_calls: z.array(z.lazy(() => exports.CreateChatCompletionToolCalls$inboundSchema))
3059
+ .optional(),
3060
+ role: exports.CreateChatCompletionRole$inboundSchema.optional(),
3061
+ reasoning: z.nullable(z.string()).optional(),
3062
+ reasoning_signature: z.nullable(z.string()).optional(),
3063
+ redacted_reasoning: z.string().optional(),
3064
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterAudio$inboundSchema))
3065
+ .optional(),
3066
+ }).transform((v) => {
3067
+ return (0, primitives_js_1.remap)(v, {
3068
+ "tool_calls": "toolCalls",
3069
+ "reasoning_signature": "reasoningSignature",
3070
+ "redacted_reasoning": "redactedReasoning",
3071
+ });
3072
+ });
3073
+ /** @internal */
3074
+ exports.CreateChatCompletionMessage$outboundSchema = z.object({
3075
+ content: z.nullable(z.string()).optional(),
3076
+ refusal: z.nullable(z.string()).optional(),
3077
+ toolCalls: z.array(z.lazy(() => exports.CreateChatCompletionToolCalls$outboundSchema))
3078
+ .optional(),
3079
+ role: exports.CreateChatCompletionRole$outboundSchema.optional(),
3080
+ reasoning: z.nullable(z.string()).optional(),
3081
+ reasoningSignature: z.nullable(z.string()).optional(),
3082
+ redactedReasoning: z.string().optional(),
3083
+ audio: z.nullable(z.lazy(() => exports.CreateChatCompletionRouterAudio$outboundSchema)).optional(),
3084
+ }).transform((v) => {
3085
+ return (0, primitives_js_1.remap)(v, {
3086
+ toolCalls: "tool_calls",
3087
+ reasoningSignature: "reasoning_signature",
3088
+ redactedReasoning: "redacted_reasoning",
3089
+ });
3090
+ });
3091
+ function createChatCompletionMessageToJSON(createChatCompletionMessage) {
3092
+ return JSON.stringify(exports.CreateChatCompletionMessage$outboundSchema.parse(createChatCompletionMessage));
3093
+ }
3094
+ function createChatCompletionMessageFromJSON(jsonString) {
3095
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionMessage' from JSON`);
3096
+ }
3097
+ /** @internal */
3098
+ exports.TopLogprobs$inboundSchema = z.object({
3099
+ token: z.string(),
3100
+ logprob: z.number(),
3101
+ bytes: z.nullable(z.array(z.number())),
3102
+ });
3103
+ /** @internal */
3104
+ exports.TopLogprobs$outboundSchema = z.object({
3105
+ token: z.string(),
3106
+ logprob: z.number(),
3107
+ bytes: z.nullable(z.array(z.number())),
3108
+ });
3109
+ function topLogprobsToJSON(topLogprobs) {
3110
+ return JSON.stringify(exports.TopLogprobs$outboundSchema.parse(topLogprobs));
3111
+ }
3112
+ function topLogprobsFromJSON(jsonString) {
3113
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TopLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopLogprobs' from JSON`);
3114
+ }
3115
+ /** @internal */
3116
+ exports.CreateChatCompletionContent$inboundSchema = z.object({
3117
+ token: z.string(),
3118
+ logprob: z.number(),
3119
+ bytes: z.nullable(z.array(z.number())),
3120
+ top_logprobs: z.array(z.lazy(() => exports.TopLogprobs$inboundSchema)),
3121
+ }).transform((v) => {
3122
+ return (0, primitives_js_1.remap)(v, {
3123
+ "top_logprobs": "topLogprobs",
3124
+ });
3125
+ });
3126
+ /** @internal */
3127
+ exports.CreateChatCompletionContent$outboundSchema = z.object({
3128
+ token: z.string(),
3129
+ logprob: z.number(),
3130
+ bytes: z.nullable(z.array(z.number())),
3131
+ topLogprobs: z.array(z.lazy(() => exports.TopLogprobs$outboundSchema)),
3132
+ }).transform((v) => {
3133
+ return (0, primitives_js_1.remap)(v, {
3134
+ topLogprobs: "top_logprobs",
3135
+ });
3136
+ });
3137
+ function createChatCompletionContentToJSON(createChatCompletionContent) {
3138
+ return JSON.stringify(exports.CreateChatCompletionContent$outboundSchema.parse(createChatCompletionContent));
3139
+ }
3140
+ function createChatCompletionContentFromJSON(jsonString) {
3141
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionContent' from JSON`);
3142
+ }
3143
+ /** @internal */
3144
+ exports.CreateChatCompletionTopLogprobs$inboundSchema = z.object({
3145
+ token: z.string(),
3146
+ logprob: z.number(),
3147
+ bytes: z.nullable(z.array(z.number())),
3148
+ });
3149
+ /** @internal */
3150
+ exports.CreateChatCompletionTopLogprobs$outboundSchema = z.object({
3151
+ token: z.string(),
3152
+ logprob: z.number(),
3153
+ bytes: z.nullable(z.array(z.number())),
3154
+ });
3155
+ function createChatCompletionTopLogprobsToJSON(createChatCompletionTopLogprobs) {
3156
+ return JSON.stringify(exports.CreateChatCompletionTopLogprobs$outboundSchema.parse(createChatCompletionTopLogprobs));
3157
+ }
3158
+ function createChatCompletionTopLogprobsFromJSON(jsonString) {
3159
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionTopLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionTopLogprobs' from JSON`);
3160
+ }
3161
+ /** @internal */
3162
+ exports.Refusal$inboundSchema = z.object({
3163
+ token: z.string(),
3164
+ logprob: z.number(),
3165
+ bytes: z.nullable(z.array(z.number())),
3166
+ top_logprobs: z.array(z.lazy(() => exports.CreateChatCompletionTopLogprobs$inboundSchema)),
3167
+ }).transform((v) => {
3168
+ return (0, primitives_js_1.remap)(v, {
3169
+ "top_logprobs": "topLogprobs",
3170
+ });
3171
+ });
3172
+ /** @internal */
3173
+ exports.Refusal$outboundSchema = z.object({
3174
+ token: z.string(),
3175
+ logprob: z.number(),
3176
+ bytes: z.nullable(z.array(z.number())),
3177
+ topLogprobs: z.array(z.lazy(() => exports.CreateChatCompletionTopLogprobs$outboundSchema)),
3178
+ }).transform((v) => {
3179
+ return (0, primitives_js_1.remap)(v, {
3180
+ topLogprobs: "top_logprobs",
3181
+ });
3182
+ });
3183
+ function refusalToJSON(refusal) {
3184
+ return JSON.stringify(exports.Refusal$outboundSchema.parse(refusal));
3185
+ }
3186
+ function refusalFromJSON(jsonString) {
3187
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Refusal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Refusal' from JSON`);
3188
+ }
3189
+ /** @internal */
3190
+ exports.Logprobs$inboundSchema = z.object({
3191
+ content: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionContent$inboundSchema))),
3192
+ refusal: z.nullable(z.array(z.lazy(() => exports.Refusal$inboundSchema))),
3193
+ });
3194
+ /** @internal */
3195
+ exports.Logprobs$outboundSchema = z.object({
3196
+ content: z.nullable(z.array(z.lazy(() => exports.CreateChatCompletionContent$outboundSchema))),
3197
+ refusal: z.nullable(z.array(z.lazy(() => exports.Refusal$outboundSchema))),
3198
+ });
3199
+ function logprobsToJSON(logprobs) {
3200
+ return JSON.stringify(exports.Logprobs$outboundSchema.parse(logprobs));
3201
+ }
3202
+ function logprobsFromJSON(jsonString) {
3203
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Logprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Logprobs' from JSON`);
3204
+ }
3205
+ /** @internal */
3206
+ exports.CreateChatCompletionChoices$inboundSchema = z.object({
3207
+ finish_reason: z.nullable(exports.FinishReason$inboundSchema),
3208
+ index: z.number().default(0),
3209
+ message: z.lazy(() => exports.CreateChatCompletionMessage$inboundSchema),
3210
+ logprobs: z.nullable(z.lazy(() => exports.Logprobs$inboundSchema)).optional(),
3211
+ }).transform((v) => {
3212
+ return (0, primitives_js_1.remap)(v, {
3213
+ "finish_reason": "finishReason",
3214
+ });
3215
+ });
3216
+ /** @internal */
3217
+ exports.CreateChatCompletionChoices$outboundSchema = z.object({
3218
+ finishReason: z.nullable(exports.FinishReason$outboundSchema),
3219
+ index: z.number().default(0),
3220
+ message: z.lazy(() => exports.CreateChatCompletionMessage$outboundSchema),
3221
+ logprobs: z.nullable(z.lazy(() => exports.Logprobs$outboundSchema)).optional(),
3222
+ }).transform((v) => {
3223
+ return (0, primitives_js_1.remap)(v, {
3224
+ finishReason: "finish_reason",
3225
+ });
3226
+ });
3227
+ function createChatCompletionChoicesToJSON(createChatCompletionChoices) {
3228
+ return JSON.stringify(exports.CreateChatCompletionChoices$outboundSchema.parse(createChatCompletionChoices));
3229
+ }
3230
+ function createChatCompletionChoicesFromJSON(jsonString) {
3231
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionChoices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionChoices' from JSON`);
3232
+ }
3233
+ /** @internal */
3234
+ exports.CreateChatCompletionPromptTokensDetails$inboundSchema = z.object({
3235
+ cached_tokens: z.nullable(z.number().int()).optional(),
3236
+ cache_creation_tokens: z.nullable(z.number().int()).optional(),
3237
+ audio_tokens: z.nullable(z.number().int()).optional(),
3238
+ }).transform((v) => {
3239
+ return (0, primitives_js_1.remap)(v, {
3240
+ "cached_tokens": "cachedTokens",
3241
+ "cache_creation_tokens": "cacheCreationTokens",
3242
+ "audio_tokens": "audioTokens",
3243
+ });
3244
+ });
3245
+ /** @internal */
3246
+ exports.CreateChatCompletionPromptTokensDetails$outboundSchema = z.object({
3247
+ cachedTokens: z.nullable(z.number().int()).optional(),
3248
+ cacheCreationTokens: z.nullable(z.number().int()).optional(),
3249
+ audioTokens: z.nullable(z.number().int()).optional(),
3250
+ }).transform((v) => {
3251
+ return (0, primitives_js_1.remap)(v, {
3252
+ cachedTokens: "cached_tokens",
3253
+ cacheCreationTokens: "cache_creation_tokens",
3254
+ audioTokens: "audio_tokens",
3255
+ });
3256
+ });
3257
+ function createChatCompletionPromptTokensDetailsToJSON(createChatCompletionPromptTokensDetails) {
3258
+ return JSON.stringify(exports.CreateChatCompletionPromptTokensDetails$outboundSchema.parse(createChatCompletionPromptTokensDetails));
3259
+ }
3260
+ function createChatCompletionPromptTokensDetailsFromJSON(jsonString) {
3261
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionPromptTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionPromptTokensDetails' from JSON`);
3262
+ }
3263
+ /** @internal */
3264
+ exports.CreateChatCompletionCompletionTokensDetails$inboundSchema = z.object({
3265
+ reasoning_tokens: z.nullable(z.number()).optional(),
3266
+ accepted_prediction_tokens: z.nullable(z.number()).optional(),
3267
+ rejected_prediction_tokens: z.nullable(z.number()).optional(),
3268
+ audio_tokens: z.nullable(z.number().int()).optional(),
3269
+ }).transform((v) => {
3270
+ return (0, primitives_js_1.remap)(v, {
3271
+ "reasoning_tokens": "reasoningTokens",
3272
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
3273
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
3274
+ "audio_tokens": "audioTokens",
3275
+ });
3276
+ });
3277
+ /** @internal */
3278
+ exports.CreateChatCompletionCompletionTokensDetails$outboundSchema = z.object({
3279
+ reasoningTokens: z.nullable(z.number()).optional(),
3280
+ acceptedPredictionTokens: z.nullable(z.number()).optional(),
3281
+ rejectedPredictionTokens: z.nullable(z.number()).optional(),
3282
+ audioTokens: z.nullable(z.number().int()).optional(),
3283
+ }).transform((v) => {
3284
+ return (0, primitives_js_1.remap)(v, {
3285
+ reasoningTokens: "reasoning_tokens",
3286
+ acceptedPredictionTokens: "accepted_prediction_tokens",
3287
+ rejectedPredictionTokens: "rejected_prediction_tokens",
3288
+ audioTokens: "audio_tokens",
3289
+ });
3290
+ });
3291
+ function createChatCompletionCompletionTokensDetailsToJSON(createChatCompletionCompletionTokensDetails) {
3292
+ return JSON.stringify(exports.CreateChatCompletionCompletionTokensDetails$outboundSchema.parse(createChatCompletionCompletionTokensDetails));
3293
+ }
3294
+ function createChatCompletionCompletionTokensDetailsFromJSON(jsonString) {
3295
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionCompletionTokensDetails' from JSON`);
3296
+ }
3297
+ /** @internal */
3298
+ exports.CreateChatCompletionUsage$inboundSchema = z.object({
3299
+ completion_tokens: z.number().optional(),
3300
+ prompt_tokens: z.number().optional(),
3301
+ total_tokens: z.number().optional(),
3302
+ prompt_tokens_details: z.nullable(z.lazy(() => exports.CreateChatCompletionPromptTokensDetails$inboundSchema)).optional(),
3303
+ completion_tokens_details: z.nullable(z.lazy(() => exports.CreateChatCompletionCompletionTokensDetails$inboundSchema)).optional(),
3304
+ }).transform((v) => {
3305
+ return (0, primitives_js_1.remap)(v, {
3306
+ "completion_tokens": "completionTokens",
3307
+ "prompt_tokens": "promptTokens",
3308
+ "total_tokens": "totalTokens",
3309
+ "prompt_tokens_details": "promptTokensDetails",
3310
+ "completion_tokens_details": "completionTokensDetails",
3311
+ });
3312
+ });
3313
+ /** @internal */
3314
+ exports.CreateChatCompletionUsage$outboundSchema = z.object({
3315
+ completionTokens: z.number().optional(),
3316
+ promptTokens: z.number().optional(),
3317
+ totalTokens: z.number().optional(),
3318
+ promptTokensDetails: z.nullable(z.lazy(() => exports.CreateChatCompletionPromptTokensDetails$outboundSchema)).optional(),
3319
+ completionTokensDetails: z.nullable(z.lazy(() => exports.CreateChatCompletionCompletionTokensDetails$outboundSchema)).optional(),
3320
+ }).transform((v) => {
3321
+ return (0, primitives_js_1.remap)(v, {
3322
+ completionTokens: "completion_tokens",
3323
+ promptTokens: "prompt_tokens",
3324
+ totalTokens: "total_tokens",
3325
+ promptTokensDetails: "prompt_tokens_details",
3326
+ completionTokensDetails: "completion_tokens_details",
3327
+ });
3328
+ });
3329
+ function createChatCompletionUsageToJSON(createChatCompletionUsage) {
3330
+ return JSON.stringify(exports.CreateChatCompletionUsage$outboundSchema.parse(createChatCompletionUsage));
3331
+ }
3332
+ function createChatCompletionUsageFromJSON(jsonString) {
3333
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionUsage' from JSON`);
3334
+ }
3335
+ /** @internal */
3336
+ exports.CreateChatCompletionObject$inboundSchema = z.nativeEnum(exports.CreateChatCompletionObject);
3337
+ /** @internal */
3338
+ exports.CreateChatCompletionObject$outboundSchema = exports.CreateChatCompletionObject$inboundSchema;
3339
+ /** @internal */
3340
+ exports.CreateChatCompletionResponseBody$inboundSchema = z.object({
3341
+ id: z.string(),
3342
+ choices: z.array(z.lazy(() => exports.CreateChatCompletionChoices$inboundSchema)),
3343
+ created: z.number(),
3344
+ model: z.string(),
3345
+ system_fingerprint: z.nullable(z.string()).optional(),
3346
+ usage: z.nullable(z.lazy(() => exports.CreateChatCompletionUsage$inboundSchema))
3347
+ .optional(),
3348
+ object: exports.CreateChatCompletionObject$inboundSchema,
3349
+ }).transform((v) => {
3350
+ return (0, primitives_js_1.remap)(v, {
3351
+ "system_fingerprint": "systemFingerprint",
3352
+ });
3353
+ });
3354
+ /** @internal */
3355
+ exports.CreateChatCompletionResponseBody$outboundSchema = z.object({
3356
+ id: z.string(),
3357
+ choices: z.array(z.lazy(() => exports.CreateChatCompletionChoices$outboundSchema)),
3358
+ created: z.number(),
3359
+ model: z.string(),
3360
+ systemFingerprint: z.nullable(z.string()).optional(),
3361
+ usage: z.nullable(z.lazy(() => exports.CreateChatCompletionUsage$outboundSchema))
3362
+ .optional(),
3363
+ object: exports.CreateChatCompletionObject$outboundSchema,
3364
+ }).transform((v) => {
3365
+ return (0, primitives_js_1.remap)(v, {
3366
+ systemFingerprint: "system_fingerprint",
3367
+ });
3368
+ });
3369
+ function createChatCompletionResponseBodyToJSON(createChatCompletionResponseBody) {
3370
+ return JSON.stringify(exports.CreateChatCompletionResponseBody$outboundSchema.parse(createChatCompletionResponseBody));
3371
+ }
3372
+ function createChatCompletionResponseBodyFromJSON(jsonString) {
3373
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponseBody' from JSON`);
3374
+ }
3375
+ /** @internal */
3376
+ exports.CreateChatCompletionResponse$inboundSchema = z.union([
3377
+ z.lazy(() => exports.CreateChatCompletionResponseBody$inboundSchema),
3378
+ z.instanceof((ReadableStream))
3379
+ .transform(stream => {
3380
+ return new event_streams_js_1.EventStream(stream, rawEvent => {
3381
+ if (rawEvent.data === "[DONE]")
3382
+ return { done: true };
3383
+ return {
3384
+ value: z.lazy(() => exports.CreateChatCompletionRouterResponseBody$inboundSchema).parse(rawEvent),
3385
+ };
3386
+ });
3387
+ }),
3388
+ ]);
3389
+ /** @internal */
3390
+ exports.CreateChatCompletionResponse$outboundSchema = z.union([
3391
+ z.lazy(() => exports.CreateChatCompletionResponseBody$outboundSchema),
3392
+ z.never(),
3393
+ ]);
3394
+ function createChatCompletionResponseToJSON(createChatCompletionResponse) {
3395
+ return JSON.stringify(exports.CreateChatCompletionResponse$outboundSchema.parse(createChatCompletionResponse));
3396
+ }
3397
+ function createChatCompletionResponseFromJSON(jsonString) {
3398
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateChatCompletionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChatCompletionResponse' from JSON`);
3399
+ }
3400
+ //# sourceMappingURL=createchatcompletion.js.map