@orq-ai/node 4.6.0-rc.6 → 4.6.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 (1073) hide show
  1. package/FUNCTIONS.md +3 -19
  2. package/README.md +165 -131
  3. package/examples/postV2Feedback.example.ts +26 -0
  4. package/funcs/agentsDelete.js.map +1 -1
  5. package/funcs/agentsInvoke.js.map +1 -1
  6. package/funcs/agentsPostV2AgentsKeyCardRefresh.js.map +1 -1
  7. package/funcs/agentsResponsesCreate.js.map +1 -1
  8. package/funcs/agentsResponsesGet.js.map +1 -1
  9. package/funcs/agentsRetrieve.js.map +1 -1
  10. package/funcs/agentsStream.js.map +1 -1
  11. package/funcs/agentsUpdate.js.map +1 -1
  12. package/funcs/annotationsCreate.js.map +1 -1
  13. package/funcs/annotationsDelete.js.map +1 -1
  14. package/funcs/datasetsClear.js.map +1 -1
  15. package/funcs/datasetsCreateDatapoint.js.map +1 -1
  16. package/funcs/datasetsDelete.js.map +1 -1
  17. package/funcs/datasetsDeleteDatapoint.js.map +1 -1
  18. package/funcs/datasetsListDatapoints.js.map +1 -1
  19. package/funcs/datasetsRetrieve.js.map +1 -1
  20. package/funcs/datasetsRetrieveDatapoint.js.map +1 -1
  21. package/funcs/datasetsUpdate.js.map +1 -1
  22. package/funcs/datasetsUpdateDatapoint.js.map +1 -1
  23. package/funcs/deleteV2HumanEvalsId.d.ts +12 -0
  24. package/funcs/deleteV2HumanEvalsId.d.ts.map +1 -0
  25. package/funcs/deleteV2HumanEvalsId.js +117 -0
  26. package/funcs/deleteV2HumanEvalsId.js.map +1 -0
  27. package/funcs/deploymentsMetricsCreate.d.ts +2 -0
  28. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  29. package/funcs/deploymentsMetricsCreate.js +2 -0
  30. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  31. package/funcs/evalsDelete.js.map +1 -1
  32. package/funcs/evalsInvoke.js.map +1 -1
  33. package/funcs/evalsUpdate.js.map +1 -1
  34. package/funcs/evaluatorsGetV2EvaluatorsIdVersions.js.map +1 -1
  35. package/funcs/filesCreate.d.ts +1 -1
  36. package/funcs/filesCreate.d.ts.map +1 -1
  37. package/funcs/filesCreate.js +6 -12
  38. package/funcs/filesCreate.js.map +1 -1
  39. package/funcs/filesDelete.js.map +1 -1
  40. package/funcs/filesGet.d.ts +1 -1
  41. package/funcs/filesGet.js +1 -1
  42. package/funcs/filesGet.js.map +1 -1
  43. package/funcs/filesGetContent.d.ts +17 -0
  44. package/funcs/filesGetContent.d.ts.map +1 -0
  45. package/funcs/filesGetContent.js +120 -0
  46. package/funcs/filesGetContent.js.map +1 -0
  47. package/funcs/filesList.js +1 -1
  48. package/funcs/filesList.js.map +1 -1
  49. package/funcs/filesUpdate.d.ts +17 -0
  50. package/funcs/filesUpdate.d.ts.map +1 -0
  51. package/funcs/filesUpdate.js +120 -0
  52. package/funcs/filesUpdate.js.map +1 -0
  53. package/funcs/getV2HumanEvals.d.ts +12 -0
  54. package/funcs/getV2HumanEvals.d.ts.map +1 -0
  55. package/funcs/getV2HumanEvals.js +116 -0
  56. package/funcs/getV2HumanEvals.js.map +1 -0
  57. package/funcs/getV2HumanEvalsId.d.ts +12 -0
  58. package/funcs/getV2HumanEvalsId.d.ts.map +1 -0
  59. package/funcs/getV2HumanEvalsId.js +117 -0
  60. package/funcs/getV2HumanEvalsId.js.map +1 -0
  61. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.d.ts +14 -0
  62. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.d.ts.map +1 -0
  63. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.js +117 -0
  64. package/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.js.map +1 -0
  65. package/funcs/humanReviewSetsGetV2HumanEvalSets.d.ts +14 -0
  66. package/funcs/humanReviewSetsGetV2HumanEvalSets.d.ts.map +1 -0
  67. package/funcs/humanReviewSetsGetV2HumanEvalSets.js +115 -0
  68. package/funcs/humanReviewSetsGetV2HumanEvalSets.js.map +1 -0
  69. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.d.ts +14 -0
  70. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.d.ts.map +1 -0
  71. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.js +116 -0
  72. package/funcs/humanReviewSetsGetV2HumanEvalSetsId.js.map +1 -0
  73. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.d.ts +14 -0
  74. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.d.ts.map +1 -0
  75. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.js +117 -0
  76. package/funcs/humanReviewSetsPatchV2HumanEvalSetsId.js.map +1 -0
  77. package/funcs/humanReviewSetsPostV2HumanEvalSets.d.ts +14 -0
  78. package/funcs/humanReviewSetsPostV2HumanEvalSets.d.ts.map +1 -0
  79. package/funcs/humanReviewSetsPostV2HumanEvalSets.js +113 -0
  80. package/funcs/humanReviewSetsPostV2HumanEvalSets.js.map +1 -0
  81. package/funcs/identitiesDelete.js.map +1 -1
  82. package/funcs/identitiesRetrieve.js.map +1 -1
  83. package/funcs/identitiesUpdate.js.map +1 -1
  84. package/funcs/knowledgeCreateChunks.d.ts +1 -1
  85. package/funcs/knowledgeCreateChunks.d.ts.map +1 -1
  86. package/funcs/knowledgeCreateChunks.js +1 -1
  87. package/funcs/knowledgeCreateChunks.js.map +1 -1
  88. package/funcs/knowledgeCreateDatasource.js.map +1 -1
  89. package/funcs/knowledgeDelete.js.map +1 -1
  90. package/funcs/knowledgeDeleteChunk.js.map +1 -1
  91. package/funcs/knowledgeDeleteChunks.js.map +1 -1
  92. package/funcs/knowledgeDeleteDatasource.js.map +1 -1
  93. package/funcs/knowledgeGetChunksCount.js.map +1 -1
  94. package/funcs/knowledgeListChunks.js.map +1 -1
  95. package/funcs/knowledgeListChunksPaginated.js.map +1 -1
  96. package/funcs/knowledgeListDatasources.js.map +1 -1
  97. package/funcs/knowledgeRetrieve.js.map +1 -1
  98. package/funcs/knowledgeRetrieveChunk.js.map +1 -1
  99. package/funcs/knowledgeRetrieveDatasource.js.map +1 -1
  100. package/funcs/knowledgeSearch.js.map +1 -1
  101. package/funcs/knowledgeUpdate.js.map +1 -1
  102. package/funcs/knowledgeUpdateChunk.js.map +1 -1
  103. package/funcs/knowledgeUpdateDatasource.js.map +1 -1
  104. package/funcs/memoryStoresCreateDocument.js.map +1 -1
  105. package/funcs/memoryStoresCreateMemory.js.map +1 -1
  106. package/funcs/memoryStoresDelete.js.map +1 -1
  107. package/funcs/memoryStoresDeleteDocument.js.map +1 -1
  108. package/funcs/memoryStoresDeleteMemory.js.map +1 -1
  109. package/funcs/memoryStoresListDocuments.js.map +1 -1
  110. package/funcs/memoryStoresListMemories.js.map +1 -1
  111. package/funcs/memoryStoresRetrieve.js.map +1 -1
  112. package/funcs/memoryStoresRetrieveDocument.js.map +1 -1
  113. package/funcs/memoryStoresRetrieveMemory.js.map +1 -1
  114. package/funcs/memoryStoresUpdate.js.map +1 -1
  115. package/funcs/memoryStoresUpdateDocument.js.map +1 -1
  116. package/funcs/memoryStoresUpdateMemory.js.map +1 -1
  117. package/funcs/modelsList.d.ts +1 -1
  118. package/funcs/modelsList.d.ts.map +1 -1
  119. package/funcs/modelsList.js +16 -3
  120. package/funcs/modelsList.js.map +1 -1
  121. package/funcs/patchV2HumanEvalsId.d.ts +12 -0
  122. package/funcs/patchV2HumanEvalsId.d.ts.map +1 -0
  123. package/funcs/patchV2HumanEvalsId.js +118 -0
  124. package/funcs/patchV2HumanEvalsId.js.map +1 -0
  125. package/funcs/postV2Feedback.d.ts +12 -0
  126. package/funcs/postV2Feedback.d.ts.map +1 -0
  127. package/funcs/postV2Feedback.js +114 -0
  128. package/funcs/postV2Feedback.js.map +1 -0
  129. package/funcs/{feedbackCreate.d.ts → postV2FeedbackEvaluation.d.ts} +2 -8
  130. package/funcs/postV2FeedbackEvaluation.d.ts.map +1 -0
  131. package/funcs/{feedbackCreate.js → postV2FeedbackEvaluation.js} +13 -15
  132. package/funcs/postV2FeedbackEvaluation.js.map +1 -0
  133. package/funcs/postV2FeedbackEvaluationRemove.d.ts +11 -0
  134. package/funcs/postV2FeedbackEvaluationRemove.d.ts.map +1 -0
  135. package/funcs/postV2FeedbackEvaluationRemove.js +112 -0
  136. package/funcs/postV2FeedbackEvaluationRemove.js.map +1 -0
  137. package/funcs/postV2FeedbackRemove.d.ts +12 -0
  138. package/funcs/postV2FeedbackRemove.d.ts.map +1 -0
  139. package/funcs/postV2FeedbackRemove.js +115 -0
  140. package/funcs/postV2FeedbackRemove.js.map +1 -0
  141. package/funcs/postV2HumanEvals.d.ts +12 -0
  142. package/funcs/postV2HumanEvals.d.ts.map +1 -0
  143. package/funcs/postV2HumanEvals.js +114 -0
  144. package/funcs/postV2HumanEvals.js.map +1 -0
  145. package/funcs/promptsDelete.js.map +1 -1
  146. package/funcs/promptsGetVersion.js.map +1 -1
  147. package/funcs/promptsListVersions.js.map +1 -1
  148. package/funcs/promptsRetrieve.js.map +1 -1
  149. package/funcs/promptsUpdate.js.map +1 -1
  150. package/funcs/routerAudioTranscriptionsCreate.d.ts.map +1 -1
  151. package/funcs/routerAudioTranscriptionsCreate.js +5 -11
  152. package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
  153. package/funcs/routerAudioTranslationsCreate.d.ts.map +1 -1
  154. package/funcs/routerAudioTranslationsCreate.js +5 -11
  155. package/funcs/routerAudioTranslationsCreate.js.map +1 -1
  156. package/funcs/toolsDelete.js.map +1 -1
  157. package/funcs/toolsGetV2ToolsToolIdVersions.js.map +1 -1
  158. package/funcs/toolsGetV2ToolsToolIdVersionsVersionId.js.map +1 -1
  159. package/funcs/toolsRetrieve.js.map +1 -1
  160. package/funcs/toolsUpdate.js.map +1 -1
  161. package/jsr.json +1 -1
  162. package/lib/config.d.ts +3 -3
  163. package/lib/config.js +3 -3
  164. package/lib/config.js.map +1 -1
  165. package/lib/encodings.d.ts.map +1 -1
  166. package/lib/encodings.js +20 -5
  167. package/lib/encodings.js.map +1 -1
  168. package/lib/files.d.ts +13 -0
  169. package/lib/files.d.ts.map +1 -1
  170. package/lib/files.js +19 -0
  171. package/lib/files.js.map +1 -1
  172. package/lib/sdks.d.ts.map +1 -1
  173. package/lib/sdks.js +8 -4
  174. package/lib/sdks.js.map +1 -1
  175. package/lib/url.d.ts.map +1 -1
  176. package/lib/url.js +4 -2
  177. package/lib/url.js.map +1 -1
  178. package/models/components/filedocument.d.ts +15 -0
  179. package/models/components/filedocument.d.ts.map +1 -0
  180. package/models/components/filedocument.js +62 -0
  181. package/models/components/filedocument.js.map +1 -0
  182. package/models/components/index.d.ts +2 -0
  183. package/models/components/index.d.ts.map +1 -1
  184. package/models/components/index.js +2 -0
  185. package/models/components/index.js.map +1 -1
  186. package/models/components/reasoningpart.js +1 -1
  187. package/models/components/thinkingconfigadaptiveschema.d.ts +23 -0
  188. package/models/components/thinkingconfigadaptiveschema.d.ts.map +1 -0
  189. package/models/components/thinkingconfigadaptiveschema.js +58 -0
  190. package/models/components/thinkingconfigadaptiveschema.js.map +1 -0
  191. package/models/errors/deletev2humanevalsid.d.ts +23 -0
  192. package/models/errors/deletev2humanevalsid.d.ts.map +1 -0
  193. package/models/errors/deletev2humanevalsid.js +68 -0
  194. package/models/errors/deletev2humanevalsid.js.map +1 -0
  195. package/models/errors/getv2humanevals.d.ts +23 -0
  196. package/models/errors/getv2humanevals.d.ts.map +1 -0
  197. package/models/errors/getv2humanevals.js +68 -0
  198. package/models/errors/getv2humanevals.js.map +1 -0
  199. package/models/errors/getv2humanevalsid.d.ts +23 -0
  200. package/models/errors/getv2humanevalsid.d.ts.map +1 -0
  201. package/models/errors/getv2humanevalsid.js +68 -0
  202. package/models/errors/getv2humanevalsid.js.map +1 -0
  203. package/models/errors/index.d.ts +7 -0
  204. package/models/errors/index.d.ts.map +1 -1
  205. package/models/errors/index.js +7 -0
  206. package/models/errors/index.js.map +1 -1
  207. package/models/errors/patchv2humanevalsid.d.ts +23 -0
  208. package/models/errors/patchv2humanevalsid.d.ts.map +1 -0
  209. package/models/errors/patchv2humanevalsid.js +68 -0
  210. package/models/errors/patchv2humanevalsid.js.map +1 -0
  211. package/models/errors/postv2feedback.d.ts +43 -0
  212. package/models/errors/postv2feedback.d.ts.map +1 -0
  213. package/models/errors/postv2feedback.js +94 -0
  214. package/models/errors/postv2feedback.js.map +1 -0
  215. package/models/errors/postv2feedbackremove.d.ts +23 -0
  216. package/models/errors/postv2feedbackremove.d.ts.map +1 -0
  217. package/models/errors/postv2feedbackremove.js +68 -0
  218. package/models/errors/postv2feedbackremove.js.map +1 -0
  219. package/models/errors/postv2humanevals.d.ts +23 -0
  220. package/models/errors/postv2humanevals.d.ts.map +1 -0
  221. package/models/errors/postv2humanevals.js +68 -0
  222. package/models/errors/postv2humanevals.js.map +1 -0
  223. package/models/operations/createagentrequest.d.ts +28 -24
  224. package/models/operations/createagentrequest.d.ts.map +1 -1
  225. package/models/operations/createagentrequest.js +21 -11
  226. package/models/operations/createagentrequest.js.map +1 -1
  227. package/models/operations/createchatcompletion.d.ts +4 -4
  228. package/models/operations/createchatcompletion.d.ts.map +1 -1
  229. package/models/operations/createchatcompletion.js +2 -0
  230. package/models/operations/createchatcompletion.js.map +1 -1
  231. package/models/operations/createchunk.d.ts +3 -3
  232. package/models/operations/createchunk.d.ts.map +1 -1
  233. package/models/operations/createchunk.js +5 -5
  234. package/models/operations/createchunk.js.map +1 -1
  235. package/models/operations/createcompletion.d.ts +14 -0
  236. package/models/operations/createcompletion.d.ts.map +1 -1
  237. package/models/operations/createcompletion.js +18 -2
  238. package/models/operations/createcompletion.js.map +1 -1
  239. package/models/operations/createcontact.js +1 -1
  240. package/models/operations/createdataset.js +1 -1
  241. package/models/operations/createdatasetitem.d.ts +4 -4
  242. package/models/operations/createdatasetitem.d.ts.map +1 -1
  243. package/models/operations/createdatasetitem.js +10 -9
  244. package/models/operations/createdatasetitem.js.map +1 -1
  245. package/models/operations/createdatasource.js +1 -1
  246. package/models/operations/createeval.d.ts +26 -26
  247. package/models/operations/createeval.d.ts.map +1 -1
  248. package/models/operations/createeval.js +46 -48
  249. package/models/operations/createeval.js.map +1 -1
  250. package/models/operations/createidentity.js +1 -1
  251. package/models/operations/createknowledge.d.ts +17 -17
  252. package/models/operations/createknowledge.d.ts.map +1 -1
  253. package/models/operations/createknowledge.js +21 -21
  254. package/models/operations/createknowledge.js.map +1 -1
  255. package/models/operations/createprompt.d.ts +8 -6
  256. package/models/operations/createprompt.d.ts.map +1 -1
  257. package/models/operations/createprompt.js +6 -0
  258. package/models/operations/createprompt.js.map +1 -1
  259. package/models/operations/createresponse.d.ts +15 -0
  260. package/models/operations/createresponse.d.ts.map +1 -1
  261. package/models/operations/createresponse.js +19 -3
  262. package/models/operations/createresponse.js.map +1 -1
  263. package/models/operations/createtool.js +6 -6
  264. package/models/operations/deletev2humanevalsetsid.d.ts +15 -0
  265. package/models/operations/deletev2humanevalsetsid.d.ts.map +1 -0
  266. package/models/operations/deletev2humanevalsetsid.js +49 -0
  267. package/models/operations/deletev2humanevalsetsid.js.map +1 -0
  268. package/models/operations/deletev2humanevalsid.d.ts +27 -0
  269. package/models/operations/deletev2humanevalsid.d.ts.map +1 -0
  270. package/models/operations/deletev2humanevalsid.js +59 -0
  271. package/models/operations/deletev2humanevalsid.js.map +1 -0
  272. package/models/operations/deploymentgetconfig.d.ts +1 -0
  273. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  274. package/models/operations/deploymentgetconfig.js +1 -0
  275. package/models/operations/deploymentgetconfig.js.map +1 -1
  276. package/models/operations/deploymentinvoke.d.ts +4 -0
  277. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  278. package/models/operations/deploymentinvoke.js +4 -0
  279. package/models/operations/deploymentinvoke.js.map +1 -1
  280. package/models/operations/deployments.d.ts +2 -0
  281. package/models/operations/deployments.d.ts.map +1 -1
  282. package/models/operations/deployments.js +2 -0
  283. package/models/operations/deployments.js.map +1 -1
  284. package/models/operations/deploymentstream.d.ts +4 -0
  285. package/models/operations/deploymentstream.d.ts.map +1 -1
  286. package/models/operations/deploymentstream.js +4 -0
  287. package/models/operations/deploymentstream.js.map +1 -1
  288. package/models/operations/filecontent.d.ts +15 -0
  289. package/models/operations/filecontent.d.ts.map +1 -0
  290. package/models/operations/filecontent.js +54 -0
  291. package/models/operations/filecontent.js.map +1 -0
  292. package/models/operations/fileget.d.ts +2 -30
  293. package/models/operations/fileget.d.ts.map +1 -1
  294. package/models/operations/fileget.js +4 -16
  295. package/models/operations/fileget.js.map +1 -1
  296. package/models/operations/filelist.d.ts +5 -52
  297. package/models/operations/filelist.d.ts.map +1 -1
  298. package/models/operations/filelist.js +4 -39
  299. package/models/operations/filelist.js.map +1 -1
  300. package/models/operations/fileupdate.d.ts +43 -0
  301. package/models/operations/fileupdate.d.ts.map +1 -0
  302. package/models/operations/{createfeedback.js → fileupdate.js} +33 -30
  303. package/models/operations/fileupdate.js.map +1 -0
  304. package/models/operations/fileupload.d.ts +2 -29
  305. package/models/operations/fileupload.d.ts.map +1 -1
  306. package/models/operations/fileupload.js +4 -16
  307. package/models/operations/fileupload.js.map +1 -1
  308. package/models/operations/getallprompts.d.ts +4 -2
  309. package/models/operations/getallprompts.d.ts.map +1 -1
  310. package/models/operations/getallprompts.js +4 -0
  311. package/models/operations/getallprompts.js.map +1 -1
  312. package/models/operations/getalltools.js +6 -6
  313. package/models/operations/getevals.js +16 -16
  314. package/models/operations/getoneprompt.d.ts +4 -2
  315. package/models/operations/getoneprompt.d.ts.map +1 -1
  316. package/models/operations/getoneprompt.js +4 -0
  317. package/models/operations/getoneprompt.js.map +1 -1
  318. package/models/operations/getpromptversion.d.ts +4 -2
  319. package/models/operations/getpromptversion.d.ts.map +1 -1
  320. package/models/operations/getpromptversion.js +4 -0
  321. package/models/operations/getpromptversion.js.map +1 -1
  322. package/models/operations/getv2humanevals.d.ts +356 -0
  323. package/models/operations/getv2humanevals.d.ts.map +1 -0
  324. package/models/operations/getv2humanevals.js +274 -0
  325. package/models/operations/getv2humanevals.js.map +1 -0
  326. package/models/operations/getv2humanevalsets.d.ts +103 -0
  327. package/models/operations/getv2humanevalsets.d.ts.map +1 -0
  328. package/models/operations/getv2humanevalsets.js +128 -0
  329. package/models/operations/getv2humanevalsets.js.map +1 -0
  330. package/models/operations/getv2humanevalsetsid.d.ts +106 -0
  331. package/models/operations/getv2humanevalsetsid.d.ts.map +1 -0
  332. package/models/operations/getv2humanevalsetsid.js +124 -0
  333. package/models/operations/getv2humanevalsetsid.js.map +1 -0
  334. package/models/operations/getv2humanevalsid.d.ts +359 -0
  335. package/models/operations/getv2humanevalsid.d.ts.map +1 -0
  336. package/models/operations/getv2humanevalsid.js +271 -0
  337. package/models/operations/getv2humanevalsid.js.map +1 -0
  338. package/models/operations/index.d.ts +16 -1
  339. package/models/operations/index.d.ts.map +1 -1
  340. package/models/operations/index.js +16 -1
  341. package/models/operations/index.js.map +1 -1
  342. package/models/operations/invokeeval.d.ts +1 -0
  343. package/models/operations/invokeeval.d.ts.map +1 -1
  344. package/models/operations/invokeeval.js +1 -0
  345. package/models/operations/invokeeval.js.map +1 -1
  346. package/models/operations/listagents.d.ts +8 -4
  347. package/models/operations/listagents.d.ts.map +1 -1
  348. package/models/operations/listagents.js +5 -0
  349. package/models/operations/listagents.js.map +1 -1
  350. package/models/operations/listdatasetdatapoints.js +4 -4
  351. package/models/operations/listdatasets.js +1 -1
  352. package/models/operations/listdatasources.js +1 -1
  353. package/models/operations/listidentities.js +1 -1
  354. package/models/operations/listmodels.d.ts +10 -0
  355. package/models/operations/listmodels.d.ts.map +1 -1
  356. package/models/operations/listmodels.js +9 -1
  357. package/models/operations/listmodels.js.map +1 -1
  358. package/models/operations/listpromptversions.d.ts +4 -2
  359. package/models/operations/listpromptversions.d.ts.map +1 -1
  360. package/models/operations/listpromptversions.js +4 -0
  361. package/models/operations/listpromptversions.js.map +1 -1
  362. package/models/operations/parse.d.ts +4 -4
  363. package/models/operations/parse.d.ts.map +1 -1
  364. package/models/operations/parse.js +4 -4
  365. package/models/operations/parse.js.map +1 -1
  366. package/models/operations/patchv2humanevalsetsid.d.ts +184 -0
  367. package/models/operations/patchv2humanevalsetsid.d.ts.map +1 -0
  368. package/models/operations/patchv2humanevalsetsid.js +183 -0
  369. package/models/operations/patchv2humanevalsetsid.js.map +1 -0
  370. package/models/operations/patchv2humanevalsid.d.ts +703 -0
  371. package/models/operations/patchv2humanevalsid.d.ts.map +1 -0
  372. package/models/operations/patchv2humanevalsid.js +474 -0
  373. package/models/operations/patchv2humanevalsid.js.map +1 -0
  374. package/models/operations/postv2feedback.d.ts +120 -0
  375. package/models/operations/postv2feedback.d.ts.map +1 -0
  376. package/models/operations/postv2feedback.js +131 -0
  377. package/models/operations/postv2feedback.js.map +1 -0
  378. package/models/operations/postv2feedbackevaluation.d.ts +174 -0
  379. package/models/operations/postv2feedbackevaluation.d.ts.map +1 -0
  380. package/models/operations/postv2feedbackevaluation.js +167 -0
  381. package/models/operations/postv2feedbackevaluation.js.map +1 -0
  382. package/models/operations/postv2feedbackevaluationremove.d.ts +14 -0
  383. package/models/operations/postv2feedbackevaluationremove.d.ts.map +1 -0
  384. package/models/operations/postv2feedbackevaluationremove.js +55 -0
  385. package/models/operations/postv2feedbackevaluationremove.js.map +1 -0
  386. package/models/operations/postv2feedbackremove.d.ts +74 -0
  387. package/models/operations/postv2feedbackremove.d.ts.map +1 -0
  388. package/models/operations/postv2feedbackremove.js +113 -0
  389. package/models/operations/postv2feedbackremove.js.map +1 -0
  390. package/models/operations/postv2humanevals.d.ts +628 -0
  391. package/models/operations/postv2humanevals.d.ts.map +1 -0
  392. package/models/operations/postv2humanevals.js +427 -0
  393. package/models/operations/postv2humanevals.js.map +1 -0
  394. package/models/operations/postv2humanevalsets.d.ts +169 -0
  395. package/models/operations/postv2humanevalsets.d.ts.map +1 -0
  396. package/models/operations/postv2humanevalsets.js +167 -0
  397. package/models/operations/postv2humanevalsets.js.map +1 -0
  398. package/models/operations/retrieveagentrequest.d.ts +8 -4
  399. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  400. package/models/operations/retrieveagentrequest.js +5 -0
  401. package/models/operations/retrieveagentrequest.js.map +1 -1
  402. package/models/operations/retrievedatapoint.js +4 -4
  403. package/models/operations/retrievedataset.js +1 -1
  404. package/models/operations/retrievedatasource.js +1 -1
  405. package/models/operations/retrieveidentity.js +1 -1
  406. package/models/operations/retrievetool.js +6 -6
  407. package/models/operations/runagent.d.ts +8 -8
  408. package/models/operations/runagent.d.ts.map +1 -1
  409. package/models/operations/runagent.js +5 -1
  410. package/models/operations/runagent.js.map +1 -1
  411. package/models/operations/streamrunagent.d.ts +8 -8
  412. package/models/operations/streamrunagent.d.ts.map +1 -1
  413. package/models/operations/streamrunagent.js +5 -1
  414. package/models/operations/streamrunagent.js.map +1 -1
  415. package/models/operations/updateagent.d.ts +32 -28
  416. package/models/operations/updateagent.d.ts.map +1 -1
  417. package/models/operations/updateagent.js +26 -17
  418. package/models/operations/updateagent.js.map +1 -1
  419. package/models/operations/updatedatapoint.js +4 -4
  420. package/models/operations/updatedataset.js +1 -1
  421. package/models/operations/updatedatasource.js +1 -1
  422. package/models/operations/updateeval.d.ts +144 -536
  423. package/models/operations/updateeval.d.ts.map +1 -1
  424. package/models/operations/updateeval.js +156 -520
  425. package/models/operations/updateeval.js.map +1 -1
  426. package/models/operations/updateidentity.js +1 -1
  427. package/models/operations/updateprompt.d.ts +8 -6
  428. package/models/operations/updateprompt.d.ts.map +1 -1
  429. package/models/operations/updateprompt.js +6 -0
  430. package/models/operations/updateprompt.js.map +1 -1
  431. package/models/operations/updatetool.d.ts +16 -16
  432. package/models/operations/updatetool.d.ts.map +1 -1
  433. package/models/operations/updatetool.js +24 -26
  434. package/models/operations/updatetool.js.map +1 -1
  435. package/package.json +3 -4
  436. package/packages/orq-rc/examples/postV2Feedback.example.ts +26 -0
  437. package/packages/orq-rc/src/core.ts +13 -0
  438. package/packages/orq-rc/src/funcs/agentsCreate.ts +161 -0
  439. package/packages/orq-rc/src/funcs/agentsDelete.ts +179 -0
  440. package/packages/orq-rc/src/funcs/agentsInvoke.ts +176 -0
  441. package/packages/orq-rc/src/funcs/agentsList.ts +184 -0
  442. package/packages/orq-rc/src/funcs/agentsPostV2AgentsA2a.ts +178 -0
  443. package/packages/orq-rc/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +186 -0
  444. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +182 -0
  445. package/packages/orq-rc/src/funcs/agentsResponsesGet.ts +181 -0
  446. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +179 -0
  447. package/packages/orq-rc/src/funcs/agentsRun.ts +162 -0
  448. package/packages/orq-rc/src/funcs/agentsStream.ts +203 -0
  449. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +189 -0
  450. package/packages/orq-rc/src/funcs/agentsUpdate.ts +183 -0
  451. package/packages/orq-rc/src/funcs/annotationsCreate.ts +170 -0
  452. package/packages/orq-rc/src/funcs/annotationsDelete.ts +170 -0
  453. package/packages/orq-rc/src/funcs/chunkingParse.ts +160 -0
  454. package/{src/funcs/feedbackCreate.ts → packages/orq-rc/src/funcs/contactsCreate.ts} +12 -12
  455. package/packages/orq-rc/src/funcs/datasetsClear.ts +166 -0
  456. package/packages/orq-rc/src/funcs/datasetsCreate.ts +165 -0
  457. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +170 -0
  458. package/packages/orq-rc/src/funcs/datasetsDelete.ts +166 -0
  459. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +181 -0
  460. package/packages/orq-rc/src/funcs/datasetsList.ts +167 -0
  461. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +173 -0
  462. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +174 -0
  463. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +180 -0
  464. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +175 -0
  465. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +178 -0
  466. package/packages/orq-rc/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  467. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +168 -0
  468. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +176 -0
  469. package/packages/orq-rc/src/funcs/deploymentsList.ts +176 -0
  470. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +169 -0
  471. package/packages/orq-rc/src/funcs/deploymentsStream.ts +186 -0
  472. package/packages/orq-rc/src/funcs/evalsAll.ts +173 -0
  473. package/packages/orq-rc/src/funcs/evalsCreate.ts +169 -0
  474. package/packages/orq-rc/src/funcs/evalsDelete.ts +172 -0
  475. package/packages/orq-rc/src/funcs/evalsInvoke.ts +180 -0
  476. package/packages/orq-rc/src/funcs/evalsUpdate.ts +172 -0
  477. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +182 -0
  478. package/packages/orq-rc/src/funcs/filesCreate.ts +194 -0
  479. package/packages/orq-rc/src/funcs/filesDelete.ts +163 -0
  480. package/packages/orq-rc/src/funcs/filesGet.ts +165 -0
  481. package/packages/orq-rc/src/funcs/filesGetContent.ts +166 -0
  482. package/packages/orq-rc/src/funcs/filesList.ts +167 -0
  483. package/packages/orq-rc/src/funcs/filesUpdate.ts +166 -0
  484. package/packages/orq-rc/src/funcs/getV2HumanEvals.ts +169 -0
  485. package/packages/orq-rc/src/funcs/getV2HumanEvalsId.ts +168 -0
  486. package/packages/orq-rc/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  487. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  488. package/packages/orq-rc/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  489. package/packages/orq-rc/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  490. package/packages/orq-rc/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  491. package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
  492. package/packages/orq-rc/src/funcs/identitiesDelete.ts +175 -0
  493. package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
  494. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +174 -0
  495. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +175 -0
  496. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
  497. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +170 -0
  498. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +165 -0
  499. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +166 -0
  500. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +173 -0
  501. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +169 -0
  502. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +172 -0
  503. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +169 -0
  504. package/packages/orq-rc/src/funcs/knowledgeList.ts +169 -0
  505. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +177 -0
  506. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +170 -0
  507. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +173 -0
  508. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +165 -0
  509. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +172 -0
  510. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +168 -0
  511. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +166 -0
  512. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +163 -0
  513. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +173 -0
  514. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +169 -0
  515. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +162 -0
  516. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  517. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +169 -0
  518. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +167 -0
  519. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  520. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  521. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  522. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +183 -0
  523. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  524. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +176 -0
  525. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  526. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  527. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +167 -0
  528. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  529. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  530. package/packages/orq-rc/src/funcs/modelsList.ts +165 -0
  531. package/packages/orq-rc/src/funcs/patchV2HumanEvalsId.ts +170 -0
  532. package/packages/orq-rc/src/funcs/postV2Feedback.ts +172 -0
  533. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  534. package/packages/orq-rc/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  535. package/packages/orq-rc/src/funcs/postV2FeedbackRemove.ts +167 -0
  536. package/packages/orq-rc/src/funcs/postV2HumanEvals.ts +168 -0
  537. package/packages/orq-rc/src/funcs/promptsCreate.ts +160 -0
  538. package/packages/orq-rc/src/funcs/promptsDelete.ts +172 -0
  539. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +180 -0
  540. package/packages/orq-rc/src/funcs/promptsList.ts +167 -0
  541. package/packages/orq-rc/src/funcs/promptsListVersions.ts +172 -0
  542. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +165 -0
  543. package/packages/orq-rc/src/funcs/promptsUpdate.ts +172 -0
  544. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +161 -0
  545. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +161 -0
  546. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +269 -0
  547. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +259 -0
  548. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +168 -0
  549. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +168 -0
  550. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +161 -0
  551. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +222 -0
  552. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +160 -0
  553. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +218 -0
  554. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +167 -0
  555. package/packages/orq-rc/src/funcs/routerOcr.ts +158 -0
  556. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +160 -0
  557. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +167 -0
  558. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  559. package/packages/orq-rc/src/funcs/toolsDelete.ts +166 -0
  560. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +182 -0
  561. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +189 -0
  562. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  563. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +165 -0
  564. package/packages/orq-rc/src/funcs/toolsUpdate.ts +175 -0
  565. package/packages/orq-rc/src/hooks/global.ts +44 -0
  566. package/packages/orq-rc/src/hooks/hooks.ts +132 -0
  567. package/packages/orq-rc/src/hooks/index.ts +6 -0
  568. package/packages/orq-rc/src/hooks/registration.ts +15 -0
  569. package/packages/orq-rc/src/hooks/types.ts +112 -0
  570. package/packages/orq-rc/src/index.ts +9 -0
  571. package/packages/orq-rc/src/lib/base64.ts +37 -0
  572. package/packages/orq-rc/src/lib/config.ts +74 -0
  573. package/packages/orq-rc/src/lib/dlv.ts +53 -0
  574. package/packages/orq-rc/src/lib/encodings.ts +516 -0
  575. package/packages/orq-rc/src/lib/env.ts +89 -0
  576. package/packages/orq-rc/src/lib/event-streams.ts +165 -0
  577. package/packages/orq-rc/src/lib/files.ts +104 -0
  578. package/packages/orq-rc/src/lib/http.ts +323 -0
  579. package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
  580. package/packages/orq-rc/src/lib/logger.ts +9 -0
  581. package/packages/orq-rc/src/lib/matchers.ts +346 -0
  582. package/packages/orq-rc/src/lib/primitives.ts +150 -0
  583. package/packages/orq-rc/src/lib/retries.ts +218 -0
  584. package/packages/orq-rc/src/lib/schemas.ts +91 -0
  585. package/packages/orq-rc/src/lib/sdks.ts +409 -0
  586. package/packages/orq-rc/src/lib/security.ts +263 -0
  587. package/packages/orq-rc/src/lib/url.ts +35 -0
  588. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +99 -0
  589. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +185 -0
  590. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +73 -0
  591. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +91 -0
  592. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +71 -0
  593. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +507 -0
  594. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +165 -0
  595. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +103 -0
  596. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +517 -0
  597. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +807 -0
  598. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +136 -0
  599. package/packages/orq-rc/src/models/components/createagentresponse.ts +305 -0
  600. package/packages/orq-rc/src/models/components/datapart.ts +38 -0
  601. package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
  602. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +66 -0
  603. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +71 -0
  604. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +61 -0
  605. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +67 -0
  606. package/packages/orq-rc/src/models/components/extendedmessage.ts +146 -0
  607. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +87 -0
  608. package/packages/orq-rc/src/models/components/filedocument.ts +48 -0
  609. package/packages/orq-rc/src/models/components/filepart.ts +218 -0
  610. package/packages/orq-rc/src/models/components/getagentresponse.ts +348 -0
  611. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +268 -0
  612. package/packages/orq-rc/src/models/components/index.ts +61 -0
  613. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +3450 -0
  614. package/packages/orq-rc/src/models/components/partdelta.ts +39 -0
  615. package/packages/orq-rc/src/models/components/partdeltaevent.ts +73 -0
  616. package/packages/orq-rc/src/models/components/partdoneevent.ts +70 -0
  617. package/packages/orq-rc/src/models/components/publiccontact.ts +71 -0
  618. package/packages/orq-rc/src/models/components/publicidentity.ts +69 -0
  619. package/packages/orq-rc/src/models/components/reasoningpart.ts +62 -0
  620. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +71 -0
  621. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +66 -0
  622. package/packages/orq-rc/src/models/components/refusalpartschema.ts +64 -0
  623. package/packages/orq-rc/src/models/components/responsedoneevent.ts +324 -0
  624. package/packages/orq-rc/src/models/components/responsefailedevent.ts +72 -0
  625. package/packages/orq-rc/src/models/components/responsestartedevent.ts +97 -0
  626. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +85 -0
  627. package/packages/orq-rc/src/models/components/reviewoutcome.ts +23 -0
  628. package/packages/orq-rc/src/models/components/security.ts +32 -0
  629. package/packages/orq-rc/src/models/components/telemetry.ts +48 -0
  630. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +207 -0
  631. package/packages/orq-rc/src/models/components/textpart.ts +54 -0
  632. package/packages/orq-rc/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  633. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +59 -0
  634. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +106 -0
  635. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +64 -0
  636. package/packages/orq-rc/src/models/components/toolcallpart.ts +51 -0
  637. package/packages/orq-rc/src/models/components/tooldoneevent.ts +77 -0
  638. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +230 -0
  639. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +214 -0
  640. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +200 -0
  641. package/packages/orq-rc/src/models/components/toolfailedevent.ts +77 -0
  642. package/packages/orq-rc/src/models/components/toolresultpart.ts +71 -0
  643. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +78 -0
  644. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +87 -0
  645. package/packages/orq-rc/src/models/components/toolstartedevent.ts +82 -0
  646. package/packages/orq-rc/src/models/errors/apierror.ts +40 -0
  647. package/packages/orq-rc/src/models/errors/createeval.ts +51 -0
  648. package/packages/orq-rc/src/models/errors/createmoderation.ts +84 -0
  649. package/packages/orq-rc/src/models/errors/createtranscription.ts +87 -0
  650. package/packages/orq-rc/src/models/errors/createtranslation.ts +87 -0
  651. package/packages/orq-rc/src/models/errors/deleteagent.ts +51 -0
  652. package/packages/orq-rc/src/models/errors/deleteeval.ts +51 -0
  653. package/packages/orq-rc/src/models/errors/deleteidentity.ts +62 -0
  654. package/packages/orq-rc/src/models/errors/deleteprompt.ts +51 -0
  655. package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +51 -0
  656. package/packages/orq-rc/src/models/errors/getevals.ts +51 -0
  657. package/packages/orq-rc/src/models/errors/getpromptversion.ts +51 -0
  658. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +51 -0
  659. package/packages/orq-rc/src/models/errors/getv2humanevals.ts +51 -0
  660. package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +51 -0
  661. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +51 -0
  662. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +52 -0
  663. package/packages/orq-rc/src/models/errors/honoapierror.ts +59 -0
  664. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
  665. package/packages/orq-rc/src/models/errors/index.ts +42 -0
  666. package/packages/orq-rc/src/models/errors/invokeeval.ts +141 -0
  667. package/packages/orq-rc/src/models/errors/orqerror.ts +35 -0
  668. package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +51 -0
  669. package/packages/orq-rc/src/models/errors/postv2agentsa2a.ts +96 -0
  670. package/packages/orq-rc/src/models/errors/postv2agentskeycardrefresh.ts +97 -0
  671. package/packages/orq-rc/src/models/errors/postv2feedback.ts +96 -0
  672. package/packages/orq-rc/src/models/errors/postv2feedbackremove.ts +51 -0
  673. package/packages/orq-rc/src/models/errors/postv2humanevals.ts +51 -0
  674. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +50 -0
  675. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +51 -0
  676. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +62 -0
  677. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +109 -0
  678. package/packages/orq-rc/src/models/errors/streamagent.ts +51 -0
  679. package/packages/orq-rc/src/models/errors/streamrunagent.ts +51 -0
  680. package/packages/orq-rc/src/models/errors/updateagent.ts +51 -0
  681. package/packages/orq-rc/src/models/errors/updateeval.ts +51 -0
  682. package/packages/orq-rc/src/models/errors/updateidentity.ts +54 -0
  683. package/packages/orq-rc/src/models/errors/updateprompt.ts +51 -0
  684. package/packages/orq-rc/src/models/errors/updatetool.ts +62 -0
  685. package/packages/orq-rc/src/models/operations/cleardataset.ts +39 -0
  686. package/packages/orq-rc/src/models/operations/createagentrequest.ts +6459 -0
  687. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +670 -0
  688. package/packages/orq-rc/src/models/operations/createannotation.ts +166 -0
  689. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +6398 -0
  690. package/packages/orq-rc/src/models/operations/createchunk.ts +222 -0
  691. package/packages/orq-rc/src/models/operations/createcompletion.ts +3473 -0
  692. package/packages/orq-rc/src/models/operations/createcontact.ts +156 -0
  693. package/packages/orq-rc/src/models/operations/createdataset.ts +162 -0
  694. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2554 -0
  695. package/packages/orq-rc/src/models/operations/createdatasource.ts +437 -0
  696. package/packages/orq-rc/src/models/operations/createembedding.ts +947 -0
  697. package/packages/orq-rc/src/models/operations/createeval.ts +4178 -0
  698. package/packages/orq-rc/src/models/operations/createidentity.ts +162 -0
  699. package/packages/orq-rc/src/models/operations/createimage.ts +1034 -0
  700. package/packages/orq-rc/src/models/operations/createimageedit.ts +1045 -0
  701. package/packages/orq-rc/src/models/operations/createimagevariation.ts +1067 -0
  702. package/packages/orq-rc/src/models/operations/createknowledge.ts +960 -0
  703. package/packages/orq-rc/src/models/operations/creatememory.ts +142 -0
  704. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +152 -0
  705. package/packages/orq-rc/src/models/operations/creatememorystore.ts +199 -0
  706. package/packages/orq-rc/src/models/operations/createmoderation.ts +664 -0
  707. package/packages/orq-rc/src/models/operations/createprompt.ts +5403 -0
  708. package/packages/orq-rc/src/models/operations/creatererank.ts +890 -0
  709. package/packages/orq-rc/src/models/operations/createresponse.ts +3381 -0
  710. package/packages/orq-rc/src/models/operations/createspeech.ts +700 -0
  711. package/packages/orq-rc/src/models/operations/createtool.ts +2499 -0
  712. package/packages/orq-rc/src/models/operations/createtranscription.ts +955 -0
  713. package/packages/orq-rc/src/models/operations/createtranslation.ts +930 -0
  714. package/packages/orq-rc/src/models/operations/deleteagent.ts +39 -0
  715. package/packages/orq-rc/src/models/operations/deleteannotation.ts +82 -0
  716. package/packages/orq-rc/src/models/operations/deletechunk.ts +53 -0
  717. package/packages/orq-rc/src/models/operations/deletechunks.ts +125 -0
  718. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +46 -0
  719. package/packages/orq-rc/src/models/operations/deletedataset.ts +39 -0
  720. package/packages/orq-rc/src/models/operations/deletedatasource.ts +46 -0
  721. package/packages/orq-rc/src/models/operations/deleteeval.ts +31 -0
  722. package/packages/orq-rc/src/models/operations/deleteidentity.ts +34 -0
  723. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +39 -0
  724. package/packages/orq-rc/src/models/operations/deletememory.ts +46 -0
  725. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +55 -0
  726. package/packages/orq-rc/src/models/operations/deletememorystore.ts +39 -0
  727. package/packages/orq-rc/src/models/operations/deleteprompt.ts +34 -0
  728. package/packages/orq-rc/src/models/operations/deletetool.ts +36 -0
  729. package/packages/orq-rc/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  730. package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +67 -0
  731. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2370 -0
  732. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4526 -0
  733. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +733 -0
  734. package/packages/orq-rc/src/models/operations/deployments.ts +1271 -0
  735. package/packages/orq-rc/src/models/operations/deploymentstream.ts +4657 -0
  736. package/packages/orq-rc/src/models/operations/filecontent.ts +39 -0
  737. package/packages/orq-rc/src/models/operations/filedelete.ts +39 -0
  738. package/packages/orq-rc/src/models/operations/fileget.ts +80 -0
  739. package/packages/orq-rc/src/models/operations/filelist.ts +85 -0
  740. package/packages/orq-rc/src/models/operations/fileupdate.ts +118 -0
  741. package/packages/orq-rc/src/models/operations/fileupload.ts +135 -0
  742. package/packages/orq-rc/src/models/operations/getagentresponse.ts +46 -0
  743. package/packages/orq-rc/src/models/operations/getallmemories.ts +173 -0
  744. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +188 -0
  745. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +200 -0
  746. package/packages/orq-rc/src/models/operations/getallprompts.ts +3171 -0
  747. package/packages/orq-rc/src/models/operations/getalltools.ts +1398 -0
  748. package/packages/orq-rc/src/models/operations/getchunkscount.ts +121 -0
  749. package/packages/orq-rc/src/models/operations/getevals.ts +2842 -0
  750. package/packages/orq-rc/src/models/operations/getonechunk.ts +171 -0
  751. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +652 -0
  752. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3096 -0
  753. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3141 -0
  754. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +162 -0
  755. package/packages/orq-rc/src/models/operations/getv2humanevals.ts +696 -0
  756. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +234 -0
  757. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +235 -0
  758. package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +707 -0
  759. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +163 -0
  760. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +110 -0
  761. package/packages/orq-rc/src/models/operations/index.ts +131 -0
  762. package/packages/orq-rc/src/models/operations/invokeagent.ts +801 -0
  763. package/packages/orq-rc/src/models/operations/invokeeval.ts +1254 -0
  764. package/packages/orq-rc/src/models/operations/listagents.ts +2781 -0
  765. package/packages/orq-rc/src/models/operations/listchunks.ts +260 -0
  766. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +263 -0
  767. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1498 -0
  768. package/packages/orq-rc/src/models/operations/listdatasets.ts +205 -0
  769. package/packages/orq-rc/src/models/operations/listdatasources.ts +235 -0
  770. package/packages/orq-rc/src/models/operations/listidentities.ts +275 -0
  771. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +642 -0
  772. package/packages/orq-rc/src/models/operations/listmodels.ts +169 -0
  773. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3216 -0
  774. package/packages/orq-rc/src/models/operations/parse.ts +784 -0
  775. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  776. package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +1362 -0
  777. package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +252 -0
  778. package/packages/orq-rc/src/models/operations/postv2agentskeycardrefresh.ts +100 -0
  779. package/packages/orq-rc/src/models/operations/postv2feedback.ts +207 -0
  780. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +321 -0
  781. package/packages/orq-rc/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  782. package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +138 -0
  783. package/packages/orq-rc/src/models/operations/postv2humanevals.ts +1193 -0
  784. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +365 -0
  785. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +478 -0
  786. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +108 -0
  787. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2843 -0
  788. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1402 -0
  789. package/packages/orq-rc/src/models/operations/retrievedataset.ts +150 -0
  790. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +152 -0
  791. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +117 -0
  792. package/packages/orq-rc/src/models/operations/retrievememory.ts +112 -0
  793. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +118 -0
  794. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +144 -0
  795. package/packages/orq-rc/src/models/operations/retrievetool.ts +1379 -0
  796. package/packages/orq-rc/src/models/operations/runagent.ts +4963 -0
  797. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1762 -0
  798. package/packages/orq-rc/src/models/operations/streamagent.ts +692 -0
  799. package/packages/orq-rc/src/models/operations/streamrunagent.ts +5125 -0
  800. package/packages/orq-rc/src/models/operations/updateagent.ts +6889 -0
  801. package/packages/orq-rc/src/models/operations/updatechunk.ts +236 -0
  802. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2555 -0
  803. package/packages/orq-rc/src/models/operations/updatedataset.ts +206 -0
  804. package/packages/orq-rc/src/models/operations/updatedatasource.ts +186 -0
  805. package/packages/orq-rc/src/models/operations/updateeval.ts +3134 -0
  806. package/packages/orq-rc/src/models/operations/updateidentity.ts +189 -0
  807. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1231 -0
  808. package/packages/orq-rc/src/models/operations/updatememory.ts +142 -0
  809. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +159 -0
  810. package/packages/orq-rc/src/models/operations/updatememorystore.ts +188 -0
  811. package/packages/orq-rc/src/models/operations/updateprompt.ts +5485 -0
  812. package/packages/orq-rc/src/models/operations/updatetool.ts +2806 -0
  813. package/packages/orq-rc/src/sdk/agents.ts +234 -0
  814. package/packages/orq-rc/src/sdk/annotations.ts +39 -0
  815. package/packages/orq-rc/src/sdk/audio.ts +25 -0
  816. package/packages/orq-rc/src/sdk/chat.ts +13 -0
  817. package/packages/orq-rc/src/sdk/chunking.ts +27 -0
  818. package/packages/orq-rc/src/sdk/completions.ts +32 -0
  819. package/{src/sdk/feedback.ts → packages/orq-rc/src/sdk/contacts.ts} +7 -7
  820. package/packages/orq-rc/src/sdk/datasets.ts +204 -0
  821. package/packages/orq-rc/src/sdk/deployments.ts +89 -0
  822. package/packages/orq-rc/src/sdk/edits.ts +27 -0
  823. package/packages/orq-rc/src/sdk/embeddings.ts +27 -0
  824. package/packages/orq-rc/src/sdk/evals.ts +84 -0
  825. package/packages/orq-rc/src/sdk/evaluators.ts +27 -0
  826. package/packages/orq-rc/src/sdk/files.ts +114 -0
  827. package/packages/orq-rc/src/sdk/generations.ts +27 -0
  828. package/packages/orq-rc/src/sdk/humanreviewsets.ts +84 -0
  829. package/packages/orq-rc/src/sdk/identities.ts +99 -0
  830. package/packages/orq-rc/src/sdk/images.ts +25 -0
  831. package/packages/orq-rc/src/sdk/index.ts +5 -0
  832. package/packages/orq-rc/src/sdk/knowledge.ts +309 -0
  833. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  834. package/packages/orq-rc/src/sdk/metrics.ts +29 -0
  835. package/packages/orq-rc/src/sdk/models.ts +27 -0
  836. package/packages/orq-rc/src/sdk/moderations.ts +24 -0
  837. package/packages/orq-rc/src/sdk/orqcompletions.ts +32 -0
  838. package/packages/orq-rc/src/sdk/orqresponses.ts +32 -0
  839. package/packages/orq-rc/src/sdk/prompts.ts +126 -0
  840. package/packages/orq-rc/src/sdk/remoteconfigs.ts +24 -0
  841. package/packages/orq-rc/src/sdk/rerank.ts +27 -0
  842. package/packages/orq-rc/src/sdk/responses.ts +53 -0
  843. package/packages/orq-rc/src/sdk/router.ts +72 -0
  844. package/packages/orq-rc/src/sdk/sdk.ts +225 -0
  845. package/packages/orq-rc/src/sdk/speech.ts +27 -0
  846. package/packages/orq-rc/src/sdk/tools.ts +135 -0
  847. package/packages/orq-rc/src/sdk/transcriptions.ts +24 -0
  848. package/packages/orq-rc/src/sdk/translations.ts +24 -0
  849. package/packages/orq-rc/src/sdk/variations.ts +27 -0
  850. package/packages/orq-rc/src/types/async.ts +68 -0
  851. package/packages/orq-rc/src/types/blobs.ts +32 -0
  852. package/packages/orq-rc/src/types/constdatetime.ts +15 -0
  853. package/packages/orq-rc/src/types/enums.ts +45 -0
  854. package/packages/orq-rc/src/types/fp.ts +50 -0
  855. package/packages/orq-rc/src/types/index.ts +11 -0
  856. package/packages/orq-rc/src/types/operations.ts +105 -0
  857. package/packages/orq-rc/src/types/rfcdate.ts +54 -0
  858. package/packages/orq-rc/src/types/streams.ts +21 -0
  859. package/packages/orq-rc/src/types/unrecognized.ts +35 -0
  860. package/sdk/files.d.ts +23 -9
  861. package/sdk/files.d.ts.map +1 -1
  862. package/sdk/files.js +31 -11
  863. package/sdk/files.js.map +1 -1
  864. package/sdk/humanreviewsets.d.ts +25 -0
  865. package/sdk/humanreviewsets.d.ts.map +1 -0
  866. package/sdk/humanreviewsets.js +47 -0
  867. package/sdk/humanreviewsets.js.map +1 -0
  868. package/sdk/knowledge.d.ts +1 -1
  869. package/sdk/knowledge.d.ts.map +1 -1
  870. package/sdk/metrics.d.ts +2 -0
  871. package/sdk/metrics.d.ts.map +1 -1
  872. package/sdk/metrics.js +2 -0
  873. package/sdk/metrics.js.map +1 -1
  874. package/sdk/models.d.ts +1 -1
  875. package/sdk/models.d.ts.map +1 -1
  876. package/sdk/models.js +2 -2
  877. package/sdk/models.js.map +1 -1
  878. package/sdk/sdk.d.ts +16 -6
  879. package/sdk/sdk.d.ts.map +1 -1
  880. package/sdk/sdk.js +44 -7
  881. package/sdk/sdk.js.map +1 -1
  882. package/src/funcs/agentsDelete.ts +0 -1
  883. package/src/funcs/agentsInvoke.ts +0 -1
  884. package/src/funcs/agentsPostV2AgentsKeyCardRefresh.ts +0 -1
  885. package/src/funcs/agentsResponsesCreate.ts +0 -1
  886. package/src/funcs/agentsResponsesGet.ts +0 -1
  887. package/src/funcs/agentsRetrieve.ts +0 -1
  888. package/src/funcs/agentsStream.ts +0 -1
  889. package/src/funcs/agentsUpdate.ts +0 -1
  890. package/src/funcs/annotationsCreate.ts +0 -1
  891. package/src/funcs/annotationsDelete.ts +0 -1
  892. package/src/funcs/datasetsClear.ts +0 -1
  893. package/src/funcs/datasetsCreateDatapoint.ts +0 -1
  894. package/src/funcs/datasetsDelete.ts +0 -1
  895. package/src/funcs/datasetsDeleteDatapoint.ts +0 -1
  896. package/src/funcs/datasetsListDatapoints.ts +0 -1
  897. package/src/funcs/datasetsRetrieve.ts +0 -1
  898. package/src/funcs/datasetsRetrieveDatapoint.ts +0 -1
  899. package/src/funcs/datasetsUpdate.ts +0 -1
  900. package/src/funcs/datasetsUpdateDatapoint.ts +0 -1
  901. package/src/funcs/deleteV2HumanEvalsId.ts +169 -0
  902. package/src/funcs/deploymentsMetricsCreate.ts +2 -1
  903. package/src/funcs/evalsDelete.ts +0 -1
  904. package/src/funcs/evalsInvoke.ts +0 -1
  905. package/src/funcs/evalsUpdate.ts +0 -1
  906. package/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -1
  907. package/src/funcs/filesCreate.ts +7 -11
  908. package/src/funcs/filesDelete.ts +0 -1
  909. package/src/funcs/filesGet.ts +1 -2
  910. package/src/funcs/filesGetContent.ts +166 -0
  911. package/src/funcs/filesList.ts +1 -1
  912. package/src/funcs/filesUpdate.ts +166 -0
  913. package/src/funcs/getV2HumanEvals.ts +169 -0
  914. package/src/funcs/getV2HumanEvalsId.ts +168 -0
  915. package/src/funcs/humanReviewSetsDeleteV2HumanEvalSetsId.ts +164 -0
  916. package/src/funcs/humanReviewSetsGetV2HumanEvalSets.ts +168 -0
  917. package/src/funcs/humanReviewSetsGetV2HumanEvalSetsId.ts +163 -0
  918. package/src/funcs/humanReviewSetsPatchV2HumanEvalSetsId.ts +164 -0
  919. package/src/funcs/humanReviewSetsPostV2HumanEvalSets.ts +162 -0
  920. package/src/funcs/identitiesDelete.ts +0 -1
  921. package/src/funcs/identitiesRetrieve.ts +0 -1
  922. package/src/funcs/identitiesUpdate.ts +0 -1
  923. package/src/funcs/knowledgeCreateChunks.ts +4 -5
  924. package/src/funcs/knowledgeCreateDatasource.ts +0 -1
  925. package/src/funcs/knowledgeDelete.ts +0 -1
  926. package/src/funcs/knowledgeDeleteChunk.ts +0 -1
  927. package/src/funcs/knowledgeDeleteChunks.ts +0 -1
  928. package/src/funcs/knowledgeDeleteDatasource.ts +0 -1
  929. package/src/funcs/knowledgeGetChunksCount.ts +0 -1
  930. package/src/funcs/knowledgeListChunks.ts +0 -1
  931. package/src/funcs/knowledgeListChunksPaginated.ts +0 -1
  932. package/src/funcs/knowledgeListDatasources.ts +0 -1
  933. package/src/funcs/knowledgeRetrieve.ts +0 -1
  934. package/src/funcs/knowledgeRetrieveChunk.ts +0 -1
  935. package/src/funcs/knowledgeRetrieveDatasource.ts +0 -1
  936. package/src/funcs/knowledgeSearch.ts +0 -1
  937. package/src/funcs/knowledgeUpdate.ts +0 -1
  938. package/src/funcs/knowledgeUpdateChunk.ts +0 -1
  939. package/src/funcs/knowledgeUpdateDatasource.ts +0 -1
  940. package/src/funcs/memoryStoresCreateDocument.ts +0 -1
  941. package/src/funcs/memoryStoresCreateMemory.ts +0 -1
  942. package/src/funcs/memoryStoresDelete.ts +0 -1
  943. package/src/funcs/memoryStoresDeleteDocument.ts +0 -1
  944. package/src/funcs/memoryStoresDeleteMemory.ts +0 -1
  945. package/src/funcs/memoryStoresListDocuments.ts +0 -1
  946. package/src/funcs/memoryStoresListMemories.ts +0 -1
  947. package/src/funcs/memoryStoresRetrieve.ts +0 -1
  948. package/src/funcs/memoryStoresRetrieveDocument.ts +0 -1
  949. package/src/funcs/memoryStoresRetrieveMemory.ts +0 -1
  950. package/src/funcs/memoryStoresUpdate.ts +0 -1
  951. package/src/funcs/memoryStoresUpdateDocument.ts +0 -1
  952. package/src/funcs/memoryStoresUpdateMemory.ts +0 -1
  953. package/src/funcs/modelsList.ts +23 -0
  954. package/src/funcs/patchV2HumanEvalsId.ts +170 -0
  955. package/src/funcs/postV2Feedback.ts +172 -0
  956. package/src/funcs/postV2FeedbackEvaluation.ts +159 -0
  957. package/src/funcs/postV2FeedbackEvaluationRemove.ts +159 -0
  958. package/src/funcs/postV2FeedbackRemove.ts +167 -0
  959. package/src/funcs/postV2HumanEvals.ts +168 -0
  960. package/src/funcs/promptsDelete.ts +0 -1
  961. package/src/funcs/promptsGetVersion.ts +0 -1
  962. package/src/funcs/promptsListVersions.ts +0 -1
  963. package/src/funcs/promptsRetrieve.ts +0 -1
  964. package/src/funcs/promptsUpdate.ts +0 -1
  965. package/src/funcs/routerAudioTranscriptionsCreate.ts +6 -10
  966. package/src/funcs/routerAudioTranslationsCreate.ts +6 -10
  967. package/src/funcs/toolsDelete.ts +0 -1
  968. package/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -1
  969. package/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -1
  970. package/src/funcs/toolsRetrieve.ts +0 -1
  971. package/src/funcs/toolsUpdate.ts +0 -1
  972. package/src/lib/config.ts +3 -3
  973. package/src/lib/encodings.ts +23 -4
  974. package/src/lib/files.ts +22 -0
  975. package/src/lib/sdks.ts +7 -5
  976. package/src/lib/url.ts +16 -14
  977. package/src/models/components/filedocument.ts +48 -0
  978. package/src/models/components/index.ts +2 -0
  979. package/src/models/components/reasoningpart.ts +1 -1
  980. package/src/models/components/thinkingconfigadaptiveschema.ts +59 -0
  981. package/src/models/errors/deletev2humanevalsid.ts +51 -0
  982. package/src/models/errors/getv2humanevals.ts +51 -0
  983. package/src/models/errors/getv2humanevalsid.ts +51 -0
  984. package/src/models/errors/index.ts +7 -0
  985. package/src/models/errors/patchv2humanevalsid.ts +51 -0
  986. package/src/models/errors/postv2feedback.ts +96 -0
  987. package/src/models/errors/postv2feedbackremove.ts +51 -0
  988. package/src/models/errors/postv2humanevals.ts +51 -0
  989. package/src/models/operations/createagentrequest.ts +62 -26
  990. package/src/models/operations/createchatcompletion.ts +8 -2
  991. package/src/models/operations/createchunk.ts +7 -7
  992. package/src/models/operations/createcompletion.ts +55 -0
  993. package/src/models/operations/createcontact.ts +1 -1
  994. package/src/models/operations/createdataset.ts +1 -1
  995. package/src/models/operations/createdatasetitem.ts +14 -11
  996. package/src/models/operations/createdatasource.ts +1 -1
  997. package/src/models/operations/createeval.ts +86 -78
  998. package/src/models/operations/createidentity.ts +1 -1
  999. package/src/models/operations/createknowledge.ts +52 -36
  1000. package/src/models/operations/createprompt.ts +15 -3
  1001. package/src/models/operations/createresponse.ts +56 -0
  1002. package/src/models/operations/createtool.ts +6 -6
  1003. package/src/models/operations/deletev2humanevalsetsid.ts +36 -0
  1004. package/src/models/operations/deletev2humanevalsid.ts +67 -0
  1005. package/src/models/operations/deploymentgetconfig.ts +1 -0
  1006. package/src/models/operations/deploymentinvoke.ts +4 -0
  1007. package/src/models/operations/deployments.ts +2 -0
  1008. package/src/models/operations/deploymentstream.ts +4 -0
  1009. package/src/models/operations/filecontent.ts +39 -0
  1010. package/src/models/operations/fileget.ts +5 -41
  1011. package/src/models/operations/filelist.ts +7 -94
  1012. package/src/models/operations/fileupdate.ts +118 -0
  1013. package/src/models/operations/fileupload.ts +5 -40
  1014. package/src/models/operations/getallprompts.ts +7 -1
  1015. package/src/models/operations/getalltools.ts +6 -6
  1016. package/src/models/operations/getevals.ts +16 -16
  1017. package/src/models/operations/getoneprompt.ts +7 -1
  1018. package/src/models/operations/getpromptversion.ts +7 -1
  1019. package/src/models/operations/getv2humanevals.ts +696 -0
  1020. package/src/models/operations/getv2humanevalsets.ts +234 -0
  1021. package/src/models/operations/getv2humanevalsetsid.ts +235 -0
  1022. package/src/models/operations/getv2humanevalsid.ts +707 -0
  1023. package/src/models/operations/index.ts +16 -1
  1024. package/src/models/operations/invokeeval.ts +1 -0
  1025. package/src/models/operations/listagents.ts +15 -2
  1026. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  1027. package/src/models/operations/listdatasets.ts +1 -1
  1028. package/src/models/operations/listdatasources.ts +1 -1
  1029. package/src/models/operations/listidentities.ts +1 -1
  1030. package/src/models/operations/listmodels.ts +26 -0
  1031. package/src/models/operations/listpromptversions.ts +7 -1
  1032. package/src/models/operations/parse.ts +7 -7
  1033. package/src/models/operations/patchv2humanevalsetsid.ts +415 -0
  1034. package/src/models/operations/patchv2humanevalsid.ts +1362 -0
  1035. package/src/models/operations/postv2feedback.ts +207 -0
  1036. package/src/models/operations/postv2feedbackevaluation.ts +321 -0
  1037. package/src/models/operations/postv2feedbackevaluationremove.ts +43 -0
  1038. package/src/models/operations/postv2feedbackremove.ts +138 -0
  1039. package/src/models/operations/postv2humanevals.ts +1193 -0
  1040. package/src/models/operations/postv2humanevalsets.ts +365 -0
  1041. package/src/models/operations/retrieveagentrequest.ts +15 -2
  1042. package/src/models/operations/retrievedatapoint.ts +4 -4
  1043. package/src/models/operations/retrievedataset.ts +1 -1
  1044. package/src/models/operations/retrievedatasource.ts +1 -1
  1045. package/src/models/operations/retrieveidentity.ts +1 -1
  1046. package/src/models/operations/retrievetool.ts +6 -6
  1047. package/src/models/operations/runagent.ts +17 -5
  1048. package/src/models/operations/streamrunagent.ts +17 -5
  1049. package/src/models/operations/updateagent.ts +71 -37
  1050. package/src/models/operations/updatedatapoint.ts +4 -4
  1051. package/src/models/operations/updatedataset.ts +1 -1
  1052. package/src/models/operations/updatedatasource.ts +1 -1
  1053. package/src/models/operations/updateeval.ts +495 -1513
  1054. package/src/models/operations/updateidentity.ts +1 -1
  1055. package/src/models/operations/updateprompt.ts +15 -3
  1056. package/src/models/operations/updatetool.ts +41 -45
  1057. package/src/sdk/files.ts +50 -14
  1058. package/src/sdk/humanreviewsets.ts +84 -0
  1059. package/src/sdk/knowledge.ts +1 -1
  1060. package/src/sdk/metrics.ts +2 -0
  1061. package/src/sdk/models.ts +2 -0
  1062. package/src/sdk/sdk.ts +122 -12
  1063. package/examples/contactsCreate.example.ts +0 -42
  1064. package/funcs/feedbackCreate.d.ts.map +0 -1
  1065. package/funcs/feedbackCreate.js.map +0 -1
  1066. package/models/operations/createfeedback.d.ts +0 -67
  1067. package/models/operations/createfeedback.d.ts.map +0 -1
  1068. package/models/operations/createfeedback.js.map +0 -1
  1069. package/sdk/feedback.d.ts +0 -12
  1070. package/sdk/feedback.d.ts.map +0 -1
  1071. package/sdk/feedback.js +0 -22
  1072. package/sdk/feedback.js.map +0 -1
  1073. package/src/models/operations/createfeedback.ts +0 -144
@@ -0,0 +1,3381 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { EventStream } from "../../lib/event-streams.js";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import {
9
+ collectExtraKeys as collectExtraKeys$,
10
+ safeParse,
11
+ } from "../../lib/schemas.js";
12
+ import { ClosedEnum } from "../../types/enums.js";
13
+ import { Result as SafeParseResult } from "../../types/fp.js";
14
+ import * as components from "../components/index.js";
15
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
16
+
17
+ /**
18
+ * The effort level for reasoning (o3-mini model only)
19
+ */
20
+ export const Effort = {
21
+ Low: "low",
22
+ Medium: "medium",
23
+ High: "high",
24
+ } as const;
25
+ /**
26
+ * The effort level for reasoning (o3-mini model only)
27
+ */
28
+ export type Effort = ClosedEnum<typeof Effort>;
29
+
30
+ /**
31
+ * Configuration for reasoning models
32
+ */
33
+ export type Reasoning = {
34
+ /**
35
+ * The effort level for reasoning (o3-mini model only)
36
+ */
37
+ effort?: Effort | undefined;
38
+ };
39
+
40
+ /**
41
+ * Configuration for thinking mode. Use `adaptive` for models that support it (e.g. Claude Opus 4.6, Sonnet 4.6), or `enabled` with `budget_tokens` for manual control.
42
+ */
43
+ export type CreateResponseThinking =
44
+ | components.ThinkingConfigDisabledSchema
45
+ | components.ThinkingConfigEnabledSchema
46
+ | components.ThinkingConfigAdaptiveSchema;
47
+
48
+ export type Format3 = {
49
+ /**
50
+ * Ensures the response matches a supplied JSON schema
51
+ */
52
+ type: "json_schema";
53
+ /**
54
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
55
+ */
56
+ name: string;
57
+ /**
58
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
59
+ */
60
+ description?: string | undefined;
61
+ /**
62
+ * The JSON schema to validate the response against
63
+ */
64
+ schema: { [k: string]: any };
65
+ /**
66
+ * Whether to enable strict `schema` adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when `strict` is `true`
67
+ */
68
+ strict?: boolean | undefined;
69
+ };
70
+
71
+ export type Format2 = {
72
+ /**
73
+ * Ensures the response is a valid JSON object
74
+ */
75
+ type: "json_object";
76
+ };
77
+
78
+ export type Format1 = {
79
+ /**
80
+ * Plain text response format
81
+ */
82
+ type: "text";
83
+ };
84
+
85
+ export type CreateResponseFormat = Format1 | Format2 | Format3;
86
+
87
+ export type CreateResponseText = {
88
+ format: Format1 | Format2 | Format3;
89
+ };
90
+
91
+ /**
92
+ * The type of input item
93
+ */
94
+ export const CreateResponse2RouterResponsesRequestRequestBodyInputType = {
95
+ FunctionCall: "function_call",
96
+ } as const;
97
+ /**
98
+ * The type of input item
99
+ */
100
+ export type CreateResponse2RouterResponsesRequestRequestBodyInputType =
101
+ ClosedEnum<typeof CreateResponse2RouterResponsesRequestRequestBodyInputType>;
102
+
103
+ /**
104
+ * Represents a function tool call, provided as input to the model.
105
+ */
106
+ export type CreateResponse23 = {
107
+ /**
108
+ * The type of input item
109
+ */
110
+ type: CreateResponse2RouterResponsesRequestRequestBodyInputType;
111
+ /**
112
+ * The ID of the function call
113
+ */
114
+ callId: string;
115
+ /**
116
+ * The unique identifier for this function call
117
+ */
118
+ id: string;
119
+ /**
120
+ * The name of the function being called
121
+ */
122
+ name: string;
123
+ /**
124
+ * The arguments to the function as a JSON string
125
+ */
126
+ arguments: string;
127
+ /**
128
+ * The status of the function call
129
+ */
130
+ status: string;
131
+ };
132
+
133
+ /**
134
+ * The type of input item
135
+ */
136
+ export const CreateResponse2RouterResponsesRequestRequestBodyType = {
137
+ FunctionCallOutput: "function_call_output",
138
+ } as const;
139
+ /**
140
+ * The type of input item
141
+ */
142
+ export type CreateResponse2RouterResponsesRequestRequestBodyType = ClosedEnum<
143
+ typeof CreateResponse2RouterResponsesRequestRequestBodyType
144
+ >;
145
+
146
+ /**
147
+ * Represents the output of a function tool call, provided as input to the model.
148
+ */
149
+ export type CreateResponse2RouterResponses2 = {
150
+ /**
151
+ * The type of input item
152
+ */
153
+ type: CreateResponse2RouterResponsesRequestRequestBodyType;
154
+ /**
155
+ * The ID of the function call this output is for
156
+ */
157
+ callId: string;
158
+ /**
159
+ * The output from the function call
160
+ */
161
+ output: string;
162
+ };
163
+
164
+ /**
165
+ * The role of the message author
166
+ */
167
+ export const TwoRole = {
168
+ User: "user",
169
+ Assistant: "assistant",
170
+ System: "system",
171
+ Developer: "developer",
172
+ } as const;
173
+ /**
174
+ * The role of the message author
175
+ */
176
+ export type TwoRole = ClosedEnum<typeof TwoRole>;
177
+
178
+ /**
179
+ * A file input content part.
180
+ */
181
+ export type Two3 = {
182
+ /**
183
+ * The type of input content part
184
+ */
185
+ type: "input_file";
186
+ /**
187
+ * Base64 encoded file data
188
+ */
189
+ fileData?: string | undefined;
190
+ /**
191
+ * File ID from the Files API
192
+ */
193
+ fileId?: string | undefined;
194
+ /**
195
+ * Name of the file
196
+ */
197
+ filename?: string | undefined;
198
+ /**
199
+ * URL of the file to fetch
200
+ */
201
+ fileUrl?: string | undefined;
202
+ };
203
+
204
+ /**
205
+ * Level of detail for image analysis
206
+ */
207
+ export const Detail = {
208
+ High: "high",
209
+ Low: "low",
210
+ Auto: "auto",
211
+ } as const;
212
+ /**
213
+ * Level of detail for image analysis
214
+ */
215
+ export type Detail = ClosedEnum<typeof Detail>;
216
+
217
+ /**
218
+ * An image input content part.
219
+ */
220
+ export type CreateResponse22 = {
221
+ /**
222
+ * The type of input content part
223
+ */
224
+ type: "input_image";
225
+ /**
226
+ * Level of detail for image analysis
227
+ */
228
+ detail?: Detail | undefined;
229
+ /**
230
+ * File ID for the image
231
+ */
232
+ fileId?: string | null | undefined;
233
+ /**
234
+ * URL of the image (can be http URL or data URL)
235
+ */
236
+ imageUrl?: string | null | undefined;
237
+ };
238
+
239
+ /**
240
+ * A text input content part
241
+ */
242
+ export type CreateResponse21 = {
243
+ /**
244
+ * The type of input content
245
+ */
246
+ type: "input_text";
247
+ /**
248
+ * The text content
249
+ */
250
+ text: string;
251
+ };
252
+
253
+ export type CreateResponseContent2 = CreateResponse21 | CreateResponse22 | Two3;
254
+
255
+ /**
256
+ * The content of the message, either a string or an array of content parts
257
+ */
258
+ export type TwoContent =
259
+ | string
260
+ | Array<CreateResponse21 | CreateResponse22 | Two3>;
261
+
262
+ /**
263
+ * Represents a message in the conversation, with a role and content (string or rich content parts).
264
+ */
265
+ export type Two1 = {
266
+ /**
267
+ * The role of the message author
268
+ */
269
+ role: TwoRole;
270
+ /**
271
+ * The content of the message, either a string or an array of content parts
272
+ */
273
+ content: string | Array<CreateResponse21 | CreateResponse22 | Two3>;
274
+ };
275
+
276
+ export type Input2 = CreateResponse23 | CreateResponse2RouterResponses2 | Two1;
277
+
278
+ /**
279
+ * The actual user input(s) for the model. Can be a simple string, or an array of structured input items (messages, tool outputs) representing a conversation history or complex input.
280
+ */
281
+ export type CreateResponseInput =
282
+ | string
283
+ | Array<CreateResponse23 | CreateResponse2RouterResponses2 | Two1>;
284
+
285
+ export const Include = {
286
+ CodeInterpreterCallOutputs: "code_interpreter_call.outputs",
287
+ ComputerCallOutputOutputImageUrl: "computer_call_output.output.image_url",
288
+ FileSearchCallResults: "file_search_call.results",
289
+ MessageInputImageImageUrl: "message.input_image.image_url",
290
+ MessageOutputTextLogprobs: "message.output_text.logprobs",
291
+ ReasoningEncryptedContent: "reasoning.encrypted_content",
292
+ } as const;
293
+ export type Include = ClosedEnum<typeof Include>;
294
+
295
+ /**
296
+ * Specifies the latency tier to use for processing the request. Defaults to "auto".
297
+ */
298
+ export const ServiceTier = {
299
+ Auto: "auto",
300
+ Default: "default",
301
+ Flex: "flex",
302
+ Priority: "priority",
303
+ } as const;
304
+ /**
305
+ * Specifies the latency tier to use for processing the request. Defaults to "auto".
306
+ */
307
+ export type ServiceTier = ClosedEnum<typeof ServiceTier>;
308
+
309
+ /**
310
+ * The ranking algorithm
311
+ */
312
+ export const Ranker = {
313
+ Auto: "auto",
314
+ Default20240821: "default_2024_08_21",
315
+ } as const;
316
+ /**
317
+ * The ranking algorithm
318
+ */
319
+ export type Ranker = ClosedEnum<typeof Ranker>;
320
+
321
+ /**
322
+ * Options for ranking search results
323
+ */
324
+ export type RankingOptions = {
325
+ /**
326
+ * The ranking algorithm
327
+ */
328
+ ranker?: Ranker | undefined;
329
+ /**
330
+ * Minimum relevance score
331
+ */
332
+ scoreThreshold?: number | undefined;
333
+ };
334
+
335
+ /**
336
+ * Configuration for file search tool
337
+ */
338
+ export type Tools3 = {
339
+ /**
340
+ * The type of tool
341
+ */
342
+ type: "file_search";
343
+ /**
344
+ * The vector stores to search
345
+ */
346
+ vectorStoreIds?: Array<string> | undefined;
347
+ /**
348
+ * Maximum number of results to return
349
+ */
350
+ maxNumResults?: number | undefined;
351
+ /**
352
+ * Filters to apply to the search
353
+ */
354
+ filters?: any | undefined;
355
+ /**
356
+ * Options for ranking search results
357
+ */
358
+ rankingOptions?: RankingOptions | undefined;
359
+ };
360
+
361
+ /**
362
+ * Amount of context to retrieve for each search result
363
+ */
364
+ export const SearchContextSize = {
365
+ Small: "small",
366
+ Medium: "medium",
367
+ Large: "large",
368
+ } as const;
369
+ /**
370
+ * Amount of context to retrieve for each search result
371
+ */
372
+ export type SearchContextSize = ClosedEnum<typeof SearchContextSize>;
373
+
374
+ /**
375
+ * The type of location
376
+ */
377
+ export const CreateResponseToolsRouterResponsesRequestType = {
378
+ Approximate: "approximate",
379
+ Exact: "exact",
380
+ } as const;
381
+ /**
382
+ * The type of location
383
+ */
384
+ export type CreateResponseToolsRouterResponsesRequestType = ClosedEnum<
385
+ typeof CreateResponseToolsRouterResponsesRequestType
386
+ >;
387
+
388
+ /**
389
+ * User location for search localization
390
+ */
391
+ export type UserLocation = {
392
+ /**
393
+ * The type of location
394
+ */
395
+ type?: CreateResponseToolsRouterResponsesRequestType | undefined;
396
+ /**
397
+ * The city name
398
+ */
399
+ city?: string | null | undefined;
400
+ /**
401
+ * The country code
402
+ */
403
+ country?: string | undefined;
404
+ /**
405
+ * The region/state
406
+ */
407
+ region?: string | null | undefined;
408
+ /**
409
+ * The timezone
410
+ */
411
+ timezone?: string | null | undefined;
412
+ };
413
+
414
+ /**
415
+ * Configuration for web search tool
416
+ */
417
+ export type Tools2 = {
418
+ /**
419
+ * The type of tool
420
+ */
421
+ type: "web_search_preview";
422
+ /**
423
+ * List of domains to restrict search to
424
+ */
425
+ domains?: Array<string> | undefined;
426
+ /**
427
+ * Amount of context to retrieve for each search result
428
+ */
429
+ searchContextSize?: SearchContextSize | undefined;
430
+ /**
431
+ * User location for search localization
432
+ */
433
+ userLocation?: UserLocation | undefined;
434
+ };
435
+
436
+ /**
437
+ * The type of the parameters object
438
+ */
439
+ export const CreateResponseToolsType = {
440
+ Object: "object",
441
+ } as const;
442
+ /**
443
+ * The type of the parameters object
444
+ */
445
+ export type CreateResponseToolsType = ClosedEnum<
446
+ typeof CreateResponseToolsType
447
+ >;
448
+
449
+ export type Properties = {
450
+ type: string;
451
+ description?: string | undefined;
452
+ enum?: Array<string> | undefined;
453
+ additionalProperties?: { [k: string]: any } | undefined;
454
+ };
455
+
456
+ /**
457
+ * The parameters the function accepts
458
+ */
459
+ export type ToolsParameters = {
460
+ /**
461
+ * The type of the parameters object
462
+ */
463
+ type: CreateResponseToolsType;
464
+ /**
465
+ * The parameters the function accepts, described as a JSON Schema object
466
+ */
467
+ properties: { [k: string]: Properties };
468
+ /**
469
+ * List of required parameter names
470
+ */
471
+ required?: Array<string> | undefined;
472
+ /**
473
+ * Whether to allow properties not defined in the schema
474
+ */
475
+ additionalProperties?: boolean | undefined;
476
+ };
477
+
478
+ /**
479
+ * A function tool definition
480
+ */
481
+ export type Tools1 = {
482
+ /**
483
+ * The type of tool
484
+ */
485
+ type: "function";
486
+ /**
487
+ * The name of the function to be called
488
+ */
489
+ name: string;
490
+ /**
491
+ * A description of what the function does
492
+ */
493
+ description?: string | null | undefined;
494
+ /**
495
+ * The parameters the function accepts
496
+ */
497
+ parameters: ToolsParameters;
498
+ /**
499
+ * Whether to enable strict schema adherence when generating function calls
500
+ */
501
+ strict?: boolean | undefined;
502
+ };
503
+
504
+ export type CreateResponseTools = Tools1 | Tools2 | Tools3;
505
+
506
+ export const CreateResponseToolChoiceRouterResponsesRequestType = {
507
+ Mcp: "mcp",
508
+ } as const;
509
+ export type CreateResponseToolChoiceRouterResponsesRequestType = ClosedEnum<
510
+ typeof CreateResponseToolChoiceRouterResponsesRequestType
511
+ >;
512
+
513
+ export type ToolChoice4 = {
514
+ type: CreateResponseToolChoiceRouterResponsesRequestType;
515
+ serverLabel: string;
516
+ name?: string | null | undefined;
517
+ };
518
+
519
+ export const CreateResponseToolChoiceRouterResponsesType = {
520
+ Function: "function",
521
+ } as const;
522
+ export type CreateResponseToolChoiceRouterResponsesType = ClosedEnum<
523
+ typeof CreateResponseToolChoiceRouterResponsesType
524
+ >;
525
+
526
+ export type ToolChoice3 = {
527
+ type: CreateResponseToolChoiceRouterResponsesType;
528
+ name: string;
529
+ };
530
+
531
+ export const CreateResponseToolChoiceType = {
532
+ FileSearch: "file_search",
533
+ WebSearchPreview: "web_search_preview",
534
+ ComputerUsePreview: "computer_use_preview",
535
+ CodeInterpreter: "code_interpreter",
536
+ ImageGeneration: "image_generation",
537
+ } as const;
538
+ export type CreateResponseToolChoiceType = ClosedEnum<
539
+ typeof CreateResponseToolChoiceType
540
+ >;
541
+
542
+ export type CreateResponseToolChoice2 = {
543
+ type: CreateResponseToolChoiceType;
544
+ };
545
+
546
+ /**
547
+ * Controls which (if any) tool is called by the model. `none` means the model will not call any tool. `auto` means the model can pick between generating a message or calling a tool. `required` means the model must call a tool.
548
+ */
549
+ export const CreateResponseToolChoice1 = {
550
+ None: "none",
551
+ Auto: "auto",
552
+ Required: "required",
553
+ } as const;
554
+ /**
555
+ * Controls which (if any) tool is called by the model. `none` means the model will not call any tool. `auto` means the model can pick between generating a message or calling a tool. `required` means the model must call a tool.
556
+ */
557
+ export type CreateResponseToolChoice1 = ClosedEnum<
558
+ typeof CreateResponseToolChoice1
559
+ >;
560
+
561
+ /**
562
+ * How the model should select which tool (or tools) to use when generating a response. Can be a string (`none`, `auto`, `required`) or an object to force a specific tool.
563
+ */
564
+ export type CreateResponseToolChoice =
565
+ | ToolChoice3
566
+ | ToolChoice4
567
+ | CreateResponseToolChoice2
568
+ | CreateResponseToolChoice1;
569
+
570
+ export type CreateResponseRequestBody = {
571
+ /**
572
+ * ID of the model to use. You can use the List models API to see all of your available models.
573
+ */
574
+ model: string;
575
+ /**
576
+ * Developer-defined key-value pairs that will be included in response objects
577
+ */
578
+ metadata?: { [k: string]: string } | undefined;
579
+ /**
580
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
581
+ */
582
+ temperature?: number | null | undefined;
583
+ /**
584
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
585
+ */
586
+ topP?: number | null | undefined;
587
+ /**
588
+ * The ID of a previous response to continue the conversation from. The model will have access to the previous response context.
589
+ */
590
+ previousResponseId?: string | null | undefined;
591
+ /**
592
+ * Developer-provided instructions that the model should follow. Overwrites the default system message.
593
+ */
594
+ instructions?: string | null | undefined;
595
+ /**
596
+ * Configuration for reasoning models
597
+ */
598
+ reasoning?: Reasoning | null | undefined;
599
+ /**
600
+ * Configuration for thinking mode. Use `adaptive` for models that support it (e.g. Claude Opus 4.6, Sonnet 4.6), or `enabled` with `budget_tokens` for manual control.
601
+ */
602
+ thinking?:
603
+ | components.ThinkingConfigDisabledSchema
604
+ | components.ThinkingConfigEnabledSchema
605
+ | components.ThinkingConfigAdaptiveSchema
606
+ | null
607
+ | undefined;
608
+ /**
609
+ * The maximum number of tokens that can be generated in the response
610
+ */
611
+ maxOutputTokens?: number | null | undefined;
612
+ text?: CreateResponseText | null | undefined;
613
+ /**
614
+ * The actual user input(s) for the model. Can be a simple string, or an array of structured input items (messages, tool outputs) representing a conversation history or complex input.
615
+ */
616
+ input:
617
+ | string
618
+ | Array<CreateResponse23 | CreateResponse2RouterResponses2 | Two1>;
619
+ /**
620
+ * Specifies which (potentially large) fields to include in the response. By default, the results of Code Interpreter and file searches are excluded. Available options:
621
+ *
622
+ * @remarks
623
+ * - code_interpreter_call.outputs: Include the outputs of Code Interpreter tool calls
624
+ * - computer_call_output.output.image_url: Include the image URLs from computer use tool calls
625
+ * - file_search_call.results: Include the results of file search tool calls
626
+ * - message.input_image.image_url: Include URLs of input images
627
+ * - message.output_text.logprobs: Include log probabilities for output text (when logprobs is enabled)
628
+ * - reasoning.encrypted_content: Include encrypted reasoning content for reasoning models
629
+ */
630
+ include?: Array<Include> | null | undefined;
631
+ /**
632
+ * Whether to enable parallel function calling during tool use.
633
+ */
634
+ parallelToolCalls?: boolean | null | undefined;
635
+ /**
636
+ * Whether to store this response for use in distillations or evals.
637
+ */
638
+ store?: boolean | null | undefined;
639
+ /**
640
+ * Specifies the latency tier to use for processing the request. Defaults to "auto".
641
+ */
642
+ serviceTier?: ServiceTier | null | undefined;
643
+ /**
644
+ * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
645
+ */
646
+ tools?: Array<Tools1 | Tools2 | Tools3> | undefined;
647
+ /**
648
+ * How the model should select which tool (or tools) to use when generating a response. Can be a string (`none`, `auto`, `required`) or an object to force a specific tool.
649
+ */
650
+ toolChoice?:
651
+ | ToolChoice3
652
+ | ToolChoice4
653
+ | CreateResponseToolChoice2
654
+ | CreateResponseToolChoice1
655
+ | undefined;
656
+ stream?: boolean | undefined;
657
+ };
658
+
659
+ /**
660
+ * One server-sent event emitted while the response streams
661
+ */
662
+ export type CreateResponseData = {
663
+ /**
664
+ * The type of streaming event
665
+ */
666
+ type: string;
667
+ additionalProperties?: { [k: string]: any } | undefined;
668
+ };
669
+
670
+ /**
671
+ * One server-sent event emitted while the response streams
672
+ */
673
+ export type CreateResponseRouterResponsesResponseBody = {
674
+ /**
675
+ * One server-sent event emitted while the response streams
676
+ */
677
+ data?: CreateResponseData | undefined;
678
+ };
679
+
680
+ /**
681
+ * The object type, which is always "response"
682
+ */
683
+ export const CreateResponseObject = {
684
+ Response: "response",
685
+ } as const;
686
+ /**
687
+ * The object type, which is always "response"
688
+ */
689
+ export type CreateResponseObject = ClosedEnum<typeof CreateResponseObject>;
690
+
691
+ /**
692
+ * The status of the response
693
+ */
694
+ export const CreateResponseStatus = {
695
+ Completed: "completed",
696
+ Failed: "failed",
697
+ InProgress: "in_progress",
698
+ Incomplete: "incomplete",
699
+ } as const;
700
+ /**
701
+ * The status of the response
702
+ */
703
+ export type CreateResponseStatus = ClosedEnum<typeof CreateResponseStatus>;
704
+
705
+ /**
706
+ * The error that occurred, if any
707
+ */
708
+ export type ErrorT = {
709
+ /**
710
+ * The error code
711
+ */
712
+ code: string;
713
+ /**
714
+ * The error message
715
+ */
716
+ message: string;
717
+ };
718
+
719
+ /**
720
+ * The reason the response is incomplete
721
+ */
722
+ export const Reason = {
723
+ MaxOutputTokens: "max_output_tokens",
724
+ ContentFilter: "content_filter",
725
+ } as const;
726
+ /**
727
+ * The reason the response is incomplete
728
+ */
729
+ export type Reason = ClosedEnum<typeof Reason>;
730
+
731
+ /**
732
+ * Details about why the response is incomplete
733
+ */
734
+ export type IncompleteDetails = {
735
+ /**
736
+ * The reason the response is incomplete
737
+ */
738
+ reason: Reason;
739
+ };
740
+
741
+ /**
742
+ * The status of the function call
743
+ */
744
+ export const CreateResponseOutputRouterResponsesResponseStatus = {
745
+ InProgress: "in_progress",
746
+ Completed: "completed",
747
+ Incomplete: "incomplete",
748
+ Failed: "failed",
749
+ } as const;
750
+ /**
751
+ * The status of the function call
752
+ */
753
+ export type CreateResponseOutputRouterResponsesResponseStatus = ClosedEnum<
754
+ typeof CreateResponseOutputRouterResponsesResponseStatus
755
+ >;
756
+
757
+ /**
758
+ * A function tool call output
759
+ */
760
+ export type Output4 = {
761
+ /**
762
+ * The unique identifier for this output item
763
+ */
764
+ id: string;
765
+ /**
766
+ * The type of output item
767
+ */
768
+ type: "function_call";
769
+ /**
770
+ * The ID of the function call
771
+ */
772
+ callId: string;
773
+ /**
774
+ * The name of the function being called
775
+ */
776
+ name: string;
777
+ /**
778
+ * The arguments to the function as a JSON string
779
+ */
780
+ arguments: string;
781
+ /**
782
+ * The status of the function call
783
+ */
784
+ status: CreateResponseOutputRouterResponsesResponseStatus;
785
+ };
786
+
787
+ /**
788
+ * The status of the file search
789
+ */
790
+ export const CreateResponseOutputRouterResponsesStatus = {
791
+ InProgress: "in_progress",
792
+ Completed: "completed",
793
+ Incomplete: "incomplete",
794
+ Failed: "failed",
795
+ } as const;
796
+ /**
797
+ * The status of the file search
798
+ */
799
+ export type CreateResponseOutputRouterResponsesStatus = ClosedEnum<
800
+ typeof CreateResponseOutputRouterResponsesStatus
801
+ >;
802
+
803
+ /**
804
+ * A file search tool call output
805
+ */
806
+ export type Output3 = {
807
+ /**
808
+ * The unique identifier for this output item
809
+ */
810
+ id: string;
811
+ /**
812
+ * The type of output item
813
+ */
814
+ type: "file_search_call";
815
+ /**
816
+ * The status of the file search
817
+ */
818
+ status: CreateResponseOutputRouterResponsesStatus;
819
+ /**
820
+ * The search queries used
821
+ */
822
+ queries?: Array<string> | undefined;
823
+ /**
824
+ * The file search results
825
+ */
826
+ results?: any | undefined;
827
+ };
828
+
829
+ /**
830
+ * The status of the web search
831
+ */
832
+ export const CreateResponseOutputStatus = {
833
+ InProgress: "in_progress",
834
+ Completed: "completed",
835
+ Incomplete: "incomplete",
836
+ Failed: "failed",
837
+ } as const;
838
+ /**
839
+ * The status of the web search
840
+ */
841
+ export type CreateResponseOutputStatus = ClosedEnum<
842
+ typeof CreateResponseOutputStatus
843
+ >;
844
+
845
+ /**
846
+ * A web search tool call output
847
+ */
848
+ export type Output2 = {
849
+ /**
850
+ * The unique identifier for this output item
851
+ */
852
+ id: string;
853
+ /**
854
+ * The type of output item
855
+ */
856
+ type: "web_search_call";
857
+ /**
858
+ * The status of the web search
859
+ */
860
+ status: CreateResponseOutputStatus;
861
+ };
862
+
863
+ /**
864
+ * The role of the message author
865
+ */
866
+ export const OutputRole = {
867
+ Assistant: "assistant",
868
+ } as const;
869
+ /**
870
+ * The role of the message author
871
+ */
872
+ export type OutputRole = ClosedEnum<typeof OutputRole>;
873
+
874
+ /**
875
+ * The status of the message
876
+ */
877
+ export const OutputStatus = {
878
+ InProgress: "in_progress",
879
+ Completed: "completed",
880
+ Incomplete: "incomplete",
881
+ Failed: "failed",
882
+ } as const;
883
+ /**
884
+ * The status of the message
885
+ */
886
+ export type OutputStatus = ClosedEnum<typeof OutputStatus>;
887
+
888
+ /**
889
+ * The type of content part
890
+ */
891
+ export const ContentType = {
892
+ OutputText: "output_text",
893
+ } as const;
894
+ /**
895
+ * The type of content part
896
+ */
897
+ export type ContentType = ClosedEnum<typeof ContentType>;
898
+
899
+ /**
900
+ * A citation to a file
901
+ */
902
+ export type Annotations2 = {
903
+ type: "file_citation";
904
+ /**
905
+ * The index in the text where the citation appears
906
+ */
907
+ index: number;
908
+ /**
909
+ * The ID of the file being cited
910
+ */
911
+ fileId: string;
912
+ /**
913
+ * The name of the file being cited
914
+ */
915
+ filename: string;
916
+ };
917
+
918
+ /**
919
+ * A citation to a URL
920
+ */
921
+ export type Annotations1 = {
922
+ type: "url_citation";
923
+ /**
924
+ * The start index of the citation in the text
925
+ */
926
+ startIndex: number;
927
+ /**
928
+ * The end index of the citation in the text
929
+ */
930
+ endIndex: number;
931
+ /**
932
+ * The URL being cited
933
+ */
934
+ url: string;
935
+ /**
936
+ * The title of the cited resource
937
+ */
938
+ title: string;
939
+ };
940
+
941
+ /**
942
+ * An annotation in the output text
943
+ */
944
+ export type ContentAnnotations = Annotations1 | Annotations2;
945
+
946
+ /**
947
+ * Text output from the model
948
+ */
949
+ export type Content1 = {
950
+ /**
951
+ * The type of content part
952
+ */
953
+ type: ContentType;
954
+ /**
955
+ * The text content
956
+ */
957
+ text: string;
958
+ /**
959
+ * Annotations in the text such as citations
960
+ */
961
+ annotations?: Array<Annotations1 | Annotations2> | undefined;
962
+ /**
963
+ * Log probabilities of the output tokens if requested
964
+ */
965
+ logprobs?: Array<any> | undefined;
966
+ };
967
+
968
+ export type OutputContent = Content1;
969
+
970
+ /**
971
+ * An assistant message output
972
+ */
973
+ export type Output1 = {
974
+ /**
975
+ * The unique identifier for this message
976
+ */
977
+ id: string;
978
+ /**
979
+ * The type of output item
980
+ */
981
+ type: "message";
982
+ /**
983
+ * The role of the message author
984
+ */
985
+ role: OutputRole;
986
+ /**
987
+ * The status of the message
988
+ */
989
+ status: OutputStatus;
990
+ /**
991
+ * The content parts of the message
992
+ */
993
+ content?: Array<Content1> | undefined;
994
+ };
995
+
996
+ export type Output = Output1 | Output2 | Output3 | Output4;
997
+
998
+ /**
999
+ * Breakdown of input token usage
1000
+ */
1001
+ export type CreateResponseInputTokensDetails = {
1002
+ /**
1003
+ * Number of tokens from cache
1004
+ */
1005
+ cachedTokens?: number | undefined;
1006
+ };
1007
+
1008
+ /**
1009
+ * Breakdown of output token usage
1010
+ */
1011
+ export type OutputTokensDetails = {
1012
+ /**
1013
+ * Number of tokens used for reasoning (o3 models)
1014
+ */
1015
+ reasoningTokens?: number | undefined;
1016
+ /**
1017
+ * Number of tokens generated by automatic prediction that were accepted
1018
+ */
1019
+ acceptedPredictionTokens?: number | undefined;
1020
+ /**
1021
+ * Number of tokens generated by automatic prediction that were rejected
1022
+ */
1023
+ rejectedPredictionTokens?: number | undefined;
1024
+ };
1025
+
1026
+ /**
1027
+ * Usage statistics for the response
1028
+ */
1029
+ export type CreateResponseUsage = {
1030
+ /**
1031
+ * Number of tokens in the input
1032
+ */
1033
+ inputTokens?: number | undefined;
1034
+ /**
1035
+ * Number of tokens in the generated output
1036
+ */
1037
+ outputTokens?: number | undefined;
1038
+ /**
1039
+ * Total number of tokens used in the request (input + output)
1040
+ */
1041
+ totalTokens?: number | undefined;
1042
+ /**
1043
+ * Breakdown of input token usage
1044
+ */
1045
+ inputTokensDetails?: CreateResponseInputTokensDetails | undefined;
1046
+ /**
1047
+ * Breakdown of output token usage
1048
+ */
1049
+ outputTokensDetails?: OutputTokensDetails | undefined;
1050
+ };
1051
+
1052
+ export const CreateResponseToolChoiceRouterResponsesResponseType = {
1053
+ Function: "function",
1054
+ } as const;
1055
+ export type CreateResponseToolChoiceRouterResponsesResponseType = ClosedEnum<
1056
+ typeof CreateResponseToolChoiceRouterResponsesResponseType
1057
+ >;
1058
+
1059
+ export type CreateResponseToolChoiceFunction = {
1060
+ name: string;
1061
+ };
1062
+
1063
+ export type CreateResponseToolChoiceRouterResponses2 = {
1064
+ type: CreateResponseToolChoiceRouterResponsesResponseType;
1065
+ function: CreateResponseToolChoiceFunction;
1066
+ };
1067
+
1068
+ export const CreateResponseToolChoiceRouterResponses1 = {
1069
+ None: "none",
1070
+ Auto: "auto",
1071
+ Required: "required",
1072
+ } as const;
1073
+ export type CreateResponseToolChoiceRouterResponses1 = ClosedEnum<
1074
+ typeof CreateResponseToolChoiceRouterResponses1
1075
+ >;
1076
+
1077
+ /**
1078
+ * Controls which (if any) tool is called by the model
1079
+ */
1080
+ export type CreateResponseRouterResponsesToolChoice =
1081
+ | CreateResponseToolChoiceRouterResponses2
1082
+ | CreateResponseToolChoiceRouterResponses1;
1083
+
1084
+ /**
1085
+ * The ranking algorithm
1086
+ */
1087
+ export const ToolsRanker = {
1088
+ Auto: "auto",
1089
+ Default20240821: "default_2024_08_21",
1090
+ } as const;
1091
+ /**
1092
+ * The ranking algorithm
1093
+ */
1094
+ export type ToolsRanker = ClosedEnum<typeof ToolsRanker>;
1095
+
1096
+ /**
1097
+ * Options for ranking search results
1098
+ */
1099
+ export type ToolsRankingOptions = {
1100
+ /**
1101
+ * The ranking algorithm
1102
+ */
1103
+ ranker: ToolsRanker;
1104
+ /**
1105
+ * Minimum relevance score
1106
+ */
1107
+ scoreThreshold: number;
1108
+ };
1109
+
1110
+ /**
1111
+ * Configuration for file search tool
1112
+ */
1113
+ export type CreateResponseTools3 = {
1114
+ /**
1115
+ * The type of tool
1116
+ */
1117
+ type: "file_search";
1118
+ /**
1119
+ * The vector stores to search
1120
+ */
1121
+ vectorStoreIds?: Array<string> | undefined;
1122
+ /**
1123
+ * Maximum number of results to return
1124
+ */
1125
+ maxNumResults: number;
1126
+ /**
1127
+ * Filters to apply to the search
1128
+ */
1129
+ filters?: any | undefined;
1130
+ /**
1131
+ * Options for ranking search results
1132
+ */
1133
+ rankingOptions?: ToolsRankingOptions | undefined;
1134
+ };
1135
+
1136
+ /**
1137
+ * Amount of context to retrieve for each search result
1138
+ */
1139
+ export const ToolsSearchContextSize = {
1140
+ Small: "small",
1141
+ Medium: "medium",
1142
+ Large: "large",
1143
+ } as const;
1144
+ /**
1145
+ * Amount of context to retrieve for each search result
1146
+ */
1147
+ export type ToolsSearchContextSize = ClosedEnum<typeof ToolsSearchContextSize>;
1148
+
1149
+ /**
1150
+ * The type of location
1151
+ */
1152
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType =
1153
+ {
1154
+ Approximate: "approximate",
1155
+ Exact: "exact",
1156
+ } as const;
1157
+ /**
1158
+ * The type of location
1159
+ */
1160
+ export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType =
1161
+ ClosedEnum<
1162
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
1163
+ >;
1164
+
1165
+ /**
1166
+ * User location for search localization
1167
+ */
1168
+ export type ToolsUserLocation = {
1169
+ /**
1170
+ * The type of location
1171
+ */
1172
+ type?:
1173
+ | CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
1174
+ | undefined;
1175
+ /**
1176
+ * The city name
1177
+ */
1178
+ city?: string | null | undefined;
1179
+ /**
1180
+ * The country code
1181
+ */
1182
+ country?: string | undefined;
1183
+ /**
1184
+ * The region/state
1185
+ */
1186
+ region?: string | null | undefined;
1187
+ /**
1188
+ * The timezone
1189
+ */
1190
+ timezone?: string | null | undefined;
1191
+ };
1192
+
1193
+ /**
1194
+ * Configuration for web search tool
1195
+ */
1196
+ export type CreateResponseTools2 = {
1197
+ /**
1198
+ * The type of tool
1199
+ */
1200
+ type: "web_search_preview";
1201
+ /**
1202
+ * List of domains to restrict search to
1203
+ */
1204
+ domains?: Array<string> | undefined;
1205
+ /**
1206
+ * Amount of context to retrieve for each search result
1207
+ */
1208
+ searchContextSize: ToolsSearchContextSize;
1209
+ /**
1210
+ * User location for search localization
1211
+ */
1212
+ userLocation?: ToolsUserLocation | undefined;
1213
+ };
1214
+
1215
+ /**
1216
+ * The type of the parameters object
1217
+ */
1218
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type =
1219
+ {
1220
+ Object: "object",
1221
+ } as const;
1222
+ /**
1223
+ * The type of the parameters object
1224
+ */
1225
+ export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type =
1226
+ ClosedEnum<
1227
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type
1228
+ >;
1229
+
1230
+ export type ToolsProperties = {
1231
+ type: string;
1232
+ description?: string | undefined;
1233
+ enum?: Array<string> | undefined;
1234
+ additionalProperties?: { [k: string]: any } | undefined;
1235
+ };
1236
+
1237
+ /**
1238
+ * The parameters the function accepts
1239
+ */
1240
+ export type CreateResponseToolsParameters = {
1241
+ /**
1242
+ * The type of the parameters object
1243
+ */
1244
+ type:
1245
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type;
1246
+ /**
1247
+ * The parameters the function accepts, described as a JSON Schema object
1248
+ */
1249
+ properties: { [k: string]: ToolsProperties };
1250
+ /**
1251
+ * List of required parameter names
1252
+ */
1253
+ required?: Array<string> | undefined;
1254
+ /**
1255
+ * Whether to allow properties not defined in the schema
1256
+ */
1257
+ additionalProperties?: boolean | undefined;
1258
+ };
1259
+
1260
+ /**
1261
+ * A function tool definition
1262
+ */
1263
+ export type CreateResponseTools1 = {
1264
+ /**
1265
+ * The type of tool
1266
+ */
1267
+ type: "function";
1268
+ /**
1269
+ * The name of the function to be called
1270
+ */
1271
+ name: string;
1272
+ /**
1273
+ * A description of what the function does
1274
+ */
1275
+ description?: string | null | undefined;
1276
+ /**
1277
+ * The parameters the function accepts
1278
+ */
1279
+ parameters: CreateResponseToolsParameters;
1280
+ /**
1281
+ * Whether to enable strict schema adherence when generating function calls
1282
+ */
1283
+ strict: boolean;
1284
+ };
1285
+
1286
+ export type CreateResponseRouterResponsesTools =
1287
+ | CreateResponseTools1
1288
+ | CreateResponseTools2
1289
+ | CreateResponseTools3;
1290
+
1291
+ export type CreateResponseReasoning = {
1292
+ effort?: string | null | undefined;
1293
+ summary?: string | null | undefined;
1294
+ };
1295
+
1296
+ export type CreateResponseFormat3 = {
1297
+ /**
1298
+ * Ensures the response matches a supplied JSON schema
1299
+ */
1300
+ type: "json_schema";
1301
+ /**
1302
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1303
+ */
1304
+ name: string;
1305
+ /**
1306
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
1307
+ */
1308
+ description?: string | undefined;
1309
+ /**
1310
+ * The JSON schema to validate the response against
1311
+ */
1312
+ schema: { [k: string]: any };
1313
+ /**
1314
+ * Whether to enable strict `schema` adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when `strict` is `true`
1315
+ */
1316
+ strict: boolean;
1317
+ };
1318
+
1319
+ export type CreateResponseFormat2 = {
1320
+ /**
1321
+ * Ensures the response is a valid JSON object
1322
+ */
1323
+ type: "json_object";
1324
+ };
1325
+
1326
+ export type CreateResponseFormat1 = {
1327
+ /**
1328
+ * Plain text response format
1329
+ */
1330
+ type: "text";
1331
+ };
1332
+
1333
+ export type CreateResponseRouterResponsesFormat =
1334
+ | CreateResponseFormat1
1335
+ | CreateResponseFormat2
1336
+ | CreateResponseFormat3;
1337
+
1338
+ export type CreateResponseRouterResponsesText = {
1339
+ format: CreateResponseFormat1 | CreateResponseFormat2 | CreateResponseFormat3;
1340
+ };
1341
+
1342
+ /**
1343
+ * Controls how the model handles inputs longer than the maximum token length
1344
+ */
1345
+ export const Truncation = {
1346
+ Auto: "auto",
1347
+ Disabled: "disabled",
1348
+ } as const;
1349
+ /**
1350
+ * Controls how the model handles inputs longer than the maximum token length
1351
+ */
1352
+ export type Truncation = ClosedEnum<typeof Truncation>;
1353
+
1354
+ /**
1355
+ * The service tier used for processing the request
1356
+ */
1357
+ export const CreateResponseServiceTier = {
1358
+ Auto: "auto",
1359
+ Default: "default",
1360
+ Flex: "flex",
1361
+ Priority: "priority",
1362
+ } as const;
1363
+ /**
1364
+ * The service tier used for processing the request
1365
+ */
1366
+ export type CreateResponseServiceTier = ClosedEnum<
1367
+ typeof CreateResponseServiceTier
1368
+ >;
1369
+
1370
+ /**
1371
+ * Represents the completed model response returned when `stream` is false
1372
+ */
1373
+ export type CreateResponseResponseBody = {
1374
+ /**
1375
+ * The unique identifier for the response
1376
+ */
1377
+ id: string;
1378
+ /**
1379
+ * The object type, which is always "response"
1380
+ */
1381
+ object: CreateResponseObject;
1382
+ /**
1383
+ * The Unix timestamp (in seconds) of when the response was created
1384
+ */
1385
+ createdAt: number;
1386
+ /**
1387
+ * The status of the response
1388
+ */
1389
+ status: CreateResponseStatus;
1390
+ /**
1391
+ * The error that occurred, if any
1392
+ */
1393
+ error: ErrorT | null;
1394
+ /**
1395
+ * Details about why the response is incomplete
1396
+ */
1397
+ incompleteDetails: IncompleteDetails | null;
1398
+ /**
1399
+ * The model used to generate the response
1400
+ */
1401
+ model: string;
1402
+ /**
1403
+ * The instructions provided for the response
1404
+ */
1405
+ instructions?: string | null | undefined;
1406
+ /**
1407
+ * The list of output items generated by the model
1408
+ */
1409
+ output: Array<Output1 | Output2 | Output3 | Output4>;
1410
+ /**
1411
+ * A convenience field with the concatenated text from all text content parts
1412
+ */
1413
+ outputText?: string | null | undefined;
1414
+ /**
1415
+ * Usage statistics for the response
1416
+ */
1417
+ usage?: CreateResponseUsage | undefined;
1418
+ temperature?: number | null | undefined;
1419
+ topP?: number | null | undefined;
1420
+ maxOutputTokens?: number | null | undefined;
1421
+ parallelToolCalls: boolean;
1422
+ previousResponseId?: string | null | undefined;
1423
+ metadata?: { [k: string]: string } | undefined;
1424
+ /**
1425
+ * Controls which (if any) tool is called by the model
1426
+ */
1427
+ toolChoice?:
1428
+ | CreateResponseToolChoiceRouterResponses2
1429
+ | CreateResponseToolChoiceRouterResponses1
1430
+ | undefined;
1431
+ tools?:
1432
+ | Array<CreateResponseTools1 | CreateResponseTools2 | CreateResponseTools3>
1433
+ | undefined;
1434
+ reasoning?: CreateResponseReasoning | null | undefined;
1435
+ store?: boolean | undefined;
1436
+ text?: CreateResponseRouterResponsesText | undefined;
1437
+ /**
1438
+ * Controls how the model handles inputs longer than the maximum token length
1439
+ */
1440
+ truncation: Truncation | null;
1441
+ /**
1442
+ * A unique identifier representing your end-user
1443
+ */
1444
+ user?: string | null | undefined;
1445
+ /**
1446
+ * The service tier used for processing the request
1447
+ */
1448
+ serviceTier?: CreateResponseServiceTier | null | undefined;
1449
+ /**
1450
+ * Whether the response was processed in the background
1451
+ */
1452
+ background?: boolean | null | undefined;
1453
+ /**
1454
+ * The number of top log probabilities to return for each output token
1455
+ */
1456
+ topLogprobs?: number | null | undefined;
1457
+ /**
1458
+ * Whether to return log probabilities of the output tokens
1459
+ */
1460
+ logprobs?: boolean | null | undefined;
1461
+ };
1462
+
1463
+ export type CreateResponseResponse =
1464
+ | CreateResponseResponseBody
1465
+ | EventStream<CreateResponseRouterResponsesResponseBody>;
1466
+
1467
+ /** @internal */
1468
+ export const Effort$outboundSchema: z.ZodNativeEnum<typeof Effort> = z
1469
+ .nativeEnum(Effort);
1470
+
1471
+ /** @internal */
1472
+ export type Reasoning$Outbound = {
1473
+ effort?: string | undefined;
1474
+ };
1475
+
1476
+ /** @internal */
1477
+ export const Reasoning$outboundSchema: z.ZodType<
1478
+ Reasoning$Outbound,
1479
+ z.ZodTypeDef,
1480
+ Reasoning
1481
+ > = z.object({
1482
+ effort: Effort$outboundSchema.optional(),
1483
+ });
1484
+
1485
+ export function reasoningToJSON(reasoning: Reasoning): string {
1486
+ return JSON.stringify(Reasoning$outboundSchema.parse(reasoning));
1487
+ }
1488
+
1489
+ /** @internal */
1490
+ export type CreateResponseThinking$Outbound =
1491
+ | components.ThinkingConfigDisabledSchema$Outbound
1492
+ | components.ThinkingConfigEnabledSchema$Outbound
1493
+ | components.ThinkingConfigAdaptiveSchema$Outbound;
1494
+
1495
+ /** @internal */
1496
+ export const CreateResponseThinking$outboundSchema: z.ZodType<
1497
+ CreateResponseThinking$Outbound,
1498
+ z.ZodTypeDef,
1499
+ CreateResponseThinking
1500
+ > = z.union([
1501
+ components.ThinkingConfigDisabledSchema$outboundSchema,
1502
+ components.ThinkingConfigEnabledSchema$outboundSchema,
1503
+ components.ThinkingConfigAdaptiveSchema$outboundSchema,
1504
+ ]);
1505
+
1506
+ export function createResponseThinkingToJSON(
1507
+ createResponseThinking: CreateResponseThinking,
1508
+ ): string {
1509
+ return JSON.stringify(
1510
+ CreateResponseThinking$outboundSchema.parse(createResponseThinking),
1511
+ );
1512
+ }
1513
+
1514
+ /** @internal */
1515
+ export type Format3$Outbound = {
1516
+ type: "json_schema";
1517
+ name: string;
1518
+ description?: string | undefined;
1519
+ schema: { [k: string]: any };
1520
+ strict: boolean;
1521
+ };
1522
+
1523
+ /** @internal */
1524
+ export const Format3$outboundSchema: z.ZodType<
1525
+ Format3$Outbound,
1526
+ z.ZodTypeDef,
1527
+ Format3
1528
+ > = z.object({
1529
+ type: z.literal("json_schema"),
1530
+ name: z.string(),
1531
+ description: z.string().optional(),
1532
+ schema: z.record(z.any()),
1533
+ strict: z.boolean().default(true),
1534
+ });
1535
+
1536
+ export function format3ToJSON(format3: Format3): string {
1537
+ return JSON.stringify(Format3$outboundSchema.parse(format3));
1538
+ }
1539
+
1540
+ /** @internal */
1541
+ export type Format2$Outbound = {
1542
+ type: "json_object";
1543
+ };
1544
+
1545
+ /** @internal */
1546
+ export const Format2$outboundSchema: z.ZodType<
1547
+ Format2$Outbound,
1548
+ z.ZodTypeDef,
1549
+ Format2
1550
+ > = z.object({
1551
+ type: z.literal("json_object"),
1552
+ });
1553
+
1554
+ export function format2ToJSON(format2: Format2): string {
1555
+ return JSON.stringify(Format2$outboundSchema.parse(format2));
1556
+ }
1557
+
1558
+ /** @internal */
1559
+ export type Format1$Outbound = {
1560
+ type: "text";
1561
+ };
1562
+
1563
+ /** @internal */
1564
+ export const Format1$outboundSchema: z.ZodType<
1565
+ Format1$Outbound,
1566
+ z.ZodTypeDef,
1567
+ Format1
1568
+ > = z.object({
1569
+ type: z.literal("text"),
1570
+ });
1571
+
1572
+ export function format1ToJSON(format1: Format1): string {
1573
+ return JSON.stringify(Format1$outboundSchema.parse(format1));
1574
+ }
1575
+
1576
+ /** @internal */
1577
+ export type CreateResponseFormat$Outbound =
1578
+ | Format1$Outbound
1579
+ | Format2$Outbound
1580
+ | Format3$Outbound;
1581
+
1582
+ /** @internal */
1583
+ export const CreateResponseFormat$outboundSchema: z.ZodType<
1584
+ CreateResponseFormat$Outbound,
1585
+ z.ZodTypeDef,
1586
+ CreateResponseFormat
1587
+ > = z.union([
1588
+ z.lazy(() => Format1$outboundSchema),
1589
+ z.lazy(() => Format2$outboundSchema),
1590
+ z.lazy(() => Format3$outboundSchema),
1591
+ ]);
1592
+
1593
+ export function createResponseFormatToJSON(
1594
+ createResponseFormat: CreateResponseFormat,
1595
+ ): string {
1596
+ return JSON.stringify(
1597
+ CreateResponseFormat$outboundSchema.parse(createResponseFormat),
1598
+ );
1599
+ }
1600
+
1601
+ /** @internal */
1602
+ export type CreateResponseText$Outbound = {
1603
+ format: Format1$Outbound | Format2$Outbound | Format3$Outbound;
1604
+ };
1605
+
1606
+ /** @internal */
1607
+ export const CreateResponseText$outboundSchema: z.ZodType<
1608
+ CreateResponseText$Outbound,
1609
+ z.ZodTypeDef,
1610
+ CreateResponseText
1611
+ > = z.object({
1612
+ format: z.union([
1613
+ z.lazy(() => Format1$outboundSchema),
1614
+ z.lazy(() => Format2$outboundSchema),
1615
+ z.lazy(() => Format3$outboundSchema),
1616
+ ]),
1617
+ });
1618
+
1619
+ export function createResponseTextToJSON(
1620
+ createResponseText: CreateResponseText,
1621
+ ): string {
1622
+ return JSON.stringify(
1623
+ CreateResponseText$outboundSchema.parse(createResponseText),
1624
+ );
1625
+ }
1626
+
1627
+ /** @internal */
1628
+ export const CreateResponse2RouterResponsesRequestRequestBodyInputType$outboundSchema:
1629
+ z.ZodNativeEnum<
1630
+ typeof CreateResponse2RouterResponsesRequestRequestBodyInputType
1631
+ > = z.nativeEnum(CreateResponse2RouterResponsesRequestRequestBodyInputType);
1632
+
1633
+ /** @internal */
1634
+ export type CreateResponse23$Outbound = {
1635
+ type: string;
1636
+ call_id: string;
1637
+ id: string;
1638
+ name: string;
1639
+ arguments: string;
1640
+ status: string;
1641
+ };
1642
+
1643
+ /** @internal */
1644
+ export const CreateResponse23$outboundSchema: z.ZodType<
1645
+ CreateResponse23$Outbound,
1646
+ z.ZodTypeDef,
1647
+ CreateResponse23
1648
+ > = z.object({
1649
+ type:
1650
+ CreateResponse2RouterResponsesRequestRequestBodyInputType$outboundSchema,
1651
+ callId: z.string(),
1652
+ id: z.string(),
1653
+ name: z.string(),
1654
+ arguments: z.string(),
1655
+ status: z.string(),
1656
+ }).transform((v) => {
1657
+ return remap$(v, {
1658
+ callId: "call_id",
1659
+ });
1660
+ });
1661
+
1662
+ export function createResponse23ToJSON(
1663
+ createResponse23: CreateResponse23,
1664
+ ): string {
1665
+ return JSON.stringify(
1666
+ CreateResponse23$outboundSchema.parse(createResponse23),
1667
+ );
1668
+ }
1669
+
1670
+ /** @internal */
1671
+ export const CreateResponse2RouterResponsesRequestRequestBodyType$outboundSchema:
1672
+ z.ZodNativeEnum<typeof CreateResponse2RouterResponsesRequestRequestBodyType> =
1673
+ z.nativeEnum(CreateResponse2RouterResponsesRequestRequestBodyType);
1674
+
1675
+ /** @internal */
1676
+ export type CreateResponse2RouterResponses2$Outbound = {
1677
+ type: string;
1678
+ call_id: string;
1679
+ output: string;
1680
+ };
1681
+
1682
+ /** @internal */
1683
+ export const CreateResponse2RouterResponses2$outboundSchema: z.ZodType<
1684
+ CreateResponse2RouterResponses2$Outbound,
1685
+ z.ZodTypeDef,
1686
+ CreateResponse2RouterResponses2
1687
+ > = z.object({
1688
+ type: CreateResponse2RouterResponsesRequestRequestBodyType$outboundSchema,
1689
+ callId: z.string(),
1690
+ output: z.string(),
1691
+ }).transform((v) => {
1692
+ return remap$(v, {
1693
+ callId: "call_id",
1694
+ });
1695
+ });
1696
+
1697
+ export function createResponse2RouterResponses2ToJSON(
1698
+ createResponse2RouterResponses2: CreateResponse2RouterResponses2,
1699
+ ): string {
1700
+ return JSON.stringify(
1701
+ CreateResponse2RouterResponses2$outboundSchema.parse(
1702
+ createResponse2RouterResponses2,
1703
+ ),
1704
+ );
1705
+ }
1706
+
1707
+ /** @internal */
1708
+ export const TwoRole$outboundSchema: z.ZodNativeEnum<typeof TwoRole> = z
1709
+ .nativeEnum(TwoRole);
1710
+
1711
+ /** @internal */
1712
+ export type Two3$Outbound = {
1713
+ type: "input_file";
1714
+ file_data?: string | undefined;
1715
+ file_id?: string | undefined;
1716
+ filename?: string | undefined;
1717
+ file_url?: string | undefined;
1718
+ };
1719
+
1720
+ /** @internal */
1721
+ export const Two3$outboundSchema: z.ZodType<Two3$Outbound, z.ZodTypeDef, Two3> =
1722
+ z.object({
1723
+ type: z.literal("input_file"),
1724
+ fileData: z.string().optional(),
1725
+ fileId: z.string().optional(),
1726
+ filename: z.string().optional(),
1727
+ fileUrl: z.string().optional(),
1728
+ }).transform((v) => {
1729
+ return remap$(v, {
1730
+ fileData: "file_data",
1731
+ fileId: "file_id",
1732
+ fileUrl: "file_url",
1733
+ });
1734
+ });
1735
+
1736
+ export function two3ToJSON(two3: Two3): string {
1737
+ return JSON.stringify(Two3$outboundSchema.parse(two3));
1738
+ }
1739
+
1740
+ /** @internal */
1741
+ export const Detail$outboundSchema: z.ZodNativeEnum<typeof Detail> = z
1742
+ .nativeEnum(Detail);
1743
+
1744
+ /** @internal */
1745
+ export type CreateResponse22$Outbound = {
1746
+ type: "input_image";
1747
+ detail: string;
1748
+ file_id?: string | null | undefined;
1749
+ image_url?: string | null | undefined;
1750
+ };
1751
+
1752
+ /** @internal */
1753
+ export const CreateResponse22$outboundSchema: z.ZodType<
1754
+ CreateResponse22$Outbound,
1755
+ z.ZodTypeDef,
1756
+ CreateResponse22
1757
+ > = z.object({
1758
+ type: z.literal("input_image"),
1759
+ detail: Detail$outboundSchema.default("auto"),
1760
+ fileId: z.nullable(z.string()).optional(),
1761
+ imageUrl: z.nullable(z.string()).optional(),
1762
+ }).transform((v) => {
1763
+ return remap$(v, {
1764
+ fileId: "file_id",
1765
+ imageUrl: "image_url",
1766
+ });
1767
+ });
1768
+
1769
+ export function createResponse22ToJSON(
1770
+ createResponse22: CreateResponse22,
1771
+ ): string {
1772
+ return JSON.stringify(
1773
+ CreateResponse22$outboundSchema.parse(createResponse22),
1774
+ );
1775
+ }
1776
+
1777
+ /** @internal */
1778
+ export type CreateResponse21$Outbound = {
1779
+ type: "input_text";
1780
+ text: string;
1781
+ };
1782
+
1783
+ /** @internal */
1784
+ export const CreateResponse21$outboundSchema: z.ZodType<
1785
+ CreateResponse21$Outbound,
1786
+ z.ZodTypeDef,
1787
+ CreateResponse21
1788
+ > = z.object({
1789
+ type: z.literal("input_text"),
1790
+ text: z.string(),
1791
+ });
1792
+
1793
+ export function createResponse21ToJSON(
1794
+ createResponse21: CreateResponse21,
1795
+ ): string {
1796
+ return JSON.stringify(
1797
+ CreateResponse21$outboundSchema.parse(createResponse21),
1798
+ );
1799
+ }
1800
+
1801
+ /** @internal */
1802
+ export type CreateResponseContent2$Outbound =
1803
+ | CreateResponse21$Outbound
1804
+ | CreateResponse22$Outbound
1805
+ | Two3$Outbound;
1806
+
1807
+ /** @internal */
1808
+ export const CreateResponseContent2$outboundSchema: z.ZodType<
1809
+ CreateResponseContent2$Outbound,
1810
+ z.ZodTypeDef,
1811
+ CreateResponseContent2
1812
+ > = z.union([
1813
+ z.lazy(() => CreateResponse21$outboundSchema),
1814
+ z.lazy(() => CreateResponse22$outboundSchema),
1815
+ z.lazy(() => Two3$outboundSchema),
1816
+ ]);
1817
+
1818
+ export function createResponseContent2ToJSON(
1819
+ createResponseContent2: CreateResponseContent2,
1820
+ ): string {
1821
+ return JSON.stringify(
1822
+ CreateResponseContent2$outboundSchema.parse(createResponseContent2),
1823
+ );
1824
+ }
1825
+
1826
+ /** @internal */
1827
+ export type TwoContent$Outbound =
1828
+ | string
1829
+ | Array<
1830
+ CreateResponse21$Outbound | CreateResponse22$Outbound | Two3$Outbound
1831
+ >;
1832
+
1833
+ /** @internal */
1834
+ export const TwoContent$outboundSchema: z.ZodType<
1835
+ TwoContent$Outbound,
1836
+ z.ZodTypeDef,
1837
+ TwoContent
1838
+ > = z.union([
1839
+ z.string(),
1840
+ z.array(z.union([
1841
+ z.lazy(() => CreateResponse21$outboundSchema),
1842
+ z.lazy(() => CreateResponse22$outboundSchema),
1843
+ z.lazy(() => Two3$outboundSchema),
1844
+ ])),
1845
+ ]);
1846
+
1847
+ export function twoContentToJSON(twoContent: TwoContent): string {
1848
+ return JSON.stringify(TwoContent$outboundSchema.parse(twoContent));
1849
+ }
1850
+
1851
+ /** @internal */
1852
+ export type Two1$Outbound = {
1853
+ role: string;
1854
+ content:
1855
+ | string
1856
+ | Array<
1857
+ CreateResponse21$Outbound | CreateResponse22$Outbound | Two3$Outbound
1858
+ >;
1859
+ };
1860
+
1861
+ /** @internal */
1862
+ export const Two1$outboundSchema: z.ZodType<Two1$Outbound, z.ZodTypeDef, Two1> =
1863
+ z.object({
1864
+ role: TwoRole$outboundSchema,
1865
+ content: z.union([
1866
+ z.string(),
1867
+ z.array(z.union([
1868
+ z.lazy(() => CreateResponse21$outboundSchema),
1869
+ z.lazy(() => CreateResponse22$outboundSchema),
1870
+ z.lazy(() => Two3$outboundSchema),
1871
+ ])),
1872
+ ]),
1873
+ });
1874
+
1875
+ export function two1ToJSON(two1: Two1): string {
1876
+ return JSON.stringify(Two1$outboundSchema.parse(two1));
1877
+ }
1878
+
1879
+ /** @internal */
1880
+ export type Input2$Outbound =
1881
+ | CreateResponse23$Outbound
1882
+ | CreateResponse2RouterResponses2$Outbound
1883
+ | Two1$Outbound;
1884
+
1885
+ /** @internal */
1886
+ export const Input2$outboundSchema: z.ZodType<
1887
+ Input2$Outbound,
1888
+ z.ZodTypeDef,
1889
+ Input2
1890
+ > = z.union([
1891
+ z.lazy(() => CreateResponse23$outboundSchema),
1892
+ z.lazy(() => CreateResponse2RouterResponses2$outboundSchema),
1893
+ z.lazy(() => Two1$outboundSchema),
1894
+ ]);
1895
+
1896
+ export function input2ToJSON(input2: Input2): string {
1897
+ return JSON.stringify(Input2$outboundSchema.parse(input2));
1898
+ }
1899
+
1900
+ /** @internal */
1901
+ export type CreateResponseInput$Outbound =
1902
+ | string
1903
+ | Array<
1904
+ | CreateResponse23$Outbound
1905
+ | CreateResponse2RouterResponses2$Outbound
1906
+ | Two1$Outbound
1907
+ >;
1908
+
1909
+ /** @internal */
1910
+ export const CreateResponseInput$outboundSchema: z.ZodType<
1911
+ CreateResponseInput$Outbound,
1912
+ z.ZodTypeDef,
1913
+ CreateResponseInput
1914
+ > = z.union([
1915
+ z.string(),
1916
+ z.array(z.union([
1917
+ z.lazy(() => CreateResponse23$outboundSchema),
1918
+ z.lazy(() => CreateResponse2RouterResponses2$outboundSchema),
1919
+ z.lazy(() => Two1$outboundSchema),
1920
+ ])),
1921
+ ]);
1922
+
1923
+ export function createResponseInputToJSON(
1924
+ createResponseInput: CreateResponseInput,
1925
+ ): string {
1926
+ return JSON.stringify(
1927
+ CreateResponseInput$outboundSchema.parse(createResponseInput),
1928
+ );
1929
+ }
1930
+
1931
+ /** @internal */
1932
+ export const Include$outboundSchema: z.ZodNativeEnum<typeof Include> = z
1933
+ .nativeEnum(Include);
1934
+
1935
+ /** @internal */
1936
+ export const ServiceTier$outboundSchema: z.ZodNativeEnum<typeof ServiceTier> = z
1937
+ .nativeEnum(ServiceTier);
1938
+
1939
+ /** @internal */
1940
+ export const Ranker$outboundSchema: z.ZodNativeEnum<typeof Ranker> = z
1941
+ .nativeEnum(Ranker);
1942
+
1943
+ /** @internal */
1944
+ export type RankingOptions$Outbound = {
1945
+ ranker: string;
1946
+ score_threshold: number;
1947
+ };
1948
+
1949
+ /** @internal */
1950
+ export const RankingOptions$outboundSchema: z.ZodType<
1951
+ RankingOptions$Outbound,
1952
+ z.ZodTypeDef,
1953
+ RankingOptions
1954
+ > = z.object({
1955
+ ranker: Ranker$outboundSchema.default("auto"),
1956
+ scoreThreshold: z.number().default(0),
1957
+ }).transform((v) => {
1958
+ return remap$(v, {
1959
+ scoreThreshold: "score_threshold",
1960
+ });
1961
+ });
1962
+
1963
+ export function rankingOptionsToJSON(rankingOptions: RankingOptions): string {
1964
+ return JSON.stringify(RankingOptions$outboundSchema.parse(rankingOptions));
1965
+ }
1966
+
1967
+ /** @internal */
1968
+ export type Tools3$Outbound = {
1969
+ type: "file_search";
1970
+ vector_store_ids?: Array<string> | undefined;
1971
+ max_num_results: number;
1972
+ filters?: any | undefined;
1973
+ ranking_options?: RankingOptions$Outbound | undefined;
1974
+ };
1975
+
1976
+ /** @internal */
1977
+ export const Tools3$outboundSchema: z.ZodType<
1978
+ Tools3$Outbound,
1979
+ z.ZodTypeDef,
1980
+ Tools3
1981
+ > = z.object({
1982
+ type: z.literal("file_search"),
1983
+ vectorStoreIds: z.array(z.string()).optional(),
1984
+ maxNumResults: z.number().int().default(20),
1985
+ filters: z.any().optional(),
1986
+ rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(),
1987
+ }).transform((v) => {
1988
+ return remap$(v, {
1989
+ vectorStoreIds: "vector_store_ids",
1990
+ maxNumResults: "max_num_results",
1991
+ rankingOptions: "ranking_options",
1992
+ });
1993
+ });
1994
+
1995
+ export function tools3ToJSON(tools3: Tools3): string {
1996
+ return JSON.stringify(Tools3$outboundSchema.parse(tools3));
1997
+ }
1998
+
1999
+ /** @internal */
2000
+ export const SearchContextSize$outboundSchema: z.ZodNativeEnum<
2001
+ typeof SearchContextSize
2002
+ > = z.nativeEnum(SearchContextSize);
2003
+
2004
+ /** @internal */
2005
+ export const CreateResponseToolsRouterResponsesRequestType$outboundSchema:
2006
+ z.ZodNativeEnum<typeof CreateResponseToolsRouterResponsesRequestType> = z
2007
+ .nativeEnum(CreateResponseToolsRouterResponsesRequestType);
2008
+
2009
+ /** @internal */
2010
+ export type UserLocation$Outbound = {
2011
+ type?: string | undefined;
2012
+ city?: string | null | undefined;
2013
+ country?: string | undefined;
2014
+ region?: string | null | undefined;
2015
+ timezone?: string | null | undefined;
2016
+ };
2017
+
2018
+ /** @internal */
2019
+ export const UserLocation$outboundSchema: z.ZodType<
2020
+ UserLocation$Outbound,
2021
+ z.ZodTypeDef,
2022
+ UserLocation
2023
+ > = z.object({
2024
+ type: CreateResponseToolsRouterResponsesRequestType$outboundSchema.optional(),
2025
+ city: z.nullable(z.string()).optional(),
2026
+ country: z.string().optional(),
2027
+ region: z.nullable(z.string()).optional(),
2028
+ timezone: z.nullable(z.string()).optional(),
2029
+ });
2030
+
2031
+ export function userLocationToJSON(userLocation: UserLocation): string {
2032
+ return JSON.stringify(UserLocation$outboundSchema.parse(userLocation));
2033
+ }
2034
+
2035
+ /** @internal */
2036
+ export type Tools2$Outbound = {
2037
+ type: "web_search_preview";
2038
+ domains?: Array<string> | undefined;
2039
+ search_context_size: string;
2040
+ user_location?: UserLocation$Outbound | undefined;
2041
+ };
2042
+
2043
+ /** @internal */
2044
+ export const Tools2$outboundSchema: z.ZodType<
2045
+ Tools2$Outbound,
2046
+ z.ZodTypeDef,
2047
+ Tools2
2048
+ > = z.object({
2049
+ type: z.literal("web_search_preview"),
2050
+ domains: z.array(z.string()).optional(),
2051
+ searchContextSize: SearchContextSize$outboundSchema.default("medium"),
2052
+ userLocation: z.lazy(() => UserLocation$outboundSchema).optional(),
2053
+ }).transform((v) => {
2054
+ return remap$(v, {
2055
+ searchContextSize: "search_context_size",
2056
+ userLocation: "user_location",
2057
+ });
2058
+ });
2059
+
2060
+ export function tools2ToJSON(tools2: Tools2): string {
2061
+ return JSON.stringify(Tools2$outboundSchema.parse(tools2));
2062
+ }
2063
+
2064
+ /** @internal */
2065
+ export const CreateResponseToolsType$outboundSchema: z.ZodNativeEnum<
2066
+ typeof CreateResponseToolsType
2067
+ > = z.nativeEnum(CreateResponseToolsType);
2068
+
2069
+ /** @internal */
2070
+ export type Properties$Outbound = {
2071
+ type: string;
2072
+ description?: string | undefined;
2073
+ enum?: Array<string> | undefined;
2074
+ [additionalProperties: string]: unknown;
2075
+ };
2076
+
2077
+ /** @internal */
2078
+ export const Properties$outboundSchema: z.ZodType<
2079
+ Properties$Outbound,
2080
+ z.ZodTypeDef,
2081
+ Properties
2082
+ > = z.object({
2083
+ type: z.string(),
2084
+ description: z.string().optional(),
2085
+ enum: z.array(z.string()).optional(),
2086
+ additionalProperties: z.record(z.any()).optional(),
2087
+ }).transform((v) => {
2088
+ return {
2089
+ ...v.additionalProperties,
2090
+ ...remap$(v, {
2091
+ additionalProperties: null,
2092
+ }),
2093
+ };
2094
+ });
2095
+
2096
+ export function propertiesToJSON(properties: Properties): string {
2097
+ return JSON.stringify(Properties$outboundSchema.parse(properties));
2098
+ }
2099
+
2100
+ /** @internal */
2101
+ export type ToolsParameters$Outbound = {
2102
+ type: string;
2103
+ properties: { [k: string]: Properties$Outbound };
2104
+ required?: Array<string> | undefined;
2105
+ additionalProperties?: boolean | undefined;
2106
+ };
2107
+
2108
+ /** @internal */
2109
+ export const ToolsParameters$outboundSchema: z.ZodType<
2110
+ ToolsParameters$Outbound,
2111
+ z.ZodTypeDef,
2112
+ ToolsParameters
2113
+ > = z.object({
2114
+ type: CreateResponseToolsType$outboundSchema,
2115
+ properties: z.record(z.lazy(() => Properties$outboundSchema)),
2116
+ required: z.array(z.string()).optional(),
2117
+ additionalProperties: z.boolean().optional(),
2118
+ });
2119
+
2120
+ export function toolsParametersToJSON(
2121
+ toolsParameters: ToolsParameters,
2122
+ ): string {
2123
+ return JSON.stringify(ToolsParameters$outboundSchema.parse(toolsParameters));
2124
+ }
2125
+
2126
+ /** @internal */
2127
+ export type Tools1$Outbound = {
2128
+ type: "function";
2129
+ name: string;
2130
+ description?: string | null | undefined;
2131
+ parameters: ToolsParameters$Outbound;
2132
+ strict: boolean;
2133
+ };
2134
+
2135
+ /** @internal */
2136
+ export const Tools1$outboundSchema: z.ZodType<
2137
+ Tools1$Outbound,
2138
+ z.ZodTypeDef,
2139
+ Tools1
2140
+ > = z.object({
2141
+ type: z.literal("function"),
2142
+ name: z.string(),
2143
+ description: z.nullable(z.string()).optional(),
2144
+ parameters: z.lazy(() => ToolsParameters$outboundSchema),
2145
+ strict: z.boolean().default(true),
2146
+ });
2147
+
2148
+ export function tools1ToJSON(tools1: Tools1): string {
2149
+ return JSON.stringify(Tools1$outboundSchema.parse(tools1));
2150
+ }
2151
+
2152
+ /** @internal */
2153
+ export type CreateResponseTools$Outbound =
2154
+ | Tools1$Outbound
2155
+ | Tools2$Outbound
2156
+ | Tools3$Outbound;
2157
+
2158
+ /** @internal */
2159
+ export const CreateResponseTools$outboundSchema: z.ZodType<
2160
+ CreateResponseTools$Outbound,
2161
+ z.ZodTypeDef,
2162
+ CreateResponseTools
2163
+ > = z.union([
2164
+ z.lazy(() => Tools1$outboundSchema),
2165
+ z.lazy(() => Tools2$outboundSchema),
2166
+ z.lazy(() => Tools3$outboundSchema),
2167
+ ]);
2168
+
2169
+ export function createResponseToolsToJSON(
2170
+ createResponseTools: CreateResponseTools,
2171
+ ): string {
2172
+ return JSON.stringify(
2173
+ CreateResponseTools$outboundSchema.parse(createResponseTools),
2174
+ );
2175
+ }
2176
+
2177
+ /** @internal */
2178
+ export const CreateResponseToolChoiceRouterResponsesRequestType$outboundSchema:
2179
+ z.ZodNativeEnum<typeof CreateResponseToolChoiceRouterResponsesRequestType> = z
2180
+ .nativeEnum(CreateResponseToolChoiceRouterResponsesRequestType);
2181
+
2182
+ /** @internal */
2183
+ export type ToolChoice4$Outbound = {
2184
+ type: string;
2185
+ server_label: string;
2186
+ name?: string | null | undefined;
2187
+ };
2188
+
2189
+ /** @internal */
2190
+ export const ToolChoice4$outboundSchema: z.ZodType<
2191
+ ToolChoice4$Outbound,
2192
+ z.ZodTypeDef,
2193
+ ToolChoice4
2194
+ > = z.object({
2195
+ type: CreateResponseToolChoiceRouterResponsesRequestType$outboundSchema,
2196
+ serverLabel: z.string(),
2197
+ name: z.nullable(z.string()).optional(),
2198
+ }).transform((v) => {
2199
+ return remap$(v, {
2200
+ serverLabel: "server_label",
2201
+ });
2202
+ });
2203
+
2204
+ export function toolChoice4ToJSON(toolChoice4: ToolChoice4): string {
2205
+ return JSON.stringify(ToolChoice4$outboundSchema.parse(toolChoice4));
2206
+ }
2207
+
2208
+ /** @internal */
2209
+ export const CreateResponseToolChoiceRouterResponsesType$outboundSchema:
2210
+ z.ZodNativeEnum<typeof CreateResponseToolChoiceRouterResponsesType> = z
2211
+ .nativeEnum(CreateResponseToolChoiceRouterResponsesType);
2212
+
2213
+ /** @internal */
2214
+ export type ToolChoice3$Outbound = {
2215
+ type: string;
2216
+ name: string;
2217
+ };
2218
+
2219
+ /** @internal */
2220
+ export const ToolChoice3$outboundSchema: z.ZodType<
2221
+ ToolChoice3$Outbound,
2222
+ z.ZodTypeDef,
2223
+ ToolChoice3
2224
+ > = z.object({
2225
+ type: CreateResponseToolChoiceRouterResponsesType$outboundSchema,
2226
+ name: z.string(),
2227
+ });
2228
+
2229
+ export function toolChoice3ToJSON(toolChoice3: ToolChoice3): string {
2230
+ return JSON.stringify(ToolChoice3$outboundSchema.parse(toolChoice3));
2231
+ }
2232
+
2233
+ /** @internal */
2234
+ export const CreateResponseToolChoiceType$outboundSchema: z.ZodNativeEnum<
2235
+ typeof CreateResponseToolChoiceType
2236
+ > = z.nativeEnum(CreateResponseToolChoiceType);
2237
+
2238
+ /** @internal */
2239
+ export type CreateResponseToolChoice2$Outbound = {
2240
+ type: string;
2241
+ };
2242
+
2243
+ /** @internal */
2244
+ export const CreateResponseToolChoice2$outboundSchema: z.ZodType<
2245
+ CreateResponseToolChoice2$Outbound,
2246
+ z.ZodTypeDef,
2247
+ CreateResponseToolChoice2
2248
+ > = z.object({
2249
+ type: CreateResponseToolChoiceType$outboundSchema,
2250
+ });
2251
+
2252
+ export function createResponseToolChoice2ToJSON(
2253
+ createResponseToolChoice2: CreateResponseToolChoice2,
2254
+ ): string {
2255
+ return JSON.stringify(
2256
+ CreateResponseToolChoice2$outboundSchema.parse(createResponseToolChoice2),
2257
+ );
2258
+ }
2259
+
2260
+ /** @internal */
2261
+ export const CreateResponseToolChoice1$outboundSchema: z.ZodNativeEnum<
2262
+ typeof CreateResponseToolChoice1
2263
+ > = z.nativeEnum(CreateResponseToolChoice1);
2264
+
2265
+ /** @internal */
2266
+ export type CreateResponseToolChoice$Outbound =
2267
+ | ToolChoice3$Outbound
2268
+ | ToolChoice4$Outbound
2269
+ | CreateResponseToolChoice2$Outbound
2270
+ | string;
2271
+
2272
+ /** @internal */
2273
+ export const CreateResponseToolChoice$outboundSchema: z.ZodType<
2274
+ CreateResponseToolChoice$Outbound,
2275
+ z.ZodTypeDef,
2276
+ CreateResponseToolChoice
2277
+ > = z.union([
2278
+ z.lazy(() => ToolChoice3$outboundSchema),
2279
+ z.lazy(() => ToolChoice4$outboundSchema),
2280
+ z.lazy(() => CreateResponseToolChoice2$outboundSchema),
2281
+ CreateResponseToolChoice1$outboundSchema,
2282
+ ]);
2283
+
2284
+ export function createResponseToolChoiceToJSON(
2285
+ createResponseToolChoice: CreateResponseToolChoice,
2286
+ ): string {
2287
+ return JSON.stringify(
2288
+ CreateResponseToolChoice$outboundSchema.parse(createResponseToolChoice),
2289
+ );
2290
+ }
2291
+
2292
+ /** @internal */
2293
+ export type CreateResponseRequestBody$Outbound = {
2294
+ model: string;
2295
+ metadata?: { [k: string]: string } | undefined;
2296
+ temperature?: number | null | undefined;
2297
+ top_p?: number | null | undefined;
2298
+ previous_response_id?: string | null | undefined;
2299
+ instructions?: string | null | undefined;
2300
+ reasoning?: Reasoning$Outbound | null | undefined;
2301
+ thinking?:
2302
+ | components.ThinkingConfigDisabledSchema$Outbound
2303
+ | components.ThinkingConfigEnabledSchema$Outbound
2304
+ | components.ThinkingConfigAdaptiveSchema$Outbound
2305
+ | null
2306
+ | undefined;
2307
+ max_output_tokens?: number | null | undefined;
2308
+ text?: CreateResponseText$Outbound | null | undefined;
2309
+ input:
2310
+ | string
2311
+ | Array<
2312
+ | CreateResponse23$Outbound
2313
+ | CreateResponse2RouterResponses2$Outbound
2314
+ | Two1$Outbound
2315
+ >;
2316
+ include?: Array<string> | null | undefined;
2317
+ parallel_tool_calls?: boolean | null | undefined;
2318
+ store: boolean | null;
2319
+ service_tier?: string | null | undefined;
2320
+ tools?:
2321
+ | Array<Tools1$Outbound | Tools2$Outbound | Tools3$Outbound>
2322
+ | undefined;
2323
+ tool_choice?:
2324
+ | ToolChoice3$Outbound
2325
+ | ToolChoice4$Outbound
2326
+ | CreateResponseToolChoice2$Outbound
2327
+ | string
2328
+ | undefined;
2329
+ stream: boolean;
2330
+ };
2331
+
2332
+ /** @internal */
2333
+ export const CreateResponseRequestBody$outboundSchema: z.ZodType<
2334
+ CreateResponseRequestBody$Outbound,
2335
+ z.ZodTypeDef,
2336
+ CreateResponseRequestBody
2337
+ > = z.object({
2338
+ model: z.string(),
2339
+ metadata: z.record(z.string()).optional(),
2340
+ temperature: z.nullable(z.number()).optional(),
2341
+ topP: z.nullable(z.number()).optional(),
2342
+ previousResponseId: z.nullable(z.string()).optional(),
2343
+ instructions: z.nullable(z.string()).optional(),
2344
+ reasoning: z.nullable(z.lazy(() => Reasoning$outboundSchema)).optional(),
2345
+ thinking: z.nullable(
2346
+ z.union([
2347
+ components.ThinkingConfigDisabledSchema$outboundSchema,
2348
+ components.ThinkingConfigEnabledSchema$outboundSchema,
2349
+ components.ThinkingConfigAdaptiveSchema$outboundSchema,
2350
+ ]),
2351
+ ).optional(),
2352
+ maxOutputTokens: z.nullable(z.number().int()).optional(),
2353
+ text: z.nullable(z.lazy(() => CreateResponseText$outboundSchema)).optional(),
2354
+ input: z.union([
2355
+ z.string(),
2356
+ z.array(z.union([
2357
+ z.lazy(() => CreateResponse23$outboundSchema),
2358
+ z.lazy(() => CreateResponse2RouterResponses2$outboundSchema),
2359
+ z.lazy(() => Two1$outboundSchema),
2360
+ ])),
2361
+ ]),
2362
+ include: z.nullable(z.array(Include$outboundSchema)).optional(),
2363
+ parallelToolCalls: z.nullable(z.boolean()).optional(),
2364
+ store: z.nullable(z.boolean().default(true)),
2365
+ serviceTier: z.nullable(ServiceTier$outboundSchema).optional(),
2366
+ tools: z.array(
2367
+ z.union([
2368
+ z.lazy(() => Tools1$outboundSchema),
2369
+ z.lazy(() => Tools2$outboundSchema),
2370
+ z.lazy(() => Tools3$outboundSchema),
2371
+ ]),
2372
+ ).optional(),
2373
+ toolChoice: z.union([
2374
+ z.lazy(() => ToolChoice3$outboundSchema),
2375
+ z.lazy(() => ToolChoice4$outboundSchema),
2376
+ z.lazy(() => CreateResponseToolChoice2$outboundSchema),
2377
+ CreateResponseToolChoice1$outboundSchema,
2378
+ ]).optional(),
2379
+ stream: z.boolean().default(false),
2380
+ }).transform((v) => {
2381
+ return remap$(v, {
2382
+ topP: "top_p",
2383
+ previousResponseId: "previous_response_id",
2384
+ maxOutputTokens: "max_output_tokens",
2385
+ parallelToolCalls: "parallel_tool_calls",
2386
+ serviceTier: "service_tier",
2387
+ toolChoice: "tool_choice",
2388
+ });
2389
+ });
2390
+
2391
+ export function createResponseRequestBodyToJSON(
2392
+ createResponseRequestBody: CreateResponseRequestBody,
2393
+ ): string {
2394
+ return JSON.stringify(
2395
+ CreateResponseRequestBody$outboundSchema.parse(createResponseRequestBody),
2396
+ );
2397
+ }
2398
+
2399
+ /** @internal */
2400
+ export const CreateResponseData$inboundSchema: z.ZodType<
2401
+ CreateResponseData,
2402
+ z.ZodTypeDef,
2403
+ unknown
2404
+ > = collectExtraKeys$(
2405
+ z.object({
2406
+ type: z.string(),
2407
+ }).catchall(z.any()),
2408
+ "additionalProperties",
2409
+ true,
2410
+ );
2411
+
2412
+ export function createResponseDataFromJSON(
2413
+ jsonString: string,
2414
+ ): SafeParseResult<CreateResponseData, SDKValidationError> {
2415
+ return safeParse(
2416
+ jsonString,
2417
+ (x) => CreateResponseData$inboundSchema.parse(JSON.parse(x)),
2418
+ `Failed to parse 'CreateResponseData' from JSON`,
2419
+ );
2420
+ }
2421
+
2422
+ /** @internal */
2423
+ export const CreateResponseRouterResponsesResponseBody$inboundSchema: z.ZodType<
2424
+ CreateResponseRouterResponsesResponseBody,
2425
+ z.ZodTypeDef,
2426
+ unknown
2427
+ > = z.object({
2428
+ data: z.string().optional().transform((v, ctx) => {
2429
+ if (v === undefined) return undefined;
2430
+ try {
2431
+ return JSON.parse(v);
2432
+ } catch (err) {
2433
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
2434
+ return z.NEVER;
2435
+ }
2436
+ }).pipe(z.lazy(() => CreateResponseData$inboundSchema).optional()),
2437
+ });
2438
+
2439
+ export function createResponseRouterResponsesResponseBodyFromJSON(
2440
+ jsonString: string,
2441
+ ): SafeParseResult<
2442
+ CreateResponseRouterResponsesResponseBody,
2443
+ SDKValidationError
2444
+ > {
2445
+ return safeParse(
2446
+ jsonString,
2447
+ (x) =>
2448
+ CreateResponseRouterResponsesResponseBody$inboundSchema.parse(
2449
+ JSON.parse(x),
2450
+ ),
2451
+ `Failed to parse 'CreateResponseRouterResponsesResponseBody' from JSON`,
2452
+ );
2453
+ }
2454
+
2455
+ /** @internal */
2456
+ export const CreateResponseObject$inboundSchema: z.ZodNativeEnum<
2457
+ typeof CreateResponseObject
2458
+ > = z.nativeEnum(CreateResponseObject);
2459
+
2460
+ /** @internal */
2461
+ export const CreateResponseStatus$inboundSchema: z.ZodNativeEnum<
2462
+ typeof CreateResponseStatus
2463
+ > = z.nativeEnum(CreateResponseStatus);
2464
+
2465
+ /** @internal */
2466
+ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
2467
+ .object({
2468
+ code: z.string(),
2469
+ message: z.string(),
2470
+ });
2471
+
2472
+ export function errorFromJSON(
2473
+ jsonString: string,
2474
+ ): SafeParseResult<ErrorT, SDKValidationError> {
2475
+ return safeParse(
2476
+ jsonString,
2477
+ (x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
2478
+ `Failed to parse 'ErrorT' from JSON`,
2479
+ );
2480
+ }
2481
+
2482
+ /** @internal */
2483
+ export const Reason$inboundSchema: z.ZodNativeEnum<typeof Reason> = z
2484
+ .nativeEnum(Reason);
2485
+
2486
+ /** @internal */
2487
+ export const IncompleteDetails$inboundSchema: z.ZodType<
2488
+ IncompleteDetails,
2489
+ z.ZodTypeDef,
2490
+ unknown
2491
+ > = z.object({
2492
+ reason: Reason$inboundSchema,
2493
+ });
2494
+
2495
+ export function incompleteDetailsFromJSON(
2496
+ jsonString: string,
2497
+ ): SafeParseResult<IncompleteDetails, SDKValidationError> {
2498
+ return safeParse(
2499
+ jsonString,
2500
+ (x) => IncompleteDetails$inboundSchema.parse(JSON.parse(x)),
2501
+ `Failed to parse 'IncompleteDetails' from JSON`,
2502
+ );
2503
+ }
2504
+
2505
+ /** @internal */
2506
+ export const CreateResponseOutputRouterResponsesResponseStatus$inboundSchema:
2507
+ z.ZodNativeEnum<typeof CreateResponseOutputRouterResponsesResponseStatus> = z
2508
+ .nativeEnum(CreateResponseOutputRouterResponsesResponseStatus);
2509
+
2510
+ /** @internal */
2511
+ export const Output4$inboundSchema: z.ZodType<Output4, z.ZodTypeDef, unknown> =
2512
+ z.object({
2513
+ id: z.string(),
2514
+ type: z.literal("function_call"),
2515
+ call_id: z.string(),
2516
+ name: z.string(),
2517
+ arguments: z.string(),
2518
+ status: CreateResponseOutputRouterResponsesResponseStatus$inboundSchema,
2519
+ }).transform((v) => {
2520
+ return remap$(v, {
2521
+ "call_id": "callId",
2522
+ });
2523
+ });
2524
+
2525
+ export function output4FromJSON(
2526
+ jsonString: string,
2527
+ ): SafeParseResult<Output4, SDKValidationError> {
2528
+ return safeParse(
2529
+ jsonString,
2530
+ (x) => Output4$inboundSchema.parse(JSON.parse(x)),
2531
+ `Failed to parse 'Output4' from JSON`,
2532
+ );
2533
+ }
2534
+
2535
+ /** @internal */
2536
+ export const CreateResponseOutputRouterResponsesStatus$inboundSchema:
2537
+ z.ZodNativeEnum<typeof CreateResponseOutputRouterResponsesStatus> = z
2538
+ .nativeEnum(CreateResponseOutputRouterResponsesStatus);
2539
+
2540
+ /** @internal */
2541
+ export const Output3$inboundSchema: z.ZodType<Output3, z.ZodTypeDef, unknown> =
2542
+ z.object({
2543
+ id: z.string(),
2544
+ type: z.literal("file_search_call"),
2545
+ status: CreateResponseOutputRouterResponsesStatus$inboundSchema,
2546
+ queries: z.array(z.string()).optional(),
2547
+ results: z.any().optional(),
2548
+ });
2549
+
2550
+ export function output3FromJSON(
2551
+ jsonString: string,
2552
+ ): SafeParseResult<Output3, SDKValidationError> {
2553
+ return safeParse(
2554
+ jsonString,
2555
+ (x) => Output3$inboundSchema.parse(JSON.parse(x)),
2556
+ `Failed to parse 'Output3' from JSON`,
2557
+ );
2558
+ }
2559
+
2560
+ /** @internal */
2561
+ export const CreateResponseOutputStatus$inboundSchema: z.ZodNativeEnum<
2562
+ typeof CreateResponseOutputStatus
2563
+ > = z.nativeEnum(CreateResponseOutputStatus);
2564
+
2565
+ /** @internal */
2566
+ export const Output2$inboundSchema: z.ZodType<Output2, z.ZodTypeDef, unknown> =
2567
+ z.object({
2568
+ id: z.string(),
2569
+ type: z.literal("web_search_call"),
2570
+ status: CreateResponseOutputStatus$inboundSchema,
2571
+ });
2572
+
2573
+ export function output2FromJSON(
2574
+ jsonString: string,
2575
+ ): SafeParseResult<Output2, SDKValidationError> {
2576
+ return safeParse(
2577
+ jsonString,
2578
+ (x) => Output2$inboundSchema.parse(JSON.parse(x)),
2579
+ `Failed to parse 'Output2' from JSON`,
2580
+ );
2581
+ }
2582
+
2583
+ /** @internal */
2584
+ export const OutputRole$inboundSchema: z.ZodNativeEnum<typeof OutputRole> = z
2585
+ .nativeEnum(OutputRole);
2586
+
2587
+ /** @internal */
2588
+ export const OutputStatus$inboundSchema: z.ZodNativeEnum<typeof OutputStatus> =
2589
+ z.nativeEnum(OutputStatus);
2590
+
2591
+ /** @internal */
2592
+ export const ContentType$inboundSchema: z.ZodNativeEnum<typeof ContentType> = z
2593
+ .nativeEnum(ContentType);
2594
+
2595
+ /** @internal */
2596
+ export const Annotations2$inboundSchema: z.ZodType<
2597
+ Annotations2,
2598
+ z.ZodTypeDef,
2599
+ unknown
2600
+ > = z.object({
2601
+ type: z.literal("file_citation"),
2602
+ index: z.number(),
2603
+ file_id: z.string(),
2604
+ filename: z.string(),
2605
+ }).transform((v) => {
2606
+ return remap$(v, {
2607
+ "file_id": "fileId",
2608
+ });
2609
+ });
2610
+
2611
+ export function annotations2FromJSON(
2612
+ jsonString: string,
2613
+ ): SafeParseResult<Annotations2, SDKValidationError> {
2614
+ return safeParse(
2615
+ jsonString,
2616
+ (x) => Annotations2$inboundSchema.parse(JSON.parse(x)),
2617
+ `Failed to parse 'Annotations2' from JSON`,
2618
+ );
2619
+ }
2620
+
2621
+ /** @internal */
2622
+ export const Annotations1$inboundSchema: z.ZodType<
2623
+ Annotations1,
2624
+ z.ZodTypeDef,
2625
+ unknown
2626
+ > = z.object({
2627
+ type: z.literal("url_citation"),
2628
+ start_index: z.number(),
2629
+ end_index: z.number(),
2630
+ url: z.string(),
2631
+ title: z.string(),
2632
+ }).transform((v) => {
2633
+ return remap$(v, {
2634
+ "start_index": "startIndex",
2635
+ "end_index": "endIndex",
2636
+ });
2637
+ });
2638
+
2639
+ export function annotations1FromJSON(
2640
+ jsonString: string,
2641
+ ): SafeParseResult<Annotations1, SDKValidationError> {
2642
+ return safeParse(
2643
+ jsonString,
2644
+ (x) => Annotations1$inboundSchema.parse(JSON.parse(x)),
2645
+ `Failed to parse 'Annotations1' from JSON`,
2646
+ );
2647
+ }
2648
+
2649
+ /** @internal */
2650
+ export const ContentAnnotations$inboundSchema: z.ZodType<
2651
+ ContentAnnotations,
2652
+ z.ZodTypeDef,
2653
+ unknown
2654
+ > = z.union([
2655
+ z.lazy(() => Annotations1$inboundSchema),
2656
+ z.lazy(() => Annotations2$inboundSchema),
2657
+ ]);
2658
+
2659
+ export function contentAnnotationsFromJSON(
2660
+ jsonString: string,
2661
+ ): SafeParseResult<ContentAnnotations, SDKValidationError> {
2662
+ return safeParse(
2663
+ jsonString,
2664
+ (x) => ContentAnnotations$inboundSchema.parse(JSON.parse(x)),
2665
+ `Failed to parse 'ContentAnnotations' from JSON`,
2666
+ );
2667
+ }
2668
+
2669
+ /** @internal */
2670
+ export const Content1$inboundSchema: z.ZodType<
2671
+ Content1,
2672
+ z.ZodTypeDef,
2673
+ unknown
2674
+ > = z.object({
2675
+ type: ContentType$inboundSchema,
2676
+ text: z.string(),
2677
+ annotations: z.array(
2678
+ z.union([
2679
+ z.lazy(() => Annotations1$inboundSchema),
2680
+ z.lazy(() => Annotations2$inboundSchema),
2681
+ ]),
2682
+ ).optional(),
2683
+ logprobs: z.array(z.any()).optional(),
2684
+ });
2685
+
2686
+ export function content1FromJSON(
2687
+ jsonString: string,
2688
+ ): SafeParseResult<Content1, SDKValidationError> {
2689
+ return safeParse(
2690
+ jsonString,
2691
+ (x) => Content1$inboundSchema.parse(JSON.parse(x)),
2692
+ `Failed to parse 'Content1' from JSON`,
2693
+ );
2694
+ }
2695
+
2696
+ /** @internal */
2697
+ export const OutputContent$inboundSchema: z.ZodType<
2698
+ OutputContent,
2699
+ z.ZodTypeDef,
2700
+ unknown
2701
+ > = z.lazy(() => Content1$inboundSchema);
2702
+
2703
+ export function outputContentFromJSON(
2704
+ jsonString: string,
2705
+ ): SafeParseResult<OutputContent, SDKValidationError> {
2706
+ return safeParse(
2707
+ jsonString,
2708
+ (x) => OutputContent$inboundSchema.parse(JSON.parse(x)),
2709
+ `Failed to parse 'OutputContent' from JSON`,
2710
+ );
2711
+ }
2712
+
2713
+ /** @internal */
2714
+ export const Output1$inboundSchema: z.ZodType<Output1, z.ZodTypeDef, unknown> =
2715
+ z.object({
2716
+ id: z.string(),
2717
+ type: z.literal("message"),
2718
+ role: OutputRole$inboundSchema,
2719
+ status: OutputStatus$inboundSchema,
2720
+ content: z.array(z.lazy(() => Content1$inboundSchema)).optional(),
2721
+ });
2722
+
2723
+ export function output1FromJSON(
2724
+ jsonString: string,
2725
+ ): SafeParseResult<Output1, SDKValidationError> {
2726
+ return safeParse(
2727
+ jsonString,
2728
+ (x) => Output1$inboundSchema.parse(JSON.parse(x)),
2729
+ `Failed to parse 'Output1' from JSON`,
2730
+ );
2731
+ }
2732
+
2733
+ /** @internal */
2734
+ export const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown> = z
2735
+ .union([
2736
+ z.lazy(() => Output1$inboundSchema),
2737
+ z.lazy(() => Output2$inboundSchema),
2738
+ z.lazy(() => Output3$inboundSchema),
2739
+ z.lazy(() => Output4$inboundSchema),
2740
+ ]);
2741
+
2742
+ export function outputFromJSON(
2743
+ jsonString: string,
2744
+ ): SafeParseResult<Output, SDKValidationError> {
2745
+ return safeParse(
2746
+ jsonString,
2747
+ (x) => Output$inboundSchema.parse(JSON.parse(x)),
2748
+ `Failed to parse 'Output' from JSON`,
2749
+ );
2750
+ }
2751
+
2752
+ /** @internal */
2753
+ export const CreateResponseInputTokensDetails$inboundSchema: z.ZodType<
2754
+ CreateResponseInputTokensDetails,
2755
+ z.ZodTypeDef,
2756
+ unknown
2757
+ > = z.object({
2758
+ cached_tokens: z.number().int().optional(),
2759
+ }).transform((v) => {
2760
+ return remap$(v, {
2761
+ "cached_tokens": "cachedTokens",
2762
+ });
2763
+ });
2764
+
2765
+ export function createResponseInputTokensDetailsFromJSON(
2766
+ jsonString: string,
2767
+ ): SafeParseResult<CreateResponseInputTokensDetails, SDKValidationError> {
2768
+ return safeParse(
2769
+ jsonString,
2770
+ (x) => CreateResponseInputTokensDetails$inboundSchema.parse(JSON.parse(x)),
2771
+ `Failed to parse 'CreateResponseInputTokensDetails' from JSON`,
2772
+ );
2773
+ }
2774
+
2775
+ /** @internal */
2776
+ export const OutputTokensDetails$inboundSchema: z.ZodType<
2777
+ OutputTokensDetails,
2778
+ z.ZodTypeDef,
2779
+ unknown
2780
+ > = z.object({
2781
+ reasoning_tokens: z.number().int().optional(),
2782
+ accepted_prediction_tokens: z.number().int().optional(),
2783
+ rejected_prediction_tokens: z.number().int().optional(),
2784
+ }).transform((v) => {
2785
+ return remap$(v, {
2786
+ "reasoning_tokens": "reasoningTokens",
2787
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
2788
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
2789
+ });
2790
+ });
2791
+
2792
+ export function outputTokensDetailsFromJSON(
2793
+ jsonString: string,
2794
+ ): SafeParseResult<OutputTokensDetails, SDKValidationError> {
2795
+ return safeParse(
2796
+ jsonString,
2797
+ (x) => OutputTokensDetails$inboundSchema.parse(JSON.parse(x)),
2798
+ `Failed to parse 'OutputTokensDetails' from JSON`,
2799
+ );
2800
+ }
2801
+
2802
+ /** @internal */
2803
+ export const CreateResponseUsage$inboundSchema: z.ZodType<
2804
+ CreateResponseUsage,
2805
+ z.ZodTypeDef,
2806
+ unknown
2807
+ > = z.object({
2808
+ input_tokens: z.number().optional(),
2809
+ output_tokens: z.number().optional(),
2810
+ total_tokens: z.number().optional(),
2811
+ input_tokens_details: z.lazy(() =>
2812
+ CreateResponseInputTokensDetails$inboundSchema
2813
+ ).optional(),
2814
+ output_tokens_details: z.lazy(() => OutputTokensDetails$inboundSchema)
2815
+ .optional(),
2816
+ }).transform((v) => {
2817
+ return remap$(v, {
2818
+ "input_tokens": "inputTokens",
2819
+ "output_tokens": "outputTokens",
2820
+ "total_tokens": "totalTokens",
2821
+ "input_tokens_details": "inputTokensDetails",
2822
+ "output_tokens_details": "outputTokensDetails",
2823
+ });
2824
+ });
2825
+
2826
+ export function createResponseUsageFromJSON(
2827
+ jsonString: string,
2828
+ ): SafeParseResult<CreateResponseUsage, SDKValidationError> {
2829
+ return safeParse(
2830
+ jsonString,
2831
+ (x) => CreateResponseUsage$inboundSchema.parse(JSON.parse(x)),
2832
+ `Failed to parse 'CreateResponseUsage' from JSON`,
2833
+ );
2834
+ }
2835
+
2836
+ /** @internal */
2837
+ export const CreateResponseToolChoiceRouterResponsesResponseType$inboundSchema:
2838
+ z.ZodNativeEnum<typeof CreateResponseToolChoiceRouterResponsesResponseType> =
2839
+ z.nativeEnum(CreateResponseToolChoiceRouterResponsesResponseType);
2840
+
2841
+ /** @internal */
2842
+ export const CreateResponseToolChoiceFunction$inboundSchema: z.ZodType<
2843
+ CreateResponseToolChoiceFunction,
2844
+ z.ZodTypeDef,
2845
+ unknown
2846
+ > = z.object({
2847
+ name: z.string(),
2848
+ });
2849
+
2850
+ export function createResponseToolChoiceFunctionFromJSON(
2851
+ jsonString: string,
2852
+ ): SafeParseResult<CreateResponseToolChoiceFunction, SDKValidationError> {
2853
+ return safeParse(
2854
+ jsonString,
2855
+ (x) => CreateResponseToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
2856
+ `Failed to parse 'CreateResponseToolChoiceFunction' from JSON`,
2857
+ );
2858
+ }
2859
+
2860
+ /** @internal */
2861
+ export const CreateResponseToolChoiceRouterResponses2$inboundSchema: z.ZodType<
2862
+ CreateResponseToolChoiceRouterResponses2,
2863
+ z.ZodTypeDef,
2864
+ unknown
2865
+ > = z.object({
2866
+ type: CreateResponseToolChoiceRouterResponsesResponseType$inboundSchema,
2867
+ function: z.lazy(() => CreateResponseToolChoiceFunction$inboundSchema),
2868
+ });
2869
+
2870
+ export function createResponseToolChoiceRouterResponses2FromJSON(
2871
+ jsonString: string,
2872
+ ): SafeParseResult<
2873
+ CreateResponseToolChoiceRouterResponses2,
2874
+ SDKValidationError
2875
+ > {
2876
+ return safeParse(
2877
+ jsonString,
2878
+ (x) =>
2879
+ CreateResponseToolChoiceRouterResponses2$inboundSchema.parse(
2880
+ JSON.parse(x),
2881
+ ),
2882
+ `Failed to parse 'CreateResponseToolChoiceRouterResponses2' from JSON`,
2883
+ );
2884
+ }
2885
+
2886
+ /** @internal */
2887
+ export const CreateResponseToolChoiceRouterResponses1$inboundSchema:
2888
+ z.ZodNativeEnum<typeof CreateResponseToolChoiceRouterResponses1> = z
2889
+ .nativeEnum(CreateResponseToolChoiceRouterResponses1);
2890
+
2891
+ /** @internal */
2892
+ export const CreateResponseRouterResponsesToolChoice$inboundSchema: z.ZodType<
2893
+ CreateResponseRouterResponsesToolChoice,
2894
+ z.ZodTypeDef,
2895
+ unknown
2896
+ > = z.union([
2897
+ z.lazy(() => CreateResponseToolChoiceRouterResponses2$inboundSchema),
2898
+ CreateResponseToolChoiceRouterResponses1$inboundSchema,
2899
+ ]);
2900
+
2901
+ export function createResponseRouterResponsesToolChoiceFromJSON(
2902
+ jsonString: string,
2903
+ ): SafeParseResult<
2904
+ CreateResponseRouterResponsesToolChoice,
2905
+ SDKValidationError
2906
+ > {
2907
+ return safeParse(
2908
+ jsonString,
2909
+ (x) =>
2910
+ CreateResponseRouterResponsesToolChoice$inboundSchema.parse(
2911
+ JSON.parse(x),
2912
+ ),
2913
+ `Failed to parse 'CreateResponseRouterResponsesToolChoice' from JSON`,
2914
+ );
2915
+ }
2916
+
2917
+ /** @internal */
2918
+ export const ToolsRanker$inboundSchema: z.ZodNativeEnum<typeof ToolsRanker> = z
2919
+ .nativeEnum(ToolsRanker);
2920
+
2921
+ /** @internal */
2922
+ export const ToolsRankingOptions$inboundSchema: z.ZodType<
2923
+ ToolsRankingOptions,
2924
+ z.ZodTypeDef,
2925
+ unknown
2926
+ > = z.object({
2927
+ ranker: ToolsRanker$inboundSchema.default("auto"),
2928
+ score_threshold: z.number().default(0),
2929
+ }).transform((v) => {
2930
+ return remap$(v, {
2931
+ "score_threshold": "scoreThreshold",
2932
+ });
2933
+ });
2934
+
2935
+ export function toolsRankingOptionsFromJSON(
2936
+ jsonString: string,
2937
+ ): SafeParseResult<ToolsRankingOptions, SDKValidationError> {
2938
+ return safeParse(
2939
+ jsonString,
2940
+ (x) => ToolsRankingOptions$inboundSchema.parse(JSON.parse(x)),
2941
+ `Failed to parse 'ToolsRankingOptions' from JSON`,
2942
+ );
2943
+ }
2944
+
2945
+ /** @internal */
2946
+ export const CreateResponseTools3$inboundSchema: z.ZodType<
2947
+ CreateResponseTools3,
2948
+ z.ZodTypeDef,
2949
+ unknown
2950
+ > = z.object({
2951
+ type: z.literal("file_search"),
2952
+ vector_store_ids: z.array(z.string()).optional(),
2953
+ max_num_results: z.number().int().default(20),
2954
+ filters: z.any().optional(),
2955
+ ranking_options: z.lazy(() => ToolsRankingOptions$inboundSchema).optional(),
2956
+ }).transform((v) => {
2957
+ return remap$(v, {
2958
+ "vector_store_ids": "vectorStoreIds",
2959
+ "max_num_results": "maxNumResults",
2960
+ "ranking_options": "rankingOptions",
2961
+ });
2962
+ });
2963
+
2964
+ export function createResponseTools3FromJSON(
2965
+ jsonString: string,
2966
+ ): SafeParseResult<CreateResponseTools3, SDKValidationError> {
2967
+ return safeParse(
2968
+ jsonString,
2969
+ (x) => CreateResponseTools3$inboundSchema.parse(JSON.parse(x)),
2970
+ `Failed to parse 'CreateResponseTools3' from JSON`,
2971
+ );
2972
+ }
2973
+
2974
+ /** @internal */
2975
+ export const ToolsSearchContextSize$inboundSchema: z.ZodNativeEnum<
2976
+ typeof ToolsSearchContextSize
2977
+ > = z.nativeEnum(ToolsSearchContextSize);
2978
+
2979
+ /** @internal */
2980
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema:
2981
+ z.ZodNativeEnum<
2982
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
2983
+ > = z.nativeEnum(
2984
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType,
2985
+ );
2986
+
2987
+ /** @internal */
2988
+ export const ToolsUserLocation$inboundSchema: z.ZodType<
2989
+ ToolsUserLocation,
2990
+ z.ZodTypeDef,
2991
+ unknown
2992
+ > = z.object({
2993
+ type:
2994
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema
2995
+ .optional(),
2996
+ city: z.nullable(z.string()).optional(),
2997
+ country: z.string().optional(),
2998
+ region: z.nullable(z.string()).optional(),
2999
+ timezone: z.nullable(z.string()).optional(),
3000
+ });
3001
+
3002
+ export function toolsUserLocationFromJSON(
3003
+ jsonString: string,
3004
+ ): SafeParseResult<ToolsUserLocation, SDKValidationError> {
3005
+ return safeParse(
3006
+ jsonString,
3007
+ (x) => ToolsUserLocation$inboundSchema.parse(JSON.parse(x)),
3008
+ `Failed to parse 'ToolsUserLocation' from JSON`,
3009
+ );
3010
+ }
3011
+
3012
+ /** @internal */
3013
+ export const CreateResponseTools2$inboundSchema: z.ZodType<
3014
+ CreateResponseTools2,
3015
+ z.ZodTypeDef,
3016
+ unknown
3017
+ > = z.object({
3018
+ type: z.literal("web_search_preview"),
3019
+ domains: z.array(z.string()).optional(),
3020
+ search_context_size: ToolsSearchContextSize$inboundSchema.default("medium"),
3021
+ user_location: z.lazy(() => ToolsUserLocation$inboundSchema).optional(),
3022
+ }).transform((v) => {
3023
+ return remap$(v, {
3024
+ "search_context_size": "searchContextSize",
3025
+ "user_location": "userLocation",
3026
+ });
3027
+ });
3028
+
3029
+ export function createResponseTools2FromJSON(
3030
+ jsonString: string,
3031
+ ): SafeParseResult<CreateResponseTools2, SDKValidationError> {
3032
+ return safeParse(
3033
+ jsonString,
3034
+ (x) => CreateResponseTools2$inboundSchema.parse(JSON.parse(x)),
3035
+ `Failed to parse 'CreateResponseTools2' from JSON`,
3036
+ );
3037
+ }
3038
+
3039
+ /** @internal */
3040
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type$inboundSchema:
3041
+ z.ZodNativeEnum<
3042
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type
3043
+ > = z.nativeEnum(
3044
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type,
3045
+ );
3046
+
3047
+ /** @internal */
3048
+ export const ToolsProperties$inboundSchema: z.ZodType<
3049
+ ToolsProperties,
3050
+ z.ZodTypeDef,
3051
+ unknown
3052
+ > = collectExtraKeys$(
3053
+ z.object({
3054
+ type: z.string(),
3055
+ description: z.string().optional(),
3056
+ enum: z.array(z.string()).optional(),
3057
+ }).catchall(z.any()),
3058
+ "additionalProperties",
3059
+ true,
3060
+ );
3061
+
3062
+ export function toolsPropertiesFromJSON(
3063
+ jsonString: string,
3064
+ ): SafeParseResult<ToolsProperties, SDKValidationError> {
3065
+ return safeParse(
3066
+ jsonString,
3067
+ (x) => ToolsProperties$inboundSchema.parse(JSON.parse(x)),
3068
+ `Failed to parse 'ToolsProperties' from JSON`,
3069
+ );
3070
+ }
3071
+
3072
+ /** @internal */
3073
+ export const CreateResponseToolsParameters$inboundSchema: z.ZodType<
3074
+ CreateResponseToolsParameters,
3075
+ z.ZodTypeDef,
3076
+ unknown
3077
+ > = z.object({
3078
+ type:
3079
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type$inboundSchema,
3080
+ properties: z.record(z.lazy(() => ToolsProperties$inboundSchema)),
3081
+ required: z.array(z.string()).optional(),
3082
+ additionalProperties: z.boolean().optional(),
3083
+ });
3084
+
3085
+ export function createResponseToolsParametersFromJSON(
3086
+ jsonString: string,
3087
+ ): SafeParseResult<CreateResponseToolsParameters, SDKValidationError> {
3088
+ return safeParse(
3089
+ jsonString,
3090
+ (x) => CreateResponseToolsParameters$inboundSchema.parse(JSON.parse(x)),
3091
+ `Failed to parse 'CreateResponseToolsParameters' from JSON`,
3092
+ );
3093
+ }
3094
+
3095
+ /** @internal */
3096
+ export const CreateResponseTools1$inboundSchema: z.ZodType<
3097
+ CreateResponseTools1,
3098
+ z.ZodTypeDef,
3099
+ unknown
3100
+ > = z.object({
3101
+ type: z.literal("function"),
3102
+ name: z.string(),
3103
+ description: z.nullable(z.string()).optional(),
3104
+ parameters: z.lazy(() => CreateResponseToolsParameters$inboundSchema),
3105
+ strict: z.boolean().default(true),
3106
+ });
3107
+
3108
+ export function createResponseTools1FromJSON(
3109
+ jsonString: string,
3110
+ ): SafeParseResult<CreateResponseTools1, SDKValidationError> {
3111
+ return safeParse(
3112
+ jsonString,
3113
+ (x) => CreateResponseTools1$inboundSchema.parse(JSON.parse(x)),
3114
+ `Failed to parse 'CreateResponseTools1' from JSON`,
3115
+ );
3116
+ }
3117
+
3118
+ /** @internal */
3119
+ export const CreateResponseRouterResponsesTools$inboundSchema: z.ZodType<
3120
+ CreateResponseRouterResponsesTools,
3121
+ z.ZodTypeDef,
3122
+ unknown
3123
+ > = z.union([
3124
+ z.lazy(() => CreateResponseTools1$inboundSchema),
3125
+ z.lazy(() => CreateResponseTools2$inboundSchema),
3126
+ z.lazy(() => CreateResponseTools3$inboundSchema),
3127
+ ]);
3128
+
3129
+ export function createResponseRouterResponsesToolsFromJSON(
3130
+ jsonString: string,
3131
+ ): SafeParseResult<CreateResponseRouterResponsesTools, SDKValidationError> {
3132
+ return safeParse(
3133
+ jsonString,
3134
+ (x) =>
3135
+ CreateResponseRouterResponsesTools$inboundSchema.parse(JSON.parse(x)),
3136
+ `Failed to parse 'CreateResponseRouterResponsesTools' from JSON`,
3137
+ );
3138
+ }
3139
+
3140
+ /** @internal */
3141
+ export const CreateResponseReasoning$inboundSchema: z.ZodType<
3142
+ CreateResponseReasoning,
3143
+ z.ZodTypeDef,
3144
+ unknown
3145
+ > = z.object({
3146
+ effort: z.nullable(z.string()).optional(),
3147
+ summary: z.nullable(z.string()).optional(),
3148
+ });
3149
+
3150
+ export function createResponseReasoningFromJSON(
3151
+ jsonString: string,
3152
+ ): SafeParseResult<CreateResponseReasoning, SDKValidationError> {
3153
+ return safeParse(
3154
+ jsonString,
3155
+ (x) => CreateResponseReasoning$inboundSchema.parse(JSON.parse(x)),
3156
+ `Failed to parse 'CreateResponseReasoning' from JSON`,
3157
+ );
3158
+ }
3159
+
3160
+ /** @internal */
3161
+ export const CreateResponseFormat3$inboundSchema: z.ZodType<
3162
+ CreateResponseFormat3,
3163
+ z.ZodTypeDef,
3164
+ unknown
3165
+ > = z.object({
3166
+ type: z.literal("json_schema"),
3167
+ name: z.string(),
3168
+ description: z.string().optional(),
3169
+ schema: z.record(z.any()),
3170
+ strict: z.boolean().default(true),
3171
+ });
3172
+
3173
+ export function createResponseFormat3FromJSON(
3174
+ jsonString: string,
3175
+ ): SafeParseResult<CreateResponseFormat3, SDKValidationError> {
3176
+ return safeParse(
3177
+ jsonString,
3178
+ (x) => CreateResponseFormat3$inboundSchema.parse(JSON.parse(x)),
3179
+ `Failed to parse 'CreateResponseFormat3' from JSON`,
3180
+ );
3181
+ }
3182
+
3183
+ /** @internal */
3184
+ export const CreateResponseFormat2$inboundSchema: z.ZodType<
3185
+ CreateResponseFormat2,
3186
+ z.ZodTypeDef,
3187
+ unknown
3188
+ > = z.object({
3189
+ type: z.literal("json_object"),
3190
+ });
3191
+
3192
+ export function createResponseFormat2FromJSON(
3193
+ jsonString: string,
3194
+ ): SafeParseResult<CreateResponseFormat2, SDKValidationError> {
3195
+ return safeParse(
3196
+ jsonString,
3197
+ (x) => CreateResponseFormat2$inboundSchema.parse(JSON.parse(x)),
3198
+ `Failed to parse 'CreateResponseFormat2' from JSON`,
3199
+ );
3200
+ }
3201
+
3202
+ /** @internal */
3203
+ export const CreateResponseFormat1$inboundSchema: z.ZodType<
3204
+ CreateResponseFormat1,
3205
+ z.ZodTypeDef,
3206
+ unknown
3207
+ > = z.object({
3208
+ type: z.literal("text"),
3209
+ });
3210
+
3211
+ export function createResponseFormat1FromJSON(
3212
+ jsonString: string,
3213
+ ): SafeParseResult<CreateResponseFormat1, SDKValidationError> {
3214
+ return safeParse(
3215
+ jsonString,
3216
+ (x) => CreateResponseFormat1$inboundSchema.parse(JSON.parse(x)),
3217
+ `Failed to parse 'CreateResponseFormat1' from JSON`,
3218
+ );
3219
+ }
3220
+
3221
+ /** @internal */
3222
+ export const CreateResponseRouterResponsesFormat$inboundSchema: z.ZodType<
3223
+ CreateResponseRouterResponsesFormat,
3224
+ z.ZodTypeDef,
3225
+ unknown
3226
+ > = z.union([
3227
+ z.lazy(() => CreateResponseFormat1$inboundSchema),
3228
+ z.lazy(() => CreateResponseFormat2$inboundSchema),
3229
+ z.lazy(() => CreateResponseFormat3$inboundSchema),
3230
+ ]);
3231
+
3232
+ export function createResponseRouterResponsesFormatFromJSON(
3233
+ jsonString: string,
3234
+ ): SafeParseResult<CreateResponseRouterResponsesFormat, SDKValidationError> {
3235
+ return safeParse(
3236
+ jsonString,
3237
+ (x) =>
3238
+ CreateResponseRouterResponsesFormat$inboundSchema.parse(JSON.parse(x)),
3239
+ `Failed to parse 'CreateResponseRouterResponsesFormat' from JSON`,
3240
+ );
3241
+ }
3242
+
3243
+ /** @internal */
3244
+ export const CreateResponseRouterResponsesText$inboundSchema: z.ZodType<
3245
+ CreateResponseRouterResponsesText,
3246
+ z.ZodTypeDef,
3247
+ unknown
3248
+ > = z.object({
3249
+ format: z.union([
3250
+ z.lazy(() => CreateResponseFormat1$inboundSchema),
3251
+ z.lazy(() => CreateResponseFormat2$inboundSchema),
3252
+ z.lazy(() => CreateResponseFormat3$inboundSchema),
3253
+ ]),
3254
+ });
3255
+
3256
+ export function createResponseRouterResponsesTextFromJSON(
3257
+ jsonString: string,
3258
+ ): SafeParseResult<CreateResponseRouterResponsesText, SDKValidationError> {
3259
+ return safeParse(
3260
+ jsonString,
3261
+ (x) => CreateResponseRouterResponsesText$inboundSchema.parse(JSON.parse(x)),
3262
+ `Failed to parse 'CreateResponseRouterResponsesText' from JSON`,
3263
+ );
3264
+ }
3265
+
3266
+ /** @internal */
3267
+ export const Truncation$inboundSchema: z.ZodNativeEnum<typeof Truncation> = z
3268
+ .nativeEnum(Truncation);
3269
+
3270
+ /** @internal */
3271
+ export const CreateResponseServiceTier$inboundSchema: z.ZodNativeEnum<
3272
+ typeof CreateResponseServiceTier
3273
+ > = z.nativeEnum(CreateResponseServiceTier);
3274
+
3275
+ /** @internal */
3276
+ export const CreateResponseResponseBody$inboundSchema: z.ZodType<
3277
+ CreateResponseResponseBody,
3278
+ z.ZodTypeDef,
3279
+ unknown
3280
+ > = z.object({
3281
+ id: z.string(),
3282
+ object: CreateResponseObject$inboundSchema,
3283
+ created_at: z.number(),
3284
+ status: CreateResponseStatus$inboundSchema,
3285
+ error: z.nullable(z.lazy(() => ErrorT$inboundSchema)),
3286
+ incomplete_details: z.nullable(z.lazy(() => IncompleteDetails$inboundSchema)),
3287
+ model: z.string(),
3288
+ instructions: z.nullable(z.string()).optional(),
3289
+ output: z.array(
3290
+ z.union([
3291
+ z.lazy(() => Output1$inboundSchema),
3292
+ z.lazy(() => Output2$inboundSchema),
3293
+ z.lazy(() => Output3$inboundSchema),
3294
+ z.lazy(() => Output4$inboundSchema),
3295
+ ]),
3296
+ ),
3297
+ output_text: z.nullable(z.string()).optional(),
3298
+ usage: z.lazy(() => CreateResponseUsage$inboundSchema).optional(),
3299
+ temperature: z.nullable(z.number()).optional(),
3300
+ top_p: z.nullable(z.number()).optional(),
3301
+ max_output_tokens: z.nullable(z.number().int()).optional(),
3302
+ parallel_tool_calls: z.boolean(),
3303
+ previous_response_id: z.nullable(z.string()).optional(),
3304
+ metadata: z.record(z.string()).optional(),
3305
+ tool_choice: z.union([
3306
+ z.lazy(() => CreateResponseToolChoiceRouterResponses2$inboundSchema),
3307
+ CreateResponseToolChoiceRouterResponses1$inboundSchema,
3308
+ ]).optional(),
3309
+ tools: z.array(
3310
+ z.union([
3311
+ z.lazy(() => CreateResponseTools1$inboundSchema),
3312
+ z.lazy(() => CreateResponseTools2$inboundSchema),
3313
+ z.lazy(() => CreateResponseTools3$inboundSchema),
3314
+ ]),
3315
+ ).optional(),
3316
+ reasoning: z.nullable(z.lazy(() => CreateResponseReasoning$inboundSchema))
3317
+ .optional(),
3318
+ store: z.boolean().optional(),
3319
+ text: z.lazy(() => CreateResponseRouterResponsesText$inboundSchema)
3320
+ .optional(),
3321
+ truncation: z.nullable(Truncation$inboundSchema.default("disabled")),
3322
+ user: z.nullable(z.string()).optional(),
3323
+ service_tier: z.nullable(CreateResponseServiceTier$inboundSchema).optional(),
3324
+ background: z.nullable(z.boolean()).optional(),
3325
+ top_logprobs: z.nullable(z.number().int()).optional(),
3326
+ logprobs: z.nullable(z.boolean()).optional(),
3327
+ }).transform((v) => {
3328
+ return remap$(v, {
3329
+ "created_at": "createdAt",
3330
+ "incomplete_details": "incompleteDetails",
3331
+ "output_text": "outputText",
3332
+ "top_p": "topP",
3333
+ "max_output_tokens": "maxOutputTokens",
3334
+ "parallel_tool_calls": "parallelToolCalls",
3335
+ "previous_response_id": "previousResponseId",
3336
+ "tool_choice": "toolChoice",
3337
+ "service_tier": "serviceTier",
3338
+ "top_logprobs": "topLogprobs",
3339
+ });
3340
+ });
3341
+
3342
+ export function createResponseResponseBodyFromJSON(
3343
+ jsonString: string,
3344
+ ): SafeParseResult<CreateResponseResponseBody, SDKValidationError> {
3345
+ return safeParse(
3346
+ jsonString,
3347
+ (x) => CreateResponseResponseBody$inboundSchema.parse(JSON.parse(x)),
3348
+ `Failed to parse 'CreateResponseResponseBody' from JSON`,
3349
+ );
3350
+ }
3351
+
3352
+ /** @internal */
3353
+ export const CreateResponseResponse$inboundSchema: z.ZodType<
3354
+ CreateResponseResponse,
3355
+ z.ZodTypeDef,
3356
+ unknown
3357
+ > = z.union([
3358
+ z.lazy(() => CreateResponseResponseBody$inboundSchema),
3359
+ z.instanceof(ReadableStream<Uint8Array>)
3360
+ .transform(stream => {
3361
+ return new EventStream(stream, rawEvent => {
3362
+ if (rawEvent.data === "[DONE]") return { done: true, value: undefined };
3363
+ return {
3364
+ done: false,
3365
+ value: z.lazy(() =>
3366
+ CreateResponseRouterResponsesResponseBody$inboundSchema
3367
+ ).parse(rawEvent),
3368
+ };
3369
+ }, { dataRequired: false });
3370
+ }),
3371
+ ]);
3372
+
3373
+ export function createResponseResponseFromJSON(
3374
+ jsonString: string,
3375
+ ): SafeParseResult<CreateResponseResponse, SDKValidationError> {
3376
+ return safeParse(
3377
+ jsonString,
3378
+ (x) => CreateResponseResponse$inboundSchema.parse(JSON.parse(x)),
3379
+ `Failed to parse 'CreateResponseResponse' from JSON`,
3380
+ );
3381
+ }