llama-stack-client 0.4.3 → 0.4.5

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 (932) hide show
  1. package/.devcontainer/devcontainer.json +15 -0
  2. package/.eslintrc.js +16 -0
  3. package/.github/workflows/ci.yml +88 -0
  4. package/.github/workflows/integration-tests.yml +133 -0
  5. package/.github/workflows/release-doctor.yml +19 -0
  6. package/.gitignore +12 -0
  7. package/.prettierignore +7 -0
  8. package/.prettierrc.json +7 -0
  9. package/.release-please-manifest.json +3 -0
  10. package/.stats.yml +4 -0
  11. package/Brewfile +1 -0
  12. package/CHANGELOG.md +41 -0
  13. package/CODE_OF_CONDUCT.md +80 -0
  14. package/CONTRIBUTING.md +98 -0
  15. package/LICENSE +1 -1
  16. package/README.md +10 -5
  17. package/SECURITY.md +27 -0
  18. package/api.md +491 -0
  19. package/bin/check-release-environment +18 -0
  20. package/bin/publish-npm +61 -0
  21. package/dist/CHANGELOG.md +393 -0
  22. package/dist/LICENSE +7 -0
  23. package/dist/README.md +369 -0
  24. package/dist/core.d.ts.map +1 -0
  25. package/dist/core.js +945 -0
  26. package/dist/core.js.map +1 -0
  27. package/dist/core.mjs +913 -0
  28. package/dist/core.mjs.map +1 -0
  29. package/dist/package.json +108 -0
  30. package/dist/resources/alpha/alpha.d.ts +26 -0
  31. package/dist/resources/alpha/alpha.d.ts.map +1 -0
  32. package/dist/resources/alpha/alpha.js +61 -0
  33. package/dist/resources/alpha/alpha.js.map +1 -0
  34. package/dist/resources/alpha/alpha.mjs +34 -0
  35. package/dist/resources/alpha/alpha.mjs.map +1 -0
  36. package/dist/resources/alpha/eval/eval.d.ts +181 -0
  37. package/dist/resources/alpha/eval/eval.d.ts.map +1 -0
  38. package/dist/resources/alpha/eval/eval.js.map +1 -0
  39. package/dist/resources/alpha/eval/eval.mjs.map +1 -0
  40. package/dist/resources/alpha/inference.d.ts +136 -0
  41. package/dist/resources/alpha/inference.d.ts.map +1 -0
  42. package/dist/resources/alpha/post-training/index.d.ts +3 -0
  43. package/dist/resources/alpha/post-training/index.d.ts.map +1 -0
  44. package/dist/resources/alpha/post-training/index.js.map +1 -0
  45. package/dist/resources/alpha/post-training/index.mjs +10 -0
  46. package/dist/resources/alpha/post-training/index.mjs.map +1 -0
  47. package/dist/resources/alpha/post-training/job.d.ts +104 -0
  48. package/dist/resources/alpha/post-training/job.d.ts.map +1 -0
  49. package/dist/resources/alpha/post-training/job.js +42 -0
  50. package/dist/resources/alpha/post-training/job.js.map +1 -0
  51. package/dist/resources/alpha/post-training/job.mjs +38 -0
  52. package/dist/resources/alpha/post-training/job.mjs.map +1 -0
  53. package/dist/resources/alpha/post-training/post-training.d.ts +269 -0
  54. package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -0
  55. package/dist/resources/alpha/post-training/post-training.js.map +1 -0
  56. package/dist/resources/alpha/post-training/post-training.mjs +30 -0
  57. package/dist/resources/alpha/post-training/post-training.mjs.map +1 -0
  58. package/dist/resources/beta/datasets.d.ts +351 -0
  59. package/dist/resources/beta/datasets.d.ts.map +1 -0
  60. package/dist/resources/chat/chat.d.ts +274 -0
  61. package/dist/resources/chat/chat.d.ts.map +1 -0
  62. package/dist/resources/chat/chat.js.map +1 -0
  63. package/dist/resources/chat/chat.mjs.map +1 -0
  64. package/dist/resources/chat/completions.d.ts +2413 -0
  65. package/dist/resources/chat/completions.d.ts.map +1 -0
  66. package/dist/resources/chat/completions.js +31 -0
  67. package/dist/resources/chat/completions.js.map +1 -0
  68. package/dist/resources/chat/completions.mjs +27 -0
  69. package/dist/resources/chat/completions.mjs.map +1 -0
  70. package/dist/resources/completions.d.ts +267 -0
  71. package/dist/resources/completions.d.ts.map +1 -0
  72. package/dist/resources/completions.js.map +1 -0
  73. package/dist/resources/completions.mjs.map +1 -0
  74. package/dist/resources/conversations/conversations.d.ts +336 -0
  75. package/dist/resources/conversations/conversations.d.ts.map +1 -0
  76. package/dist/resources/conversations/conversations.js +70 -0
  77. package/dist/resources/conversations/conversations.js.map +1 -0
  78. package/dist/resources/conversations/conversations.mjs +43 -0
  79. package/dist/resources/conversations/conversations.mjs.map +1 -0
  80. package/dist/resources/conversations/items.d.ts +1045 -0
  81. package/dist/resources/conversations/items.d.ts.map +1 -0
  82. package/dist/resources/conversations/items.js +45 -0
  83. package/dist/resources/conversations/items.js.map +1 -0
  84. package/dist/resources/conversations/items.mjs +40 -0
  85. package/dist/resources/conversations/items.mjs.map +1 -0
  86. package/dist/resources/embeddings.d.ts +90 -0
  87. package/dist/resources/embeddings.d.ts.map +1 -0
  88. package/dist/resources/embeddings.js +22 -0
  89. package/dist/resources/embeddings.js.map +1 -0
  90. package/dist/resources/embeddings.mjs +18 -0
  91. package/dist/resources/embeddings.mjs.map +1 -0
  92. package/dist/resources/files.d.ts +147 -0
  93. package/dist/resources/files.d.ts.map +1 -0
  94. package/dist/resources/files.js +75 -0
  95. package/dist/resources/files.js.map +1 -0
  96. package/dist/resources/files.mjs +47 -0
  97. package/dist/resources/files.mjs.map +1 -0
  98. package/dist/resources/models/models.d.ts +142 -0
  99. package/dist/resources/models/models.d.ts.map +1 -0
  100. package/dist/resources/models/models.js +76 -0
  101. package/dist/resources/models/models.js.map +1 -0
  102. package/dist/resources/models/models.mjs +49 -0
  103. package/dist/resources/models/models.mjs.map +1 -0
  104. package/dist/resources/moderations.d.ts +80 -0
  105. package/dist/resources/moderations.d.ts.map +1 -0
  106. package/dist/resources/moderations.js +21 -0
  107. package/dist/resources/moderations.js.map +1 -0
  108. package/dist/resources/moderations.mjs +17 -0
  109. package/dist/resources/moderations.mjs.map +1 -0
  110. package/dist/resources/prompts/prompts.d.ts +110 -0
  111. package/dist/resources/prompts/prompts.d.ts.map +1 -0
  112. package/dist/resources/prompts/prompts.js +85 -0
  113. package/dist/resources/prompts/prompts.js.map +1 -0
  114. package/dist/resources/prompts/prompts.mjs +58 -0
  115. package/dist/resources/prompts/prompts.mjs.map +1 -0
  116. package/dist/resources/prompts/versions.d.ts +10 -0
  117. package/dist/resources/prompts/versions.d.ts.map +1 -0
  118. package/dist/resources/prompts/versions.js +21 -0
  119. package/dist/resources/prompts/versions.js.map +1 -0
  120. package/dist/resources/prompts/versions.mjs +17 -0
  121. package/dist/resources/prompts/versions.mjs.map +1 -0
  122. package/dist/resources/responses/input-items.d.ts +410 -0
  123. package/dist/resources/responses/input-items.d.ts.map +1 -0
  124. package/dist/resources/responses/responses.d.ts +3180 -0
  125. package/dist/resources/responses/responses.d.ts.map +1 -0
  126. package/dist/resources/responses/responses.js.map +1 -0
  127. package/dist/resources/responses/responses.mjs.map +1 -0
  128. package/dist/resources/safety.d.ts +294 -0
  129. package/dist/resources/safety.d.ts.map +1 -0
  130. package/dist/resources/safety.js +21 -0
  131. package/dist/resources/safety.js.map +1 -0
  132. package/dist/resources/safety.mjs +17 -0
  133. package/dist/resources/safety.mjs.map +1 -0
  134. package/dist/resources/scoring-functions.d.ts +232 -0
  135. package/dist/resources/scoring-functions.d.ts.map +1 -0
  136. package/dist/resources/scoring.d.ts +157 -0
  137. package/dist/resources/scoring.d.ts.map +1 -0
  138. package/dist/resources/shared.d.ts +464 -0
  139. package/dist/resources/shared.d.ts.map +1 -0
  140. package/dist/resources/shields.d.ts +82 -0
  141. package/dist/resources/shields.d.ts.map +1 -0
  142. package/dist/resources/vector-io.d.ts +375 -0
  143. package/dist/resources/vector-io.d.ts.map +1 -0
  144. package/dist/resources/vector-io.js +31 -0
  145. package/dist/resources/vector-io.mjs +27 -0
  146. package/dist/resources/vector-stores/file-batches.d.ts +117 -0
  147. package/dist/resources/vector-stores/file-batches.d.ts.map +1 -0
  148. package/dist/resources/vector-stores/file-batches.js +42 -0
  149. package/dist/resources/vector-stores/file-batches.js.map +1 -0
  150. package/dist/resources/vector-stores/file-batches.mjs +38 -0
  151. package/dist/resources/vector-stores/file-batches.mjs.map +1 -0
  152. package/dist/resources/vector-stores/files.d.ts +235 -0
  153. package/dist/resources/vector-stores/files.d.ts.map +1 -0
  154. package/dist/resources/vector-stores/files.js +60 -0
  155. package/dist/resources/vector-stores/files.js.map +1 -0
  156. package/dist/resources/vector-stores/files.mjs +55 -0
  157. package/dist/resources/vector-stores/files.mjs.map +1 -0
  158. package/dist/resources/vector-stores/vector-stores.d.ts +322 -0
  159. package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -0
  160. package/dist/resources/vector-stores/vector-stores.js +92 -0
  161. package/dist/resources/vector-stores/vector-stores.js.map +1 -0
  162. package/dist/resources/vector-stores/vector-stores.mjs +64 -0
  163. package/dist/resources/vector-stores/vector-stores.mjs.map +1 -0
  164. package/dist/src/_shims/MultipartBody.ts +15 -0
  165. package/dist/src/_shims/README.md +46 -0
  166. package/dist/src/_shims/auto/runtime-bun.ts +10 -0
  167. package/dist/src/_shims/auto/runtime-node.ts +10 -0
  168. package/dist/src/_shims/auto/runtime.ts +10 -0
  169. package/dist/src/_shims/auto/types-node.ts +10 -0
  170. package/dist/src/_shims/auto/types.d.ts +107 -0
  171. package/dist/src/_shims/auto/types.js +9 -0
  172. package/dist/src/_shims/auto/types.mjs +10 -0
  173. package/dist/src/_shims/bun-runtime.ts +20 -0
  174. package/dist/src/_shims/index.d.ts +89 -0
  175. package/dist/src/_shims/index.js +23 -0
  176. package/dist/src/_shims/index.mjs +18 -0
  177. package/dist/src/_shims/manual-types.d.ts +18 -0
  178. package/dist/src/_shims/manual-types.js +9 -0
  179. package/dist/src/_shims/manual-types.mjs +10 -0
  180. package/dist/src/_shims/node-runtime.ts +87 -0
  181. package/dist/src/_shims/node-types.d.ts +48 -0
  182. package/dist/src/_shims/node-types.js +9 -0
  183. package/dist/src/_shims/node-types.mjs +10 -0
  184. package/dist/src/_shims/registry.ts +73 -0
  185. package/dist/src/_shims/web-runtime.ts +109 -0
  186. package/dist/src/_shims/web-types.d.ts +89 -0
  187. package/dist/src/_shims/web-types.js +9 -0
  188. package/dist/src/_shims/web-types.mjs +10 -0
  189. package/dist/src/core.ts +1265 -0
  190. package/dist/src/error.ts +137 -0
  191. package/dist/src/index.ts +586 -0
  192. package/dist/src/internal/decoders/line.ts +182 -0
  193. package/dist/src/internal/qs/LICENSE.md +13 -0
  194. package/dist/src/internal/qs/README.md +3 -0
  195. package/dist/src/internal/qs/formats.ts +15 -0
  196. package/dist/src/internal/qs/index.ts +19 -0
  197. package/dist/src/internal/qs/stringify.ts +394 -0
  198. package/dist/src/internal/qs/types.ts +77 -0
  199. package/dist/src/internal/qs/utils.ts +271 -0
  200. package/dist/src/internal/stream-utils.ts +38 -0
  201. package/dist/src/lib/.keep +4 -0
  202. package/dist/src/lib/response-helpers.ts +60 -0
  203. package/dist/src/pagination.ts +134 -0
  204. package/dist/src/resource.ts +18 -0
  205. package/dist/src/resources/alpha/admin.ts +84 -0
  206. package/dist/src/resources/alpha/alpha.ts +93 -0
  207. package/dist/src/resources/alpha/benchmarks.ts +152 -0
  208. package/dist/src/resources/alpha/eval/eval.ts +255 -0
  209. package/dist/src/resources/alpha/eval/index.ts +19 -0
  210. package/dist/src/resources/alpha/eval/jobs.ts +41 -0
  211. package/dist/src/resources/alpha/eval.ts +10 -0
  212. package/dist/src/resources/alpha/index.ts +36 -0
  213. package/dist/src/resources/alpha/inference.ts +183 -0
  214. package/dist/src/resources/alpha/post-training/index.ts +17 -0
  215. package/dist/src/resources/alpha/post-training/job.ts +161 -0
  216. package/dist/src/resources/alpha/post-training/post-training.ts +385 -0
  217. package/dist/src/resources/alpha/post-training.ts +9 -0
  218. package/dist/src/resources/alpha.ts +9 -0
  219. package/dist/src/resources/batches.ts +572 -0
  220. package/dist/src/resources/beta/beta.ts +41 -0
  221. package/dist/src/resources/beta/datasets.ts +445 -0
  222. package/dist/src/resources/beta/index.ts +20 -0
  223. package/dist/src/resources/beta.ts +9 -0
  224. package/dist/src/resources/chat/chat.ts +348 -0
  225. package/dist/src/resources/chat/completions.ts +2934 -0
  226. package/dist/src/resources/chat/index.ts +19 -0
  227. package/dist/src/resources/chat.ts +9 -0
  228. package/dist/src/resources/completions.ts +344 -0
  229. package/dist/src/resources/conversations/conversations.ts +507 -0
  230. package/dist/src/resources/conversations/index.ts +25 -0
  231. package/dist/src/resources/conversations/items.ts +1590 -0
  232. package/dist/src/resources/conversations.ts +9 -0
  233. package/dist/src/resources/embeddings.ts +122 -0
  234. package/dist/src/resources/files.ts +211 -0
  235. package/dist/src/resources/index.ts +139 -0
  236. package/dist/src/resources/inspect.ts +27 -0
  237. package/dist/src/resources/models/index.ts +18 -0
  238. package/dist/src/resources/models/models.ts +194 -0
  239. package/dist/src/resources/models/openai.ts +22 -0
  240. package/dist/src/resources/models.ts +9 -0
  241. package/dist/src/resources/moderations.ts +94 -0
  242. package/dist/src/resources/prompts/index.ts +19 -0
  243. package/dist/src/resources/prompts/prompts.ts +185 -0
  244. package/dist/src/resources/prompts/versions.ts +24 -0
  245. package/dist/src/resources/prompts.ts +9 -0
  246. package/dist/src/resources/providers.ts +38 -0
  247. package/dist/src/resources/responses/index.ts +21 -0
  248. package/dist/src/resources/responses/input-items.ts +631 -0
  249. package/dist/src/resources/responses/responses.ts +4569 -0
  250. package/dist/src/resources/responses.ts +9 -0
  251. package/dist/src/resources/routes.ts +52 -0
  252. package/dist/src/resources/safety.ts +364 -0
  253. package/dist/src/resources/scoring-functions.ts +365 -0
  254. package/dist/src/resources/scoring.ts +221 -0
  255. package/dist/src/resources/shared.ts +559 -0
  256. package/dist/src/resources/shields.ts +119 -0
  257. package/dist/src/resources/tool-runtime.ts +217 -0
  258. package/dist/src/resources/toolgroups.ts +135 -0
  259. package/dist/src/resources/tools.ts +52 -0
  260. package/dist/src/resources/vector-io.ts +485 -0
  261. package/dist/src/resources/vector-stores/file-batches.ts +207 -0
  262. package/dist/src/resources/vector-stores/files.ts +378 -0
  263. package/dist/src/resources/vector-stores/index.ts +38 -0
  264. package/dist/src/resources/vector-stores/vector-stores.ts +476 -0
  265. package/dist/src/resources/vector-stores.ts +9 -0
  266. package/dist/src/resources.ts +7 -0
  267. package/dist/src/shims/node.ts +56 -0
  268. package/dist/src/shims/web.ts +56 -0
  269. package/dist/src/streaming.ts +297 -0
  270. package/dist/src/uploads.ts +261 -0
  271. package/dist/src/version.ts +7 -0
  272. package/dist/version.d.ts +2 -0
  273. package/dist/version.js +10 -0
  274. package/dist/version.mjs +7 -0
  275. package/examples/.keep +4 -0
  276. package/jest.config.ts +29 -0
  277. package/package.json +55 -35
  278. package/release-please-config.json +64 -0
  279. package/scripts/bootstrap +30 -0
  280. package/scripts/build +56 -0
  281. package/scripts/fast-format +40 -0
  282. package/scripts/format +8 -0
  283. package/scripts/lint +11 -0
  284. package/scripts/mock +41 -0
  285. package/scripts/test +56 -0
  286. package/scripts/utils/check-is-in-git-install.sh +15 -0
  287. package/scripts/utils/check-version.cjs +27 -0
  288. package/scripts/utils/fix-index-exports.cjs +21 -0
  289. package/scripts/utils/git-swap.sh +19 -0
  290. package/scripts/utils/make-dist-package-json.cjs +28 -0
  291. package/scripts/utils/postprocess-files.cjs +172 -0
  292. package/scripts/utils/upload-artifact.sh +33 -0
  293. package/src/_shims/auto/runtime-deno.ts +10 -0
  294. package/src/_shims/auto/types-deno.ts +10 -0
  295. package/src/_shims/auto/types.d.ts +18 -18
  296. package/src/_shims/index-deno.ts +118 -0
  297. package/src/_shims/index.d.ts +1 -1
  298. package/src/_shims/index.mjs +1 -1
  299. package/src/core.ts +6 -0
  300. package/src/resources/alpha/alpha.ts +8 -8
  301. package/src/resources/alpha/eval/eval.ts +28 -7
  302. package/src/resources/alpha/inference.ts +58 -7
  303. package/src/resources/alpha/post-training/index.ts +1 -9
  304. package/src/resources/alpha/post-training/job.ts +5 -21
  305. package/src/resources/alpha/post-training/post-training.ts +33 -20
  306. package/src/resources/beta/datasets.ts +14 -0
  307. package/src/resources/chat/chat.ts +118 -16
  308. package/src/resources/chat/completions.ts +1126 -67
  309. package/src/resources/completions.ts +133 -24
  310. package/src/resources/conversations/conversations.ts +30 -14
  311. package/src/resources/conversations/items.ts +361 -136
  312. package/src/resources/embeddings.ts +46 -8
  313. package/src/resources/files.ts +58 -31
  314. package/src/resources/models/models.ts +21 -6
  315. package/src/resources/moderations.ts +38 -5
  316. package/src/resources/prompts/prompts.ts +26 -12
  317. package/src/resources/prompts/versions.ts +0 -2
  318. package/src/resources/responses/input-items.ts +64 -13
  319. package/src/resources/responses/responses.ts +523 -252
  320. package/src/resources/safety.ts +131 -8
  321. package/src/resources/scoring-functions.ts +23 -1
  322. package/src/resources/scoring.ts +24 -0
  323. package/src/resources/shared.ts +53 -7
  324. package/src/resources/shields.ts +21 -0
  325. package/src/resources/vector-io.ts +95 -78
  326. package/src/resources/vector-stores/file-batches.ts +13 -7
  327. package/src/resources/vector-stores/files.ts +31 -11
  328. package/src/resources/vector-stores/vector-stores.ts +89 -15
  329. package/src/version.ts +1 -1
  330. package/tests/api-resources/alpha/admin.test.ts +111 -0
  331. package/tests/api-resources/alpha/benchmarks.test.ts +94 -0
  332. package/tests/api-resources/alpha/eval/eval.test.ts +206 -0
  333. package/tests/api-resources/alpha/eval/jobs.test.ts +68 -0
  334. package/tests/api-resources/alpha/inference.test.ts +38 -0
  335. package/tests/api-resources/alpha/post-training/job.test.ts +86 -0
  336. package/tests/api-resources/alpha/post-training/post-training.test.ts +134 -0
  337. package/tests/api-resources/batches.test.ts +100 -0
  338. package/tests/api-resources/beta/datasets.test.ts +141 -0
  339. package/tests/api-resources/chat/completions.test.ts +115 -0
  340. package/tests/api-resources/completions.test.ts +48 -0
  341. package/tests/api-resources/conversations/conversations.test.ts +76 -0
  342. package/tests/api-resources/conversations/items.test.ts +117 -0
  343. package/tests/api-resources/embeddings.test.ts +35 -0
  344. package/tests/api-resources/files.test.ts +123 -0
  345. package/tests/api-resources/inspect.test.ts +50 -0
  346. package/tests/api-resources/models/models.test.ts +89 -0
  347. package/tests/api-resources/models/openai.test.ts +32 -0
  348. package/tests/api-resources/moderations.test.ts +29 -0
  349. package/tests/api-resources/prompts/prompts.test.ts +125 -0
  350. package/tests/api-resources/prompts/versions.test.ts +32 -0
  351. package/tests/api-resources/providers.test.ts +50 -0
  352. package/tests/api-resources/responses/input-items.test.ts +49 -0
  353. package/tests/api-resources/responses/responses.test.ts +132 -0
  354. package/tests/api-resources/routes.test.ts +39 -0
  355. package/tests/api-resources/safety.test.ts +41 -0
  356. package/tests/api-resources/scoring-functions.test.ts +100 -0
  357. package/tests/api-resources/scoring.test.ts +73 -0
  358. package/tests/api-resources/shields.test.ts +88 -0
  359. package/tests/api-resources/tool-runtime.test.ts +68 -0
  360. package/tests/api-resources/toolgroups.test.ts +91 -0
  361. package/tests/api-resources/tools.test.ts +57 -0
  362. package/tests/api-resources/vector-io.test.ts +84 -0
  363. package/tests/api-resources/vector-stores/file-batches.test.ts +113 -0
  364. package/tests/api-resources/vector-stores/files.test.ts +153 -0
  365. package/tests/api-resources/vector-stores/vector-stores.test.ts +134 -0
  366. package/tests/form.test.ts +71 -0
  367. package/tests/index.test.ts +438 -0
  368. package/tests/internal/decoders/line.test.ts +134 -0
  369. package/tests/qs/empty-keys-cases.ts +277 -0
  370. package/tests/qs/stringify.test.ts +2238 -0
  371. package/tests/qs/utils.test.ts +175 -0
  372. package/tests/responses.test.ts +91 -0
  373. package/tests/streaming.test.ts +250 -0
  374. package/tests/stringifyQuery.test.ts +29 -0
  375. package/tests/uploads.test.ts +71 -0
  376. package/tsc-multi.json +7 -0
  377. package/tsconfig.build.json +18 -0
  378. package/tsconfig.deno.json +15 -0
  379. package/tsconfig.dist-src.json +11 -0
  380. package/tsconfig.json +38 -0
  381. package/core.d.ts.map +0 -1
  382. package/core.js +0 -940
  383. package/core.js.map +0 -1
  384. package/core.mjs +0 -908
  385. package/core.mjs.map +0 -1
  386. package/resources/alpha/alpha.d.ts +0 -26
  387. package/resources/alpha/alpha.d.ts.map +0 -1
  388. package/resources/alpha/alpha.js +0 -61
  389. package/resources/alpha/alpha.js.map +0 -1
  390. package/resources/alpha/alpha.mjs +0 -34
  391. package/resources/alpha/alpha.mjs.map +0 -1
  392. package/resources/alpha/eval/eval.d.ts +0 -160
  393. package/resources/alpha/eval/eval.d.ts.map +0 -1
  394. package/resources/alpha/eval/eval.js.map +0 -1
  395. package/resources/alpha/eval/eval.mjs.map +0 -1
  396. package/resources/alpha/inference.d.ts +0 -85
  397. package/resources/alpha/inference.d.ts.map +0 -1
  398. package/resources/alpha/post-training/index.d.ts +0 -3
  399. package/resources/alpha/post-training/index.d.ts.map +0 -1
  400. package/resources/alpha/post-training/index.js.map +0 -1
  401. package/resources/alpha/post-training/index.mjs +0 -10
  402. package/resources/alpha/post-training/index.mjs.map +0 -1
  403. package/resources/alpha/post-training/job.d.ts +0 -113
  404. package/resources/alpha/post-training/job.d.ts.map +0 -1
  405. package/resources/alpha/post-training/job.js +0 -43
  406. package/resources/alpha/post-training/job.js.map +0 -1
  407. package/resources/alpha/post-training/job.mjs +0 -39
  408. package/resources/alpha/post-training/job.mjs.map +0 -1
  409. package/resources/alpha/post-training/post-training.d.ts +0 -245
  410. package/resources/alpha/post-training/post-training.d.ts.map +0 -1
  411. package/resources/alpha/post-training/post-training.js.map +0 -1
  412. package/resources/alpha/post-training/post-training.mjs +0 -30
  413. package/resources/alpha/post-training/post-training.mjs.map +0 -1
  414. package/resources/beta/datasets.d.ts +0 -338
  415. package/resources/beta/datasets.d.ts.map +0 -1
  416. package/resources/chat/chat.d.ts +0 -172
  417. package/resources/chat/chat.d.ts.map +0 -1
  418. package/resources/chat/chat.js.map +0 -1
  419. package/resources/chat/chat.mjs.map +0 -1
  420. package/resources/chat/completions.d.ts +0 -1356
  421. package/resources/chat/completions.d.ts.map +0 -1
  422. package/resources/chat/completions.js +0 -33
  423. package/resources/chat/completions.js.map +0 -1
  424. package/resources/chat/completions.mjs +0 -29
  425. package/resources/chat/completions.mjs.map +0 -1
  426. package/resources/completions.d.ts +0 -158
  427. package/resources/completions.d.ts.map +0 -1
  428. package/resources/completions.js.map +0 -1
  429. package/resources/completions.mjs.map +0 -1
  430. package/resources/conversations/conversations.d.ts +0 -320
  431. package/resources/conversations/conversations.d.ts.map +0 -1
  432. package/resources/conversations/conversations.js +0 -78
  433. package/resources/conversations/conversations.js.map +0 -1
  434. package/resources/conversations/conversations.mjs +0 -51
  435. package/resources/conversations/conversations.mjs.map +0 -1
  436. package/resources/conversations/items.d.ts +0 -874
  437. package/resources/conversations/items.d.ts.map +0 -1
  438. package/resources/conversations/items.js +0 -51
  439. package/resources/conversations/items.js.map +0 -1
  440. package/resources/conversations/items.mjs +0 -46
  441. package/resources/conversations/items.mjs.map +0 -1
  442. package/resources/embeddings.d.ts +0 -52
  443. package/resources/embeddings.d.ts.map +0 -1
  444. package/resources/embeddings.js +0 -24
  445. package/resources/embeddings.js.map +0 -1
  446. package/resources/embeddings.mjs +0 -20
  447. package/resources/embeddings.mjs.map +0 -1
  448. package/resources/files.d.ts +0 -120
  449. package/resources/files.d.ts.map +0 -1
  450. package/resources/files.js +0 -87
  451. package/resources/files.js.map +0 -1
  452. package/resources/files.mjs +0 -59
  453. package/resources/files.mjs.map +0 -1
  454. package/resources/models/models.d.ts +0 -127
  455. package/resources/models/models.d.ts.map +0 -1
  456. package/resources/models/models.js +0 -82
  457. package/resources/models/models.js.map +0 -1
  458. package/resources/models/models.mjs +0 -55
  459. package/resources/models/models.mjs.map +0 -1
  460. package/resources/moderations.d.ts +0 -47
  461. package/resources/moderations.d.ts.map +0 -1
  462. package/resources/moderations.js +0 -23
  463. package/resources/moderations.js.map +0 -1
  464. package/resources/moderations.mjs +0 -19
  465. package/resources/moderations.mjs.map +0 -1
  466. package/resources/prompts/prompts.d.ts +0 -96
  467. package/resources/prompts/prompts.d.ts.map +0 -1
  468. package/resources/prompts/prompts.js +0 -93
  469. package/resources/prompts/prompts.js.map +0 -1
  470. package/resources/prompts/prompts.mjs +0 -66
  471. package/resources/prompts/prompts.mjs.map +0 -1
  472. package/resources/prompts/versions.d.ts +0 -12
  473. package/resources/prompts/versions.d.ts.map +0 -1
  474. package/resources/prompts/versions.js +0 -23
  475. package/resources/prompts/versions.js.map +0 -1
  476. package/resources/prompts/versions.mjs +0 -19
  477. package/resources/prompts/versions.mjs.map +0 -1
  478. package/resources/responses/input-items.d.ts +0 -367
  479. package/resources/responses/input-items.d.ts.map +0 -1
  480. package/resources/responses/responses.d.ts +0 -2871
  481. package/resources/responses/responses.d.ts.map +0 -1
  482. package/resources/responses/responses.js.map +0 -1
  483. package/resources/responses/responses.mjs.map +0 -1
  484. package/resources/safety.d.ts +0 -172
  485. package/resources/safety.d.ts.map +0 -1
  486. package/resources/safety.js +0 -23
  487. package/resources/safety.js.map +0 -1
  488. package/resources/safety.mjs +0 -19
  489. package/resources/safety.mjs.map +0 -1
  490. package/resources/scoring-functions.d.ts +0 -210
  491. package/resources/scoring-functions.d.ts.map +0 -1
  492. package/resources/scoring.d.ts +0 -133
  493. package/resources/scoring.d.ts.map +0 -1
  494. package/resources/shared.d.ts +0 -418
  495. package/resources/shared.d.ts.map +0 -1
  496. package/resources/shields.d.ts +0 -61
  497. package/resources/shields.d.ts.map +0 -1
  498. package/resources/vector-io.d.ts +0 -358
  499. package/resources/vector-io.d.ts.map +0 -1
  500. package/resources/vector-io.js +0 -31
  501. package/resources/vector-io.mjs +0 -27
  502. package/resources/vector-stores/file-batches.d.ts +0 -111
  503. package/resources/vector-stores/file-batches.d.ts.map +0 -1
  504. package/resources/vector-stores/file-batches.js +0 -45
  505. package/resources/vector-stores/file-batches.js.map +0 -1
  506. package/resources/vector-stores/file-batches.mjs +0 -41
  507. package/resources/vector-stores/file-batches.mjs.map +0 -1
  508. package/resources/vector-stores/files.d.ts +0 -213
  509. package/resources/vector-stores/files.d.ts.map +0 -1
  510. package/resources/vector-stores/files.js +0 -60
  511. package/resources/vector-stores/files.js.map +0 -1
  512. package/resources/vector-stores/files.mjs +0 -55
  513. package/resources/vector-stores/files.mjs.map +0 -1
  514. package/resources/vector-stores/vector-stores.d.ts +0 -248
  515. package/resources/vector-stores/vector-stores.d.ts.map +0 -1
  516. package/resources/vector-stores/vector-stores.js +0 -97
  517. package/resources/vector-stores/vector-stores.js.map +0 -1
  518. package/resources/vector-stores/vector-stores.mjs +0 -69
  519. package/resources/vector-stores/vector-stores.mjs.map +0 -1
  520. package/version.d.ts +0 -2
  521. package/version.js +0 -10
  522. package/version.mjs +0 -7
  523. /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
  524. /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
  525. /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
  526. /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
  527. /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
  528. /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
  529. /package/{_shims → dist/_shims}/README.md +0 -0
  530. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
  531. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
  532. /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
  533. /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
  534. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
  535. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
  536. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
  537. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
  538. /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
  539. /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
  540. /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
  541. /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
  542. /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
  543. /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
  544. /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
  545. /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
  546. /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
  547. /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
  548. /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
  549. /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
  550. /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
  551. /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
  552. /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
  553. /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
  554. /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
  555. /package/{_shims → dist/_shims}/auto/types.js +0 -0
  556. /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
  557. /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
  558. /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
  559. /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
  560. /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
  561. /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
  562. /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
  563. /package/{_shims → dist/_shims}/index.d.ts +0 -0
  564. /package/{_shims → dist/_shims}/index.js +0 -0
  565. /package/{_shims → dist/_shims}/index.mjs +0 -0
  566. /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
  567. /package/{_shims → dist/_shims}/manual-types.js +0 -0
  568. /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
  569. /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
  570. /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
  571. /package/{_shims → dist/_shims}/node-runtime.js +0 -0
  572. /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
  573. /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
  574. /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
  575. /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
  576. /package/{_shims → dist/_shims}/node-types.js +0 -0
  577. /package/{_shims → dist/_shims}/node-types.mjs +0 -0
  578. /package/{_shims → dist/_shims}/registry.d.ts +0 -0
  579. /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
  580. /package/{_shims → dist/_shims}/registry.js +0 -0
  581. /package/{_shims → dist/_shims}/registry.js.map +0 -0
  582. /package/{_shims → dist/_shims}/registry.mjs +0 -0
  583. /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
  584. /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
  585. /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
  586. /package/{_shims → dist/_shims}/web-runtime.js +0 -0
  587. /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
  588. /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
  589. /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
  590. /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
  591. /package/{_shims → dist/_shims}/web-types.js +0 -0
  592. /package/{_shims → dist/_shims}/web-types.mjs +0 -0
  593. /package/{core.d.ts → dist/core.d.ts} +0 -0
  594. /package/{error.d.ts → dist/error.d.ts} +0 -0
  595. /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
  596. /package/{error.js → dist/error.js} +0 -0
  597. /package/{error.js.map → dist/error.js.map} +0 -0
  598. /package/{error.mjs → dist/error.mjs} +0 -0
  599. /package/{error.mjs.map → dist/error.mjs.map} +0 -0
  600. /package/{index.d.mts → dist/index.d.mts} +0 -0
  601. /package/{index.d.ts → dist/index.d.ts} +0 -0
  602. /package/{index.d.ts.map → dist/index.d.ts.map} +0 -0
  603. /package/{index.js → dist/index.js} +0 -0
  604. /package/{index.js.map → dist/index.js.map} +0 -0
  605. /package/{index.mjs → dist/index.mjs} +0 -0
  606. /package/{index.mjs.map → dist/index.mjs.map} +0 -0
  607. /package/{internal → dist/internal}/decoders/line.d.ts +0 -0
  608. /package/{internal → dist/internal}/decoders/line.d.ts.map +0 -0
  609. /package/{internal → dist/internal}/decoders/line.js +0 -0
  610. /package/{internal → dist/internal}/decoders/line.js.map +0 -0
  611. /package/{internal → dist/internal}/decoders/line.mjs +0 -0
  612. /package/{internal → dist/internal}/decoders/line.mjs.map +0 -0
  613. /package/{internal → dist/internal}/qs/formats.d.ts +0 -0
  614. /package/{internal → dist/internal}/qs/formats.d.ts.map +0 -0
  615. /package/{internal → dist/internal}/qs/formats.js +0 -0
  616. /package/{internal → dist/internal}/qs/formats.js.map +0 -0
  617. /package/{internal → dist/internal}/qs/formats.mjs +0 -0
  618. /package/{internal → dist/internal}/qs/formats.mjs.map +0 -0
  619. /package/{internal → dist/internal}/qs/index.d.ts +0 -0
  620. /package/{internal → dist/internal}/qs/index.d.ts.map +0 -0
  621. /package/{internal → dist/internal}/qs/index.js +0 -0
  622. /package/{internal → dist/internal}/qs/index.js.map +0 -0
  623. /package/{internal → dist/internal}/qs/index.mjs +0 -0
  624. /package/{internal → dist/internal}/qs/index.mjs.map +0 -0
  625. /package/{internal → dist/internal}/qs/stringify.d.ts +0 -0
  626. /package/{internal → dist/internal}/qs/stringify.d.ts.map +0 -0
  627. /package/{internal → dist/internal}/qs/stringify.js +0 -0
  628. /package/{internal → dist/internal}/qs/stringify.js.map +0 -0
  629. /package/{internal → dist/internal}/qs/stringify.mjs +0 -0
  630. /package/{internal → dist/internal}/qs/stringify.mjs.map +0 -0
  631. /package/{internal → dist/internal}/qs/types.d.ts +0 -0
  632. /package/{internal → dist/internal}/qs/types.d.ts.map +0 -0
  633. /package/{internal → dist/internal}/qs/types.js +0 -0
  634. /package/{internal → dist/internal}/qs/types.js.map +0 -0
  635. /package/{internal → dist/internal}/qs/types.mjs +0 -0
  636. /package/{internal → dist/internal}/qs/types.mjs.map +0 -0
  637. /package/{internal → dist/internal}/qs/utils.d.ts +0 -0
  638. /package/{internal → dist/internal}/qs/utils.d.ts.map +0 -0
  639. /package/{internal → dist/internal}/qs/utils.js +0 -0
  640. /package/{internal → dist/internal}/qs/utils.js.map +0 -0
  641. /package/{internal → dist/internal}/qs/utils.mjs +0 -0
  642. /package/{internal → dist/internal}/qs/utils.mjs.map +0 -0
  643. /package/{internal → dist/internal}/stream-utils.d.ts +0 -0
  644. /package/{internal → dist/internal}/stream-utils.d.ts.map +0 -0
  645. /package/{internal → dist/internal}/stream-utils.js +0 -0
  646. /package/{internal → dist/internal}/stream-utils.js.map +0 -0
  647. /package/{internal → dist/internal}/stream-utils.mjs +0 -0
  648. /package/{internal → dist/internal}/stream-utils.mjs.map +0 -0
  649. /package/{lib → dist/lib}/response-helpers.d.ts +0 -0
  650. /package/{lib → dist/lib}/response-helpers.d.ts.map +0 -0
  651. /package/{lib → dist/lib}/response-helpers.js +0 -0
  652. /package/{lib → dist/lib}/response-helpers.js.map +0 -0
  653. /package/{lib → dist/lib}/response-helpers.mjs +0 -0
  654. /package/{lib → dist/lib}/response-helpers.mjs.map +0 -0
  655. /package/{pagination.d.ts → dist/pagination.d.ts} +0 -0
  656. /package/{pagination.d.ts.map → dist/pagination.d.ts.map} +0 -0
  657. /package/{pagination.js → dist/pagination.js} +0 -0
  658. /package/{pagination.js.map → dist/pagination.js.map} +0 -0
  659. /package/{pagination.mjs → dist/pagination.mjs} +0 -0
  660. /package/{pagination.mjs.map → dist/pagination.mjs.map} +0 -0
  661. /package/{resource.d.ts → dist/resource.d.ts} +0 -0
  662. /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
  663. /package/{resource.js → dist/resource.js} +0 -0
  664. /package/{resource.js.map → dist/resource.js.map} +0 -0
  665. /package/{resource.mjs → dist/resource.mjs} +0 -0
  666. /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
  667. /package/{resources → dist/resources}/alpha/admin.d.ts +0 -0
  668. /package/{resources → dist/resources}/alpha/admin.d.ts.map +0 -0
  669. /package/{resources → dist/resources}/alpha/admin.js +0 -0
  670. /package/{resources → dist/resources}/alpha/admin.js.map +0 -0
  671. /package/{resources → dist/resources}/alpha/admin.mjs +0 -0
  672. /package/{resources → dist/resources}/alpha/admin.mjs.map +0 -0
  673. /package/{resources → dist/resources}/alpha/benchmarks.d.ts +0 -0
  674. /package/{resources → dist/resources}/alpha/benchmarks.d.ts.map +0 -0
  675. /package/{resources → dist/resources}/alpha/benchmarks.js +0 -0
  676. /package/{resources → dist/resources}/alpha/benchmarks.js.map +0 -0
  677. /package/{resources → dist/resources}/alpha/benchmarks.mjs +0 -0
  678. /package/{resources → dist/resources}/alpha/benchmarks.mjs.map +0 -0
  679. /package/{resources → dist/resources}/alpha/eval/eval.js +0 -0
  680. /package/{resources → dist/resources}/alpha/eval/eval.mjs +0 -0
  681. /package/{resources → dist/resources}/alpha/eval/index.d.ts +0 -0
  682. /package/{resources → dist/resources}/alpha/eval/index.d.ts.map +0 -0
  683. /package/{resources → dist/resources}/alpha/eval/index.js +0 -0
  684. /package/{resources → dist/resources}/alpha/eval/index.js.map +0 -0
  685. /package/{resources → dist/resources}/alpha/eval/index.mjs +0 -0
  686. /package/{resources → dist/resources}/alpha/eval/index.mjs.map +0 -0
  687. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts +0 -0
  688. /package/{resources → dist/resources}/alpha/eval/jobs.d.ts.map +0 -0
  689. /package/{resources → dist/resources}/alpha/eval/jobs.js +0 -0
  690. /package/{resources → dist/resources}/alpha/eval/jobs.js.map +0 -0
  691. /package/{resources → dist/resources}/alpha/eval/jobs.mjs +0 -0
  692. /package/{resources → dist/resources}/alpha/eval/jobs.mjs.map +0 -0
  693. /package/{resources → dist/resources}/alpha/eval.d.ts +0 -0
  694. /package/{resources → dist/resources}/alpha/eval.d.ts.map +0 -0
  695. /package/{resources → dist/resources}/alpha/eval.js +0 -0
  696. /package/{resources → dist/resources}/alpha/eval.js.map +0 -0
  697. /package/{resources → dist/resources}/alpha/eval.mjs +0 -0
  698. /package/{resources → dist/resources}/alpha/eval.mjs.map +0 -0
  699. /package/{resources → dist/resources}/alpha/index.d.ts +0 -0
  700. /package/{resources → dist/resources}/alpha/index.d.ts.map +0 -0
  701. /package/{resources → dist/resources}/alpha/index.js +0 -0
  702. /package/{resources → dist/resources}/alpha/index.js.map +0 -0
  703. /package/{resources → dist/resources}/alpha/index.mjs +0 -0
  704. /package/{resources → dist/resources}/alpha/index.mjs.map +0 -0
  705. /package/{resources → dist/resources}/alpha/inference.js +0 -0
  706. /package/{resources → dist/resources}/alpha/inference.js.map +0 -0
  707. /package/{resources → dist/resources}/alpha/inference.mjs +0 -0
  708. /package/{resources → dist/resources}/alpha/inference.mjs.map +0 -0
  709. /package/{resources → dist/resources}/alpha/post-training/index.js +0 -0
  710. /package/{resources → dist/resources}/alpha/post-training/post-training.js +0 -0
  711. /package/{resources → dist/resources}/alpha/post-training.d.ts +0 -0
  712. /package/{resources → dist/resources}/alpha/post-training.d.ts.map +0 -0
  713. /package/{resources → dist/resources}/alpha/post-training.js +0 -0
  714. /package/{resources → dist/resources}/alpha/post-training.js.map +0 -0
  715. /package/{resources → dist/resources}/alpha/post-training.mjs +0 -0
  716. /package/{resources → dist/resources}/alpha/post-training.mjs.map +0 -0
  717. /package/{resources → dist/resources}/alpha.d.ts +0 -0
  718. /package/{resources → dist/resources}/alpha.d.ts.map +0 -0
  719. /package/{resources → dist/resources}/alpha.js +0 -0
  720. /package/{resources → dist/resources}/alpha.js.map +0 -0
  721. /package/{resources → dist/resources}/alpha.mjs +0 -0
  722. /package/{resources → dist/resources}/alpha.mjs.map +0 -0
  723. /package/{resources → dist/resources}/batches.d.ts +0 -0
  724. /package/{resources → dist/resources}/batches.d.ts.map +0 -0
  725. /package/{resources → dist/resources}/batches.js +0 -0
  726. /package/{resources → dist/resources}/batches.js.map +0 -0
  727. /package/{resources → dist/resources}/batches.mjs +0 -0
  728. /package/{resources → dist/resources}/batches.mjs.map +0 -0
  729. /package/{resources → dist/resources}/beta/beta.d.ts +0 -0
  730. /package/{resources → dist/resources}/beta/beta.d.ts.map +0 -0
  731. /package/{resources → dist/resources}/beta/beta.js +0 -0
  732. /package/{resources → dist/resources}/beta/beta.js.map +0 -0
  733. /package/{resources → dist/resources}/beta/beta.mjs +0 -0
  734. /package/{resources → dist/resources}/beta/beta.mjs.map +0 -0
  735. /package/{resources → dist/resources}/beta/datasets.js +0 -0
  736. /package/{resources → dist/resources}/beta/datasets.js.map +0 -0
  737. /package/{resources → dist/resources}/beta/datasets.mjs +0 -0
  738. /package/{resources → dist/resources}/beta/datasets.mjs.map +0 -0
  739. /package/{resources → dist/resources}/beta/index.d.ts +0 -0
  740. /package/{resources → dist/resources}/beta/index.d.ts.map +0 -0
  741. /package/{resources → dist/resources}/beta/index.js +0 -0
  742. /package/{resources → dist/resources}/beta/index.js.map +0 -0
  743. /package/{resources → dist/resources}/beta/index.mjs +0 -0
  744. /package/{resources → dist/resources}/beta/index.mjs.map +0 -0
  745. /package/{resources → dist/resources}/beta.d.ts +0 -0
  746. /package/{resources → dist/resources}/beta.d.ts.map +0 -0
  747. /package/{resources → dist/resources}/beta.js +0 -0
  748. /package/{resources → dist/resources}/beta.js.map +0 -0
  749. /package/{resources → dist/resources}/beta.mjs +0 -0
  750. /package/{resources → dist/resources}/beta.mjs.map +0 -0
  751. /package/{resources → dist/resources}/chat/chat.js +0 -0
  752. /package/{resources → dist/resources}/chat/chat.mjs +0 -0
  753. /package/{resources → dist/resources}/chat/index.d.ts +0 -0
  754. /package/{resources → dist/resources}/chat/index.d.ts.map +0 -0
  755. /package/{resources → dist/resources}/chat/index.js +0 -0
  756. /package/{resources → dist/resources}/chat/index.js.map +0 -0
  757. /package/{resources → dist/resources}/chat/index.mjs +0 -0
  758. /package/{resources → dist/resources}/chat/index.mjs.map +0 -0
  759. /package/{resources → dist/resources}/chat.d.ts +0 -0
  760. /package/{resources → dist/resources}/chat.d.ts.map +0 -0
  761. /package/{resources → dist/resources}/chat.js +0 -0
  762. /package/{resources → dist/resources}/chat.js.map +0 -0
  763. /package/{resources → dist/resources}/chat.mjs +0 -0
  764. /package/{resources → dist/resources}/chat.mjs.map +0 -0
  765. /package/{resources → dist/resources}/completions.js +0 -0
  766. /package/{resources → dist/resources}/completions.mjs +0 -0
  767. /package/{resources → dist/resources}/conversations/index.d.ts +0 -0
  768. /package/{resources → dist/resources}/conversations/index.d.ts.map +0 -0
  769. /package/{resources → dist/resources}/conversations/index.js +0 -0
  770. /package/{resources → dist/resources}/conversations/index.js.map +0 -0
  771. /package/{resources → dist/resources}/conversations/index.mjs +0 -0
  772. /package/{resources → dist/resources}/conversations/index.mjs.map +0 -0
  773. /package/{resources → dist/resources}/conversations.d.ts +0 -0
  774. /package/{resources → dist/resources}/conversations.d.ts.map +0 -0
  775. /package/{resources → dist/resources}/conversations.js +0 -0
  776. /package/{resources → dist/resources}/conversations.js.map +0 -0
  777. /package/{resources → dist/resources}/conversations.mjs +0 -0
  778. /package/{resources → dist/resources}/conversations.mjs.map +0 -0
  779. /package/{resources → dist/resources}/index.d.ts +0 -0
  780. /package/{resources → dist/resources}/index.d.ts.map +0 -0
  781. /package/{resources → dist/resources}/index.js +0 -0
  782. /package/{resources → dist/resources}/index.js.map +0 -0
  783. /package/{resources → dist/resources}/index.mjs +0 -0
  784. /package/{resources → dist/resources}/index.mjs.map +0 -0
  785. /package/{resources → dist/resources}/inspect.d.ts +0 -0
  786. /package/{resources → dist/resources}/inspect.d.ts.map +0 -0
  787. /package/{resources → dist/resources}/inspect.js +0 -0
  788. /package/{resources → dist/resources}/inspect.js.map +0 -0
  789. /package/{resources → dist/resources}/inspect.mjs +0 -0
  790. /package/{resources → dist/resources}/inspect.mjs.map +0 -0
  791. /package/{resources → dist/resources}/models/index.d.ts +0 -0
  792. /package/{resources → dist/resources}/models/index.d.ts.map +0 -0
  793. /package/{resources → dist/resources}/models/index.js +0 -0
  794. /package/{resources → dist/resources}/models/index.js.map +0 -0
  795. /package/{resources → dist/resources}/models/index.mjs +0 -0
  796. /package/{resources → dist/resources}/models/index.mjs.map +0 -0
  797. /package/{resources → dist/resources}/models/openai.d.ts +0 -0
  798. /package/{resources → dist/resources}/models/openai.d.ts.map +0 -0
  799. /package/{resources → dist/resources}/models/openai.js +0 -0
  800. /package/{resources → dist/resources}/models/openai.js.map +0 -0
  801. /package/{resources → dist/resources}/models/openai.mjs +0 -0
  802. /package/{resources → dist/resources}/models/openai.mjs.map +0 -0
  803. /package/{resources → dist/resources}/models.d.ts +0 -0
  804. /package/{resources → dist/resources}/models.d.ts.map +0 -0
  805. /package/{resources → dist/resources}/models.js +0 -0
  806. /package/{resources → dist/resources}/models.js.map +0 -0
  807. /package/{resources → dist/resources}/models.mjs +0 -0
  808. /package/{resources → dist/resources}/models.mjs.map +0 -0
  809. /package/{resources → dist/resources}/prompts/index.d.ts +0 -0
  810. /package/{resources → dist/resources}/prompts/index.d.ts.map +0 -0
  811. /package/{resources → dist/resources}/prompts/index.js +0 -0
  812. /package/{resources → dist/resources}/prompts/index.js.map +0 -0
  813. /package/{resources → dist/resources}/prompts/index.mjs +0 -0
  814. /package/{resources → dist/resources}/prompts/index.mjs.map +0 -0
  815. /package/{resources → dist/resources}/prompts.d.ts +0 -0
  816. /package/{resources → dist/resources}/prompts.d.ts.map +0 -0
  817. /package/{resources → dist/resources}/prompts.js +0 -0
  818. /package/{resources → dist/resources}/prompts.js.map +0 -0
  819. /package/{resources → dist/resources}/prompts.mjs +0 -0
  820. /package/{resources → dist/resources}/prompts.mjs.map +0 -0
  821. /package/{resources → dist/resources}/providers.d.ts +0 -0
  822. /package/{resources → dist/resources}/providers.d.ts.map +0 -0
  823. /package/{resources → dist/resources}/providers.js +0 -0
  824. /package/{resources → dist/resources}/providers.js.map +0 -0
  825. /package/{resources → dist/resources}/providers.mjs +0 -0
  826. /package/{resources → dist/resources}/providers.mjs.map +0 -0
  827. /package/{resources → dist/resources}/responses/index.d.ts +0 -0
  828. /package/{resources → dist/resources}/responses/index.d.ts.map +0 -0
  829. /package/{resources → dist/resources}/responses/index.js +0 -0
  830. /package/{resources → dist/resources}/responses/index.js.map +0 -0
  831. /package/{resources → dist/resources}/responses/index.mjs +0 -0
  832. /package/{resources → dist/resources}/responses/index.mjs.map +0 -0
  833. /package/{resources → dist/resources}/responses/input-items.js +0 -0
  834. /package/{resources → dist/resources}/responses/input-items.js.map +0 -0
  835. /package/{resources → dist/resources}/responses/input-items.mjs +0 -0
  836. /package/{resources → dist/resources}/responses/input-items.mjs.map +0 -0
  837. /package/{resources → dist/resources}/responses/responses.js +0 -0
  838. /package/{resources → dist/resources}/responses/responses.mjs +0 -0
  839. /package/{resources → dist/resources}/responses.d.ts +0 -0
  840. /package/{resources → dist/resources}/responses.d.ts.map +0 -0
  841. /package/{resources → dist/resources}/responses.js +0 -0
  842. /package/{resources → dist/resources}/responses.js.map +0 -0
  843. /package/{resources → dist/resources}/responses.mjs +0 -0
  844. /package/{resources → dist/resources}/responses.mjs.map +0 -0
  845. /package/{resources → dist/resources}/routes.d.ts +0 -0
  846. /package/{resources → dist/resources}/routes.d.ts.map +0 -0
  847. /package/{resources → dist/resources}/routes.js +0 -0
  848. /package/{resources → dist/resources}/routes.js.map +0 -0
  849. /package/{resources → dist/resources}/routes.mjs +0 -0
  850. /package/{resources → dist/resources}/routes.mjs.map +0 -0
  851. /package/{resources → dist/resources}/scoring-functions.js +0 -0
  852. /package/{resources → dist/resources}/scoring-functions.js.map +0 -0
  853. /package/{resources → dist/resources}/scoring-functions.mjs +0 -0
  854. /package/{resources → dist/resources}/scoring-functions.mjs.map +0 -0
  855. /package/{resources → dist/resources}/scoring.js +0 -0
  856. /package/{resources → dist/resources}/scoring.js.map +0 -0
  857. /package/{resources → dist/resources}/scoring.mjs +0 -0
  858. /package/{resources → dist/resources}/scoring.mjs.map +0 -0
  859. /package/{resources → dist/resources}/shared.js +0 -0
  860. /package/{resources → dist/resources}/shared.js.map +0 -0
  861. /package/{resources → dist/resources}/shared.mjs +0 -0
  862. /package/{resources → dist/resources}/shared.mjs.map +0 -0
  863. /package/{resources → dist/resources}/shields.js +0 -0
  864. /package/{resources → dist/resources}/shields.js.map +0 -0
  865. /package/{resources → dist/resources}/shields.mjs +0 -0
  866. /package/{resources → dist/resources}/shields.mjs.map +0 -0
  867. /package/{resources → dist/resources}/tool-runtime.d.ts +0 -0
  868. /package/{resources → dist/resources}/tool-runtime.d.ts.map +0 -0
  869. /package/{resources → dist/resources}/tool-runtime.js +0 -0
  870. /package/{resources → dist/resources}/tool-runtime.js.map +0 -0
  871. /package/{resources → dist/resources}/tool-runtime.mjs +0 -0
  872. /package/{resources → dist/resources}/tool-runtime.mjs.map +0 -0
  873. /package/{resources → dist/resources}/toolgroups.d.ts +0 -0
  874. /package/{resources → dist/resources}/toolgroups.d.ts.map +0 -0
  875. /package/{resources → dist/resources}/toolgroups.js +0 -0
  876. /package/{resources → dist/resources}/toolgroups.js.map +0 -0
  877. /package/{resources → dist/resources}/toolgroups.mjs +0 -0
  878. /package/{resources → dist/resources}/toolgroups.mjs.map +0 -0
  879. /package/{resources → dist/resources}/tools.d.ts +0 -0
  880. /package/{resources → dist/resources}/tools.d.ts.map +0 -0
  881. /package/{resources → dist/resources}/tools.js +0 -0
  882. /package/{resources → dist/resources}/tools.js.map +0 -0
  883. /package/{resources → dist/resources}/tools.mjs +0 -0
  884. /package/{resources → dist/resources}/tools.mjs.map +0 -0
  885. /package/{resources → dist/resources}/vector-io.js.map +0 -0
  886. /package/{resources → dist/resources}/vector-io.mjs.map +0 -0
  887. /package/{resources → dist/resources}/vector-stores/index.d.ts +0 -0
  888. /package/{resources → dist/resources}/vector-stores/index.d.ts.map +0 -0
  889. /package/{resources → dist/resources}/vector-stores/index.js +0 -0
  890. /package/{resources → dist/resources}/vector-stores/index.js.map +0 -0
  891. /package/{resources → dist/resources}/vector-stores/index.mjs +0 -0
  892. /package/{resources → dist/resources}/vector-stores/index.mjs.map +0 -0
  893. /package/{resources → dist/resources}/vector-stores.d.ts +0 -0
  894. /package/{resources → dist/resources}/vector-stores.d.ts.map +0 -0
  895. /package/{resources → dist/resources}/vector-stores.js +0 -0
  896. /package/{resources → dist/resources}/vector-stores.js.map +0 -0
  897. /package/{resources → dist/resources}/vector-stores.mjs +0 -0
  898. /package/{resources → dist/resources}/vector-stores.mjs.map +0 -0
  899. /package/{resources.d.ts → dist/resources.d.ts} +0 -0
  900. /package/{resources.d.ts.map → dist/resources.d.ts.map} +0 -0
  901. /package/{resources.js → dist/resources.js} +0 -0
  902. /package/{resources.js.map → dist/resources.js.map} +0 -0
  903. /package/{resources.mjs → dist/resources.mjs} +0 -0
  904. /package/{resources.mjs.map → dist/resources.mjs.map} +0 -0
  905. /package/{shims → dist/shims}/node.d.ts +0 -0
  906. /package/{shims → dist/shims}/node.d.ts.map +0 -0
  907. /package/{shims → dist/shims}/node.js +0 -0
  908. /package/{shims → dist/shims}/node.js.map +0 -0
  909. /package/{shims → dist/shims}/node.mjs +0 -0
  910. /package/{shims → dist/shims}/node.mjs.map +0 -0
  911. /package/{shims → dist/shims}/web.d.ts +0 -0
  912. /package/{shims → dist/shims}/web.d.ts.map +0 -0
  913. /package/{shims → dist/shims}/web.js +0 -0
  914. /package/{shims → dist/shims}/web.js.map +0 -0
  915. /package/{shims → dist/shims}/web.mjs +0 -0
  916. /package/{shims → dist/shims}/web.mjs.map +0 -0
  917. /package/{src → dist/src}/tsconfig.json +0 -0
  918. /package/{streaming.d.ts → dist/streaming.d.ts} +0 -0
  919. /package/{streaming.d.ts.map → dist/streaming.d.ts.map} +0 -0
  920. /package/{streaming.js → dist/streaming.js} +0 -0
  921. /package/{streaming.js.map → dist/streaming.js.map} +0 -0
  922. /package/{streaming.mjs → dist/streaming.mjs} +0 -0
  923. /package/{streaming.mjs.map → dist/streaming.mjs.map} +0 -0
  924. /package/{uploads.d.ts → dist/uploads.d.ts} +0 -0
  925. /package/{uploads.d.ts.map → dist/uploads.d.ts.map} +0 -0
  926. /package/{uploads.js → dist/uploads.js} +0 -0
  927. /package/{uploads.js.map → dist/uploads.js.map} +0 -0
  928. /package/{uploads.mjs → dist/uploads.mjs} +0 -0
  929. /package/{uploads.mjs.map → dist/uploads.mjs.map} +0 -0
  930. /package/{version.d.ts.map → dist/version.d.ts.map} +0 -0
  931. /package/{version.js.map → dist/version.js.map} +0 -0
  932. /package/{version.mjs.map → dist/version.mjs.map} +0 -0
@@ -0,0 +1,4569 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ // All rights reserved.
3
+ //
4
+ // This source code is licensed under the terms described in the LICENSE file in
5
+ // the root directory of this source tree.
6
+ //
7
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
8
+
9
+ import { APIResource } from '../../resource';
10
+ import { isRequestOptions } from '../../core';
11
+ import { APIPromise } from '../../core';
12
+ import * as Core from '../../core';
13
+ import * as ResponsesAPI from './responses';
14
+ import * as InputItemsAPI from './input-items';
15
+ import { InputItemListParams, InputItemListResponse, InputItems } from './input-items';
16
+ import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination';
17
+ import { Stream } from '../../streaming';
18
+
19
+ export class Responses extends APIResource {
20
+ inputItems: InputItemsAPI.InputItems = new InputItemsAPI.InputItems(this._client);
21
+
22
+ /**
23
+ * Create a model response.
24
+ */
25
+ create(body: ResponseCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<ResponseObject>;
26
+ create(
27
+ body: ResponseCreateParamsStreaming,
28
+ options?: Core.RequestOptions,
29
+ ): APIPromise<Stream<ResponseObjectStream>>;
30
+ create(
31
+ body: ResponseCreateParamsBase,
32
+ options?: Core.RequestOptions,
33
+ ): APIPromise<Stream<ResponseObjectStream> | ResponseObject>;
34
+ create(
35
+ body: ResponseCreateParams,
36
+ options?: Core.RequestOptions,
37
+ ): APIPromise<ResponseObject> | APIPromise<Stream<ResponseObjectStream>> {
38
+ return this._client.post('/v1/responses', { body, ...options, stream: body.stream ?? false }) as
39
+ | APIPromise<ResponseObject>
40
+ | APIPromise<Stream<ResponseObjectStream>>;
41
+ }
42
+
43
+ /**
44
+ * Get a model response.
45
+ */
46
+ retrieve(responseId: string, options?: Core.RequestOptions): Core.APIPromise<ResponseObject> {
47
+ return this._client.get(`/v1/responses/${responseId}`, options);
48
+ }
49
+
50
+ /**
51
+ * List all responses.
52
+ */
53
+ list(
54
+ query?: ResponseListParams,
55
+ options?: Core.RequestOptions,
56
+ ): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
57
+ list(
58
+ options?: Core.RequestOptions,
59
+ ): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
60
+ list(
61
+ query: ResponseListParams | Core.RequestOptions = {},
62
+ options?: Core.RequestOptions,
63
+ ): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse> {
64
+ if (isRequestOptions(query)) {
65
+ return this.list({}, query);
66
+ }
67
+ return this._client.getAPIList('/v1/responses', ResponseListResponsesOpenAICursorPage, {
68
+ query,
69
+ ...options,
70
+ });
71
+ }
72
+
73
+ /**
74
+ * Delete a response.
75
+ */
76
+ delete(responseId: string, options?: Core.RequestOptions): Core.APIPromise<ResponseDeleteResponse> {
77
+ return this._client.delete(`/v1/responses/${responseId}`, options);
78
+ }
79
+ }
80
+
81
+ export class ResponseListResponsesOpenAICursorPage extends OpenAICursorPage<ResponseListResponse> {}
82
+
83
+ /**
84
+ * Complete OpenAI response object containing generation results and metadata.
85
+ */
86
+ export interface ResponseObject {
87
+ id: string;
88
+
89
+ created_at: number;
90
+
91
+ model: string;
92
+
93
+ output: Array<
94
+ | ResponseObject.OpenAIResponseMessageOutput
95
+ | ResponseObject.OpenAIResponseOutputMessageWebSearchToolCall
96
+ | ResponseObject.OpenAIResponseOutputMessageFileSearchToolCall
97
+ | ResponseObject.OpenAIResponseOutputMessageFunctionToolCall
98
+ | ResponseObject.OpenAIResponseOutputMessageMcpCall
99
+ | ResponseObject.OpenAIResponseOutputMessageMcpListTools
100
+ | ResponseObject.OpenAIResponseMcpApprovalRequest
101
+ >;
102
+
103
+ status: string;
104
+
105
+ store: boolean;
106
+
107
+ completed_at?: number | null;
108
+
109
+ /**
110
+ * Error details for failed OpenAI response requests.
111
+ */
112
+ error?: ResponseObject.Error | null;
113
+
114
+ instructions?: string | null;
115
+
116
+ max_output_tokens?: number | null;
117
+
118
+ max_tool_calls?: number | null;
119
+
120
+ metadata?: { [key: string]: string } | null;
121
+
122
+ object?: 'response';
123
+
124
+ parallel_tool_calls?: boolean | null;
125
+
126
+ previous_response_id?: string | null;
127
+
128
+ /**
129
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
130
+ */
131
+ prompt?: ResponseObject.Prompt | null;
132
+
133
+ /**
134
+ * Configuration for reasoning effort in OpenAI responses.
135
+ *
136
+ * Controls how much reasoning the model performs before generating a response.
137
+ */
138
+ reasoning?: ResponseObject.Reasoning | null;
139
+
140
+ safety_identifier?: string | null;
141
+
142
+ temperature?: number | null;
143
+
144
+ /**
145
+ * Text response configuration for OpenAI responses.
146
+ */
147
+ text?: ResponseObject.Text;
148
+
149
+ /**
150
+ * Constrains the tools available to the model to a pre-defined set.
151
+ */
152
+ tool_choice?:
153
+ | 'auto'
154
+ | 'required'
155
+ | 'none'
156
+ | ResponseObject.OpenAIResponseInputToolChoiceAllowedTools
157
+ | ResponseObject.OpenAIResponseInputToolChoiceFileSearch
158
+ | ResponseObject.OpenAIResponseInputToolChoiceWebSearch
159
+ | ResponseObject.OpenAIResponseInputToolChoiceFunctionTool
160
+ | ResponseObject.OpenAIResponseInputToolChoiceMcpTool
161
+ | ResponseObject.OpenAIResponseInputToolChoiceCustomTool
162
+ | null;
163
+
164
+ tools?: Array<
165
+ | ResponseObject.OpenAIResponseInputToolWebSearch
166
+ | ResponseObject.OpenAIResponseInputToolFileSearch
167
+ | ResponseObject.OpenAIResponseInputToolFunction
168
+ | ResponseObject.OpenAIResponseToolMcp
169
+ > | null;
170
+
171
+ top_p?: number | null;
172
+
173
+ truncation?: string | null;
174
+
175
+ /**
176
+ * Usage information for OpenAI response.
177
+ */
178
+ usage?: ResponseObject.Usage | null;
179
+ }
180
+
181
+ export namespace ResponseObject {
182
+ /**
183
+ * Corresponds to the various Message types in the Responses API. They are all
184
+ * under one type because the Responses API gives them all the same "type" value,
185
+ * and there is no way to tell them apart in certain scenarios.
186
+ */
187
+ export interface OpenAIResponseMessageOutput {
188
+ content:
189
+ | string
190
+ | Array<
191
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
192
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
193
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
194
+ >
195
+ | Array<
196
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
197
+ | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
198
+ >;
199
+
200
+ role: 'system' | 'developer' | 'user' | 'assistant';
201
+
202
+ id?: string | null;
203
+
204
+ status?: string | null;
205
+
206
+ type?: 'message';
207
+ }
208
+
209
+ export namespace OpenAIResponseMessageOutput {
210
+ /**
211
+ * Text content for input messages in OpenAI response format.
212
+ */
213
+ export interface OpenAIResponseInputMessageContentText {
214
+ text: string;
215
+
216
+ type?: 'input_text';
217
+ }
218
+
219
+ /**
220
+ * Image content for input messages in OpenAI response format.
221
+ */
222
+ export interface OpenAIResponseInputMessageContentImage {
223
+ detail?: 'low' | 'high' | 'auto';
224
+
225
+ file_id?: string | null;
226
+
227
+ image_url?: string | null;
228
+
229
+ type?: 'input_image';
230
+ }
231
+
232
+ /**
233
+ * File content for input messages in OpenAI response format.
234
+ */
235
+ export interface OpenAIResponseInputMessageContentFile {
236
+ file_data?: string | null;
237
+
238
+ file_id?: string | null;
239
+
240
+ file_url?: string | null;
241
+
242
+ filename?: string | null;
243
+
244
+ type?: 'input_file';
245
+ }
246
+
247
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
248
+ text: string;
249
+
250
+ annotations?: Array<
251
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
252
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
253
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
254
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
255
+ >;
256
+
257
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
258
+
259
+ type?: 'output_text';
260
+ }
261
+
262
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
263
+ /**
264
+ * File citation annotation for referencing specific files in response content.
265
+ */
266
+ export interface OpenAIResponseAnnotationFileCitation {
267
+ file_id: string;
268
+
269
+ filename: string;
270
+
271
+ index: number;
272
+
273
+ type?: 'file_citation';
274
+ }
275
+
276
+ /**
277
+ * URL citation annotation for referencing external web resources.
278
+ */
279
+ export interface OpenAIResponseAnnotationCitation {
280
+ end_index: number;
281
+
282
+ start_index: number;
283
+
284
+ title: string;
285
+
286
+ url: string;
287
+
288
+ type?: 'url_citation';
289
+ }
290
+
291
+ export interface OpenAIResponseAnnotationContainerFileCitation {
292
+ container_id: string;
293
+
294
+ end_index: number;
295
+
296
+ file_id: string;
297
+
298
+ filename: string;
299
+
300
+ start_index: number;
301
+
302
+ type?: 'container_file_citation';
303
+ }
304
+
305
+ export interface OpenAIResponseAnnotationFilePath {
306
+ file_id: string;
307
+
308
+ index: number;
309
+
310
+ type?: 'file_path';
311
+ }
312
+
313
+ /**
314
+ * The log probability for a token from an OpenAI-compatible chat completion
315
+ * response.
316
+ */
317
+ export interface Logprob {
318
+ /**
319
+ * The token.
320
+ */
321
+ token: string;
322
+
323
+ /**
324
+ * The log probability of the token.
325
+ */
326
+ logprob: number;
327
+
328
+ /**
329
+ * The bytes for the token.
330
+ */
331
+ bytes?: Array<number> | null;
332
+
333
+ /**
334
+ * The top log probabilities for the token.
335
+ */
336
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
337
+ }
338
+
339
+ export namespace Logprob {
340
+ /**
341
+ * The top log probability for a token from an OpenAI-compatible chat completion
342
+ * response.
343
+ */
344
+ export interface TopLogprob {
345
+ /**
346
+ * The token.
347
+ */
348
+ token: string;
349
+
350
+ /**
351
+ * The log probability of the token.
352
+ */
353
+ logprob: number;
354
+
355
+ /**
356
+ * The bytes for the token.
357
+ */
358
+ bytes?: Array<number> | null;
359
+ }
360
+ }
361
+ }
362
+
363
+ /**
364
+ * Refusal content within a streamed response part.
365
+ */
366
+ export interface OpenAIResponseContentPartRefusal {
367
+ refusal: string;
368
+
369
+ type?: 'refusal';
370
+ }
371
+ }
372
+
373
+ /**
374
+ * Web search tool call output message for OpenAI responses.
375
+ */
376
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
377
+ id: string;
378
+
379
+ status: string;
380
+
381
+ type?: 'web_search_call';
382
+ }
383
+
384
+ /**
385
+ * File search tool call output message for OpenAI responses.
386
+ */
387
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
388
+ id: string;
389
+
390
+ queries: Array<string>;
391
+
392
+ status: string;
393
+
394
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
395
+
396
+ type?: 'file_search_call';
397
+ }
398
+
399
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
400
+ /**
401
+ * Search results returned by the file search operation.
402
+ */
403
+ export interface Result {
404
+ attributes: { [key: string]: unknown };
405
+
406
+ file_id: string;
407
+
408
+ filename: string;
409
+
410
+ score: number;
411
+
412
+ text: string;
413
+ }
414
+ }
415
+
416
+ /**
417
+ * Function tool call output message for OpenAI responses.
418
+ */
419
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
420
+ arguments: string;
421
+
422
+ call_id: string;
423
+
424
+ name: string;
425
+
426
+ id?: string | null;
427
+
428
+ status?: string | null;
429
+
430
+ type?: 'function_call';
431
+ }
432
+
433
+ /**
434
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
435
+ */
436
+ export interface OpenAIResponseOutputMessageMcpCall {
437
+ id: string;
438
+
439
+ arguments: string;
440
+
441
+ name: string;
442
+
443
+ server_label: string;
444
+
445
+ error?: string | null;
446
+
447
+ output?: string | null;
448
+
449
+ type?: 'mcp_call';
450
+ }
451
+
452
+ /**
453
+ * MCP list tools output message containing available tools from an MCP server.
454
+ */
455
+ export interface OpenAIResponseOutputMessageMcpListTools {
456
+ id: string;
457
+
458
+ server_label: string;
459
+
460
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
461
+
462
+ type?: 'mcp_list_tools';
463
+ }
464
+
465
+ export namespace OpenAIResponseOutputMessageMcpListTools {
466
+ /**
467
+ * Tool definition returned by MCP list tools operation.
468
+ */
469
+ export interface Tool {
470
+ input_schema: { [key: string]: unknown };
471
+
472
+ name: string;
473
+
474
+ description?: string | null;
475
+ }
476
+ }
477
+
478
+ /**
479
+ * A request for human approval of a tool invocation.
480
+ */
481
+ export interface OpenAIResponseMcpApprovalRequest {
482
+ id: string;
483
+
484
+ arguments: string;
485
+
486
+ name: string;
487
+
488
+ server_label: string;
489
+
490
+ type?: 'mcp_approval_request';
491
+ }
492
+
493
+ /**
494
+ * Error details for failed OpenAI response requests.
495
+ */
496
+ export interface Error {
497
+ code: string;
498
+
499
+ message: string;
500
+ }
501
+
502
+ /**
503
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
504
+ */
505
+ export interface Prompt {
506
+ id: string;
507
+
508
+ variables?: {
509
+ [key: string]:
510
+ | Prompt.OpenAIResponseInputMessageContentText
511
+ | Prompt.OpenAIResponseInputMessageContentImage
512
+ | Prompt.OpenAIResponseInputMessageContentFile;
513
+ } | null;
514
+
515
+ version?: string | null;
516
+ }
517
+
518
+ export namespace Prompt {
519
+ /**
520
+ * Text content for input messages in OpenAI response format.
521
+ */
522
+ export interface OpenAIResponseInputMessageContentText {
523
+ text: string;
524
+
525
+ type?: 'input_text';
526
+ }
527
+
528
+ /**
529
+ * Image content for input messages in OpenAI response format.
530
+ */
531
+ export interface OpenAIResponseInputMessageContentImage {
532
+ detail?: 'low' | 'high' | 'auto';
533
+
534
+ file_id?: string | null;
535
+
536
+ image_url?: string | null;
537
+
538
+ type?: 'input_image';
539
+ }
540
+
541
+ /**
542
+ * File content for input messages in OpenAI response format.
543
+ */
544
+ export interface OpenAIResponseInputMessageContentFile {
545
+ file_data?: string | null;
546
+
547
+ file_id?: string | null;
548
+
549
+ file_url?: string | null;
550
+
551
+ filename?: string | null;
552
+
553
+ type?: 'input_file';
554
+ }
555
+ }
556
+
557
+ /**
558
+ * Configuration for reasoning effort in OpenAI responses.
559
+ *
560
+ * Controls how much reasoning the model performs before generating a response.
561
+ */
562
+ export interface Reasoning {
563
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
564
+ }
565
+
566
+ /**
567
+ * Text response configuration for OpenAI responses.
568
+ */
569
+ export interface Text {
570
+ /**
571
+ * Configuration for Responses API text format.
572
+ */
573
+ format?: Text.Format | null;
574
+ }
575
+
576
+ export namespace Text {
577
+ /**
578
+ * Configuration for Responses API text format.
579
+ */
580
+ export interface Format {
581
+ description?: string | null;
582
+
583
+ name?: string | null;
584
+
585
+ schema?: { [key: string]: unknown } | null;
586
+
587
+ strict?: boolean | null;
588
+
589
+ type?: 'text' | 'json_schema' | 'json_object';
590
+ }
591
+ }
592
+
593
+ /**
594
+ * Constrains the tools available to the model to a pre-defined set.
595
+ */
596
+ export interface OpenAIResponseInputToolChoiceAllowedTools {
597
+ tools: Array<{ [key: string]: string }>;
598
+
599
+ mode?: 'auto' | 'required';
600
+
601
+ type?: 'allowed_tools';
602
+ }
603
+
604
+ /**
605
+ * Indicates that the model should use file search to generate a response.
606
+ */
607
+ export interface OpenAIResponseInputToolChoiceFileSearch {
608
+ type?: 'file_search';
609
+ }
610
+
611
+ /**
612
+ * Indicates that the model should use web search to generate a response
613
+ */
614
+ export interface OpenAIResponseInputToolChoiceWebSearch {
615
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
616
+ }
617
+
618
+ /**
619
+ * Forces the model to call a specific function.
620
+ */
621
+ export interface OpenAIResponseInputToolChoiceFunctionTool {
622
+ name: string;
623
+
624
+ type?: 'function';
625
+ }
626
+
627
+ /**
628
+ * Forces the model to call a specific tool on a remote MCP server
629
+ */
630
+ export interface OpenAIResponseInputToolChoiceMcpTool {
631
+ server_label: string;
632
+
633
+ name?: string | null;
634
+
635
+ type?: 'mcp';
636
+ }
637
+
638
+ /**
639
+ * Forces the model to call a custom tool.
640
+ */
641
+ export interface OpenAIResponseInputToolChoiceCustomTool {
642
+ name: string;
643
+
644
+ type?: 'custom';
645
+ }
646
+
647
+ /**
648
+ * Web search tool configuration for OpenAI response inputs.
649
+ */
650
+ export interface OpenAIResponseInputToolWebSearch {
651
+ search_context_size?: string | null;
652
+
653
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
654
+ }
655
+
656
+ /**
657
+ * File search tool configuration for OpenAI response inputs.
658
+ */
659
+ export interface OpenAIResponseInputToolFileSearch {
660
+ vector_store_ids: Array<string>;
661
+
662
+ filters?: { [key: string]: unknown } | null;
663
+
664
+ max_num_results?: number | null;
665
+
666
+ /**
667
+ * Options for ranking and filtering search results.
668
+ *
669
+ * This class configures how search results are ranked and filtered. You can use
670
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
671
+ * VectorStoresConfig are used when parameters are not provided.
672
+ *
673
+ * Examples: # Weighted ranker with custom alpha
674
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
675
+ *
676
+ * # RRF ranker with custom impact factor
677
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
678
+ *
679
+ * # Use config defaults (just specify ranker type)
680
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
681
+ *
682
+ * # Score threshold filtering
683
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
684
+ */
685
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
686
+
687
+ type?: 'file_search';
688
+ }
689
+
690
+ export namespace OpenAIResponseInputToolFileSearch {
691
+ /**
692
+ * Options for ranking and filtering search results.
693
+ *
694
+ * This class configures how search results are ranked and filtered. You can use
695
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
696
+ * VectorStoresConfig are used when parameters are not provided.
697
+ *
698
+ * Examples: # Weighted ranker with custom alpha
699
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
700
+ *
701
+ * # RRF ranker with custom impact factor
702
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
703
+ *
704
+ * # Use config defaults (just specify ranker type)
705
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
706
+ *
707
+ * # Score threshold filtering
708
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
709
+ */
710
+ export interface RankingOptions {
711
+ /**
712
+ * Weight factor for weighted ranker
713
+ */
714
+ alpha?: number | null;
715
+
716
+ /**
717
+ * Impact factor for RRF algorithm
718
+ */
719
+ impact_factor?: number | null;
720
+
721
+ /**
722
+ * Model identifier for neural reranker
723
+ */
724
+ model?: string | null;
725
+
726
+ ranker?: string | null;
727
+
728
+ score_threshold?: number | null;
729
+
730
+ /**
731
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
732
+ * 'keyword', 'neural'
733
+ */
734
+ weights?: { [key: string]: number } | null;
735
+ }
736
+ }
737
+
738
+ /**
739
+ * Function tool configuration for OpenAI response inputs.
740
+ */
741
+ export interface OpenAIResponseInputToolFunction {
742
+ name: string;
743
+
744
+ parameters: { [key: string]: unknown } | null;
745
+
746
+ description?: string | null;
747
+
748
+ strict?: boolean | null;
749
+
750
+ type?: 'function';
751
+ }
752
+
753
+ /**
754
+ * Model Context Protocol (MCP) tool configuration for OpenAI response object.
755
+ */
756
+ export interface OpenAIResponseToolMcp {
757
+ server_label: string;
758
+
759
+ /**
760
+ * Filter configuration for restricting which MCP tools can be used.
761
+ */
762
+ allowed_tools?: Array<string> | OpenAIResponseToolMcp.AllowedToolsFilter | null;
763
+
764
+ type?: 'mcp';
765
+ }
766
+
767
+ export namespace OpenAIResponseToolMcp {
768
+ /**
769
+ * Filter configuration for restricting which MCP tools can be used.
770
+ */
771
+ export interface AllowedToolsFilter {
772
+ tool_names?: Array<string> | null;
773
+ }
774
+ }
775
+
776
+ /**
777
+ * Usage information for OpenAI response.
778
+ */
779
+ export interface Usage {
780
+ input_tokens: number;
781
+
782
+ /**
783
+ * Token details for input tokens in OpenAI response usage.
784
+ */
785
+ input_tokens_details: Usage.InputTokensDetails;
786
+
787
+ output_tokens: number;
788
+
789
+ /**
790
+ * Token details for output tokens in OpenAI response usage.
791
+ */
792
+ output_tokens_details: Usage.OutputTokensDetails;
793
+
794
+ total_tokens: number;
795
+ }
796
+
797
+ export namespace Usage {
798
+ /**
799
+ * Token details for input tokens in OpenAI response usage.
800
+ */
801
+ export interface InputTokensDetails {
802
+ cached_tokens: number;
803
+ }
804
+
805
+ /**
806
+ * Token details for output tokens in OpenAI response usage.
807
+ */
808
+ export interface OutputTokensDetails {
809
+ reasoning_tokens: number;
810
+ }
811
+ }
812
+ }
813
+
814
+ /**
815
+ * Streaming event indicating a new response has been created.
816
+ */
817
+ export type ResponseObjectStream =
818
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseCreated
819
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseInProgress
820
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputItemAdded
821
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputItemDone
822
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextDelta
823
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextDone
824
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta
825
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone
826
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallInProgress
827
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallSearching
828
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallCompleted
829
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsInProgress
830
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsFailed
831
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsCompleted
832
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta
833
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallArgumentsDone
834
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallInProgress
835
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallFailed
836
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallCompleted
837
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseContentPartAdded
838
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseContentPartDone
839
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningTextDelta
840
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningTextDone
841
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded
842
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryPartDone
843
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta
844
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryTextDone
845
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseRefusalDelta
846
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseRefusalDone
847
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded
848
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallInProgress
849
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallSearching
850
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallCompleted
851
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseIncomplete
852
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseFailed
853
+ | ResponseObjectStream.OpenAIResponseObjectStreamResponseCompleted;
854
+
855
+ export namespace ResponseObjectStream {
856
+ /**
857
+ * Streaming event indicating a new response has been created.
858
+ */
859
+ export interface OpenAIResponseObjectStreamResponseCreated {
860
+ /**
861
+ * Complete OpenAI response object containing generation results and metadata.
862
+ */
863
+ response: ResponsesAPI.ResponseObject;
864
+
865
+ type?: 'response.created';
866
+ }
867
+
868
+ /**
869
+ * Streaming event indicating the response remains in progress.
870
+ */
871
+ export interface OpenAIResponseObjectStreamResponseInProgress {
872
+ /**
873
+ * Complete OpenAI response object containing generation results and metadata.
874
+ */
875
+ response: ResponsesAPI.ResponseObject;
876
+
877
+ sequence_number: number;
878
+
879
+ type?: 'response.in_progress';
880
+ }
881
+
882
+ /**
883
+ * Streaming event for when a new output item is added to the response.
884
+ */
885
+ export interface OpenAIResponseObjectStreamResponseOutputItemAdded {
886
+ /**
887
+ * Corresponds to the various Message types in the Responses API. They are all
888
+ * under one type because the Responses API gives them all the same "type" value,
889
+ * and there is no way to tell them apart in certain scenarios.
890
+ */
891
+ item:
892
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseMessage
893
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageWebSearchToolCall
894
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageFileSearchToolCall
895
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageFunctionToolCall
896
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageMcpCall
897
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageMcpListTools
898
+ | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseMcpApprovalRequest;
899
+
900
+ output_index: number;
901
+
902
+ response_id: string;
903
+
904
+ sequence_number: number;
905
+
906
+ type?: 'response.output_item.added';
907
+ }
908
+
909
+ export namespace OpenAIResponseObjectStreamResponseOutputItemAdded {
910
+ /**
911
+ * Corresponds to the various Message types in the Responses API. They are all
912
+ * under one type because the Responses API gives them all the same "type" value,
913
+ * and there is no way to tell them apart in certain scenarios.
914
+ */
915
+ export interface OpenAIResponseMessage {
916
+ content:
917
+ | string
918
+ | Array<
919
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentText
920
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
921
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentFile
922
+ >
923
+ | Array<
924
+ | OpenAIResponseMessage.OpenAIResponseOutputMessageContentOutputText
925
+ | OpenAIResponseMessage.OpenAIResponseContentPartRefusal
926
+ >;
927
+
928
+ role: 'system' | 'developer' | 'user' | 'assistant';
929
+
930
+ id?: string | null;
931
+
932
+ status?: string | null;
933
+
934
+ type?: 'message';
935
+ }
936
+
937
+ export namespace OpenAIResponseMessage {
938
+ /**
939
+ * Text content for input messages in OpenAI response format.
940
+ */
941
+ export interface OpenAIResponseInputMessageContentText {
942
+ text: string;
943
+
944
+ type?: 'input_text';
945
+ }
946
+
947
+ /**
948
+ * Image content for input messages in OpenAI response format.
949
+ */
950
+ export interface OpenAIResponseInputMessageContentImage {
951
+ detail?: 'low' | 'high' | 'auto';
952
+
953
+ file_id?: string | null;
954
+
955
+ image_url?: string | null;
956
+
957
+ type?: 'input_image';
958
+ }
959
+
960
+ /**
961
+ * File content for input messages in OpenAI response format.
962
+ */
963
+ export interface OpenAIResponseInputMessageContentFile {
964
+ file_data?: string | null;
965
+
966
+ file_id?: string | null;
967
+
968
+ file_url?: string | null;
969
+
970
+ filename?: string | null;
971
+
972
+ type?: 'input_file';
973
+ }
974
+
975
+ export interface OpenAIResponseOutputMessageContentOutputText {
976
+ text: string;
977
+
978
+ annotations?: Array<
979
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
980
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
981
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
982
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
983
+ >;
984
+
985
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
986
+
987
+ type?: 'output_text';
988
+ }
989
+
990
+ export namespace OpenAIResponseOutputMessageContentOutputText {
991
+ /**
992
+ * File citation annotation for referencing specific files in response content.
993
+ */
994
+ export interface OpenAIResponseAnnotationFileCitation {
995
+ file_id: string;
996
+
997
+ filename: string;
998
+
999
+ index: number;
1000
+
1001
+ type?: 'file_citation';
1002
+ }
1003
+
1004
+ /**
1005
+ * URL citation annotation for referencing external web resources.
1006
+ */
1007
+ export interface OpenAIResponseAnnotationCitation {
1008
+ end_index: number;
1009
+
1010
+ start_index: number;
1011
+
1012
+ title: string;
1013
+
1014
+ url: string;
1015
+
1016
+ type?: 'url_citation';
1017
+ }
1018
+
1019
+ export interface OpenAIResponseAnnotationContainerFileCitation {
1020
+ container_id: string;
1021
+
1022
+ end_index: number;
1023
+
1024
+ file_id: string;
1025
+
1026
+ filename: string;
1027
+
1028
+ start_index: number;
1029
+
1030
+ type?: 'container_file_citation';
1031
+ }
1032
+
1033
+ export interface OpenAIResponseAnnotationFilePath {
1034
+ file_id: string;
1035
+
1036
+ index: number;
1037
+
1038
+ type?: 'file_path';
1039
+ }
1040
+
1041
+ /**
1042
+ * The log probability for a token from an OpenAI-compatible chat completion
1043
+ * response.
1044
+ */
1045
+ export interface Logprob {
1046
+ /**
1047
+ * The token.
1048
+ */
1049
+ token: string;
1050
+
1051
+ /**
1052
+ * The log probability of the token.
1053
+ */
1054
+ logprob: number;
1055
+
1056
+ /**
1057
+ * The bytes for the token.
1058
+ */
1059
+ bytes?: Array<number> | null;
1060
+
1061
+ /**
1062
+ * The top log probabilities for the token.
1063
+ */
1064
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1065
+ }
1066
+
1067
+ export namespace Logprob {
1068
+ /**
1069
+ * The top log probability for a token from an OpenAI-compatible chat completion
1070
+ * response.
1071
+ */
1072
+ export interface TopLogprob {
1073
+ /**
1074
+ * The token.
1075
+ */
1076
+ token: string;
1077
+
1078
+ /**
1079
+ * The log probability of the token.
1080
+ */
1081
+ logprob: number;
1082
+
1083
+ /**
1084
+ * The bytes for the token.
1085
+ */
1086
+ bytes?: Array<number> | null;
1087
+ }
1088
+ }
1089
+ }
1090
+
1091
+ /**
1092
+ * Refusal content within a streamed response part.
1093
+ */
1094
+ export interface OpenAIResponseContentPartRefusal {
1095
+ refusal: string;
1096
+
1097
+ type?: 'refusal';
1098
+ }
1099
+ }
1100
+
1101
+ /**
1102
+ * Web search tool call output message for OpenAI responses.
1103
+ */
1104
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
1105
+ id: string;
1106
+
1107
+ status: string;
1108
+
1109
+ type?: 'web_search_call';
1110
+ }
1111
+
1112
+ /**
1113
+ * File search tool call output message for OpenAI responses.
1114
+ */
1115
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
1116
+ id: string;
1117
+
1118
+ queries: Array<string>;
1119
+
1120
+ status: string;
1121
+
1122
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
1123
+
1124
+ type?: 'file_search_call';
1125
+ }
1126
+
1127
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
1128
+ /**
1129
+ * Search results returned by the file search operation.
1130
+ */
1131
+ export interface Result {
1132
+ attributes: { [key: string]: unknown };
1133
+
1134
+ file_id: string;
1135
+
1136
+ filename: string;
1137
+
1138
+ score: number;
1139
+
1140
+ text: string;
1141
+ }
1142
+ }
1143
+
1144
+ /**
1145
+ * Function tool call output message for OpenAI responses.
1146
+ */
1147
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
1148
+ arguments: string;
1149
+
1150
+ call_id: string;
1151
+
1152
+ name: string;
1153
+
1154
+ id?: string | null;
1155
+
1156
+ status?: string | null;
1157
+
1158
+ type?: 'function_call';
1159
+ }
1160
+
1161
+ /**
1162
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1163
+ */
1164
+ export interface OpenAIResponseOutputMessageMcpCall {
1165
+ id: string;
1166
+
1167
+ arguments: string;
1168
+
1169
+ name: string;
1170
+
1171
+ server_label: string;
1172
+
1173
+ error?: string | null;
1174
+
1175
+ output?: string | null;
1176
+
1177
+ type?: 'mcp_call';
1178
+ }
1179
+
1180
+ /**
1181
+ * MCP list tools output message containing available tools from an MCP server.
1182
+ */
1183
+ export interface OpenAIResponseOutputMessageMcpListTools {
1184
+ id: string;
1185
+
1186
+ server_label: string;
1187
+
1188
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1189
+
1190
+ type?: 'mcp_list_tools';
1191
+ }
1192
+
1193
+ export namespace OpenAIResponseOutputMessageMcpListTools {
1194
+ /**
1195
+ * Tool definition returned by MCP list tools operation.
1196
+ */
1197
+ export interface Tool {
1198
+ input_schema: { [key: string]: unknown };
1199
+
1200
+ name: string;
1201
+
1202
+ description?: string | null;
1203
+ }
1204
+ }
1205
+
1206
+ /**
1207
+ * A request for human approval of a tool invocation.
1208
+ */
1209
+ export interface OpenAIResponseMcpApprovalRequest {
1210
+ id: string;
1211
+
1212
+ arguments: string;
1213
+
1214
+ name: string;
1215
+
1216
+ server_label: string;
1217
+
1218
+ type?: 'mcp_approval_request';
1219
+ }
1220
+ }
1221
+
1222
+ /**
1223
+ * Streaming event for when an output item is completed.
1224
+ */
1225
+ export interface OpenAIResponseObjectStreamResponseOutputItemDone {
1226
+ /**
1227
+ * Corresponds to the various Message types in the Responses API. They are all
1228
+ * under one type because the Responses API gives them all the same "type" value,
1229
+ * and there is no way to tell them apart in certain scenarios.
1230
+ */
1231
+ item:
1232
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseMessage
1233
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageWebSearchToolCall
1234
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageFileSearchToolCall
1235
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageFunctionToolCall
1236
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageMcpCall
1237
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageMcpListTools
1238
+ | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseMcpApprovalRequest;
1239
+
1240
+ output_index: number;
1241
+
1242
+ response_id: string;
1243
+
1244
+ sequence_number: number;
1245
+
1246
+ type?: 'response.output_item.done';
1247
+ }
1248
+
1249
+ export namespace OpenAIResponseObjectStreamResponseOutputItemDone {
1250
+ /**
1251
+ * Corresponds to the various Message types in the Responses API. They are all
1252
+ * under one type because the Responses API gives them all the same "type" value,
1253
+ * and there is no way to tell them apart in certain scenarios.
1254
+ */
1255
+ export interface OpenAIResponseMessage {
1256
+ content:
1257
+ | string
1258
+ | Array<
1259
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentText
1260
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
1261
+ | OpenAIResponseMessage.OpenAIResponseInputMessageContentFile
1262
+ >
1263
+ | Array<
1264
+ | OpenAIResponseMessage.OpenAIResponseOutputMessageContentOutputText
1265
+ | OpenAIResponseMessage.OpenAIResponseContentPartRefusal
1266
+ >;
1267
+
1268
+ role: 'system' | 'developer' | 'user' | 'assistant';
1269
+
1270
+ id?: string | null;
1271
+
1272
+ status?: string | null;
1273
+
1274
+ type?: 'message';
1275
+ }
1276
+
1277
+ export namespace OpenAIResponseMessage {
1278
+ /**
1279
+ * Text content for input messages in OpenAI response format.
1280
+ */
1281
+ export interface OpenAIResponseInputMessageContentText {
1282
+ text: string;
1283
+
1284
+ type?: 'input_text';
1285
+ }
1286
+
1287
+ /**
1288
+ * Image content for input messages in OpenAI response format.
1289
+ */
1290
+ export interface OpenAIResponseInputMessageContentImage {
1291
+ detail?: 'low' | 'high' | 'auto';
1292
+
1293
+ file_id?: string | null;
1294
+
1295
+ image_url?: string | null;
1296
+
1297
+ type?: 'input_image';
1298
+ }
1299
+
1300
+ /**
1301
+ * File content for input messages in OpenAI response format.
1302
+ */
1303
+ export interface OpenAIResponseInputMessageContentFile {
1304
+ file_data?: string | null;
1305
+
1306
+ file_id?: string | null;
1307
+
1308
+ file_url?: string | null;
1309
+
1310
+ filename?: string | null;
1311
+
1312
+ type?: 'input_file';
1313
+ }
1314
+
1315
+ export interface OpenAIResponseOutputMessageContentOutputText {
1316
+ text: string;
1317
+
1318
+ annotations?: Array<
1319
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
1320
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
1321
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
1322
+ | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
1323
+ >;
1324
+
1325
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
1326
+
1327
+ type?: 'output_text';
1328
+ }
1329
+
1330
+ export namespace OpenAIResponseOutputMessageContentOutputText {
1331
+ /**
1332
+ * File citation annotation for referencing specific files in response content.
1333
+ */
1334
+ export interface OpenAIResponseAnnotationFileCitation {
1335
+ file_id: string;
1336
+
1337
+ filename: string;
1338
+
1339
+ index: number;
1340
+
1341
+ type?: 'file_citation';
1342
+ }
1343
+
1344
+ /**
1345
+ * URL citation annotation for referencing external web resources.
1346
+ */
1347
+ export interface OpenAIResponseAnnotationCitation {
1348
+ end_index: number;
1349
+
1350
+ start_index: number;
1351
+
1352
+ title: string;
1353
+
1354
+ url: string;
1355
+
1356
+ type?: 'url_citation';
1357
+ }
1358
+
1359
+ export interface OpenAIResponseAnnotationContainerFileCitation {
1360
+ container_id: string;
1361
+
1362
+ end_index: number;
1363
+
1364
+ file_id: string;
1365
+
1366
+ filename: string;
1367
+
1368
+ start_index: number;
1369
+
1370
+ type?: 'container_file_citation';
1371
+ }
1372
+
1373
+ export interface OpenAIResponseAnnotationFilePath {
1374
+ file_id: string;
1375
+
1376
+ index: number;
1377
+
1378
+ type?: 'file_path';
1379
+ }
1380
+
1381
+ /**
1382
+ * The log probability for a token from an OpenAI-compatible chat completion
1383
+ * response.
1384
+ */
1385
+ export interface Logprob {
1386
+ /**
1387
+ * The token.
1388
+ */
1389
+ token: string;
1390
+
1391
+ /**
1392
+ * The log probability of the token.
1393
+ */
1394
+ logprob: number;
1395
+
1396
+ /**
1397
+ * The bytes for the token.
1398
+ */
1399
+ bytes?: Array<number> | null;
1400
+
1401
+ /**
1402
+ * The top log probabilities for the token.
1403
+ */
1404
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1405
+ }
1406
+
1407
+ export namespace Logprob {
1408
+ /**
1409
+ * The top log probability for a token from an OpenAI-compatible chat completion
1410
+ * response.
1411
+ */
1412
+ export interface TopLogprob {
1413
+ /**
1414
+ * The token.
1415
+ */
1416
+ token: string;
1417
+
1418
+ /**
1419
+ * The log probability of the token.
1420
+ */
1421
+ logprob: number;
1422
+
1423
+ /**
1424
+ * The bytes for the token.
1425
+ */
1426
+ bytes?: Array<number> | null;
1427
+ }
1428
+ }
1429
+ }
1430
+
1431
+ /**
1432
+ * Refusal content within a streamed response part.
1433
+ */
1434
+ export interface OpenAIResponseContentPartRefusal {
1435
+ refusal: string;
1436
+
1437
+ type?: 'refusal';
1438
+ }
1439
+ }
1440
+
1441
+ /**
1442
+ * Web search tool call output message for OpenAI responses.
1443
+ */
1444
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
1445
+ id: string;
1446
+
1447
+ status: string;
1448
+
1449
+ type?: 'web_search_call';
1450
+ }
1451
+
1452
+ /**
1453
+ * File search tool call output message for OpenAI responses.
1454
+ */
1455
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
1456
+ id: string;
1457
+
1458
+ queries: Array<string>;
1459
+
1460
+ status: string;
1461
+
1462
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
1463
+
1464
+ type?: 'file_search_call';
1465
+ }
1466
+
1467
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
1468
+ /**
1469
+ * Search results returned by the file search operation.
1470
+ */
1471
+ export interface Result {
1472
+ attributes: { [key: string]: unknown };
1473
+
1474
+ file_id: string;
1475
+
1476
+ filename: string;
1477
+
1478
+ score: number;
1479
+
1480
+ text: string;
1481
+ }
1482
+ }
1483
+
1484
+ /**
1485
+ * Function tool call output message for OpenAI responses.
1486
+ */
1487
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
1488
+ arguments: string;
1489
+
1490
+ call_id: string;
1491
+
1492
+ name: string;
1493
+
1494
+ id?: string | null;
1495
+
1496
+ status?: string | null;
1497
+
1498
+ type?: 'function_call';
1499
+ }
1500
+
1501
+ /**
1502
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1503
+ */
1504
+ export interface OpenAIResponseOutputMessageMcpCall {
1505
+ id: string;
1506
+
1507
+ arguments: string;
1508
+
1509
+ name: string;
1510
+
1511
+ server_label: string;
1512
+
1513
+ error?: string | null;
1514
+
1515
+ output?: string | null;
1516
+
1517
+ type?: 'mcp_call';
1518
+ }
1519
+
1520
+ /**
1521
+ * MCP list tools output message containing available tools from an MCP server.
1522
+ */
1523
+ export interface OpenAIResponseOutputMessageMcpListTools {
1524
+ id: string;
1525
+
1526
+ server_label: string;
1527
+
1528
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1529
+
1530
+ type?: 'mcp_list_tools';
1531
+ }
1532
+
1533
+ export namespace OpenAIResponseOutputMessageMcpListTools {
1534
+ /**
1535
+ * Tool definition returned by MCP list tools operation.
1536
+ */
1537
+ export interface Tool {
1538
+ input_schema: { [key: string]: unknown };
1539
+
1540
+ name: string;
1541
+
1542
+ description?: string | null;
1543
+ }
1544
+ }
1545
+
1546
+ /**
1547
+ * A request for human approval of a tool invocation.
1548
+ */
1549
+ export interface OpenAIResponseMcpApprovalRequest {
1550
+ id: string;
1551
+
1552
+ arguments: string;
1553
+
1554
+ name: string;
1555
+
1556
+ server_label: string;
1557
+
1558
+ type?: 'mcp_approval_request';
1559
+ }
1560
+ }
1561
+
1562
+ /**
1563
+ * Streaming event for incremental text content updates.
1564
+ */
1565
+ export interface OpenAIResponseObjectStreamResponseOutputTextDelta {
1566
+ content_index: number;
1567
+
1568
+ delta: string;
1569
+
1570
+ item_id: string;
1571
+
1572
+ output_index: number;
1573
+
1574
+ sequence_number: number;
1575
+
1576
+ logprobs?: Array<OpenAIResponseObjectStreamResponseOutputTextDelta.Logprob> | null;
1577
+
1578
+ type?: 'response.output_text.delta';
1579
+ }
1580
+
1581
+ export namespace OpenAIResponseObjectStreamResponseOutputTextDelta {
1582
+ /**
1583
+ * The log probability for a token from an OpenAI-compatible chat completion
1584
+ * response.
1585
+ */
1586
+ export interface Logprob {
1587
+ /**
1588
+ * The token.
1589
+ */
1590
+ token: string;
1591
+
1592
+ /**
1593
+ * The log probability of the token.
1594
+ */
1595
+ logprob: number;
1596
+
1597
+ /**
1598
+ * The bytes for the token.
1599
+ */
1600
+ bytes?: Array<number> | null;
1601
+
1602
+ /**
1603
+ * The top log probabilities for the token.
1604
+ */
1605
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1606
+ }
1607
+
1608
+ export namespace Logprob {
1609
+ /**
1610
+ * The top log probability for a token from an OpenAI-compatible chat completion
1611
+ * response.
1612
+ */
1613
+ export interface TopLogprob {
1614
+ /**
1615
+ * The token.
1616
+ */
1617
+ token: string;
1618
+
1619
+ /**
1620
+ * The log probability of the token.
1621
+ */
1622
+ logprob: number;
1623
+
1624
+ /**
1625
+ * The bytes for the token.
1626
+ */
1627
+ bytes?: Array<number> | null;
1628
+ }
1629
+ }
1630
+ }
1631
+
1632
+ /**
1633
+ * Streaming event for when text output is completed.
1634
+ */
1635
+ export interface OpenAIResponseObjectStreamResponseOutputTextDone {
1636
+ content_index: number;
1637
+
1638
+ item_id: string;
1639
+
1640
+ output_index: number;
1641
+
1642
+ sequence_number: number;
1643
+
1644
+ text: string;
1645
+
1646
+ type?: 'response.output_text.done';
1647
+ }
1648
+
1649
+ /**
1650
+ * Streaming event for incremental function call argument updates.
1651
+ */
1652
+ export interface OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta {
1653
+ delta: string;
1654
+
1655
+ item_id: string;
1656
+
1657
+ output_index: number;
1658
+
1659
+ sequence_number: number;
1660
+
1661
+ type?: 'response.function_call_arguments.delta';
1662
+ }
1663
+
1664
+ /**
1665
+ * Streaming event for when function call arguments are completed.
1666
+ */
1667
+ export interface OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone {
1668
+ arguments: string;
1669
+
1670
+ item_id: string;
1671
+
1672
+ output_index: number;
1673
+
1674
+ sequence_number: number;
1675
+
1676
+ type?: 'response.function_call_arguments.done';
1677
+ }
1678
+
1679
+ /**
1680
+ * Streaming event for web search calls in progress.
1681
+ */
1682
+ export interface OpenAIResponseObjectStreamResponseWebSearchCallInProgress {
1683
+ item_id: string;
1684
+
1685
+ output_index: number;
1686
+
1687
+ sequence_number: number;
1688
+
1689
+ type?: 'response.web_search_call.in_progress';
1690
+ }
1691
+
1692
+ export interface OpenAIResponseObjectStreamResponseWebSearchCallSearching {
1693
+ item_id: string;
1694
+
1695
+ output_index: number;
1696
+
1697
+ sequence_number: number;
1698
+
1699
+ type?: 'response.web_search_call.searching';
1700
+ }
1701
+
1702
+ /**
1703
+ * Streaming event for completed web search calls.
1704
+ */
1705
+ export interface OpenAIResponseObjectStreamResponseWebSearchCallCompleted {
1706
+ item_id: string;
1707
+
1708
+ output_index: number;
1709
+
1710
+ sequence_number: number;
1711
+
1712
+ type?: 'response.web_search_call.completed';
1713
+ }
1714
+
1715
+ export interface OpenAIResponseObjectStreamResponseMcpListToolsInProgress {
1716
+ sequence_number: number;
1717
+
1718
+ type?: 'response.mcp_list_tools.in_progress';
1719
+ }
1720
+
1721
+ export interface OpenAIResponseObjectStreamResponseMcpListToolsFailed {
1722
+ sequence_number: number;
1723
+
1724
+ type?: 'response.mcp_list_tools.failed';
1725
+ }
1726
+
1727
+ export interface OpenAIResponseObjectStreamResponseMcpListToolsCompleted {
1728
+ sequence_number: number;
1729
+
1730
+ type?: 'response.mcp_list_tools.completed';
1731
+ }
1732
+
1733
+ export interface OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta {
1734
+ delta: string;
1735
+
1736
+ item_id: string;
1737
+
1738
+ output_index: number;
1739
+
1740
+ sequence_number: number;
1741
+
1742
+ type?: 'response.mcp_call.arguments.delta';
1743
+ }
1744
+
1745
+ export interface OpenAIResponseObjectStreamResponseMcpCallArgumentsDone {
1746
+ arguments: string;
1747
+
1748
+ item_id: string;
1749
+
1750
+ output_index: number;
1751
+
1752
+ sequence_number: number;
1753
+
1754
+ type?: 'response.mcp_call.arguments.done';
1755
+ }
1756
+
1757
+ /**
1758
+ * Streaming event for MCP calls in progress.
1759
+ */
1760
+ export interface OpenAIResponseObjectStreamResponseMcpCallInProgress {
1761
+ item_id: string;
1762
+
1763
+ output_index: number;
1764
+
1765
+ sequence_number: number;
1766
+
1767
+ type?: 'response.mcp_call.in_progress';
1768
+ }
1769
+
1770
+ /**
1771
+ * Streaming event for failed MCP calls.
1772
+ */
1773
+ export interface OpenAIResponseObjectStreamResponseMcpCallFailed {
1774
+ sequence_number: number;
1775
+
1776
+ type?: 'response.mcp_call.failed';
1777
+ }
1778
+
1779
+ /**
1780
+ * Streaming event for completed MCP calls.
1781
+ */
1782
+ export interface OpenAIResponseObjectStreamResponseMcpCallCompleted {
1783
+ sequence_number: number;
1784
+
1785
+ type?: 'response.mcp_call.completed';
1786
+ }
1787
+
1788
+ /**
1789
+ * Streaming event for when a new content part is added to a response item.
1790
+ */
1791
+ export interface OpenAIResponseObjectStreamResponseContentPartAdded {
1792
+ content_index: number;
1793
+
1794
+ item_id: string;
1795
+
1796
+ output_index: number;
1797
+
1798
+ /**
1799
+ * Text content within a streamed response part.
1800
+ */
1801
+ part:
1802
+ | OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartOutputText
1803
+ | OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartRefusal
1804
+ | OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartReasoningText;
1805
+
1806
+ response_id: string;
1807
+
1808
+ sequence_number: number;
1809
+
1810
+ type?: 'response.content_part.added';
1811
+ }
1812
+
1813
+ export namespace OpenAIResponseObjectStreamResponseContentPartAdded {
1814
+ /**
1815
+ * Text content within a streamed response part.
1816
+ */
1817
+ export interface OpenAIResponseContentPartOutputText {
1818
+ text: string;
1819
+
1820
+ annotations?: Array<
1821
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation
1822
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation
1823
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation
1824
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath
1825
+ >;
1826
+
1827
+ logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
1828
+
1829
+ type?: 'output_text';
1830
+ }
1831
+
1832
+ export namespace OpenAIResponseContentPartOutputText {
1833
+ /**
1834
+ * File citation annotation for referencing specific files in response content.
1835
+ */
1836
+ export interface OpenAIResponseAnnotationFileCitation {
1837
+ file_id: string;
1838
+
1839
+ filename: string;
1840
+
1841
+ index: number;
1842
+
1843
+ type?: 'file_citation';
1844
+ }
1845
+
1846
+ /**
1847
+ * URL citation annotation for referencing external web resources.
1848
+ */
1849
+ export interface OpenAIResponseAnnotationCitation {
1850
+ end_index: number;
1851
+
1852
+ start_index: number;
1853
+
1854
+ title: string;
1855
+
1856
+ url: string;
1857
+
1858
+ type?: 'url_citation';
1859
+ }
1860
+
1861
+ export interface OpenAIResponseAnnotationContainerFileCitation {
1862
+ container_id: string;
1863
+
1864
+ end_index: number;
1865
+
1866
+ file_id: string;
1867
+
1868
+ filename: string;
1869
+
1870
+ start_index: number;
1871
+
1872
+ type?: 'container_file_citation';
1873
+ }
1874
+
1875
+ export interface OpenAIResponseAnnotationFilePath {
1876
+ file_id: string;
1877
+
1878
+ index: number;
1879
+
1880
+ type?: 'file_path';
1881
+ }
1882
+
1883
+ /**
1884
+ * The log probability for a token from an OpenAI-compatible chat completion
1885
+ * response.
1886
+ */
1887
+ export interface Logprob {
1888
+ /**
1889
+ * The token.
1890
+ */
1891
+ token: string;
1892
+
1893
+ /**
1894
+ * The log probability of the token.
1895
+ */
1896
+ logprob: number;
1897
+
1898
+ /**
1899
+ * The bytes for the token.
1900
+ */
1901
+ bytes?: Array<number> | null;
1902
+
1903
+ /**
1904
+ * The top log probabilities for the token.
1905
+ */
1906
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1907
+ }
1908
+
1909
+ export namespace Logprob {
1910
+ /**
1911
+ * The top log probability for a token from an OpenAI-compatible chat completion
1912
+ * response.
1913
+ */
1914
+ export interface TopLogprob {
1915
+ /**
1916
+ * The token.
1917
+ */
1918
+ token: string;
1919
+
1920
+ /**
1921
+ * The log probability of the token.
1922
+ */
1923
+ logprob: number;
1924
+
1925
+ /**
1926
+ * The bytes for the token.
1927
+ */
1928
+ bytes?: Array<number> | null;
1929
+ }
1930
+ }
1931
+ }
1932
+
1933
+ /**
1934
+ * Refusal content within a streamed response part.
1935
+ */
1936
+ export interface OpenAIResponseContentPartRefusal {
1937
+ refusal: string;
1938
+
1939
+ type?: 'refusal';
1940
+ }
1941
+
1942
+ /**
1943
+ * Reasoning text emitted as part of a streamed response.
1944
+ */
1945
+ export interface OpenAIResponseContentPartReasoningText {
1946
+ text: string;
1947
+
1948
+ type?: 'reasoning_text';
1949
+ }
1950
+ }
1951
+
1952
+ /**
1953
+ * Streaming event for when a content part is completed.
1954
+ */
1955
+ export interface OpenAIResponseObjectStreamResponseContentPartDone {
1956
+ content_index: number;
1957
+
1958
+ item_id: string;
1959
+
1960
+ output_index: number;
1961
+
1962
+ /**
1963
+ * Text content within a streamed response part.
1964
+ */
1965
+ part:
1966
+ | OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartOutputText
1967
+ | OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartRefusal
1968
+ | OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartReasoningText;
1969
+
1970
+ response_id: string;
1971
+
1972
+ sequence_number: number;
1973
+
1974
+ type?: 'response.content_part.done';
1975
+ }
1976
+
1977
+ export namespace OpenAIResponseObjectStreamResponseContentPartDone {
1978
+ /**
1979
+ * Text content within a streamed response part.
1980
+ */
1981
+ export interface OpenAIResponseContentPartOutputText {
1982
+ text: string;
1983
+
1984
+ annotations?: Array<
1985
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation
1986
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation
1987
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation
1988
+ | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath
1989
+ >;
1990
+
1991
+ logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
1992
+
1993
+ type?: 'output_text';
1994
+ }
1995
+
1996
+ export namespace OpenAIResponseContentPartOutputText {
1997
+ /**
1998
+ * File citation annotation for referencing specific files in response content.
1999
+ */
2000
+ export interface OpenAIResponseAnnotationFileCitation {
2001
+ file_id: string;
2002
+
2003
+ filename: string;
2004
+
2005
+ index: number;
2006
+
2007
+ type?: 'file_citation';
2008
+ }
2009
+
2010
+ /**
2011
+ * URL citation annotation for referencing external web resources.
2012
+ */
2013
+ export interface OpenAIResponseAnnotationCitation {
2014
+ end_index: number;
2015
+
2016
+ start_index: number;
2017
+
2018
+ title: string;
2019
+
2020
+ url: string;
2021
+
2022
+ type?: 'url_citation';
2023
+ }
2024
+
2025
+ export interface OpenAIResponseAnnotationContainerFileCitation {
2026
+ container_id: string;
2027
+
2028
+ end_index: number;
2029
+
2030
+ file_id: string;
2031
+
2032
+ filename: string;
2033
+
2034
+ start_index: number;
2035
+
2036
+ type?: 'container_file_citation';
2037
+ }
2038
+
2039
+ export interface OpenAIResponseAnnotationFilePath {
2040
+ file_id: string;
2041
+
2042
+ index: number;
2043
+
2044
+ type?: 'file_path';
2045
+ }
2046
+
2047
+ /**
2048
+ * The log probability for a token from an OpenAI-compatible chat completion
2049
+ * response.
2050
+ */
2051
+ export interface Logprob {
2052
+ /**
2053
+ * The token.
2054
+ */
2055
+ token: string;
2056
+
2057
+ /**
2058
+ * The log probability of the token.
2059
+ */
2060
+ logprob: number;
2061
+
2062
+ /**
2063
+ * The bytes for the token.
2064
+ */
2065
+ bytes?: Array<number> | null;
2066
+
2067
+ /**
2068
+ * The top log probabilities for the token.
2069
+ */
2070
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
2071
+ }
2072
+
2073
+ export namespace Logprob {
2074
+ /**
2075
+ * The top log probability for a token from an OpenAI-compatible chat completion
2076
+ * response.
2077
+ */
2078
+ export interface TopLogprob {
2079
+ /**
2080
+ * The token.
2081
+ */
2082
+ token: string;
2083
+
2084
+ /**
2085
+ * The log probability of the token.
2086
+ */
2087
+ logprob: number;
2088
+
2089
+ /**
2090
+ * The bytes for the token.
2091
+ */
2092
+ bytes?: Array<number> | null;
2093
+ }
2094
+ }
2095
+ }
2096
+
2097
+ /**
2098
+ * Refusal content within a streamed response part.
2099
+ */
2100
+ export interface OpenAIResponseContentPartRefusal {
2101
+ refusal: string;
2102
+
2103
+ type?: 'refusal';
2104
+ }
2105
+
2106
+ /**
2107
+ * Reasoning text emitted as part of a streamed response.
2108
+ */
2109
+ export interface OpenAIResponseContentPartReasoningText {
2110
+ text: string;
2111
+
2112
+ type?: 'reasoning_text';
2113
+ }
2114
+ }
2115
+
2116
+ /**
2117
+ * Streaming event for incremental reasoning text updates.
2118
+ */
2119
+ export interface OpenAIResponseObjectStreamResponseReasoningTextDelta {
2120
+ content_index: number;
2121
+
2122
+ delta: string;
2123
+
2124
+ item_id: string;
2125
+
2126
+ output_index: number;
2127
+
2128
+ sequence_number: number;
2129
+
2130
+ type?: 'response.reasoning_text.delta';
2131
+ }
2132
+
2133
+ /**
2134
+ * Streaming event for when reasoning text is completed.
2135
+ */
2136
+ export interface OpenAIResponseObjectStreamResponseReasoningTextDone {
2137
+ content_index: number;
2138
+
2139
+ item_id: string;
2140
+
2141
+ output_index: number;
2142
+
2143
+ sequence_number: number;
2144
+
2145
+ text: string;
2146
+
2147
+ type?: 'response.reasoning_text.done';
2148
+ }
2149
+
2150
+ /**
2151
+ * Streaming event for when a new reasoning summary part is added.
2152
+ */
2153
+ export interface OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded {
2154
+ item_id: string;
2155
+
2156
+ output_index: number;
2157
+
2158
+ /**
2159
+ * Reasoning summary part in a streamed response.
2160
+ */
2161
+ part: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded.Part;
2162
+
2163
+ sequence_number: number;
2164
+
2165
+ summary_index: number;
2166
+
2167
+ type?: 'response.reasoning_summary_part.added';
2168
+ }
2169
+
2170
+ export namespace OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded {
2171
+ /**
2172
+ * Reasoning summary part in a streamed response.
2173
+ */
2174
+ export interface Part {
2175
+ text: string;
2176
+
2177
+ type?: 'summary_text';
2178
+ }
2179
+ }
2180
+
2181
+ /**
2182
+ * Streaming event for when a reasoning summary part is completed.
2183
+ */
2184
+ export interface OpenAIResponseObjectStreamResponseReasoningSummaryPartDone {
2185
+ item_id: string;
2186
+
2187
+ output_index: number;
2188
+
2189
+ /**
2190
+ * Reasoning summary part in a streamed response.
2191
+ */
2192
+ part: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone.Part;
2193
+
2194
+ sequence_number: number;
2195
+
2196
+ summary_index: number;
2197
+
2198
+ type?: 'response.reasoning_summary_part.done';
2199
+ }
2200
+
2201
+ export namespace OpenAIResponseObjectStreamResponseReasoningSummaryPartDone {
2202
+ /**
2203
+ * Reasoning summary part in a streamed response.
2204
+ */
2205
+ export interface Part {
2206
+ text: string;
2207
+
2208
+ type?: 'summary_text';
2209
+ }
2210
+ }
2211
+
2212
+ /**
2213
+ * Streaming event for incremental reasoning summary text updates.
2214
+ */
2215
+ export interface OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta {
2216
+ delta: string;
2217
+
2218
+ item_id: string;
2219
+
2220
+ output_index: number;
2221
+
2222
+ sequence_number: number;
2223
+
2224
+ summary_index: number;
2225
+
2226
+ type?: 'response.reasoning_summary_text.delta';
2227
+ }
2228
+
2229
+ /**
2230
+ * Streaming event for when reasoning summary text is completed.
2231
+ */
2232
+ export interface OpenAIResponseObjectStreamResponseReasoningSummaryTextDone {
2233
+ item_id: string;
2234
+
2235
+ output_index: number;
2236
+
2237
+ sequence_number: number;
2238
+
2239
+ summary_index: number;
2240
+
2241
+ text: string;
2242
+
2243
+ type?: 'response.reasoning_summary_text.done';
2244
+ }
2245
+
2246
+ /**
2247
+ * Streaming event for incremental refusal text updates.
2248
+ */
2249
+ export interface OpenAIResponseObjectStreamResponseRefusalDelta {
2250
+ content_index: number;
2251
+
2252
+ delta: string;
2253
+
2254
+ item_id: string;
2255
+
2256
+ output_index: number;
2257
+
2258
+ sequence_number: number;
2259
+
2260
+ type?: 'response.refusal.delta';
2261
+ }
2262
+
2263
+ /**
2264
+ * Streaming event for when refusal text is completed.
2265
+ */
2266
+ export interface OpenAIResponseObjectStreamResponseRefusalDone {
2267
+ content_index: number;
2268
+
2269
+ item_id: string;
2270
+
2271
+ output_index: number;
2272
+
2273
+ refusal: string;
2274
+
2275
+ sequence_number: number;
2276
+
2277
+ type?: 'response.refusal.done';
2278
+ }
2279
+
2280
+ /**
2281
+ * Streaming event for when an annotation is added to output text.
2282
+ */
2283
+ export interface OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded {
2284
+ /**
2285
+ * File citation annotation for referencing specific files in response content.
2286
+ */
2287
+ annotation:
2288
+ | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationFileCitation
2289
+ | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationCitation
2290
+ | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationContainerFileCitation
2291
+ | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationFilePath;
2292
+
2293
+ annotation_index: number;
2294
+
2295
+ content_index: number;
2296
+
2297
+ item_id: string;
2298
+
2299
+ output_index: number;
2300
+
2301
+ sequence_number: number;
2302
+
2303
+ type?: 'response.output_text.annotation.added';
2304
+ }
2305
+
2306
+ export namespace OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded {
2307
+ /**
2308
+ * File citation annotation for referencing specific files in response content.
2309
+ */
2310
+ export interface OpenAIResponseAnnotationFileCitation {
2311
+ file_id: string;
2312
+
2313
+ filename: string;
2314
+
2315
+ index: number;
2316
+
2317
+ type?: 'file_citation';
2318
+ }
2319
+
2320
+ /**
2321
+ * URL citation annotation for referencing external web resources.
2322
+ */
2323
+ export interface OpenAIResponseAnnotationCitation {
2324
+ end_index: number;
2325
+
2326
+ start_index: number;
2327
+
2328
+ title: string;
2329
+
2330
+ url: string;
2331
+
2332
+ type?: 'url_citation';
2333
+ }
2334
+
2335
+ export interface OpenAIResponseAnnotationContainerFileCitation {
2336
+ container_id: string;
2337
+
2338
+ end_index: number;
2339
+
2340
+ file_id: string;
2341
+
2342
+ filename: string;
2343
+
2344
+ start_index: number;
2345
+
2346
+ type?: 'container_file_citation';
2347
+ }
2348
+
2349
+ export interface OpenAIResponseAnnotationFilePath {
2350
+ file_id: string;
2351
+
2352
+ index: number;
2353
+
2354
+ type?: 'file_path';
2355
+ }
2356
+ }
2357
+
2358
+ /**
2359
+ * Streaming event for file search calls in progress.
2360
+ */
2361
+ export interface OpenAIResponseObjectStreamResponseFileSearchCallInProgress {
2362
+ item_id: string;
2363
+
2364
+ output_index: number;
2365
+
2366
+ sequence_number: number;
2367
+
2368
+ type?: 'response.file_search_call.in_progress';
2369
+ }
2370
+
2371
+ /**
2372
+ * Streaming event for file search currently searching.
2373
+ */
2374
+ export interface OpenAIResponseObjectStreamResponseFileSearchCallSearching {
2375
+ item_id: string;
2376
+
2377
+ output_index: number;
2378
+
2379
+ sequence_number: number;
2380
+
2381
+ type?: 'response.file_search_call.searching';
2382
+ }
2383
+
2384
+ /**
2385
+ * Streaming event for completed file search calls.
2386
+ */
2387
+ export interface OpenAIResponseObjectStreamResponseFileSearchCallCompleted {
2388
+ item_id: string;
2389
+
2390
+ output_index: number;
2391
+
2392
+ sequence_number: number;
2393
+
2394
+ type?: 'response.file_search_call.completed';
2395
+ }
2396
+
2397
+ /**
2398
+ * Streaming event emitted when a response ends in an incomplete state.
2399
+ */
2400
+ export interface OpenAIResponseObjectStreamResponseIncomplete {
2401
+ /**
2402
+ * Complete OpenAI response object containing generation results and metadata.
2403
+ */
2404
+ response: ResponsesAPI.ResponseObject;
2405
+
2406
+ sequence_number: number;
2407
+
2408
+ type?: 'response.incomplete';
2409
+ }
2410
+
2411
+ /**
2412
+ * Streaming event emitted when a response fails.
2413
+ */
2414
+ export interface OpenAIResponseObjectStreamResponseFailed {
2415
+ /**
2416
+ * Complete OpenAI response object containing generation results and metadata.
2417
+ */
2418
+ response: ResponsesAPI.ResponseObject;
2419
+
2420
+ sequence_number: number;
2421
+
2422
+ type?: 'response.failed';
2423
+ }
2424
+
2425
+ /**
2426
+ * Streaming event indicating a response has been completed.
2427
+ */
2428
+ export interface OpenAIResponseObjectStreamResponseCompleted {
2429
+ /**
2430
+ * Complete OpenAI response object containing generation results and metadata.
2431
+ */
2432
+ response: ResponsesAPI.ResponseObject;
2433
+
2434
+ type?: 'response.completed';
2435
+ }
2436
+ }
2437
+
2438
+ /**
2439
+ * OpenAI response object extended with input context information.
2440
+ */
2441
+ export interface ResponseListResponse {
2442
+ id: string;
2443
+
2444
+ created_at: number;
2445
+
2446
+ input: Array<
2447
+ | ResponseListResponse.OpenAIResponseMessageOutput
2448
+ | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall
2449
+ | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall
2450
+ | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall
2451
+ | ResponseListResponse.OpenAIResponseOutputMessageMcpCall
2452
+ | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools
2453
+ | ResponseListResponse.OpenAIResponseMcpApprovalRequest
2454
+ | ResponseListResponse.OpenAIResponseInputFunctionToolCallOutput
2455
+ | ResponseListResponse.OpenAIResponseMcpApprovalResponse
2456
+ | ResponseListResponse.OpenAIResponseMessageOutput
2457
+ >;
2458
+
2459
+ model: string;
2460
+
2461
+ output: Array<
2462
+ | ResponseListResponse.OpenAIResponseMessageOutput
2463
+ | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall
2464
+ | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall
2465
+ | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall
2466
+ | ResponseListResponse.OpenAIResponseOutputMessageMcpCall
2467
+ | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools
2468
+ | ResponseListResponse.OpenAIResponseMcpApprovalRequest
2469
+ >;
2470
+
2471
+ status: string;
2472
+
2473
+ store: boolean;
2474
+
2475
+ completed_at?: number | null;
2476
+
2477
+ /**
2478
+ * Error details for failed OpenAI response requests.
2479
+ */
2480
+ error?: ResponseListResponse.Error | null;
2481
+
2482
+ instructions?: string | null;
2483
+
2484
+ max_output_tokens?: number | null;
2485
+
2486
+ max_tool_calls?: number | null;
2487
+
2488
+ metadata?: { [key: string]: string } | null;
2489
+
2490
+ object?: 'response';
2491
+
2492
+ parallel_tool_calls?: boolean | null;
2493
+
2494
+ previous_response_id?: string | null;
2495
+
2496
+ /**
2497
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
2498
+ */
2499
+ prompt?: ResponseListResponse.Prompt | null;
2500
+
2501
+ /**
2502
+ * Configuration for reasoning effort in OpenAI responses.
2503
+ *
2504
+ * Controls how much reasoning the model performs before generating a response.
2505
+ */
2506
+ reasoning?: ResponseListResponse.Reasoning | null;
2507
+
2508
+ safety_identifier?: string | null;
2509
+
2510
+ temperature?: number | null;
2511
+
2512
+ /**
2513
+ * Text response configuration for OpenAI responses.
2514
+ */
2515
+ text?: ResponseListResponse.Text;
2516
+
2517
+ /**
2518
+ * Constrains the tools available to the model to a pre-defined set.
2519
+ */
2520
+ tool_choice?:
2521
+ | 'auto'
2522
+ | 'required'
2523
+ | 'none'
2524
+ | ResponseListResponse.OpenAIResponseInputToolChoiceAllowedTools
2525
+ | ResponseListResponse.OpenAIResponseInputToolChoiceFileSearch
2526
+ | ResponseListResponse.OpenAIResponseInputToolChoiceWebSearch
2527
+ | ResponseListResponse.OpenAIResponseInputToolChoiceFunctionTool
2528
+ | ResponseListResponse.OpenAIResponseInputToolChoiceMcpTool
2529
+ | ResponseListResponse.OpenAIResponseInputToolChoiceCustomTool
2530
+ | null;
2531
+
2532
+ tools?: Array<
2533
+ | ResponseListResponse.OpenAIResponseInputToolWebSearch
2534
+ | ResponseListResponse.OpenAIResponseInputToolFileSearch
2535
+ | ResponseListResponse.OpenAIResponseInputToolFunction
2536
+ | ResponseListResponse.OpenAIResponseToolMcp
2537
+ > | null;
2538
+
2539
+ top_p?: number | null;
2540
+
2541
+ truncation?: string | null;
2542
+
2543
+ /**
2544
+ * Usage information for OpenAI response.
2545
+ */
2546
+ usage?: ResponseListResponse.Usage | null;
2547
+ }
2548
+
2549
+ export namespace ResponseListResponse {
2550
+ /**
2551
+ * Corresponds to the various Message types in the Responses API. They are all
2552
+ * under one type because the Responses API gives them all the same "type" value,
2553
+ * and there is no way to tell them apart in certain scenarios.
2554
+ */
2555
+ export interface OpenAIResponseMessageOutput {
2556
+ content:
2557
+ | string
2558
+ | Array<
2559
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
2560
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
2561
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
2562
+ >
2563
+ | Array<
2564
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
2565
+ | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
2566
+ >;
2567
+
2568
+ role: 'system' | 'developer' | 'user' | 'assistant';
2569
+
2570
+ id?: string | null;
2571
+
2572
+ status?: string | null;
2573
+
2574
+ type?: 'message';
2575
+ }
2576
+
2577
+ export namespace OpenAIResponseMessageOutput {
2578
+ /**
2579
+ * Text content for input messages in OpenAI response format.
2580
+ */
2581
+ export interface OpenAIResponseInputMessageContentText {
2582
+ text: string;
2583
+
2584
+ type?: 'input_text';
2585
+ }
2586
+
2587
+ /**
2588
+ * Image content for input messages in OpenAI response format.
2589
+ */
2590
+ export interface OpenAIResponseInputMessageContentImage {
2591
+ detail?: 'low' | 'high' | 'auto';
2592
+
2593
+ file_id?: string | null;
2594
+
2595
+ image_url?: string | null;
2596
+
2597
+ type?: 'input_image';
2598
+ }
2599
+
2600
+ /**
2601
+ * File content for input messages in OpenAI response format.
2602
+ */
2603
+ export interface OpenAIResponseInputMessageContentFile {
2604
+ file_data?: string | null;
2605
+
2606
+ file_id?: string | null;
2607
+
2608
+ file_url?: string | null;
2609
+
2610
+ filename?: string | null;
2611
+
2612
+ type?: 'input_file';
2613
+ }
2614
+
2615
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
2616
+ text: string;
2617
+
2618
+ annotations?: Array<
2619
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
2620
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
2621
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
2622
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
2623
+ >;
2624
+
2625
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
2626
+
2627
+ type?: 'output_text';
2628
+ }
2629
+
2630
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
2631
+ /**
2632
+ * File citation annotation for referencing specific files in response content.
2633
+ */
2634
+ export interface OpenAIResponseAnnotationFileCitation {
2635
+ file_id: string;
2636
+
2637
+ filename: string;
2638
+
2639
+ index: number;
2640
+
2641
+ type?: 'file_citation';
2642
+ }
2643
+
2644
+ /**
2645
+ * URL citation annotation for referencing external web resources.
2646
+ */
2647
+ export interface OpenAIResponseAnnotationCitation {
2648
+ end_index: number;
2649
+
2650
+ start_index: number;
2651
+
2652
+ title: string;
2653
+
2654
+ url: string;
2655
+
2656
+ type?: 'url_citation';
2657
+ }
2658
+
2659
+ export interface OpenAIResponseAnnotationContainerFileCitation {
2660
+ container_id: string;
2661
+
2662
+ end_index: number;
2663
+
2664
+ file_id: string;
2665
+
2666
+ filename: string;
2667
+
2668
+ start_index: number;
2669
+
2670
+ type?: 'container_file_citation';
2671
+ }
2672
+
2673
+ export interface OpenAIResponseAnnotationFilePath {
2674
+ file_id: string;
2675
+
2676
+ index: number;
2677
+
2678
+ type?: 'file_path';
2679
+ }
2680
+
2681
+ /**
2682
+ * The log probability for a token from an OpenAI-compatible chat completion
2683
+ * response.
2684
+ */
2685
+ export interface Logprob {
2686
+ /**
2687
+ * The token.
2688
+ */
2689
+ token: string;
2690
+
2691
+ /**
2692
+ * The log probability of the token.
2693
+ */
2694
+ logprob: number;
2695
+
2696
+ /**
2697
+ * The bytes for the token.
2698
+ */
2699
+ bytes?: Array<number> | null;
2700
+
2701
+ /**
2702
+ * The top log probabilities for the token.
2703
+ */
2704
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
2705
+ }
2706
+
2707
+ export namespace Logprob {
2708
+ /**
2709
+ * The top log probability for a token from an OpenAI-compatible chat completion
2710
+ * response.
2711
+ */
2712
+ export interface TopLogprob {
2713
+ /**
2714
+ * The token.
2715
+ */
2716
+ token: string;
2717
+
2718
+ /**
2719
+ * The log probability of the token.
2720
+ */
2721
+ logprob: number;
2722
+
2723
+ /**
2724
+ * The bytes for the token.
2725
+ */
2726
+ bytes?: Array<number> | null;
2727
+ }
2728
+ }
2729
+ }
2730
+
2731
+ /**
2732
+ * Refusal content within a streamed response part.
2733
+ */
2734
+ export interface OpenAIResponseContentPartRefusal {
2735
+ refusal: string;
2736
+
2737
+ type?: 'refusal';
2738
+ }
2739
+ }
2740
+
2741
+ /**
2742
+ * Web search tool call output message for OpenAI responses.
2743
+ */
2744
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
2745
+ id: string;
2746
+
2747
+ status: string;
2748
+
2749
+ type?: 'web_search_call';
2750
+ }
2751
+
2752
+ /**
2753
+ * File search tool call output message for OpenAI responses.
2754
+ */
2755
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
2756
+ id: string;
2757
+
2758
+ queries: Array<string>;
2759
+
2760
+ status: string;
2761
+
2762
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
2763
+
2764
+ type?: 'file_search_call';
2765
+ }
2766
+
2767
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
2768
+ /**
2769
+ * Search results returned by the file search operation.
2770
+ */
2771
+ export interface Result {
2772
+ attributes: { [key: string]: unknown };
2773
+
2774
+ file_id: string;
2775
+
2776
+ filename: string;
2777
+
2778
+ score: number;
2779
+
2780
+ text: string;
2781
+ }
2782
+ }
2783
+
2784
+ /**
2785
+ * Function tool call output message for OpenAI responses.
2786
+ */
2787
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
2788
+ arguments: string;
2789
+
2790
+ call_id: string;
2791
+
2792
+ name: string;
2793
+
2794
+ id?: string | null;
2795
+
2796
+ status?: string | null;
2797
+
2798
+ type?: 'function_call';
2799
+ }
2800
+
2801
+ /**
2802
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
2803
+ */
2804
+ export interface OpenAIResponseOutputMessageMcpCall {
2805
+ id: string;
2806
+
2807
+ arguments: string;
2808
+
2809
+ name: string;
2810
+
2811
+ server_label: string;
2812
+
2813
+ error?: string | null;
2814
+
2815
+ output?: string | null;
2816
+
2817
+ type?: 'mcp_call';
2818
+ }
2819
+
2820
+ /**
2821
+ * MCP list tools output message containing available tools from an MCP server.
2822
+ */
2823
+ export interface OpenAIResponseOutputMessageMcpListTools {
2824
+ id: string;
2825
+
2826
+ server_label: string;
2827
+
2828
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
2829
+
2830
+ type?: 'mcp_list_tools';
2831
+ }
2832
+
2833
+ export namespace OpenAIResponseOutputMessageMcpListTools {
2834
+ /**
2835
+ * Tool definition returned by MCP list tools operation.
2836
+ */
2837
+ export interface Tool {
2838
+ input_schema: { [key: string]: unknown };
2839
+
2840
+ name: string;
2841
+
2842
+ description?: string | null;
2843
+ }
2844
+ }
2845
+
2846
+ /**
2847
+ * A request for human approval of a tool invocation.
2848
+ */
2849
+ export interface OpenAIResponseMcpApprovalRequest {
2850
+ id: string;
2851
+
2852
+ arguments: string;
2853
+
2854
+ name: string;
2855
+
2856
+ server_label: string;
2857
+
2858
+ type?: 'mcp_approval_request';
2859
+ }
2860
+
2861
+ /**
2862
+ * This represents the output of a function call that gets passed back to the
2863
+ * model.
2864
+ */
2865
+ export interface OpenAIResponseInputFunctionToolCallOutput {
2866
+ call_id: string;
2867
+
2868
+ output: string;
2869
+
2870
+ id?: string | null;
2871
+
2872
+ status?: string | null;
2873
+
2874
+ type?: 'function_call_output';
2875
+ }
2876
+
2877
+ /**
2878
+ * A response to an MCP approval request.
2879
+ */
2880
+ export interface OpenAIResponseMcpApprovalResponse {
2881
+ approval_request_id: string;
2882
+
2883
+ approve: boolean;
2884
+
2885
+ id?: string | null;
2886
+
2887
+ reason?: string | null;
2888
+
2889
+ type?: 'mcp_approval_response';
2890
+ }
2891
+
2892
+ /**
2893
+ * Corresponds to the various Message types in the Responses API. They are all
2894
+ * under one type because the Responses API gives them all the same "type" value,
2895
+ * and there is no way to tell them apart in certain scenarios.
2896
+ */
2897
+ export interface OpenAIResponseMessageOutput {
2898
+ content:
2899
+ | string
2900
+ | Array<
2901
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
2902
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
2903
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
2904
+ >
2905
+ | Array<
2906
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
2907
+ | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
2908
+ >;
2909
+
2910
+ role: 'system' | 'developer' | 'user' | 'assistant';
2911
+
2912
+ id?: string | null;
2913
+
2914
+ status?: string | null;
2915
+
2916
+ type?: 'message';
2917
+ }
2918
+
2919
+ export namespace OpenAIResponseMessageOutput {
2920
+ /**
2921
+ * Text content for input messages in OpenAI response format.
2922
+ */
2923
+ export interface OpenAIResponseInputMessageContentText {
2924
+ text: string;
2925
+
2926
+ type?: 'input_text';
2927
+ }
2928
+
2929
+ /**
2930
+ * Image content for input messages in OpenAI response format.
2931
+ */
2932
+ export interface OpenAIResponseInputMessageContentImage {
2933
+ detail?: 'low' | 'high' | 'auto';
2934
+
2935
+ file_id?: string | null;
2936
+
2937
+ image_url?: string | null;
2938
+
2939
+ type?: 'input_image';
2940
+ }
2941
+
2942
+ /**
2943
+ * File content for input messages in OpenAI response format.
2944
+ */
2945
+ export interface OpenAIResponseInputMessageContentFile {
2946
+ file_data?: string | null;
2947
+
2948
+ file_id?: string | null;
2949
+
2950
+ file_url?: string | null;
2951
+
2952
+ filename?: string | null;
2953
+
2954
+ type?: 'input_file';
2955
+ }
2956
+
2957
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
2958
+ text: string;
2959
+
2960
+ annotations?: Array<
2961
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
2962
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
2963
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
2964
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
2965
+ >;
2966
+
2967
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
2968
+
2969
+ type?: 'output_text';
2970
+ }
2971
+
2972
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
2973
+ /**
2974
+ * File citation annotation for referencing specific files in response content.
2975
+ */
2976
+ export interface OpenAIResponseAnnotationFileCitation {
2977
+ file_id: string;
2978
+
2979
+ filename: string;
2980
+
2981
+ index: number;
2982
+
2983
+ type?: 'file_citation';
2984
+ }
2985
+
2986
+ /**
2987
+ * URL citation annotation for referencing external web resources.
2988
+ */
2989
+ export interface OpenAIResponseAnnotationCitation {
2990
+ end_index: number;
2991
+
2992
+ start_index: number;
2993
+
2994
+ title: string;
2995
+
2996
+ url: string;
2997
+
2998
+ type?: 'url_citation';
2999
+ }
3000
+
3001
+ export interface OpenAIResponseAnnotationContainerFileCitation {
3002
+ container_id: string;
3003
+
3004
+ end_index: number;
3005
+
3006
+ file_id: string;
3007
+
3008
+ filename: string;
3009
+
3010
+ start_index: number;
3011
+
3012
+ type?: 'container_file_citation';
3013
+ }
3014
+
3015
+ export interface OpenAIResponseAnnotationFilePath {
3016
+ file_id: string;
3017
+
3018
+ index: number;
3019
+
3020
+ type?: 'file_path';
3021
+ }
3022
+
3023
+ /**
3024
+ * The log probability for a token from an OpenAI-compatible chat completion
3025
+ * response.
3026
+ */
3027
+ export interface Logprob {
3028
+ /**
3029
+ * The token.
3030
+ */
3031
+ token: string;
3032
+
3033
+ /**
3034
+ * The log probability of the token.
3035
+ */
3036
+ logprob: number;
3037
+
3038
+ /**
3039
+ * The bytes for the token.
3040
+ */
3041
+ bytes?: Array<number> | null;
3042
+
3043
+ /**
3044
+ * The top log probabilities for the token.
3045
+ */
3046
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
3047
+ }
3048
+
3049
+ export namespace Logprob {
3050
+ /**
3051
+ * The top log probability for a token from an OpenAI-compatible chat completion
3052
+ * response.
3053
+ */
3054
+ export interface TopLogprob {
3055
+ /**
3056
+ * The token.
3057
+ */
3058
+ token: string;
3059
+
3060
+ /**
3061
+ * The log probability of the token.
3062
+ */
3063
+ logprob: number;
3064
+
3065
+ /**
3066
+ * The bytes for the token.
3067
+ */
3068
+ bytes?: Array<number> | null;
3069
+ }
3070
+ }
3071
+ }
3072
+
3073
+ /**
3074
+ * Refusal content within a streamed response part.
3075
+ */
3076
+ export interface OpenAIResponseContentPartRefusal {
3077
+ refusal: string;
3078
+
3079
+ type?: 'refusal';
3080
+ }
3081
+ }
3082
+
3083
+ /**
3084
+ * Corresponds to the various Message types in the Responses API. They are all
3085
+ * under one type because the Responses API gives them all the same "type" value,
3086
+ * and there is no way to tell them apart in certain scenarios.
3087
+ */
3088
+ export interface OpenAIResponseMessageOutput {
3089
+ content:
3090
+ | string
3091
+ | Array<
3092
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
3093
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
3094
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
3095
+ >
3096
+ | Array<
3097
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
3098
+ | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
3099
+ >;
3100
+
3101
+ role: 'system' | 'developer' | 'user' | 'assistant';
3102
+
3103
+ id?: string | null;
3104
+
3105
+ status?: string | null;
3106
+
3107
+ type?: 'message';
3108
+ }
3109
+
3110
+ export namespace OpenAIResponseMessageOutput {
3111
+ /**
3112
+ * Text content for input messages in OpenAI response format.
3113
+ */
3114
+ export interface OpenAIResponseInputMessageContentText {
3115
+ text: string;
3116
+
3117
+ type?: 'input_text';
3118
+ }
3119
+
3120
+ /**
3121
+ * Image content for input messages in OpenAI response format.
3122
+ */
3123
+ export interface OpenAIResponseInputMessageContentImage {
3124
+ detail?: 'low' | 'high' | 'auto';
3125
+
3126
+ file_id?: string | null;
3127
+
3128
+ image_url?: string | null;
3129
+
3130
+ type?: 'input_image';
3131
+ }
3132
+
3133
+ /**
3134
+ * File content for input messages in OpenAI response format.
3135
+ */
3136
+ export interface OpenAIResponseInputMessageContentFile {
3137
+ file_data?: string | null;
3138
+
3139
+ file_id?: string | null;
3140
+
3141
+ file_url?: string | null;
3142
+
3143
+ filename?: string | null;
3144
+
3145
+ type?: 'input_file';
3146
+ }
3147
+
3148
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
3149
+ text: string;
3150
+
3151
+ annotations?: Array<
3152
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
3153
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
3154
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
3155
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
3156
+ >;
3157
+
3158
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
3159
+
3160
+ type?: 'output_text';
3161
+ }
3162
+
3163
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
3164
+ /**
3165
+ * File citation annotation for referencing specific files in response content.
3166
+ */
3167
+ export interface OpenAIResponseAnnotationFileCitation {
3168
+ file_id: string;
3169
+
3170
+ filename: string;
3171
+
3172
+ index: number;
3173
+
3174
+ type?: 'file_citation';
3175
+ }
3176
+
3177
+ /**
3178
+ * URL citation annotation for referencing external web resources.
3179
+ */
3180
+ export interface OpenAIResponseAnnotationCitation {
3181
+ end_index: number;
3182
+
3183
+ start_index: number;
3184
+
3185
+ title: string;
3186
+
3187
+ url: string;
3188
+
3189
+ type?: 'url_citation';
3190
+ }
3191
+
3192
+ export interface OpenAIResponseAnnotationContainerFileCitation {
3193
+ container_id: string;
3194
+
3195
+ end_index: number;
3196
+
3197
+ file_id: string;
3198
+
3199
+ filename: string;
3200
+
3201
+ start_index: number;
3202
+
3203
+ type?: 'container_file_citation';
3204
+ }
3205
+
3206
+ export interface OpenAIResponseAnnotationFilePath {
3207
+ file_id: string;
3208
+
3209
+ index: number;
3210
+
3211
+ type?: 'file_path';
3212
+ }
3213
+
3214
+ /**
3215
+ * The log probability for a token from an OpenAI-compatible chat completion
3216
+ * response.
3217
+ */
3218
+ export interface Logprob {
3219
+ /**
3220
+ * The token.
3221
+ */
3222
+ token: string;
3223
+
3224
+ /**
3225
+ * The log probability of the token.
3226
+ */
3227
+ logprob: number;
3228
+
3229
+ /**
3230
+ * The bytes for the token.
3231
+ */
3232
+ bytes?: Array<number> | null;
3233
+
3234
+ /**
3235
+ * The top log probabilities for the token.
3236
+ */
3237
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
3238
+ }
3239
+
3240
+ export namespace Logprob {
3241
+ /**
3242
+ * The top log probability for a token from an OpenAI-compatible chat completion
3243
+ * response.
3244
+ */
3245
+ export interface TopLogprob {
3246
+ /**
3247
+ * The token.
3248
+ */
3249
+ token: string;
3250
+
3251
+ /**
3252
+ * The log probability of the token.
3253
+ */
3254
+ logprob: number;
3255
+
3256
+ /**
3257
+ * The bytes for the token.
3258
+ */
3259
+ bytes?: Array<number> | null;
3260
+ }
3261
+ }
3262
+ }
3263
+
3264
+ /**
3265
+ * Refusal content within a streamed response part.
3266
+ */
3267
+ export interface OpenAIResponseContentPartRefusal {
3268
+ refusal: string;
3269
+
3270
+ type?: 'refusal';
3271
+ }
3272
+ }
3273
+
3274
+ /**
3275
+ * Web search tool call output message for OpenAI responses.
3276
+ */
3277
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
3278
+ id: string;
3279
+
3280
+ status: string;
3281
+
3282
+ type?: 'web_search_call';
3283
+ }
3284
+
3285
+ /**
3286
+ * File search tool call output message for OpenAI responses.
3287
+ */
3288
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
3289
+ id: string;
3290
+
3291
+ queries: Array<string>;
3292
+
3293
+ status: string;
3294
+
3295
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
3296
+
3297
+ type?: 'file_search_call';
3298
+ }
3299
+
3300
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
3301
+ /**
3302
+ * Search results returned by the file search operation.
3303
+ */
3304
+ export interface Result {
3305
+ attributes: { [key: string]: unknown };
3306
+
3307
+ file_id: string;
3308
+
3309
+ filename: string;
3310
+
3311
+ score: number;
3312
+
3313
+ text: string;
3314
+ }
3315
+ }
3316
+
3317
+ /**
3318
+ * Function tool call output message for OpenAI responses.
3319
+ */
3320
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
3321
+ arguments: string;
3322
+
3323
+ call_id: string;
3324
+
3325
+ name: string;
3326
+
3327
+ id?: string | null;
3328
+
3329
+ status?: string | null;
3330
+
3331
+ type?: 'function_call';
3332
+ }
3333
+
3334
+ /**
3335
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
3336
+ */
3337
+ export interface OpenAIResponseOutputMessageMcpCall {
3338
+ id: string;
3339
+
3340
+ arguments: string;
3341
+
3342
+ name: string;
3343
+
3344
+ server_label: string;
3345
+
3346
+ error?: string | null;
3347
+
3348
+ output?: string | null;
3349
+
3350
+ type?: 'mcp_call';
3351
+ }
3352
+
3353
+ /**
3354
+ * MCP list tools output message containing available tools from an MCP server.
3355
+ */
3356
+ export interface OpenAIResponseOutputMessageMcpListTools {
3357
+ id: string;
3358
+
3359
+ server_label: string;
3360
+
3361
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
3362
+
3363
+ type?: 'mcp_list_tools';
3364
+ }
3365
+
3366
+ export namespace OpenAIResponseOutputMessageMcpListTools {
3367
+ /**
3368
+ * Tool definition returned by MCP list tools operation.
3369
+ */
3370
+ export interface Tool {
3371
+ input_schema: { [key: string]: unknown };
3372
+
3373
+ name: string;
3374
+
3375
+ description?: string | null;
3376
+ }
3377
+ }
3378
+
3379
+ /**
3380
+ * A request for human approval of a tool invocation.
3381
+ */
3382
+ export interface OpenAIResponseMcpApprovalRequest {
3383
+ id: string;
3384
+
3385
+ arguments: string;
3386
+
3387
+ name: string;
3388
+
3389
+ server_label: string;
3390
+
3391
+ type?: 'mcp_approval_request';
3392
+ }
3393
+
3394
+ /**
3395
+ * Error details for failed OpenAI response requests.
3396
+ */
3397
+ export interface Error {
3398
+ code: string;
3399
+
3400
+ message: string;
3401
+ }
3402
+
3403
+ /**
3404
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
3405
+ */
3406
+ export interface Prompt {
3407
+ id: string;
3408
+
3409
+ variables?: {
3410
+ [key: string]:
3411
+ | Prompt.OpenAIResponseInputMessageContentText
3412
+ | Prompt.OpenAIResponseInputMessageContentImage
3413
+ | Prompt.OpenAIResponseInputMessageContentFile;
3414
+ } | null;
3415
+
3416
+ version?: string | null;
3417
+ }
3418
+
3419
+ export namespace Prompt {
3420
+ /**
3421
+ * Text content for input messages in OpenAI response format.
3422
+ */
3423
+ export interface OpenAIResponseInputMessageContentText {
3424
+ text: string;
3425
+
3426
+ type?: 'input_text';
3427
+ }
3428
+
3429
+ /**
3430
+ * Image content for input messages in OpenAI response format.
3431
+ */
3432
+ export interface OpenAIResponseInputMessageContentImage {
3433
+ detail?: 'low' | 'high' | 'auto';
3434
+
3435
+ file_id?: string | null;
3436
+
3437
+ image_url?: string | null;
3438
+
3439
+ type?: 'input_image';
3440
+ }
3441
+
3442
+ /**
3443
+ * File content for input messages in OpenAI response format.
3444
+ */
3445
+ export interface OpenAIResponseInputMessageContentFile {
3446
+ file_data?: string | null;
3447
+
3448
+ file_id?: string | null;
3449
+
3450
+ file_url?: string | null;
3451
+
3452
+ filename?: string | null;
3453
+
3454
+ type?: 'input_file';
3455
+ }
3456
+ }
3457
+
3458
+ /**
3459
+ * Configuration for reasoning effort in OpenAI responses.
3460
+ *
3461
+ * Controls how much reasoning the model performs before generating a response.
3462
+ */
3463
+ export interface Reasoning {
3464
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
3465
+ }
3466
+
3467
+ /**
3468
+ * Text response configuration for OpenAI responses.
3469
+ */
3470
+ export interface Text {
3471
+ /**
3472
+ * Configuration for Responses API text format.
3473
+ */
3474
+ format?: Text.Format | null;
3475
+ }
3476
+
3477
+ export namespace Text {
3478
+ /**
3479
+ * Configuration for Responses API text format.
3480
+ */
3481
+ export interface Format {
3482
+ description?: string | null;
3483
+
3484
+ name?: string | null;
3485
+
3486
+ schema?: { [key: string]: unknown } | null;
3487
+
3488
+ strict?: boolean | null;
3489
+
3490
+ type?: 'text' | 'json_schema' | 'json_object';
3491
+ }
3492
+ }
3493
+
3494
+ /**
3495
+ * Constrains the tools available to the model to a pre-defined set.
3496
+ */
3497
+ export interface OpenAIResponseInputToolChoiceAllowedTools {
3498
+ tools: Array<{ [key: string]: string }>;
3499
+
3500
+ mode?: 'auto' | 'required';
3501
+
3502
+ type?: 'allowed_tools';
3503
+ }
3504
+
3505
+ /**
3506
+ * Indicates that the model should use file search to generate a response.
3507
+ */
3508
+ export interface OpenAIResponseInputToolChoiceFileSearch {
3509
+ type?: 'file_search';
3510
+ }
3511
+
3512
+ /**
3513
+ * Indicates that the model should use web search to generate a response
3514
+ */
3515
+ export interface OpenAIResponseInputToolChoiceWebSearch {
3516
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
3517
+ }
3518
+
3519
+ /**
3520
+ * Forces the model to call a specific function.
3521
+ */
3522
+ export interface OpenAIResponseInputToolChoiceFunctionTool {
3523
+ name: string;
3524
+
3525
+ type?: 'function';
3526
+ }
3527
+
3528
+ /**
3529
+ * Forces the model to call a specific tool on a remote MCP server
3530
+ */
3531
+ export interface OpenAIResponseInputToolChoiceMcpTool {
3532
+ server_label: string;
3533
+
3534
+ name?: string | null;
3535
+
3536
+ type?: 'mcp';
3537
+ }
3538
+
3539
+ /**
3540
+ * Forces the model to call a custom tool.
3541
+ */
3542
+ export interface OpenAIResponseInputToolChoiceCustomTool {
3543
+ name: string;
3544
+
3545
+ type?: 'custom';
3546
+ }
3547
+
3548
+ /**
3549
+ * Web search tool configuration for OpenAI response inputs.
3550
+ */
3551
+ export interface OpenAIResponseInputToolWebSearch {
3552
+ search_context_size?: string | null;
3553
+
3554
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
3555
+ }
3556
+
3557
+ /**
3558
+ * File search tool configuration for OpenAI response inputs.
3559
+ */
3560
+ export interface OpenAIResponseInputToolFileSearch {
3561
+ vector_store_ids: Array<string>;
3562
+
3563
+ filters?: { [key: string]: unknown } | null;
3564
+
3565
+ max_num_results?: number | null;
3566
+
3567
+ /**
3568
+ * Options for ranking and filtering search results.
3569
+ *
3570
+ * This class configures how search results are ranked and filtered. You can use
3571
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
3572
+ * VectorStoresConfig are used when parameters are not provided.
3573
+ *
3574
+ * Examples: # Weighted ranker with custom alpha
3575
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
3576
+ *
3577
+ * # RRF ranker with custom impact factor
3578
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
3579
+ *
3580
+ * # Use config defaults (just specify ranker type)
3581
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
3582
+ *
3583
+ * # Score threshold filtering
3584
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
3585
+ */
3586
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
3587
+
3588
+ type?: 'file_search';
3589
+ }
3590
+
3591
+ export namespace OpenAIResponseInputToolFileSearch {
3592
+ /**
3593
+ * Options for ranking and filtering search results.
3594
+ *
3595
+ * This class configures how search results are ranked and filtered. You can use
3596
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
3597
+ * VectorStoresConfig are used when parameters are not provided.
3598
+ *
3599
+ * Examples: # Weighted ranker with custom alpha
3600
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
3601
+ *
3602
+ * # RRF ranker with custom impact factor
3603
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
3604
+ *
3605
+ * # Use config defaults (just specify ranker type)
3606
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
3607
+ *
3608
+ * # Score threshold filtering
3609
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
3610
+ */
3611
+ export interface RankingOptions {
3612
+ /**
3613
+ * Weight factor for weighted ranker
3614
+ */
3615
+ alpha?: number | null;
3616
+
3617
+ /**
3618
+ * Impact factor for RRF algorithm
3619
+ */
3620
+ impact_factor?: number | null;
3621
+
3622
+ /**
3623
+ * Model identifier for neural reranker
3624
+ */
3625
+ model?: string | null;
3626
+
3627
+ ranker?: string | null;
3628
+
3629
+ score_threshold?: number | null;
3630
+
3631
+ /**
3632
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
3633
+ * 'keyword', 'neural'
3634
+ */
3635
+ weights?: { [key: string]: number } | null;
3636
+ }
3637
+ }
3638
+
3639
+ /**
3640
+ * Function tool configuration for OpenAI response inputs.
3641
+ */
3642
+ export interface OpenAIResponseInputToolFunction {
3643
+ name: string;
3644
+
3645
+ parameters: { [key: string]: unknown } | null;
3646
+
3647
+ description?: string | null;
3648
+
3649
+ strict?: boolean | null;
3650
+
3651
+ type?: 'function';
3652
+ }
3653
+
3654
+ /**
3655
+ * Model Context Protocol (MCP) tool configuration for OpenAI response object.
3656
+ */
3657
+ export interface OpenAIResponseToolMcp {
3658
+ server_label: string;
3659
+
3660
+ /**
3661
+ * Filter configuration for restricting which MCP tools can be used.
3662
+ */
3663
+ allowed_tools?: Array<string> | OpenAIResponseToolMcp.AllowedToolsFilter | null;
3664
+
3665
+ type?: 'mcp';
3666
+ }
3667
+
3668
+ export namespace OpenAIResponseToolMcp {
3669
+ /**
3670
+ * Filter configuration for restricting which MCP tools can be used.
3671
+ */
3672
+ export interface AllowedToolsFilter {
3673
+ tool_names?: Array<string> | null;
3674
+ }
3675
+ }
3676
+
3677
+ /**
3678
+ * Usage information for OpenAI response.
3679
+ */
3680
+ export interface Usage {
3681
+ input_tokens: number;
3682
+
3683
+ /**
3684
+ * Token details for input tokens in OpenAI response usage.
3685
+ */
3686
+ input_tokens_details: Usage.InputTokensDetails;
3687
+
3688
+ output_tokens: number;
3689
+
3690
+ /**
3691
+ * Token details for output tokens in OpenAI response usage.
3692
+ */
3693
+ output_tokens_details: Usage.OutputTokensDetails;
3694
+
3695
+ total_tokens: number;
3696
+ }
3697
+
3698
+ export namespace Usage {
3699
+ /**
3700
+ * Token details for input tokens in OpenAI response usage.
3701
+ */
3702
+ export interface InputTokensDetails {
3703
+ cached_tokens: number;
3704
+ }
3705
+
3706
+ /**
3707
+ * Token details for output tokens in OpenAI response usage.
3708
+ */
3709
+ export interface OutputTokensDetails {
3710
+ reasoning_tokens: number;
3711
+ }
3712
+ }
3713
+ }
3714
+
3715
+ /**
3716
+ * Response object confirming deletion of an OpenAI response.
3717
+ */
3718
+ export interface ResponseDeleteResponse {
3719
+ id: string;
3720
+
3721
+ deleted?: boolean;
3722
+
3723
+ object?: 'response';
3724
+ }
3725
+
3726
+ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
3727
+
3728
+ export interface ResponseCreateParamsBase {
3729
+ /**
3730
+ * Input message(s) to create the response.
3731
+ */
3732
+ input:
3733
+ | string
3734
+ | Array<
3735
+ | ResponseCreateParams.OpenAIResponseMessageInput
3736
+ | ResponseCreateParams.OpenAIResponseOutputMessageWebSearchToolCall
3737
+ | ResponseCreateParams.OpenAIResponseOutputMessageFileSearchToolCall
3738
+ | ResponseCreateParams.OpenAIResponseOutputMessageFunctionToolCall
3739
+ | ResponseCreateParams.OpenAIResponseOutputMessageMcpCall
3740
+ | ResponseCreateParams.OpenAIResponseOutputMessageMcpListTools
3741
+ | ResponseCreateParams.OpenAIResponseMcpApprovalRequest
3742
+ | ResponseCreateParams.OpenAIResponseInputFunctionToolCallOutput
3743
+ | ResponseCreateParams.OpenAIResponseMcpApprovalResponse
3744
+ >;
3745
+
3746
+ /**
3747
+ * The underlying LLM used for completions.
3748
+ */
3749
+ model: string;
3750
+
3751
+ /**
3752
+ * Optional ID of a conversation to add the response to.
3753
+ */
3754
+ conversation?: string | null;
3755
+
3756
+ /**
3757
+ * List of guardrails to apply during response generation.
3758
+ */
3759
+ guardrails?: Array<string | ResponseCreateParams.ResponseGuardrailSpec> | null;
3760
+
3761
+ /**
3762
+ * Additional fields to include in the response.
3763
+ */
3764
+ include?: Array<
3765
+ | 'web_search_call.action.sources'
3766
+ | 'code_interpreter_call.outputs'
3767
+ | 'computer_call_output.output.image_url'
3768
+ | 'file_search_call.results'
3769
+ | 'message.input_image.image_url'
3770
+ | 'message.output_text.logprobs'
3771
+ | 'reasoning.encrypted_content'
3772
+ > | null;
3773
+
3774
+ /**
3775
+ * Instructions to guide the model's behavior.
3776
+ */
3777
+ instructions?: string | null;
3778
+
3779
+ /**
3780
+ * Maximum number of inference iterations.
3781
+ */
3782
+ max_infer_iters?: number | null;
3783
+
3784
+ /**
3785
+ * Upper bound for the number of tokens that can be generated for a response.
3786
+ */
3787
+ max_output_tokens?: number | null;
3788
+
3789
+ /**
3790
+ * Max number of total calls to built-in tools that can be processed in a response.
3791
+ */
3792
+ max_tool_calls?: number | null;
3793
+
3794
+ /**
3795
+ * Dictionary of metadata key-value pairs to attach to the response.
3796
+ */
3797
+ metadata?: { [key: string]: string } | null;
3798
+
3799
+ /**
3800
+ * Whether to enable parallel tool calls.
3801
+ */
3802
+ parallel_tool_calls?: boolean | null;
3803
+
3804
+ /**
3805
+ * Optional ID of a previous response to continue from.
3806
+ */
3807
+ previous_response_id?: string | null;
3808
+
3809
+ /**
3810
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
3811
+ */
3812
+ prompt?: ResponseCreateParams.Prompt | null;
3813
+
3814
+ /**
3815
+ * Configuration for reasoning effort in OpenAI responses.
3816
+ *
3817
+ * Controls how much reasoning the model performs before generating a response.
3818
+ */
3819
+ reasoning?: ResponseCreateParams.Reasoning | null;
3820
+
3821
+ /**
3822
+ * A stable identifier used for safety monitoring and abuse detection.
3823
+ */
3824
+ safety_identifier?: string | null;
3825
+
3826
+ /**
3827
+ * Whether to store the response in the database.
3828
+ */
3829
+ store?: boolean | null;
3830
+
3831
+ /**
3832
+ * Whether to stream the response.
3833
+ */
3834
+ stream?: boolean | null;
3835
+
3836
+ /**
3837
+ * Sampling temperature.
3838
+ */
3839
+ temperature?: number | null;
3840
+
3841
+ /**
3842
+ * Text response configuration for OpenAI responses.
3843
+ */
3844
+ text?: ResponseCreateParams.Text | null;
3845
+
3846
+ /**
3847
+ * How the model should select which tool to call (if any).
3848
+ */
3849
+ tool_choice?:
3850
+ | 'auto'
3851
+ | 'required'
3852
+ | 'none'
3853
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceAllowedTools
3854
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceFileSearch
3855
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceWebSearch
3856
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceFunctionTool
3857
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceMcpTool
3858
+ | ResponseCreateParams.OpenAIResponseInputToolChoiceCustomTool
3859
+ | null;
3860
+
3861
+ /**
3862
+ * List of tools available to the model.
3863
+ */
3864
+ tools?: Array<
3865
+ | ResponseCreateParams.OpenAIResponseInputToolWebSearch
3866
+ | ResponseCreateParams.OpenAIResponseInputToolFileSearch
3867
+ | ResponseCreateParams.OpenAIResponseInputToolFunction
3868
+ | ResponseCreateParams.OpenAIResponseInputToolMcp
3869
+ > | null;
3870
+ }
3871
+
3872
+ export namespace ResponseCreateParams {
3873
+ /**
3874
+ * Corresponds to the various Message types in the Responses API. They are all
3875
+ * under one type because the Responses API gives them all the same "type" value,
3876
+ * and there is no way to tell them apart in certain scenarios.
3877
+ */
3878
+ export interface OpenAIResponseMessageInput {
3879
+ content:
3880
+ | string
3881
+ | Array<
3882
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText
3883
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage
3884
+ | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
3885
+ >
3886
+ | Array<
3887
+ | OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
3888
+ | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
3889
+ >;
3890
+
3891
+ role: 'system' | 'developer' | 'user' | 'assistant';
3892
+
3893
+ id?: string | null;
3894
+
3895
+ status?: string | null;
3896
+
3897
+ type?: 'message';
3898
+ }
3899
+
3900
+ export namespace OpenAIResponseMessageInput {
3901
+ /**
3902
+ * Text content for input messages in OpenAI response format.
3903
+ */
3904
+ export interface OpenAIResponseInputMessageContentText {
3905
+ text: string;
3906
+
3907
+ type?: 'input_text';
3908
+ }
3909
+
3910
+ /**
3911
+ * Image content for input messages in OpenAI response format.
3912
+ */
3913
+ export interface OpenAIResponseInputMessageContentImage {
3914
+ detail?: 'low' | 'high' | 'auto';
3915
+
3916
+ file_id?: string | null;
3917
+
3918
+ image_url?: string | null;
3919
+
3920
+ type?: 'input_image';
3921
+ }
3922
+
3923
+ /**
3924
+ * File content for input messages in OpenAI response format.
3925
+ */
3926
+ export interface OpenAIResponseInputMessageContentFile {
3927
+ file_data?: string | null;
3928
+
3929
+ file_id?: string | null;
3930
+
3931
+ file_url?: string | null;
3932
+
3933
+ filename?: string | null;
3934
+
3935
+ type?: 'input_file';
3936
+ }
3937
+
3938
+ export interface OpenAIResponseOutputMessageContentOutputTextInput {
3939
+ text: string;
3940
+
3941
+ annotations?: Array<
3942
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
3943
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
3944
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
3945
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
3946
+ >;
3947
+
3948
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
3949
+
3950
+ type?: 'output_text';
3951
+ }
3952
+
3953
+ export namespace OpenAIResponseOutputMessageContentOutputTextInput {
3954
+ /**
3955
+ * File citation annotation for referencing specific files in response content.
3956
+ */
3957
+ export interface OpenAIResponseAnnotationFileCitation {
3958
+ file_id: string;
3959
+
3960
+ filename: string;
3961
+
3962
+ index: number;
3963
+
3964
+ type?: 'file_citation';
3965
+ }
3966
+
3967
+ /**
3968
+ * URL citation annotation for referencing external web resources.
3969
+ */
3970
+ export interface OpenAIResponseAnnotationCitation {
3971
+ end_index: number;
3972
+
3973
+ start_index: number;
3974
+
3975
+ title: string;
3976
+
3977
+ url: string;
3978
+
3979
+ type?: 'url_citation';
3980
+ }
3981
+
3982
+ export interface OpenAIResponseAnnotationContainerFileCitation {
3983
+ container_id: string;
3984
+
3985
+ end_index: number;
3986
+
3987
+ file_id: string;
3988
+
3989
+ filename: string;
3990
+
3991
+ start_index: number;
3992
+
3993
+ type?: 'container_file_citation';
3994
+ }
3995
+
3996
+ export interface OpenAIResponseAnnotationFilePath {
3997
+ file_id: string;
3998
+
3999
+ index: number;
4000
+
4001
+ type?: 'file_path';
4002
+ }
4003
+
4004
+ /**
4005
+ * The log probability for a token from an OpenAI-compatible chat completion
4006
+ * response.
4007
+ */
4008
+ export interface Logprob {
4009
+ /**
4010
+ * The token.
4011
+ */
4012
+ token: string;
4013
+
4014
+ /**
4015
+ * The log probability of the token.
4016
+ */
4017
+ logprob: number;
4018
+
4019
+ /**
4020
+ * The bytes for the token.
4021
+ */
4022
+ bytes?: Array<number> | null;
4023
+
4024
+ /**
4025
+ * The top log probabilities for the token.
4026
+ */
4027
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
4028
+ }
4029
+
4030
+ export namespace Logprob {
4031
+ /**
4032
+ * The top log probability for a token from an OpenAI-compatible chat completion
4033
+ * response.
4034
+ */
4035
+ export interface TopLogprob {
4036
+ /**
4037
+ * The token.
4038
+ */
4039
+ token: string;
4040
+
4041
+ /**
4042
+ * The log probability of the token.
4043
+ */
4044
+ logprob: number;
4045
+
4046
+ /**
4047
+ * The bytes for the token.
4048
+ */
4049
+ bytes?: Array<number> | null;
4050
+ }
4051
+ }
4052
+ }
4053
+
4054
+ /**
4055
+ * Refusal content within a streamed response part.
4056
+ */
4057
+ export interface OpenAIResponseContentPartRefusal {
4058
+ refusal: string;
4059
+
4060
+ type?: 'refusal';
4061
+ }
4062
+ }
4063
+
4064
+ /**
4065
+ * Web search tool call output message for OpenAI responses.
4066
+ */
4067
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
4068
+ id: string;
4069
+
4070
+ status: string;
4071
+
4072
+ type?: 'web_search_call';
4073
+ }
4074
+
4075
+ /**
4076
+ * File search tool call output message for OpenAI responses.
4077
+ */
4078
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
4079
+ id: string;
4080
+
4081
+ queries: Array<string>;
4082
+
4083
+ status: string;
4084
+
4085
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
4086
+
4087
+ type?: 'file_search_call';
4088
+ }
4089
+
4090
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
4091
+ /**
4092
+ * Search results returned by the file search operation.
4093
+ */
4094
+ export interface Result {
4095
+ attributes: { [key: string]: unknown };
4096
+
4097
+ file_id: string;
4098
+
4099
+ filename: string;
4100
+
4101
+ score: number;
4102
+
4103
+ text: string;
4104
+ }
4105
+ }
4106
+
4107
+ /**
4108
+ * Function tool call output message for OpenAI responses.
4109
+ */
4110
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
4111
+ arguments: string;
4112
+
4113
+ call_id: string;
4114
+
4115
+ name: string;
4116
+
4117
+ id?: string | null;
4118
+
4119
+ status?: string | null;
4120
+
4121
+ type?: 'function_call';
4122
+ }
4123
+
4124
+ /**
4125
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
4126
+ */
4127
+ export interface OpenAIResponseOutputMessageMcpCall {
4128
+ id: string;
4129
+
4130
+ arguments: string;
4131
+
4132
+ name: string;
4133
+
4134
+ server_label: string;
4135
+
4136
+ error?: string | null;
4137
+
4138
+ output?: string | null;
4139
+
4140
+ type?: 'mcp_call';
4141
+ }
4142
+
4143
+ /**
4144
+ * MCP list tools output message containing available tools from an MCP server.
4145
+ */
4146
+ export interface OpenAIResponseOutputMessageMcpListTools {
4147
+ id: string;
4148
+
4149
+ server_label: string;
4150
+
4151
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
4152
+
4153
+ type?: 'mcp_list_tools';
4154
+ }
4155
+
4156
+ export namespace OpenAIResponseOutputMessageMcpListTools {
4157
+ /**
4158
+ * Tool definition returned by MCP list tools operation.
4159
+ */
4160
+ export interface Tool {
4161
+ input_schema: { [key: string]: unknown };
4162
+
4163
+ name: string;
4164
+
4165
+ description?: string | null;
4166
+ }
4167
+ }
4168
+
4169
+ /**
4170
+ * A request for human approval of a tool invocation.
4171
+ */
4172
+ export interface OpenAIResponseMcpApprovalRequest {
4173
+ id: string;
4174
+
4175
+ arguments: string;
4176
+
4177
+ name: string;
4178
+
4179
+ server_label: string;
4180
+
4181
+ type?: 'mcp_approval_request';
4182
+ }
4183
+
4184
+ /**
4185
+ * This represents the output of a function call that gets passed back to the
4186
+ * model.
4187
+ */
4188
+ export interface OpenAIResponseInputFunctionToolCallOutput {
4189
+ call_id: string;
4190
+
4191
+ output: string;
4192
+
4193
+ id?: string | null;
4194
+
4195
+ status?: string | null;
4196
+
4197
+ type?: 'function_call_output';
4198
+ }
4199
+
4200
+ /**
4201
+ * A response to an MCP approval request.
4202
+ */
4203
+ export interface OpenAIResponseMcpApprovalResponse {
4204
+ approval_request_id: string;
4205
+
4206
+ approve: boolean;
4207
+
4208
+ id?: string | null;
4209
+
4210
+ reason?: string | null;
4211
+
4212
+ type?: 'mcp_approval_response';
4213
+ }
4214
+
4215
+ /**
4216
+ * Specification for a guardrail to apply during response generation.
4217
+ */
4218
+ export interface ResponseGuardrailSpec {
4219
+ type: string;
4220
+ }
4221
+
4222
+ /**
4223
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
4224
+ */
4225
+ export interface Prompt {
4226
+ id: string;
4227
+
4228
+ variables?: {
4229
+ [key: string]:
4230
+ | Prompt.OpenAIResponseInputMessageContentText
4231
+ | Prompt.OpenAIResponseInputMessageContentImage
4232
+ | Prompt.OpenAIResponseInputMessageContentFile;
4233
+ } | null;
4234
+
4235
+ version?: string | null;
4236
+ }
4237
+
4238
+ export namespace Prompt {
4239
+ /**
4240
+ * Text content for input messages in OpenAI response format.
4241
+ */
4242
+ export interface OpenAIResponseInputMessageContentText {
4243
+ text: string;
4244
+
4245
+ type?: 'input_text';
4246
+ }
4247
+
4248
+ /**
4249
+ * Image content for input messages in OpenAI response format.
4250
+ */
4251
+ export interface OpenAIResponseInputMessageContentImage {
4252
+ detail?: 'low' | 'high' | 'auto';
4253
+
4254
+ file_id?: string | null;
4255
+
4256
+ image_url?: string | null;
4257
+
4258
+ type?: 'input_image';
4259
+ }
4260
+
4261
+ /**
4262
+ * File content for input messages in OpenAI response format.
4263
+ */
4264
+ export interface OpenAIResponseInputMessageContentFile {
4265
+ file_data?: string | null;
4266
+
4267
+ file_id?: string | null;
4268
+
4269
+ file_url?: string | null;
4270
+
4271
+ filename?: string | null;
4272
+
4273
+ type?: 'input_file';
4274
+ }
4275
+ }
4276
+
4277
+ /**
4278
+ * Configuration for reasoning effort in OpenAI responses.
4279
+ *
4280
+ * Controls how much reasoning the model performs before generating a response.
4281
+ */
4282
+ export interface Reasoning {
4283
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
4284
+ }
4285
+
4286
+ /**
4287
+ * Text response configuration for OpenAI responses.
4288
+ */
4289
+ export interface Text {
4290
+ /**
4291
+ * Configuration for Responses API text format.
4292
+ */
4293
+ format?: Text.Format | null;
4294
+ }
4295
+
4296
+ export namespace Text {
4297
+ /**
4298
+ * Configuration for Responses API text format.
4299
+ */
4300
+ export interface Format {
4301
+ description?: string | null;
4302
+
4303
+ name?: string | null;
4304
+
4305
+ schema?: { [key: string]: unknown } | null;
4306
+
4307
+ strict?: boolean | null;
4308
+
4309
+ type?: 'text' | 'json_schema' | 'json_object';
4310
+ }
4311
+ }
4312
+
4313
+ /**
4314
+ * Constrains the tools available to the model to a pre-defined set.
4315
+ */
4316
+ export interface OpenAIResponseInputToolChoiceAllowedTools {
4317
+ tools: Array<{ [key: string]: string }>;
4318
+
4319
+ mode?: 'auto' | 'required';
4320
+
4321
+ type?: 'allowed_tools';
4322
+ }
4323
+
4324
+ /**
4325
+ * Indicates that the model should use file search to generate a response.
4326
+ */
4327
+ export interface OpenAIResponseInputToolChoiceFileSearch {
4328
+ type?: 'file_search';
4329
+ }
4330
+
4331
+ /**
4332
+ * Indicates that the model should use web search to generate a response
4333
+ */
4334
+ export interface OpenAIResponseInputToolChoiceWebSearch {
4335
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
4336
+ }
4337
+
4338
+ /**
4339
+ * Forces the model to call a specific function.
4340
+ */
4341
+ export interface OpenAIResponseInputToolChoiceFunctionTool {
4342
+ name: string;
4343
+
4344
+ type?: 'function';
4345
+ }
4346
+
4347
+ /**
4348
+ * Forces the model to call a specific tool on a remote MCP server
4349
+ */
4350
+ export interface OpenAIResponseInputToolChoiceMcpTool {
4351
+ server_label: string;
4352
+
4353
+ name?: string | null;
4354
+
4355
+ type?: 'mcp';
4356
+ }
4357
+
4358
+ /**
4359
+ * Forces the model to call a custom tool.
4360
+ */
4361
+ export interface OpenAIResponseInputToolChoiceCustomTool {
4362
+ name: string;
4363
+
4364
+ type?: 'custom';
4365
+ }
4366
+
4367
+ /**
4368
+ * Web search tool configuration for OpenAI response inputs.
4369
+ */
4370
+ export interface OpenAIResponseInputToolWebSearch {
4371
+ search_context_size?: string | null;
4372
+
4373
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
4374
+ }
4375
+
4376
+ /**
4377
+ * File search tool configuration for OpenAI response inputs.
4378
+ */
4379
+ export interface OpenAIResponseInputToolFileSearch {
4380
+ vector_store_ids: Array<string>;
4381
+
4382
+ filters?: { [key: string]: unknown } | null;
4383
+
4384
+ max_num_results?: number | null;
4385
+
4386
+ /**
4387
+ * Options for ranking and filtering search results.
4388
+ *
4389
+ * This class configures how search results are ranked and filtered. You can use
4390
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
4391
+ * VectorStoresConfig are used when parameters are not provided.
4392
+ *
4393
+ * Examples: # Weighted ranker with custom alpha
4394
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
4395
+ *
4396
+ * # RRF ranker with custom impact factor
4397
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
4398
+ *
4399
+ * # Use config defaults (just specify ranker type)
4400
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
4401
+ *
4402
+ * # Score threshold filtering
4403
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
4404
+ */
4405
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
4406
+
4407
+ type?: 'file_search';
4408
+ }
4409
+
4410
+ export namespace OpenAIResponseInputToolFileSearch {
4411
+ /**
4412
+ * Options for ranking and filtering search results.
4413
+ *
4414
+ * This class configures how search results are ranked and filtered. You can use
4415
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
4416
+ * VectorStoresConfig are used when parameters are not provided.
4417
+ *
4418
+ * Examples: # Weighted ranker with custom alpha
4419
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
4420
+ *
4421
+ * # RRF ranker with custom impact factor
4422
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
4423
+ *
4424
+ * # Use config defaults (just specify ranker type)
4425
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
4426
+ *
4427
+ * # Score threshold filtering
4428
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
4429
+ */
4430
+ export interface RankingOptions {
4431
+ /**
4432
+ * Weight factor for weighted ranker
4433
+ */
4434
+ alpha?: number | null;
4435
+
4436
+ /**
4437
+ * Impact factor for RRF algorithm
4438
+ */
4439
+ impact_factor?: number | null;
4440
+
4441
+ /**
4442
+ * Model identifier for neural reranker
4443
+ */
4444
+ model?: string | null;
4445
+
4446
+ ranker?: string | null;
4447
+
4448
+ score_threshold?: number | null;
4449
+
4450
+ /**
4451
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
4452
+ * 'keyword', 'neural'
4453
+ */
4454
+ weights?: { [key: string]: number } | null;
4455
+ }
4456
+ }
4457
+
4458
+ /**
4459
+ * Function tool configuration for OpenAI response inputs.
4460
+ */
4461
+ export interface OpenAIResponseInputToolFunction {
4462
+ name: string;
4463
+
4464
+ parameters: { [key: string]: unknown } | null;
4465
+
4466
+ description?: string | null;
4467
+
4468
+ strict?: boolean | null;
4469
+
4470
+ type?: 'function';
4471
+ }
4472
+
4473
+ /**
4474
+ * Model Context Protocol (MCP) tool configuration for OpenAI response inputs.
4475
+ */
4476
+ export interface OpenAIResponseInputToolMcp {
4477
+ server_label: string;
4478
+
4479
+ /**
4480
+ * Filter configuration for restricting which MCP tools can be used.
4481
+ */
4482
+ allowed_tools?: Array<string> | OpenAIResponseInputToolMcp.AllowedToolsFilter | null;
4483
+
4484
+ authorization?: string | null;
4485
+
4486
+ connector_id?: string | null;
4487
+
4488
+ headers?: { [key: string]: unknown } | null;
4489
+
4490
+ /**
4491
+ * Filter configuration for MCP tool approval requirements.
4492
+ */
4493
+ require_approval?: 'always' | 'never' | OpenAIResponseInputToolMcp.ApprovalFilter;
4494
+
4495
+ server_url?: string | null;
4496
+
4497
+ type?: 'mcp';
4498
+ }
4499
+
4500
+ export namespace OpenAIResponseInputToolMcp {
4501
+ /**
4502
+ * Filter configuration for restricting which MCP tools can be used.
4503
+ */
4504
+ export interface AllowedToolsFilter {
4505
+ tool_names?: Array<string> | null;
4506
+ }
4507
+
4508
+ /**
4509
+ * Filter configuration for MCP tool approval requirements.
4510
+ */
4511
+ export interface ApprovalFilter {
4512
+ always?: Array<string> | null;
4513
+
4514
+ never?: Array<string> | null;
4515
+ }
4516
+ }
4517
+
4518
+ export type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
4519
+ export type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
4520
+ }
4521
+
4522
+ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBase {
4523
+ /**
4524
+ * Whether to stream the response.
4525
+ */
4526
+ stream?: false | null;
4527
+ }
4528
+
4529
+ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase {
4530
+ /**
4531
+ * Whether to stream the response.
4532
+ */
4533
+ stream: true;
4534
+ }
4535
+
4536
+ export interface ResponseListParams extends OpenAICursorPageParams {
4537
+ /**
4538
+ * The model to filter responses by.
4539
+ */
4540
+ model?: string | null;
4541
+
4542
+ /**
4543
+ * Sort order for paginated responses.
4544
+ */
4545
+ order?: 'asc' | 'desc' | null;
4546
+ }
4547
+
4548
+ Responses.ResponseListResponsesOpenAICursorPage = ResponseListResponsesOpenAICursorPage;
4549
+ Responses.InputItems = InputItems;
4550
+
4551
+ export declare namespace Responses {
4552
+ export {
4553
+ type ResponseObject as ResponseObject,
4554
+ type ResponseObjectStream as ResponseObjectStream,
4555
+ type ResponseListResponse as ResponseListResponse,
4556
+ type ResponseDeleteResponse as ResponseDeleteResponse,
4557
+ ResponseListResponsesOpenAICursorPage as ResponseListResponsesOpenAICursorPage,
4558
+ type ResponseCreateParams as ResponseCreateParams,
4559
+ type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming,
4560
+ type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming,
4561
+ type ResponseListParams as ResponseListParams,
4562
+ };
4563
+
4564
+ export {
4565
+ InputItems as InputItems,
4566
+ type InputItemListResponse as InputItemListResponse,
4567
+ type InputItemListParams as InputItemListParams,
4568
+ };
4569
+ }