llama-stack-client 0.4.3-rc3 → 0.4.4

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