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

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 (654) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/models/chatgenerationparams.d.ts +15 -15
  4. package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
  5. package/dist/commonjs/models/chatgenerationparams.js +18 -20
  6. package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
  7. package/dist/commonjs/models/chatmessagetokenlogprob.d.ts +15 -15
  8. package/dist/commonjs/models/chatmessagetokenlogprob.d.ts.map +1 -1
  9. package/dist/commonjs/models/chatmessagetokenlogprob.js +18 -18
  10. package/dist/commonjs/models/chatmessagetokenlogprob.js.map +1 -1
  11. package/dist/commonjs/models/filecitationannotation.d.ts +58 -0
  12. package/dist/commonjs/models/filecitationannotation.d.ts.map +1 -0
  13. package/dist/commonjs/models/{filecitation.js → filecitationannotation.js} +29 -29
  14. package/dist/commonjs/models/filecitationannotation.js.map +1 -0
  15. package/dist/commonjs/models/filepathannotation.d.ts +56 -0
  16. package/dist/commonjs/models/filepathannotation.d.ts.map +1 -0
  17. package/dist/commonjs/models/{filepath.js → filepathannotation.js} +29 -29
  18. package/dist/commonjs/models/filepathannotation.js.map +1 -0
  19. package/dist/commonjs/models/index.d.ts +26 -35
  20. package/dist/commonjs/models/index.d.ts.map +1 -1
  21. package/dist/commonjs/models/index.js +26 -35
  22. package/dist/commonjs/models/index.js.map +1 -1
  23. package/dist/commonjs/models/openresponseseasyinputmessage.d.ts +19 -75
  24. package/dist/commonjs/models/openresponseseasyinputmessage.d.ts.map +1 -1
  25. package/dist/commonjs/models/openresponseseasyinputmessage.js +19 -110
  26. package/dist/commonjs/models/openresponseseasyinputmessage.js.map +1 -1
  27. package/dist/commonjs/models/openresponsesformatjsonobject.d.ts +55 -0
  28. package/dist/commonjs/models/openresponsesformatjsonobject.d.ts.map +1 -0
  29. package/dist/commonjs/models/openresponsesformatjsonobject.js +87 -0
  30. package/dist/commonjs/models/openresponsesformatjsonobject.js.map +1 -0
  31. package/dist/commonjs/models/openresponsesformatjsonschema.d.ts +67 -0
  32. package/dist/commonjs/models/openresponsesformatjsonschema.d.ts.map +1 -0
  33. package/dist/commonjs/models/openresponsesformatjsonschema.js +95 -0
  34. package/dist/commonjs/models/openresponsesformatjsonschema.js.map +1 -0
  35. package/dist/commonjs/models/openresponsesformattext.d.ts +55 -0
  36. package/dist/commonjs/models/openresponsesformattext.d.ts.map +1 -0
  37. package/dist/commonjs/models/openresponsesformattext.js +87 -0
  38. package/dist/commonjs/models/openresponsesformattext.js.map +1 -0
  39. package/dist/commonjs/models/openresponsesformattextconfig.d.ts +31 -0
  40. package/dist/commonjs/models/openresponsesformattextconfig.d.ts.map +1 -0
  41. package/dist/commonjs/models/openresponsesformattextconfig.js +76 -0
  42. package/dist/commonjs/models/openresponsesformattextconfig.js.map +1 -0
  43. package/dist/commonjs/models/openresponsesincludable.d.ts +31 -0
  44. package/dist/commonjs/models/openresponsesincludable.d.ts.map +1 -0
  45. package/dist/commonjs/models/{openairesponsesincludable.js → openresponsesincludable.js} +17 -14
  46. package/dist/commonjs/models/openresponsesincludable.js.map +1 -0
  47. package/dist/commonjs/models/openresponsesinput.d.ts +29 -0
  48. package/dist/commonjs/models/openresponsesinput.d.ts.map +1 -0
  49. package/dist/commonjs/models/{openresponsestoplogprobs.js → openresponsesinput.js} +26 -23
  50. package/dist/commonjs/models/openresponsesinput.js.map +1 -0
  51. package/dist/commonjs/models/openresponsesinputcontent.d.ts +43 -0
  52. package/dist/commonjs/models/openresponsesinputcontent.d.ts.map +1 -0
  53. package/dist/commonjs/models/openresponsesinputcontent.js +88 -0
  54. package/dist/commonjs/models/openresponsesinputcontent.js.map +1 -0
  55. package/dist/commonjs/models/openresponsesinputfile.d.ts +63 -0
  56. package/dist/commonjs/models/openresponsesinputfile.d.ts.map +1 -0
  57. package/dist/commonjs/models/{responseinputfile.js → openresponsesinputfile.js} +29 -29
  58. package/dist/commonjs/models/openresponsesinputfile.js.map +1 -0
  59. package/dist/commonjs/models/openresponsesinputimage.d.ts +79 -0
  60. package/dist/commonjs/models/openresponsesinputimage.d.ts.map +1 -0
  61. package/dist/commonjs/models/openresponsesinputimage.js +128 -0
  62. package/dist/commonjs/models/openresponsesinputimage.js.map +1 -0
  63. package/dist/commonjs/models/openresponsesinputitem.d.ts +492 -0
  64. package/dist/commonjs/models/openresponsesinputitem.d.ts.map +1 -0
  65. package/dist/commonjs/models/openresponsesinputitem.js +565 -0
  66. package/dist/commonjs/models/openresponsesinputitem.js.map +1 -0
  67. package/dist/commonjs/models/openresponsesinputmessageitem.d.ts +8 -52
  68. package/dist/commonjs/models/openresponsesinputmessageitem.d.ts.map +1 -1
  69. package/dist/commonjs/models/openresponsesinputmessageitem.js +6 -71
  70. package/dist/commonjs/models/openresponsesinputmessageitem.js.map +1 -1
  71. package/dist/commonjs/models/openresponsesinputtext.d.ts +57 -0
  72. package/dist/commonjs/models/openresponsesinputtext.d.ts.map +1 -0
  73. package/dist/commonjs/models/openresponsesinputtext.js +89 -0
  74. package/dist/commonjs/models/openresponsesinputtext.js.map +1 -0
  75. package/dist/commonjs/models/openresponseslogprobs.d.ts +32 -3
  76. package/dist/commonjs/models/openresponseslogprobs.d.ts.map +1 -1
  77. package/dist/commonjs/models/openresponseslogprobs.js +32 -4
  78. package/dist/commonjs/models/openresponseslogprobs.js.map +1 -1
  79. package/dist/commonjs/models/openresponsesnonstreamingresponse.d.ts +58 -1066
  80. package/dist/commonjs/models/openresponsesnonstreamingresponse.d.ts.map +1 -1
  81. package/dist/commonjs/models/openresponsesnonstreamingresponse.js +52 -1315
  82. package/dist/commonjs/models/openresponsesnonstreamingresponse.js.map +1 -1
  83. package/dist/commonjs/models/openresponsesoutputtext.d.ts +80 -0
  84. package/dist/commonjs/models/openresponsesoutputtext.d.ts.map +1 -0
  85. package/dist/commonjs/models/openresponsesoutputtext.js +133 -0
  86. package/dist/commonjs/models/openresponsesoutputtext.js.map +1 -0
  87. package/dist/commonjs/models/openresponsesprompt.d.ts +39 -0
  88. package/dist/commonjs/models/openresponsesprompt.d.ts.map +1 -0
  89. package/dist/commonjs/models/{openairesponsesannotation.js → openresponsesprompt.js} +26 -28
  90. package/dist/commonjs/models/openresponsesprompt.js.map +1 -0
  91. package/dist/commonjs/models/openresponsesreasoning.d.ts +0 -89
  92. package/dist/commonjs/models/openresponsesreasoning.d.ts.map +1 -1
  93. package/dist/commonjs/models/openresponsesreasoning.js +1 -96
  94. package/dist/commonjs/models/openresponsesreasoning.js.map +1 -1
  95. package/dist/commonjs/models/openresponsesrefusalcontent.d.ts +54 -0
  96. package/dist/commonjs/models/openresponsesrefusalcontent.d.ts.map +1 -0
  97. package/dist/commonjs/models/openresponsesrefusalcontent.js +89 -0
  98. package/dist/commonjs/models/openresponsesrefusalcontent.js.map +1 -0
  99. package/dist/commonjs/models/openresponsesrequest.d.ts +26 -335
  100. package/dist/commonjs/models/openresponsesrequest.d.ts.map +1 -1
  101. package/dist/commonjs/models/openresponsesrequest.js +25 -378
  102. package/dist/commonjs/models/openresponsesrequest.js.map +1 -1
  103. package/dist/commonjs/models/openresponsesservicetier.d.ts +25 -0
  104. package/dist/commonjs/models/openresponsesservicetier.d.ts.map +1 -0
  105. package/dist/commonjs/models/{servicetier.js → openresponsesservicetier.js} +15 -15
  106. package/dist/commonjs/models/openresponsesservicetier.js.map +1 -0
  107. package/dist/commonjs/models/openresponsesstreamevent.d.ts +612 -25
  108. package/dist/commonjs/models/openresponsesstreamevent.d.ts.map +1 -1
  109. package/dist/commonjs/models/openresponsesstreamevent.js +772 -54
  110. package/dist/commonjs/models/openresponsesstreamevent.js.map +1 -1
  111. package/dist/commonjs/models/openresponsestextconfig.d.ts +59 -0
  112. package/dist/commonjs/models/openresponsestextconfig.d.ts.map +1 -0
  113. package/dist/commonjs/models/openresponsestextconfig.js +100 -0
  114. package/dist/commonjs/models/openresponsestextconfig.js.map +1 -0
  115. package/dist/commonjs/models/openresponsestoolchoice.d.ts +148 -0
  116. package/dist/commonjs/models/openresponsestoolchoice.d.ts.map +1 -0
  117. package/dist/commonjs/models/openresponsestoolchoice.js +179 -0
  118. package/dist/commonjs/models/openresponsestoolchoice.js.map +1 -0
  119. package/dist/commonjs/models/openresponsestoolunion.d.ts +95 -0
  120. package/dist/commonjs/models/openresponsestoolunion.d.ts.map +1 -0
  121. package/dist/commonjs/models/openresponsestoolunion.js +134 -0
  122. package/dist/commonjs/models/openresponsestoolunion.js.map +1 -0
  123. package/dist/commonjs/models/openresponsestruncation.d.ts +22 -0
  124. package/dist/commonjs/models/openresponsestruncation.d.ts.map +1 -0
  125. package/dist/commonjs/models/{truncation.js → openresponsestruncation.js} +14 -14
  126. package/dist/commonjs/models/openresponsestruncation.js.map +1 -0
  127. package/dist/commonjs/models/outputtextcontent.d.ts +80 -0
  128. package/dist/commonjs/models/outputtextcontent.d.ts.map +1 -0
  129. package/dist/commonjs/models/outputtextcontent.js +133 -0
  130. package/dist/commonjs/models/outputtextcontent.js.map +1 -0
  131. package/dist/commonjs/models/refusalcontent.d.ts +54 -0
  132. package/dist/commonjs/models/refusalcontent.d.ts.map +1 -0
  133. package/dist/commonjs/models/refusalcontent.js +89 -0
  134. package/dist/commonjs/models/refusalcontent.js.map +1 -0
  135. package/dist/commonjs/models/responseserrorfield.d.ts +0 -15
  136. package/dist/commonjs/models/responseserrorfield.d.ts.map +1 -1
  137. package/dist/commonjs/models/responseserrorfield.js +0 -15
  138. package/dist/commonjs/models/responseserrorfield.js.map +1 -1
  139. package/dist/commonjs/models/responsesoutputitem.d.ts +181 -28
  140. package/dist/commonjs/models/responsesoutputitem.d.ts.map +1 -1
  141. package/dist/commonjs/models/responsesoutputitem.js +198 -42
  142. package/dist/commonjs/models/responsesoutputitem.js.map +1 -1
  143. package/dist/commonjs/models/responsesusage.d.ts +131 -0
  144. package/dist/commonjs/models/responsesusage.d.ts.map +1 -0
  145. package/dist/commonjs/models/responsesusage.js +217 -0
  146. package/dist/commonjs/models/responsesusage.js.map +1 -0
  147. package/dist/commonjs/models/toolchoicetypes.d.ts +164 -0
  148. package/dist/commonjs/models/toolchoicetypes.d.ts.map +1 -0
  149. package/dist/commonjs/models/toolchoicetypes.js +208 -0
  150. package/dist/commonjs/models/toolchoicetypes.js.map +1 -0
  151. package/dist/commonjs/models/urlcitationannotation.d.ts +60 -0
  152. package/dist/commonjs/models/urlcitationannotation.d.ts.map +1 -0
  153. package/dist/commonjs/models/{urlcitation.js → urlcitationannotation.js} +29 -29
  154. package/dist/commonjs/models/urlcitationannotation.js.map +1 -0
  155. package/dist/esm/lib/config.d.ts +2 -2
  156. package/dist/esm/lib/config.js +2 -2
  157. package/dist/esm/models/chatgenerationparams.d.ts +15 -15
  158. package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
  159. package/dist/esm/models/chatgenerationparams.js +15 -17
  160. package/dist/esm/models/chatgenerationparams.js.map +1 -1
  161. package/dist/esm/models/chatmessagetokenlogprob.d.ts +15 -15
  162. package/dist/esm/models/chatmessagetokenlogprob.d.ts.map +1 -1
  163. package/dist/esm/models/chatmessagetokenlogprob.js +15 -15
  164. package/dist/esm/models/chatmessagetokenlogprob.js.map +1 -1
  165. package/dist/esm/models/filecitationannotation.d.ts +58 -0
  166. package/dist/esm/models/filecitationannotation.d.ts.map +1 -0
  167. package/dist/esm/models/filecitationannotation.js +64 -0
  168. package/dist/esm/models/filecitationannotation.js.map +1 -0
  169. package/dist/esm/models/filepathannotation.d.ts +56 -0
  170. package/dist/esm/models/filepathannotation.d.ts.map +1 -0
  171. package/dist/esm/models/filepathannotation.js +62 -0
  172. package/dist/esm/models/filepathannotation.js.map +1 -0
  173. package/dist/esm/models/index.d.ts +26 -35
  174. package/dist/esm/models/index.d.ts.map +1 -1
  175. package/dist/esm/models/index.js +26 -35
  176. package/dist/esm/models/index.js.map +1 -1
  177. package/dist/esm/models/openresponseseasyinputmessage.d.ts +19 -75
  178. package/dist/esm/models/openresponseseasyinputmessage.d.ts.map +1 -1
  179. package/dist/esm/models/openresponseseasyinputmessage.js +16 -105
  180. package/dist/esm/models/openresponseseasyinputmessage.js.map +1 -1
  181. package/dist/esm/models/openresponsesformatjsonobject.d.ts +55 -0
  182. package/dist/esm/models/openresponsesformatjsonobject.d.ts.map +1 -0
  183. package/dist/esm/models/openresponsesformatjsonobject.js +49 -0
  184. package/dist/esm/models/openresponsesformatjsonobject.js.map +1 -0
  185. package/dist/esm/models/openresponsesformatjsonschema.d.ts +67 -0
  186. package/dist/esm/models/openresponsesformatjsonschema.d.ts.map +1 -0
  187. package/dist/esm/models/openresponsesformatjsonschema.js +57 -0
  188. package/dist/esm/models/openresponsesformatjsonschema.js.map +1 -0
  189. package/dist/esm/models/openresponsesformattext.d.ts +55 -0
  190. package/dist/esm/models/openresponsesformattext.d.ts.map +1 -0
  191. package/dist/esm/models/openresponsesformattext.js +49 -0
  192. package/dist/esm/models/openresponsesformattext.js.map +1 -0
  193. package/dist/esm/models/openresponsesformattextconfig.d.ts +31 -0
  194. package/dist/esm/models/openresponsesformattextconfig.d.ts.map +1 -0
  195. package/dist/esm/models/openresponsesformattextconfig.js +38 -0
  196. package/dist/esm/models/openresponsesformattextconfig.js.map +1 -0
  197. package/dist/esm/models/openresponsesincludable.d.ts +31 -0
  198. package/dist/esm/models/openresponsesincludable.d.ts.map +1 -0
  199. package/dist/esm/models/openresponsesincludable.js +38 -0
  200. package/dist/esm/models/openresponsesincludable.js.map +1 -0
  201. package/dist/esm/models/openresponsesinput.d.ts +29 -0
  202. package/dist/esm/models/openresponsesinput.d.ts.map +1 -0
  203. package/dist/esm/models/openresponsesinput.js +36 -0
  204. package/dist/esm/models/openresponsesinput.js.map +1 -0
  205. package/dist/esm/models/openresponsesinputcontent.d.ts +43 -0
  206. package/dist/esm/models/openresponsesinputcontent.d.ts.map +1 -0
  207. package/dist/esm/models/openresponsesinputcontent.js +50 -0
  208. package/dist/esm/models/openresponsesinputcontent.js.map +1 -0
  209. package/dist/esm/models/openresponsesinputfile.d.ts +63 -0
  210. package/dist/esm/models/openresponsesinputfile.d.ts.map +1 -0
  211. package/dist/esm/models/openresponsesinputfile.js +70 -0
  212. package/dist/esm/models/openresponsesinputfile.js.map +1 -0
  213. package/dist/esm/models/openresponsesinputimage.d.ts +79 -0
  214. package/dist/esm/models/openresponsesinputimage.d.ts.map +1 -0
  215. package/dist/esm/models/openresponsesinputimage.js +90 -0
  216. package/dist/esm/models/openresponsesinputimage.js.map +1 -0
  217. package/dist/esm/models/openresponsesinputitem.d.ts +492 -0
  218. package/dist/esm/models/openresponsesinputitem.d.ts.map +1 -0
  219. package/dist/esm/models/openresponsesinputitem.js +510 -0
  220. package/dist/esm/models/openresponsesinputitem.js.map +1 -0
  221. package/dist/esm/models/openresponsesinputmessageitem.d.ts +8 -52
  222. package/dist/esm/models/openresponsesinputmessageitem.d.ts.map +1 -1
  223. package/dist/esm/models/openresponsesinputmessageitem.js +5 -68
  224. package/dist/esm/models/openresponsesinputmessageitem.js.map +1 -1
  225. package/dist/esm/models/openresponsesinputtext.d.ts +57 -0
  226. package/dist/esm/models/openresponsesinputtext.d.ts.map +1 -0
  227. package/dist/esm/models/openresponsesinputtext.js +51 -0
  228. package/dist/esm/models/openresponsesinputtext.js.map +1 -0
  229. package/dist/esm/models/openresponseslogprobs.d.ts +32 -3
  230. package/dist/esm/models/openresponseslogprobs.d.ts.map +1 -1
  231. package/dist/esm/models/openresponseslogprobs.js +29 -3
  232. package/dist/esm/models/openresponseslogprobs.js.map +1 -1
  233. package/dist/esm/models/openresponsesnonstreamingresponse.d.ts +58 -1066
  234. package/dist/esm/models/openresponsesnonstreamingresponse.d.ts.map +1 -1
  235. package/dist/esm/models/openresponsesnonstreamingresponse.js +51 -1269
  236. package/dist/esm/models/openresponsesnonstreamingresponse.js.map +1 -1
  237. package/dist/esm/models/openresponsesoutputtext.d.ts +80 -0
  238. package/dist/esm/models/openresponsesoutputtext.d.ts.map +1 -0
  239. package/dist/esm/models/openresponsesoutputtext.js +93 -0
  240. package/dist/esm/models/openresponsesoutputtext.js.map +1 -0
  241. package/dist/esm/models/openresponsesprompt.d.ts +39 -0
  242. package/dist/esm/models/openresponsesprompt.d.ts.map +1 -0
  243. package/dist/esm/models/openresponsesprompt.js +36 -0
  244. package/dist/esm/models/openresponsesprompt.js.map +1 -0
  245. package/dist/esm/models/openresponsesreasoning.d.ts +0 -89
  246. package/dist/esm/models/openresponsesreasoning.d.ts.map +1 -1
  247. package/dist/esm/models/openresponsesreasoning.js +0 -93
  248. package/dist/esm/models/openresponsesreasoning.js.map +1 -1
  249. package/dist/esm/models/openresponsesrefusalcontent.d.ts +54 -0
  250. package/dist/esm/models/openresponsesrefusalcontent.d.ts.map +1 -0
  251. package/dist/esm/models/openresponsesrefusalcontent.js +51 -0
  252. package/dist/esm/models/openresponsesrefusalcontent.js.map +1 -0
  253. package/dist/esm/models/openresponsesrequest.d.ts +26 -335
  254. package/dist/esm/models/openresponsesrequest.d.ts.map +1 -1
  255. package/dist/esm/models/openresponsesrequest.js +23 -363
  256. package/dist/esm/models/openresponsesrequest.js.map +1 -1
  257. package/dist/esm/models/openresponsesservicetier.d.ts +25 -0
  258. package/dist/esm/models/openresponsesservicetier.d.ts.map +1 -0
  259. package/dist/esm/models/openresponsesservicetier.js +35 -0
  260. package/dist/esm/models/openresponsesservicetier.js.map +1 -0
  261. package/dist/esm/models/openresponsesstreamevent.d.ts +612 -25
  262. package/dist/esm/models/openresponsesstreamevent.d.ts.map +1 -1
  263. package/dist/esm/models/openresponsesstreamevent.js +745 -51
  264. package/dist/esm/models/openresponsesstreamevent.js.map +1 -1
  265. package/dist/esm/models/openresponsestextconfig.d.ts +59 -0
  266. package/dist/esm/models/openresponsestextconfig.d.ts.map +1 -0
  267. package/dist/esm/models/openresponsestextconfig.js +62 -0
  268. package/dist/esm/models/openresponsestextconfig.js.map +1 -0
  269. package/dist/esm/models/openresponsestoolchoice.d.ts +148 -0
  270. package/dist/esm/models/openresponsestoolchoice.d.ts.map +1 -0
  271. package/dist/esm/models/openresponsestoolchoice.js +139 -0
  272. package/dist/esm/models/openresponsestoolchoice.js.map +1 -0
  273. package/dist/esm/models/openresponsestoolunion.d.ts +95 -0
  274. package/dist/esm/models/openresponsestoolunion.d.ts.map +1 -0
  275. package/dist/esm/models/openresponsestoolunion.js +94 -0
  276. package/dist/esm/models/openresponsestoolunion.js.map +1 -0
  277. package/dist/esm/models/openresponsestruncation.d.ts +22 -0
  278. package/dist/esm/models/openresponsestruncation.d.ts.map +1 -0
  279. package/dist/esm/models/openresponsestruncation.js +32 -0
  280. package/dist/esm/models/openresponsestruncation.js.map +1 -0
  281. package/dist/esm/models/outputtextcontent.d.ts +80 -0
  282. package/dist/esm/models/outputtextcontent.d.ts.map +1 -0
  283. package/dist/esm/models/outputtextcontent.js +93 -0
  284. package/dist/esm/models/outputtextcontent.js.map +1 -0
  285. package/dist/esm/models/refusalcontent.d.ts +54 -0
  286. package/dist/esm/models/refusalcontent.d.ts.map +1 -0
  287. package/dist/esm/models/refusalcontent.js +51 -0
  288. package/dist/esm/models/refusalcontent.js.map +1 -0
  289. package/dist/esm/models/responseserrorfield.d.ts +0 -15
  290. package/dist/esm/models/responseserrorfield.d.ts.map +1 -1
  291. package/dist/esm/models/responseserrorfield.js +0 -15
  292. package/dist/esm/models/responseserrorfield.js.map +1 -1
  293. package/dist/esm/models/responsesoutputitem.d.ts +181 -28
  294. package/dist/esm/models/responsesoutputitem.d.ts.map +1 -1
  295. package/dist/esm/models/responsesoutputitem.js +188 -39
  296. package/dist/esm/models/responsesoutputitem.js.map +1 -1
  297. package/dist/esm/models/responsesusage.d.ts +131 -0
  298. package/dist/esm/models/responsesusage.d.ts.map +1 -0
  299. package/dist/esm/models/responsesusage.js +173 -0
  300. package/dist/esm/models/responsesusage.js.map +1 -0
  301. package/dist/esm/models/toolchoicetypes.d.ts +164 -0
  302. package/dist/esm/models/toolchoicetypes.d.ts.map +1 -0
  303. package/dist/esm/models/toolchoicetypes.js +168 -0
  304. package/dist/esm/models/toolchoicetypes.js.map +1 -0
  305. package/dist/esm/models/urlcitationannotation.d.ts +60 -0
  306. package/dist/esm/models/urlcitationannotation.d.ts.map +1 -0
  307. package/dist/esm/models/urlcitationannotation.js +68 -0
  308. package/dist/esm/models/urlcitationannotation.js.map +1 -0
  309. package/jsr.json +1 -1
  310. package/package.json +1 -1
  311. package/src/lib/config.ts +2 -2
  312. package/src/models/chatgenerationparams.ts +24 -32
  313. package/src/models/chatmessagetokenlogprob.ts +35 -24
  314. package/src/models/filecitationannotation.ts +116 -0
  315. package/src/models/filepathannotation.ts +110 -0
  316. package/src/models/index.ts +26 -35
  317. package/src/models/openresponseseasyinputmessage.ts +38 -238
  318. package/src/models/openresponsesformatjsonobject.ts +101 -0
  319. package/src/models/openresponsesformatjsonschema.ts +117 -0
  320. package/src/models/openresponsesformattext.ts +98 -0
  321. package/src/models/openresponsesformattextconfig.ts +95 -0
  322. package/src/models/{openairesponsesincludable.ts → openresponsesincludable.ts} +20 -16
  323. package/src/models/openresponsesinput.ts +78 -0
  324. package/src/models/openresponsesinputcontent.ts +117 -0
  325. package/src/models/openresponsesinputfile.ts +127 -0
  326. package/src/models/openresponsesinputimage.ts +161 -0
  327. package/src/models/openresponsesinputitem.ts +1084 -0
  328. package/src/models/openresponsesinputmessageitem.ts +16 -162
  329. package/src/models/openresponsesinputtext.ts +102 -0
  330. package/src/models/openresponseslogprobs.ts +75 -10
  331. package/src/models/openresponsesnonstreamingresponse.ts +168 -2758
  332. package/src/models/openresponsesoutputtext.ts +208 -0
  333. package/src/models/openresponsesprompt.ts +84 -0
  334. package/src/models/openresponsesreasoning.ts +0 -176
  335. package/src/models/openresponsesrefusalcontent.ts +101 -0
  336. package/src/models/openresponsesrequest.ts +67 -771
  337. package/src/models/openresponsesservicetier.ts +53 -0
  338. package/src/models/openresponsesstreamevent.ts +1608 -222
  339. package/src/models/openresponsestextconfig.ts +126 -0
  340. package/src/models/openresponsestoolchoice.ts +269 -0
  341. package/src/models/openresponsestoolunion.ts +215 -0
  342. package/src/models/openresponsestruncation.ts +48 -0
  343. package/src/models/outputtextcontent.ts +205 -0
  344. package/src/models/refusalcontent.ts +93 -0
  345. package/src/models/responseserrorfield.ts +0 -15
  346. package/src/models/responsesoutputitem.ts +379 -74
  347. package/src/models/responsesusage.ts +326 -0
  348. package/src/models/toolchoicetypes.ts +280 -0
  349. package/src/models/urlcitationannotation.ts +122 -0
  350. package/dist/commonjs/models/filecitation.d.ts +0 -58
  351. package/dist/commonjs/models/filecitation.d.ts.map +0 -1
  352. package/dist/commonjs/models/filecitation.js.map +0 -1
  353. package/dist/commonjs/models/filepath.d.ts +0 -56
  354. package/dist/commonjs/models/filepath.d.ts.map +0 -1
  355. package/dist/commonjs/models/filepath.js.map +0 -1
  356. package/dist/commonjs/models/openairesponsesannotation.d.ts +0 -28
  357. package/dist/commonjs/models/openairesponsesannotation.d.ts.map +0 -1
  358. package/dist/commonjs/models/openairesponsesannotation.js.map +0 -1
  359. package/dist/commonjs/models/openairesponsesincludable.d.ts +0 -25
  360. package/dist/commonjs/models/openairesponsesincludable.d.ts.map +0 -1
  361. package/dist/commonjs/models/openairesponsesincludable.js.map +0 -1
  362. package/dist/commonjs/models/openairesponsesprompt.d.ts +0 -83
  363. package/dist/commonjs/models/openairesponsesprompt.d.ts.map +0 -1
  364. package/dist/commonjs/models/openairesponsesprompt.js +0 -137
  365. package/dist/commonjs/models/openairesponsesprompt.js.map +0 -1
  366. package/dist/commonjs/models/openairesponsesrefusalcontent.d.ts +0 -54
  367. package/dist/commonjs/models/openairesponsesrefusalcontent.d.ts.map +0 -1
  368. package/dist/commonjs/models/openairesponsesrefusalcontent.js +0 -89
  369. package/dist/commonjs/models/openairesponsesrefusalcontent.js.map +0 -1
  370. package/dist/commonjs/models/openresponseserrorevent.d.ts +0 -63
  371. package/dist/commonjs/models/openresponseserrorevent.d.ts.map +0 -1
  372. package/dist/commonjs/models/openresponseserrorevent.js +0 -104
  373. package/dist/commonjs/models/openresponseserrorevent.js.map +0 -1
  374. package/dist/commonjs/models/openresponsesimagegencallcompleted.d.ts +0 -61
  375. package/dist/commonjs/models/openresponsesimagegencallcompleted.d.ts.map +0 -1
  376. package/dist/commonjs/models/openresponsesimagegencallcompleted.js +0 -106
  377. package/dist/commonjs/models/openresponsesimagegencallcompleted.js.map +0 -1
  378. package/dist/commonjs/models/openresponsesimagegencallgenerating.d.ts +0 -61
  379. package/dist/commonjs/models/openresponsesimagegencallgenerating.d.ts.map +0 -1
  380. package/dist/commonjs/models/openresponsesimagegencallgenerating.js +0 -107
  381. package/dist/commonjs/models/openresponsesimagegencallgenerating.js.map +0 -1
  382. package/dist/commonjs/models/openresponsesimagegencallinprogress.d.ts +0 -61
  383. package/dist/commonjs/models/openresponsesimagegencallinprogress.d.ts.map +0 -1
  384. package/dist/commonjs/models/openresponsesimagegencallinprogress.js +0 -107
  385. package/dist/commonjs/models/openresponsesimagegencallinprogress.js.map +0 -1
  386. package/dist/commonjs/models/openresponsesimagegencallpartialimage.d.ts +0 -65
  387. package/dist/commonjs/models/openresponsesimagegencallpartialimage.d.ts.map +0 -1
  388. package/dist/commonjs/models/openresponsesimagegencallpartialimage.js +0 -115
  389. package/dist/commonjs/models/openresponsesimagegencallpartialimage.js.map +0 -1
  390. package/dist/commonjs/models/openresponsesinputunion.d.ts +0 -360
  391. package/dist/commonjs/models/openresponsesinputunion.d.ts.map +0 -1
  392. package/dist/commonjs/models/openresponsesinputunion.js +0 -460
  393. package/dist/commonjs/models/openresponsesinputunion.js.map +0 -1
  394. package/dist/commonjs/models/openresponsesoutputitemreasoning.d.ts +0 -154
  395. package/dist/commonjs/models/openresponsesoutputitemreasoning.d.ts.map +0 -1
  396. package/dist/commonjs/models/openresponsesoutputitemreasoning.js +0 -204
  397. package/dist/commonjs/models/openresponsesoutputitemreasoning.js.map +0 -1
  398. package/dist/commonjs/models/openresponsesoutputmessage.d.ts +0 -195
  399. package/dist/commonjs/models/openresponsesoutputmessage.d.ts.map +0 -1
  400. package/dist/commonjs/models/openresponsesoutputmessage.js +0 -246
  401. package/dist/commonjs/models/openresponsesoutputmessage.js.map +0 -1
  402. package/dist/commonjs/models/openresponsesreasoningdeltaevent.d.ts +0 -65
  403. package/dist/commonjs/models/openresponsesreasoningdeltaevent.d.ts.map +0 -1
  404. package/dist/commonjs/models/openresponsesreasoningdeltaevent.js +0 -112
  405. package/dist/commonjs/models/openresponsesreasoningdeltaevent.js.map +0 -1
  406. package/dist/commonjs/models/openresponsesreasoningdoneevent.d.ts +0 -65
  407. package/dist/commonjs/models/openresponsesreasoningdoneevent.d.ts.map +0 -1
  408. package/dist/commonjs/models/openresponsesreasoningdoneevent.js +0 -112
  409. package/dist/commonjs/models/openresponsesreasoningdoneevent.js.map +0 -1
  410. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.d.ts +0 -66
  411. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.d.ts.map +0 -1
  412. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.js +0 -114
  413. package/dist/commonjs/models/openresponsesreasoningsummarypartaddedevent.js.map +0 -1
  414. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.d.ts +0 -65
  415. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.d.ts.map +0 -1
  416. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.js +0 -113
  417. package/dist/commonjs/models/openresponsesreasoningsummarytextdeltaevent.js.map +0 -1
  418. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.d.ts +0 -65
  419. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.d.ts.map +0 -1
  420. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.js +0 -113
  421. package/dist/commonjs/models/openresponsesreasoningsummarytextdoneevent.js.map +0 -1
  422. package/dist/commonjs/models/openresponsesresponsetext.d.ts +0 -59
  423. package/dist/commonjs/models/openresponsesresponsetext.d.ts.map +0 -1
  424. package/dist/commonjs/models/openresponsesresponsetext.js +0 -102
  425. package/dist/commonjs/models/openresponsesresponsetext.js.map +0 -1
  426. package/dist/commonjs/models/openresponsestoplogprobs.d.ts +0 -34
  427. package/dist/commonjs/models/openresponsestoplogprobs.d.ts.map +0 -1
  428. package/dist/commonjs/models/openresponsestoplogprobs.js.map +0 -1
  429. package/dist/commonjs/models/outputitemimagegenerationcall.d.ts +0 -59
  430. package/dist/commonjs/models/outputitemimagegenerationcall.d.ts.map +0 -1
  431. package/dist/commonjs/models/outputitemimagegenerationcall.js +0 -94
  432. package/dist/commonjs/models/outputitemimagegenerationcall.js.map +0 -1
  433. package/dist/commonjs/models/outputmessage.d.ts +0 -192
  434. package/dist/commonjs/models/outputmessage.d.ts.map +0 -1
  435. package/dist/commonjs/models/outputmessage.js +0 -243
  436. package/dist/commonjs/models/outputmessage.js.map +0 -1
  437. package/dist/commonjs/models/responseformattextconfig.d.ts +0 -31
  438. package/dist/commonjs/models/responseformattextconfig.d.ts.map +0 -1
  439. package/dist/commonjs/models/responseformattextconfig.js +0 -76
  440. package/dist/commonjs/models/responseformattextconfig.js.map +0 -1
  441. package/dist/commonjs/models/responseinputfile.d.ts +0 -63
  442. package/dist/commonjs/models/responseinputfile.d.ts.map +0 -1
  443. package/dist/commonjs/models/responseinputfile.js.map +0 -1
  444. package/dist/commonjs/models/responseinputimage.d.ts +0 -79
  445. package/dist/commonjs/models/responseinputimage.d.ts.map +0 -1
  446. package/dist/commonjs/models/responseinputimage.js +0 -128
  447. package/dist/commonjs/models/responseinputimage.js.map +0 -1
  448. package/dist/commonjs/models/responseinputtext.d.ts +0 -57
  449. package/dist/commonjs/models/responseinputtext.d.ts.map +0 -1
  450. package/dist/commonjs/models/responseinputtext.js +0 -89
  451. package/dist/commonjs/models/responseinputtext.js.map +0 -1
  452. package/dist/commonjs/models/responseoutputtext.d.ts +0 -57
  453. package/dist/commonjs/models/responseoutputtext.d.ts.map +0 -1
  454. package/dist/commonjs/models/responseoutputtext.js +0 -92
  455. package/dist/commonjs/models/responseoutputtext.js.map +0 -1
  456. package/dist/commonjs/models/responsesformatjsonobject.d.ts +0 -55
  457. package/dist/commonjs/models/responsesformatjsonobject.d.ts.map +0 -1
  458. package/dist/commonjs/models/responsesformatjsonobject.js +0 -87
  459. package/dist/commonjs/models/responsesformatjsonobject.js.map +0 -1
  460. package/dist/commonjs/models/responsesformattext.d.ts +0 -55
  461. package/dist/commonjs/models/responsesformattext.d.ts.map +0 -1
  462. package/dist/commonjs/models/responsesformattext.js +0 -87
  463. package/dist/commonjs/models/responsesformattext.js.map +0 -1
  464. package/dist/commonjs/models/responsesformattextjsonschemaconfig.d.ts +0 -67
  465. package/dist/commonjs/models/responsesformattextjsonschemaconfig.d.ts.map +0 -1
  466. package/dist/commonjs/models/responsesformattextjsonschemaconfig.js +0 -96
  467. package/dist/commonjs/models/responsesformattextjsonschemaconfig.js.map +0 -1
  468. package/dist/commonjs/models/responsetextconfig.d.ts +0 -59
  469. package/dist/commonjs/models/responsetextconfig.d.ts.map +0 -1
  470. package/dist/commonjs/models/responsetextconfig.js +0 -100
  471. package/dist/commonjs/models/responsetextconfig.js.map +0 -1
  472. package/dist/commonjs/models/servicetier.d.ts +0 -25
  473. package/dist/commonjs/models/servicetier.d.ts.map +0 -1
  474. package/dist/commonjs/models/servicetier.js.map +0 -1
  475. package/dist/commonjs/models/truncation.d.ts +0 -22
  476. package/dist/commonjs/models/truncation.d.ts.map +0 -1
  477. package/dist/commonjs/models/truncation.js.map +0 -1
  478. package/dist/commonjs/models/urlcitation.d.ts +0 -60
  479. package/dist/commonjs/models/urlcitation.d.ts.map +0 -1
  480. package/dist/commonjs/models/urlcitation.js.map +0 -1
  481. package/dist/esm/models/filecitation.d.ts +0 -58
  482. package/dist/esm/models/filecitation.d.ts.map +0 -1
  483. package/dist/esm/models/filecitation.js +0 -64
  484. package/dist/esm/models/filecitation.js.map +0 -1
  485. package/dist/esm/models/filepath.d.ts +0 -56
  486. package/dist/esm/models/filepath.d.ts.map +0 -1
  487. package/dist/esm/models/filepath.js +0 -62
  488. package/dist/esm/models/filepath.js.map +0 -1
  489. package/dist/esm/models/openairesponsesannotation.d.ts +0 -28
  490. package/dist/esm/models/openairesponsesannotation.d.ts.map +0 -1
  491. package/dist/esm/models/openairesponsesannotation.js +0 -38
  492. package/dist/esm/models/openairesponsesannotation.js.map +0 -1
  493. package/dist/esm/models/openairesponsesincludable.d.ts +0 -25
  494. package/dist/esm/models/openairesponsesincludable.d.ts.map +0 -1
  495. package/dist/esm/models/openairesponsesincludable.js +0 -35
  496. package/dist/esm/models/openairesponsesincludable.js.map +0 -1
  497. package/dist/esm/models/openairesponsesprompt.d.ts +0 -83
  498. package/dist/esm/models/openairesponsesprompt.d.ts.map +0 -1
  499. package/dist/esm/models/openairesponsesprompt.js +0 -97
  500. package/dist/esm/models/openairesponsesprompt.js.map +0 -1
  501. package/dist/esm/models/openairesponsesrefusalcontent.d.ts +0 -54
  502. package/dist/esm/models/openairesponsesrefusalcontent.d.ts.map +0 -1
  503. package/dist/esm/models/openairesponsesrefusalcontent.js +0 -51
  504. package/dist/esm/models/openairesponsesrefusalcontent.js.map +0 -1
  505. package/dist/esm/models/openresponseserrorevent.d.ts +0 -63
  506. package/dist/esm/models/openresponseserrorevent.d.ts.map +0 -1
  507. package/dist/esm/models/openresponseserrorevent.js +0 -66
  508. package/dist/esm/models/openresponseserrorevent.js.map +0 -1
  509. package/dist/esm/models/openresponsesimagegencallcompleted.d.ts +0 -61
  510. package/dist/esm/models/openresponsesimagegencallcompleted.d.ts.map +0 -1
  511. package/dist/esm/models/openresponsesimagegencallcompleted.js +0 -68
  512. package/dist/esm/models/openresponsesimagegencallcompleted.js.map +0 -1
  513. package/dist/esm/models/openresponsesimagegencallgenerating.d.ts +0 -61
  514. package/dist/esm/models/openresponsesimagegencallgenerating.d.ts.map +0 -1
  515. package/dist/esm/models/openresponsesimagegencallgenerating.js +0 -69
  516. package/dist/esm/models/openresponsesimagegencallgenerating.js.map +0 -1
  517. package/dist/esm/models/openresponsesimagegencallinprogress.d.ts +0 -61
  518. package/dist/esm/models/openresponsesimagegencallinprogress.d.ts.map +0 -1
  519. package/dist/esm/models/openresponsesimagegencallinprogress.js +0 -69
  520. package/dist/esm/models/openresponsesimagegencallinprogress.js.map +0 -1
  521. package/dist/esm/models/openresponsesimagegencallpartialimage.d.ts +0 -65
  522. package/dist/esm/models/openresponsesimagegencallpartialimage.d.ts.map +0 -1
  523. package/dist/esm/models/openresponsesimagegencallpartialimage.js +0 -77
  524. package/dist/esm/models/openresponsesimagegencallpartialimage.js.map +0 -1
  525. package/dist/esm/models/openresponsesinputunion.d.ts +0 -360
  526. package/dist/esm/models/openresponsesinputunion.d.ts.map +0 -1
  527. package/dist/esm/models/openresponsesinputunion.js +0 -410
  528. package/dist/esm/models/openresponsesinputunion.js.map +0 -1
  529. package/dist/esm/models/openresponsesoutputitemreasoning.d.ts +0 -154
  530. package/dist/esm/models/openresponsesoutputitemreasoning.d.ts.map +0 -1
  531. package/dist/esm/models/openresponsesoutputitemreasoning.js +0 -164
  532. package/dist/esm/models/openresponsesoutputitemreasoning.js.map +0 -1
  533. package/dist/esm/models/openresponsesoutputmessage.d.ts +0 -195
  534. package/dist/esm/models/openresponsesoutputmessage.d.ts.map +0 -1
  535. package/dist/esm/models/openresponsesoutputmessage.js +0 -204
  536. package/dist/esm/models/openresponsesoutputmessage.js.map +0 -1
  537. package/dist/esm/models/openresponsesreasoningdeltaevent.d.ts +0 -65
  538. package/dist/esm/models/openresponsesreasoningdeltaevent.d.ts.map +0 -1
  539. package/dist/esm/models/openresponsesreasoningdeltaevent.js +0 -74
  540. package/dist/esm/models/openresponsesreasoningdeltaevent.js.map +0 -1
  541. package/dist/esm/models/openresponsesreasoningdoneevent.d.ts +0 -65
  542. package/dist/esm/models/openresponsesreasoningdoneevent.d.ts.map +0 -1
  543. package/dist/esm/models/openresponsesreasoningdoneevent.js +0 -74
  544. package/dist/esm/models/openresponsesreasoningdoneevent.js.map +0 -1
  545. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +0 -66
  546. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts.map +0 -1
  547. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.js +0 -76
  548. package/dist/esm/models/openresponsesreasoningsummarypartaddedevent.js.map +0 -1
  549. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +0 -65
  550. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts.map +0 -1
  551. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.js +0 -75
  552. package/dist/esm/models/openresponsesreasoningsummarytextdeltaevent.js.map +0 -1
  553. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +0 -65
  554. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts.map +0 -1
  555. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.js +0 -75
  556. package/dist/esm/models/openresponsesreasoningsummarytextdoneevent.js.map +0 -1
  557. package/dist/esm/models/openresponsesresponsetext.d.ts +0 -59
  558. package/dist/esm/models/openresponsesresponsetext.d.ts.map +0 -1
  559. package/dist/esm/models/openresponsesresponsetext.js +0 -64
  560. package/dist/esm/models/openresponsesresponsetext.js.map +0 -1
  561. package/dist/esm/models/openresponsestoplogprobs.d.ts +0 -34
  562. package/dist/esm/models/openresponsestoplogprobs.d.ts.map +0 -1
  563. package/dist/esm/models/openresponsestoplogprobs.js +0 -33
  564. package/dist/esm/models/openresponsestoplogprobs.js.map +0 -1
  565. package/dist/esm/models/outputitemimagegenerationcall.d.ts +0 -59
  566. package/dist/esm/models/outputitemimagegenerationcall.d.ts.map +0 -1
  567. package/dist/esm/models/outputitemimagegenerationcall.js +0 -56
  568. package/dist/esm/models/outputitemimagegenerationcall.js.map +0 -1
  569. package/dist/esm/models/outputmessage.d.ts +0 -192
  570. package/dist/esm/models/outputmessage.d.ts.map +0 -1
  571. package/dist/esm/models/outputmessage.js +0 -201
  572. package/dist/esm/models/outputmessage.js.map +0 -1
  573. package/dist/esm/models/responseformattextconfig.d.ts +0 -31
  574. package/dist/esm/models/responseformattextconfig.d.ts.map +0 -1
  575. package/dist/esm/models/responseformattextconfig.js +0 -38
  576. package/dist/esm/models/responseformattextconfig.js.map +0 -1
  577. package/dist/esm/models/responseinputfile.d.ts +0 -63
  578. package/dist/esm/models/responseinputfile.d.ts.map +0 -1
  579. package/dist/esm/models/responseinputfile.js +0 -70
  580. package/dist/esm/models/responseinputfile.js.map +0 -1
  581. package/dist/esm/models/responseinputimage.d.ts +0 -79
  582. package/dist/esm/models/responseinputimage.d.ts.map +0 -1
  583. package/dist/esm/models/responseinputimage.js +0 -90
  584. package/dist/esm/models/responseinputimage.js.map +0 -1
  585. package/dist/esm/models/responseinputtext.d.ts +0 -57
  586. package/dist/esm/models/responseinputtext.d.ts.map +0 -1
  587. package/dist/esm/models/responseinputtext.js +0 -51
  588. package/dist/esm/models/responseinputtext.js.map +0 -1
  589. package/dist/esm/models/responseoutputtext.d.ts +0 -57
  590. package/dist/esm/models/responseoutputtext.d.ts.map +0 -1
  591. package/dist/esm/models/responseoutputtext.js +0 -54
  592. package/dist/esm/models/responseoutputtext.js.map +0 -1
  593. package/dist/esm/models/responsesformatjsonobject.d.ts +0 -55
  594. package/dist/esm/models/responsesformatjsonobject.d.ts.map +0 -1
  595. package/dist/esm/models/responsesformatjsonobject.js +0 -49
  596. package/dist/esm/models/responsesformatjsonobject.js.map +0 -1
  597. package/dist/esm/models/responsesformattext.d.ts +0 -55
  598. package/dist/esm/models/responsesformattext.d.ts.map +0 -1
  599. package/dist/esm/models/responsesformattext.js +0 -49
  600. package/dist/esm/models/responsesformattext.js.map +0 -1
  601. package/dist/esm/models/responsesformattextjsonschemaconfig.d.ts +0 -67
  602. package/dist/esm/models/responsesformattextjsonschemaconfig.d.ts.map +0 -1
  603. package/dist/esm/models/responsesformattextjsonschemaconfig.js +0 -58
  604. package/dist/esm/models/responsesformattextjsonschemaconfig.js.map +0 -1
  605. package/dist/esm/models/responsetextconfig.d.ts +0 -59
  606. package/dist/esm/models/responsetextconfig.d.ts.map +0 -1
  607. package/dist/esm/models/responsetextconfig.js +0 -62
  608. package/dist/esm/models/responsetextconfig.js.map +0 -1
  609. package/dist/esm/models/servicetier.d.ts +0 -25
  610. package/dist/esm/models/servicetier.d.ts.map +0 -1
  611. package/dist/esm/models/servicetier.js +0 -35
  612. package/dist/esm/models/servicetier.js.map +0 -1
  613. package/dist/esm/models/truncation.d.ts +0 -22
  614. package/dist/esm/models/truncation.d.ts.map +0 -1
  615. package/dist/esm/models/truncation.js +0 -32
  616. package/dist/esm/models/truncation.js.map +0 -1
  617. package/dist/esm/models/urlcitation.d.ts +0 -60
  618. package/dist/esm/models/urlcitation.d.ts.map +0 -1
  619. package/dist/esm/models/urlcitation.js +0 -68
  620. package/dist/esm/models/urlcitation.js.map +0 -1
  621. package/src/models/filecitation.ts +0 -110
  622. package/src/models/filepath.ts +0 -104
  623. package/src/models/openairesponsesannotation.ts +0 -87
  624. package/src/models/openairesponsesprompt.ts +0 -228
  625. package/src/models/openairesponsesrefusalcontent.ts +0 -102
  626. package/src/models/openresponseserrorevent.ts +0 -123
  627. package/src/models/openresponsesimagegencallcompleted.ts +0 -131
  628. package/src/models/openresponsesimagegencallgenerating.ts +0 -131
  629. package/src/models/openresponsesimagegencallinprogress.ts +0 -131
  630. package/src/models/openresponsesimagegencallpartialimage.ts +0 -143
  631. package/src/models/openresponsesinputunion.ts +0 -858
  632. package/src/models/openresponsesoutputitemreasoning.ts +0 -323
  633. package/src/models/openresponsesoutputmessage.ts +0 -400
  634. package/src/models/openresponsesreasoningdeltaevent.ts +0 -138
  635. package/src/models/openresponsesreasoningdoneevent.ts +0 -137
  636. package/src/models/openresponsesreasoningsummarypartaddedevent.ts +0 -154
  637. package/src/models/openresponsesreasoningsummarytextdeltaevent.ts +0 -148
  638. package/src/models/openresponsesreasoningsummarytextdoneevent.ts +0 -145
  639. package/src/models/openresponsesresponsetext.ts +0 -131
  640. package/src/models/openresponsestoplogprobs.ts +0 -73
  641. package/src/models/outputitemimagegenerationcall.ts +0 -115
  642. package/src/models/outputmessage.ts +0 -372
  643. package/src/models/responseformattextconfig.ts +0 -93
  644. package/src/models/responseinputfile.ts +0 -125
  645. package/src/models/responseinputimage.ts +0 -159
  646. package/src/models/responseinputtext.ts +0 -100
  647. package/src/models/responseoutputtext.ts +0 -107
  648. package/src/models/responsesformatjsonobject.ts +0 -98
  649. package/src/models/responsesformattext.ts +0 -98
  650. package/src/models/responsesformattextjsonschemaconfig.ts +0 -121
  651. package/src/models/responsetextconfig.ts +0 -128
  652. package/src/models/servicetier.ts +0 -51
  653. package/src/models/truncation.ts +0 -48
  654. package/src/models/urlcitation.ts +0 -116
@@ -14,70 +14,41 @@ import {
14
14
  import { Result as SafeParseResult } from "../types/fp.js";
15
15
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
16
16
  import {
17
- OpenAIResponsesPrompt,
18
- OpenAIResponsesPrompt$inboundSchema,
19
- OpenAIResponsesPrompt$Outbound,
20
- OpenAIResponsesPrompt$outboundSchema,
21
- } from "./openairesponsesprompt.js";
17
+ OpenResponsesInput,
18
+ OpenResponsesInput$inboundSchema,
19
+ OpenResponsesInput$Outbound,
20
+ OpenResponsesInput$outboundSchema,
21
+ } from "./openresponsesinput.js";
22
22
  import {
23
- OpenResponsesWebSearch20250826Tool,
24
- OpenResponsesWebSearch20250826Tool$inboundSchema,
25
- OpenResponsesWebSearch20250826Tool$Outbound,
26
- OpenResponsesWebSearch20250826Tool$outboundSchema,
27
- } from "./openresponseswebsearch20250826tool.js";
23
+ OpenResponsesPrompt,
24
+ OpenResponsesPrompt$inboundSchema,
25
+ OpenResponsesPrompt$Outbound,
26
+ OpenResponsesPrompt$outboundSchema,
27
+ } from "./openresponsesprompt.js";
28
28
  import {
29
- OpenResponsesWebSearchPreview20250311Tool,
30
- OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
31
- OpenResponsesWebSearchPreview20250311Tool$Outbound,
32
- OpenResponsesWebSearchPreview20250311Tool$outboundSchema,
33
- } from "./openresponseswebsearchpreview20250311tool.js";
29
+ OpenResponsesReasoningConfig,
30
+ OpenResponsesReasoningConfig$inboundSchema,
31
+ OpenResponsesReasoningConfig$Outbound,
32
+ OpenResponsesReasoningConfig$outboundSchema,
33
+ } from "./openresponsesreasoningconfig.js";
34
34
  import {
35
- OpenResponsesWebSearchPreviewTool,
36
- OpenResponsesWebSearchPreviewTool$inboundSchema,
37
- OpenResponsesWebSearchPreviewTool$Outbound,
38
- OpenResponsesWebSearchPreviewTool$outboundSchema,
39
- } from "./openresponseswebsearchpreviewtool.js";
35
+ OpenResponsesTextConfig,
36
+ OpenResponsesTextConfig$inboundSchema,
37
+ OpenResponsesTextConfig$Outbound,
38
+ OpenResponsesTextConfig$outboundSchema,
39
+ } from "./openresponsestextconfig.js";
40
40
  import {
41
- OpenResponsesWebSearchTool,
42
- OpenResponsesWebSearchTool$inboundSchema,
43
- OpenResponsesWebSearchTool$Outbound,
44
- OpenResponsesWebSearchTool$outboundSchema,
45
- } from "./openresponseswebsearchtool.js";
41
+ OpenResponsesToolChoice,
42
+ OpenResponsesToolChoice$inboundSchema,
43
+ OpenResponsesToolChoice$Outbound,
44
+ OpenResponsesToolChoice$outboundSchema,
45
+ } from "./openresponsestoolchoice.js";
46
46
  import {
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";
47
+ OpenResponsesToolUnion,
48
+ OpenResponsesToolUnion$inboundSchema,
49
+ OpenResponsesToolUnion$Outbound,
50
+ OpenResponsesToolUnion$outboundSchema,
51
+ } from "./openresponsestoolunion.js";
81
52
  import {
82
53
  ResponsesErrorField,
83
54
  ResponsesErrorField$inboundSchema,
@@ -91,16 +62,11 @@ import {
91
62
  ResponsesOutputItem$outboundSchema,
92
63
  } from "./responsesoutputitem.js";
93
64
  import {
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";
65
+ ResponsesUsage,
66
+ ResponsesUsage$inboundSchema,
67
+ ResponsesUsage$Outbound,
68
+ ResponsesUsage$outboundSchema,
69
+ } from "./responsesusage.js";
104
70
 
105
71
  export const ObjectT = {
106
72
  Response: "response",
@@ -129,323 +95,26 @@ export type IncompleteDetails = {
129
95
  reason?: Reason | undefined;
130
96
  };
131
97
 
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 = {
98
+ export const ServiceTier = {
426
99
  Auto: "auto",
427
100
  Default: "default",
428
101
  Flex: "flex",
429
102
  Priority: "priority",
430
103
  Scale: "scale",
431
104
  } as const;
432
- export type OpenResponsesNonStreamingResponseServiceTier = OpenEnum<
433
- typeof OpenResponsesNonStreamingResponseServiceTier
434
- >;
105
+ export type ServiceTier = OpenEnum<typeof ServiceTier>;
435
106
 
436
- export const OpenResponsesNonStreamingResponseTruncation = {
107
+ export const Truncation = {
437
108
  Auto: "auto",
438
109
  Disabled: "disabled",
439
110
  } as const;
440
- export type OpenResponsesNonStreamingResponseTruncation = OpenEnum<
441
- typeof OpenResponsesNonStreamingResponseTruncation
442
- >;
111
+ export type Truncation = OpenEnum<typeof Truncation>;
443
112
 
444
113
  /**
445
114
  * Complete non-streaming response from the Responses API
446
115
  */
447
116
  export type OpenResponsesNonStreamingResponse = {
448
- id: string;
117
+ id?: string | undefined;
449
118
  object: ObjectT;
450
119
  createdAt: number;
451
120
  model: string;
@@ -460,54 +129,46 @@ export type OpenResponsesNonStreamingResponse = {
460
129
  */
461
130
  error: ResponsesErrorField | null;
462
131
  incompleteDetails: IncompleteDetails | null;
463
- usage?: Usage | undefined;
132
+ /**
133
+ * Token usage information for the response
134
+ */
135
+ usage?: ResponsesUsage | undefined;
464
136
  maxToolCalls?: number | null | undefined;
465
137
  topLogprobs?: number | undefined;
466
138
  maxOutputTokens?: number | null | undefined;
467
139
  temperature: number | null;
468
140
  topP: number | null;
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;
141
+ /**
142
+ * Input for a response request - can be a string or array of items
143
+ */
144
+ instructions?: OpenResponsesInput | null | undefined;
482
145
  /**
483
146
  * 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.
484
147
  */
485
148
  metadata: { [k: string]: string } | null;
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;
149
+ tools: Array<OpenResponsesToolUnion>;
150
+ /**
151
+ * Controls which tool the model should call
152
+ */
153
+ toolChoice: OpenResponsesToolChoice;
499
154
  parallelToolCalls: boolean;
500
- prompt?: OpenAIResponsesPrompt | null | undefined;
155
+ /**
156
+ * Prompt template with variables for the response
157
+ */
158
+ prompt?: OpenResponsesPrompt | null | undefined;
501
159
  background?: boolean | null | undefined;
502
160
  previousResponseId?: string | null | undefined;
503
- reasoning?: OpenResponsesNonStreamingResponseReasoning | null | undefined;
504
- serviceTier?: OpenResponsesNonStreamingResponseServiceTier | null | undefined;
161
+ /**
162
+ * Configuration for reasoning mode in the response
163
+ */
164
+ reasoning?: OpenResponsesReasoningConfig | null | undefined;
165
+ serviceTier?: ServiceTier | null | undefined;
505
166
  store?: boolean | undefined;
506
- truncation?: OpenResponsesNonStreamingResponseTruncation | null | undefined;
167
+ truncation?: Truncation | null | undefined;
507
168
  /**
508
169
  * Text output configuration including format and verbosity
509
170
  */
510
- text?: ResponseTextConfig | undefined;
171
+ text?: OpenResponsesTextConfig | undefined;
511
172
  };
512
173
 
513
174
  /** @internal */
@@ -643,2316 +304,130 @@ export function incompleteDetailsFromJSON(
643
304
  }
644
305
 
645
306
  /** @internal */
646
- export const InputTokensDetails$inboundSchema: z.ZodType<
647
- InputTokensDetails,
307
+ export const ServiceTier$inboundSchema: z.ZodType<
308
+ ServiceTier,
648
309
  z.ZodTypeDef,
649
310
  unknown
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
- };
311
+ > = z
312
+ .union([
313
+ z.nativeEnum(ServiceTier),
314
+ z.string().transform(catchUnrecognizedEnum),
315
+ ]);
662
316
 
663
317
  /** @internal */
664
- export const InputTokensDetails$outboundSchema: z.ZodType<
665
- InputTokensDetails$Outbound,
318
+ export const ServiceTier$outboundSchema: z.ZodType<
319
+ ServiceTier,
666
320
  z.ZodTypeDef,
667
- InputTokensDetails
668
- > = z.object({
669
- cachedTokens: z.number(),
670
- }).transform((v) => {
671
- return remap$(v, {
672
- cachedTokens: "cached_tokens",
673
- });
674
- });
321
+ ServiceTier
322
+ > = z.union([
323
+ z.nativeEnum(ServiceTier),
324
+ z.string().and(z.custom<Unrecognized<string>>()),
325
+ ]);
675
326
 
676
327
  /**
677
328
  * @internal
678
329
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
679
330
  */
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
- );
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;
705
336
  }
706
337
 
707
338
  /** @internal */
708
- export const OutputTokensDetails$inboundSchema: z.ZodType<
709
- OutputTokensDetails,
339
+ export const Truncation$inboundSchema: z.ZodType<
340
+ Truncation,
710
341
  z.ZodTypeDef,
711
342
  unknown
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
- };
724
-
725
- /** @internal */
726
- export const OutputTokensDetails$outboundSchema: z.ZodType<
727
- OutputTokensDetails$Outbound,
728
- z.ZodTypeDef,
729
- OutputTokensDetails
730
- > = z.object({
731
- reasoningTokens: z.number(),
732
- }).transform((v) => {
733
- return remap$(v, {
734
- reasoningTokens: "reasoning_tokens",
735
- });
736
- });
737
-
738
- /**
739
- * @internal
740
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
741
- */
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
- );
767
- }
768
-
769
- /** @internal */
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
- };
343
+ > = z
344
+ .union([
345
+ z.nativeEnum(Truncation),
346
+ z.string().transform(catchUnrecognizedEnum),
347
+ ]);
795
348
 
796
349
  /** @internal */
797
- export const Usage$outboundSchema: z.ZodType<
798
- Usage$Outbound,
350
+ export const Truncation$outboundSchema: z.ZodType<
351
+ Truncation,
799
352
  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;
353
+ Truncation
354
+ > = z.union([
355
+ z.nativeEnum(Truncation),
356
+ z.string().and(z.custom<Unrecognized<string>>()),
357
+ ]);
853
358
 
854
359
  /**
855
360
  * @internal
856
361
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
857
362
  */
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;
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;
863
368
  }
864
369
 
865
370
  /** @internal */
866
- export const InstructionsFunctionCall$inboundSchema: z.ZodType<
867
- InstructionsFunctionCall,
371
+ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType<
372
+ OpenResponsesNonStreamingResponse,
868
373
  z.ZodTypeDef,
869
374
  unknown
870
375
  > = z.object({
871
- type: InstructionsTypeFunctionCall$inboundSchema,
872
- call_id: z.string(),
873
- name: z.string(),
874
- arguments: z.string(),
875
376
  id: z.string().optional(),
876
- status: ToolCallStatus$inboundSchema.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(),
877
407
  }).transform((v) => {
878
408
  return remap$(v, {
879
- "call_id": "callId",
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",
880
422
  });
881
423
  });
882
424
 
883
425
  /** @internal */
884
- export type InstructionsFunctionCall$Outbound = {
885
- type: string;
886
- call_id: string;
887
- name: string;
888
- arguments: string;
426
+ export type OpenResponsesNonStreamingResponse$Outbound = {
889
427
  id?: string | undefined;
890
- status?: string | undefined;
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;
428
+ object: string;
429
+ created_at: number;
430
+ model: string;
2956
431
  status?: string | undefined;
2957
432
  output: Array<ResponsesOutputItem$Outbound>;
2958
433
  user?: string | null | undefined;
@@ -2961,51 +436,25 @@ export type OpenResponsesNonStreamingResponse$Outbound = {
2961
436
  safety_identifier?: string | null | undefined;
2962
437
  error: ResponsesErrorField$Outbound | null;
2963
438
  incomplete_details: IncompleteDetails$Outbound | null;
2964
- usage?: Usage$Outbound | undefined;
439
+ usage?: ResponsesUsage$Outbound | undefined;
2965
440
  max_tool_calls?: number | null | undefined;
2966
441
  top_logprobs?: number | undefined;
2967
442
  max_output_tokens?: number | null | undefined;
2968
443
  temperature: number | null;
2969
444
  top_p: number | null;
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;
445
+ instructions?: OpenResponsesInput$Outbound | null | undefined;
2983
446
  metadata: { [k: string]: string } | null;
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;
447
+ tools: Array<OpenResponsesToolUnion$Outbound>;
448
+ tool_choice: OpenResponsesToolChoice$Outbound;
2997
449
  parallel_tool_calls: boolean;
2998
- prompt?: OpenAIResponsesPrompt$Outbound | null | undefined;
450
+ prompt?: OpenResponsesPrompt$Outbound | null | undefined;
2999
451
  background?: boolean | null | undefined;
3000
452
  previous_response_id?: string | null | undefined;
3001
- reasoning?:
3002
- | OpenResponsesNonStreamingResponseReasoning$Outbound
3003
- | null
3004
- | undefined;
453
+ reasoning?: OpenResponsesReasoningConfig$Outbound | null | undefined;
3005
454
  service_tier?: string | null | undefined;
3006
455
  store?: boolean | undefined;
3007
456
  truncation?: string | null | undefined;
3008
- text?: ResponseTextConfig$Outbound | undefined;
457
+ text?: OpenResponsesTextConfig$Outbound | undefined;
3009
458
  };
3010
459
 
3011
460
  /** @internal */
@@ -3014,7 +463,7 @@ export const OpenResponsesNonStreamingResponse$outboundSchema: z.ZodType<
3014
463
  z.ZodTypeDef,
3015
464
  OpenResponsesNonStreamingResponse
3016
465
  > = z.object({
3017
- id: z.string(),
466
+ id: z.string().optional(),
3018
467
  object: ObjectT$outboundSchema,
3019
468
  createdAt: z.number(),
3020
469
  model: z.string(),
@@ -3026,64 +475,25 @@ export const OpenResponsesNonStreamingResponse$outboundSchema: z.ZodType<
3026
475
  safetyIdentifier: z.nullable(z.string()).optional(),
3027
476
  error: z.nullable(ResponsesErrorField$outboundSchema),
3028
477
  incompleteDetails: z.nullable(z.lazy(() => IncompleteDetails$outboundSchema)),
3029
- usage: z.lazy(() => Usage$outboundSchema).optional(),
478
+ usage: ResponsesUsage$outboundSchema.optional(),
3030
479
  maxToolCalls: z.nullable(z.number()).optional(),
3031
480
  topLogprobs: z.number().optional(),
3032
481
  maxOutputTokens: z.nullable(z.number()).optional(),
3033
482
  temperature: z.nullable(z.number()),
3034
483
  topP: z.nullable(z.number()),
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(),
484
+ instructions: z.nullable(OpenResponsesInput$outboundSchema).optional(),
3051
485
  metadata: z.nullable(z.record(z.string())),
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
- ]),
486
+ tools: z.array(OpenResponsesToolUnion$outboundSchema),
487
+ toolChoice: OpenResponsesToolChoice$outboundSchema,
3072
488
  parallelToolCalls: z.boolean(),
3073
- prompt: z.nullable(OpenAIResponsesPrompt$outboundSchema).optional(),
489
+ prompt: z.nullable(OpenResponsesPrompt$outboundSchema).optional(),
3074
490
  background: z.nullable(z.boolean()).optional(),
3075
491
  previousResponseId: z.nullable(z.string()).optional(),
3076
- reasoning: z.nullable(
3077
- z.lazy(() => OpenResponsesNonStreamingResponseReasoning$outboundSchema),
3078
- ).optional(),
3079
- serviceTier: z.nullable(
3080
- OpenResponsesNonStreamingResponseServiceTier$outboundSchema,
3081
- ).optional(),
492
+ reasoning: z.nullable(OpenResponsesReasoningConfig$outboundSchema).optional(),
493
+ serviceTier: z.nullable(ServiceTier$outboundSchema).optional(),
3082
494
  store: z.boolean().optional(),
3083
- truncation: z.nullable(
3084
- OpenResponsesNonStreamingResponseTruncation$outboundSchema,
3085
- ).optional(),
3086
- text: ResponseTextConfig$outboundSchema.optional(),
495
+ truncation: z.nullable(Truncation$outboundSchema).optional(),
496
+ text: OpenResponsesTextConfig$outboundSchema.optional(),
3087
497
  }).transform((v) => {
3088
498
  return remap$(v, {
3089
499
  createdAt: "created_at",