@openrouter/sdk 0.0.0-beta.40 → 0.0.0-beta.42

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 (679) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/REACT_QUERY.md +2 -2
  3. package/README.md +10 -10
  4. package/dist/commonjs/lib/config.d.ts +3 -3
  5. package/dist/commonjs/lib/config.js +3 -3
  6. package/dist/commonjs/lib/config.js.map +1 -1
  7. package/dist/commonjs/lib/env.d.ts.map +1 -1
  8. package/dist/commonjs/lib/env.js +18 -1
  9. package/dist/commonjs/lib/env.js.map +1 -1
  10. package/dist/commonjs/models/chatgenerationparams.d.ts +15 -15
  11. package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
  12. package/dist/commonjs/models/chatgenerationparams.js +20 -18
  13. package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
  14. package/dist/commonjs/models/chatmessagetokenlogprob.d.ts +15 -15
  15. package/dist/commonjs/models/chatmessagetokenlogprob.d.ts.map +1 -1
  16. package/dist/commonjs/models/chatmessagetokenlogprob.js +18 -18
  17. package/dist/commonjs/models/chatmessagetokenlogprob.js.map +1 -1
  18. package/dist/commonjs/models/filecitation.d.ts +58 -0
  19. package/dist/commonjs/models/filecitation.d.ts.map +1 -0
  20. package/dist/commonjs/models/{filecitationannotation.js → filecitation.js} +29 -29
  21. package/dist/commonjs/models/filecitation.js.map +1 -0
  22. package/dist/commonjs/models/filepath.d.ts +56 -0
  23. package/dist/commonjs/models/filepath.d.ts.map +1 -0
  24. package/dist/commonjs/models/{filepathannotation.js → filepath.js} +29 -29
  25. package/dist/commonjs/models/filepath.js.map +1 -0
  26. package/dist/commonjs/models/index.d.ts +35 -26
  27. package/dist/commonjs/models/index.d.ts.map +1 -1
  28. package/dist/commonjs/models/index.js +35 -26
  29. package/dist/commonjs/models/index.js.map +1 -1
  30. package/dist/commonjs/models/openairesponsesannotation.d.ts +28 -0
  31. package/dist/commonjs/models/openairesponsesannotation.d.ts.map +1 -0
  32. package/dist/commonjs/models/{openresponsesprompt.js → openairesponsesannotation.js} +28 -26
  33. package/dist/commonjs/models/openairesponsesannotation.js.map +1 -0
  34. package/dist/commonjs/models/openairesponsesincludable.d.ts +25 -0
  35. package/dist/commonjs/models/openairesponsesincludable.d.ts.map +1 -0
  36. package/dist/commonjs/models/{openresponsesincludable.js → openairesponsesincludable.js} +14 -17
  37. package/dist/commonjs/models/openairesponsesincludable.js.map +1 -0
  38. package/dist/commonjs/models/openairesponsesprompt.d.ts +83 -0
  39. package/dist/commonjs/models/openairesponsesprompt.d.ts.map +1 -0
  40. package/dist/commonjs/models/openairesponsesprompt.js +137 -0
  41. package/dist/commonjs/models/openairesponsesprompt.js.map +1 -0
  42. package/dist/commonjs/models/openairesponsesrefusalcontent.d.ts +54 -0
  43. package/dist/commonjs/models/openairesponsesrefusalcontent.d.ts.map +1 -0
  44. package/dist/commonjs/models/openairesponsesrefusalcontent.js +89 -0
  45. package/dist/commonjs/models/openairesponsesrefusalcontent.js.map +1 -0
  46. package/dist/commonjs/models/openresponseseasyinputmessage.d.ts +75 -19
  47. package/dist/commonjs/models/openresponseseasyinputmessage.d.ts.map +1 -1
  48. package/dist/commonjs/models/openresponseseasyinputmessage.js +110 -19
  49. package/dist/commonjs/models/openresponseseasyinputmessage.js.map +1 -1
  50. package/dist/commonjs/models/openresponseserrorevent.d.ts +63 -0
  51. package/dist/commonjs/models/openresponseserrorevent.d.ts.map +1 -0
  52. package/dist/commonjs/models/openresponseserrorevent.js +104 -0
  53. package/dist/commonjs/models/openresponseserrorevent.js.map +1 -0
  54. package/dist/commonjs/models/openresponsesimagegencallcompleted.d.ts +61 -0
  55. package/dist/commonjs/models/openresponsesimagegencallcompleted.d.ts.map +1 -0
  56. package/dist/commonjs/models/openresponsesimagegencallcompleted.js +106 -0
  57. package/dist/commonjs/models/openresponsesimagegencallcompleted.js.map +1 -0
  58. package/dist/commonjs/models/openresponsesimagegencallgenerating.d.ts +61 -0
  59. package/dist/commonjs/models/openresponsesimagegencallgenerating.d.ts.map +1 -0
  60. package/dist/commonjs/models/openresponsesimagegencallgenerating.js +107 -0
  61. package/dist/commonjs/models/openresponsesimagegencallgenerating.js.map +1 -0
  62. package/dist/commonjs/models/openresponsesimagegencallinprogress.d.ts +61 -0
  63. package/dist/commonjs/models/openresponsesimagegencallinprogress.d.ts.map +1 -0
  64. package/dist/commonjs/models/openresponsesimagegencallinprogress.js +107 -0
  65. package/dist/commonjs/models/openresponsesimagegencallinprogress.js.map +1 -0
  66. package/dist/commonjs/models/openresponsesimagegencallpartialimage.d.ts +65 -0
  67. package/dist/commonjs/models/openresponsesimagegencallpartialimage.d.ts.map +1 -0
  68. package/dist/commonjs/models/openresponsesimagegencallpartialimage.js +115 -0
  69. package/dist/commonjs/models/openresponsesimagegencallpartialimage.js.map +1 -0
  70. package/dist/commonjs/models/openresponsesinputmessageitem.d.ts +52 -8
  71. package/dist/commonjs/models/openresponsesinputmessageitem.d.ts.map +1 -1
  72. package/dist/commonjs/models/openresponsesinputmessageitem.js +71 -6
  73. package/dist/commonjs/models/openresponsesinputmessageitem.js.map +1 -1
  74. package/dist/commonjs/models/openresponsesinputunion.d.ts +360 -0
  75. package/dist/commonjs/models/openresponsesinputunion.d.ts.map +1 -0
  76. package/dist/commonjs/models/openresponsesinputunion.js +460 -0
  77. package/dist/commonjs/models/openresponsesinputunion.js.map +1 -0
  78. package/dist/commonjs/models/openresponseslogprobs.d.ts +3 -32
  79. package/dist/commonjs/models/openresponseslogprobs.d.ts.map +1 -1
  80. package/dist/commonjs/models/openresponseslogprobs.js +4 -32
  81. package/dist/commonjs/models/openresponseslogprobs.js.map +1 -1
  82. package/dist/commonjs/models/openresponsesnonstreamingresponse.d.ts +1066 -58
  83. package/dist/commonjs/models/openresponsesnonstreamingresponse.d.ts.map +1 -1
  84. package/dist/commonjs/models/openresponsesnonstreamingresponse.js +1315 -52
  85. package/dist/commonjs/models/openresponsesnonstreamingresponse.js.map +1 -1
  86. package/dist/commonjs/models/openresponsesoutputitemreasoning.d.ts +154 -0
  87. package/dist/commonjs/models/openresponsesoutputitemreasoning.d.ts.map +1 -0
  88. package/dist/commonjs/models/openresponsesoutputitemreasoning.js +204 -0
  89. package/dist/commonjs/models/openresponsesoutputitemreasoning.js.map +1 -0
  90. package/dist/commonjs/models/openresponsesoutputmessage.d.ts +195 -0
  91. package/dist/commonjs/models/openresponsesoutputmessage.d.ts.map +1 -0
  92. package/dist/commonjs/models/openresponsesoutputmessage.js +246 -0
  93. package/dist/commonjs/models/openresponsesoutputmessage.js.map +1 -0
  94. package/dist/commonjs/models/openresponsesreasoning.d.ts +89 -0
  95. package/dist/commonjs/models/openresponsesreasoning.d.ts.map +1 -1
  96. package/dist/commonjs/models/openresponsesreasoning.js +96 -1
  97. package/dist/commonjs/models/openresponsesreasoning.js.map +1 -1
  98. package/dist/commonjs/models/openresponsesreasoningdeltaevent.d.ts +65 -0
  99. package/dist/commonjs/models/openresponsesreasoningdeltaevent.d.ts.map +1 -0
  100. package/dist/commonjs/models/openresponsesreasoningdeltaevent.js +112 -0
  101. package/dist/commonjs/models/openresponsesreasoningdeltaevent.js.map +1 -0
  102. package/dist/commonjs/models/openresponsesreasoningdoneevent.d.ts +65 -0
  103. package/dist/commonjs/models/openresponsesreasoningdoneevent.d.ts.map +1 -0
  104. package/dist/commonjs/models/openresponsesreasoningdoneevent.js +112 -0
  105. package/dist/commonjs/models/openresponsesreasoningdoneevent.js.map +1 -0
  106. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.d.ts +66 -0
  107. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.d.ts.map +1 -0
  108. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.js +114 -0
  109. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.js.map +1 -0
  110. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.d.ts +65 -0
  111. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.d.ts.map +1 -0
  112. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.js +113 -0
  113. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.js.map +1 -0
  114. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.d.ts +65 -0
  115. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.d.ts.map +1 -0
  116. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.js +113 -0
  117. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.js.map +1 -0
  118. package/dist/commonjs/models/openresponsesrequest.d.ts +335 -26
  119. package/dist/commonjs/models/openresponsesrequest.d.ts.map +1 -1
  120. package/dist/commonjs/models/openresponsesrequest.js +378 -25
  121. package/dist/commonjs/models/openresponsesrequest.js.map +1 -1
  122. package/dist/commonjs/models/openresponsesresponsetext.d.ts +59 -0
  123. package/dist/commonjs/models/openresponsesresponsetext.d.ts.map +1 -0
  124. package/dist/commonjs/models/openresponsesresponsetext.js +102 -0
  125. package/dist/commonjs/models/openresponsesresponsetext.js.map +1 -0
  126. package/dist/commonjs/models/openresponsesstreamevent.d.ts +25 -612
  127. package/dist/commonjs/models/openresponsesstreamevent.d.ts.map +1 -1
  128. package/dist/commonjs/models/openresponsesstreamevent.js +54 -772
  129. package/dist/commonjs/models/openresponsesstreamevent.js.map +1 -1
  130. package/dist/commonjs/models/openresponsestoplogprobs.d.ts +34 -0
  131. package/dist/commonjs/models/openresponsestoplogprobs.d.ts.map +1 -0
  132. package/dist/commonjs/models/{openresponsesinput.js → openresponsestoplogprobs.js} +23 -26
  133. package/dist/commonjs/models/openresponsestoplogprobs.js.map +1 -0
  134. package/dist/commonjs/models/operations/getcredits.d.ts +6 -0
  135. package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -1
  136. package/dist/commonjs/models/operations/getcredits.js.map +1 -1
  137. package/dist/commonjs/models/operations/getgeneration.d.ts +1 -1
  138. package/dist/commonjs/models/outputitemimagegenerationcall.d.ts +59 -0
  139. package/dist/commonjs/models/outputitemimagegenerationcall.d.ts.map +1 -0
  140. package/dist/commonjs/models/outputitemimagegenerationcall.js +94 -0
  141. package/dist/commonjs/models/outputitemimagegenerationcall.js.map +1 -0
  142. package/dist/commonjs/models/outputmessage.d.ts +192 -0
  143. package/dist/commonjs/models/outputmessage.d.ts.map +1 -0
  144. package/dist/commonjs/models/outputmessage.js +243 -0
  145. package/dist/commonjs/models/outputmessage.js.map +1 -0
  146. package/dist/commonjs/models/responseformattextconfig.d.ts +31 -0
  147. package/dist/commonjs/models/responseformattextconfig.d.ts.map +1 -0
  148. package/dist/commonjs/models/responseformattextconfig.js +76 -0
  149. package/dist/commonjs/models/responseformattextconfig.js.map +1 -0
  150. package/dist/commonjs/models/responseinputfile.d.ts +63 -0
  151. package/dist/commonjs/models/responseinputfile.d.ts.map +1 -0
  152. package/dist/commonjs/models/{openresponsesinputfile.js → responseinputfile.js} +29 -29
  153. package/dist/commonjs/models/responseinputfile.js.map +1 -0
  154. package/dist/commonjs/models/responseinputimage.d.ts +79 -0
  155. package/dist/commonjs/models/responseinputimage.d.ts.map +1 -0
  156. package/dist/commonjs/models/responseinputimage.js +128 -0
  157. package/dist/commonjs/models/responseinputimage.js.map +1 -0
  158. package/dist/commonjs/models/responseinputtext.d.ts +57 -0
  159. package/dist/commonjs/models/responseinputtext.d.ts.map +1 -0
  160. package/dist/commonjs/models/responseinputtext.js +89 -0
  161. package/dist/commonjs/models/responseinputtext.js.map +1 -0
  162. package/dist/commonjs/models/responseoutputtext.d.ts +57 -0
  163. package/dist/commonjs/models/responseoutputtext.d.ts.map +1 -0
  164. package/dist/commonjs/models/responseoutputtext.js +92 -0
  165. package/dist/commonjs/models/responseoutputtext.js.map +1 -0
  166. package/dist/commonjs/models/responseserrorfield.d.ts +15 -0
  167. package/dist/commonjs/models/responseserrorfield.d.ts.map +1 -1
  168. package/dist/commonjs/models/responseserrorfield.js +15 -0
  169. package/dist/commonjs/models/responseserrorfield.js.map +1 -1
  170. package/dist/commonjs/models/responsesformatjsonobject.d.ts +55 -0
  171. package/dist/commonjs/models/responsesformatjsonobject.d.ts.map +1 -0
  172. package/dist/commonjs/models/responsesformatjsonobject.js +87 -0
  173. package/dist/commonjs/models/responsesformatjsonobject.js.map +1 -0
  174. package/dist/commonjs/models/responsesformattext.d.ts +55 -0
  175. package/dist/commonjs/models/responsesformattext.d.ts.map +1 -0
  176. package/dist/commonjs/models/responsesformattext.js +87 -0
  177. package/dist/commonjs/models/responsesformattext.js.map +1 -0
  178. package/dist/commonjs/models/responsesformattextjsonschemaconfig.d.ts +67 -0
  179. package/dist/commonjs/models/responsesformattextjsonschemaconfig.d.ts.map +1 -0
  180. package/dist/commonjs/models/responsesformattextjsonschemaconfig.js +96 -0
  181. package/dist/commonjs/models/responsesformattextjsonschemaconfig.js.map +1 -0
  182. package/dist/commonjs/models/responsesoutputitem.d.ts +28 -181
  183. package/dist/commonjs/models/responsesoutputitem.d.ts.map +1 -1
  184. package/dist/commonjs/models/responsesoutputitem.js +42 -198
  185. package/dist/commonjs/models/responsesoutputitem.js.map +1 -1
  186. package/dist/commonjs/models/responsetextconfig.d.ts +59 -0
  187. package/dist/commonjs/models/responsetextconfig.d.ts.map +1 -0
  188. package/dist/commonjs/models/responsetextconfig.js +100 -0
  189. package/dist/commonjs/models/responsetextconfig.js.map +1 -0
  190. package/dist/commonjs/models/servicetier.d.ts +25 -0
  191. package/dist/commonjs/models/servicetier.d.ts.map +1 -0
  192. package/dist/commonjs/models/{openresponsesservicetier.js → servicetier.js} +15 -15
  193. package/dist/commonjs/models/servicetier.js.map +1 -0
  194. package/dist/commonjs/models/truncation.d.ts +22 -0
  195. package/dist/commonjs/models/truncation.d.ts.map +1 -0
  196. package/dist/commonjs/models/{openresponsestruncation.js → truncation.js} +14 -14
  197. package/dist/commonjs/models/truncation.js.map +1 -0
  198. package/dist/commonjs/models/urlcitation.d.ts +60 -0
  199. package/dist/commonjs/models/urlcitation.d.ts.map +1 -0
  200. package/dist/commonjs/models/{urlcitationannotation.js → urlcitation.js} +29 -29
  201. package/dist/commonjs/models/urlcitation.js.map +1 -0
  202. package/dist/esm/lib/config.d.ts +3 -3
  203. package/dist/esm/lib/config.js +3 -3
  204. package/dist/esm/lib/config.js.map +1 -1
  205. package/dist/esm/lib/env.d.ts.map +1 -1
  206. package/dist/esm/lib/env.js +18 -1
  207. package/dist/esm/lib/env.js.map +1 -1
  208. package/dist/esm/models/chatgenerationparams.d.ts +15 -15
  209. package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
  210. package/dist/esm/models/chatgenerationparams.js +17 -15
  211. package/dist/esm/models/chatgenerationparams.js.map +1 -1
  212. package/dist/esm/models/chatmessagetokenlogprob.d.ts +15 -15
  213. package/dist/esm/models/chatmessagetokenlogprob.d.ts.map +1 -1
  214. package/dist/esm/models/chatmessagetokenlogprob.js +15 -15
  215. package/dist/esm/models/chatmessagetokenlogprob.js.map +1 -1
  216. package/dist/esm/models/filecitation.d.ts +58 -0
  217. package/dist/esm/models/filecitation.d.ts.map +1 -0
  218. package/dist/esm/models/filecitation.js +64 -0
  219. package/dist/esm/models/filecitation.js.map +1 -0
  220. package/dist/esm/models/filepath.d.ts +56 -0
  221. package/dist/esm/models/filepath.d.ts.map +1 -0
  222. package/dist/esm/models/filepath.js +62 -0
  223. package/dist/esm/models/filepath.js.map +1 -0
  224. package/dist/esm/models/index.d.ts +35 -26
  225. package/dist/esm/models/index.d.ts.map +1 -1
  226. package/dist/esm/models/index.js +35 -26
  227. package/dist/esm/models/index.js.map +1 -1
  228. package/dist/esm/models/openairesponsesannotation.d.ts +28 -0
  229. package/dist/esm/models/openairesponsesannotation.d.ts.map +1 -0
  230. package/dist/esm/models/openairesponsesannotation.js +38 -0
  231. package/dist/esm/models/openairesponsesannotation.js.map +1 -0
  232. package/dist/esm/models/openairesponsesincludable.d.ts +25 -0
  233. package/dist/esm/models/openairesponsesincludable.d.ts.map +1 -0
  234. package/dist/esm/models/openairesponsesincludable.js +35 -0
  235. package/dist/esm/models/openairesponsesincludable.js.map +1 -0
  236. package/dist/esm/models/openairesponsesprompt.d.ts +83 -0
  237. package/dist/esm/models/openairesponsesprompt.d.ts.map +1 -0
  238. package/dist/esm/models/openairesponsesprompt.js +97 -0
  239. package/dist/esm/models/openairesponsesprompt.js.map +1 -0
  240. package/dist/esm/models/openairesponsesrefusalcontent.d.ts +54 -0
  241. package/dist/esm/models/openairesponsesrefusalcontent.d.ts.map +1 -0
  242. package/dist/esm/models/openairesponsesrefusalcontent.js +51 -0
  243. package/dist/esm/models/openairesponsesrefusalcontent.js.map +1 -0
  244. package/dist/esm/models/openresponseseasyinputmessage.d.ts +75 -19
  245. package/dist/esm/models/openresponseseasyinputmessage.d.ts.map +1 -1
  246. package/dist/esm/models/openresponseseasyinputmessage.js +105 -16
  247. package/dist/esm/models/openresponseseasyinputmessage.js.map +1 -1
  248. package/dist/esm/models/openresponseserrorevent.d.ts +63 -0
  249. package/dist/esm/models/openresponseserrorevent.d.ts.map +1 -0
  250. package/dist/esm/models/openresponseserrorevent.js +66 -0
  251. package/dist/esm/models/openresponseserrorevent.js.map +1 -0
  252. package/dist/esm/models/openresponsesimagegencallcompleted.d.ts +61 -0
  253. package/dist/esm/models/openresponsesimagegencallcompleted.d.ts.map +1 -0
  254. package/dist/esm/models/openresponsesimagegencallcompleted.js +68 -0
  255. package/dist/esm/models/openresponsesimagegencallcompleted.js.map +1 -0
  256. package/dist/esm/models/openresponsesimagegencallgenerating.d.ts +61 -0
  257. package/dist/esm/models/openresponsesimagegencallgenerating.d.ts.map +1 -0
  258. package/dist/esm/models/openresponsesimagegencallgenerating.js +69 -0
  259. package/dist/esm/models/openresponsesimagegencallgenerating.js.map +1 -0
  260. package/dist/esm/models/openresponsesimagegencallinprogress.d.ts +61 -0
  261. package/dist/esm/models/openresponsesimagegencallinprogress.d.ts.map +1 -0
  262. package/dist/esm/models/openresponsesimagegencallinprogress.js +69 -0
  263. package/dist/esm/models/openresponsesimagegencallinprogress.js.map +1 -0
  264. package/dist/esm/models/openresponsesimagegencallpartialimage.d.ts +65 -0
  265. package/dist/esm/models/openresponsesimagegencallpartialimage.d.ts.map +1 -0
  266. package/dist/esm/models/openresponsesimagegencallpartialimage.js +77 -0
  267. package/dist/esm/models/openresponsesimagegencallpartialimage.js.map +1 -0
  268. package/dist/esm/models/openresponsesinputmessageitem.d.ts +52 -8
  269. package/dist/esm/models/openresponsesinputmessageitem.d.ts.map +1 -1
  270. package/dist/esm/models/openresponsesinputmessageitem.js +68 -5
  271. package/dist/esm/models/openresponsesinputmessageitem.js.map +1 -1
  272. package/dist/esm/models/openresponsesinputunion.d.ts +360 -0
  273. package/dist/esm/models/openresponsesinputunion.d.ts.map +1 -0
  274. package/dist/esm/models/openresponsesinputunion.js +410 -0
  275. package/dist/esm/models/openresponsesinputunion.js.map +1 -0
  276. package/dist/esm/models/openresponseslogprobs.d.ts +3 -32
  277. package/dist/esm/models/openresponseslogprobs.d.ts.map +1 -1
  278. package/dist/esm/models/openresponseslogprobs.js +3 -29
  279. package/dist/esm/models/openresponseslogprobs.js.map +1 -1
  280. package/dist/esm/models/openresponsesnonstreamingresponse.d.ts +1066 -58
  281. package/dist/esm/models/openresponsesnonstreamingresponse.d.ts.map +1 -1
  282. package/dist/esm/models/openresponsesnonstreamingresponse.js +1269 -51
  283. package/dist/esm/models/openresponsesnonstreamingresponse.js.map +1 -1
  284. package/dist/esm/models/openresponsesoutputitemreasoning.d.ts +154 -0
  285. package/dist/esm/models/openresponsesoutputitemreasoning.d.ts.map +1 -0
  286. package/dist/esm/models/openresponsesoutputitemreasoning.js +164 -0
  287. package/dist/esm/models/openresponsesoutputitemreasoning.js.map +1 -0
  288. package/dist/esm/models/openresponsesoutputmessage.d.ts +195 -0
  289. package/dist/esm/models/openresponsesoutputmessage.d.ts.map +1 -0
  290. package/dist/esm/models/openresponsesoutputmessage.js +204 -0
  291. package/dist/esm/models/openresponsesoutputmessage.js.map +1 -0
  292. package/dist/esm/models/openresponsesreasoning.d.ts +89 -0
  293. package/dist/esm/models/openresponsesreasoning.d.ts.map +1 -1
  294. package/dist/esm/models/openresponsesreasoning.js +93 -0
  295. package/dist/esm/models/openresponsesreasoning.js.map +1 -1
  296. package/dist/esm/models/openresponsesreasoningdeltaevent.d.ts +65 -0
  297. package/dist/esm/models/openresponsesreasoningdeltaevent.d.ts.map +1 -0
  298. package/dist/esm/models/openresponsesreasoningdeltaevent.js +74 -0
  299. package/dist/esm/models/openresponsesreasoningdeltaevent.js.map +1 -0
  300. package/dist/esm/models/openresponsesreasoningdoneevent.d.ts +65 -0
  301. package/dist/esm/models/openresponsesreasoningdoneevent.d.ts.map +1 -0
  302. package/dist/esm/models/openresponsesreasoningdoneevent.js +74 -0
  303. package/dist/esm/models/openresponsesreasoningdoneevent.js.map +1 -0
  304. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +66 -0
  305. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts.map +1 -0
  306. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.js +76 -0
  307. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.js.map +1 -0
  308. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +65 -0
  309. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts.map +1 -0
  310. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.js +75 -0
  311. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.js.map +1 -0
  312. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +65 -0
  313. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts.map +1 -0
  314. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.js +75 -0
  315. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.js.map +1 -0
  316. package/dist/esm/models/openresponsesrequest.d.ts +335 -26
  317. package/dist/esm/models/openresponsesrequest.d.ts.map +1 -1
  318. package/dist/esm/models/openresponsesrequest.js +363 -23
  319. package/dist/esm/models/openresponsesrequest.js.map +1 -1
  320. package/dist/esm/models/openresponsesresponsetext.d.ts +59 -0
  321. package/dist/esm/models/openresponsesresponsetext.d.ts.map +1 -0
  322. package/dist/esm/models/openresponsesresponsetext.js +64 -0
  323. package/dist/esm/models/openresponsesresponsetext.js.map +1 -0
  324. package/dist/esm/models/openresponsesstreamevent.d.ts +25 -612
  325. package/dist/esm/models/openresponsesstreamevent.d.ts.map +1 -1
  326. package/dist/esm/models/openresponsesstreamevent.js +51 -745
  327. package/dist/esm/models/openresponsesstreamevent.js.map +1 -1
  328. package/dist/esm/models/openresponsestoplogprobs.d.ts +34 -0
  329. package/dist/esm/models/openresponsestoplogprobs.d.ts.map +1 -0
  330. package/dist/esm/models/openresponsestoplogprobs.js +33 -0
  331. package/dist/esm/models/openresponsestoplogprobs.js.map +1 -0
  332. package/dist/esm/models/operations/getcredits.d.ts +6 -0
  333. package/dist/esm/models/operations/getcredits.d.ts.map +1 -1
  334. package/dist/esm/models/operations/getcredits.js.map +1 -1
  335. package/dist/esm/models/operations/getgeneration.d.ts +1 -1
  336. package/dist/esm/models/outputitemimagegenerationcall.d.ts +59 -0
  337. package/dist/esm/models/outputitemimagegenerationcall.d.ts.map +1 -0
  338. package/dist/esm/models/outputitemimagegenerationcall.js +56 -0
  339. package/dist/esm/models/outputitemimagegenerationcall.js.map +1 -0
  340. package/dist/esm/models/outputmessage.d.ts +192 -0
  341. package/dist/esm/models/outputmessage.d.ts.map +1 -0
  342. package/dist/esm/models/outputmessage.js +201 -0
  343. package/dist/esm/models/outputmessage.js.map +1 -0
  344. package/dist/esm/models/responseformattextconfig.d.ts +31 -0
  345. package/dist/esm/models/responseformattextconfig.d.ts.map +1 -0
  346. package/dist/esm/models/responseformattextconfig.js +38 -0
  347. package/dist/esm/models/responseformattextconfig.js.map +1 -0
  348. package/dist/esm/models/responseinputfile.d.ts +63 -0
  349. package/dist/esm/models/responseinputfile.d.ts.map +1 -0
  350. package/dist/esm/models/responseinputfile.js +70 -0
  351. package/dist/esm/models/responseinputfile.js.map +1 -0
  352. package/dist/esm/models/responseinputimage.d.ts +79 -0
  353. package/dist/esm/models/responseinputimage.d.ts.map +1 -0
  354. package/dist/esm/models/responseinputimage.js +90 -0
  355. package/dist/esm/models/responseinputimage.js.map +1 -0
  356. package/dist/esm/models/responseinputtext.d.ts +57 -0
  357. package/dist/esm/models/responseinputtext.d.ts.map +1 -0
  358. package/dist/esm/models/responseinputtext.js +51 -0
  359. package/dist/esm/models/responseinputtext.js.map +1 -0
  360. package/dist/esm/models/responseoutputtext.d.ts +57 -0
  361. package/dist/esm/models/responseoutputtext.d.ts.map +1 -0
  362. package/dist/esm/models/responseoutputtext.js +54 -0
  363. package/dist/esm/models/responseoutputtext.js.map +1 -0
  364. package/dist/esm/models/responseserrorfield.d.ts +15 -0
  365. package/dist/esm/models/responseserrorfield.d.ts.map +1 -1
  366. package/dist/esm/models/responseserrorfield.js +15 -0
  367. package/dist/esm/models/responseserrorfield.js.map +1 -1
  368. package/dist/esm/models/responsesformatjsonobject.d.ts +55 -0
  369. package/dist/esm/models/responsesformatjsonobject.d.ts.map +1 -0
  370. package/dist/esm/models/responsesformatjsonobject.js +49 -0
  371. package/dist/esm/models/responsesformatjsonobject.js.map +1 -0
  372. package/dist/esm/models/responsesformattext.d.ts +55 -0
  373. package/dist/esm/models/responsesformattext.d.ts.map +1 -0
  374. package/dist/esm/models/responsesformattext.js +49 -0
  375. package/dist/esm/models/responsesformattext.js.map +1 -0
  376. package/dist/esm/models/responsesformattextjsonschemaconfig.d.ts +67 -0
  377. package/dist/esm/models/responsesformattextjsonschemaconfig.d.ts.map +1 -0
  378. package/dist/esm/models/responsesformattextjsonschemaconfig.js +58 -0
  379. package/dist/esm/models/responsesformattextjsonschemaconfig.js.map +1 -0
  380. package/dist/esm/models/responsesoutputitem.d.ts +28 -181
  381. package/dist/esm/models/responsesoutputitem.d.ts.map +1 -1
  382. package/dist/esm/models/responsesoutputitem.js +39 -188
  383. package/dist/esm/models/responsesoutputitem.js.map +1 -1
  384. package/dist/esm/models/responsetextconfig.d.ts +59 -0
  385. package/dist/esm/models/responsetextconfig.d.ts.map +1 -0
  386. package/dist/esm/models/responsetextconfig.js +62 -0
  387. package/dist/esm/models/responsetextconfig.js.map +1 -0
  388. package/dist/esm/models/servicetier.d.ts +25 -0
  389. package/dist/esm/models/servicetier.d.ts.map +1 -0
  390. package/dist/esm/models/servicetier.js +35 -0
  391. package/dist/esm/models/servicetier.js.map +1 -0
  392. package/dist/esm/models/truncation.d.ts +22 -0
  393. package/dist/esm/models/truncation.d.ts.map +1 -0
  394. package/dist/esm/models/truncation.js +32 -0
  395. package/dist/esm/models/truncation.js.map +1 -0
  396. package/dist/esm/models/urlcitation.d.ts +60 -0
  397. package/dist/esm/models/urlcitation.d.ts.map +1 -0
  398. package/dist/esm/models/urlcitation.js +68 -0
  399. package/dist/esm/models/urlcitation.js.map +1 -0
  400. package/docs/sdks/apikeys/README.md +10 -10
  401. package/docs/sdks/responses/README.md +4 -4
  402. package/examples/betaResponsesSend.example.ts +2 -2
  403. package/jsr.json +1 -1
  404. package/package.json +1 -1
  405. package/src/lib/config.ts +3 -3
  406. package/src/lib/env.ts +20 -3
  407. package/src/models/chatgenerationparams.ts +32 -24
  408. package/src/models/chatmessagetokenlogprob.ts +24 -35
  409. package/src/models/filecitation.ts +110 -0
  410. package/src/models/filepath.ts +104 -0
  411. package/src/models/index.ts +35 -26
  412. package/src/models/openairesponsesannotation.ts +87 -0
  413. package/src/models/{openresponsesincludable.ts → openairesponsesincludable.ts} +16 -20
  414. package/src/models/openairesponsesprompt.ts +228 -0
  415. package/src/models/openairesponsesrefusalcontent.ts +102 -0
  416. package/src/models/openresponseseasyinputmessage.ts +238 -38
  417. package/src/models/openresponseserrorevent.ts +123 -0
  418. package/src/models/openresponsesimagegencallcompleted.ts +131 -0
  419. package/src/models/openresponsesimagegencallgenerating.ts +131 -0
  420. package/src/models/openresponsesimagegencallinprogress.ts +131 -0
  421. package/src/models/openresponsesimagegencallpartialimage.ts +143 -0
  422. package/src/models/openresponsesinputmessageitem.ts +162 -16
  423. package/src/models/openresponsesinputunion.ts +858 -0
  424. package/src/models/openresponseslogprobs.ts +10 -75
  425. package/src/models/openresponsesnonstreamingresponse.ts +2764 -174
  426. package/src/models/openresponsesoutputitemreasoning.ts +323 -0
  427. package/src/models/openresponsesoutputmessage.ts +400 -0
  428. package/src/models/openresponsesreasoning.ts +176 -0
  429. package/src/models/openresponsesreasoningdeltaevent.ts +138 -0
  430. package/src/models/openresponsesreasoningdoneevent.ts +137 -0
  431. package/src/models/openresponsesreasoningsummarypartaddedevent.ts +154 -0
  432. package/src/models/openresponsesreasoningsummarytextdeltaevent.ts +148 -0
  433. package/src/models/openresponsesreasoningsummarytextdoneevent.ts +145 -0
  434. package/src/models/openresponsesrequest.ts +771 -67
  435. package/src/models/openresponsesresponsetext.ts +131 -0
  436. package/src/models/openresponsesstreamevent.ts +244 -1630
  437. package/src/models/openresponsestoplogprobs.ts +73 -0
  438. package/src/models/operations/getcredits.ts +6 -0
  439. package/src/models/operations/getgeneration.ts +1 -1
  440. package/src/models/outputitemimagegenerationcall.ts +115 -0
  441. package/src/models/outputmessage.ts +372 -0
  442. package/src/models/responseformattextconfig.ts +93 -0
  443. package/src/models/responseinputfile.ts +125 -0
  444. package/src/models/responseinputimage.ts +159 -0
  445. package/src/models/responseinputtext.ts +100 -0
  446. package/src/models/responseoutputtext.ts +107 -0
  447. package/src/models/responseserrorfield.ts +15 -0
  448. package/src/models/responsesformatjsonobject.ts +98 -0
  449. package/src/models/responsesformattext.ts +98 -0
  450. package/src/models/responsesformattextjsonschemaconfig.ts +121 -0
  451. package/src/models/responsesoutputitem.ts +74 -379
  452. package/src/models/responsetextconfig.ts +128 -0
  453. package/src/models/servicetier.ts +51 -0
  454. package/src/models/truncation.ts +48 -0
  455. package/src/models/urlcitation.ts +116 -0
  456. package/dist/commonjs/models/filecitationannotation.d.ts +0 -58
  457. package/dist/commonjs/models/filecitationannotation.d.ts.map +0 -1
  458. package/dist/commonjs/models/filecitationannotation.js.map +0 -1
  459. package/dist/commonjs/models/filepathannotation.d.ts +0 -56
  460. package/dist/commonjs/models/filepathannotation.d.ts.map +0 -1
  461. package/dist/commonjs/models/filepathannotation.js.map +0 -1
  462. package/dist/commonjs/models/openresponsesformatjsonobject.d.ts +0 -55
  463. package/dist/commonjs/models/openresponsesformatjsonobject.d.ts.map +0 -1
  464. package/dist/commonjs/models/openresponsesformatjsonobject.js +0 -87
  465. package/dist/commonjs/models/openresponsesformatjsonobject.js.map +0 -1
  466. package/dist/commonjs/models/openresponsesformatjsonschema.d.ts +0 -67
  467. package/dist/commonjs/models/openresponsesformatjsonschema.d.ts.map +0 -1
  468. package/dist/commonjs/models/openresponsesformatjsonschema.js +0 -95
  469. package/dist/commonjs/models/openresponsesformatjsonschema.js.map +0 -1
  470. package/dist/commonjs/models/openresponsesformattext.d.ts +0 -55
  471. package/dist/commonjs/models/openresponsesformattext.d.ts.map +0 -1
  472. package/dist/commonjs/models/openresponsesformattext.js +0 -87
  473. package/dist/commonjs/models/openresponsesformattext.js.map +0 -1
  474. package/dist/commonjs/models/openresponsesformattextconfig.d.ts +0 -31
  475. package/dist/commonjs/models/openresponsesformattextconfig.d.ts.map +0 -1
  476. package/dist/commonjs/models/openresponsesformattextconfig.js +0 -76
  477. package/dist/commonjs/models/openresponsesformattextconfig.js.map +0 -1
  478. package/dist/commonjs/models/openresponsesincludable.d.ts +0 -31
  479. package/dist/commonjs/models/openresponsesincludable.d.ts.map +0 -1
  480. package/dist/commonjs/models/openresponsesincludable.js.map +0 -1
  481. package/dist/commonjs/models/openresponsesinput.d.ts +0 -29
  482. package/dist/commonjs/models/openresponsesinput.d.ts.map +0 -1
  483. package/dist/commonjs/models/openresponsesinput.js.map +0 -1
  484. package/dist/commonjs/models/openresponsesinputcontent.d.ts +0 -43
  485. package/dist/commonjs/models/openresponsesinputcontent.d.ts.map +0 -1
  486. package/dist/commonjs/models/openresponsesinputcontent.js +0 -88
  487. package/dist/commonjs/models/openresponsesinputcontent.js.map +0 -1
  488. package/dist/commonjs/models/openresponsesinputfile.d.ts +0 -63
  489. package/dist/commonjs/models/openresponsesinputfile.d.ts.map +0 -1
  490. package/dist/commonjs/models/openresponsesinputfile.js.map +0 -1
  491. package/dist/commonjs/models/openresponsesinputimage.d.ts +0 -79
  492. package/dist/commonjs/models/openresponsesinputimage.d.ts.map +0 -1
  493. package/dist/commonjs/models/openresponsesinputimage.js +0 -128
  494. package/dist/commonjs/models/openresponsesinputimage.js.map +0 -1
  495. package/dist/commonjs/models/openresponsesinputitem.d.ts +0 -492
  496. package/dist/commonjs/models/openresponsesinputitem.d.ts.map +0 -1
  497. package/dist/commonjs/models/openresponsesinputitem.js +0 -565
  498. package/dist/commonjs/models/openresponsesinputitem.js.map +0 -1
  499. package/dist/commonjs/models/openresponsesinputtext.d.ts +0 -57
  500. package/dist/commonjs/models/openresponsesinputtext.d.ts.map +0 -1
  501. package/dist/commonjs/models/openresponsesinputtext.js +0 -89
  502. package/dist/commonjs/models/openresponsesinputtext.js.map +0 -1
  503. package/dist/commonjs/models/openresponsesoutputtext.d.ts +0 -80
  504. package/dist/commonjs/models/openresponsesoutputtext.d.ts.map +0 -1
  505. package/dist/commonjs/models/openresponsesoutputtext.js +0 -133
  506. package/dist/commonjs/models/openresponsesoutputtext.js.map +0 -1
  507. package/dist/commonjs/models/openresponsesprompt.d.ts +0 -39
  508. package/dist/commonjs/models/openresponsesprompt.d.ts.map +0 -1
  509. package/dist/commonjs/models/openresponsesprompt.js.map +0 -1
  510. package/dist/commonjs/models/openresponsesrefusalcontent.d.ts +0 -54
  511. package/dist/commonjs/models/openresponsesrefusalcontent.d.ts.map +0 -1
  512. package/dist/commonjs/models/openresponsesrefusalcontent.js +0 -89
  513. package/dist/commonjs/models/openresponsesrefusalcontent.js.map +0 -1
  514. package/dist/commonjs/models/openresponsesservicetier.d.ts +0 -25
  515. package/dist/commonjs/models/openresponsesservicetier.d.ts.map +0 -1
  516. package/dist/commonjs/models/openresponsesservicetier.js.map +0 -1
  517. package/dist/commonjs/models/openresponsestextconfig.d.ts +0 -59
  518. package/dist/commonjs/models/openresponsestextconfig.d.ts.map +0 -1
  519. package/dist/commonjs/models/openresponsestextconfig.js +0 -100
  520. package/dist/commonjs/models/openresponsestextconfig.js.map +0 -1
  521. package/dist/commonjs/models/openresponsestoolchoice.d.ts +0 -148
  522. package/dist/commonjs/models/openresponsestoolchoice.d.ts.map +0 -1
  523. package/dist/commonjs/models/openresponsestoolchoice.js +0 -179
  524. package/dist/commonjs/models/openresponsestoolchoice.js.map +0 -1
  525. package/dist/commonjs/models/openresponsestoolunion.d.ts +0 -95
  526. package/dist/commonjs/models/openresponsestoolunion.d.ts.map +0 -1
  527. package/dist/commonjs/models/openresponsestoolunion.js +0 -134
  528. package/dist/commonjs/models/openresponsestoolunion.js.map +0 -1
  529. package/dist/commonjs/models/openresponsestruncation.d.ts +0 -22
  530. package/dist/commonjs/models/openresponsestruncation.d.ts.map +0 -1
  531. package/dist/commonjs/models/openresponsestruncation.js.map +0 -1
  532. package/dist/commonjs/models/outputtextcontent.d.ts +0 -80
  533. package/dist/commonjs/models/outputtextcontent.d.ts.map +0 -1
  534. package/dist/commonjs/models/outputtextcontent.js +0 -133
  535. package/dist/commonjs/models/outputtextcontent.js.map +0 -1
  536. package/dist/commonjs/models/refusalcontent.d.ts +0 -54
  537. package/dist/commonjs/models/refusalcontent.d.ts.map +0 -1
  538. package/dist/commonjs/models/refusalcontent.js +0 -89
  539. package/dist/commonjs/models/refusalcontent.js.map +0 -1
  540. package/dist/commonjs/models/responsesusage.d.ts +0 -131
  541. package/dist/commonjs/models/responsesusage.d.ts.map +0 -1
  542. package/dist/commonjs/models/responsesusage.js +0 -217
  543. package/dist/commonjs/models/responsesusage.js.map +0 -1
  544. package/dist/commonjs/models/toolchoicetypes.d.ts +0 -164
  545. package/dist/commonjs/models/toolchoicetypes.d.ts.map +0 -1
  546. package/dist/commonjs/models/toolchoicetypes.js +0 -208
  547. package/dist/commonjs/models/toolchoicetypes.js.map +0 -1
  548. package/dist/commonjs/models/urlcitationannotation.d.ts +0 -60
  549. package/dist/commonjs/models/urlcitationannotation.d.ts.map +0 -1
  550. package/dist/commonjs/models/urlcitationannotation.js.map +0 -1
  551. package/dist/esm/models/filecitationannotation.d.ts +0 -58
  552. package/dist/esm/models/filecitationannotation.d.ts.map +0 -1
  553. package/dist/esm/models/filecitationannotation.js +0 -64
  554. package/dist/esm/models/filecitationannotation.js.map +0 -1
  555. package/dist/esm/models/filepathannotation.d.ts +0 -56
  556. package/dist/esm/models/filepathannotation.d.ts.map +0 -1
  557. package/dist/esm/models/filepathannotation.js +0 -62
  558. package/dist/esm/models/filepathannotation.js.map +0 -1
  559. package/dist/esm/models/openresponsesformatjsonobject.d.ts +0 -55
  560. package/dist/esm/models/openresponsesformatjsonobject.d.ts.map +0 -1
  561. package/dist/esm/models/openresponsesformatjsonobject.js +0 -49
  562. package/dist/esm/models/openresponsesformatjsonobject.js.map +0 -1
  563. package/dist/esm/models/openresponsesformatjsonschema.d.ts +0 -67
  564. package/dist/esm/models/openresponsesformatjsonschema.d.ts.map +0 -1
  565. package/dist/esm/models/openresponsesformatjsonschema.js +0 -57
  566. package/dist/esm/models/openresponsesformatjsonschema.js.map +0 -1
  567. package/dist/esm/models/openresponsesformattext.d.ts +0 -55
  568. package/dist/esm/models/openresponsesformattext.d.ts.map +0 -1
  569. package/dist/esm/models/openresponsesformattext.js +0 -49
  570. package/dist/esm/models/openresponsesformattext.js.map +0 -1
  571. package/dist/esm/models/openresponsesformattextconfig.d.ts +0 -31
  572. package/dist/esm/models/openresponsesformattextconfig.d.ts.map +0 -1
  573. package/dist/esm/models/openresponsesformattextconfig.js +0 -38
  574. package/dist/esm/models/openresponsesformattextconfig.js.map +0 -1
  575. package/dist/esm/models/openresponsesincludable.d.ts +0 -31
  576. package/dist/esm/models/openresponsesincludable.d.ts.map +0 -1
  577. package/dist/esm/models/openresponsesincludable.js +0 -38
  578. package/dist/esm/models/openresponsesincludable.js.map +0 -1
  579. package/dist/esm/models/openresponsesinput.d.ts +0 -29
  580. package/dist/esm/models/openresponsesinput.d.ts.map +0 -1
  581. package/dist/esm/models/openresponsesinput.js +0 -36
  582. package/dist/esm/models/openresponsesinput.js.map +0 -1
  583. package/dist/esm/models/openresponsesinputcontent.d.ts +0 -43
  584. package/dist/esm/models/openresponsesinputcontent.d.ts.map +0 -1
  585. package/dist/esm/models/openresponsesinputcontent.js +0 -50
  586. package/dist/esm/models/openresponsesinputcontent.js.map +0 -1
  587. package/dist/esm/models/openresponsesinputfile.d.ts +0 -63
  588. package/dist/esm/models/openresponsesinputfile.d.ts.map +0 -1
  589. package/dist/esm/models/openresponsesinputfile.js +0 -70
  590. package/dist/esm/models/openresponsesinputfile.js.map +0 -1
  591. package/dist/esm/models/openresponsesinputimage.d.ts +0 -79
  592. package/dist/esm/models/openresponsesinputimage.d.ts.map +0 -1
  593. package/dist/esm/models/openresponsesinputimage.js +0 -90
  594. package/dist/esm/models/openresponsesinputimage.js.map +0 -1
  595. package/dist/esm/models/openresponsesinputitem.d.ts +0 -492
  596. package/dist/esm/models/openresponsesinputitem.d.ts.map +0 -1
  597. package/dist/esm/models/openresponsesinputitem.js +0 -510
  598. package/dist/esm/models/openresponsesinputitem.js.map +0 -1
  599. package/dist/esm/models/openresponsesinputtext.d.ts +0 -57
  600. package/dist/esm/models/openresponsesinputtext.d.ts.map +0 -1
  601. package/dist/esm/models/openresponsesinputtext.js +0 -51
  602. package/dist/esm/models/openresponsesinputtext.js.map +0 -1
  603. package/dist/esm/models/openresponsesoutputtext.d.ts +0 -80
  604. package/dist/esm/models/openresponsesoutputtext.d.ts.map +0 -1
  605. package/dist/esm/models/openresponsesoutputtext.js +0 -93
  606. package/dist/esm/models/openresponsesoutputtext.js.map +0 -1
  607. package/dist/esm/models/openresponsesprompt.d.ts +0 -39
  608. package/dist/esm/models/openresponsesprompt.d.ts.map +0 -1
  609. package/dist/esm/models/openresponsesprompt.js +0 -36
  610. package/dist/esm/models/openresponsesprompt.js.map +0 -1
  611. package/dist/esm/models/openresponsesrefusalcontent.d.ts +0 -54
  612. package/dist/esm/models/openresponsesrefusalcontent.d.ts.map +0 -1
  613. package/dist/esm/models/openresponsesrefusalcontent.js +0 -51
  614. package/dist/esm/models/openresponsesrefusalcontent.js.map +0 -1
  615. package/dist/esm/models/openresponsesservicetier.d.ts +0 -25
  616. package/dist/esm/models/openresponsesservicetier.d.ts.map +0 -1
  617. package/dist/esm/models/openresponsesservicetier.js +0 -35
  618. package/dist/esm/models/openresponsesservicetier.js.map +0 -1
  619. package/dist/esm/models/openresponsestextconfig.d.ts +0 -59
  620. package/dist/esm/models/openresponsestextconfig.d.ts.map +0 -1
  621. package/dist/esm/models/openresponsestextconfig.js +0 -62
  622. package/dist/esm/models/openresponsestextconfig.js.map +0 -1
  623. package/dist/esm/models/openresponsestoolchoice.d.ts +0 -148
  624. package/dist/esm/models/openresponsestoolchoice.d.ts.map +0 -1
  625. package/dist/esm/models/openresponsestoolchoice.js +0 -139
  626. package/dist/esm/models/openresponsestoolchoice.js.map +0 -1
  627. package/dist/esm/models/openresponsestoolunion.d.ts +0 -95
  628. package/dist/esm/models/openresponsestoolunion.d.ts.map +0 -1
  629. package/dist/esm/models/openresponsestoolunion.js +0 -94
  630. package/dist/esm/models/openresponsestoolunion.js.map +0 -1
  631. package/dist/esm/models/openresponsestruncation.d.ts +0 -22
  632. package/dist/esm/models/openresponsestruncation.d.ts.map +0 -1
  633. package/dist/esm/models/openresponsestruncation.js +0 -32
  634. package/dist/esm/models/openresponsestruncation.js.map +0 -1
  635. package/dist/esm/models/outputtextcontent.d.ts +0 -80
  636. package/dist/esm/models/outputtextcontent.d.ts.map +0 -1
  637. package/dist/esm/models/outputtextcontent.js +0 -93
  638. package/dist/esm/models/outputtextcontent.js.map +0 -1
  639. package/dist/esm/models/refusalcontent.d.ts +0 -54
  640. package/dist/esm/models/refusalcontent.d.ts.map +0 -1
  641. package/dist/esm/models/refusalcontent.js +0 -51
  642. package/dist/esm/models/refusalcontent.js.map +0 -1
  643. package/dist/esm/models/responsesusage.d.ts +0 -131
  644. package/dist/esm/models/responsesusage.d.ts.map +0 -1
  645. package/dist/esm/models/responsesusage.js +0 -173
  646. package/dist/esm/models/responsesusage.js.map +0 -1
  647. package/dist/esm/models/toolchoicetypes.d.ts +0 -164
  648. package/dist/esm/models/toolchoicetypes.d.ts.map +0 -1
  649. package/dist/esm/models/toolchoicetypes.js +0 -168
  650. package/dist/esm/models/toolchoicetypes.js.map +0 -1
  651. package/dist/esm/models/urlcitationannotation.d.ts +0 -60
  652. package/dist/esm/models/urlcitationannotation.d.ts.map +0 -1
  653. package/dist/esm/models/urlcitationannotation.js +0 -68
  654. package/dist/esm/models/urlcitationannotation.js.map +0 -1
  655. package/src/models/filecitationannotation.ts +0 -116
  656. package/src/models/filepathannotation.ts +0 -110
  657. package/src/models/openresponsesformatjsonobject.ts +0 -101
  658. package/src/models/openresponsesformatjsonschema.ts +0 -117
  659. package/src/models/openresponsesformattext.ts +0 -98
  660. package/src/models/openresponsesformattextconfig.ts +0 -95
  661. package/src/models/openresponsesinput.ts +0 -78
  662. package/src/models/openresponsesinputcontent.ts +0 -117
  663. package/src/models/openresponsesinputfile.ts +0 -127
  664. package/src/models/openresponsesinputimage.ts +0 -161
  665. package/src/models/openresponsesinputitem.ts +0 -1084
  666. package/src/models/openresponsesinputtext.ts +0 -102
  667. package/src/models/openresponsesoutputtext.ts +0 -208
  668. package/src/models/openresponsesprompt.ts +0 -84
  669. package/src/models/openresponsesrefusalcontent.ts +0 -101
  670. package/src/models/openresponsesservicetier.ts +0 -53
  671. package/src/models/openresponsestextconfig.ts +0 -126
  672. package/src/models/openresponsestoolchoice.ts +0 -269
  673. package/src/models/openresponsestoolunion.ts +0 -215
  674. package/src/models/openresponsestruncation.ts +0 -48
  675. package/src/models/outputtextcontent.ts +0 -205
  676. package/src/models/refusalcontent.ts +0 -93
  677. package/src/models/responsesusage.ts +0 -326
  678. package/src/models/toolchoicetypes.ts +0 -280
  679. package/src/models/urlcitationannotation.ts +0 -122
@@ -14,41 +14,70 @@ import {
14
14
  import { Result as SafeParseResult } from "../types/fp.js";
15
15
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
16
16
  import {
17
- OpenResponsesInput,
18
- OpenResponsesInput$inboundSchema,
19
- OpenResponsesInput$Outbound,
20
- OpenResponsesInput$outboundSchema,
21
- } from "./openresponsesinput.js";
17
+ OpenAIResponsesPrompt,
18
+ OpenAIResponsesPrompt$inboundSchema,
19
+ OpenAIResponsesPrompt$Outbound,
20
+ OpenAIResponsesPrompt$outboundSchema,
21
+ } from "./openairesponsesprompt.js";
22
22
  import {
23
- OpenResponsesPrompt,
24
- OpenResponsesPrompt$inboundSchema,
25
- OpenResponsesPrompt$Outbound,
26
- OpenResponsesPrompt$outboundSchema,
27
- } from "./openresponsesprompt.js";
23
+ OpenResponsesWebSearch20250826Tool,
24
+ OpenResponsesWebSearch20250826Tool$inboundSchema,
25
+ OpenResponsesWebSearch20250826Tool$Outbound,
26
+ OpenResponsesWebSearch20250826Tool$outboundSchema,
27
+ } from "./openresponseswebsearch20250826tool.js";
28
28
  import {
29
- OpenResponsesReasoningConfig,
30
- OpenResponsesReasoningConfig$inboundSchema,
31
- OpenResponsesReasoningConfig$Outbound,
32
- OpenResponsesReasoningConfig$outboundSchema,
33
- } from "./openresponsesreasoningconfig.js";
29
+ OpenResponsesWebSearchPreview20250311Tool,
30
+ OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
31
+ OpenResponsesWebSearchPreview20250311Tool$Outbound,
32
+ OpenResponsesWebSearchPreview20250311Tool$outboundSchema,
33
+ } from "./openresponseswebsearchpreview20250311tool.js";
34
34
  import {
35
- OpenResponsesTextConfig,
36
- OpenResponsesTextConfig$inboundSchema,
37
- OpenResponsesTextConfig$Outbound,
38
- OpenResponsesTextConfig$outboundSchema,
39
- } from "./openresponsestextconfig.js";
35
+ OpenResponsesWebSearchPreviewTool,
36
+ OpenResponsesWebSearchPreviewTool$inboundSchema,
37
+ OpenResponsesWebSearchPreviewTool$Outbound,
38
+ OpenResponsesWebSearchPreviewTool$outboundSchema,
39
+ } from "./openresponseswebsearchpreviewtool.js";
40
40
  import {
41
- OpenResponsesToolChoice,
42
- OpenResponsesToolChoice$inboundSchema,
43
- OpenResponsesToolChoice$Outbound,
44
- OpenResponsesToolChoice$outboundSchema,
45
- } from "./openresponsestoolchoice.js";
41
+ OpenResponsesWebSearchTool,
42
+ OpenResponsesWebSearchTool$inboundSchema,
43
+ OpenResponsesWebSearchTool$Outbound,
44
+ OpenResponsesWebSearchTool$outboundSchema,
45
+ } from "./openresponseswebsearchtool.js";
46
46
  import {
47
- OpenResponsesToolUnion,
48
- OpenResponsesToolUnion$inboundSchema,
49
- OpenResponsesToolUnion$Outbound,
50
- OpenResponsesToolUnion$outboundSchema,
51
- } from "./openresponsestoolunion.js";
47
+ OutputItemImageGenerationCall,
48
+ OutputItemImageGenerationCall$inboundSchema,
49
+ OutputItemImageGenerationCall$Outbound,
50
+ OutputItemImageGenerationCall$outboundSchema,
51
+ } from "./outputitemimagegenerationcall.js";
52
+ import {
53
+ OutputMessage,
54
+ OutputMessage$inboundSchema,
55
+ OutputMessage$Outbound,
56
+ OutputMessage$outboundSchema,
57
+ } from "./outputmessage.js";
58
+ import {
59
+ ReasoningSummaryVerbosity,
60
+ ReasoningSummaryVerbosity$inboundSchema,
61
+ ReasoningSummaryVerbosity$outboundSchema,
62
+ } from "./reasoningsummaryverbosity.js";
63
+ import {
64
+ ResponseInputFile,
65
+ ResponseInputFile$inboundSchema,
66
+ ResponseInputFile$Outbound,
67
+ ResponseInputFile$outboundSchema,
68
+ } from "./responseinputfile.js";
69
+ import {
70
+ ResponseInputImage,
71
+ ResponseInputImage$inboundSchema,
72
+ ResponseInputImage$Outbound,
73
+ ResponseInputImage$outboundSchema,
74
+ } from "./responseinputimage.js";
75
+ import {
76
+ ResponseInputText,
77
+ ResponseInputText$inboundSchema,
78
+ ResponseInputText$Outbound,
79
+ ResponseInputText$outboundSchema,
80
+ } from "./responseinputtext.js";
52
81
  import {
53
82
  ResponsesErrorField,
54
83
  ResponsesErrorField$inboundSchema,
@@ -62,11 +91,16 @@ import {
62
91
  ResponsesOutputItem$outboundSchema,
63
92
  } from "./responsesoutputitem.js";
64
93
  import {
65
- ResponsesUsage,
66
- ResponsesUsage$inboundSchema,
67
- ResponsesUsage$Outbound,
68
- ResponsesUsage$outboundSchema,
69
- } from "./responsesusage.js";
94
+ ResponseTextConfig,
95
+ ResponseTextConfig$inboundSchema,
96
+ ResponseTextConfig$Outbound,
97
+ ResponseTextConfig$outboundSchema,
98
+ } from "./responsetextconfig.js";
99
+ import {
100
+ ToolCallStatus,
101
+ ToolCallStatus$inboundSchema,
102
+ ToolCallStatus$outboundSchema,
103
+ } from "./toolcallstatus.js";
70
104
 
71
105
  export const ObjectT = {
72
106
  Response: "response",
@@ -95,26 +129,323 @@ export type IncompleteDetails = {
95
129
  reason?: Reason | undefined;
96
130
  };
97
131
 
98
- export const ServiceTier = {
132
+ export type InputTokensDetails = {
133
+ cachedTokens: number;
134
+ };
135
+
136
+ export type OutputTokensDetails = {
137
+ reasoningTokens: number;
138
+ };
139
+
140
+ export type Usage = {
141
+ inputTokens: number;
142
+ inputTokensDetails: InputTokensDetails;
143
+ outputTokens: number;
144
+ outputTokensDetails: OutputTokensDetails;
145
+ totalTokens: number;
146
+ };
147
+
148
+ export const InstructionsTypeFunctionCall = {
149
+ FunctionCall: "function_call",
150
+ } as const;
151
+ export type InstructionsTypeFunctionCall = ClosedEnum<
152
+ typeof InstructionsTypeFunctionCall
153
+ >;
154
+
155
+ export type InstructionsFunctionCall = {
156
+ type: InstructionsTypeFunctionCall;
157
+ callId: string;
158
+ name: string;
159
+ arguments: string;
160
+ id?: string | undefined;
161
+ status?: ToolCallStatus | undefined;
162
+ };
163
+
164
+ export const InstructionsTypeFunctionCallOutput = {
165
+ FunctionCallOutput: "function_call_output",
166
+ } as const;
167
+ export type InstructionsTypeFunctionCallOutput = ClosedEnum<
168
+ typeof InstructionsTypeFunctionCallOutput
169
+ >;
170
+
171
+ export type InstructionsFunctionCallOutput = {
172
+ type: InstructionsTypeFunctionCallOutput;
173
+ id: string;
174
+ callId: string;
175
+ output: string;
176
+ status?: ToolCallStatus | undefined;
177
+ };
178
+
179
+ export const InstructionsTypeMessage2 = {
180
+ Message: "message",
181
+ } as const;
182
+ export type InstructionsTypeMessage2 = ClosedEnum<
183
+ typeof InstructionsTypeMessage2
184
+ >;
185
+
186
+ export const OpenResponsesNonStreamingResponseRoleDeveloper2 = {
187
+ Developer: "developer",
188
+ } as const;
189
+ export type OpenResponsesNonStreamingResponseRoleDeveloper2 = ClosedEnum<
190
+ typeof OpenResponsesNonStreamingResponseRoleDeveloper2
191
+ >;
192
+
193
+ export const OpenResponsesNonStreamingResponseRoleSystem2 = {
194
+ System: "system",
195
+ } as const;
196
+ export type OpenResponsesNonStreamingResponseRoleSystem2 = ClosedEnum<
197
+ typeof OpenResponsesNonStreamingResponseRoleSystem2
198
+ >;
199
+
200
+ export const OpenResponsesNonStreamingResponseRoleUser2 = {
201
+ User: "user",
202
+ } as const;
203
+ export type OpenResponsesNonStreamingResponseRoleUser2 = ClosedEnum<
204
+ typeof OpenResponsesNonStreamingResponseRoleUser2
205
+ >;
206
+
207
+ export type OpenResponsesNonStreamingResponseRoleUnion2 =
208
+ | OpenResponsesNonStreamingResponseRoleUser2
209
+ | OpenResponsesNonStreamingResponseRoleSystem2
210
+ | OpenResponsesNonStreamingResponseRoleDeveloper2;
211
+
212
+ export type OpenResponsesNonStreamingResponseContent3 =
213
+ | (ResponseInputText & { type: "input_text" })
214
+ | (ResponseInputImage & { type: "input_image" })
215
+ | (ResponseInputFile & { type: "input_file" });
216
+
217
+ export type InstructionsMessage2 = {
218
+ id: string;
219
+ type?: InstructionsTypeMessage2 | undefined;
220
+ role:
221
+ | OpenResponsesNonStreamingResponseRoleUser2
222
+ | OpenResponsesNonStreamingResponseRoleSystem2
223
+ | OpenResponsesNonStreamingResponseRoleDeveloper2;
224
+ content: Array<
225
+ | (ResponseInputText & { type: "input_text" })
226
+ | (ResponseInputImage & { type: "input_image" })
227
+ | (ResponseInputFile & { type: "input_file" })
228
+ >;
229
+ };
230
+
231
+ export const InstructionsTypeMessage1 = {
232
+ Message: "message",
233
+ } as const;
234
+ export type InstructionsTypeMessage1 = ClosedEnum<
235
+ typeof InstructionsTypeMessage1
236
+ >;
237
+
238
+ export const OpenResponsesNonStreamingResponseRoleDeveloper1 = {
239
+ Developer: "developer",
240
+ } as const;
241
+ export type OpenResponsesNonStreamingResponseRoleDeveloper1 = ClosedEnum<
242
+ typeof OpenResponsesNonStreamingResponseRoleDeveloper1
243
+ >;
244
+
245
+ export const OpenResponsesNonStreamingResponseRoleAssistant = {
246
+ Assistant: "assistant",
247
+ } as const;
248
+ export type OpenResponsesNonStreamingResponseRoleAssistant = ClosedEnum<
249
+ typeof OpenResponsesNonStreamingResponseRoleAssistant
250
+ >;
251
+
252
+ export const OpenResponsesNonStreamingResponseRoleSystem1 = {
253
+ System: "system",
254
+ } as const;
255
+ export type OpenResponsesNonStreamingResponseRoleSystem1 = ClosedEnum<
256
+ typeof OpenResponsesNonStreamingResponseRoleSystem1
257
+ >;
258
+
259
+ export const OpenResponsesNonStreamingResponseRoleUser1 = {
260
+ User: "user",
261
+ } as const;
262
+ export type OpenResponsesNonStreamingResponseRoleUser1 = ClosedEnum<
263
+ typeof OpenResponsesNonStreamingResponseRoleUser1
264
+ >;
265
+
266
+ export type OpenResponsesNonStreamingResponseRoleUnion1 =
267
+ | OpenResponsesNonStreamingResponseRoleUser1
268
+ | OpenResponsesNonStreamingResponseRoleSystem1
269
+ | OpenResponsesNonStreamingResponseRoleAssistant
270
+ | OpenResponsesNonStreamingResponseRoleDeveloper1;
271
+
272
+ export type OpenResponsesNonStreamingResponseContent1 =
273
+ | (ResponseInputText & { type: "input_text" })
274
+ | (ResponseInputImage & { type: "input_image" })
275
+ | (ResponseInputFile & { type: "input_file" });
276
+
277
+ export type OpenResponsesNonStreamingResponseContent2 =
278
+ | Array<
279
+ | (ResponseInputText & { type: "input_text" })
280
+ | (ResponseInputImage & { type: "input_image" })
281
+ | (ResponseInputFile & { type: "input_file" })
282
+ >
283
+ | string;
284
+
285
+ export type InstructionsMessage1 = {
286
+ type?: InstructionsTypeMessage1 | undefined;
287
+ role:
288
+ | OpenResponsesNonStreamingResponseRoleUser1
289
+ | OpenResponsesNonStreamingResponseRoleSystem1
290
+ | OpenResponsesNonStreamingResponseRoleAssistant
291
+ | OpenResponsesNonStreamingResponseRoleDeveloper1;
292
+ content:
293
+ | Array<
294
+ | (ResponseInputText & { type: "input_text" })
295
+ | (ResponseInputImage & { type: "input_image" })
296
+ | (ResponseInputFile & { type: "input_file" })
297
+ >
298
+ | string;
299
+ };
300
+
301
+ export type InstructionsUnion1 =
302
+ | InstructionsFunctionCallOutput
303
+ | InstructionsFunctionCall
304
+ | OutputItemImageGenerationCall
305
+ | OutputMessage
306
+ | InstructionsMessage2
307
+ | InstructionsMessage1;
308
+
309
+ export type InstructionsUnion2 =
310
+ | string
311
+ | Array<
312
+ | InstructionsFunctionCallOutput
313
+ | InstructionsFunctionCall
314
+ | OutputItemImageGenerationCall
315
+ | OutputMessage
316
+ | InstructionsMessage2
317
+ | InstructionsMessage1
318
+ >
319
+ | any;
320
+
321
+ export const OpenResponsesNonStreamingResponseToolType = {
322
+ Function: "function",
323
+ } as const;
324
+ export type OpenResponsesNonStreamingResponseToolType = ClosedEnum<
325
+ typeof OpenResponsesNonStreamingResponseToolType
326
+ >;
327
+
328
+ /**
329
+ * Function tool definition
330
+ */
331
+ export type OpenResponsesNonStreamingResponseToolFunction = {
332
+ type: OpenResponsesNonStreamingResponseToolType;
333
+ name: string;
334
+ description?: string | null | undefined;
335
+ strict?: boolean | null | undefined;
336
+ parameters: { [k: string]: any | null } | null;
337
+ };
338
+
339
+ export type OpenResponsesNonStreamingResponseToolUnion =
340
+ | OpenResponsesNonStreamingResponseToolFunction
341
+ | OpenResponsesWebSearchPreviewTool
342
+ | OpenResponsesWebSearchPreview20250311Tool
343
+ | OpenResponsesWebSearchTool
344
+ | OpenResponsesWebSearch20250826Tool;
345
+
346
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview = {
347
+ WebSearchPreview: "web_search_preview",
348
+ } as const;
349
+ export type OpenResponsesNonStreamingResponseTypeWebSearchPreview = ClosedEnum<
350
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview
351
+ >;
352
+
353
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311 = {
354
+ WebSearchPreview20250311: "web_search_preview_2025_03_11",
355
+ } as const;
356
+ export type OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311 =
357
+ ClosedEnum<
358
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311
359
+ >;
360
+
361
+ export type OpenResponsesNonStreamingResponseTypeUnion =
362
+ | OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311
363
+ | OpenResponsesNonStreamingResponseTypeWebSearchPreview;
364
+
365
+ export type OpenResponsesNonStreamingResponseToolChoice = {
366
+ type:
367
+ | OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311
368
+ | OpenResponsesNonStreamingResponseTypeWebSearchPreview;
369
+ };
370
+
371
+ export const OpenResponsesNonStreamingResponseToolChoiceTypeFunction = {
372
+ Function: "function",
373
+ } as const;
374
+ export type OpenResponsesNonStreamingResponseToolChoiceTypeFunction =
375
+ ClosedEnum<typeof OpenResponsesNonStreamingResponseToolChoiceTypeFunction>;
376
+
377
+ export type OpenResponsesNonStreamingResponseToolChoiceFunction = {
378
+ type: OpenResponsesNonStreamingResponseToolChoiceTypeFunction;
379
+ name: string;
380
+ };
381
+
382
+ export const OpenResponsesNonStreamingResponseToolChoiceRequired = {
383
+ Required: "required",
384
+ } as const;
385
+ export type OpenResponsesNonStreamingResponseToolChoiceRequired = ClosedEnum<
386
+ typeof OpenResponsesNonStreamingResponseToolChoiceRequired
387
+ >;
388
+
389
+ export const OpenResponsesNonStreamingResponseToolChoiceNone = {
390
+ None: "none",
391
+ } as const;
392
+ export type OpenResponsesNonStreamingResponseToolChoiceNone = ClosedEnum<
393
+ typeof OpenResponsesNonStreamingResponseToolChoiceNone
394
+ >;
395
+
396
+ export const OpenResponsesNonStreamingResponseToolChoiceAuto = {
397
+ Auto: "auto",
398
+ } as const;
399
+ export type OpenResponsesNonStreamingResponseToolChoiceAuto = ClosedEnum<
400
+ typeof OpenResponsesNonStreamingResponseToolChoiceAuto
401
+ >;
402
+
403
+ export type OpenResponsesNonStreamingResponseToolChoiceUnion =
404
+ | OpenResponsesNonStreamingResponseToolChoiceFunction
405
+ | OpenResponsesNonStreamingResponseToolChoice
406
+ | OpenResponsesNonStreamingResponseToolChoiceAuto
407
+ | OpenResponsesNonStreamingResponseToolChoiceNone
408
+ | OpenResponsesNonStreamingResponseToolChoiceRequired;
409
+
410
+ export const OpenResponsesNonStreamingResponseEffort = {
411
+ High: "high",
412
+ Medium: "medium",
413
+ Low: "low",
414
+ Minimal: "minimal",
415
+ } as const;
416
+ export type OpenResponsesNonStreamingResponseEffort = OpenEnum<
417
+ typeof OpenResponsesNonStreamingResponseEffort
418
+ >;
419
+
420
+ export type OpenResponsesNonStreamingResponseReasoning = {
421
+ effort?: OpenResponsesNonStreamingResponseEffort | null | undefined;
422
+ summary?: ReasoningSummaryVerbosity | undefined;
423
+ };
424
+
425
+ export const OpenResponsesNonStreamingResponseServiceTier = {
99
426
  Auto: "auto",
100
427
  Default: "default",
101
428
  Flex: "flex",
102
429
  Priority: "priority",
103
430
  Scale: "scale",
104
431
  } as const;
105
- export type ServiceTier = OpenEnum<typeof ServiceTier>;
432
+ export type OpenResponsesNonStreamingResponseServiceTier = OpenEnum<
433
+ typeof OpenResponsesNonStreamingResponseServiceTier
434
+ >;
106
435
 
107
- export const Truncation = {
436
+ export const OpenResponsesNonStreamingResponseTruncation = {
108
437
  Auto: "auto",
109
438
  Disabled: "disabled",
110
439
  } as const;
111
- export type Truncation = OpenEnum<typeof Truncation>;
440
+ export type OpenResponsesNonStreamingResponseTruncation = OpenEnum<
441
+ typeof OpenResponsesNonStreamingResponseTruncation
442
+ >;
112
443
 
113
444
  /**
114
445
  * Complete non-streaming response from the Responses API
115
446
  */
116
447
  export type OpenResponsesNonStreamingResponse = {
117
- id?: string | undefined;
448
+ id: string;
118
449
  object: ObjectT;
119
450
  createdAt: number;
120
451
  model: string;
@@ -129,46 +460,54 @@ export type OpenResponsesNonStreamingResponse = {
129
460
  */
130
461
  error: ResponsesErrorField | null;
131
462
  incompleteDetails: IncompleteDetails | null;
132
- /**
133
- * Token usage information for the response
134
- */
135
- usage?: ResponsesUsage | undefined;
463
+ usage?: Usage | undefined;
136
464
  maxToolCalls?: number | null | undefined;
137
465
  topLogprobs?: number | undefined;
138
466
  maxOutputTokens?: number | null | undefined;
139
467
  temperature: number | null;
140
468
  topP: number | null;
141
- /**
142
- * Input for a response request - can be a string or array of items
143
- */
144
- instructions?: OpenResponsesInput | null | undefined;
469
+ instructions?:
470
+ | string
471
+ | Array<
472
+ | InstructionsFunctionCallOutput
473
+ | InstructionsFunctionCall
474
+ | OutputItemImageGenerationCall
475
+ | OutputMessage
476
+ | InstructionsMessage2
477
+ | InstructionsMessage1
478
+ >
479
+ | any
480
+ | null
481
+ | undefined;
145
482
  /**
146
483
  * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
147
484
  */
148
485
  metadata: { [k: string]: string } | null;
149
- tools: Array<OpenResponsesToolUnion>;
150
- /**
151
- * Controls which tool the model should call
152
- */
153
- toolChoice: OpenResponsesToolChoice;
486
+ tools: Array<
487
+ | OpenResponsesNonStreamingResponseToolFunction
488
+ | OpenResponsesWebSearchPreviewTool
489
+ | OpenResponsesWebSearchPreview20250311Tool
490
+ | OpenResponsesWebSearchTool
491
+ | OpenResponsesWebSearch20250826Tool
492
+ >;
493
+ toolChoice:
494
+ | OpenResponsesNonStreamingResponseToolChoiceFunction
495
+ | OpenResponsesNonStreamingResponseToolChoice
496
+ | OpenResponsesNonStreamingResponseToolChoiceAuto
497
+ | OpenResponsesNonStreamingResponseToolChoiceNone
498
+ | OpenResponsesNonStreamingResponseToolChoiceRequired;
154
499
  parallelToolCalls: boolean;
155
- /**
156
- * Prompt template with variables for the response
157
- */
158
- prompt?: OpenResponsesPrompt | null | undefined;
500
+ prompt?: OpenAIResponsesPrompt | null | undefined;
159
501
  background?: boolean | null | undefined;
160
502
  previousResponseId?: string | null | undefined;
161
- /**
162
- * Configuration for reasoning mode in the response
163
- */
164
- reasoning?: OpenResponsesReasoningConfig | null | undefined;
165
- serviceTier?: ServiceTier | null | undefined;
503
+ reasoning?: OpenResponsesNonStreamingResponseReasoning | null | undefined;
504
+ serviceTier?: OpenResponsesNonStreamingResponseServiceTier | null | undefined;
166
505
  store?: boolean | undefined;
167
- truncation?: Truncation | null | undefined;
506
+ truncation?: OpenResponsesNonStreamingResponseTruncation | null | undefined;
168
507
  /**
169
508
  * Text output configuration including format and verbosity
170
509
  */
171
- text?: OpenResponsesTextConfig | undefined;
510
+ text?: ResponseTextConfig | undefined;
172
511
  };
173
512
 
174
513
  /** @internal */
@@ -304,157 +643,2369 @@ export function incompleteDetailsFromJSON(
304
643
  }
305
644
 
306
645
  /** @internal */
307
- export const ServiceTier$inboundSchema: z.ZodType<
308
- ServiceTier,
646
+ export const InputTokensDetails$inboundSchema: z.ZodType<
647
+ InputTokensDetails,
309
648
  z.ZodTypeDef,
310
649
  unknown
311
- > = z
312
- .union([
313
- z.nativeEnum(ServiceTier),
314
- z.string().transform(catchUnrecognizedEnum),
315
- ]);
650
+ > = z.object({
651
+ cached_tokens: z.number(),
652
+ }).transform((v) => {
653
+ return remap$(v, {
654
+ "cached_tokens": "cachedTokens",
655
+ });
656
+ });
657
+
658
+ /** @internal */
659
+ export type InputTokensDetails$Outbound = {
660
+ cached_tokens: number;
661
+ };
316
662
 
317
663
  /** @internal */
318
- export const ServiceTier$outboundSchema: z.ZodType<
319
- ServiceTier,
664
+ export const InputTokensDetails$outboundSchema: z.ZodType<
665
+ InputTokensDetails$Outbound,
320
666
  z.ZodTypeDef,
321
- ServiceTier
322
- > = z.union([
323
- z.nativeEnum(ServiceTier),
324
- z.string().and(z.custom<Unrecognized<string>>()),
325
- ]);
667
+ InputTokensDetails
668
+ > = z.object({
669
+ cachedTokens: z.number(),
670
+ }).transform((v) => {
671
+ return remap$(v, {
672
+ cachedTokens: "cached_tokens",
673
+ });
674
+ });
326
675
 
327
676
  /**
328
677
  * @internal
329
678
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
330
679
  */
331
- export namespace ServiceTier$ {
332
- /** @deprecated use `ServiceTier$inboundSchema` instead. */
333
- export const inboundSchema = ServiceTier$inboundSchema;
334
- /** @deprecated use `ServiceTier$outboundSchema` instead. */
335
- export const outboundSchema = ServiceTier$outboundSchema;
680
+ export namespace InputTokensDetails$ {
681
+ /** @deprecated use `InputTokensDetails$inboundSchema` instead. */
682
+ export const inboundSchema = InputTokensDetails$inboundSchema;
683
+ /** @deprecated use `InputTokensDetails$outboundSchema` instead. */
684
+ export const outboundSchema = InputTokensDetails$outboundSchema;
685
+ /** @deprecated use `InputTokensDetails$Outbound` instead. */
686
+ export type Outbound = InputTokensDetails$Outbound;
687
+ }
688
+
689
+ export function inputTokensDetailsToJSON(
690
+ inputTokensDetails: InputTokensDetails,
691
+ ): string {
692
+ return JSON.stringify(
693
+ InputTokensDetails$outboundSchema.parse(inputTokensDetails),
694
+ );
695
+ }
696
+
697
+ export function inputTokensDetailsFromJSON(
698
+ jsonString: string,
699
+ ): SafeParseResult<InputTokensDetails, SDKValidationError> {
700
+ return safeParse(
701
+ jsonString,
702
+ (x) => InputTokensDetails$inboundSchema.parse(JSON.parse(x)),
703
+ `Failed to parse 'InputTokensDetails' from JSON`,
704
+ );
336
705
  }
337
706
 
338
707
  /** @internal */
339
- export const Truncation$inboundSchema: z.ZodType<
340
- Truncation,
708
+ export const OutputTokensDetails$inboundSchema: z.ZodType<
709
+ OutputTokensDetails,
341
710
  z.ZodTypeDef,
342
711
  unknown
343
- > = z
344
- .union([
345
- z.nativeEnum(Truncation),
346
- z.string().transform(catchUnrecognizedEnum),
347
- ]);
712
+ > = z.object({
713
+ reasoning_tokens: z.number(),
714
+ }).transform((v) => {
715
+ return remap$(v, {
716
+ "reasoning_tokens": "reasoningTokens",
717
+ });
718
+ });
719
+
720
+ /** @internal */
721
+ export type OutputTokensDetails$Outbound = {
722
+ reasoning_tokens: number;
723
+ };
348
724
 
349
725
  /** @internal */
350
- export const Truncation$outboundSchema: z.ZodType<
351
- Truncation,
726
+ export const OutputTokensDetails$outboundSchema: z.ZodType<
727
+ OutputTokensDetails$Outbound,
352
728
  z.ZodTypeDef,
353
- Truncation
354
- > = z.union([
355
- z.nativeEnum(Truncation),
356
- z.string().and(z.custom<Unrecognized<string>>()),
357
- ]);
729
+ OutputTokensDetails
730
+ > = z.object({
731
+ reasoningTokens: z.number(),
732
+ }).transform((v) => {
733
+ return remap$(v, {
734
+ reasoningTokens: "reasoning_tokens",
735
+ });
736
+ });
358
737
 
359
738
  /**
360
739
  * @internal
361
740
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
362
741
  */
363
- export namespace Truncation$ {
364
- /** @deprecated use `Truncation$inboundSchema` instead. */
365
- export const inboundSchema = Truncation$inboundSchema;
366
- /** @deprecated use `Truncation$outboundSchema` instead. */
367
- export const outboundSchema = Truncation$outboundSchema;
742
+ export namespace OutputTokensDetails$ {
743
+ /** @deprecated use `OutputTokensDetails$inboundSchema` instead. */
744
+ export const inboundSchema = OutputTokensDetails$inboundSchema;
745
+ /** @deprecated use `OutputTokensDetails$outboundSchema` instead. */
746
+ export const outboundSchema = OutputTokensDetails$outboundSchema;
747
+ /** @deprecated use `OutputTokensDetails$Outbound` instead. */
748
+ export type Outbound = OutputTokensDetails$Outbound;
749
+ }
750
+
751
+ export function outputTokensDetailsToJSON(
752
+ outputTokensDetails: OutputTokensDetails,
753
+ ): string {
754
+ return JSON.stringify(
755
+ OutputTokensDetails$outboundSchema.parse(outputTokensDetails),
756
+ );
757
+ }
758
+
759
+ export function outputTokensDetailsFromJSON(
760
+ jsonString: string,
761
+ ): SafeParseResult<OutputTokensDetails, SDKValidationError> {
762
+ return safeParse(
763
+ jsonString,
764
+ (x) => OutputTokensDetails$inboundSchema.parse(JSON.parse(x)),
765
+ `Failed to parse 'OutputTokensDetails' from JSON`,
766
+ );
368
767
  }
369
768
 
370
769
  /** @internal */
371
- export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType<
372
- OpenResponsesNonStreamingResponse,
770
+ export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
771
+ .object({
772
+ input_tokens: z.number(),
773
+ input_tokens_details: z.lazy(() => InputTokensDetails$inboundSchema),
774
+ output_tokens: z.number(),
775
+ output_tokens_details: z.lazy(() => OutputTokensDetails$inboundSchema),
776
+ total_tokens: z.number(),
777
+ }).transform((v) => {
778
+ return remap$(v, {
779
+ "input_tokens": "inputTokens",
780
+ "input_tokens_details": "inputTokensDetails",
781
+ "output_tokens": "outputTokens",
782
+ "output_tokens_details": "outputTokensDetails",
783
+ "total_tokens": "totalTokens",
784
+ });
785
+ });
786
+
787
+ /** @internal */
788
+ export type Usage$Outbound = {
789
+ input_tokens: number;
790
+ input_tokens_details: InputTokensDetails$Outbound;
791
+ output_tokens: number;
792
+ output_tokens_details: OutputTokensDetails$Outbound;
793
+ total_tokens: number;
794
+ };
795
+
796
+ /** @internal */
797
+ export const Usage$outboundSchema: z.ZodType<
798
+ Usage$Outbound,
799
+ z.ZodTypeDef,
800
+ Usage
801
+ > = z.object({
802
+ inputTokens: z.number(),
803
+ inputTokensDetails: z.lazy(() => InputTokensDetails$outboundSchema),
804
+ outputTokens: z.number(),
805
+ outputTokensDetails: z.lazy(() => OutputTokensDetails$outboundSchema),
806
+ totalTokens: z.number(),
807
+ }).transform((v) => {
808
+ return remap$(v, {
809
+ inputTokens: "input_tokens",
810
+ inputTokensDetails: "input_tokens_details",
811
+ outputTokens: "output_tokens",
812
+ outputTokensDetails: "output_tokens_details",
813
+ totalTokens: "total_tokens",
814
+ });
815
+ });
816
+
817
+ /**
818
+ * @internal
819
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
820
+ */
821
+ export namespace Usage$ {
822
+ /** @deprecated use `Usage$inboundSchema` instead. */
823
+ export const inboundSchema = Usage$inboundSchema;
824
+ /** @deprecated use `Usage$outboundSchema` instead. */
825
+ export const outboundSchema = Usage$outboundSchema;
826
+ /** @deprecated use `Usage$Outbound` instead. */
827
+ export type Outbound = Usage$Outbound;
828
+ }
829
+
830
+ export function usageToJSON(usage: Usage): string {
831
+ return JSON.stringify(Usage$outboundSchema.parse(usage));
832
+ }
833
+
834
+ export function usageFromJSON(
835
+ jsonString: string,
836
+ ): SafeParseResult<Usage, SDKValidationError> {
837
+ return safeParse(
838
+ jsonString,
839
+ (x) => Usage$inboundSchema.parse(JSON.parse(x)),
840
+ `Failed to parse 'Usage' from JSON`,
841
+ );
842
+ }
843
+
844
+ /** @internal */
845
+ export const InstructionsTypeFunctionCall$inboundSchema: z.ZodNativeEnum<
846
+ typeof InstructionsTypeFunctionCall
847
+ > = z.nativeEnum(InstructionsTypeFunctionCall);
848
+
849
+ /** @internal */
850
+ export const InstructionsTypeFunctionCall$outboundSchema: z.ZodNativeEnum<
851
+ typeof InstructionsTypeFunctionCall
852
+ > = InstructionsTypeFunctionCall$inboundSchema;
853
+
854
+ /**
855
+ * @internal
856
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
857
+ */
858
+ export namespace InstructionsTypeFunctionCall$ {
859
+ /** @deprecated use `InstructionsTypeFunctionCall$inboundSchema` instead. */
860
+ export const inboundSchema = InstructionsTypeFunctionCall$inboundSchema;
861
+ /** @deprecated use `InstructionsTypeFunctionCall$outboundSchema` instead. */
862
+ export const outboundSchema = InstructionsTypeFunctionCall$outboundSchema;
863
+ }
864
+
865
+ /** @internal */
866
+ export const InstructionsFunctionCall$inboundSchema: z.ZodType<
867
+ InstructionsFunctionCall,
373
868
  z.ZodTypeDef,
374
869
  unknown
375
870
  > = z.object({
871
+ type: InstructionsTypeFunctionCall$inboundSchema,
872
+ call_id: z.string(),
873
+ name: z.string(),
874
+ arguments: z.string(),
376
875
  id: z.string().optional(),
377
- object: ObjectT$inboundSchema,
378
- created_at: z.number(),
379
- model: z.string(),
380
- status: OpenResponsesNonStreamingResponseStatus$inboundSchema.optional(),
381
- output: z.array(ResponsesOutputItem$inboundSchema),
382
- user: z.nullable(z.string()).optional(),
383
- output_text: z.string().optional(),
384
- prompt_cache_key: z.nullable(z.string()).optional(),
385
- safety_identifier: z.nullable(z.string()).optional(),
386
- error: z.nullable(ResponsesErrorField$inboundSchema),
387
- incomplete_details: z.nullable(z.lazy(() => IncompleteDetails$inboundSchema)),
388
- usage: ResponsesUsage$inboundSchema.optional(),
389
- max_tool_calls: z.nullable(z.number()).optional(),
390
- top_logprobs: z.number().optional(),
391
- max_output_tokens: z.nullable(z.number()).optional(),
392
- temperature: z.nullable(z.number()),
393
- top_p: z.nullable(z.number()),
394
- instructions: z.nullable(OpenResponsesInput$inboundSchema).optional(),
395
- metadata: z.nullable(z.record(z.string())),
396
- tools: z.array(OpenResponsesToolUnion$inboundSchema),
397
- tool_choice: OpenResponsesToolChoice$inboundSchema,
398
- parallel_tool_calls: z.boolean(),
399
- prompt: z.nullable(OpenResponsesPrompt$inboundSchema).optional(),
400
- background: z.nullable(z.boolean()).optional(),
401
- previous_response_id: z.nullable(z.string()).optional(),
402
- reasoning: z.nullable(OpenResponsesReasoningConfig$inboundSchema).optional(),
403
- service_tier: z.nullable(ServiceTier$inboundSchema).optional(),
404
- store: z.boolean().optional(),
405
- truncation: z.nullable(Truncation$inboundSchema).optional(),
406
- text: OpenResponsesTextConfig$inboundSchema.optional(),
876
+ status: ToolCallStatus$inboundSchema.optional(),
407
877
  }).transform((v) => {
408
878
  return remap$(v, {
409
- "created_at": "createdAt",
410
- "output_text": "outputText",
411
- "prompt_cache_key": "promptCacheKey",
412
- "safety_identifier": "safetyIdentifier",
413
- "incomplete_details": "incompleteDetails",
414
- "max_tool_calls": "maxToolCalls",
415
- "top_logprobs": "topLogprobs",
416
- "max_output_tokens": "maxOutputTokens",
417
- "top_p": "topP",
418
- "tool_choice": "toolChoice",
419
- "parallel_tool_calls": "parallelToolCalls",
420
- "previous_response_id": "previousResponseId",
421
- "service_tier": "serviceTier",
879
+ "call_id": "callId",
422
880
  });
423
881
  });
424
882
 
425
883
  /** @internal */
426
- export type OpenResponsesNonStreamingResponse$Outbound = {
884
+ export type InstructionsFunctionCall$Outbound = {
885
+ type: string;
886
+ call_id: string;
887
+ name: string;
888
+ arguments: string;
427
889
  id?: string | undefined;
428
- object: string;
429
- created_at: number;
430
- model: string;
431
890
  status?: string | undefined;
432
- output: Array<ResponsesOutputItem$Outbound>;
433
- user?: string | null | undefined;
434
- output_text?: string | undefined;
435
- prompt_cache_key?: string | null | undefined;
436
- safety_identifier?: string | null | undefined;
437
- error: ResponsesErrorField$Outbound | null;
891
+ };
892
+
893
+ /** @internal */
894
+ export const InstructionsFunctionCall$outboundSchema: z.ZodType<
895
+ InstructionsFunctionCall$Outbound,
896
+ z.ZodTypeDef,
897
+ InstructionsFunctionCall
898
+ > = z.object({
899
+ type: InstructionsTypeFunctionCall$outboundSchema,
900
+ callId: z.string(),
901
+ name: z.string(),
902
+ arguments: z.string(),
903
+ id: z.string().optional(),
904
+ status: ToolCallStatus$outboundSchema.optional(),
905
+ }).transform((v) => {
906
+ return remap$(v, {
907
+ callId: "call_id",
908
+ });
909
+ });
910
+
911
+ /**
912
+ * @internal
913
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
914
+ */
915
+ export namespace InstructionsFunctionCall$ {
916
+ /** @deprecated use `InstructionsFunctionCall$inboundSchema` instead. */
917
+ export const inboundSchema = InstructionsFunctionCall$inboundSchema;
918
+ /** @deprecated use `InstructionsFunctionCall$outboundSchema` instead. */
919
+ export const outboundSchema = InstructionsFunctionCall$outboundSchema;
920
+ /** @deprecated use `InstructionsFunctionCall$Outbound` instead. */
921
+ export type Outbound = InstructionsFunctionCall$Outbound;
922
+ }
923
+
924
+ export function instructionsFunctionCallToJSON(
925
+ instructionsFunctionCall: InstructionsFunctionCall,
926
+ ): string {
927
+ return JSON.stringify(
928
+ InstructionsFunctionCall$outboundSchema.parse(instructionsFunctionCall),
929
+ );
930
+ }
931
+
932
+ export function instructionsFunctionCallFromJSON(
933
+ jsonString: string,
934
+ ): SafeParseResult<InstructionsFunctionCall, SDKValidationError> {
935
+ return safeParse(
936
+ jsonString,
937
+ (x) => InstructionsFunctionCall$inboundSchema.parse(JSON.parse(x)),
938
+ `Failed to parse 'InstructionsFunctionCall' from JSON`,
939
+ );
940
+ }
941
+
942
+ /** @internal */
943
+ export const InstructionsTypeFunctionCallOutput$inboundSchema: z.ZodNativeEnum<
944
+ typeof InstructionsTypeFunctionCallOutput
945
+ > = z.nativeEnum(InstructionsTypeFunctionCallOutput);
946
+
947
+ /** @internal */
948
+ export const InstructionsTypeFunctionCallOutput$outboundSchema: z.ZodNativeEnum<
949
+ typeof InstructionsTypeFunctionCallOutput
950
+ > = InstructionsTypeFunctionCallOutput$inboundSchema;
951
+
952
+ /**
953
+ * @internal
954
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
955
+ */
956
+ export namespace InstructionsTypeFunctionCallOutput$ {
957
+ /** @deprecated use `InstructionsTypeFunctionCallOutput$inboundSchema` instead. */
958
+ export const inboundSchema = InstructionsTypeFunctionCallOutput$inboundSchema;
959
+ /** @deprecated use `InstructionsTypeFunctionCallOutput$outboundSchema` instead. */
960
+ export const outboundSchema =
961
+ InstructionsTypeFunctionCallOutput$outboundSchema;
962
+ }
963
+
964
+ /** @internal */
965
+ export const InstructionsFunctionCallOutput$inboundSchema: z.ZodType<
966
+ InstructionsFunctionCallOutput,
967
+ z.ZodTypeDef,
968
+ unknown
969
+ > = z.object({
970
+ type: InstructionsTypeFunctionCallOutput$inboundSchema,
971
+ id: z.string(),
972
+ call_id: z.string(),
973
+ output: z.string(),
974
+ status: ToolCallStatus$inboundSchema.optional(),
975
+ }).transform((v) => {
976
+ return remap$(v, {
977
+ "call_id": "callId",
978
+ });
979
+ });
980
+
981
+ /** @internal */
982
+ export type InstructionsFunctionCallOutput$Outbound = {
983
+ type: string;
984
+ id: string;
985
+ call_id: string;
986
+ output: string;
987
+ status?: string | undefined;
988
+ };
989
+
990
+ /** @internal */
991
+ export const InstructionsFunctionCallOutput$outboundSchema: z.ZodType<
992
+ InstructionsFunctionCallOutput$Outbound,
993
+ z.ZodTypeDef,
994
+ InstructionsFunctionCallOutput
995
+ > = z.object({
996
+ type: InstructionsTypeFunctionCallOutput$outboundSchema,
997
+ id: z.string(),
998
+ callId: z.string(),
999
+ output: z.string(),
1000
+ status: ToolCallStatus$outboundSchema.optional(),
1001
+ }).transform((v) => {
1002
+ return remap$(v, {
1003
+ callId: "call_id",
1004
+ });
1005
+ });
1006
+
1007
+ /**
1008
+ * @internal
1009
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1010
+ */
1011
+ export namespace InstructionsFunctionCallOutput$ {
1012
+ /** @deprecated use `InstructionsFunctionCallOutput$inboundSchema` instead. */
1013
+ export const inboundSchema = InstructionsFunctionCallOutput$inboundSchema;
1014
+ /** @deprecated use `InstructionsFunctionCallOutput$outboundSchema` instead. */
1015
+ export const outboundSchema = InstructionsFunctionCallOutput$outboundSchema;
1016
+ /** @deprecated use `InstructionsFunctionCallOutput$Outbound` instead. */
1017
+ export type Outbound = InstructionsFunctionCallOutput$Outbound;
1018
+ }
1019
+
1020
+ export function instructionsFunctionCallOutputToJSON(
1021
+ instructionsFunctionCallOutput: InstructionsFunctionCallOutput,
1022
+ ): string {
1023
+ return JSON.stringify(
1024
+ InstructionsFunctionCallOutput$outboundSchema.parse(
1025
+ instructionsFunctionCallOutput,
1026
+ ),
1027
+ );
1028
+ }
1029
+
1030
+ export function instructionsFunctionCallOutputFromJSON(
1031
+ jsonString: string,
1032
+ ): SafeParseResult<InstructionsFunctionCallOutput, SDKValidationError> {
1033
+ return safeParse(
1034
+ jsonString,
1035
+ (x) => InstructionsFunctionCallOutput$inboundSchema.parse(JSON.parse(x)),
1036
+ `Failed to parse 'InstructionsFunctionCallOutput' from JSON`,
1037
+ );
1038
+ }
1039
+
1040
+ /** @internal */
1041
+ export const InstructionsTypeMessage2$inboundSchema: z.ZodNativeEnum<
1042
+ typeof InstructionsTypeMessage2
1043
+ > = z.nativeEnum(InstructionsTypeMessage2);
1044
+
1045
+ /** @internal */
1046
+ export const InstructionsTypeMessage2$outboundSchema: z.ZodNativeEnum<
1047
+ typeof InstructionsTypeMessage2
1048
+ > = InstructionsTypeMessage2$inboundSchema;
1049
+
1050
+ /**
1051
+ * @internal
1052
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1053
+ */
1054
+ export namespace InstructionsTypeMessage2$ {
1055
+ /** @deprecated use `InstructionsTypeMessage2$inboundSchema` instead. */
1056
+ export const inboundSchema = InstructionsTypeMessage2$inboundSchema;
1057
+ /** @deprecated use `InstructionsTypeMessage2$outboundSchema` instead. */
1058
+ export const outboundSchema = InstructionsTypeMessage2$outboundSchema;
1059
+ }
1060
+
1061
+ /** @internal */
1062
+ export const OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema:
1063
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleDeveloper2> = z
1064
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleDeveloper2);
1065
+
1066
+ /** @internal */
1067
+ export const OpenResponsesNonStreamingResponseRoleDeveloper2$outboundSchema:
1068
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleDeveloper2> =
1069
+ OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema;
1070
+
1071
+ /**
1072
+ * @internal
1073
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1074
+ */
1075
+ export namespace OpenResponsesNonStreamingResponseRoleDeveloper2$ {
1076
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema` instead. */
1077
+ export const inboundSchema =
1078
+ OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema;
1079
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleDeveloper2$outboundSchema` instead. */
1080
+ export const outboundSchema =
1081
+ OpenResponsesNonStreamingResponseRoleDeveloper2$outboundSchema;
1082
+ }
1083
+
1084
+ /** @internal */
1085
+ export const OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema:
1086
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleSystem2> = z
1087
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleSystem2);
1088
+
1089
+ /** @internal */
1090
+ export const OpenResponsesNonStreamingResponseRoleSystem2$outboundSchema:
1091
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleSystem2> =
1092
+ OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema;
1093
+
1094
+ /**
1095
+ * @internal
1096
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1097
+ */
1098
+ export namespace OpenResponsesNonStreamingResponseRoleSystem2$ {
1099
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema` instead. */
1100
+ export const inboundSchema =
1101
+ OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema;
1102
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleSystem2$outboundSchema` instead. */
1103
+ export const outboundSchema =
1104
+ OpenResponsesNonStreamingResponseRoleSystem2$outboundSchema;
1105
+ }
1106
+
1107
+ /** @internal */
1108
+ export const OpenResponsesNonStreamingResponseRoleUser2$inboundSchema:
1109
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleUser2> = z
1110
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleUser2);
1111
+
1112
+ /** @internal */
1113
+ export const OpenResponsesNonStreamingResponseRoleUser2$outboundSchema:
1114
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleUser2> =
1115
+ OpenResponsesNonStreamingResponseRoleUser2$inboundSchema;
1116
+
1117
+ /**
1118
+ * @internal
1119
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1120
+ */
1121
+ export namespace OpenResponsesNonStreamingResponseRoleUser2$ {
1122
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUser2$inboundSchema` instead. */
1123
+ export const inboundSchema =
1124
+ OpenResponsesNonStreamingResponseRoleUser2$inboundSchema;
1125
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUser2$outboundSchema` instead. */
1126
+ export const outboundSchema =
1127
+ OpenResponsesNonStreamingResponseRoleUser2$outboundSchema;
1128
+ }
1129
+
1130
+ /** @internal */
1131
+ export const OpenResponsesNonStreamingResponseRoleUnion2$inboundSchema:
1132
+ z.ZodType<
1133
+ OpenResponsesNonStreamingResponseRoleUnion2,
1134
+ z.ZodTypeDef,
1135
+ unknown
1136
+ > = z.union([
1137
+ OpenResponsesNonStreamingResponseRoleUser2$inboundSchema,
1138
+ OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema,
1139
+ OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema,
1140
+ ]);
1141
+
1142
+ /** @internal */
1143
+ export type OpenResponsesNonStreamingResponseRoleUnion2$Outbound =
1144
+ | string
1145
+ | string
1146
+ | string;
1147
+
1148
+ /** @internal */
1149
+ export const OpenResponsesNonStreamingResponseRoleUnion2$outboundSchema:
1150
+ z.ZodType<
1151
+ OpenResponsesNonStreamingResponseRoleUnion2$Outbound,
1152
+ z.ZodTypeDef,
1153
+ OpenResponsesNonStreamingResponseRoleUnion2
1154
+ > = z.union([
1155
+ OpenResponsesNonStreamingResponseRoleUser2$outboundSchema,
1156
+ OpenResponsesNonStreamingResponseRoleSystem2$outboundSchema,
1157
+ OpenResponsesNonStreamingResponseRoleDeveloper2$outboundSchema,
1158
+ ]);
1159
+
1160
+ /**
1161
+ * @internal
1162
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1163
+ */
1164
+ export namespace OpenResponsesNonStreamingResponseRoleUnion2$ {
1165
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion2$inboundSchema` instead. */
1166
+ export const inboundSchema =
1167
+ OpenResponsesNonStreamingResponseRoleUnion2$inboundSchema;
1168
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion2$outboundSchema` instead. */
1169
+ export const outboundSchema =
1170
+ OpenResponsesNonStreamingResponseRoleUnion2$outboundSchema;
1171
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion2$Outbound` instead. */
1172
+ export type Outbound = OpenResponsesNonStreamingResponseRoleUnion2$Outbound;
1173
+ }
1174
+
1175
+ export function openResponsesNonStreamingResponseRoleUnion2ToJSON(
1176
+ openResponsesNonStreamingResponseRoleUnion2:
1177
+ OpenResponsesNonStreamingResponseRoleUnion2,
1178
+ ): string {
1179
+ return JSON.stringify(
1180
+ OpenResponsesNonStreamingResponseRoleUnion2$outboundSchema.parse(
1181
+ openResponsesNonStreamingResponseRoleUnion2,
1182
+ ),
1183
+ );
1184
+ }
1185
+
1186
+ export function openResponsesNonStreamingResponseRoleUnion2FromJSON(
1187
+ jsonString: string,
1188
+ ): SafeParseResult<
1189
+ OpenResponsesNonStreamingResponseRoleUnion2,
1190
+ SDKValidationError
1191
+ > {
1192
+ return safeParse(
1193
+ jsonString,
1194
+ (x) =>
1195
+ OpenResponsesNonStreamingResponseRoleUnion2$inboundSchema.parse(
1196
+ JSON.parse(x),
1197
+ ),
1198
+ `Failed to parse 'OpenResponsesNonStreamingResponseRoleUnion2' from JSON`,
1199
+ );
1200
+ }
1201
+
1202
+ /** @internal */
1203
+ export const OpenResponsesNonStreamingResponseContent3$inboundSchema: z.ZodType<
1204
+ OpenResponsesNonStreamingResponseContent3,
1205
+ z.ZodTypeDef,
1206
+ unknown
1207
+ > = z.union([
1208
+ ResponseInputText$inboundSchema.and(
1209
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1210
+ type: v.type,
1211
+ })),
1212
+ ),
1213
+ ResponseInputImage$inboundSchema.and(
1214
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1215
+ type: v.type,
1216
+ })),
1217
+ ),
1218
+ ResponseInputFile$inboundSchema.and(
1219
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1220
+ type: v.type,
1221
+ })),
1222
+ ),
1223
+ ]);
1224
+
1225
+ /** @internal */
1226
+ export type OpenResponsesNonStreamingResponseContent3$Outbound =
1227
+ | (ResponseInputText$Outbound & { type: "input_text" })
1228
+ | (ResponseInputImage$Outbound & { type: "input_image" })
1229
+ | (ResponseInputFile$Outbound & { type: "input_file" });
1230
+
1231
+ /** @internal */
1232
+ export const OpenResponsesNonStreamingResponseContent3$outboundSchema:
1233
+ z.ZodType<
1234
+ OpenResponsesNonStreamingResponseContent3$Outbound,
1235
+ z.ZodTypeDef,
1236
+ OpenResponsesNonStreamingResponseContent3
1237
+ > = z.union([
1238
+ ResponseInputText$outboundSchema.and(
1239
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1240
+ type: v.type,
1241
+ })),
1242
+ ),
1243
+ ResponseInputImage$outboundSchema.and(
1244
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1245
+ type: v.type,
1246
+ })),
1247
+ ),
1248
+ ResponseInputFile$outboundSchema.and(
1249
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1250
+ type: v.type,
1251
+ })),
1252
+ ),
1253
+ ]);
1254
+
1255
+ /**
1256
+ * @internal
1257
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1258
+ */
1259
+ export namespace OpenResponsesNonStreamingResponseContent3$ {
1260
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent3$inboundSchema` instead. */
1261
+ export const inboundSchema =
1262
+ OpenResponsesNonStreamingResponseContent3$inboundSchema;
1263
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent3$outboundSchema` instead. */
1264
+ export const outboundSchema =
1265
+ OpenResponsesNonStreamingResponseContent3$outboundSchema;
1266
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent3$Outbound` instead. */
1267
+ export type Outbound = OpenResponsesNonStreamingResponseContent3$Outbound;
1268
+ }
1269
+
1270
+ export function openResponsesNonStreamingResponseContent3ToJSON(
1271
+ openResponsesNonStreamingResponseContent3:
1272
+ OpenResponsesNonStreamingResponseContent3,
1273
+ ): string {
1274
+ return JSON.stringify(
1275
+ OpenResponsesNonStreamingResponseContent3$outboundSchema.parse(
1276
+ openResponsesNonStreamingResponseContent3,
1277
+ ),
1278
+ );
1279
+ }
1280
+
1281
+ export function openResponsesNonStreamingResponseContent3FromJSON(
1282
+ jsonString: string,
1283
+ ): SafeParseResult<
1284
+ OpenResponsesNonStreamingResponseContent3,
1285
+ SDKValidationError
1286
+ > {
1287
+ return safeParse(
1288
+ jsonString,
1289
+ (x) =>
1290
+ OpenResponsesNonStreamingResponseContent3$inboundSchema.parse(
1291
+ JSON.parse(x),
1292
+ ),
1293
+ `Failed to parse 'OpenResponsesNonStreamingResponseContent3' from JSON`,
1294
+ );
1295
+ }
1296
+
1297
+ /** @internal */
1298
+ export const InstructionsMessage2$inboundSchema: z.ZodType<
1299
+ InstructionsMessage2,
1300
+ z.ZodTypeDef,
1301
+ unknown
1302
+ > = z.object({
1303
+ id: z.string(),
1304
+ type: InstructionsTypeMessage2$inboundSchema.optional(),
1305
+ role: z.union([
1306
+ OpenResponsesNonStreamingResponseRoleUser2$inboundSchema,
1307
+ OpenResponsesNonStreamingResponseRoleSystem2$inboundSchema,
1308
+ OpenResponsesNonStreamingResponseRoleDeveloper2$inboundSchema,
1309
+ ]),
1310
+ content: z.array(
1311
+ z.union([
1312
+ ResponseInputText$inboundSchema.and(
1313
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1314
+ type: v.type,
1315
+ })),
1316
+ ),
1317
+ ResponseInputImage$inboundSchema.and(
1318
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1319
+ type: v.type,
1320
+ })),
1321
+ ),
1322
+ ResponseInputFile$inboundSchema.and(
1323
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1324
+ type: v.type,
1325
+ })),
1326
+ ),
1327
+ ]),
1328
+ ),
1329
+ });
1330
+
1331
+ /** @internal */
1332
+ export type InstructionsMessage2$Outbound = {
1333
+ id: string;
1334
+ type?: string | undefined;
1335
+ role: string | string | string;
1336
+ content: Array<
1337
+ | (ResponseInputText$Outbound & { type: "input_text" })
1338
+ | (ResponseInputImage$Outbound & { type: "input_image" })
1339
+ | (ResponseInputFile$Outbound & { type: "input_file" })
1340
+ >;
1341
+ };
1342
+
1343
+ /** @internal */
1344
+ export const InstructionsMessage2$outboundSchema: z.ZodType<
1345
+ InstructionsMessage2$Outbound,
1346
+ z.ZodTypeDef,
1347
+ InstructionsMessage2
1348
+ > = z.object({
1349
+ id: z.string(),
1350
+ type: InstructionsTypeMessage2$outboundSchema.optional(),
1351
+ role: z.union([
1352
+ OpenResponsesNonStreamingResponseRoleUser2$outboundSchema,
1353
+ OpenResponsesNonStreamingResponseRoleSystem2$outboundSchema,
1354
+ OpenResponsesNonStreamingResponseRoleDeveloper2$outboundSchema,
1355
+ ]),
1356
+ content: z.array(
1357
+ z.union([
1358
+ ResponseInputText$outboundSchema.and(
1359
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1360
+ type: v.type,
1361
+ })),
1362
+ ),
1363
+ ResponseInputImage$outboundSchema.and(
1364
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1365
+ type: v.type,
1366
+ })),
1367
+ ),
1368
+ ResponseInputFile$outboundSchema.and(
1369
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1370
+ type: v.type,
1371
+ })),
1372
+ ),
1373
+ ]),
1374
+ ),
1375
+ });
1376
+
1377
+ /**
1378
+ * @internal
1379
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1380
+ */
1381
+ export namespace InstructionsMessage2$ {
1382
+ /** @deprecated use `InstructionsMessage2$inboundSchema` instead. */
1383
+ export const inboundSchema = InstructionsMessage2$inboundSchema;
1384
+ /** @deprecated use `InstructionsMessage2$outboundSchema` instead. */
1385
+ export const outboundSchema = InstructionsMessage2$outboundSchema;
1386
+ /** @deprecated use `InstructionsMessage2$Outbound` instead. */
1387
+ export type Outbound = InstructionsMessage2$Outbound;
1388
+ }
1389
+
1390
+ export function instructionsMessage2ToJSON(
1391
+ instructionsMessage2: InstructionsMessage2,
1392
+ ): string {
1393
+ return JSON.stringify(
1394
+ InstructionsMessage2$outboundSchema.parse(instructionsMessage2),
1395
+ );
1396
+ }
1397
+
1398
+ export function instructionsMessage2FromJSON(
1399
+ jsonString: string,
1400
+ ): SafeParseResult<InstructionsMessage2, SDKValidationError> {
1401
+ return safeParse(
1402
+ jsonString,
1403
+ (x) => InstructionsMessage2$inboundSchema.parse(JSON.parse(x)),
1404
+ `Failed to parse 'InstructionsMessage2' from JSON`,
1405
+ );
1406
+ }
1407
+
1408
+ /** @internal */
1409
+ export const InstructionsTypeMessage1$inboundSchema: z.ZodNativeEnum<
1410
+ typeof InstructionsTypeMessage1
1411
+ > = z.nativeEnum(InstructionsTypeMessage1);
1412
+
1413
+ /** @internal */
1414
+ export const InstructionsTypeMessage1$outboundSchema: z.ZodNativeEnum<
1415
+ typeof InstructionsTypeMessage1
1416
+ > = InstructionsTypeMessage1$inboundSchema;
1417
+
1418
+ /**
1419
+ * @internal
1420
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1421
+ */
1422
+ export namespace InstructionsTypeMessage1$ {
1423
+ /** @deprecated use `InstructionsTypeMessage1$inboundSchema` instead. */
1424
+ export const inboundSchema = InstructionsTypeMessage1$inboundSchema;
1425
+ /** @deprecated use `InstructionsTypeMessage1$outboundSchema` instead. */
1426
+ export const outboundSchema = InstructionsTypeMessage1$outboundSchema;
1427
+ }
1428
+
1429
+ /** @internal */
1430
+ export const OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema:
1431
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleDeveloper1> = z
1432
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleDeveloper1);
1433
+
1434
+ /** @internal */
1435
+ export const OpenResponsesNonStreamingResponseRoleDeveloper1$outboundSchema:
1436
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleDeveloper1> =
1437
+ OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema;
1438
+
1439
+ /**
1440
+ * @internal
1441
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1442
+ */
1443
+ export namespace OpenResponsesNonStreamingResponseRoleDeveloper1$ {
1444
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema` instead. */
1445
+ export const inboundSchema =
1446
+ OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema;
1447
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleDeveloper1$outboundSchema` instead. */
1448
+ export const outboundSchema =
1449
+ OpenResponsesNonStreamingResponseRoleDeveloper1$outboundSchema;
1450
+ }
1451
+
1452
+ /** @internal */
1453
+ export const OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema:
1454
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleAssistant> = z
1455
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleAssistant);
1456
+
1457
+ /** @internal */
1458
+ export const OpenResponsesNonStreamingResponseRoleAssistant$outboundSchema:
1459
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleAssistant> =
1460
+ OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema;
1461
+
1462
+ /**
1463
+ * @internal
1464
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1465
+ */
1466
+ export namespace OpenResponsesNonStreamingResponseRoleAssistant$ {
1467
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema` instead. */
1468
+ export const inboundSchema =
1469
+ OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema;
1470
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleAssistant$outboundSchema` instead. */
1471
+ export const outboundSchema =
1472
+ OpenResponsesNonStreamingResponseRoleAssistant$outboundSchema;
1473
+ }
1474
+
1475
+ /** @internal */
1476
+ export const OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema:
1477
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleSystem1> = z
1478
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleSystem1);
1479
+
1480
+ /** @internal */
1481
+ export const OpenResponsesNonStreamingResponseRoleSystem1$outboundSchema:
1482
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleSystem1> =
1483
+ OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema;
1484
+
1485
+ /**
1486
+ * @internal
1487
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1488
+ */
1489
+ export namespace OpenResponsesNonStreamingResponseRoleSystem1$ {
1490
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema` instead. */
1491
+ export const inboundSchema =
1492
+ OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema;
1493
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleSystem1$outboundSchema` instead. */
1494
+ export const outboundSchema =
1495
+ OpenResponsesNonStreamingResponseRoleSystem1$outboundSchema;
1496
+ }
1497
+
1498
+ /** @internal */
1499
+ export const OpenResponsesNonStreamingResponseRoleUser1$inboundSchema:
1500
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleUser1> = z
1501
+ .nativeEnum(OpenResponsesNonStreamingResponseRoleUser1);
1502
+
1503
+ /** @internal */
1504
+ export const OpenResponsesNonStreamingResponseRoleUser1$outboundSchema:
1505
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseRoleUser1> =
1506
+ OpenResponsesNonStreamingResponseRoleUser1$inboundSchema;
1507
+
1508
+ /**
1509
+ * @internal
1510
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1511
+ */
1512
+ export namespace OpenResponsesNonStreamingResponseRoleUser1$ {
1513
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUser1$inboundSchema` instead. */
1514
+ export const inboundSchema =
1515
+ OpenResponsesNonStreamingResponseRoleUser1$inboundSchema;
1516
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUser1$outboundSchema` instead. */
1517
+ export const outboundSchema =
1518
+ OpenResponsesNonStreamingResponseRoleUser1$outboundSchema;
1519
+ }
1520
+
1521
+ /** @internal */
1522
+ export const OpenResponsesNonStreamingResponseRoleUnion1$inboundSchema:
1523
+ z.ZodType<
1524
+ OpenResponsesNonStreamingResponseRoleUnion1,
1525
+ z.ZodTypeDef,
1526
+ unknown
1527
+ > = z.union([
1528
+ OpenResponsesNonStreamingResponseRoleUser1$inboundSchema,
1529
+ OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema,
1530
+ OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema,
1531
+ OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema,
1532
+ ]);
1533
+
1534
+ /** @internal */
1535
+ export type OpenResponsesNonStreamingResponseRoleUnion1$Outbound =
1536
+ | string
1537
+ | string
1538
+ | string
1539
+ | string;
1540
+
1541
+ /** @internal */
1542
+ export const OpenResponsesNonStreamingResponseRoleUnion1$outboundSchema:
1543
+ z.ZodType<
1544
+ OpenResponsesNonStreamingResponseRoleUnion1$Outbound,
1545
+ z.ZodTypeDef,
1546
+ OpenResponsesNonStreamingResponseRoleUnion1
1547
+ > = z.union([
1548
+ OpenResponsesNonStreamingResponseRoleUser1$outboundSchema,
1549
+ OpenResponsesNonStreamingResponseRoleSystem1$outboundSchema,
1550
+ OpenResponsesNonStreamingResponseRoleAssistant$outboundSchema,
1551
+ OpenResponsesNonStreamingResponseRoleDeveloper1$outboundSchema,
1552
+ ]);
1553
+
1554
+ /**
1555
+ * @internal
1556
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1557
+ */
1558
+ export namespace OpenResponsesNonStreamingResponseRoleUnion1$ {
1559
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion1$inboundSchema` instead. */
1560
+ export const inboundSchema =
1561
+ OpenResponsesNonStreamingResponseRoleUnion1$inboundSchema;
1562
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion1$outboundSchema` instead. */
1563
+ export const outboundSchema =
1564
+ OpenResponsesNonStreamingResponseRoleUnion1$outboundSchema;
1565
+ /** @deprecated use `OpenResponsesNonStreamingResponseRoleUnion1$Outbound` instead. */
1566
+ export type Outbound = OpenResponsesNonStreamingResponseRoleUnion1$Outbound;
1567
+ }
1568
+
1569
+ export function openResponsesNonStreamingResponseRoleUnion1ToJSON(
1570
+ openResponsesNonStreamingResponseRoleUnion1:
1571
+ OpenResponsesNonStreamingResponseRoleUnion1,
1572
+ ): string {
1573
+ return JSON.stringify(
1574
+ OpenResponsesNonStreamingResponseRoleUnion1$outboundSchema.parse(
1575
+ openResponsesNonStreamingResponseRoleUnion1,
1576
+ ),
1577
+ );
1578
+ }
1579
+
1580
+ export function openResponsesNonStreamingResponseRoleUnion1FromJSON(
1581
+ jsonString: string,
1582
+ ): SafeParseResult<
1583
+ OpenResponsesNonStreamingResponseRoleUnion1,
1584
+ SDKValidationError
1585
+ > {
1586
+ return safeParse(
1587
+ jsonString,
1588
+ (x) =>
1589
+ OpenResponsesNonStreamingResponseRoleUnion1$inboundSchema.parse(
1590
+ JSON.parse(x),
1591
+ ),
1592
+ `Failed to parse 'OpenResponsesNonStreamingResponseRoleUnion1' from JSON`,
1593
+ );
1594
+ }
1595
+
1596
+ /** @internal */
1597
+ export const OpenResponsesNonStreamingResponseContent1$inboundSchema: z.ZodType<
1598
+ OpenResponsesNonStreamingResponseContent1,
1599
+ z.ZodTypeDef,
1600
+ unknown
1601
+ > = z.union([
1602
+ ResponseInputText$inboundSchema.and(
1603
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1604
+ type: v.type,
1605
+ })),
1606
+ ),
1607
+ ResponseInputImage$inboundSchema.and(
1608
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1609
+ type: v.type,
1610
+ })),
1611
+ ),
1612
+ ResponseInputFile$inboundSchema.and(
1613
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1614
+ type: v.type,
1615
+ })),
1616
+ ),
1617
+ ]);
1618
+
1619
+ /** @internal */
1620
+ export type OpenResponsesNonStreamingResponseContent1$Outbound =
1621
+ | (ResponseInputText$Outbound & { type: "input_text" })
1622
+ | (ResponseInputImage$Outbound & { type: "input_image" })
1623
+ | (ResponseInputFile$Outbound & { type: "input_file" });
1624
+
1625
+ /** @internal */
1626
+ export const OpenResponsesNonStreamingResponseContent1$outboundSchema:
1627
+ z.ZodType<
1628
+ OpenResponsesNonStreamingResponseContent1$Outbound,
1629
+ z.ZodTypeDef,
1630
+ OpenResponsesNonStreamingResponseContent1
1631
+ > = z.union([
1632
+ ResponseInputText$outboundSchema.and(
1633
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1634
+ type: v.type,
1635
+ })),
1636
+ ),
1637
+ ResponseInputImage$outboundSchema.and(
1638
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1639
+ type: v.type,
1640
+ })),
1641
+ ),
1642
+ ResponseInputFile$outboundSchema.and(
1643
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1644
+ type: v.type,
1645
+ })),
1646
+ ),
1647
+ ]);
1648
+
1649
+ /**
1650
+ * @internal
1651
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1652
+ */
1653
+ export namespace OpenResponsesNonStreamingResponseContent1$ {
1654
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent1$inboundSchema` instead. */
1655
+ export const inboundSchema =
1656
+ OpenResponsesNonStreamingResponseContent1$inboundSchema;
1657
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent1$outboundSchema` instead. */
1658
+ export const outboundSchema =
1659
+ OpenResponsesNonStreamingResponseContent1$outboundSchema;
1660
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent1$Outbound` instead. */
1661
+ export type Outbound = OpenResponsesNonStreamingResponseContent1$Outbound;
1662
+ }
1663
+
1664
+ export function openResponsesNonStreamingResponseContent1ToJSON(
1665
+ openResponsesNonStreamingResponseContent1:
1666
+ OpenResponsesNonStreamingResponseContent1,
1667
+ ): string {
1668
+ return JSON.stringify(
1669
+ OpenResponsesNonStreamingResponseContent1$outboundSchema.parse(
1670
+ openResponsesNonStreamingResponseContent1,
1671
+ ),
1672
+ );
1673
+ }
1674
+
1675
+ export function openResponsesNonStreamingResponseContent1FromJSON(
1676
+ jsonString: string,
1677
+ ): SafeParseResult<
1678
+ OpenResponsesNonStreamingResponseContent1,
1679
+ SDKValidationError
1680
+ > {
1681
+ return safeParse(
1682
+ jsonString,
1683
+ (x) =>
1684
+ OpenResponsesNonStreamingResponseContent1$inboundSchema.parse(
1685
+ JSON.parse(x),
1686
+ ),
1687
+ `Failed to parse 'OpenResponsesNonStreamingResponseContent1' from JSON`,
1688
+ );
1689
+ }
1690
+
1691
+ /** @internal */
1692
+ export const OpenResponsesNonStreamingResponseContent2$inboundSchema: z.ZodType<
1693
+ OpenResponsesNonStreamingResponseContent2,
1694
+ z.ZodTypeDef,
1695
+ unknown
1696
+ > = z.union([
1697
+ z.array(
1698
+ z.union([
1699
+ ResponseInputText$inboundSchema.and(
1700
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1701
+ type: v.type,
1702
+ })),
1703
+ ),
1704
+ ResponseInputImage$inboundSchema.and(
1705
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1706
+ type: v.type,
1707
+ })),
1708
+ ),
1709
+ ResponseInputFile$inboundSchema.and(
1710
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1711
+ type: v.type,
1712
+ })),
1713
+ ),
1714
+ ]),
1715
+ ),
1716
+ z.string(),
1717
+ ]);
1718
+
1719
+ /** @internal */
1720
+ export type OpenResponsesNonStreamingResponseContent2$Outbound =
1721
+ | Array<
1722
+ | (ResponseInputText$Outbound & { type: "input_text" })
1723
+ | (ResponseInputImage$Outbound & { type: "input_image" })
1724
+ | (ResponseInputFile$Outbound & { type: "input_file" })
1725
+ >
1726
+ | string;
1727
+
1728
+ /** @internal */
1729
+ export const OpenResponsesNonStreamingResponseContent2$outboundSchema:
1730
+ z.ZodType<
1731
+ OpenResponsesNonStreamingResponseContent2$Outbound,
1732
+ z.ZodTypeDef,
1733
+ OpenResponsesNonStreamingResponseContent2
1734
+ > = z.union([
1735
+ z.array(
1736
+ z.union([
1737
+ ResponseInputText$outboundSchema.and(
1738
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1739
+ type: v.type,
1740
+ })),
1741
+ ),
1742
+ ResponseInputImage$outboundSchema.and(
1743
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1744
+ type: v.type,
1745
+ })),
1746
+ ),
1747
+ ResponseInputFile$outboundSchema.and(
1748
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1749
+ type: v.type,
1750
+ })),
1751
+ ),
1752
+ ]),
1753
+ ),
1754
+ z.string(),
1755
+ ]);
1756
+
1757
+ /**
1758
+ * @internal
1759
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1760
+ */
1761
+ export namespace OpenResponsesNonStreamingResponseContent2$ {
1762
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent2$inboundSchema` instead. */
1763
+ export const inboundSchema =
1764
+ OpenResponsesNonStreamingResponseContent2$inboundSchema;
1765
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent2$outboundSchema` instead. */
1766
+ export const outboundSchema =
1767
+ OpenResponsesNonStreamingResponseContent2$outboundSchema;
1768
+ /** @deprecated use `OpenResponsesNonStreamingResponseContent2$Outbound` instead. */
1769
+ export type Outbound = OpenResponsesNonStreamingResponseContent2$Outbound;
1770
+ }
1771
+
1772
+ export function openResponsesNonStreamingResponseContent2ToJSON(
1773
+ openResponsesNonStreamingResponseContent2:
1774
+ OpenResponsesNonStreamingResponseContent2,
1775
+ ): string {
1776
+ return JSON.stringify(
1777
+ OpenResponsesNonStreamingResponseContent2$outboundSchema.parse(
1778
+ openResponsesNonStreamingResponseContent2,
1779
+ ),
1780
+ );
1781
+ }
1782
+
1783
+ export function openResponsesNonStreamingResponseContent2FromJSON(
1784
+ jsonString: string,
1785
+ ): SafeParseResult<
1786
+ OpenResponsesNonStreamingResponseContent2,
1787
+ SDKValidationError
1788
+ > {
1789
+ return safeParse(
1790
+ jsonString,
1791
+ (x) =>
1792
+ OpenResponsesNonStreamingResponseContent2$inboundSchema.parse(
1793
+ JSON.parse(x),
1794
+ ),
1795
+ `Failed to parse 'OpenResponsesNonStreamingResponseContent2' from JSON`,
1796
+ );
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const InstructionsMessage1$inboundSchema: z.ZodType<
1801
+ InstructionsMessage1,
1802
+ z.ZodTypeDef,
1803
+ unknown
1804
+ > = z.object({
1805
+ type: InstructionsTypeMessage1$inboundSchema.optional(),
1806
+ role: z.union([
1807
+ OpenResponsesNonStreamingResponseRoleUser1$inboundSchema,
1808
+ OpenResponsesNonStreamingResponseRoleSystem1$inboundSchema,
1809
+ OpenResponsesNonStreamingResponseRoleAssistant$inboundSchema,
1810
+ OpenResponsesNonStreamingResponseRoleDeveloper1$inboundSchema,
1811
+ ]),
1812
+ content: z.union([
1813
+ z.array(
1814
+ z.union([
1815
+ ResponseInputText$inboundSchema.and(
1816
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1817
+ type: v.type,
1818
+ })),
1819
+ ),
1820
+ ResponseInputImage$inboundSchema.and(
1821
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1822
+ type: v.type,
1823
+ })),
1824
+ ),
1825
+ ResponseInputFile$inboundSchema.and(
1826
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1827
+ type: v.type,
1828
+ })),
1829
+ ),
1830
+ ]),
1831
+ ),
1832
+ z.string(),
1833
+ ]),
1834
+ });
1835
+
1836
+ /** @internal */
1837
+ export type InstructionsMessage1$Outbound = {
1838
+ type?: string | undefined;
1839
+ role: string | string | string | string;
1840
+ content:
1841
+ | Array<
1842
+ | (ResponseInputText$Outbound & { type: "input_text" })
1843
+ | (ResponseInputImage$Outbound & { type: "input_image" })
1844
+ | (ResponseInputFile$Outbound & { type: "input_file" })
1845
+ >
1846
+ | string;
1847
+ };
1848
+
1849
+ /** @internal */
1850
+ export const InstructionsMessage1$outboundSchema: z.ZodType<
1851
+ InstructionsMessage1$Outbound,
1852
+ z.ZodTypeDef,
1853
+ InstructionsMessage1
1854
+ > = z.object({
1855
+ type: InstructionsTypeMessage1$outboundSchema.optional(),
1856
+ role: z.union([
1857
+ OpenResponsesNonStreamingResponseRoleUser1$outboundSchema,
1858
+ OpenResponsesNonStreamingResponseRoleSystem1$outboundSchema,
1859
+ OpenResponsesNonStreamingResponseRoleAssistant$outboundSchema,
1860
+ OpenResponsesNonStreamingResponseRoleDeveloper1$outboundSchema,
1861
+ ]),
1862
+ content: z.union([
1863
+ z.array(
1864
+ z.union([
1865
+ ResponseInputText$outboundSchema.and(
1866
+ z.object({ type: z.literal("input_text") }).transform((v) => ({
1867
+ type: v.type,
1868
+ })),
1869
+ ),
1870
+ ResponseInputImage$outboundSchema.and(
1871
+ z.object({ type: z.literal("input_image") }).transform((v) => ({
1872
+ type: v.type,
1873
+ })),
1874
+ ),
1875
+ ResponseInputFile$outboundSchema.and(
1876
+ z.object({ type: z.literal("input_file") }).transform((v) => ({
1877
+ type: v.type,
1878
+ })),
1879
+ ),
1880
+ ]),
1881
+ ),
1882
+ z.string(),
1883
+ ]),
1884
+ });
1885
+
1886
+ /**
1887
+ * @internal
1888
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1889
+ */
1890
+ export namespace InstructionsMessage1$ {
1891
+ /** @deprecated use `InstructionsMessage1$inboundSchema` instead. */
1892
+ export const inboundSchema = InstructionsMessage1$inboundSchema;
1893
+ /** @deprecated use `InstructionsMessage1$outboundSchema` instead. */
1894
+ export const outboundSchema = InstructionsMessage1$outboundSchema;
1895
+ /** @deprecated use `InstructionsMessage1$Outbound` instead. */
1896
+ export type Outbound = InstructionsMessage1$Outbound;
1897
+ }
1898
+
1899
+ export function instructionsMessage1ToJSON(
1900
+ instructionsMessage1: InstructionsMessage1,
1901
+ ): string {
1902
+ return JSON.stringify(
1903
+ InstructionsMessage1$outboundSchema.parse(instructionsMessage1),
1904
+ );
1905
+ }
1906
+
1907
+ export function instructionsMessage1FromJSON(
1908
+ jsonString: string,
1909
+ ): SafeParseResult<InstructionsMessage1, SDKValidationError> {
1910
+ return safeParse(
1911
+ jsonString,
1912
+ (x) => InstructionsMessage1$inboundSchema.parse(JSON.parse(x)),
1913
+ `Failed to parse 'InstructionsMessage1' from JSON`,
1914
+ );
1915
+ }
1916
+
1917
+ /** @internal */
1918
+ export const InstructionsUnion1$inboundSchema: z.ZodType<
1919
+ InstructionsUnion1,
1920
+ z.ZodTypeDef,
1921
+ unknown
1922
+ > = z.union([
1923
+ z.lazy(() => InstructionsFunctionCallOutput$inboundSchema),
1924
+ z.lazy(() => InstructionsFunctionCall$inboundSchema),
1925
+ OutputItemImageGenerationCall$inboundSchema,
1926
+ OutputMessage$inboundSchema,
1927
+ z.lazy(() => InstructionsMessage2$inboundSchema),
1928
+ z.lazy(() => InstructionsMessage1$inboundSchema),
1929
+ ]);
1930
+
1931
+ /** @internal */
1932
+ export type InstructionsUnion1$Outbound =
1933
+ | InstructionsFunctionCallOutput$Outbound
1934
+ | InstructionsFunctionCall$Outbound
1935
+ | OutputItemImageGenerationCall$Outbound
1936
+ | OutputMessage$Outbound
1937
+ | InstructionsMessage2$Outbound
1938
+ | InstructionsMessage1$Outbound;
1939
+
1940
+ /** @internal */
1941
+ export const InstructionsUnion1$outboundSchema: z.ZodType<
1942
+ InstructionsUnion1$Outbound,
1943
+ z.ZodTypeDef,
1944
+ InstructionsUnion1
1945
+ > = z.union([
1946
+ z.lazy(() => InstructionsFunctionCallOutput$outboundSchema),
1947
+ z.lazy(() => InstructionsFunctionCall$outboundSchema),
1948
+ OutputItemImageGenerationCall$outboundSchema,
1949
+ OutputMessage$outboundSchema,
1950
+ z.lazy(() => InstructionsMessage2$outboundSchema),
1951
+ z.lazy(() => InstructionsMessage1$outboundSchema),
1952
+ ]);
1953
+
1954
+ /**
1955
+ * @internal
1956
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1957
+ */
1958
+ export namespace InstructionsUnion1$ {
1959
+ /** @deprecated use `InstructionsUnion1$inboundSchema` instead. */
1960
+ export const inboundSchema = InstructionsUnion1$inboundSchema;
1961
+ /** @deprecated use `InstructionsUnion1$outboundSchema` instead. */
1962
+ export const outboundSchema = InstructionsUnion1$outboundSchema;
1963
+ /** @deprecated use `InstructionsUnion1$Outbound` instead. */
1964
+ export type Outbound = InstructionsUnion1$Outbound;
1965
+ }
1966
+
1967
+ export function instructionsUnion1ToJSON(
1968
+ instructionsUnion1: InstructionsUnion1,
1969
+ ): string {
1970
+ return JSON.stringify(
1971
+ InstructionsUnion1$outboundSchema.parse(instructionsUnion1),
1972
+ );
1973
+ }
1974
+
1975
+ export function instructionsUnion1FromJSON(
1976
+ jsonString: string,
1977
+ ): SafeParseResult<InstructionsUnion1, SDKValidationError> {
1978
+ return safeParse(
1979
+ jsonString,
1980
+ (x) => InstructionsUnion1$inboundSchema.parse(JSON.parse(x)),
1981
+ `Failed to parse 'InstructionsUnion1' from JSON`,
1982
+ );
1983
+ }
1984
+
1985
+ /** @internal */
1986
+ export const InstructionsUnion2$inboundSchema: z.ZodType<
1987
+ InstructionsUnion2,
1988
+ z.ZodTypeDef,
1989
+ unknown
1990
+ > = z.union([
1991
+ z.string(),
1992
+ z.array(z.union([
1993
+ z.lazy(() => InstructionsFunctionCallOutput$inboundSchema),
1994
+ z.lazy(() => InstructionsFunctionCall$inboundSchema),
1995
+ OutputItemImageGenerationCall$inboundSchema,
1996
+ OutputMessage$inboundSchema,
1997
+ z.lazy(() => InstructionsMessage2$inboundSchema),
1998
+ z.lazy(() => InstructionsMessage1$inboundSchema),
1999
+ ])),
2000
+ z.any(),
2001
+ ]);
2002
+
2003
+ /** @internal */
2004
+ export type InstructionsUnion2$Outbound =
2005
+ | string
2006
+ | Array<
2007
+ | InstructionsFunctionCallOutput$Outbound
2008
+ | InstructionsFunctionCall$Outbound
2009
+ | OutputItemImageGenerationCall$Outbound
2010
+ | OutputMessage$Outbound
2011
+ | InstructionsMessage2$Outbound
2012
+ | InstructionsMessage1$Outbound
2013
+ >
2014
+ | any;
2015
+
2016
+ /** @internal */
2017
+ export const InstructionsUnion2$outboundSchema: z.ZodType<
2018
+ InstructionsUnion2$Outbound,
2019
+ z.ZodTypeDef,
2020
+ InstructionsUnion2
2021
+ > = z.union([
2022
+ z.string(),
2023
+ z.array(z.union([
2024
+ z.lazy(() => InstructionsFunctionCallOutput$outboundSchema),
2025
+ z.lazy(() => InstructionsFunctionCall$outboundSchema),
2026
+ OutputItemImageGenerationCall$outboundSchema,
2027
+ OutputMessage$outboundSchema,
2028
+ z.lazy(() => InstructionsMessage2$outboundSchema),
2029
+ z.lazy(() => InstructionsMessage1$outboundSchema),
2030
+ ])),
2031
+ z.any(),
2032
+ ]);
2033
+
2034
+ /**
2035
+ * @internal
2036
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2037
+ */
2038
+ export namespace InstructionsUnion2$ {
2039
+ /** @deprecated use `InstructionsUnion2$inboundSchema` instead. */
2040
+ export const inboundSchema = InstructionsUnion2$inboundSchema;
2041
+ /** @deprecated use `InstructionsUnion2$outboundSchema` instead. */
2042
+ export const outboundSchema = InstructionsUnion2$outboundSchema;
2043
+ /** @deprecated use `InstructionsUnion2$Outbound` instead. */
2044
+ export type Outbound = InstructionsUnion2$Outbound;
2045
+ }
2046
+
2047
+ export function instructionsUnion2ToJSON(
2048
+ instructionsUnion2: InstructionsUnion2,
2049
+ ): string {
2050
+ return JSON.stringify(
2051
+ InstructionsUnion2$outboundSchema.parse(instructionsUnion2),
2052
+ );
2053
+ }
2054
+
2055
+ export function instructionsUnion2FromJSON(
2056
+ jsonString: string,
2057
+ ): SafeParseResult<InstructionsUnion2, SDKValidationError> {
2058
+ return safeParse(
2059
+ jsonString,
2060
+ (x) => InstructionsUnion2$inboundSchema.parse(JSON.parse(x)),
2061
+ `Failed to parse 'InstructionsUnion2' from JSON`,
2062
+ );
2063
+ }
2064
+
2065
+ /** @internal */
2066
+ export const OpenResponsesNonStreamingResponseToolType$inboundSchema:
2067
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolType> = z
2068
+ .nativeEnum(OpenResponsesNonStreamingResponseToolType);
2069
+
2070
+ /** @internal */
2071
+ export const OpenResponsesNonStreamingResponseToolType$outboundSchema:
2072
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolType> =
2073
+ OpenResponsesNonStreamingResponseToolType$inboundSchema;
2074
+
2075
+ /**
2076
+ * @internal
2077
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2078
+ */
2079
+ export namespace OpenResponsesNonStreamingResponseToolType$ {
2080
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolType$inboundSchema` instead. */
2081
+ export const inboundSchema =
2082
+ OpenResponsesNonStreamingResponseToolType$inboundSchema;
2083
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolType$outboundSchema` instead. */
2084
+ export const outboundSchema =
2085
+ OpenResponsesNonStreamingResponseToolType$outboundSchema;
2086
+ }
2087
+
2088
+ /** @internal */
2089
+ export const OpenResponsesNonStreamingResponseToolFunction$inboundSchema:
2090
+ z.ZodType<
2091
+ OpenResponsesNonStreamingResponseToolFunction,
2092
+ z.ZodTypeDef,
2093
+ unknown
2094
+ > = z.object({
2095
+ type: OpenResponsesNonStreamingResponseToolType$inboundSchema,
2096
+ name: z.string(),
2097
+ description: z.nullable(z.string()).optional(),
2098
+ strict: z.nullable(z.boolean()).optional(),
2099
+ parameters: z.nullable(z.record(z.nullable(z.any()))),
2100
+ });
2101
+
2102
+ /** @internal */
2103
+ export type OpenResponsesNonStreamingResponseToolFunction$Outbound = {
2104
+ type: string;
2105
+ name: string;
2106
+ description?: string | null | undefined;
2107
+ strict?: boolean | null | undefined;
2108
+ parameters: { [k: string]: any | null } | null;
2109
+ };
2110
+
2111
+ /** @internal */
2112
+ export const OpenResponsesNonStreamingResponseToolFunction$outboundSchema:
2113
+ z.ZodType<
2114
+ OpenResponsesNonStreamingResponseToolFunction$Outbound,
2115
+ z.ZodTypeDef,
2116
+ OpenResponsesNonStreamingResponseToolFunction
2117
+ > = z.object({
2118
+ type: OpenResponsesNonStreamingResponseToolType$outboundSchema,
2119
+ name: z.string(),
2120
+ description: z.nullable(z.string()).optional(),
2121
+ strict: z.nullable(z.boolean()).optional(),
2122
+ parameters: z.nullable(z.record(z.nullable(z.any()))),
2123
+ });
2124
+
2125
+ /**
2126
+ * @internal
2127
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2128
+ */
2129
+ export namespace OpenResponsesNonStreamingResponseToolFunction$ {
2130
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$inboundSchema` instead. */
2131
+ export const inboundSchema =
2132
+ OpenResponsesNonStreamingResponseToolFunction$inboundSchema;
2133
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$outboundSchema` instead. */
2134
+ export const outboundSchema =
2135
+ OpenResponsesNonStreamingResponseToolFunction$outboundSchema;
2136
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$Outbound` instead. */
2137
+ export type Outbound = OpenResponsesNonStreamingResponseToolFunction$Outbound;
2138
+ }
2139
+
2140
+ export function openResponsesNonStreamingResponseToolFunctionToJSON(
2141
+ openResponsesNonStreamingResponseToolFunction:
2142
+ OpenResponsesNonStreamingResponseToolFunction,
2143
+ ): string {
2144
+ return JSON.stringify(
2145
+ OpenResponsesNonStreamingResponseToolFunction$outboundSchema.parse(
2146
+ openResponsesNonStreamingResponseToolFunction,
2147
+ ),
2148
+ );
2149
+ }
2150
+
2151
+ export function openResponsesNonStreamingResponseToolFunctionFromJSON(
2152
+ jsonString: string,
2153
+ ): SafeParseResult<
2154
+ OpenResponsesNonStreamingResponseToolFunction,
2155
+ SDKValidationError
2156
+ > {
2157
+ return safeParse(
2158
+ jsonString,
2159
+ (x) =>
2160
+ OpenResponsesNonStreamingResponseToolFunction$inboundSchema.parse(
2161
+ JSON.parse(x),
2162
+ ),
2163
+ `Failed to parse 'OpenResponsesNonStreamingResponseToolFunction' from JSON`,
2164
+ );
2165
+ }
2166
+
2167
+ /** @internal */
2168
+ export const OpenResponsesNonStreamingResponseToolUnion$inboundSchema:
2169
+ z.ZodType<OpenResponsesNonStreamingResponseToolUnion, z.ZodTypeDef, unknown> =
2170
+ z.union([
2171
+ z.lazy(() => OpenResponsesNonStreamingResponseToolFunction$inboundSchema),
2172
+ OpenResponsesWebSearchPreviewTool$inboundSchema,
2173
+ OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
2174
+ OpenResponsesWebSearchTool$inboundSchema,
2175
+ OpenResponsesWebSearch20250826Tool$inboundSchema,
2176
+ ]);
2177
+
2178
+ /** @internal */
2179
+ export type OpenResponsesNonStreamingResponseToolUnion$Outbound =
2180
+ | OpenResponsesNonStreamingResponseToolFunction$Outbound
2181
+ | OpenResponsesWebSearchPreviewTool$Outbound
2182
+ | OpenResponsesWebSearchPreview20250311Tool$Outbound
2183
+ | OpenResponsesWebSearchTool$Outbound
2184
+ | OpenResponsesWebSearch20250826Tool$Outbound;
2185
+
2186
+ /** @internal */
2187
+ export const OpenResponsesNonStreamingResponseToolUnion$outboundSchema:
2188
+ z.ZodType<
2189
+ OpenResponsesNonStreamingResponseToolUnion$Outbound,
2190
+ z.ZodTypeDef,
2191
+ OpenResponsesNonStreamingResponseToolUnion
2192
+ > = z.union([
2193
+ z.lazy(() => OpenResponsesNonStreamingResponseToolFunction$outboundSchema),
2194
+ OpenResponsesWebSearchPreviewTool$outboundSchema,
2195
+ OpenResponsesWebSearchPreview20250311Tool$outboundSchema,
2196
+ OpenResponsesWebSearchTool$outboundSchema,
2197
+ OpenResponsesWebSearch20250826Tool$outboundSchema,
2198
+ ]);
2199
+
2200
+ /**
2201
+ * @internal
2202
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2203
+ */
2204
+ export namespace OpenResponsesNonStreamingResponseToolUnion$ {
2205
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$inboundSchema` instead. */
2206
+ export const inboundSchema =
2207
+ OpenResponsesNonStreamingResponseToolUnion$inboundSchema;
2208
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$outboundSchema` instead. */
2209
+ export const outboundSchema =
2210
+ OpenResponsesNonStreamingResponseToolUnion$outboundSchema;
2211
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$Outbound` instead. */
2212
+ export type Outbound = OpenResponsesNonStreamingResponseToolUnion$Outbound;
2213
+ }
2214
+
2215
+ export function openResponsesNonStreamingResponseToolUnionToJSON(
2216
+ openResponsesNonStreamingResponseToolUnion:
2217
+ OpenResponsesNonStreamingResponseToolUnion,
2218
+ ): string {
2219
+ return JSON.stringify(
2220
+ OpenResponsesNonStreamingResponseToolUnion$outboundSchema.parse(
2221
+ openResponsesNonStreamingResponseToolUnion,
2222
+ ),
2223
+ );
2224
+ }
2225
+
2226
+ export function openResponsesNonStreamingResponseToolUnionFromJSON(
2227
+ jsonString: string,
2228
+ ): SafeParseResult<
2229
+ OpenResponsesNonStreamingResponseToolUnion,
2230
+ SDKValidationError
2231
+ > {
2232
+ return safeParse(
2233
+ jsonString,
2234
+ (x) =>
2235
+ OpenResponsesNonStreamingResponseToolUnion$inboundSchema.parse(
2236
+ JSON.parse(x),
2237
+ ),
2238
+ `Failed to parse 'OpenResponsesNonStreamingResponseToolUnion' from JSON`,
2239
+ );
2240
+ }
2241
+
2242
+ /** @internal */
2243
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema:
2244
+ z.ZodNativeEnum<
2245
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview
2246
+ > = z.nativeEnum(OpenResponsesNonStreamingResponseTypeWebSearchPreview);
2247
+
2248
+ /** @internal */
2249
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview$outboundSchema:
2250
+ z.ZodNativeEnum<
2251
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview
2252
+ > = OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema;
2253
+
2254
+ /**
2255
+ * @internal
2256
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2257
+ */
2258
+ export namespace OpenResponsesNonStreamingResponseTypeWebSearchPreview$ {
2259
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema` instead. */
2260
+ export const inboundSchema =
2261
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema;
2262
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeWebSearchPreview$outboundSchema` instead. */
2263
+ export const outboundSchema =
2264
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$outboundSchema;
2265
+ }
2266
+
2267
+ /** @internal */
2268
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema:
2269
+ z.ZodNativeEnum<
2270
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311
2271
+ > = z.nativeEnum(
2272
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311,
2273
+ );
2274
+
2275
+ /** @internal */
2276
+ export const OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$outboundSchema:
2277
+ z.ZodNativeEnum<
2278
+ typeof OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311
2279
+ > =
2280
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema;
2281
+
2282
+ /**
2283
+ * @internal
2284
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2285
+ */
2286
+ export namespace OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$ {
2287
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema` instead. */
2288
+ export const inboundSchema =
2289
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema;
2290
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$outboundSchema` instead. */
2291
+ export const outboundSchema =
2292
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$outboundSchema;
2293
+ }
2294
+
2295
+ /** @internal */
2296
+ export const OpenResponsesNonStreamingResponseTypeUnion$inboundSchema:
2297
+ z.ZodType<OpenResponsesNonStreamingResponseTypeUnion, z.ZodTypeDef, unknown> =
2298
+ z.union([
2299
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema,
2300
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema,
2301
+ ]);
2302
+
2303
+ /** @internal */
2304
+ export type OpenResponsesNonStreamingResponseTypeUnion$Outbound =
2305
+ | string
2306
+ | string;
2307
+
2308
+ /** @internal */
2309
+ export const OpenResponsesNonStreamingResponseTypeUnion$outboundSchema:
2310
+ z.ZodType<
2311
+ OpenResponsesNonStreamingResponseTypeUnion$Outbound,
2312
+ z.ZodTypeDef,
2313
+ OpenResponsesNonStreamingResponseTypeUnion
2314
+ > = z.union([
2315
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$outboundSchema,
2316
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$outboundSchema,
2317
+ ]);
2318
+
2319
+ /**
2320
+ * @internal
2321
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2322
+ */
2323
+ export namespace OpenResponsesNonStreamingResponseTypeUnion$ {
2324
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeUnion$inboundSchema` instead. */
2325
+ export const inboundSchema =
2326
+ OpenResponsesNonStreamingResponseTypeUnion$inboundSchema;
2327
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeUnion$outboundSchema` instead. */
2328
+ export const outboundSchema =
2329
+ OpenResponsesNonStreamingResponseTypeUnion$outboundSchema;
2330
+ /** @deprecated use `OpenResponsesNonStreamingResponseTypeUnion$Outbound` instead. */
2331
+ export type Outbound = OpenResponsesNonStreamingResponseTypeUnion$Outbound;
2332
+ }
2333
+
2334
+ export function openResponsesNonStreamingResponseTypeUnionToJSON(
2335
+ openResponsesNonStreamingResponseTypeUnion:
2336
+ OpenResponsesNonStreamingResponseTypeUnion,
2337
+ ): string {
2338
+ return JSON.stringify(
2339
+ OpenResponsesNonStreamingResponseTypeUnion$outboundSchema.parse(
2340
+ openResponsesNonStreamingResponseTypeUnion,
2341
+ ),
2342
+ );
2343
+ }
2344
+
2345
+ export function openResponsesNonStreamingResponseTypeUnionFromJSON(
2346
+ jsonString: string,
2347
+ ): SafeParseResult<
2348
+ OpenResponsesNonStreamingResponseTypeUnion,
2349
+ SDKValidationError
2350
+ > {
2351
+ return safeParse(
2352
+ jsonString,
2353
+ (x) =>
2354
+ OpenResponsesNonStreamingResponseTypeUnion$inboundSchema.parse(
2355
+ JSON.parse(x),
2356
+ ),
2357
+ `Failed to parse 'OpenResponsesNonStreamingResponseTypeUnion' from JSON`,
2358
+ );
2359
+ }
2360
+
2361
+ /** @internal */
2362
+ export const OpenResponsesNonStreamingResponseToolChoice$inboundSchema:
2363
+ z.ZodType<
2364
+ OpenResponsesNonStreamingResponseToolChoice,
2365
+ z.ZodTypeDef,
2366
+ unknown
2367
+ > = z.object({
2368
+ type: z.union([
2369
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$inboundSchema,
2370
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$inboundSchema,
2371
+ ]),
2372
+ });
2373
+
2374
+ /** @internal */
2375
+ export type OpenResponsesNonStreamingResponseToolChoice$Outbound = {
2376
+ type: string | string;
2377
+ };
2378
+
2379
+ /** @internal */
2380
+ export const OpenResponsesNonStreamingResponseToolChoice$outboundSchema:
2381
+ z.ZodType<
2382
+ OpenResponsesNonStreamingResponseToolChoice$Outbound,
2383
+ z.ZodTypeDef,
2384
+ OpenResponsesNonStreamingResponseToolChoice
2385
+ > = z.object({
2386
+ type: z.union([
2387
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview20250311$outboundSchema,
2388
+ OpenResponsesNonStreamingResponseTypeWebSearchPreview$outboundSchema,
2389
+ ]),
2390
+ });
2391
+
2392
+ /**
2393
+ * @internal
2394
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2395
+ */
2396
+ export namespace OpenResponsesNonStreamingResponseToolChoice$ {
2397
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoice$inboundSchema` instead. */
2398
+ export const inboundSchema =
2399
+ OpenResponsesNonStreamingResponseToolChoice$inboundSchema;
2400
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoice$outboundSchema` instead. */
2401
+ export const outboundSchema =
2402
+ OpenResponsesNonStreamingResponseToolChoice$outboundSchema;
2403
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoice$Outbound` instead. */
2404
+ export type Outbound = OpenResponsesNonStreamingResponseToolChoice$Outbound;
2405
+ }
2406
+
2407
+ export function openResponsesNonStreamingResponseToolChoiceToJSON(
2408
+ openResponsesNonStreamingResponseToolChoice:
2409
+ OpenResponsesNonStreamingResponseToolChoice,
2410
+ ): string {
2411
+ return JSON.stringify(
2412
+ OpenResponsesNonStreamingResponseToolChoice$outboundSchema.parse(
2413
+ openResponsesNonStreamingResponseToolChoice,
2414
+ ),
2415
+ );
2416
+ }
2417
+
2418
+ export function openResponsesNonStreamingResponseToolChoiceFromJSON(
2419
+ jsonString: string,
2420
+ ): SafeParseResult<
2421
+ OpenResponsesNonStreamingResponseToolChoice,
2422
+ SDKValidationError
2423
+ > {
2424
+ return safeParse(
2425
+ jsonString,
2426
+ (x) =>
2427
+ OpenResponsesNonStreamingResponseToolChoice$inboundSchema.parse(
2428
+ JSON.parse(x),
2429
+ ),
2430
+ `Failed to parse 'OpenResponsesNonStreamingResponseToolChoice' from JSON`,
2431
+ );
2432
+ }
2433
+
2434
+ /** @internal */
2435
+ export const OpenResponsesNonStreamingResponseToolChoiceTypeFunction$inboundSchema:
2436
+ z.ZodNativeEnum<
2437
+ typeof OpenResponsesNonStreamingResponseToolChoiceTypeFunction
2438
+ > = z.nativeEnum(OpenResponsesNonStreamingResponseToolChoiceTypeFunction);
2439
+
2440
+ /** @internal */
2441
+ export const OpenResponsesNonStreamingResponseToolChoiceTypeFunction$outboundSchema:
2442
+ z.ZodNativeEnum<
2443
+ typeof OpenResponsesNonStreamingResponseToolChoiceTypeFunction
2444
+ > = OpenResponsesNonStreamingResponseToolChoiceTypeFunction$inboundSchema;
2445
+
2446
+ /**
2447
+ * @internal
2448
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2449
+ */
2450
+ export namespace OpenResponsesNonStreamingResponseToolChoiceTypeFunction$ {
2451
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceTypeFunction$inboundSchema` instead. */
2452
+ export const inboundSchema =
2453
+ OpenResponsesNonStreamingResponseToolChoiceTypeFunction$inboundSchema;
2454
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceTypeFunction$outboundSchema` instead. */
2455
+ export const outboundSchema =
2456
+ OpenResponsesNonStreamingResponseToolChoiceTypeFunction$outboundSchema;
2457
+ }
2458
+
2459
+ /** @internal */
2460
+ export const OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema:
2461
+ z.ZodType<
2462
+ OpenResponsesNonStreamingResponseToolChoiceFunction,
2463
+ z.ZodTypeDef,
2464
+ unknown
2465
+ > = z.object({
2466
+ type: OpenResponsesNonStreamingResponseToolChoiceTypeFunction$inboundSchema,
2467
+ name: z.string(),
2468
+ });
2469
+
2470
+ /** @internal */
2471
+ export type OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound = {
2472
+ type: string;
2473
+ name: string;
2474
+ };
2475
+
2476
+ /** @internal */
2477
+ export const OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema:
2478
+ z.ZodType<
2479
+ OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound,
2480
+ z.ZodTypeDef,
2481
+ OpenResponsesNonStreamingResponseToolChoiceFunction
2482
+ > = z.object({
2483
+ type:
2484
+ OpenResponsesNonStreamingResponseToolChoiceTypeFunction$outboundSchema,
2485
+ name: z.string(),
2486
+ });
2487
+
2488
+ /**
2489
+ * @internal
2490
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2491
+ */
2492
+ export namespace OpenResponsesNonStreamingResponseToolChoiceFunction$ {
2493
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema` instead. */
2494
+ export const inboundSchema =
2495
+ OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema;
2496
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema` instead. */
2497
+ export const outboundSchema =
2498
+ OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema;
2499
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound` instead. */
2500
+ export type Outbound =
2501
+ OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound;
2502
+ }
2503
+
2504
+ export function openResponsesNonStreamingResponseToolChoiceFunctionToJSON(
2505
+ openResponsesNonStreamingResponseToolChoiceFunction:
2506
+ OpenResponsesNonStreamingResponseToolChoiceFunction,
2507
+ ): string {
2508
+ return JSON.stringify(
2509
+ OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema.parse(
2510
+ openResponsesNonStreamingResponseToolChoiceFunction,
2511
+ ),
2512
+ );
2513
+ }
2514
+
2515
+ export function openResponsesNonStreamingResponseToolChoiceFunctionFromJSON(
2516
+ jsonString: string,
2517
+ ): SafeParseResult<
2518
+ OpenResponsesNonStreamingResponseToolChoiceFunction,
2519
+ SDKValidationError
2520
+ > {
2521
+ return safeParse(
2522
+ jsonString,
2523
+ (x) =>
2524
+ OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema.parse(
2525
+ JSON.parse(x),
2526
+ ),
2527
+ `Failed to parse 'OpenResponsesNonStreamingResponseToolChoiceFunction' from JSON`,
2528
+ );
2529
+ }
2530
+
2531
+ /** @internal */
2532
+ export const OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema:
2533
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceRequired> =
2534
+ z.nativeEnum(OpenResponsesNonStreamingResponseToolChoiceRequired);
2535
+
2536
+ /** @internal */
2537
+ export const OpenResponsesNonStreamingResponseToolChoiceRequired$outboundSchema:
2538
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceRequired> =
2539
+ OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema;
2540
+
2541
+ /**
2542
+ * @internal
2543
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2544
+ */
2545
+ export namespace OpenResponsesNonStreamingResponseToolChoiceRequired$ {
2546
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema` instead. */
2547
+ export const inboundSchema =
2548
+ OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema;
2549
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceRequired$outboundSchema` instead. */
2550
+ export const outboundSchema =
2551
+ OpenResponsesNonStreamingResponseToolChoiceRequired$outboundSchema;
2552
+ }
2553
+
2554
+ /** @internal */
2555
+ export const OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema:
2556
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceNone> = z
2557
+ .nativeEnum(OpenResponsesNonStreamingResponseToolChoiceNone);
2558
+
2559
+ /** @internal */
2560
+ export const OpenResponsesNonStreamingResponseToolChoiceNone$outboundSchema:
2561
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceNone> =
2562
+ OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema;
2563
+
2564
+ /**
2565
+ * @internal
2566
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2567
+ */
2568
+ export namespace OpenResponsesNonStreamingResponseToolChoiceNone$ {
2569
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema` instead. */
2570
+ export const inboundSchema =
2571
+ OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema;
2572
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceNone$outboundSchema` instead. */
2573
+ export const outboundSchema =
2574
+ OpenResponsesNonStreamingResponseToolChoiceNone$outboundSchema;
2575
+ }
2576
+
2577
+ /** @internal */
2578
+ export const OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema:
2579
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceAuto> = z
2580
+ .nativeEnum(OpenResponsesNonStreamingResponseToolChoiceAuto);
2581
+
2582
+ /** @internal */
2583
+ export const OpenResponsesNonStreamingResponseToolChoiceAuto$outboundSchema:
2584
+ z.ZodNativeEnum<typeof OpenResponsesNonStreamingResponseToolChoiceAuto> =
2585
+ OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema;
2586
+
2587
+ /**
2588
+ * @internal
2589
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2590
+ */
2591
+ export namespace OpenResponsesNonStreamingResponseToolChoiceAuto$ {
2592
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema` instead. */
2593
+ export const inboundSchema =
2594
+ OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema;
2595
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceAuto$outboundSchema` instead. */
2596
+ export const outboundSchema =
2597
+ OpenResponsesNonStreamingResponseToolChoiceAuto$outboundSchema;
2598
+ }
2599
+
2600
+ /** @internal */
2601
+ export const OpenResponsesNonStreamingResponseToolChoiceUnion$inboundSchema:
2602
+ z.ZodType<
2603
+ OpenResponsesNonStreamingResponseToolChoiceUnion,
2604
+ z.ZodTypeDef,
2605
+ unknown
2606
+ > = z.union([
2607
+ z.lazy(() =>
2608
+ OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema
2609
+ ),
2610
+ z.lazy(() => OpenResponsesNonStreamingResponseToolChoice$inboundSchema),
2611
+ OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema,
2612
+ OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema,
2613
+ OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema,
2614
+ ]);
2615
+
2616
+ /** @internal */
2617
+ export type OpenResponsesNonStreamingResponseToolChoiceUnion$Outbound =
2618
+ | OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound
2619
+ | OpenResponsesNonStreamingResponseToolChoice$Outbound
2620
+ | string
2621
+ | string
2622
+ | string;
2623
+
2624
+ /** @internal */
2625
+ export const OpenResponsesNonStreamingResponseToolChoiceUnion$outboundSchema:
2626
+ z.ZodType<
2627
+ OpenResponsesNonStreamingResponseToolChoiceUnion$Outbound,
2628
+ z.ZodTypeDef,
2629
+ OpenResponsesNonStreamingResponseToolChoiceUnion
2630
+ > = z.union([
2631
+ z.lazy(() =>
2632
+ OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema
2633
+ ),
2634
+ z.lazy(() => OpenResponsesNonStreamingResponseToolChoice$outboundSchema),
2635
+ OpenResponsesNonStreamingResponseToolChoiceAuto$outboundSchema,
2636
+ OpenResponsesNonStreamingResponseToolChoiceNone$outboundSchema,
2637
+ OpenResponsesNonStreamingResponseToolChoiceRequired$outboundSchema,
2638
+ ]);
2639
+
2640
+ /**
2641
+ * @internal
2642
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2643
+ */
2644
+ export namespace OpenResponsesNonStreamingResponseToolChoiceUnion$ {
2645
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceUnion$inboundSchema` instead. */
2646
+ export const inboundSchema =
2647
+ OpenResponsesNonStreamingResponseToolChoiceUnion$inboundSchema;
2648
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceUnion$outboundSchema` instead. */
2649
+ export const outboundSchema =
2650
+ OpenResponsesNonStreamingResponseToolChoiceUnion$outboundSchema;
2651
+ /** @deprecated use `OpenResponsesNonStreamingResponseToolChoiceUnion$Outbound` instead. */
2652
+ export type Outbound =
2653
+ OpenResponsesNonStreamingResponseToolChoiceUnion$Outbound;
2654
+ }
2655
+
2656
+ export function openResponsesNonStreamingResponseToolChoiceUnionToJSON(
2657
+ openResponsesNonStreamingResponseToolChoiceUnion:
2658
+ OpenResponsesNonStreamingResponseToolChoiceUnion,
2659
+ ): string {
2660
+ return JSON.stringify(
2661
+ OpenResponsesNonStreamingResponseToolChoiceUnion$outboundSchema.parse(
2662
+ openResponsesNonStreamingResponseToolChoiceUnion,
2663
+ ),
2664
+ );
2665
+ }
2666
+
2667
+ export function openResponsesNonStreamingResponseToolChoiceUnionFromJSON(
2668
+ jsonString: string,
2669
+ ): SafeParseResult<
2670
+ OpenResponsesNonStreamingResponseToolChoiceUnion,
2671
+ SDKValidationError
2672
+ > {
2673
+ return safeParse(
2674
+ jsonString,
2675
+ (x) =>
2676
+ OpenResponsesNonStreamingResponseToolChoiceUnion$inboundSchema.parse(
2677
+ JSON.parse(x),
2678
+ ),
2679
+ `Failed to parse 'OpenResponsesNonStreamingResponseToolChoiceUnion' from JSON`,
2680
+ );
2681
+ }
2682
+
2683
+ /** @internal */
2684
+ export const OpenResponsesNonStreamingResponseEffort$inboundSchema: z.ZodType<
2685
+ OpenResponsesNonStreamingResponseEffort,
2686
+ z.ZodTypeDef,
2687
+ unknown
2688
+ > = z
2689
+ .union([
2690
+ z.nativeEnum(OpenResponsesNonStreamingResponseEffort),
2691
+ z.string().transform(catchUnrecognizedEnum),
2692
+ ]);
2693
+
2694
+ /** @internal */
2695
+ export const OpenResponsesNonStreamingResponseEffort$outboundSchema: z.ZodType<
2696
+ OpenResponsesNonStreamingResponseEffort,
2697
+ z.ZodTypeDef,
2698
+ OpenResponsesNonStreamingResponseEffort
2699
+ > = z.union([
2700
+ z.nativeEnum(OpenResponsesNonStreamingResponseEffort),
2701
+ z.string().and(z.custom<Unrecognized<string>>()),
2702
+ ]);
2703
+
2704
+ /**
2705
+ * @internal
2706
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2707
+ */
2708
+ export namespace OpenResponsesNonStreamingResponseEffort$ {
2709
+ /** @deprecated use `OpenResponsesNonStreamingResponseEffort$inboundSchema` instead. */
2710
+ export const inboundSchema =
2711
+ OpenResponsesNonStreamingResponseEffort$inboundSchema;
2712
+ /** @deprecated use `OpenResponsesNonStreamingResponseEffort$outboundSchema` instead. */
2713
+ export const outboundSchema =
2714
+ OpenResponsesNonStreamingResponseEffort$outboundSchema;
2715
+ }
2716
+
2717
+ /** @internal */
2718
+ export const OpenResponsesNonStreamingResponseReasoning$inboundSchema:
2719
+ z.ZodType<OpenResponsesNonStreamingResponseReasoning, z.ZodTypeDef, unknown> =
2720
+ z.object({
2721
+ effort: z.nullable(OpenResponsesNonStreamingResponseEffort$inboundSchema)
2722
+ .optional(),
2723
+ summary: ReasoningSummaryVerbosity$inboundSchema.optional(),
2724
+ });
2725
+
2726
+ /** @internal */
2727
+ export type OpenResponsesNonStreamingResponseReasoning$Outbound = {
2728
+ effort?: string | null | undefined;
2729
+ summary?: string | undefined;
2730
+ };
2731
+
2732
+ /** @internal */
2733
+ export const OpenResponsesNonStreamingResponseReasoning$outboundSchema:
2734
+ z.ZodType<
2735
+ OpenResponsesNonStreamingResponseReasoning$Outbound,
2736
+ z.ZodTypeDef,
2737
+ OpenResponsesNonStreamingResponseReasoning
2738
+ > = z.object({
2739
+ effort: z.nullable(OpenResponsesNonStreamingResponseEffort$outboundSchema)
2740
+ .optional(),
2741
+ summary: ReasoningSummaryVerbosity$outboundSchema.optional(),
2742
+ });
2743
+
2744
+ /**
2745
+ * @internal
2746
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2747
+ */
2748
+ export namespace OpenResponsesNonStreamingResponseReasoning$ {
2749
+ /** @deprecated use `OpenResponsesNonStreamingResponseReasoning$inboundSchema` instead. */
2750
+ export const inboundSchema =
2751
+ OpenResponsesNonStreamingResponseReasoning$inboundSchema;
2752
+ /** @deprecated use `OpenResponsesNonStreamingResponseReasoning$outboundSchema` instead. */
2753
+ export const outboundSchema =
2754
+ OpenResponsesNonStreamingResponseReasoning$outboundSchema;
2755
+ /** @deprecated use `OpenResponsesNonStreamingResponseReasoning$Outbound` instead. */
2756
+ export type Outbound = OpenResponsesNonStreamingResponseReasoning$Outbound;
2757
+ }
2758
+
2759
+ export function openResponsesNonStreamingResponseReasoningToJSON(
2760
+ openResponsesNonStreamingResponseReasoning:
2761
+ OpenResponsesNonStreamingResponseReasoning,
2762
+ ): string {
2763
+ return JSON.stringify(
2764
+ OpenResponsesNonStreamingResponseReasoning$outboundSchema.parse(
2765
+ openResponsesNonStreamingResponseReasoning,
2766
+ ),
2767
+ );
2768
+ }
2769
+
2770
+ export function openResponsesNonStreamingResponseReasoningFromJSON(
2771
+ jsonString: string,
2772
+ ): SafeParseResult<
2773
+ OpenResponsesNonStreamingResponseReasoning,
2774
+ SDKValidationError
2775
+ > {
2776
+ return safeParse(
2777
+ jsonString,
2778
+ (x) =>
2779
+ OpenResponsesNonStreamingResponseReasoning$inboundSchema.parse(
2780
+ JSON.parse(x),
2781
+ ),
2782
+ `Failed to parse 'OpenResponsesNonStreamingResponseReasoning' from JSON`,
2783
+ );
2784
+ }
2785
+
2786
+ /** @internal */
2787
+ export const OpenResponsesNonStreamingResponseServiceTier$inboundSchema:
2788
+ z.ZodType<
2789
+ OpenResponsesNonStreamingResponseServiceTier,
2790
+ z.ZodTypeDef,
2791
+ unknown
2792
+ > = z
2793
+ .union([
2794
+ z.nativeEnum(OpenResponsesNonStreamingResponseServiceTier),
2795
+ z.string().transform(catchUnrecognizedEnum),
2796
+ ]);
2797
+
2798
+ /** @internal */
2799
+ export const OpenResponsesNonStreamingResponseServiceTier$outboundSchema:
2800
+ z.ZodType<
2801
+ OpenResponsesNonStreamingResponseServiceTier,
2802
+ z.ZodTypeDef,
2803
+ OpenResponsesNonStreamingResponseServiceTier
2804
+ > = z.union([
2805
+ z.nativeEnum(OpenResponsesNonStreamingResponseServiceTier),
2806
+ z.string().and(z.custom<Unrecognized<string>>()),
2807
+ ]);
2808
+
2809
+ /**
2810
+ * @internal
2811
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2812
+ */
2813
+ export namespace OpenResponsesNonStreamingResponseServiceTier$ {
2814
+ /** @deprecated use `OpenResponsesNonStreamingResponseServiceTier$inboundSchema` instead. */
2815
+ export const inboundSchema =
2816
+ OpenResponsesNonStreamingResponseServiceTier$inboundSchema;
2817
+ /** @deprecated use `OpenResponsesNonStreamingResponseServiceTier$outboundSchema` instead. */
2818
+ export const outboundSchema =
2819
+ OpenResponsesNonStreamingResponseServiceTier$outboundSchema;
2820
+ }
2821
+
2822
+ /** @internal */
2823
+ export const OpenResponsesNonStreamingResponseTruncation$inboundSchema:
2824
+ z.ZodType<
2825
+ OpenResponsesNonStreamingResponseTruncation,
2826
+ z.ZodTypeDef,
2827
+ unknown
2828
+ > = z
2829
+ .union([
2830
+ z.nativeEnum(OpenResponsesNonStreamingResponseTruncation),
2831
+ z.string().transform(catchUnrecognizedEnum),
2832
+ ]);
2833
+
2834
+ /** @internal */
2835
+ export const OpenResponsesNonStreamingResponseTruncation$outboundSchema:
2836
+ z.ZodType<
2837
+ OpenResponsesNonStreamingResponseTruncation,
2838
+ z.ZodTypeDef,
2839
+ OpenResponsesNonStreamingResponseTruncation
2840
+ > = z.union([
2841
+ z.nativeEnum(OpenResponsesNonStreamingResponseTruncation),
2842
+ z.string().and(z.custom<Unrecognized<string>>()),
2843
+ ]);
2844
+
2845
+ /**
2846
+ * @internal
2847
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2848
+ */
2849
+ export namespace OpenResponsesNonStreamingResponseTruncation$ {
2850
+ /** @deprecated use `OpenResponsesNonStreamingResponseTruncation$inboundSchema` instead. */
2851
+ export const inboundSchema =
2852
+ OpenResponsesNonStreamingResponseTruncation$inboundSchema;
2853
+ /** @deprecated use `OpenResponsesNonStreamingResponseTruncation$outboundSchema` instead. */
2854
+ export const outboundSchema =
2855
+ OpenResponsesNonStreamingResponseTruncation$outboundSchema;
2856
+ }
2857
+
2858
+ /** @internal */
2859
+ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType<
2860
+ OpenResponsesNonStreamingResponse,
2861
+ z.ZodTypeDef,
2862
+ unknown
2863
+ > = z.object({
2864
+ id: z.string(),
2865
+ object: ObjectT$inboundSchema,
2866
+ created_at: z.number(),
2867
+ model: z.string(),
2868
+ status: OpenResponsesNonStreamingResponseStatus$inboundSchema.optional(),
2869
+ output: z.array(ResponsesOutputItem$inboundSchema),
2870
+ user: z.nullable(z.string()).optional(),
2871
+ output_text: z.string().optional(),
2872
+ prompt_cache_key: z.nullable(z.string()).optional(),
2873
+ safety_identifier: z.nullable(z.string()).optional(),
2874
+ error: z.nullable(ResponsesErrorField$inboundSchema),
2875
+ incomplete_details: z.nullable(z.lazy(() => IncompleteDetails$inboundSchema)),
2876
+ usage: z.lazy(() => Usage$inboundSchema).optional(),
2877
+ max_tool_calls: z.nullable(z.number()).optional(),
2878
+ top_logprobs: z.number().optional(),
2879
+ max_output_tokens: z.nullable(z.number()).optional(),
2880
+ temperature: z.nullable(z.number()),
2881
+ top_p: z.nullable(z.number()),
2882
+ instructions: z.nullable(
2883
+ z.union([
2884
+ z.string(),
2885
+ z.array(
2886
+ z.union([
2887
+ z.lazy(() => InstructionsFunctionCallOutput$inboundSchema),
2888
+ z.lazy(() => InstructionsFunctionCall$inboundSchema),
2889
+ OutputItemImageGenerationCall$inboundSchema,
2890
+ OutputMessage$inboundSchema,
2891
+ z.lazy(() => InstructionsMessage2$inboundSchema),
2892
+ z.lazy(() => InstructionsMessage1$inboundSchema),
2893
+ ]),
2894
+ ),
2895
+ z.any(),
2896
+ ]),
2897
+ ).optional(),
2898
+ metadata: z.nullable(z.record(z.string())),
2899
+ tools: z.array(
2900
+ z.union([
2901
+ z.lazy(() => OpenResponsesNonStreamingResponseToolFunction$inboundSchema),
2902
+ OpenResponsesWebSearchPreviewTool$inboundSchema,
2903
+ OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
2904
+ OpenResponsesWebSearchTool$inboundSchema,
2905
+ OpenResponsesWebSearch20250826Tool$inboundSchema,
2906
+ ]),
2907
+ ),
2908
+ tool_choice: z.union([
2909
+ z.lazy(() =>
2910
+ OpenResponsesNonStreamingResponseToolChoiceFunction$inboundSchema
2911
+ ),
2912
+ z.lazy(() => OpenResponsesNonStreamingResponseToolChoice$inboundSchema),
2913
+ OpenResponsesNonStreamingResponseToolChoiceAuto$inboundSchema,
2914
+ OpenResponsesNonStreamingResponseToolChoiceNone$inboundSchema,
2915
+ OpenResponsesNonStreamingResponseToolChoiceRequired$inboundSchema,
2916
+ ]),
2917
+ parallel_tool_calls: z.boolean(),
2918
+ prompt: z.nullable(OpenAIResponsesPrompt$inboundSchema).optional(),
2919
+ background: z.nullable(z.boolean()).optional(),
2920
+ previous_response_id: z.nullable(z.string()).optional(),
2921
+ reasoning: z.nullable(
2922
+ z.lazy(() => OpenResponsesNonStreamingResponseReasoning$inboundSchema),
2923
+ ).optional(),
2924
+ service_tier: z.nullable(
2925
+ OpenResponsesNonStreamingResponseServiceTier$inboundSchema,
2926
+ ).optional(),
2927
+ store: z.boolean().optional(),
2928
+ truncation: z.nullable(
2929
+ OpenResponsesNonStreamingResponseTruncation$inboundSchema,
2930
+ ).optional(),
2931
+ text: ResponseTextConfig$inboundSchema.optional(),
2932
+ }).transform((v) => {
2933
+ return remap$(v, {
2934
+ "created_at": "createdAt",
2935
+ "output_text": "outputText",
2936
+ "prompt_cache_key": "promptCacheKey",
2937
+ "safety_identifier": "safetyIdentifier",
2938
+ "incomplete_details": "incompleteDetails",
2939
+ "max_tool_calls": "maxToolCalls",
2940
+ "top_logprobs": "topLogprobs",
2941
+ "max_output_tokens": "maxOutputTokens",
2942
+ "top_p": "topP",
2943
+ "tool_choice": "toolChoice",
2944
+ "parallel_tool_calls": "parallelToolCalls",
2945
+ "previous_response_id": "previousResponseId",
2946
+ "service_tier": "serviceTier",
2947
+ });
2948
+ });
2949
+
2950
+ /** @internal */
2951
+ export type OpenResponsesNonStreamingResponse$Outbound = {
2952
+ id: string;
2953
+ object: string;
2954
+ created_at: number;
2955
+ model: string;
2956
+ status?: string | undefined;
2957
+ output: Array<ResponsesOutputItem$Outbound>;
2958
+ user?: string | null | undefined;
2959
+ output_text?: string | undefined;
2960
+ prompt_cache_key?: string | null | undefined;
2961
+ safety_identifier?: string | null | undefined;
2962
+ error: ResponsesErrorField$Outbound | null;
438
2963
  incomplete_details: IncompleteDetails$Outbound | null;
439
- usage?: ResponsesUsage$Outbound | undefined;
2964
+ usage?: Usage$Outbound | undefined;
440
2965
  max_tool_calls?: number | null | undefined;
441
2966
  top_logprobs?: number | undefined;
442
2967
  max_output_tokens?: number | null | undefined;
443
2968
  temperature: number | null;
444
2969
  top_p: number | null;
445
- instructions?: OpenResponsesInput$Outbound | null | undefined;
2970
+ instructions?:
2971
+ | string
2972
+ | Array<
2973
+ | InstructionsFunctionCallOutput$Outbound
2974
+ | InstructionsFunctionCall$Outbound
2975
+ | OutputItemImageGenerationCall$Outbound
2976
+ | OutputMessage$Outbound
2977
+ | InstructionsMessage2$Outbound
2978
+ | InstructionsMessage1$Outbound
2979
+ >
2980
+ | any
2981
+ | null
2982
+ | undefined;
446
2983
  metadata: { [k: string]: string } | null;
447
- tools: Array<OpenResponsesToolUnion$Outbound>;
448
- tool_choice: OpenResponsesToolChoice$Outbound;
2984
+ tools: Array<
2985
+ | OpenResponsesNonStreamingResponseToolFunction$Outbound
2986
+ | OpenResponsesWebSearchPreviewTool$Outbound
2987
+ | OpenResponsesWebSearchPreview20250311Tool$Outbound
2988
+ | OpenResponsesWebSearchTool$Outbound
2989
+ | OpenResponsesWebSearch20250826Tool$Outbound
2990
+ >;
2991
+ tool_choice:
2992
+ | OpenResponsesNonStreamingResponseToolChoiceFunction$Outbound
2993
+ | OpenResponsesNonStreamingResponseToolChoice$Outbound
2994
+ | string
2995
+ | string
2996
+ | string;
449
2997
  parallel_tool_calls: boolean;
450
- prompt?: OpenResponsesPrompt$Outbound | null | undefined;
2998
+ prompt?: OpenAIResponsesPrompt$Outbound | null | undefined;
451
2999
  background?: boolean | null | undefined;
452
3000
  previous_response_id?: string | null | undefined;
453
- reasoning?: OpenResponsesReasoningConfig$Outbound | null | undefined;
3001
+ reasoning?:
3002
+ | OpenResponsesNonStreamingResponseReasoning$Outbound
3003
+ | null
3004
+ | undefined;
454
3005
  service_tier?: string | null | undefined;
455
3006
  store?: boolean | undefined;
456
3007
  truncation?: string | null | undefined;
457
- text?: OpenResponsesTextConfig$Outbound | undefined;
3008
+ text?: ResponseTextConfig$Outbound | undefined;
458
3009
  };
459
3010
 
460
3011
  /** @internal */
@@ -463,7 +3014,7 @@ export const OpenResponsesNonStreamingResponse$outboundSchema: z.ZodType<
463
3014
  z.ZodTypeDef,
464
3015
  OpenResponsesNonStreamingResponse
465
3016
  > = z.object({
466
- id: z.string().optional(),
3017
+ id: z.string(),
467
3018
  object: ObjectT$outboundSchema,
468
3019
  createdAt: z.number(),
469
3020
  model: z.string(),
@@ -475,25 +3026,64 @@ export const OpenResponsesNonStreamingResponse$outboundSchema: z.ZodType<
475
3026
  safetyIdentifier: z.nullable(z.string()).optional(),
476
3027
  error: z.nullable(ResponsesErrorField$outboundSchema),
477
3028
  incompleteDetails: z.nullable(z.lazy(() => IncompleteDetails$outboundSchema)),
478
- usage: ResponsesUsage$outboundSchema.optional(),
3029
+ usage: z.lazy(() => Usage$outboundSchema).optional(),
479
3030
  maxToolCalls: z.nullable(z.number()).optional(),
480
3031
  topLogprobs: z.number().optional(),
481
3032
  maxOutputTokens: z.nullable(z.number()).optional(),
482
3033
  temperature: z.nullable(z.number()),
483
3034
  topP: z.nullable(z.number()),
484
- instructions: z.nullable(OpenResponsesInput$outboundSchema).optional(),
3035
+ instructions: z.nullable(
3036
+ z.union([
3037
+ z.string(),
3038
+ z.array(
3039
+ z.union([
3040
+ z.lazy(() => InstructionsFunctionCallOutput$outboundSchema),
3041
+ z.lazy(() => InstructionsFunctionCall$outboundSchema),
3042
+ OutputItemImageGenerationCall$outboundSchema,
3043
+ OutputMessage$outboundSchema,
3044
+ z.lazy(() => InstructionsMessage2$outboundSchema),
3045
+ z.lazy(() => InstructionsMessage1$outboundSchema),
3046
+ ]),
3047
+ ),
3048
+ z.any(),
3049
+ ]),
3050
+ ).optional(),
485
3051
  metadata: z.nullable(z.record(z.string())),
486
- tools: z.array(OpenResponsesToolUnion$outboundSchema),
487
- toolChoice: OpenResponsesToolChoice$outboundSchema,
3052
+ tools: z.array(
3053
+ z.union([
3054
+ z.lazy(() =>
3055
+ OpenResponsesNonStreamingResponseToolFunction$outboundSchema
3056
+ ),
3057
+ OpenResponsesWebSearchPreviewTool$outboundSchema,
3058
+ OpenResponsesWebSearchPreview20250311Tool$outboundSchema,
3059
+ OpenResponsesWebSearchTool$outboundSchema,
3060
+ OpenResponsesWebSearch20250826Tool$outboundSchema,
3061
+ ]),
3062
+ ),
3063
+ toolChoice: z.union([
3064
+ z.lazy(() =>
3065
+ OpenResponsesNonStreamingResponseToolChoiceFunction$outboundSchema
3066
+ ),
3067
+ z.lazy(() => OpenResponsesNonStreamingResponseToolChoice$outboundSchema),
3068
+ OpenResponsesNonStreamingResponseToolChoiceAuto$outboundSchema,
3069
+ OpenResponsesNonStreamingResponseToolChoiceNone$outboundSchema,
3070
+ OpenResponsesNonStreamingResponseToolChoiceRequired$outboundSchema,
3071
+ ]),
488
3072
  parallelToolCalls: z.boolean(),
489
- prompt: z.nullable(OpenResponsesPrompt$outboundSchema).optional(),
3073
+ prompt: z.nullable(OpenAIResponsesPrompt$outboundSchema).optional(),
490
3074
  background: z.nullable(z.boolean()).optional(),
491
3075
  previousResponseId: z.nullable(z.string()).optional(),
492
- reasoning: z.nullable(OpenResponsesReasoningConfig$outboundSchema).optional(),
493
- serviceTier: z.nullable(ServiceTier$outboundSchema).optional(),
3076
+ reasoning: z.nullable(
3077
+ z.lazy(() => OpenResponsesNonStreamingResponseReasoning$outboundSchema),
3078
+ ).optional(),
3079
+ serviceTier: z.nullable(
3080
+ OpenResponsesNonStreamingResponseServiceTier$outboundSchema,
3081
+ ).optional(),
494
3082
  store: z.boolean().optional(),
495
- truncation: z.nullable(Truncation$outboundSchema).optional(),
496
- text: OpenResponsesTextConfig$outboundSchema.optional(),
3083
+ truncation: z.nullable(
3084
+ OpenResponsesNonStreamingResponseTruncation$outboundSchema,
3085
+ ).optional(),
3086
+ text: ResponseTextConfig$outboundSchema.optional(),
497
3087
  }).transform((v) => {
498
3088
  return remap$(v, {
499
3089
  createdAt: "created_at",