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,3180 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import { APIPromise } from "../../core.js";
3
+ import * as Core from "../../core.js";
4
+ import * as ResponsesAPI from "./responses.js";
5
+ import * as InputItemsAPI from "./input-items.js";
6
+ import { InputItemListParams, InputItemListResponse, InputItems } from "./input-items.js";
7
+ import { OpenAICursorPage, type OpenAICursorPageParams } from "../../pagination.js";
8
+ import { Stream } from "../../streaming.js";
9
+ export declare class Responses extends APIResource {
10
+ inputItems: InputItemsAPI.InputItems;
11
+ /**
12
+ * Create a model response.
13
+ */
14
+ create(body: ResponseCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<ResponseObject>;
15
+ create(body: ResponseCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<ResponseObjectStream>>;
16
+ create(body: ResponseCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<ResponseObjectStream> | ResponseObject>;
17
+ /**
18
+ * Get a model response.
19
+ */
20
+ retrieve(responseId: string, options?: Core.RequestOptions): Core.APIPromise<ResponseObject>;
21
+ /**
22
+ * List all responses.
23
+ */
24
+ list(query?: ResponseListParams, options?: Core.RequestOptions): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
25
+ list(options?: Core.RequestOptions): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
26
+ /**
27
+ * Delete a response.
28
+ */
29
+ delete(responseId: string, options?: Core.RequestOptions): Core.APIPromise<ResponseDeleteResponse>;
30
+ }
31
+ export declare class ResponseListResponsesOpenAICursorPage extends OpenAICursorPage<ResponseListResponse> {
32
+ }
33
+ /**
34
+ * Complete OpenAI response object containing generation results and metadata.
35
+ */
36
+ export interface ResponseObject {
37
+ id: string;
38
+ created_at: number;
39
+ model: string;
40
+ output: Array<ResponseObject.OpenAIResponseMessageOutput | ResponseObject.OpenAIResponseOutputMessageWebSearchToolCall | ResponseObject.OpenAIResponseOutputMessageFileSearchToolCall | ResponseObject.OpenAIResponseOutputMessageFunctionToolCall | ResponseObject.OpenAIResponseOutputMessageMcpCall | ResponseObject.OpenAIResponseOutputMessageMcpListTools | ResponseObject.OpenAIResponseMcpApprovalRequest>;
41
+ status: string;
42
+ store: boolean;
43
+ completed_at?: number | null;
44
+ /**
45
+ * Error details for failed OpenAI response requests.
46
+ */
47
+ error?: ResponseObject.Error | null;
48
+ instructions?: string | null;
49
+ max_output_tokens?: number | null;
50
+ max_tool_calls?: number | null;
51
+ metadata?: {
52
+ [key: string]: string;
53
+ } | null;
54
+ object?: 'response';
55
+ parallel_tool_calls?: boolean | null;
56
+ previous_response_id?: string | null;
57
+ /**
58
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
59
+ */
60
+ prompt?: ResponseObject.Prompt | null;
61
+ /**
62
+ * Configuration for reasoning effort in OpenAI responses.
63
+ *
64
+ * Controls how much reasoning the model performs before generating a response.
65
+ */
66
+ reasoning?: ResponseObject.Reasoning | null;
67
+ safety_identifier?: string | null;
68
+ temperature?: number | null;
69
+ /**
70
+ * Text response configuration for OpenAI responses.
71
+ */
72
+ text?: ResponseObject.Text;
73
+ /**
74
+ * Constrains the tools available to the model to a pre-defined set.
75
+ */
76
+ tool_choice?: 'auto' | 'required' | 'none' | ResponseObject.OpenAIResponseInputToolChoiceAllowedTools | ResponseObject.OpenAIResponseInputToolChoiceFileSearch | ResponseObject.OpenAIResponseInputToolChoiceWebSearch | ResponseObject.OpenAIResponseInputToolChoiceFunctionTool | ResponseObject.OpenAIResponseInputToolChoiceMcpTool | ResponseObject.OpenAIResponseInputToolChoiceCustomTool | null;
77
+ tools?: Array<ResponseObject.OpenAIResponseInputToolWebSearch | ResponseObject.OpenAIResponseInputToolFileSearch | ResponseObject.OpenAIResponseInputToolFunction | ResponseObject.OpenAIResponseToolMcp> | null;
78
+ top_p?: number | null;
79
+ truncation?: string | null;
80
+ /**
81
+ * Usage information for OpenAI response.
82
+ */
83
+ usage?: ResponseObject.Usage | null;
84
+ }
85
+ export declare namespace ResponseObject {
86
+ /**
87
+ * Corresponds to the various Message types in the Responses API. They are all
88
+ * under one type because the Responses API gives them all the same "type" value,
89
+ * and there is no way to tell them apart in certain scenarios.
90
+ */
91
+ interface OpenAIResponseMessageOutput {
92
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
93
+ role: 'system' | 'developer' | 'user' | 'assistant';
94
+ id?: string | null;
95
+ status?: string | null;
96
+ type?: 'message';
97
+ }
98
+ namespace OpenAIResponseMessageOutput {
99
+ /**
100
+ * Text content for input messages in OpenAI response format.
101
+ */
102
+ interface OpenAIResponseInputMessageContentText {
103
+ text: string;
104
+ type?: 'input_text';
105
+ }
106
+ /**
107
+ * Image content for input messages in OpenAI response format.
108
+ */
109
+ interface OpenAIResponseInputMessageContentImage {
110
+ detail?: 'low' | 'high' | 'auto';
111
+ file_id?: string | null;
112
+ image_url?: string | null;
113
+ type?: 'input_image';
114
+ }
115
+ /**
116
+ * File content for input messages in OpenAI response format.
117
+ */
118
+ interface OpenAIResponseInputMessageContentFile {
119
+ file_data?: string | null;
120
+ file_id?: string | null;
121
+ file_url?: string | null;
122
+ filename?: string | null;
123
+ type?: 'input_file';
124
+ }
125
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
126
+ text: string;
127
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
128
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
129
+ type?: 'output_text';
130
+ }
131
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
132
+ /**
133
+ * File citation annotation for referencing specific files in response content.
134
+ */
135
+ interface OpenAIResponseAnnotationFileCitation {
136
+ file_id: string;
137
+ filename: string;
138
+ index: number;
139
+ type?: 'file_citation';
140
+ }
141
+ /**
142
+ * URL citation annotation for referencing external web resources.
143
+ */
144
+ interface OpenAIResponseAnnotationCitation {
145
+ end_index: number;
146
+ start_index: number;
147
+ title: string;
148
+ url: string;
149
+ type?: 'url_citation';
150
+ }
151
+ interface OpenAIResponseAnnotationContainerFileCitation {
152
+ container_id: string;
153
+ end_index: number;
154
+ file_id: string;
155
+ filename: string;
156
+ start_index: number;
157
+ type?: 'container_file_citation';
158
+ }
159
+ interface OpenAIResponseAnnotationFilePath {
160
+ file_id: string;
161
+ index: number;
162
+ type?: 'file_path';
163
+ }
164
+ /**
165
+ * The log probability for a token from an OpenAI-compatible chat completion
166
+ * response.
167
+ */
168
+ interface Logprob {
169
+ /**
170
+ * The token.
171
+ */
172
+ token: string;
173
+ /**
174
+ * The log probability of the token.
175
+ */
176
+ logprob: number;
177
+ /**
178
+ * The bytes for the token.
179
+ */
180
+ bytes?: Array<number> | null;
181
+ /**
182
+ * The top log probabilities for the token.
183
+ */
184
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
185
+ }
186
+ namespace Logprob {
187
+ /**
188
+ * The top log probability for a token from an OpenAI-compatible chat completion
189
+ * response.
190
+ */
191
+ interface TopLogprob {
192
+ /**
193
+ * The token.
194
+ */
195
+ token: string;
196
+ /**
197
+ * The log probability of the token.
198
+ */
199
+ logprob: number;
200
+ /**
201
+ * The bytes for the token.
202
+ */
203
+ bytes?: Array<number> | null;
204
+ }
205
+ }
206
+ }
207
+ /**
208
+ * Refusal content within a streamed response part.
209
+ */
210
+ interface OpenAIResponseContentPartRefusal {
211
+ refusal: string;
212
+ type?: 'refusal';
213
+ }
214
+ }
215
+ /**
216
+ * Web search tool call output message for OpenAI responses.
217
+ */
218
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
219
+ id: string;
220
+ status: string;
221
+ type?: 'web_search_call';
222
+ }
223
+ /**
224
+ * File search tool call output message for OpenAI responses.
225
+ */
226
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
227
+ id: string;
228
+ queries: Array<string>;
229
+ status: string;
230
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
231
+ type?: 'file_search_call';
232
+ }
233
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
234
+ /**
235
+ * Search results returned by the file search operation.
236
+ */
237
+ interface Result {
238
+ attributes: {
239
+ [key: string]: unknown;
240
+ };
241
+ file_id: string;
242
+ filename: string;
243
+ score: number;
244
+ text: string;
245
+ }
246
+ }
247
+ /**
248
+ * Function tool call output message for OpenAI responses.
249
+ */
250
+ interface OpenAIResponseOutputMessageFunctionToolCall {
251
+ arguments: string;
252
+ call_id: string;
253
+ name: string;
254
+ id?: string | null;
255
+ status?: string | null;
256
+ type?: 'function_call';
257
+ }
258
+ /**
259
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
260
+ */
261
+ interface OpenAIResponseOutputMessageMcpCall {
262
+ id: string;
263
+ arguments: string;
264
+ name: string;
265
+ server_label: string;
266
+ error?: string | null;
267
+ output?: string | null;
268
+ type?: 'mcp_call';
269
+ }
270
+ /**
271
+ * MCP list tools output message containing available tools from an MCP server.
272
+ */
273
+ interface OpenAIResponseOutputMessageMcpListTools {
274
+ id: string;
275
+ server_label: string;
276
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
277
+ type?: 'mcp_list_tools';
278
+ }
279
+ namespace OpenAIResponseOutputMessageMcpListTools {
280
+ /**
281
+ * Tool definition returned by MCP list tools operation.
282
+ */
283
+ interface Tool {
284
+ input_schema: {
285
+ [key: string]: unknown;
286
+ };
287
+ name: string;
288
+ description?: string | null;
289
+ }
290
+ }
291
+ /**
292
+ * A request for human approval of a tool invocation.
293
+ */
294
+ interface OpenAIResponseMcpApprovalRequest {
295
+ id: string;
296
+ arguments: string;
297
+ name: string;
298
+ server_label: string;
299
+ type?: 'mcp_approval_request';
300
+ }
301
+ /**
302
+ * Error details for failed OpenAI response requests.
303
+ */
304
+ interface Error {
305
+ code: string;
306
+ message: string;
307
+ }
308
+ /**
309
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
310
+ */
311
+ interface Prompt {
312
+ id: string;
313
+ variables?: {
314
+ [key: string]: Prompt.OpenAIResponseInputMessageContentText | Prompt.OpenAIResponseInputMessageContentImage | Prompt.OpenAIResponseInputMessageContentFile;
315
+ } | null;
316
+ version?: string | null;
317
+ }
318
+ namespace Prompt {
319
+ /**
320
+ * Text content for input messages in OpenAI response format.
321
+ */
322
+ interface OpenAIResponseInputMessageContentText {
323
+ text: string;
324
+ type?: 'input_text';
325
+ }
326
+ /**
327
+ * Image content for input messages in OpenAI response format.
328
+ */
329
+ interface OpenAIResponseInputMessageContentImage {
330
+ detail?: 'low' | 'high' | 'auto';
331
+ file_id?: string | null;
332
+ image_url?: string | null;
333
+ type?: 'input_image';
334
+ }
335
+ /**
336
+ * File content for input messages in OpenAI response format.
337
+ */
338
+ interface OpenAIResponseInputMessageContentFile {
339
+ file_data?: string | null;
340
+ file_id?: string | null;
341
+ file_url?: string | null;
342
+ filename?: string | null;
343
+ type?: 'input_file';
344
+ }
345
+ }
346
+ /**
347
+ * Configuration for reasoning effort in OpenAI responses.
348
+ *
349
+ * Controls how much reasoning the model performs before generating a response.
350
+ */
351
+ interface Reasoning {
352
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
353
+ }
354
+ /**
355
+ * Text response configuration for OpenAI responses.
356
+ */
357
+ interface Text {
358
+ /**
359
+ * Configuration for Responses API text format.
360
+ */
361
+ format?: Text.Format | null;
362
+ }
363
+ namespace Text {
364
+ /**
365
+ * Configuration for Responses API text format.
366
+ */
367
+ interface Format {
368
+ description?: string | null;
369
+ name?: string | null;
370
+ schema?: {
371
+ [key: string]: unknown;
372
+ } | null;
373
+ strict?: boolean | null;
374
+ type?: 'text' | 'json_schema' | 'json_object';
375
+ }
376
+ }
377
+ /**
378
+ * Constrains the tools available to the model to a pre-defined set.
379
+ */
380
+ interface OpenAIResponseInputToolChoiceAllowedTools {
381
+ tools: Array<{
382
+ [key: string]: string;
383
+ }>;
384
+ mode?: 'auto' | 'required';
385
+ type?: 'allowed_tools';
386
+ }
387
+ /**
388
+ * Indicates that the model should use file search to generate a response.
389
+ */
390
+ interface OpenAIResponseInputToolChoiceFileSearch {
391
+ type?: 'file_search';
392
+ }
393
+ /**
394
+ * Indicates that the model should use web search to generate a response
395
+ */
396
+ interface OpenAIResponseInputToolChoiceWebSearch {
397
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
398
+ }
399
+ /**
400
+ * Forces the model to call a specific function.
401
+ */
402
+ interface OpenAIResponseInputToolChoiceFunctionTool {
403
+ name: string;
404
+ type?: 'function';
405
+ }
406
+ /**
407
+ * Forces the model to call a specific tool on a remote MCP server
408
+ */
409
+ interface OpenAIResponseInputToolChoiceMcpTool {
410
+ server_label: string;
411
+ name?: string | null;
412
+ type?: 'mcp';
413
+ }
414
+ /**
415
+ * Forces the model to call a custom tool.
416
+ */
417
+ interface OpenAIResponseInputToolChoiceCustomTool {
418
+ name: string;
419
+ type?: 'custom';
420
+ }
421
+ /**
422
+ * Web search tool configuration for OpenAI response inputs.
423
+ */
424
+ interface OpenAIResponseInputToolWebSearch {
425
+ search_context_size?: string | null;
426
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
427
+ }
428
+ /**
429
+ * File search tool configuration for OpenAI response inputs.
430
+ */
431
+ interface OpenAIResponseInputToolFileSearch {
432
+ vector_store_ids: Array<string>;
433
+ filters?: {
434
+ [key: string]: unknown;
435
+ } | null;
436
+ max_num_results?: number | null;
437
+ /**
438
+ * Options for ranking and filtering search results.
439
+ *
440
+ * This class configures how search results are ranked and filtered. You can use
441
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
442
+ * VectorStoresConfig are used when parameters are not provided.
443
+ *
444
+ * Examples: # Weighted ranker with custom alpha
445
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
446
+ *
447
+ * # RRF ranker with custom impact factor
448
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
449
+ *
450
+ * # Use config defaults (just specify ranker type)
451
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
452
+ *
453
+ * # Score threshold filtering
454
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
455
+ */
456
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
457
+ type?: 'file_search';
458
+ }
459
+ namespace OpenAIResponseInputToolFileSearch {
460
+ /**
461
+ * Options for ranking and filtering search results.
462
+ *
463
+ * This class configures how search results are ranked and filtered. You can use
464
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
465
+ * VectorStoresConfig are used when parameters are not provided.
466
+ *
467
+ * Examples: # Weighted ranker with custom alpha
468
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
469
+ *
470
+ * # RRF ranker with custom impact factor
471
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
472
+ *
473
+ * # Use config defaults (just specify ranker type)
474
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
475
+ *
476
+ * # Score threshold filtering
477
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
478
+ */
479
+ interface RankingOptions {
480
+ /**
481
+ * Weight factor for weighted ranker
482
+ */
483
+ alpha?: number | null;
484
+ /**
485
+ * Impact factor for RRF algorithm
486
+ */
487
+ impact_factor?: number | null;
488
+ /**
489
+ * Model identifier for neural reranker
490
+ */
491
+ model?: string | null;
492
+ ranker?: string | null;
493
+ score_threshold?: number | null;
494
+ /**
495
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
496
+ * 'keyword', 'neural'
497
+ */
498
+ weights?: {
499
+ [key: string]: number;
500
+ } | null;
501
+ }
502
+ }
503
+ /**
504
+ * Function tool configuration for OpenAI response inputs.
505
+ */
506
+ interface OpenAIResponseInputToolFunction {
507
+ name: string;
508
+ parameters: {
509
+ [key: string]: unknown;
510
+ } | null;
511
+ description?: string | null;
512
+ strict?: boolean | null;
513
+ type?: 'function';
514
+ }
515
+ /**
516
+ * Model Context Protocol (MCP) tool configuration for OpenAI response object.
517
+ */
518
+ interface OpenAIResponseToolMcp {
519
+ server_label: string;
520
+ /**
521
+ * Filter configuration for restricting which MCP tools can be used.
522
+ */
523
+ allowed_tools?: Array<string> | OpenAIResponseToolMcp.AllowedToolsFilter | null;
524
+ type?: 'mcp';
525
+ }
526
+ namespace OpenAIResponseToolMcp {
527
+ /**
528
+ * Filter configuration for restricting which MCP tools can be used.
529
+ */
530
+ interface AllowedToolsFilter {
531
+ tool_names?: Array<string> | null;
532
+ }
533
+ }
534
+ /**
535
+ * Usage information for OpenAI response.
536
+ */
537
+ interface Usage {
538
+ input_tokens: number;
539
+ /**
540
+ * Token details for input tokens in OpenAI response usage.
541
+ */
542
+ input_tokens_details: Usage.InputTokensDetails;
543
+ output_tokens: number;
544
+ /**
545
+ * Token details for output tokens in OpenAI response usage.
546
+ */
547
+ output_tokens_details: Usage.OutputTokensDetails;
548
+ total_tokens: number;
549
+ }
550
+ namespace Usage {
551
+ /**
552
+ * Token details for input tokens in OpenAI response usage.
553
+ */
554
+ interface InputTokensDetails {
555
+ cached_tokens: number;
556
+ }
557
+ /**
558
+ * Token details for output tokens in OpenAI response usage.
559
+ */
560
+ interface OutputTokensDetails {
561
+ reasoning_tokens: number;
562
+ }
563
+ }
564
+ }
565
+ /**
566
+ * Streaming event indicating a new response has been created.
567
+ */
568
+ export type ResponseObjectStream = ResponseObjectStream.OpenAIResponseObjectStreamResponseCreated | ResponseObjectStream.OpenAIResponseObjectStreamResponseInProgress | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputItemAdded | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputItemDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallInProgress | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallSearching | ResponseObjectStream.OpenAIResponseObjectStreamResponseWebSearchCallCompleted | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsInProgress | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsFailed | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpListToolsCompleted | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallArgumentsDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallInProgress | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallFailed | ResponseObjectStream.OpenAIResponseObjectStreamResponseMcpCallCompleted | ResponseObjectStream.OpenAIResponseObjectStreamResponseContentPartAdded | ResponseObjectStream.OpenAIResponseObjectStreamResponseContentPartDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningTextDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningTextDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryPartDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseReasoningSummaryTextDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseRefusalDelta | ResponseObjectStream.OpenAIResponseObjectStreamResponseRefusalDone | ResponseObjectStream.OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallInProgress | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallSearching | ResponseObjectStream.OpenAIResponseObjectStreamResponseFileSearchCallCompleted | ResponseObjectStream.OpenAIResponseObjectStreamResponseIncomplete | ResponseObjectStream.OpenAIResponseObjectStreamResponseFailed | ResponseObjectStream.OpenAIResponseObjectStreamResponseCompleted;
569
+ export declare namespace ResponseObjectStream {
570
+ /**
571
+ * Streaming event indicating a new response has been created.
572
+ */
573
+ interface OpenAIResponseObjectStreamResponseCreated {
574
+ /**
575
+ * Complete OpenAI response object containing generation results and metadata.
576
+ */
577
+ response: ResponsesAPI.ResponseObject;
578
+ type?: 'response.created';
579
+ }
580
+ /**
581
+ * Streaming event indicating the response remains in progress.
582
+ */
583
+ interface OpenAIResponseObjectStreamResponseInProgress {
584
+ /**
585
+ * Complete OpenAI response object containing generation results and metadata.
586
+ */
587
+ response: ResponsesAPI.ResponseObject;
588
+ sequence_number: number;
589
+ type?: 'response.in_progress';
590
+ }
591
+ /**
592
+ * Streaming event for when a new output item is added to the response.
593
+ */
594
+ interface OpenAIResponseObjectStreamResponseOutputItemAdded {
595
+ /**
596
+ * Corresponds to the various Message types in the Responses API. They are all
597
+ * under one type because the Responses API gives them all the same "type" value,
598
+ * and there is no way to tell them apart in certain scenarios.
599
+ */
600
+ item: OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseMessage | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageWebSearchToolCall | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageFileSearchToolCall | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageFunctionToolCall | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageMcpCall | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseOutputMessageMcpListTools | OpenAIResponseObjectStreamResponseOutputItemAdded.OpenAIResponseMcpApprovalRequest;
601
+ output_index: number;
602
+ response_id: string;
603
+ sequence_number: number;
604
+ type?: 'response.output_item.added';
605
+ }
606
+ namespace OpenAIResponseObjectStreamResponseOutputItemAdded {
607
+ /**
608
+ * Corresponds to the various Message types in the Responses API. They are all
609
+ * under one type because the Responses API gives them all the same "type" value,
610
+ * and there is no way to tell them apart in certain scenarios.
611
+ */
612
+ interface OpenAIResponseMessage {
613
+ content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage | OpenAIResponseMessage.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessage.OpenAIResponseOutputMessageContentOutputText | OpenAIResponseMessage.OpenAIResponseContentPartRefusal>;
614
+ role: 'system' | 'developer' | 'user' | 'assistant';
615
+ id?: string | null;
616
+ status?: string | null;
617
+ type?: 'message';
618
+ }
619
+ namespace OpenAIResponseMessage {
620
+ /**
621
+ * Text content for input messages in OpenAI response format.
622
+ */
623
+ interface OpenAIResponseInputMessageContentText {
624
+ text: string;
625
+ type?: 'input_text';
626
+ }
627
+ /**
628
+ * Image content for input messages in OpenAI response format.
629
+ */
630
+ interface OpenAIResponseInputMessageContentImage {
631
+ detail?: 'low' | 'high' | 'auto';
632
+ file_id?: string | null;
633
+ image_url?: string | null;
634
+ type?: 'input_image';
635
+ }
636
+ /**
637
+ * File content for input messages in OpenAI response format.
638
+ */
639
+ interface OpenAIResponseInputMessageContentFile {
640
+ file_data?: string | null;
641
+ file_id?: string | null;
642
+ file_url?: string | null;
643
+ filename?: string | null;
644
+ type?: 'input_file';
645
+ }
646
+ interface OpenAIResponseOutputMessageContentOutputText {
647
+ text: string;
648
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
649
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
650
+ type?: 'output_text';
651
+ }
652
+ namespace OpenAIResponseOutputMessageContentOutputText {
653
+ /**
654
+ * File citation annotation for referencing specific files in response content.
655
+ */
656
+ interface OpenAIResponseAnnotationFileCitation {
657
+ file_id: string;
658
+ filename: string;
659
+ index: number;
660
+ type?: 'file_citation';
661
+ }
662
+ /**
663
+ * URL citation annotation for referencing external web resources.
664
+ */
665
+ interface OpenAIResponseAnnotationCitation {
666
+ end_index: number;
667
+ start_index: number;
668
+ title: string;
669
+ url: string;
670
+ type?: 'url_citation';
671
+ }
672
+ interface OpenAIResponseAnnotationContainerFileCitation {
673
+ container_id: string;
674
+ end_index: number;
675
+ file_id: string;
676
+ filename: string;
677
+ start_index: number;
678
+ type?: 'container_file_citation';
679
+ }
680
+ interface OpenAIResponseAnnotationFilePath {
681
+ file_id: string;
682
+ index: number;
683
+ type?: 'file_path';
684
+ }
685
+ /**
686
+ * The log probability for a token from an OpenAI-compatible chat completion
687
+ * response.
688
+ */
689
+ interface Logprob {
690
+ /**
691
+ * The token.
692
+ */
693
+ token: string;
694
+ /**
695
+ * The log probability of the token.
696
+ */
697
+ logprob: number;
698
+ /**
699
+ * The bytes for the token.
700
+ */
701
+ bytes?: Array<number> | null;
702
+ /**
703
+ * The top log probabilities for the token.
704
+ */
705
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
706
+ }
707
+ namespace Logprob {
708
+ /**
709
+ * The top log probability for a token from an OpenAI-compatible chat completion
710
+ * response.
711
+ */
712
+ interface TopLogprob {
713
+ /**
714
+ * The token.
715
+ */
716
+ token: string;
717
+ /**
718
+ * The log probability of the token.
719
+ */
720
+ logprob: number;
721
+ /**
722
+ * The bytes for the token.
723
+ */
724
+ bytes?: Array<number> | null;
725
+ }
726
+ }
727
+ }
728
+ /**
729
+ * Refusal content within a streamed response part.
730
+ */
731
+ interface OpenAIResponseContentPartRefusal {
732
+ refusal: string;
733
+ type?: 'refusal';
734
+ }
735
+ }
736
+ /**
737
+ * Web search tool call output message for OpenAI responses.
738
+ */
739
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
740
+ id: string;
741
+ status: string;
742
+ type?: 'web_search_call';
743
+ }
744
+ /**
745
+ * File search tool call output message for OpenAI responses.
746
+ */
747
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
748
+ id: string;
749
+ queries: Array<string>;
750
+ status: string;
751
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
752
+ type?: 'file_search_call';
753
+ }
754
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
755
+ /**
756
+ * Search results returned by the file search operation.
757
+ */
758
+ interface Result {
759
+ attributes: {
760
+ [key: string]: unknown;
761
+ };
762
+ file_id: string;
763
+ filename: string;
764
+ score: number;
765
+ text: string;
766
+ }
767
+ }
768
+ /**
769
+ * Function tool call output message for OpenAI responses.
770
+ */
771
+ interface OpenAIResponseOutputMessageFunctionToolCall {
772
+ arguments: string;
773
+ call_id: string;
774
+ name: string;
775
+ id?: string | null;
776
+ status?: string | null;
777
+ type?: 'function_call';
778
+ }
779
+ /**
780
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
781
+ */
782
+ interface OpenAIResponseOutputMessageMcpCall {
783
+ id: string;
784
+ arguments: string;
785
+ name: string;
786
+ server_label: string;
787
+ error?: string | null;
788
+ output?: string | null;
789
+ type?: 'mcp_call';
790
+ }
791
+ /**
792
+ * MCP list tools output message containing available tools from an MCP server.
793
+ */
794
+ interface OpenAIResponseOutputMessageMcpListTools {
795
+ id: string;
796
+ server_label: string;
797
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
798
+ type?: 'mcp_list_tools';
799
+ }
800
+ namespace OpenAIResponseOutputMessageMcpListTools {
801
+ /**
802
+ * Tool definition returned by MCP list tools operation.
803
+ */
804
+ interface Tool {
805
+ input_schema: {
806
+ [key: string]: unknown;
807
+ };
808
+ name: string;
809
+ description?: string | null;
810
+ }
811
+ }
812
+ /**
813
+ * A request for human approval of a tool invocation.
814
+ */
815
+ interface OpenAIResponseMcpApprovalRequest {
816
+ id: string;
817
+ arguments: string;
818
+ name: string;
819
+ server_label: string;
820
+ type?: 'mcp_approval_request';
821
+ }
822
+ }
823
+ /**
824
+ * Streaming event for when an output item is completed.
825
+ */
826
+ interface OpenAIResponseObjectStreamResponseOutputItemDone {
827
+ /**
828
+ * Corresponds to the various Message types in the Responses API. They are all
829
+ * under one type because the Responses API gives them all the same "type" value,
830
+ * and there is no way to tell them apart in certain scenarios.
831
+ */
832
+ item: OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseMessage | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageWebSearchToolCall | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageFileSearchToolCall | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageFunctionToolCall | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageMcpCall | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseOutputMessageMcpListTools | OpenAIResponseObjectStreamResponseOutputItemDone.OpenAIResponseMcpApprovalRequest;
833
+ output_index: number;
834
+ response_id: string;
835
+ sequence_number: number;
836
+ type?: 'response.output_item.done';
837
+ }
838
+ namespace OpenAIResponseObjectStreamResponseOutputItemDone {
839
+ /**
840
+ * Corresponds to the various Message types in the Responses API. They are all
841
+ * under one type because the Responses API gives them all the same "type" value,
842
+ * and there is no way to tell them apart in certain scenarios.
843
+ */
844
+ interface OpenAIResponseMessage {
845
+ content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage | OpenAIResponseMessage.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessage.OpenAIResponseOutputMessageContentOutputText | OpenAIResponseMessage.OpenAIResponseContentPartRefusal>;
846
+ role: 'system' | 'developer' | 'user' | 'assistant';
847
+ id?: string | null;
848
+ status?: string | null;
849
+ type?: 'message';
850
+ }
851
+ namespace OpenAIResponseMessage {
852
+ /**
853
+ * Text content for input messages in OpenAI response format.
854
+ */
855
+ interface OpenAIResponseInputMessageContentText {
856
+ text: string;
857
+ type?: 'input_text';
858
+ }
859
+ /**
860
+ * Image content for input messages in OpenAI response format.
861
+ */
862
+ interface OpenAIResponseInputMessageContentImage {
863
+ detail?: 'low' | 'high' | 'auto';
864
+ file_id?: string | null;
865
+ image_url?: string | null;
866
+ type?: 'input_image';
867
+ }
868
+ /**
869
+ * File content for input messages in OpenAI response format.
870
+ */
871
+ interface OpenAIResponseInputMessageContentFile {
872
+ file_data?: string | null;
873
+ file_id?: string | null;
874
+ file_url?: string | null;
875
+ filename?: string | null;
876
+ type?: 'input_file';
877
+ }
878
+ interface OpenAIResponseOutputMessageContentOutputText {
879
+ text: string;
880
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
881
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
882
+ type?: 'output_text';
883
+ }
884
+ namespace OpenAIResponseOutputMessageContentOutputText {
885
+ /**
886
+ * File citation annotation for referencing specific files in response content.
887
+ */
888
+ interface OpenAIResponseAnnotationFileCitation {
889
+ file_id: string;
890
+ filename: string;
891
+ index: number;
892
+ type?: 'file_citation';
893
+ }
894
+ /**
895
+ * URL citation annotation for referencing external web resources.
896
+ */
897
+ interface OpenAIResponseAnnotationCitation {
898
+ end_index: number;
899
+ start_index: number;
900
+ title: string;
901
+ url: string;
902
+ type?: 'url_citation';
903
+ }
904
+ interface OpenAIResponseAnnotationContainerFileCitation {
905
+ container_id: string;
906
+ end_index: number;
907
+ file_id: string;
908
+ filename: string;
909
+ start_index: number;
910
+ type?: 'container_file_citation';
911
+ }
912
+ interface OpenAIResponseAnnotationFilePath {
913
+ file_id: string;
914
+ index: number;
915
+ type?: 'file_path';
916
+ }
917
+ /**
918
+ * The log probability for a token from an OpenAI-compatible chat completion
919
+ * response.
920
+ */
921
+ interface Logprob {
922
+ /**
923
+ * The token.
924
+ */
925
+ token: string;
926
+ /**
927
+ * The log probability of the token.
928
+ */
929
+ logprob: number;
930
+ /**
931
+ * The bytes for the token.
932
+ */
933
+ bytes?: Array<number> | null;
934
+ /**
935
+ * The top log probabilities for the token.
936
+ */
937
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
938
+ }
939
+ namespace Logprob {
940
+ /**
941
+ * The top log probability for a token from an OpenAI-compatible chat completion
942
+ * response.
943
+ */
944
+ interface TopLogprob {
945
+ /**
946
+ * The token.
947
+ */
948
+ token: string;
949
+ /**
950
+ * The log probability of the token.
951
+ */
952
+ logprob: number;
953
+ /**
954
+ * The bytes for the token.
955
+ */
956
+ bytes?: Array<number> | null;
957
+ }
958
+ }
959
+ }
960
+ /**
961
+ * Refusal content within a streamed response part.
962
+ */
963
+ interface OpenAIResponseContentPartRefusal {
964
+ refusal: string;
965
+ type?: 'refusal';
966
+ }
967
+ }
968
+ /**
969
+ * Web search tool call output message for OpenAI responses.
970
+ */
971
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
972
+ id: string;
973
+ status: string;
974
+ type?: 'web_search_call';
975
+ }
976
+ /**
977
+ * File search tool call output message for OpenAI responses.
978
+ */
979
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
980
+ id: string;
981
+ queries: Array<string>;
982
+ status: string;
983
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
984
+ type?: 'file_search_call';
985
+ }
986
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
987
+ /**
988
+ * Search results returned by the file search operation.
989
+ */
990
+ interface Result {
991
+ attributes: {
992
+ [key: string]: unknown;
993
+ };
994
+ file_id: string;
995
+ filename: string;
996
+ score: number;
997
+ text: string;
998
+ }
999
+ }
1000
+ /**
1001
+ * Function tool call output message for OpenAI responses.
1002
+ */
1003
+ interface OpenAIResponseOutputMessageFunctionToolCall {
1004
+ arguments: string;
1005
+ call_id: string;
1006
+ name: string;
1007
+ id?: string | null;
1008
+ status?: string | null;
1009
+ type?: 'function_call';
1010
+ }
1011
+ /**
1012
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1013
+ */
1014
+ interface OpenAIResponseOutputMessageMcpCall {
1015
+ id: string;
1016
+ arguments: string;
1017
+ name: string;
1018
+ server_label: string;
1019
+ error?: string | null;
1020
+ output?: string | null;
1021
+ type?: 'mcp_call';
1022
+ }
1023
+ /**
1024
+ * MCP list tools output message containing available tools from an MCP server.
1025
+ */
1026
+ interface OpenAIResponseOutputMessageMcpListTools {
1027
+ id: string;
1028
+ server_label: string;
1029
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1030
+ type?: 'mcp_list_tools';
1031
+ }
1032
+ namespace OpenAIResponseOutputMessageMcpListTools {
1033
+ /**
1034
+ * Tool definition returned by MCP list tools operation.
1035
+ */
1036
+ interface Tool {
1037
+ input_schema: {
1038
+ [key: string]: unknown;
1039
+ };
1040
+ name: string;
1041
+ description?: string | null;
1042
+ }
1043
+ }
1044
+ /**
1045
+ * A request for human approval of a tool invocation.
1046
+ */
1047
+ interface OpenAIResponseMcpApprovalRequest {
1048
+ id: string;
1049
+ arguments: string;
1050
+ name: string;
1051
+ server_label: string;
1052
+ type?: 'mcp_approval_request';
1053
+ }
1054
+ }
1055
+ /**
1056
+ * Streaming event for incremental text content updates.
1057
+ */
1058
+ interface OpenAIResponseObjectStreamResponseOutputTextDelta {
1059
+ content_index: number;
1060
+ delta: string;
1061
+ item_id: string;
1062
+ output_index: number;
1063
+ sequence_number: number;
1064
+ logprobs?: Array<OpenAIResponseObjectStreamResponseOutputTextDelta.Logprob> | null;
1065
+ type?: 'response.output_text.delta';
1066
+ }
1067
+ namespace OpenAIResponseObjectStreamResponseOutputTextDelta {
1068
+ /**
1069
+ * The log probability for a token from an OpenAI-compatible chat completion
1070
+ * response.
1071
+ */
1072
+ interface Logprob {
1073
+ /**
1074
+ * The token.
1075
+ */
1076
+ token: string;
1077
+ /**
1078
+ * The log probability of the token.
1079
+ */
1080
+ logprob: number;
1081
+ /**
1082
+ * The bytes for the token.
1083
+ */
1084
+ bytes?: Array<number> | null;
1085
+ /**
1086
+ * The top log probabilities for the token.
1087
+ */
1088
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1089
+ }
1090
+ namespace Logprob {
1091
+ /**
1092
+ * The top log probability for a token from an OpenAI-compatible chat completion
1093
+ * response.
1094
+ */
1095
+ interface TopLogprob {
1096
+ /**
1097
+ * The token.
1098
+ */
1099
+ token: string;
1100
+ /**
1101
+ * The log probability of the token.
1102
+ */
1103
+ logprob: number;
1104
+ /**
1105
+ * The bytes for the token.
1106
+ */
1107
+ bytes?: Array<number> | null;
1108
+ }
1109
+ }
1110
+ }
1111
+ /**
1112
+ * Streaming event for when text output is completed.
1113
+ */
1114
+ interface OpenAIResponseObjectStreamResponseOutputTextDone {
1115
+ content_index: number;
1116
+ item_id: string;
1117
+ output_index: number;
1118
+ sequence_number: number;
1119
+ text: string;
1120
+ type?: 'response.output_text.done';
1121
+ }
1122
+ /**
1123
+ * Streaming event for incremental function call argument updates.
1124
+ */
1125
+ interface OpenAIResponseObjectStreamResponseFunctionCallArgumentsDelta {
1126
+ delta: string;
1127
+ item_id: string;
1128
+ output_index: number;
1129
+ sequence_number: number;
1130
+ type?: 'response.function_call_arguments.delta';
1131
+ }
1132
+ /**
1133
+ * Streaming event for when function call arguments are completed.
1134
+ */
1135
+ interface OpenAIResponseObjectStreamResponseFunctionCallArgumentsDone {
1136
+ arguments: string;
1137
+ item_id: string;
1138
+ output_index: number;
1139
+ sequence_number: number;
1140
+ type?: 'response.function_call_arguments.done';
1141
+ }
1142
+ /**
1143
+ * Streaming event for web search calls in progress.
1144
+ */
1145
+ interface OpenAIResponseObjectStreamResponseWebSearchCallInProgress {
1146
+ item_id: string;
1147
+ output_index: number;
1148
+ sequence_number: number;
1149
+ type?: 'response.web_search_call.in_progress';
1150
+ }
1151
+ interface OpenAIResponseObjectStreamResponseWebSearchCallSearching {
1152
+ item_id: string;
1153
+ output_index: number;
1154
+ sequence_number: number;
1155
+ type?: 'response.web_search_call.searching';
1156
+ }
1157
+ /**
1158
+ * Streaming event for completed web search calls.
1159
+ */
1160
+ interface OpenAIResponseObjectStreamResponseWebSearchCallCompleted {
1161
+ item_id: string;
1162
+ output_index: number;
1163
+ sequence_number: number;
1164
+ type?: 'response.web_search_call.completed';
1165
+ }
1166
+ interface OpenAIResponseObjectStreamResponseMcpListToolsInProgress {
1167
+ sequence_number: number;
1168
+ type?: 'response.mcp_list_tools.in_progress';
1169
+ }
1170
+ interface OpenAIResponseObjectStreamResponseMcpListToolsFailed {
1171
+ sequence_number: number;
1172
+ type?: 'response.mcp_list_tools.failed';
1173
+ }
1174
+ interface OpenAIResponseObjectStreamResponseMcpListToolsCompleted {
1175
+ sequence_number: number;
1176
+ type?: 'response.mcp_list_tools.completed';
1177
+ }
1178
+ interface OpenAIResponseObjectStreamResponseMcpCallArgumentsDelta {
1179
+ delta: string;
1180
+ item_id: string;
1181
+ output_index: number;
1182
+ sequence_number: number;
1183
+ type?: 'response.mcp_call.arguments.delta';
1184
+ }
1185
+ interface OpenAIResponseObjectStreamResponseMcpCallArgumentsDone {
1186
+ arguments: string;
1187
+ item_id: string;
1188
+ output_index: number;
1189
+ sequence_number: number;
1190
+ type?: 'response.mcp_call.arguments.done';
1191
+ }
1192
+ /**
1193
+ * Streaming event for MCP calls in progress.
1194
+ */
1195
+ interface OpenAIResponseObjectStreamResponseMcpCallInProgress {
1196
+ item_id: string;
1197
+ output_index: number;
1198
+ sequence_number: number;
1199
+ type?: 'response.mcp_call.in_progress';
1200
+ }
1201
+ /**
1202
+ * Streaming event for failed MCP calls.
1203
+ */
1204
+ interface OpenAIResponseObjectStreamResponseMcpCallFailed {
1205
+ sequence_number: number;
1206
+ type?: 'response.mcp_call.failed';
1207
+ }
1208
+ /**
1209
+ * Streaming event for completed MCP calls.
1210
+ */
1211
+ interface OpenAIResponseObjectStreamResponseMcpCallCompleted {
1212
+ sequence_number: number;
1213
+ type?: 'response.mcp_call.completed';
1214
+ }
1215
+ /**
1216
+ * Streaming event for when a new content part is added to a response item.
1217
+ */
1218
+ interface OpenAIResponseObjectStreamResponseContentPartAdded {
1219
+ content_index: number;
1220
+ item_id: string;
1221
+ output_index: number;
1222
+ /**
1223
+ * Text content within a streamed response part.
1224
+ */
1225
+ part: OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartOutputText | OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartRefusal | OpenAIResponseObjectStreamResponseContentPartAdded.OpenAIResponseContentPartReasoningText;
1226
+ response_id: string;
1227
+ sequence_number: number;
1228
+ type?: 'response.content_part.added';
1229
+ }
1230
+ namespace OpenAIResponseObjectStreamResponseContentPartAdded {
1231
+ /**
1232
+ * Text content within a streamed response part.
1233
+ */
1234
+ interface OpenAIResponseContentPartOutputText {
1235
+ text: string;
1236
+ annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
1237
+ logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
1238
+ type?: 'output_text';
1239
+ }
1240
+ namespace OpenAIResponseContentPartOutputText {
1241
+ /**
1242
+ * File citation annotation for referencing specific files in response content.
1243
+ */
1244
+ interface OpenAIResponseAnnotationFileCitation {
1245
+ file_id: string;
1246
+ filename: string;
1247
+ index: number;
1248
+ type?: 'file_citation';
1249
+ }
1250
+ /**
1251
+ * URL citation annotation for referencing external web resources.
1252
+ */
1253
+ interface OpenAIResponseAnnotationCitation {
1254
+ end_index: number;
1255
+ start_index: number;
1256
+ title: string;
1257
+ url: string;
1258
+ type?: 'url_citation';
1259
+ }
1260
+ interface OpenAIResponseAnnotationContainerFileCitation {
1261
+ container_id: string;
1262
+ end_index: number;
1263
+ file_id: string;
1264
+ filename: string;
1265
+ start_index: number;
1266
+ type?: 'container_file_citation';
1267
+ }
1268
+ interface OpenAIResponseAnnotationFilePath {
1269
+ file_id: string;
1270
+ index: number;
1271
+ type?: 'file_path';
1272
+ }
1273
+ /**
1274
+ * The log probability for a token from an OpenAI-compatible chat completion
1275
+ * response.
1276
+ */
1277
+ interface Logprob {
1278
+ /**
1279
+ * The token.
1280
+ */
1281
+ token: string;
1282
+ /**
1283
+ * The log probability of the token.
1284
+ */
1285
+ logprob: number;
1286
+ /**
1287
+ * The bytes for the token.
1288
+ */
1289
+ bytes?: Array<number> | null;
1290
+ /**
1291
+ * The top log probabilities for the token.
1292
+ */
1293
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1294
+ }
1295
+ namespace Logprob {
1296
+ /**
1297
+ * The top log probability for a token from an OpenAI-compatible chat completion
1298
+ * response.
1299
+ */
1300
+ interface TopLogprob {
1301
+ /**
1302
+ * The token.
1303
+ */
1304
+ token: string;
1305
+ /**
1306
+ * The log probability of the token.
1307
+ */
1308
+ logprob: number;
1309
+ /**
1310
+ * The bytes for the token.
1311
+ */
1312
+ bytes?: Array<number> | null;
1313
+ }
1314
+ }
1315
+ }
1316
+ /**
1317
+ * Refusal content within a streamed response part.
1318
+ */
1319
+ interface OpenAIResponseContentPartRefusal {
1320
+ refusal: string;
1321
+ type?: 'refusal';
1322
+ }
1323
+ /**
1324
+ * Reasoning text emitted as part of a streamed response.
1325
+ */
1326
+ interface OpenAIResponseContentPartReasoningText {
1327
+ text: string;
1328
+ type?: 'reasoning_text';
1329
+ }
1330
+ }
1331
+ /**
1332
+ * Streaming event for when a content part is completed.
1333
+ */
1334
+ interface OpenAIResponseObjectStreamResponseContentPartDone {
1335
+ content_index: number;
1336
+ item_id: string;
1337
+ output_index: number;
1338
+ /**
1339
+ * Text content within a streamed response part.
1340
+ */
1341
+ part: OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartOutputText | OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartRefusal | OpenAIResponseObjectStreamResponseContentPartDone.OpenAIResponseContentPartReasoningText;
1342
+ response_id: string;
1343
+ sequence_number: number;
1344
+ type?: 'response.content_part.done';
1345
+ }
1346
+ namespace OpenAIResponseObjectStreamResponseContentPartDone {
1347
+ /**
1348
+ * Text content within a streamed response part.
1349
+ */
1350
+ interface OpenAIResponseContentPartOutputText {
1351
+ text: string;
1352
+ annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
1353
+ logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
1354
+ type?: 'output_text';
1355
+ }
1356
+ namespace OpenAIResponseContentPartOutputText {
1357
+ /**
1358
+ * File citation annotation for referencing specific files in response content.
1359
+ */
1360
+ interface OpenAIResponseAnnotationFileCitation {
1361
+ file_id: string;
1362
+ filename: string;
1363
+ index: number;
1364
+ type?: 'file_citation';
1365
+ }
1366
+ /**
1367
+ * URL citation annotation for referencing external web resources.
1368
+ */
1369
+ interface OpenAIResponseAnnotationCitation {
1370
+ end_index: number;
1371
+ start_index: number;
1372
+ title: string;
1373
+ url: string;
1374
+ type?: 'url_citation';
1375
+ }
1376
+ interface OpenAIResponseAnnotationContainerFileCitation {
1377
+ container_id: string;
1378
+ end_index: number;
1379
+ file_id: string;
1380
+ filename: string;
1381
+ start_index: number;
1382
+ type?: 'container_file_citation';
1383
+ }
1384
+ interface OpenAIResponseAnnotationFilePath {
1385
+ file_id: string;
1386
+ index: number;
1387
+ type?: 'file_path';
1388
+ }
1389
+ /**
1390
+ * The log probability for a token from an OpenAI-compatible chat completion
1391
+ * response.
1392
+ */
1393
+ interface Logprob {
1394
+ /**
1395
+ * The token.
1396
+ */
1397
+ token: string;
1398
+ /**
1399
+ * The log probability of the token.
1400
+ */
1401
+ logprob: number;
1402
+ /**
1403
+ * The bytes for the token.
1404
+ */
1405
+ bytes?: Array<number> | null;
1406
+ /**
1407
+ * The top log probabilities for the token.
1408
+ */
1409
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1410
+ }
1411
+ namespace Logprob {
1412
+ /**
1413
+ * The top log probability for a token from an OpenAI-compatible chat completion
1414
+ * response.
1415
+ */
1416
+ interface TopLogprob {
1417
+ /**
1418
+ * The token.
1419
+ */
1420
+ token: string;
1421
+ /**
1422
+ * The log probability of the token.
1423
+ */
1424
+ logprob: number;
1425
+ /**
1426
+ * The bytes for the token.
1427
+ */
1428
+ bytes?: Array<number> | null;
1429
+ }
1430
+ }
1431
+ }
1432
+ /**
1433
+ * Refusal content within a streamed response part.
1434
+ */
1435
+ interface OpenAIResponseContentPartRefusal {
1436
+ refusal: string;
1437
+ type?: 'refusal';
1438
+ }
1439
+ /**
1440
+ * Reasoning text emitted as part of a streamed response.
1441
+ */
1442
+ interface OpenAIResponseContentPartReasoningText {
1443
+ text: string;
1444
+ type?: 'reasoning_text';
1445
+ }
1446
+ }
1447
+ /**
1448
+ * Streaming event for incremental reasoning text updates.
1449
+ */
1450
+ interface OpenAIResponseObjectStreamResponseReasoningTextDelta {
1451
+ content_index: number;
1452
+ delta: string;
1453
+ item_id: string;
1454
+ output_index: number;
1455
+ sequence_number: number;
1456
+ type?: 'response.reasoning_text.delta';
1457
+ }
1458
+ /**
1459
+ * Streaming event for when reasoning text is completed.
1460
+ */
1461
+ interface OpenAIResponseObjectStreamResponseReasoningTextDone {
1462
+ content_index: number;
1463
+ item_id: string;
1464
+ output_index: number;
1465
+ sequence_number: number;
1466
+ text: string;
1467
+ type?: 'response.reasoning_text.done';
1468
+ }
1469
+ /**
1470
+ * Streaming event for when a new reasoning summary part is added.
1471
+ */
1472
+ interface OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded {
1473
+ item_id: string;
1474
+ output_index: number;
1475
+ /**
1476
+ * Reasoning summary part in a streamed response.
1477
+ */
1478
+ part: OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded.Part;
1479
+ sequence_number: number;
1480
+ summary_index: number;
1481
+ type?: 'response.reasoning_summary_part.added';
1482
+ }
1483
+ namespace OpenAIResponseObjectStreamResponseReasoningSummaryPartAdded {
1484
+ /**
1485
+ * Reasoning summary part in a streamed response.
1486
+ */
1487
+ interface Part {
1488
+ text: string;
1489
+ type?: 'summary_text';
1490
+ }
1491
+ }
1492
+ /**
1493
+ * Streaming event for when a reasoning summary part is completed.
1494
+ */
1495
+ interface OpenAIResponseObjectStreamResponseReasoningSummaryPartDone {
1496
+ item_id: string;
1497
+ output_index: number;
1498
+ /**
1499
+ * Reasoning summary part in a streamed response.
1500
+ */
1501
+ part: OpenAIResponseObjectStreamResponseReasoningSummaryPartDone.Part;
1502
+ sequence_number: number;
1503
+ summary_index: number;
1504
+ type?: 'response.reasoning_summary_part.done';
1505
+ }
1506
+ namespace OpenAIResponseObjectStreamResponseReasoningSummaryPartDone {
1507
+ /**
1508
+ * Reasoning summary part in a streamed response.
1509
+ */
1510
+ interface Part {
1511
+ text: string;
1512
+ type?: 'summary_text';
1513
+ }
1514
+ }
1515
+ /**
1516
+ * Streaming event for incremental reasoning summary text updates.
1517
+ */
1518
+ interface OpenAIResponseObjectStreamResponseReasoningSummaryTextDelta {
1519
+ delta: string;
1520
+ item_id: string;
1521
+ output_index: number;
1522
+ sequence_number: number;
1523
+ summary_index: number;
1524
+ type?: 'response.reasoning_summary_text.delta';
1525
+ }
1526
+ /**
1527
+ * Streaming event for when reasoning summary text is completed.
1528
+ */
1529
+ interface OpenAIResponseObjectStreamResponseReasoningSummaryTextDone {
1530
+ item_id: string;
1531
+ output_index: number;
1532
+ sequence_number: number;
1533
+ summary_index: number;
1534
+ text: string;
1535
+ type?: 'response.reasoning_summary_text.done';
1536
+ }
1537
+ /**
1538
+ * Streaming event for incremental refusal text updates.
1539
+ */
1540
+ interface OpenAIResponseObjectStreamResponseRefusalDelta {
1541
+ content_index: number;
1542
+ delta: string;
1543
+ item_id: string;
1544
+ output_index: number;
1545
+ sequence_number: number;
1546
+ type?: 'response.refusal.delta';
1547
+ }
1548
+ /**
1549
+ * Streaming event for when refusal text is completed.
1550
+ */
1551
+ interface OpenAIResponseObjectStreamResponseRefusalDone {
1552
+ content_index: number;
1553
+ item_id: string;
1554
+ output_index: number;
1555
+ refusal: string;
1556
+ sequence_number: number;
1557
+ type?: 'response.refusal.done';
1558
+ }
1559
+ /**
1560
+ * Streaming event for when an annotation is added to output text.
1561
+ */
1562
+ interface OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded {
1563
+ /**
1564
+ * File citation annotation for referencing specific files in response content.
1565
+ */
1566
+ annotation: OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationFileCitation | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationCitation | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded.OpenAIResponseAnnotationFilePath;
1567
+ annotation_index: number;
1568
+ content_index: number;
1569
+ item_id: string;
1570
+ output_index: number;
1571
+ sequence_number: number;
1572
+ type?: 'response.output_text.annotation.added';
1573
+ }
1574
+ namespace OpenAIResponseObjectStreamResponseOutputTextAnnotationAdded {
1575
+ /**
1576
+ * File citation annotation for referencing specific files in response content.
1577
+ */
1578
+ interface OpenAIResponseAnnotationFileCitation {
1579
+ file_id: string;
1580
+ filename: string;
1581
+ index: number;
1582
+ type?: 'file_citation';
1583
+ }
1584
+ /**
1585
+ * URL citation annotation for referencing external web resources.
1586
+ */
1587
+ interface OpenAIResponseAnnotationCitation {
1588
+ end_index: number;
1589
+ start_index: number;
1590
+ title: string;
1591
+ url: string;
1592
+ type?: 'url_citation';
1593
+ }
1594
+ interface OpenAIResponseAnnotationContainerFileCitation {
1595
+ container_id: string;
1596
+ end_index: number;
1597
+ file_id: string;
1598
+ filename: string;
1599
+ start_index: number;
1600
+ type?: 'container_file_citation';
1601
+ }
1602
+ interface OpenAIResponseAnnotationFilePath {
1603
+ file_id: string;
1604
+ index: number;
1605
+ type?: 'file_path';
1606
+ }
1607
+ }
1608
+ /**
1609
+ * Streaming event for file search calls in progress.
1610
+ */
1611
+ interface OpenAIResponseObjectStreamResponseFileSearchCallInProgress {
1612
+ item_id: string;
1613
+ output_index: number;
1614
+ sequence_number: number;
1615
+ type?: 'response.file_search_call.in_progress';
1616
+ }
1617
+ /**
1618
+ * Streaming event for file search currently searching.
1619
+ */
1620
+ interface OpenAIResponseObjectStreamResponseFileSearchCallSearching {
1621
+ item_id: string;
1622
+ output_index: number;
1623
+ sequence_number: number;
1624
+ type?: 'response.file_search_call.searching';
1625
+ }
1626
+ /**
1627
+ * Streaming event for completed file search calls.
1628
+ */
1629
+ interface OpenAIResponseObjectStreamResponseFileSearchCallCompleted {
1630
+ item_id: string;
1631
+ output_index: number;
1632
+ sequence_number: number;
1633
+ type?: 'response.file_search_call.completed';
1634
+ }
1635
+ /**
1636
+ * Streaming event emitted when a response ends in an incomplete state.
1637
+ */
1638
+ interface OpenAIResponseObjectStreamResponseIncomplete {
1639
+ /**
1640
+ * Complete OpenAI response object containing generation results and metadata.
1641
+ */
1642
+ response: ResponsesAPI.ResponseObject;
1643
+ sequence_number: number;
1644
+ type?: 'response.incomplete';
1645
+ }
1646
+ /**
1647
+ * Streaming event emitted when a response fails.
1648
+ */
1649
+ interface OpenAIResponseObjectStreamResponseFailed {
1650
+ /**
1651
+ * Complete OpenAI response object containing generation results and metadata.
1652
+ */
1653
+ response: ResponsesAPI.ResponseObject;
1654
+ sequence_number: number;
1655
+ type?: 'response.failed';
1656
+ }
1657
+ /**
1658
+ * Streaming event indicating a response has been completed.
1659
+ */
1660
+ interface OpenAIResponseObjectStreamResponseCompleted {
1661
+ /**
1662
+ * Complete OpenAI response object containing generation results and metadata.
1663
+ */
1664
+ response: ResponsesAPI.ResponseObject;
1665
+ type?: 'response.completed';
1666
+ }
1667
+ }
1668
+ /**
1669
+ * OpenAI response object extended with input context information.
1670
+ */
1671
+ export interface ResponseListResponse {
1672
+ id: string;
1673
+ created_at: number;
1674
+ input: Array<ResponseListResponse.OpenAIResponseMessageOutput | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall | ResponseListResponse.OpenAIResponseOutputMessageMcpCall | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools | ResponseListResponse.OpenAIResponseMcpApprovalRequest | ResponseListResponse.OpenAIResponseInputFunctionToolCallOutput | ResponseListResponse.OpenAIResponseMcpApprovalResponse | ResponseListResponse.OpenAIResponseMessageOutput>;
1675
+ model: string;
1676
+ output: Array<ResponseListResponse.OpenAIResponseMessageOutput | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall | ResponseListResponse.OpenAIResponseOutputMessageMcpCall | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools | ResponseListResponse.OpenAIResponseMcpApprovalRequest>;
1677
+ status: string;
1678
+ store: boolean;
1679
+ completed_at?: number | null;
1680
+ /**
1681
+ * Error details for failed OpenAI response requests.
1682
+ */
1683
+ error?: ResponseListResponse.Error | null;
1684
+ instructions?: string | null;
1685
+ max_output_tokens?: number | null;
1686
+ max_tool_calls?: number | null;
1687
+ metadata?: {
1688
+ [key: string]: string;
1689
+ } | null;
1690
+ object?: 'response';
1691
+ parallel_tool_calls?: boolean | null;
1692
+ previous_response_id?: string | null;
1693
+ /**
1694
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
1695
+ */
1696
+ prompt?: ResponseListResponse.Prompt | null;
1697
+ /**
1698
+ * Configuration for reasoning effort in OpenAI responses.
1699
+ *
1700
+ * Controls how much reasoning the model performs before generating a response.
1701
+ */
1702
+ reasoning?: ResponseListResponse.Reasoning | null;
1703
+ safety_identifier?: string | null;
1704
+ temperature?: number | null;
1705
+ /**
1706
+ * Text response configuration for OpenAI responses.
1707
+ */
1708
+ text?: ResponseListResponse.Text;
1709
+ /**
1710
+ * Constrains the tools available to the model to a pre-defined set.
1711
+ */
1712
+ tool_choice?: 'auto' | 'required' | 'none' | ResponseListResponse.OpenAIResponseInputToolChoiceAllowedTools | ResponseListResponse.OpenAIResponseInputToolChoiceFileSearch | ResponseListResponse.OpenAIResponseInputToolChoiceWebSearch | ResponseListResponse.OpenAIResponseInputToolChoiceFunctionTool | ResponseListResponse.OpenAIResponseInputToolChoiceMcpTool | ResponseListResponse.OpenAIResponseInputToolChoiceCustomTool | null;
1713
+ tools?: Array<ResponseListResponse.OpenAIResponseInputToolWebSearch | ResponseListResponse.OpenAIResponseInputToolFileSearch | ResponseListResponse.OpenAIResponseInputToolFunction | ResponseListResponse.OpenAIResponseToolMcp> | null;
1714
+ top_p?: number | null;
1715
+ truncation?: string | null;
1716
+ /**
1717
+ * Usage information for OpenAI response.
1718
+ */
1719
+ usage?: ResponseListResponse.Usage | null;
1720
+ }
1721
+ export declare namespace ResponseListResponse {
1722
+ /**
1723
+ * Corresponds to the various Message types in the Responses API. They are all
1724
+ * under one type because the Responses API gives them all the same "type" value,
1725
+ * and there is no way to tell them apart in certain scenarios.
1726
+ */
1727
+ interface OpenAIResponseMessageOutput {
1728
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
1729
+ role: 'system' | 'developer' | 'user' | 'assistant';
1730
+ id?: string | null;
1731
+ status?: string | null;
1732
+ type?: 'message';
1733
+ }
1734
+ namespace OpenAIResponseMessageOutput {
1735
+ /**
1736
+ * Text content for input messages in OpenAI response format.
1737
+ */
1738
+ interface OpenAIResponseInputMessageContentText {
1739
+ text: string;
1740
+ type?: 'input_text';
1741
+ }
1742
+ /**
1743
+ * Image content for input messages in OpenAI response format.
1744
+ */
1745
+ interface OpenAIResponseInputMessageContentImage {
1746
+ detail?: 'low' | 'high' | 'auto';
1747
+ file_id?: string | null;
1748
+ image_url?: string | null;
1749
+ type?: 'input_image';
1750
+ }
1751
+ /**
1752
+ * File content for input messages in OpenAI response format.
1753
+ */
1754
+ interface OpenAIResponseInputMessageContentFile {
1755
+ file_data?: string | null;
1756
+ file_id?: string | null;
1757
+ file_url?: string | null;
1758
+ filename?: string | null;
1759
+ type?: 'input_file';
1760
+ }
1761
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
1762
+ text: string;
1763
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
1764
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
1765
+ type?: 'output_text';
1766
+ }
1767
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
1768
+ /**
1769
+ * File citation annotation for referencing specific files in response content.
1770
+ */
1771
+ interface OpenAIResponseAnnotationFileCitation {
1772
+ file_id: string;
1773
+ filename: string;
1774
+ index: number;
1775
+ type?: 'file_citation';
1776
+ }
1777
+ /**
1778
+ * URL citation annotation for referencing external web resources.
1779
+ */
1780
+ interface OpenAIResponseAnnotationCitation {
1781
+ end_index: number;
1782
+ start_index: number;
1783
+ title: string;
1784
+ url: string;
1785
+ type?: 'url_citation';
1786
+ }
1787
+ interface OpenAIResponseAnnotationContainerFileCitation {
1788
+ container_id: string;
1789
+ end_index: number;
1790
+ file_id: string;
1791
+ filename: string;
1792
+ start_index: number;
1793
+ type?: 'container_file_citation';
1794
+ }
1795
+ interface OpenAIResponseAnnotationFilePath {
1796
+ file_id: string;
1797
+ index: number;
1798
+ type?: 'file_path';
1799
+ }
1800
+ /**
1801
+ * The log probability for a token from an OpenAI-compatible chat completion
1802
+ * response.
1803
+ */
1804
+ interface Logprob {
1805
+ /**
1806
+ * The token.
1807
+ */
1808
+ token: string;
1809
+ /**
1810
+ * The log probability of the token.
1811
+ */
1812
+ logprob: number;
1813
+ /**
1814
+ * The bytes for the token.
1815
+ */
1816
+ bytes?: Array<number> | null;
1817
+ /**
1818
+ * The top log probabilities for the token.
1819
+ */
1820
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1821
+ }
1822
+ namespace Logprob {
1823
+ /**
1824
+ * The top log probability for a token from an OpenAI-compatible chat completion
1825
+ * response.
1826
+ */
1827
+ interface TopLogprob {
1828
+ /**
1829
+ * The token.
1830
+ */
1831
+ token: string;
1832
+ /**
1833
+ * The log probability of the token.
1834
+ */
1835
+ logprob: number;
1836
+ /**
1837
+ * The bytes for the token.
1838
+ */
1839
+ bytes?: Array<number> | null;
1840
+ }
1841
+ }
1842
+ }
1843
+ /**
1844
+ * Refusal content within a streamed response part.
1845
+ */
1846
+ interface OpenAIResponseContentPartRefusal {
1847
+ refusal: string;
1848
+ type?: 'refusal';
1849
+ }
1850
+ }
1851
+ /**
1852
+ * Web search tool call output message for OpenAI responses.
1853
+ */
1854
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
1855
+ id: string;
1856
+ status: string;
1857
+ type?: 'web_search_call';
1858
+ }
1859
+ /**
1860
+ * File search tool call output message for OpenAI responses.
1861
+ */
1862
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
1863
+ id: string;
1864
+ queries: Array<string>;
1865
+ status: string;
1866
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
1867
+ type?: 'file_search_call';
1868
+ }
1869
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
1870
+ /**
1871
+ * Search results returned by the file search operation.
1872
+ */
1873
+ interface Result {
1874
+ attributes: {
1875
+ [key: string]: unknown;
1876
+ };
1877
+ file_id: string;
1878
+ filename: string;
1879
+ score: number;
1880
+ text: string;
1881
+ }
1882
+ }
1883
+ /**
1884
+ * Function tool call output message for OpenAI responses.
1885
+ */
1886
+ interface OpenAIResponseOutputMessageFunctionToolCall {
1887
+ arguments: string;
1888
+ call_id: string;
1889
+ name: string;
1890
+ id?: string | null;
1891
+ status?: string | null;
1892
+ type?: 'function_call';
1893
+ }
1894
+ /**
1895
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1896
+ */
1897
+ interface OpenAIResponseOutputMessageMcpCall {
1898
+ id: string;
1899
+ arguments: string;
1900
+ name: string;
1901
+ server_label: string;
1902
+ error?: string | null;
1903
+ output?: string | null;
1904
+ type?: 'mcp_call';
1905
+ }
1906
+ /**
1907
+ * MCP list tools output message containing available tools from an MCP server.
1908
+ */
1909
+ interface OpenAIResponseOutputMessageMcpListTools {
1910
+ id: string;
1911
+ server_label: string;
1912
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1913
+ type?: 'mcp_list_tools';
1914
+ }
1915
+ namespace OpenAIResponseOutputMessageMcpListTools {
1916
+ /**
1917
+ * Tool definition returned by MCP list tools operation.
1918
+ */
1919
+ interface Tool {
1920
+ input_schema: {
1921
+ [key: string]: unknown;
1922
+ };
1923
+ name: string;
1924
+ description?: string | null;
1925
+ }
1926
+ }
1927
+ /**
1928
+ * A request for human approval of a tool invocation.
1929
+ */
1930
+ interface OpenAIResponseMcpApprovalRequest {
1931
+ id: string;
1932
+ arguments: string;
1933
+ name: string;
1934
+ server_label: string;
1935
+ type?: 'mcp_approval_request';
1936
+ }
1937
+ /**
1938
+ * This represents the output of a function call that gets passed back to the
1939
+ * model.
1940
+ */
1941
+ interface OpenAIResponseInputFunctionToolCallOutput {
1942
+ call_id: string;
1943
+ output: string;
1944
+ id?: string | null;
1945
+ status?: string | null;
1946
+ type?: 'function_call_output';
1947
+ }
1948
+ /**
1949
+ * A response to an MCP approval request.
1950
+ */
1951
+ interface OpenAIResponseMcpApprovalResponse {
1952
+ approval_request_id: string;
1953
+ approve: boolean;
1954
+ id?: string | null;
1955
+ reason?: string | null;
1956
+ type?: 'mcp_approval_response';
1957
+ }
1958
+ /**
1959
+ * Corresponds to the various Message types in the Responses API. They are all
1960
+ * under one type because the Responses API gives them all the same "type" value,
1961
+ * and there is no way to tell them apart in certain scenarios.
1962
+ */
1963
+ interface OpenAIResponseMessageOutput {
1964
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
1965
+ role: 'system' | 'developer' | 'user' | 'assistant';
1966
+ id?: string | null;
1967
+ status?: string | null;
1968
+ type?: 'message';
1969
+ }
1970
+ namespace OpenAIResponseMessageOutput {
1971
+ /**
1972
+ * Text content for input messages in OpenAI response format.
1973
+ */
1974
+ interface OpenAIResponseInputMessageContentText {
1975
+ text: string;
1976
+ type?: 'input_text';
1977
+ }
1978
+ /**
1979
+ * Image content for input messages in OpenAI response format.
1980
+ */
1981
+ interface OpenAIResponseInputMessageContentImage {
1982
+ detail?: 'low' | 'high' | 'auto';
1983
+ file_id?: string | null;
1984
+ image_url?: string | null;
1985
+ type?: 'input_image';
1986
+ }
1987
+ /**
1988
+ * File content for input messages in OpenAI response format.
1989
+ */
1990
+ interface OpenAIResponseInputMessageContentFile {
1991
+ file_data?: string | null;
1992
+ file_id?: string | null;
1993
+ file_url?: string | null;
1994
+ filename?: string | null;
1995
+ type?: 'input_file';
1996
+ }
1997
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
1998
+ text: string;
1999
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
2000
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
2001
+ type?: 'output_text';
2002
+ }
2003
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
2004
+ /**
2005
+ * File citation annotation for referencing specific files in response content.
2006
+ */
2007
+ interface OpenAIResponseAnnotationFileCitation {
2008
+ file_id: string;
2009
+ filename: string;
2010
+ index: number;
2011
+ type?: 'file_citation';
2012
+ }
2013
+ /**
2014
+ * URL citation annotation for referencing external web resources.
2015
+ */
2016
+ interface OpenAIResponseAnnotationCitation {
2017
+ end_index: number;
2018
+ start_index: number;
2019
+ title: string;
2020
+ url: string;
2021
+ type?: 'url_citation';
2022
+ }
2023
+ interface OpenAIResponseAnnotationContainerFileCitation {
2024
+ container_id: string;
2025
+ end_index: number;
2026
+ file_id: string;
2027
+ filename: string;
2028
+ start_index: number;
2029
+ type?: 'container_file_citation';
2030
+ }
2031
+ interface OpenAIResponseAnnotationFilePath {
2032
+ file_id: string;
2033
+ index: number;
2034
+ type?: 'file_path';
2035
+ }
2036
+ /**
2037
+ * The log probability for a token from an OpenAI-compatible chat completion
2038
+ * response.
2039
+ */
2040
+ interface Logprob {
2041
+ /**
2042
+ * The token.
2043
+ */
2044
+ token: string;
2045
+ /**
2046
+ * The log probability of the token.
2047
+ */
2048
+ logprob: number;
2049
+ /**
2050
+ * The bytes for the token.
2051
+ */
2052
+ bytes?: Array<number> | null;
2053
+ /**
2054
+ * The top log probabilities for the token.
2055
+ */
2056
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
2057
+ }
2058
+ namespace Logprob {
2059
+ /**
2060
+ * The top log probability for a token from an OpenAI-compatible chat completion
2061
+ * response.
2062
+ */
2063
+ interface TopLogprob {
2064
+ /**
2065
+ * The token.
2066
+ */
2067
+ token: string;
2068
+ /**
2069
+ * The log probability of the token.
2070
+ */
2071
+ logprob: number;
2072
+ /**
2073
+ * The bytes for the token.
2074
+ */
2075
+ bytes?: Array<number> | null;
2076
+ }
2077
+ }
2078
+ }
2079
+ /**
2080
+ * Refusal content within a streamed response part.
2081
+ */
2082
+ interface OpenAIResponseContentPartRefusal {
2083
+ refusal: string;
2084
+ type?: 'refusal';
2085
+ }
2086
+ }
2087
+ /**
2088
+ * Corresponds to the various Message types in the Responses API. They are all
2089
+ * under one type because the Responses API gives them all the same "type" value,
2090
+ * and there is no way to tell them apart in certain scenarios.
2091
+ */
2092
+ interface OpenAIResponseMessageOutput {
2093
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
2094
+ role: 'system' | 'developer' | 'user' | 'assistant';
2095
+ id?: string | null;
2096
+ status?: string | null;
2097
+ type?: 'message';
2098
+ }
2099
+ namespace OpenAIResponseMessageOutput {
2100
+ /**
2101
+ * Text content for input messages in OpenAI response format.
2102
+ */
2103
+ interface OpenAIResponseInputMessageContentText {
2104
+ text: string;
2105
+ type?: 'input_text';
2106
+ }
2107
+ /**
2108
+ * Image content for input messages in OpenAI response format.
2109
+ */
2110
+ interface OpenAIResponseInputMessageContentImage {
2111
+ detail?: 'low' | 'high' | 'auto';
2112
+ file_id?: string | null;
2113
+ image_url?: string | null;
2114
+ type?: 'input_image';
2115
+ }
2116
+ /**
2117
+ * File content for input messages in OpenAI response format.
2118
+ */
2119
+ interface OpenAIResponseInputMessageContentFile {
2120
+ file_data?: string | null;
2121
+ file_id?: string | null;
2122
+ file_url?: string | null;
2123
+ filename?: string | null;
2124
+ type?: 'input_file';
2125
+ }
2126
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
2127
+ text: string;
2128
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
2129
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
2130
+ type?: 'output_text';
2131
+ }
2132
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
2133
+ /**
2134
+ * File citation annotation for referencing specific files in response content.
2135
+ */
2136
+ interface OpenAIResponseAnnotationFileCitation {
2137
+ file_id: string;
2138
+ filename: string;
2139
+ index: number;
2140
+ type?: 'file_citation';
2141
+ }
2142
+ /**
2143
+ * URL citation annotation for referencing external web resources.
2144
+ */
2145
+ interface OpenAIResponseAnnotationCitation {
2146
+ end_index: number;
2147
+ start_index: number;
2148
+ title: string;
2149
+ url: string;
2150
+ type?: 'url_citation';
2151
+ }
2152
+ interface OpenAIResponseAnnotationContainerFileCitation {
2153
+ container_id: string;
2154
+ end_index: number;
2155
+ file_id: string;
2156
+ filename: string;
2157
+ start_index: number;
2158
+ type?: 'container_file_citation';
2159
+ }
2160
+ interface OpenAIResponseAnnotationFilePath {
2161
+ file_id: string;
2162
+ index: number;
2163
+ type?: 'file_path';
2164
+ }
2165
+ /**
2166
+ * The log probability for a token from an OpenAI-compatible chat completion
2167
+ * response.
2168
+ */
2169
+ interface Logprob {
2170
+ /**
2171
+ * The token.
2172
+ */
2173
+ token: string;
2174
+ /**
2175
+ * The log probability of the token.
2176
+ */
2177
+ logprob: number;
2178
+ /**
2179
+ * The bytes for the token.
2180
+ */
2181
+ bytes?: Array<number> | null;
2182
+ /**
2183
+ * The top log probabilities for the token.
2184
+ */
2185
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
2186
+ }
2187
+ namespace Logprob {
2188
+ /**
2189
+ * The top log probability for a token from an OpenAI-compatible chat completion
2190
+ * response.
2191
+ */
2192
+ interface TopLogprob {
2193
+ /**
2194
+ * The token.
2195
+ */
2196
+ token: string;
2197
+ /**
2198
+ * The log probability of the token.
2199
+ */
2200
+ logprob: number;
2201
+ /**
2202
+ * The bytes for the token.
2203
+ */
2204
+ bytes?: Array<number> | null;
2205
+ }
2206
+ }
2207
+ }
2208
+ /**
2209
+ * Refusal content within a streamed response part.
2210
+ */
2211
+ interface OpenAIResponseContentPartRefusal {
2212
+ refusal: string;
2213
+ type?: 'refusal';
2214
+ }
2215
+ }
2216
+ /**
2217
+ * Web search tool call output message for OpenAI responses.
2218
+ */
2219
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
2220
+ id: string;
2221
+ status: string;
2222
+ type?: 'web_search_call';
2223
+ }
2224
+ /**
2225
+ * File search tool call output message for OpenAI responses.
2226
+ */
2227
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
2228
+ id: string;
2229
+ queries: Array<string>;
2230
+ status: string;
2231
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
2232
+ type?: 'file_search_call';
2233
+ }
2234
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
2235
+ /**
2236
+ * Search results returned by the file search operation.
2237
+ */
2238
+ interface Result {
2239
+ attributes: {
2240
+ [key: string]: unknown;
2241
+ };
2242
+ file_id: string;
2243
+ filename: string;
2244
+ score: number;
2245
+ text: string;
2246
+ }
2247
+ }
2248
+ /**
2249
+ * Function tool call output message for OpenAI responses.
2250
+ */
2251
+ interface OpenAIResponseOutputMessageFunctionToolCall {
2252
+ arguments: string;
2253
+ call_id: string;
2254
+ name: string;
2255
+ id?: string | null;
2256
+ status?: string | null;
2257
+ type?: 'function_call';
2258
+ }
2259
+ /**
2260
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
2261
+ */
2262
+ interface OpenAIResponseOutputMessageMcpCall {
2263
+ id: string;
2264
+ arguments: string;
2265
+ name: string;
2266
+ server_label: string;
2267
+ error?: string | null;
2268
+ output?: string | null;
2269
+ type?: 'mcp_call';
2270
+ }
2271
+ /**
2272
+ * MCP list tools output message containing available tools from an MCP server.
2273
+ */
2274
+ interface OpenAIResponseOutputMessageMcpListTools {
2275
+ id: string;
2276
+ server_label: string;
2277
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
2278
+ type?: 'mcp_list_tools';
2279
+ }
2280
+ namespace OpenAIResponseOutputMessageMcpListTools {
2281
+ /**
2282
+ * Tool definition returned by MCP list tools operation.
2283
+ */
2284
+ interface Tool {
2285
+ input_schema: {
2286
+ [key: string]: unknown;
2287
+ };
2288
+ name: string;
2289
+ description?: string | null;
2290
+ }
2291
+ }
2292
+ /**
2293
+ * A request for human approval of a tool invocation.
2294
+ */
2295
+ interface OpenAIResponseMcpApprovalRequest {
2296
+ id: string;
2297
+ arguments: string;
2298
+ name: string;
2299
+ server_label: string;
2300
+ type?: 'mcp_approval_request';
2301
+ }
2302
+ /**
2303
+ * Error details for failed OpenAI response requests.
2304
+ */
2305
+ interface Error {
2306
+ code: string;
2307
+ message: string;
2308
+ }
2309
+ /**
2310
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
2311
+ */
2312
+ interface Prompt {
2313
+ id: string;
2314
+ variables?: {
2315
+ [key: string]: Prompt.OpenAIResponseInputMessageContentText | Prompt.OpenAIResponseInputMessageContentImage | Prompt.OpenAIResponseInputMessageContentFile;
2316
+ } | null;
2317
+ version?: string | null;
2318
+ }
2319
+ namespace Prompt {
2320
+ /**
2321
+ * Text content for input messages in OpenAI response format.
2322
+ */
2323
+ interface OpenAIResponseInputMessageContentText {
2324
+ text: string;
2325
+ type?: 'input_text';
2326
+ }
2327
+ /**
2328
+ * Image content for input messages in OpenAI response format.
2329
+ */
2330
+ interface OpenAIResponseInputMessageContentImage {
2331
+ detail?: 'low' | 'high' | 'auto';
2332
+ file_id?: string | null;
2333
+ image_url?: string | null;
2334
+ type?: 'input_image';
2335
+ }
2336
+ /**
2337
+ * File content for input messages in OpenAI response format.
2338
+ */
2339
+ interface OpenAIResponseInputMessageContentFile {
2340
+ file_data?: string | null;
2341
+ file_id?: string | null;
2342
+ file_url?: string | null;
2343
+ filename?: string | null;
2344
+ type?: 'input_file';
2345
+ }
2346
+ }
2347
+ /**
2348
+ * Configuration for reasoning effort in OpenAI responses.
2349
+ *
2350
+ * Controls how much reasoning the model performs before generating a response.
2351
+ */
2352
+ interface Reasoning {
2353
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
2354
+ }
2355
+ /**
2356
+ * Text response configuration for OpenAI responses.
2357
+ */
2358
+ interface Text {
2359
+ /**
2360
+ * Configuration for Responses API text format.
2361
+ */
2362
+ format?: Text.Format | null;
2363
+ }
2364
+ namespace Text {
2365
+ /**
2366
+ * Configuration for Responses API text format.
2367
+ */
2368
+ interface Format {
2369
+ description?: string | null;
2370
+ name?: string | null;
2371
+ schema?: {
2372
+ [key: string]: unknown;
2373
+ } | null;
2374
+ strict?: boolean | null;
2375
+ type?: 'text' | 'json_schema' | 'json_object';
2376
+ }
2377
+ }
2378
+ /**
2379
+ * Constrains the tools available to the model to a pre-defined set.
2380
+ */
2381
+ interface OpenAIResponseInputToolChoiceAllowedTools {
2382
+ tools: Array<{
2383
+ [key: string]: string;
2384
+ }>;
2385
+ mode?: 'auto' | 'required';
2386
+ type?: 'allowed_tools';
2387
+ }
2388
+ /**
2389
+ * Indicates that the model should use file search to generate a response.
2390
+ */
2391
+ interface OpenAIResponseInputToolChoiceFileSearch {
2392
+ type?: 'file_search';
2393
+ }
2394
+ /**
2395
+ * Indicates that the model should use web search to generate a response
2396
+ */
2397
+ interface OpenAIResponseInputToolChoiceWebSearch {
2398
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
2399
+ }
2400
+ /**
2401
+ * Forces the model to call a specific function.
2402
+ */
2403
+ interface OpenAIResponseInputToolChoiceFunctionTool {
2404
+ name: string;
2405
+ type?: 'function';
2406
+ }
2407
+ /**
2408
+ * Forces the model to call a specific tool on a remote MCP server
2409
+ */
2410
+ interface OpenAIResponseInputToolChoiceMcpTool {
2411
+ server_label: string;
2412
+ name?: string | null;
2413
+ type?: 'mcp';
2414
+ }
2415
+ /**
2416
+ * Forces the model to call a custom tool.
2417
+ */
2418
+ interface OpenAIResponseInputToolChoiceCustomTool {
2419
+ name: string;
2420
+ type?: 'custom';
2421
+ }
2422
+ /**
2423
+ * Web search tool configuration for OpenAI response inputs.
2424
+ */
2425
+ interface OpenAIResponseInputToolWebSearch {
2426
+ search_context_size?: string | null;
2427
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
2428
+ }
2429
+ /**
2430
+ * File search tool configuration for OpenAI response inputs.
2431
+ */
2432
+ interface OpenAIResponseInputToolFileSearch {
2433
+ vector_store_ids: Array<string>;
2434
+ filters?: {
2435
+ [key: string]: unknown;
2436
+ } | null;
2437
+ max_num_results?: number | null;
2438
+ /**
2439
+ * Options for ranking and filtering search results.
2440
+ *
2441
+ * This class configures how search results are ranked and filtered. You can use
2442
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
2443
+ * VectorStoresConfig are used when parameters are not provided.
2444
+ *
2445
+ * Examples: # Weighted ranker with custom alpha
2446
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
2447
+ *
2448
+ * # RRF ranker with custom impact factor
2449
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
2450
+ *
2451
+ * # Use config defaults (just specify ranker type)
2452
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
2453
+ *
2454
+ * # Score threshold filtering
2455
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
2456
+ */
2457
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
2458
+ type?: 'file_search';
2459
+ }
2460
+ namespace OpenAIResponseInputToolFileSearch {
2461
+ /**
2462
+ * Options for ranking and filtering search results.
2463
+ *
2464
+ * This class configures how search results are ranked and filtered. You can use
2465
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
2466
+ * VectorStoresConfig are used when parameters are not provided.
2467
+ *
2468
+ * Examples: # Weighted ranker with custom alpha
2469
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
2470
+ *
2471
+ * # RRF ranker with custom impact factor
2472
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
2473
+ *
2474
+ * # Use config defaults (just specify ranker type)
2475
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
2476
+ *
2477
+ * # Score threshold filtering
2478
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
2479
+ */
2480
+ interface RankingOptions {
2481
+ /**
2482
+ * Weight factor for weighted ranker
2483
+ */
2484
+ alpha?: number | null;
2485
+ /**
2486
+ * Impact factor for RRF algorithm
2487
+ */
2488
+ impact_factor?: number | null;
2489
+ /**
2490
+ * Model identifier for neural reranker
2491
+ */
2492
+ model?: string | null;
2493
+ ranker?: string | null;
2494
+ score_threshold?: number | null;
2495
+ /**
2496
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
2497
+ * 'keyword', 'neural'
2498
+ */
2499
+ weights?: {
2500
+ [key: string]: number;
2501
+ } | null;
2502
+ }
2503
+ }
2504
+ /**
2505
+ * Function tool configuration for OpenAI response inputs.
2506
+ */
2507
+ interface OpenAIResponseInputToolFunction {
2508
+ name: string;
2509
+ parameters: {
2510
+ [key: string]: unknown;
2511
+ } | null;
2512
+ description?: string | null;
2513
+ strict?: boolean | null;
2514
+ type?: 'function';
2515
+ }
2516
+ /**
2517
+ * Model Context Protocol (MCP) tool configuration for OpenAI response object.
2518
+ */
2519
+ interface OpenAIResponseToolMcp {
2520
+ server_label: string;
2521
+ /**
2522
+ * Filter configuration for restricting which MCP tools can be used.
2523
+ */
2524
+ allowed_tools?: Array<string> | OpenAIResponseToolMcp.AllowedToolsFilter | null;
2525
+ type?: 'mcp';
2526
+ }
2527
+ namespace OpenAIResponseToolMcp {
2528
+ /**
2529
+ * Filter configuration for restricting which MCP tools can be used.
2530
+ */
2531
+ interface AllowedToolsFilter {
2532
+ tool_names?: Array<string> | null;
2533
+ }
2534
+ }
2535
+ /**
2536
+ * Usage information for OpenAI response.
2537
+ */
2538
+ interface Usage {
2539
+ input_tokens: number;
2540
+ /**
2541
+ * Token details for input tokens in OpenAI response usage.
2542
+ */
2543
+ input_tokens_details: Usage.InputTokensDetails;
2544
+ output_tokens: number;
2545
+ /**
2546
+ * Token details for output tokens in OpenAI response usage.
2547
+ */
2548
+ output_tokens_details: Usage.OutputTokensDetails;
2549
+ total_tokens: number;
2550
+ }
2551
+ namespace Usage {
2552
+ /**
2553
+ * Token details for input tokens in OpenAI response usage.
2554
+ */
2555
+ interface InputTokensDetails {
2556
+ cached_tokens: number;
2557
+ }
2558
+ /**
2559
+ * Token details for output tokens in OpenAI response usage.
2560
+ */
2561
+ interface OutputTokensDetails {
2562
+ reasoning_tokens: number;
2563
+ }
2564
+ }
2565
+ }
2566
+ /**
2567
+ * Response object confirming deletion of an OpenAI response.
2568
+ */
2569
+ export interface ResponseDeleteResponse {
2570
+ id: string;
2571
+ deleted?: boolean;
2572
+ object?: 'response';
2573
+ }
2574
+ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
2575
+ export interface ResponseCreateParamsBase {
2576
+ /**
2577
+ * Input message(s) to create the response.
2578
+ */
2579
+ input: string | Array<ResponseCreateParams.OpenAIResponseMessageInput | ResponseCreateParams.OpenAIResponseOutputMessageWebSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFileSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFunctionToolCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpListTools | ResponseCreateParams.OpenAIResponseMcpApprovalRequest | ResponseCreateParams.OpenAIResponseInputFunctionToolCallOutput | ResponseCreateParams.OpenAIResponseMcpApprovalResponse>;
2580
+ /**
2581
+ * The underlying LLM used for completions.
2582
+ */
2583
+ model: string;
2584
+ /**
2585
+ * Optional ID of a conversation to add the response to.
2586
+ */
2587
+ conversation?: string | null;
2588
+ /**
2589
+ * List of guardrails to apply during response generation.
2590
+ */
2591
+ guardrails?: Array<string | ResponseCreateParams.ResponseGuardrailSpec> | null;
2592
+ /**
2593
+ * Additional fields to include in the response.
2594
+ */
2595
+ include?: Array<'web_search_call.action.sources' | 'code_interpreter_call.outputs' | 'computer_call_output.output.image_url' | 'file_search_call.results' | 'message.input_image.image_url' | 'message.output_text.logprobs' | 'reasoning.encrypted_content'> | null;
2596
+ /**
2597
+ * Instructions to guide the model's behavior.
2598
+ */
2599
+ instructions?: string | null;
2600
+ /**
2601
+ * Maximum number of inference iterations.
2602
+ */
2603
+ max_infer_iters?: number | null;
2604
+ /**
2605
+ * Upper bound for the number of tokens that can be generated for a response.
2606
+ */
2607
+ max_output_tokens?: number | null;
2608
+ /**
2609
+ * Max number of total calls to built-in tools that can be processed in a response.
2610
+ */
2611
+ max_tool_calls?: number | null;
2612
+ /**
2613
+ * Dictionary of metadata key-value pairs to attach to the response.
2614
+ */
2615
+ metadata?: {
2616
+ [key: string]: string;
2617
+ } | null;
2618
+ /**
2619
+ * Whether to enable parallel tool calls.
2620
+ */
2621
+ parallel_tool_calls?: boolean | null;
2622
+ /**
2623
+ * Optional ID of a previous response to continue from.
2624
+ */
2625
+ previous_response_id?: string | null;
2626
+ /**
2627
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
2628
+ */
2629
+ prompt?: ResponseCreateParams.Prompt | null;
2630
+ /**
2631
+ * Configuration for reasoning effort in OpenAI responses.
2632
+ *
2633
+ * Controls how much reasoning the model performs before generating a response.
2634
+ */
2635
+ reasoning?: ResponseCreateParams.Reasoning | null;
2636
+ /**
2637
+ * A stable identifier used for safety monitoring and abuse detection.
2638
+ */
2639
+ safety_identifier?: string | null;
2640
+ /**
2641
+ * Whether to store the response in the database.
2642
+ */
2643
+ store?: boolean | null;
2644
+ /**
2645
+ * Whether to stream the response.
2646
+ */
2647
+ stream?: boolean | null;
2648
+ /**
2649
+ * Sampling temperature.
2650
+ */
2651
+ temperature?: number | null;
2652
+ /**
2653
+ * Text response configuration for OpenAI responses.
2654
+ */
2655
+ text?: ResponseCreateParams.Text | null;
2656
+ /**
2657
+ * How the model should select which tool to call (if any).
2658
+ */
2659
+ tool_choice?: 'auto' | 'required' | 'none' | ResponseCreateParams.OpenAIResponseInputToolChoiceAllowedTools | ResponseCreateParams.OpenAIResponseInputToolChoiceFileSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceWebSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceFunctionTool | ResponseCreateParams.OpenAIResponseInputToolChoiceMcpTool | ResponseCreateParams.OpenAIResponseInputToolChoiceCustomTool | null;
2660
+ /**
2661
+ * List of tools available to the model.
2662
+ */
2663
+ tools?: Array<ResponseCreateParams.OpenAIResponseInputToolWebSearch | ResponseCreateParams.OpenAIResponseInputToolFileSearch | ResponseCreateParams.OpenAIResponseInputToolFunction | ResponseCreateParams.OpenAIResponseInputToolMcp> | null;
2664
+ }
2665
+ export declare namespace ResponseCreateParams {
2666
+ /**
2667
+ * Corresponds to the various Message types in the Responses API. They are all
2668
+ * under one type because the Responses API gives them all the same "type" value,
2669
+ * and there is no way to tell them apart in certain scenarios.
2670
+ */
2671
+ interface OpenAIResponseMessageInput {
2672
+ content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
2673
+ role: 'system' | 'developer' | 'user' | 'assistant';
2674
+ id?: string | null;
2675
+ status?: string | null;
2676
+ type?: 'message';
2677
+ }
2678
+ namespace OpenAIResponseMessageInput {
2679
+ /**
2680
+ * Text content for input messages in OpenAI response format.
2681
+ */
2682
+ interface OpenAIResponseInputMessageContentText {
2683
+ text: string;
2684
+ type?: 'input_text';
2685
+ }
2686
+ /**
2687
+ * Image content for input messages in OpenAI response format.
2688
+ */
2689
+ interface OpenAIResponseInputMessageContentImage {
2690
+ detail?: 'low' | 'high' | 'auto';
2691
+ file_id?: string | null;
2692
+ image_url?: string | null;
2693
+ type?: 'input_image';
2694
+ }
2695
+ /**
2696
+ * File content for input messages in OpenAI response format.
2697
+ */
2698
+ interface OpenAIResponseInputMessageContentFile {
2699
+ file_data?: string | null;
2700
+ file_id?: string | null;
2701
+ file_url?: string | null;
2702
+ filename?: string | null;
2703
+ type?: 'input_file';
2704
+ }
2705
+ interface OpenAIResponseOutputMessageContentOutputTextInput {
2706
+ text: string;
2707
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
2708
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
2709
+ type?: 'output_text';
2710
+ }
2711
+ namespace OpenAIResponseOutputMessageContentOutputTextInput {
2712
+ /**
2713
+ * File citation annotation for referencing specific files in response content.
2714
+ */
2715
+ interface OpenAIResponseAnnotationFileCitation {
2716
+ file_id: string;
2717
+ filename: string;
2718
+ index: number;
2719
+ type?: 'file_citation';
2720
+ }
2721
+ /**
2722
+ * URL citation annotation for referencing external web resources.
2723
+ */
2724
+ interface OpenAIResponseAnnotationCitation {
2725
+ end_index: number;
2726
+ start_index: number;
2727
+ title: string;
2728
+ url: string;
2729
+ type?: 'url_citation';
2730
+ }
2731
+ interface OpenAIResponseAnnotationContainerFileCitation {
2732
+ container_id: string;
2733
+ end_index: number;
2734
+ file_id: string;
2735
+ filename: string;
2736
+ start_index: number;
2737
+ type?: 'container_file_citation';
2738
+ }
2739
+ interface OpenAIResponseAnnotationFilePath {
2740
+ file_id: string;
2741
+ index: number;
2742
+ type?: 'file_path';
2743
+ }
2744
+ /**
2745
+ * The log probability for a token from an OpenAI-compatible chat completion
2746
+ * response.
2747
+ */
2748
+ interface Logprob {
2749
+ /**
2750
+ * The token.
2751
+ */
2752
+ token: string;
2753
+ /**
2754
+ * The log probability of the token.
2755
+ */
2756
+ logprob: number;
2757
+ /**
2758
+ * The bytes for the token.
2759
+ */
2760
+ bytes?: Array<number> | null;
2761
+ /**
2762
+ * The top log probabilities for the token.
2763
+ */
2764
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
2765
+ }
2766
+ namespace Logprob {
2767
+ /**
2768
+ * The top log probability for a token from an OpenAI-compatible chat completion
2769
+ * response.
2770
+ */
2771
+ interface TopLogprob {
2772
+ /**
2773
+ * The token.
2774
+ */
2775
+ token: string;
2776
+ /**
2777
+ * The log probability of the token.
2778
+ */
2779
+ logprob: number;
2780
+ /**
2781
+ * The bytes for the token.
2782
+ */
2783
+ bytes?: Array<number> | null;
2784
+ }
2785
+ }
2786
+ }
2787
+ /**
2788
+ * Refusal content within a streamed response part.
2789
+ */
2790
+ interface OpenAIResponseContentPartRefusal {
2791
+ refusal: string;
2792
+ type?: 'refusal';
2793
+ }
2794
+ }
2795
+ /**
2796
+ * Web search tool call output message for OpenAI responses.
2797
+ */
2798
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
2799
+ id: string;
2800
+ status: string;
2801
+ type?: 'web_search_call';
2802
+ }
2803
+ /**
2804
+ * File search tool call output message for OpenAI responses.
2805
+ */
2806
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
2807
+ id: string;
2808
+ queries: Array<string>;
2809
+ status: string;
2810
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
2811
+ type?: 'file_search_call';
2812
+ }
2813
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
2814
+ /**
2815
+ * Search results returned by the file search operation.
2816
+ */
2817
+ interface Result {
2818
+ attributes: {
2819
+ [key: string]: unknown;
2820
+ };
2821
+ file_id: string;
2822
+ filename: string;
2823
+ score: number;
2824
+ text: string;
2825
+ }
2826
+ }
2827
+ /**
2828
+ * Function tool call output message for OpenAI responses.
2829
+ */
2830
+ interface OpenAIResponseOutputMessageFunctionToolCall {
2831
+ arguments: string;
2832
+ call_id: string;
2833
+ name: string;
2834
+ id?: string | null;
2835
+ status?: string | null;
2836
+ type?: 'function_call';
2837
+ }
2838
+ /**
2839
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
2840
+ */
2841
+ interface OpenAIResponseOutputMessageMcpCall {
2842
+ id: string;
2843
+ arguments: string;
2844
+ name: string;
2845
+ server_label: string;
2846
+ error?: string | null;
2847
+ output?: string | null;
2848
+ type?: 'mcp_call';
2849
+ }
2850
+ /**
2851
+ * MCP list tools output message containing available tools from an MCP server.
2852
+ */
2853
+ interface OpenAIResponseOutputMessageMcpListTools {
2854
+ id: string;
2855
+ server_label: string;
2856
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
2857
+ type?: 'mcp_list_tools';
2858
+ }
2859
+ namespace OpenAIResponseOutputMessageMcpListTools {
2860
+ /**
2861
+ * Tool definition returned by MCP list tools operation.
2862
+ */
2863
+ interface Tool {
2864
+ input_schema: {
2865
+ [key: string]: unknown;
2866
+ };
2867
+ name: string;
2868
+ description?: string | null;
2869
+ }
2870
+ }
2871
+ /**
2872
+ * A request for human approval of a tool invocation.
2873
+ */
2874
+ interface OpenAIResponseMcpApprovalRequest {
2875
+ id: string;
2876
+ arguments: string;
2877
+ name: string;
2878
+ server_label: string;
2879
+ type?: 'mcp_approval_request';
2880
+ }
2881
+ /**
2882
+ * This represents the output of a function call that gets passed back to the
2883
+ * model.
2884
+ */
2885
+ interface OpenAIResponseInputFunctionToolCallOutput {
2886
+ call_id: string;
2887
+ output: string;
2888
+ id?: string | null;
2889
+ status?: string | null;
2890
+ type?: 'function_call_output';
2891
+ }
2892
+ /**
2893
+ * A response to an MCP approval request.
2894
+ */
2895
+ interface OpenAIResponseMcpApprovalResponse {
2896
+ approval_request_id: string;
2897
+ approve: boolean;
2898
+ id?: string | null;
2899
+ reason?: string | null;
2900
+ type?: 'mcp_approval_response';
2901
+ }
2902
+ /**
2903
+ * Specification for a guardrail to apply during response generation.
2904
+ */
2905
+ interface ResponseGuardrailSpec {
2906
+ type: string;
2907
+ }
2908
+ /**
2909
+ * OpenAI compatible Prompt object that is used in OpenAI responses.
2910
+ */
2911
+ interface Prompt {
2912
+ id: string;
2913
+ variables?: {
2914
+ [key: string]: Prompt.OpenAIResponseInputMessageContentText | Prompt.OpenAIResponseInputMessageContentImage | Prompt.OpenAIResponseInputMessageContentFile;
2915
+ } | null;
2916
+ version?: string | null;
2917
+ }
2918
+ namespace Prompt {
2919
+ /**
2920
+ * Text content for input messages in OpenAI response format.
2921
+ */
2922
+ interface OpenAIResponseInputMessageContentText {
2923
+ text: string;
2924
+ type?: 'input_text';
2925
+ }
2926
+ /**
2927
+ * Image content for input messages in OpenAI response format.
2928
+ */
2929
+ interface OpenAIResponseInputMessageContentImage {
2930
+ detail?: 'low' | 'high' | 'auto';
2931
+ file_id?: string | null;
2932
+ image_url?: string | null;
2933
+ type?: 'input_image';
2934
+ }
2935
+ /**
2936
+ * File content for input messages in OpenAI response format.
2937
+ */
2938
+ interface OpenAIResponseInputMessageContentFile {
2939
+ file_data?: string | null;
2940
+ file_id?: string | null;
2941
+ file_url?: string | null;
2942
+ filename?: string | null;
2943
+ type?: 'input_file';
2944
+ }
2945
+ }
2946
+ /**
2947
+ * Configuration for reasoning effort in OpenAI responses.
2948
+ *
2949
+ * Controls how much reasoning the model performs before generating a response.
2950
+ */
2951
+ interface Reasoning {
2952
+ effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
2953
+ }
2954
+ /**
2955
+ * Text response configuration for OpenAI responses.
2956
+ */
2957
+ interface Text {
2958
+ /**
2959
+ * Configuration for Responses API text format.
2960
+ */
2961
+ format?: Text.Format | null;
2962
+ }
2963
+ namespace Text {
2964
+ /**
2965
+ * Configuration for Responses API text format.
2966
+ */
2967
+ interface Format {
2968
+ description?: string | null;
2969
+ name?: string | null;
2970
+ schema?: {
2971
+ [key: string]: unknown;
2972
+ } | null;
2973
+ strict?: boolean | null;
2974
+ type?: 'text' | 'json_schema' | 'json_object';
2975
+ }
2976
+ }
2977
+ /**
2978
+ * Constrains the tools available to the model to a pre-defined set.
2979
+ */
2980
+ interface OpenAIResponseInputToolChoiceAllowedTools {
2981
+ tools: Array<{
2982
+ [key: string]: string;
2983
+ }>;
2984
+ mode?: 'auto' | 'required';
2985
+ type?: 'allowed_tools';
2986
+ }
2987
+ /**
2988
+ * Indicates that the model should use file search to generate a response.
2989
+ */
2990
+ interface OpenAIResponseInputToolChoiceFileSearch {
2991
+ type?: 'file_search';
2992
+ }
2993
+ /**
2994
+ * Indicates that the model should use web search to generate a response
2995
+ */
2996
+ interface OpenAIResponseInputToolChoiceWebSearch {
2997
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
2998
+ }
2999
+ /**
3000
+ * Forces the model to call a specific function.
3001
+ */
3002
+ interface OpenAIResponseInputToolChoiceFunctionTool {
3003
+ name: string;
3004
+ type?: 'function';
3005
+ }
3006
+ /**
3007
+ * Forces the model to call a specific tool on a remote MCP server
3008
+ */
3009
+ interface OpenAIResponseInputToolChoiceMcpTool {
3010
+ server_label: string;
3011
+ name?: string | null;
3012
+ type?: 'mcp';
3013
+ }
3014
+ /**
3015
+ * Forces the model to call a custom tool.
3016
+ */
3017
+ interface OpenAIResponseInputToolChoiceCustomTool {
3018
+ name: string;
3019
+ type?: 'custom';
3020
+ }
3021
+ /**
3022
+ * Web search tool configuration for OpenAI response inputs.
3023
+ */
3024
+ interface OpenAIResponseInputToolWebSearch {
3025
+ search_context_size?: string | null;
3026
+ type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
3027
+ }
3028
+ /**
3029
+ * File search tool configuration for OpenAI response inputs.
3030
+ */
3031
+ interface OpenAIResponseInputToolFileSearch {
3032
+ vector_store_ids: Array<string>;
3033
+ filters?: {
3034
+ [key: string]: unknown;
3035
+ } | null;
3036
+ max_num_results?: number | null;
3037
+ /**
3038
+ * Options for ranking and filtering search results.
3039
+ *
3040
+ * This class configures how search results are ranked and filtered. You can use
3041
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
3042
+ * VectorStoresConfig are used when parameters are not provided.
3043
+ *
3044
+ * Examples: # Weighted ranker with custom alpha
3045
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
3046
+ *
3047
+ * # RRF ranker with custom impact factor
3048
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
3049
+ *
3050
+ * # Use config defaults (just specify ranker type)
3051
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
3052
+ *
3053
+ * # Score threshold filtering
3054
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
3055
+ */
3056
+ ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
3057
+ type?: 'file_search';
3058
+ }
3059
+ namespace OpenAIResponseInputToolFileSearch {
3060
+ /**
3061
+ * Options for ranking and filtering search results.
3062
+ *
3063
+ * This class configures how search results are ranked and filtered. You can use
3064
+ * algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
3065
+ * VectorStoresConfig are used when parameters are not provided.
3066
+ *
3067
+ * Examples: # Weighted ranker with custom alpha
3068
+ * SearchRankingOptions(ranker="weighted", alpha=0.7)
3069
+ *
3070
+ * # RRF ranker with custom impact factor
3071
+ * SearchRankingOptions(ranker="rrf", impact_factor=50.0)
3072
+ *
3073
+ * # Use config defaults (just specify ranker type)
3074
+ * SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
3075
+ *
3076
+ * # Score threshold filtering
3077
+ * SearchRankingOptions(ranker="weighted", score_threshold=0.5)
3078
+ */
3079
+ interface RankingOptions {
3080
+ /**
3081
+ * Weight factor for weighted ranker
3082
+ */
3083
+ alpha?: number | null;
3084
+ /**
3085
+ * Impact factor for RRF algorithm
3086
+ */
3087
+ impact_factor?: number | null;
3088
+ /**
3089
+ * Model identifier for neural reranker
3090
+ */
3091
+ model?: string | null;
3092
+ ranker?: string | null;
3093
+ score_threshold?: number | null;
3094
+ /**
3095
+ * Weights for combining vector, keyword, and neural scores. Keys: 'vector',
3096
+ * 'keyword', 'neural'
3097
+ */
3098
+ weights?: {
3099
+ [key: string]: number;
3100
+ } | null;
3101
+ }
3102
+ }
3103
+ /**
3104
+ * Function tool configuration for OpenAI response inputs.
3105
+ */
3106
+ interface OpenAIResponseInputToolFunction {
3107
+ name: string;
3108
+ parameters: {
3109
+ [key: string]: unknown;
3110
+ } | null;
3111
+ description?: string | null;
3112
+ strict?: boolean | null;
3113
+ type?: 'function';
3114
+ }
3115
+ /**
3116
+ * Model Context Protocol (MCP) tool configuration for OpenAI response inputs.
3117
+ */
3118
+ interface OpenAIResponseInputToolMcp {
3119
+ server_label: string;
3120
+ /**
3121
+ * Filter configuration for restricting which MCP tools can be used.
3122
+ */
3123
+ allowed_tools?: Array<string> | OpenAIResponseInputToolMcp.AllowedToolsFilter | null;
3124
+ authorization?: string | null;
3125
+ connector_id?: string | null;
3126
+ headers?: {
3127
+ [key: string]: unknown;
3128
+ } | null;
3129
+ /**
3130
+ * Filter configuration for MCP tool approval requirements.
3131
+ */
3132
+ require_approval?: 'always' | 'never' | OpenAIResponseInputToolMcp.ApprovalFilter;
3133
+ server_url?: string | null;
3134
+ type?: 'mcp';
3135
+ }
3136
+ namespace OpenAIResponseInputToolMcp {
3137
+ /**
3138
+ * Filter configuration for restricting which MCP tools can be used.
3139
+ */
3140
+ interface AllowedToolsFilter {
3141
+ tool_names?: Array<string> | null;
3142
+ }
3143
+ /**
3144
+ * Filter configuration for MCP tool approval requirements.
3145
+ */
3146
+ interface ApprovalFilter {
3147
+ always?: Array<string> | null;
3148
+ never?: Array<string> | null;
3149
+ }
3150
+ }
3151
+ type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
3152
+ type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
3153
+ }
3154
+ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBase {
3155
+ /**
3156
+ * Whether to stream the response.
3157
+ */
3158
+ stream?: false | null;
3159
+ }
3160
+ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase {
3161
+ /**
3162
+ * Whether to stream the response.
3163
+ */
3164
+ stream: true;
3165
+ }
3166
+ export interface ResponseListParams extends OpenAICursorPageParams {
3167
+ /**
3168
+ * The model to filter responses by.
3169
+ */
3170
+ model?: string | null;
3171
+ /**
3172
+ * Sort order for paginated responses.
3173
+ */
3174
+ order?: 'asc' | 'desc' | null;
3175
+ }
3176
+ export declare namespace Responses {
3177
+ export { type ResponseObject as ResponseObject, type ResponseObjectStream as ResponseObjectStream, type ResponseListResponse as ResponseListResponse, type ResponseDeleteResponse as ResponseDeleteResponse, ResponseListResponsesOpenAICursorPage as ResponseListResponsesOpenAICursorPage, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseListParams as ResponseListParams, };
3178
+ export { InputItems as InputItems, type InputItemListResponse as InputItemListResponse, type InputItemListParams as InputItemListParams, };
3179
+ }
3180
+ //# sourceMappingURL=responses.d.ts.map