ogx-client 0.7.2-rc1

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 (552) hide show
  1. package/CHANGELOG.md +512 -0
  2. package/LICENSE +7 -0
  3. package/README.md +391 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +21 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +17 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +26 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +7 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +26 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +7 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +26 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +7 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +26 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +7 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +107 -0
  36. package/_shims/auto/types.js +9 -0
  37. package/_shims/auto/types.mjs +10 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +19 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +15 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +89 -0
  45. package/_shims/index.js +23 -0
  46. package/_shims/index.mjs +18 -0
  47. package/_shims/manual-types.d.ts +18 -0
  48. package/_shims/manual-types.js +9 -0
  49. package/_shims/manual-types.mjs +10 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +94 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +61 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +48 -0
  57. package/_shims/node-types.js +9 -0
  58. package/_shims/node-types.mjs +10 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +46 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +42 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +83 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +76 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +89 -0
  72. package/_shims/web-types.js +9 -0
  73. package/_shims/web-types.mjs +10 -0
  74. package/core.d.ts +257 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +936 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +904 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +119 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +101 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +233 -0
  87. package/index.d.ts +233 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +254 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +210 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/decoders/line.d.ts +21 -0
  94. package/internal/decoders/line.d.ts.map +1 -0
  95. package/internal/decoders/line.js +155 -0
  96. package/internal/decoders/line.js.map +1 -0
  97. package/internal/decoders/line.mjs +150 -0
  98. package/internal/decoders/line.mjs.map +1 -0
  99. package/internal/qs/formats.d.ts +6 -0
  100. package/internal/qs/formats.d.ts.map +1 -0
  101. package/internal/qs/formats.js +16 -0
  102. package/internal/qs/formats.js.map +1 -0
  103. package/internal/qs/formats.mjs +13 -0
  104. package/internal/qs/formats.mjs.map +1 -0
  105. package/internal/qs/index.d.ts +10 -0
  106. package/internal/qs/index.d.ts.map +1 -0
  107. package/internal/qs/index.js +19 -0
  108. package/internal/qs/index.js.map +1 -0
  109. package/internal/qs/index.mjs +15 -0
  110. package/internal/qs/index.mjs.map +1 -0
  111. package/internal/qs/stringify.d.ts +3 -0
  112. package/internal/qs/stringify.d.ts.map +1 -0
  113. package/internal/qs/stringify.js +285 -0
  114. package/internal/qs/stringify.js.map +1 -0
  115. package/internal/qs/stringify.mjs +281 -0
  116. package/internal/qs/stringify.mjs.map +1 -0
  117. package/internal/qs/types.d.ts +57 -0
  118. package/internal/qs/types.d.ts.map +1 -0
  119. package/internal/qs/types.js +8 -0
  120. package/internal/qs/types.js.map +1 -0
  121. package/internal/qs/types.mjs +7 -0
  122. package/internal/qs/types.mjs.map +1 -0
  123. package/internal/qs/utils.d.ts +14 -0
  124. package/internal/qs/utils.d.ts.map +1 -0
  125. package/internal/qs/utils.js +234 -0
  126. package/internal/qs/utils.js.map +1 -0
  127. package/internal/qs/utils.mjs +222 -0
  128. package/internal/qs/utils.mjs.map +1 -0
  129. package/internal/stream-utils.d.ts +8 -0
  130. package/internal/stream-utils.d.ts.map +1 -0
  131. package/internal/stream-utils.js +44 -0
  132. package/internal/stream-utils.js.map +1 -0
  133. package/internal/stream-utils.mjs +40 -0
  134. package/internal/stream-utils.mjs.map +1 -0
  135. package/internal/utils/query.d.ts +2 -0
  136. package/internal/utils/query.d.ts.map +1 -0
  137. package/internal/utils/query.js +39 -0
  138. package/internal/utils/query.js.map +1 -0
  139. package/internal/utils/query.mjs +12 -0
  140. package/internal/utils/query.mjs.map +1 -0
  141. package/lib/response-helpers.d.ts +23 -0
  142. package/lib/response-helpers.d.ts.map +1 -0
  143. package/lib/response-helpers.js +53 -0
  144. package/lib/response-helpers.js.map +1 -0
  145. package/lib/response-helpers.mjs +49 -0
  146. package/lib/response-helpers.mjs.map +1 -0
  147. package/ogx-client-0.7.2-rc1.tgz +0 -0
  148. package/package.json +108 -0
  149. package/pagination.d.ts +21 -0
  150. package/pagination.d.ts.map +1 -0
  151. package/pagination.js +53 -0
  152. package/pagination.js.map +1 -0
  153. package/pagination.mjs +47 -0
  154. package/pagination.mjs.map +1 -0
  155. package/resource.d.ts +6 -0
  156. package/resource.d.ts.map +1 -0
  157. package/resource.js +15 -0
  158. package/resource.js.map +1 -0
  159. package/resource.mjs +11 -0
  160. package/resource.mjs.map +1 -0
  161. package/resources/alpha/admin.d.ts +44 -0
  162. package/resources/alpha/admin.d.ts.map +1 -0
  163. package/resources/alpha/admin.js +49 -0
  164. package/resources/alpha/admin.js.map +1 -0
  165. package/resources/alpha/admin.mjs +45 -0
  166. package/resources/alpha/admin.mjs.map +1 -0
  167. package/resources/alpha/alpha.d.ts +14 -0
  168. package/resources/alpha/alpha.d.ts.map +1 -0
  169. package/resources/alpha/alpha.js +49 -0
  170. package/resources/alpha/alpha.js.map +1 -0
  171. package/resources/alpha/alpha.mjs +22 -0
  172. package/resources/alpha/alpha.mjs.map +1 -0
  173. package/resources/alpha/benchmarks.d.ts +104 -0
  174. package/resources/alpha/benchmarks.d.ts.map +1 -0
  175. package/resources/alpha/benchmarks.js +50 -0
  176. package/resources/alpha/benchmarks.js.map +1 -0
  177. package/resources/alpha/benchmarks.mjs +44 -0
  178. package/resources/alpha/benchmarks.mjs.map +1 -0
  179. package/resources/alpha/index.d.ts +4 -0
  180. package/resources/alpha/index.d.ts.map +1 -0
  181. package/resources/alpha/index.js +17 -0
  182. package/resources/alpha/index.js.map +1 -0
  183. package/resources/alpha/index.mjs +11 -0
  184. package/resources/alpha/index.mjs.map +1 -0
  185. package/resources/alpha/inference.d.ts +144 -0
  186. package/resources/alpha/inference.d.ts.map +1 -0
  187. package/resources/alpha/inference.js +29 -0
  188. package/resources/alpha/inference.js.map +1 -0
  189. package/resources/alpha/inference.mjs +25 -0
  190. package/resources/alpha/inference.mjs.map +1 -0
  191. package/resources/alpha.d.ts +2 -0
  192. package/resources/alpha.d.ts.map +1 -0
  193. package/resources/alpha.js +25 -0
  194. package/resources/alpha.js.map +1 -0
  195. package/resources/alpha.mjs +9 -0
  196. package/resources/alpha.mjs.map +1 -0
  197. package/resources/batches.d.ts +442 -0
  198. package/resources/batches.d.ts.map +1 -0
  199. package/resources/batches.js +53 -0
  200. package/resources/batches.js.map +1 -0
  201. package/resources/batches.mjs +48 -0
  202. package/resources/batches.mjs.map +1 -0
  203. package/resources/chat/chat.d.ts +276 -0
  204. package/resources/chat/chat.d.ts.map +1 -0
  205. package/resources/chat/chat.js +45 -0
  206. package/resources/chat/chat.js.map +1 -0
  207. package/resources/chat/chat.mjs +18 -0
  208. package/resources/chat/chat.mjs.map +1 -0
  209. package/resources/chat/completions.d.ts +2021 -0
  210. package/resources/chat/completions.d.ts.map +1 -0
  211. package/resources/chat/completions.js +39 -0
  212. package/resources/chat/completions.js.map +1 -0
  213. package/resources/chat/completions.mjs +35 -0
  214. package/resources/chat/completions.mjs.map +1 -0
  215. package/resources/chat/index.d.ts +3 -0
  216. package/resources/chat/index.d.ts.map +1 -0
  217. package/resources/chat/index.js +15 -0
  218. package/resources/chat/index.js.map +1 -0
  219. package/resources/chat/index.mjs +10 -0
  220. package/resources/chat/index.mjs.map +1 -0
  221. package/resources/chat.d.ts +2 -0
  222. package/resources/chat.d.ts.map +1 -0
  223. package/resources/chat.js +25 -0
  224. package/resources/chat.js.map +1 -0
  225. package/resources/chat.mjs +9 -0
  226. package/resources/chat.mjs.map +1 -0
  227. package/resources/completions.d.ts +273 -0
  228. package/resources/completions.d.ts.map +1 -0
  229. package/resources/completions.js +26 -0
  230. package/resources/completions.js.map +1 -0
  231. package/resources/completions.mjs +22 -0
  232. package/resources/completions.mjs.map +1 -0
  233. package/resources/conversations/conversations.d.ts +429 -0
  234. package/resources/conversations/conversations.d.ts.map +1 -0
  235. package/resources/conversations/conversations.js +73 -0
  236. package/resources/conversations/conversations.js.map +1 -0
  237. package/resources/conversations/conversations.mjs +46 -0
  238. package/resources/conversations/conversations.mjs.map +1 -0
  239. package/resources/conversations/index.d.ts +3 -0
  240. package/resources/conversations/index.d.ts.map +1 -0
  241. package/resources/conversations/index.js +16 -0
  242. package/resources/conversations/index.js.map +1 -0
  243. package/resources/conversations/index.mjs +10 -0
  244. package/resources/conversations/index.mjs.map +1 -0
  245. package/resources/conversations/items.d.ts +1408 -0
  246. package/resources/conversations/items.d.ts.map +1 -0
  247. package/resources/conversations/items.js +48 -0
  248. package/resources/conversations/items.js.map +1 -0
  249. package/resources/conversations/items.mjs +43 -0
  250. package/resources/conversations/items.mjs.map +1 -0
  251. package/resources/conversations.d.ts +2 -0
  252. package/resources/conversations.d.ts.map +1 -0
  253. package/resources/conversations.js +25 -0
  254. package/resources/conversations.js.map +1 -0
  255. package/resources/conversations.mjs +9 -0
  256. package/resources/conversations.mjs.map +1 -0
  257. package/resources/embeddings.d.ts +98 -0
  258. package/resources/embeddings.d.ts.map +1 -0
  259. package/resources/embeddings.js +30 -0
  260. package/resources/embeddings.js.map +1 -0
  261. package/resources/embeddings.mjs +26 -0
  262. package/resources/embeddings.mjs.map +1 -0
  263. package/resources/files.d.ts +159 -0
  264. package/resources/files.d.ts.map +1 -0
  265. package/resources/files.js +78 -0
  266. package/resources/files.js.map +1 -0
  267. package/resources/files.mjs +50 -0
  268. package/resources/files.mjs.map +1 -0
  269. package/resources/index.d.ts +20 -0
  270. package/resources/index.d.ts.map +1 -0
  271. package/resources/index.js +66 -0
  272. package/resources/index.js.map +1 -0
  273. package/resources/index.mjs +27 -0
  274. package/resources/index.mjs.map +1 -0
  275. package/resources/inspect.d.ts +17 -0
  276. package/resources/inspect.d.ts.map +1 -0
  277. package/resources/inspect.js +30 -0
  278. package/resources/inspect.js.map +1 -0
  279. package/resources/inspect.mjs +26 -0
  280. package/resources/inspect.mjs.map +1 -0
  281. package/resources/models/index.d.ts +3 -0
  282. package/resources/models/index.d.ts.map +1 -0
  283. package/resources/models/index.js +15 -0
  284. package/resources/models/index.js.map +1 -0
  285. package/resources/models/index.mjs +10 -0
  286. package/resources/models/index.mjs.map +1 -0
  287. package/resources/models/models.d.ts +97 -0
  288. package/resources/models/models.d.ts.map +1 -0
  289. package/resources/models/models.js +57 -0
  290. package/resources/models/models.js.map +1 -0
  291. package/resources/models/models.mjs +30 -0
  292. package/resources/models/models.mjs.map +1 -0
  293. package/resources/models/openai.d.ts +10 -0
  294. package/resources/models/openai.d.ts.map +1 -0
  295. package/resources/models/openai.js +21 -0
  296. package/resources/models/openai.js.map +1 -0
  297. package/resources/models/openai.mjs +17 -0
  298. package/resources/models/openai.mjs.map +1 -0
  299. package/resources/models.d.ts +2 -0
  300. package/resources/models.d.ts.map +1 -0
  301. package/resources/models.js +25 -0
  302. package/resources/models.js.map +1 -0
  303. package/resources/models.mjs +9 -0
  304. package/resources/models.mjs.map +1 -0
  305. package/resources/moderations.d.ts +83 -0
  306. package/resources/moderations.d.ts.map +1 -0
  307. package/resources/moderations.js +24 -0
  308. package/resources/moderations.js.map +1 -0
  309. package/resources/moderations.mjs +20 -0
  310. package/resources/moderations.mjs.map +1 -0
  311. package/resources/prompts/index.d.ts +3 -0
  312. package/resources/prompts/index.d.ts.map +1 -0
  313. package/resources/prompts/index.js +15 -0
  314. package/resources/prompts/index.js.map +1 -0
  315. package/resources/prompts/index.mjs +10 -0
  316. package/resources/prompts/index.mjs.map +1 -0
  317. package/resources/prompts/prompts.d.ts +113 -0
  318. package/resources/prompts/prompts.d.ts.map +1 -0
  319. package/resources/prompts/prompts.js +88 -0
  320. package/resources/prompts/prompts.js.map +1 -0
  321. package/resources/prompts/prompts.mjs +61 -0
  322. package/resources/prompts/prompts.mjs.map +1 -0
  323. package/resources/prompts/versions.d.ts +13 -0
  324. package/resources/prompts/versions.d.ts.map +1 -0
  325. package/resources/prompts/versions.js +24 -0
  326. package/resources/prompts/versions.js.map +1 -0
  327. package/resources/prompts/versions.mjs +20 -0
  328. package/resources/prompts/versions.mjs.map +1 -0
  329. package/resources/prompts.d.ts +2 -0
  330. package/resources/prompts.d.ts.map +1 -0
  331. package/resources/prompts.js +25 -0
  332. package/resources/prompts.js.map +1 -0
  333. package/resources/prompts.mjs +9 -0
  334. package/resources/prompts.mjs.map +1 -0
  335. package/resources/providers.d.ts +24 -0
  336. package/resources/providers.d.ts.map +1 -0
  337. package/resources/providers.js +30 -0
  338. package/resources/providers.js.map +1 -0
  339. package/resources/providers.mjs +26 -0
  340. package/resources/providers.mjs.map +1 -0
  341. package/resources/responses/index.d.ts +3 -0
  342. package/resources/responses/index.d.ts.map +1 -0
  343. package/resources/responses/index.js +16 -0
  344. package/resources/responses/index.js.map +1 -0
  345. package/resources/responses/index.mjs +10 -0
  346. package/resources/responses/index.mjs.map +1 -0
  347. package/resources/responses/input-items.d.ts +382 -0
  348. package/resources/responses/input-items.d.ts.map +1 -0
  349. package/resources/responses/input-items.js +25 -0
  350. package/resources/responses/input-items.js.map +1 -0
  351. package/resources/responses/input-items.mjs +21 -0
  352. package/resources/responses/input-items.mjs.map +1 -0
  353. package/resources/responses/responses.d.ts +4808 -0
  354. package/resources/responses/responses.d.ts.map +1 -0
  355. package/resources/responses/responses.js +85 -0
  356. package/resources/responses/responses.js.map +1 -0
  357. package/resources/responses/responses.mjs +57 -0
  358. package/resources/responses/responses.mjs.map +1 -0
  359. package/resources/responses.d.ts +2 -0
  360. package/resources/responses.d.ts.map +1 -0
  361. package/resources/responses.js +25 -0
  362. package/resources/responses.js.map +1 -0
  363. package/resources/responses.mjs +9 -0
  364. package/resources/responses.mjs.map +1 -0
  365. package/resources/routes.d.ts +30 -0
  366. package/resources/routes.d.ts.map +1 -0
  367. package/resources/routes.js +25 -0
  368. package/resources/routes.js.map +1 -0
  369. package/resources/routes.mjs +21 -0
  370. package/resources/routes.mjs.map +1 -0
  371. package/resources/safety.d.ts +297 -0
  372. package/resources/safety.d.ts.map +1 -0
  373. package/resources/safety.js +24 -0
  374. package/resources/safety.js.map +1 -0
  375. package/resources/safety.mjs +20 -0
  376. package/resources/safety.mjs.map +1 -0
  377. package/resources/shared.d.ts +447 -0
  378. package/resources/shared.d.ts.map +1 -0
  379. package/resources/shared.js +10 -0
  380. package/resources/shared.js.map +1 -0
  381. package/resources/shared.mjs +9 -0
  382. package/resources/shared.mjs.map +1 -0
  383. package/resources/shields.d.ts +82 -0
  384. package/resources/shields.d.ts.map +1 -0
  385. package/resources/shields.js +46 -0
  386. package/resources/shields.js.map +1 -0
  387. package/resources/shields.mjs +42 -0
  388. package/resources/shields.mjs.map +1 -0
  389. package/resources/vector-io.d.ts +375 -0
  390. package/resources/vector-io.d.ts.map +1 -0
  391. package/resources/vector-io.js +31 -0
  392. package/resources/vector-io.js.map +1 -0
  393. package/resources/vector-io.mjs +27 -0
  394. package/resources/vector-io.mjs.map +1 -0
  395. package/resources/vector-stores/file-batches.d.ts +268 -0
  396. package/resources/vector-stores/file-batches.d.ts.map +1 -0
  397. package/resources/vector-stores/file-batches.js +42 -0
  398. package/resources/vector-stores/file-batches.js.map +1 -0
  399. package/resources/vector-stores/file-batches.mjs +38 -0
  400. package/resources/vector-stores/file-batches.mjs.map +1 -0
  401. package/resources/vector-stores/files.d.ts +335 -0
  402. package/resources/vector-stores/files.d.ts.map +1 -0
  403. package/resources/vector-stores/files.js +60 -0
  404. package/resources/vector-stores/files.js.map +1 -0
  405. package/resources/vector-stores/files.mjs +55 -0
  406. package/resources/vector-stores/files.mjs.map +1 -0
  407. package/resources/vector-stores/index.d.ts +4 -0
  408. package/resources/vector-stores/index.d.ts.map +1 -0
  409. package/resources/vector-stores/index.js +19 -0
  410. package/resources/vector-stores/index.js.map +1 -0
  411. package/resources/vector-stores/index.mjs +11 -0
  412. package/resources/vector-stores/index.mjs.map +1 -0
  413. package/resources/vector-stores/vector-stores.d.ts +412 -0
  414. package/resources/vector-stores/vector-stores.d.ts.map +1 -0
  415. package/resources/vector-stores/vector-stores.js +92 -0
  416. package/resources/vector-stores/vector-stores.js.map +1 -0
  417. package/resources/vector-stores/vector-stores.mjs +64 -0
  418. package/resources/vector-stores/vector-stores.mjs.map +1 -0
  419. package/resources/vector-stores.d.ts +2 -0
  420. package/resources/vector-stores.d.ts.map +1 -0
  421. package/resources/vector-stores.js +25 -0
  422. package/resources/vector-stores.js.map +1 -0
  423. package/resources/vector-stores.mjs +9 -0
  424. package/resources/vector-stores.mjs.map +1 -0
  425. package/resources.d.ts +2 -0
  426. package/resources.d.ts.map +1 -0
  427. package/resources.js +23 -0
  428. package/resources.js.map +1 -0
  429. package/resources.mjs +7 -0
  430. package/resources.mjs.map +1 -0
  431. package/shims/node.d.ts +30 -0
  432. package/shims/node.d.ts.map +1 -0
  433. package/shims/node.js +36 -0
  434. package/shims/node.js.map +1 -0
  435. package/shims/node.mjs +10 -0
  436. package/shims/node.mjs.map +1 -0
  437. package/shims/web.d.ts +26 -0
  438. package/shims/web.d.ts.map +1 -0
  439. package/shims/web.js +36 -0
  440. package/shims/web.js.map +1 -0
  441. package/shims/web.mjs +10 -0
  442. package/shims/web.mjs.map +1 -0
  443. package/src/_shims/MultipartBody.ts +15 -0
  444. package/src/_shims/README.md +46 -0
  445. package/src/_shims/auto/runtime-bun.ts +10 -0
  446. package/src/_shims/auto/runtime-node.ts +10 -0
  447. package/src/_shims/auto/runtime.ts +10 -0
  448. package/src/_shims/auto/types-node.ts +10 -0
  449. package/src/_shims/auto/types.d.ts +107 -0
  450. package/src/_shims/auto/types.js +9 -0
  451. package/src/_shims/auto/types.mjs +10 -0
  452. package/src/_shims/bun-runtime.ts +20 -0
  453. package/src/_shims/index.d.ts +89 -0
  454. package/src/_shims/index.js +23 -0
  455. package/src/_shims/index.mjs +18 -0
  456. package/src/_shims/manual-types.d.ts +18 -0
  457. package/src/_shims/manual-types.js +9 -0
  458. package/src/_shims/manual-types.mjs +10 -0
  459. package/src/_shims/node-runtime.ts +87 -0
  460. package/src/_shims/node-types.d.ts +48 -0
  461. package/src/_shims/node-types.js +9 -0
  462. package/src/_shims/node-types.mjs +10 -0
  463. package/src/_shims/registry.ts +73 -0
  464. package/src/_shims/web-runtime.ts +109 -0
  465. package/src/_shims/web-types.d.ts +89 -0
  466. package/src/_shims/web-types.js +9 -0
  467. package/src/_shims/web-types.mjs +10 -0
  468. package/src/core.ts +1253 -0
  469. package/src/error.ts +137 -0
  470. package/src/index.ts +554 -0
  471. package/src/internal/decoders/line.ts +182 -0
  472. package/src/internal/qs/LICENSE.md +13 -0
  473. package/src/internal/qs/README.md +3 -0
  474. package/src/internal/qs/formats.ts +15 -0
  475. package/src/internal/qs/index.ts +19 -0
  476. package/src/internal/qs/stringify.ts +394 -0
  477. package/src/internal/qs/types.ts +77 -0
  478. package/src/internal/qs/utils.ts +271 -0
  479. package/src/internal/stream-utils.ts +38 -0
  480. package/src/internal/utils/query.ts +13 -0
  481. package/src/lib/response-helpers.ts +60 -0
  482. package/src/pagination.ts +80 -0
  483. package/src/resource.ts +18 -0
  484. package/src/resources/alpha/admin.ts +87 -0
  485. package/src/resources/alpha/alpha.ts +31 -0
  486. package/src/resources/alpha/benchmarks.ts +152 -0
  487. package/src/resources/alpha/index.ts +11 -0
  488. package/src/resources/alpha/inference.ts +191 -0
  489. package/src/resources/alpha.ts +9 -0
  490. package/src/resources/batches.ts +692 -0
  491. package/src/resources/chat/chat.ts +351 -0
  492. package/src/resources/chat/completions.ts +2430 -0
  493. package/src/resources/chat/index.ts +19 -0
  494. package/src/resources/chat.ts +9 -0
  495. package/src/resources/completions.ts +350 -0
  496. package/src/resources/conversations/conversations.ts +627 -0
  497. package/src/resources/conversations/index.ts +25 -0
  498. package/src/resources/conversations/items.ts +2061 -0
  499. package/src/resources/conversations.ts +9 -0
  500. package/src/resources/embeddings.ts +130 -0
  501. package/src/resources/files.ts +225 -0
  502. package/src/resources/index.ts +104 -0
  503. package/src/resources/inspect.ts +30 -0
  504. package/src/resources/models/index.ts +10 -0
  505. package/src/resources/models/models.ts +133 -0
  506. package/src/resources/models/openai.ts +20 -0
  507. package/src/resources/models.ts +9 -0
  508. package/src/resources/moderations.ts +97 -0
  509. package/src/resources/prompts/index.ts +19 -0
  510. package/src/resources/prompts/prompts.ts +188 -0
  511. package/src/resources/prompts/versions.ts +27 -0
  512. package/src/resources/prompts.ts +9 -0
  513. package/src/resources/providers.ts +41 -0
  514. package/src/resources/responses/index.ts +26 -0
  515. package/src/resources/responses/input-items.ts +571 -0
  516. package/src/resources/responses/responses.ts +6718 -0
  517. package/src/resources/responses.ts +9 -0
  518. package/src/resources/routes.ts +55 -0
  519. package/src/resources/safety.ts +367 -0
  520. package/src/resources/shared.ts +544 -0
  521. package/src/resources/shields.ts +119 -0
  522. package/src/resources/vector-io.ts +485 -0
  523. package/src/resources/vector-stores/file-batches.ts +386 -0
  524. package/src/resources/vector-stores/files.ts +496 -0
  525. package/src/resources/vector-stores/index.ts +38 -0
  526. package/src/resources/vector-stores/vector-stores.ts +588 -0
  527. package/src/resources/vector-stores.ts +9 -0
  528. package/src/resources.ts +7 -0
  529. package/src/shims/node.ts +56 -0
  530. package/src/shims/web.ts +56 -0
  531. package/src/streaming.ts +315 -0
  532. package/src/tsconfig.json +11 -0
  533. package/src/uploads.ts +261 -0
  534. package/src/version.ts +7 -0
  535. package/streaming.d.ts +32 -0
  536. package/streaming.d.ts.map +1 -0
  537. package/streaming.js +272 -0
  538. package/streaming.js.map +1 -0
  539. package/streaming.mjs +267 -0
  540. package/streaming.mjs.map +1 -0
  541. package/uploads.d.ts +75 -0
  542. package/uploads.d.ts.map +1 -0
  543. package/uploads.js +176 -0
  544. package/uploads.js.map +1 -0
  545. package/uploads.mjs +163 -0
  546. package/uploads.mjs.map +1 -0
  547. package/version.d.ts +2 -0
  548. package/version.d.ts.map +1 -0
  549. package/version.js +10 -0
  550. package/version.js.map +1 -0
  551. package/version.mjs +7 -0
  552. package/version.mjs.map +1 -0
@@ -0,0 +1,1408 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import { OpenAICursorPage, type OpenAICursorPageParams } from "../../pagination.js";
4
+ /**
5
+ * Protocol for conversation management operations.
6
+ */
7
+ export declare class Items extends APIResource {
8
+ /**
9
+ * Create items in the conversation.
10
+ */
11
+ create(conversationId: string, body: ItemCreateParams, options?: Core.RequestOptions): Core.APIPromise<ItemCreateResponse>;
12
+ /**
13
+ * List items in the conversation.
14
+ */
15
+ list(conversationId: string, query?: ItemListParams, options?: Core.RequestOptions): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
16
+ list(conversationId: string, options?: Core.RequestOptions): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
17
+ /**
18
+ * Delete a conversation item.
19
+ */
20
+ delete(conversationId: string, itemId: string, options?: Core.RequestOptions): Core.APIPromise<ItemDeleteResponse>;
21
+ /**
22
+ * Retrieve a conversation item.
23
+ */
24
+ get(conversationId: string, itemId: string, options?: Core.RequestOptions): Core.APIPromise<ItemGetResponse>;
25
+ }
26
+ export declare class ItemListResponsesOpenAICursorPage extends OpenAICursorPage<ItemListResponse> {
27
+ }
28
+ /**
29
+ * List of conversation items with pagination.
30
+ */
31
+ export interface ItemCreateResponse {
32
+ /**
33
+ * List of conversation items
34
+ */
35
+ data: Array<ItemCreateResponse.OpenAIResponseMessageOutput | ItemCreateResponse.OpenAIResponseOutputMessageWebSearchToolCall | ItemCreateResponse.OpenAIResponseOutputMessageFileSearchToolCall | ItemCreateResponse.OpenAIResponseOutputMessageFunctionToolCall | ItemCreateResponse.OpenAIResponseInputFunctionToolCallOutput | ItemCreateResponse.OpenAIResponseMcpApprovalRequest | ItemCreateResponse.OpenAIResponseMcpApprovalResponse | ItemCreateResponse.OpenAIResponseOutputMessageMcpCall | ItemCreateResponse.OpenAIResponseOutputMessageMcpListTools | ItemCreateResponse.OpenAIResponseOutputMessageReasoningItem>;
36
+ /**
37
+ * The ID of the first item in the list
38
+ */
39
+ first_id?: string | null;
40
+ /**
41
+ * Whether there are more items available
42
+ */
43
+ has_more?: boolean;
44
+ /**
45
+ * The ID of the last item in the list
46
+ */
47
+ last_id?: string | null;
48
+ /**
49
+ * Object type
50
+ */
51
+ object?: string;
52
+ }
53
+ export declare namespace ItemCreateResponse {
54
+ /**
55
+ * Corresponds to the various Message types in the Responses API. They are all
56
+ * under one type because the Responses API gives them all the same "type" value,
57
+ * and there is no way to tell them apart in certain scenarios.
58
+ */
59
+ interface OpenAIResponseMessageOutput {
60
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
61
+ role: 'system' | 'developer' | 'user' | 'assistant';
62
+ id?: string | null;
63
+ status?: string | null;
64
+ type?: 'message';
65
+ }
66
+ namespace OpenAIResponseMessageOutput {
67
+ /**
68
+ * Text content for input messages in OpenAI response format.
69
+ */
70
+ interface OpenAIResponseInputMessageContentText {
71
+ text: string;
72
+ type?: 'input_text';
73
+ }
74
+ /**
75
+ * Image content for input messages in OpenAI response format.
76
+ */
77
+ interface OpenAIResponseInputMessageContentImage {
78
+ detail?: 'low' | 'high' | 'auto';
79
+ file_id?: string | null;
80
+ image_url?: string | null;
81
+ type?: 'input_image';
82
+ }
83
+ /**
84
+ * File content for input messages in OpenAI response format.
85
+ */
86
+ interface OpenAIResponseInputMessageContentFile {
87
+ file_data?: string | null;
88
+ file_id?: string | null;
89
+ file_url?: string | null;
90
+ filename?: string | null;
91
+ type?: 'input_file';
92
+ }
93
+ /**
94
+ * Text content within an output message of an OpenAI response.
95
+ */
96
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
97
+ text: string;
98
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
99
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
100
+ type?: 'output_text';
101
+ }
102
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
103
+ /**
104
+ * File citation annotation for referencing specific files in response content.
105
+ */
106
+ interface OpenAIResponseAnnotationFileCitation {
107
+ file_id: string;
108
+ filename: string;
109
+ index: number;
110
+ type?: 'file_citation';
111
+ }
112
+ /**
113
+ * URL citation annotation for referencing external web resources.
114
+ */
115
+ interface OpenAIResponseAnnotationCitation {
116
+ end_index: number;
117
+ start_index: number;
118
+ title: string;
119
+ url: string;
120
+ type?: 'url_citation';
121
+ }
122
+ /**
123
+ * Container file citation annotation referencing a file within a container.
124
+ */
125
+ interface OpenAIResponseAnnotationContainerFileCitation {
126
+ container_id: string;
127
+ end_index: number;
128
+ file_id: string;
129
+ filename: string;
130
+ start_index: number;
131
+ type?: 'container_file_citation';
132
+ }
133
+ /**
134
+ * File path annotation referencing a generated file in response content.
135
+ */
136
+ interface OpenAIResponseAnnotationFilePath {
137
+ file_id: string;
138
+ index: number;
139
+ type?: 'file_path';
140
+ }
141
+ /**
142
+ * The log probability for a token from an OpenAI-compatible chat completion
143
+ * response.
144
+ */
145
+ interface Logprob {
146
+ /**
147
+ * The token.
148
+ */
149
+ token: string;
150
+ /**
151
+ * The log probability of the token.
152
+ */
153
+ logprob: number;
154
+ /**
155
+ * The bytes for the token.
156
+ */
157
+ bytes?: Array<number> | null;
158
+ /**
159
+ * The top log probabilities for the token.
160
+ */
161
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
162
+ }
163
+ namespace Logprob {
164
+ /**
165
+ * The top log probability for a token from an OpenAI-compatible chat completion
166
+ * response.
167
+ */
168
+ interface TopLogprob {
169
+ /**
170
+ * The token.
171
+ */
172
+ token: string;
173
+ /**
174
+ * The log probability of the token.
175
+ */
176
+ logprob: number;
177
+ /**
178
+ * The bytes for the token.
179
+ */
180
+ bytes?: Array<number> | null;
181
+ }
182
+ }
183
+ }
184
+ /**
185
+ * Refusal content within a streamed response part.
186
+ */
187
+ interface OpenAIResponseContentPartRefusal {
188
+ refusal: string;
189
+ type?: 'refusal';
190
+ }
191
+ }
192
+ /**
193
+ * Web search tool call output message for OpenAI responses.
194
+ */
195
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
196
+ id: string;
197
+ status: string;
198
+ type?: 'web_search_call';
199
+ }
200
+ /**
201
+ * File search tool call output message for OpenAI responses.
202
+ */
203
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
204
+ id: string;
205
+ queries: Array<string>;
206
+ status: string;
207
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
208
+ type?: 'file_search_call';
209
+ }
210
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
211
+ /**
212
+ * Search results returned by the file search operation.
213
+ */
214
+ interface Result {
215
+ attributes: {
216
+ [key: string]: unknown;
217
+ };
218
+ file_id: string;
219
+ filename: string;
220
+ score: number;
221
+ text: string;
222
+ }
223
+ }
224
+ /**
225
+ * Function tool call output message for OpenAI responses.
226
+ */
227
+ interface OpenAIResponseOutputMessageFunctionToolCall {
228
+ arguments: string;
229
+ call_id: string;
230
+ name: string;
231
+ id?: string | null;
232
+ status?: string | null;
233
+ type?: 'function_call';
234
+ }
235
+ /**
236
+ * This represents the output of a function call that gets passed back to the
237
+ * model.
238
+ */
239
+ interface OpenAIResponseInputFunctionToolCallOutput {
240
+ call_id: string;
241
+ output: string | Array<OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile>;
242
+ id?: string | null;
243
+ status?: string | null;
244
+ type?: 'function_call_output';
245
+ }
246
+ namespace OpenAIResponseInputFunctionToolCallOutput {
247
+ /**
248
+ * Text content for input messages in OpenAI response format.
249
+ */
250
+ interface OpenAIResponseInputMessageContentText {
251
+ text: string;
252
+ type?: 'input_text';
253
+ }
254
+ /**
255
+ * Image content for input messages in OpenAI response format.
256
+ */
257
+ interface OpenAIResponseInputMessageContentImage {
258
+ detail?: 'low' | 'high' | 'auto';
259
+ file_id?: string | null;
260
+ image_url?: string | null;
261
+ type?: 'input_image';
262
+ }
263
+ /**
264
+ * File content for input messages in OpenAI response format.
265
+ */
266
+ interface OpenAIResponseInputMessageContentFile {
267
+ file_data?: string | null;
268
+ file_id?: string | null;
269
+ file_url?: string | null;
270
+ filename?: string | null;
271
+ type?: 'input_file';
272
+ }
273
+ }
274
+ /**
275
+ * A request for human approval of a tool invocation.
276
+ */
277
+ interface OpenAIResponseMcpApprovalRequest {
278
+ id: string;
279
+ arguments: string;
280
+ name: string;
281
+ server_label: string;
282
+ type?: 'mcp_approval_request';
283
+ }
284
+ /**
285
+ * A response to an MCP approval request.
286
+ */
287
+ interface OpenAIResponseMcpApprovalResponse {
288
+ approval_request_id: string;
289
+ approve: boolean;
290
+ id?: string | null;
291
+ reason?: string | null;
292
+ type?: 'mcp_approval_response';
293
+ }
294
+ /**
295
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
296
+ */
297
+ interface OpenAIResponseOutputMessageMcpCall {
298
+ id: string;
299
+ arguments: string;
300
+ name: string;
301
+ server_label: string;
302
+ error?: string | null;
303
+ output?: string | null;
304
+ type?: 'mcp_call';
305
+ }
306
+ /**
307
+ * MCP list tools output message containing available tools from an MCP server.
308
+ */
309
+ interface OpenAIResponseOutputMessageMcpListTools {
310
+ id: string;
311
+ server_label: string;
312
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
313
+ type?: 'mcp_list_tools';
314
+ }
315
+ namespace OpenAIResponseOutputMessageMcpListTools {
316
+ /**
317
+ * Tool definition returned by MCP list tools operation.
318
+ */
319
+ interface Tool {
320
+ input_schema: {
321
+ [key: string]: unknown;
322
+ };
323
+ name: string;
324
+ description?: string | null;
325
+ }
326
+ }
327
+ /**
328
+ * Reasoning output from the model, representing the model's thinking process.
329
+ */
330
+ interface OpenAIResponseOutputMessageReasoningItem {
331
+ /**
332
+ * Unique identifier for the reasoning output item.
333
+ */
334
+ id: string;
335
+ /**
336
+ * Summary of the reasoning output.
337
+ */
338
+ summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
339
+ /**
340
+ * The reasoning content from the model.
341
+ */
342
+ content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
343
+ /**
344
+ * The status of the reasoning output.
345
+ */
346
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
347
+ /**
348
+ * The type identifier, always 'reasoning'.
349
+ */
350
+ type?: 'reasoning';
351
+ }
352
+ namespace OpenAIResponseOutputMessageReasoningItem {
353
+ /**
354
+ * A summary of reasoning output from the model.
355
+ */
356
+ interface Summary {
357
+ /**
358
+ * The summary text of the reasoning output.
359
+ */
360
+ text: string;
361
+ /**
362
+ * The type identifier, always 'summary_text'.
363
+ */
364
+ type?: 'summary_text';
365
+ }
366
+ /**
367
+ * Reasoning text from the model.
368
+ */
369
+ interface Content {
370
+ /**
371
+ * The reasoning text content from the model.
372
+ */
373
+ text: string;
374
+ /**
375
+ * The type identifier, always 'reasoning_text'.
376
+ */
377
+ type?: 'reasoning_text';
378
+ }
379
+ }
380
+ }
381
+ /**
382
+ * Corresponds to the various Message types in the Responses API. They are all
383
+ * under one type because the Responses API gives them all the same "type" value,
384
+ * and there is no way to tell them apart in certain scenarios.
385
+ */
386
+ export type ItemListResponse = ItemListResponse.OpenAIResponseMessageOutput | ItemListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ItemListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ItemListResponse.OpenAIResponseOutputMessageFunctionToolCall | ItemListResponse.OpenAIResponseInputFunctionToolCallOutput | ItemListResponse.OpenAIResponseMcpApprovalRequest | ItemListResponse.OpenAIResponseMcpApprovalResponse | ItemListResponse.OpenAIResponseOutputMessageMcpCall | ItemListResponse.OpenAIResponseOutputMessageMcpListTools | ItemListResponse.OpenAIResponseOutputMessageReasoningItem;
387
+ export declare namespace ItemListResponse {
388
+ /**
389
+ * Corresponds to the various Message types in the Responses API. They are all
390
+ * under one type because the Responses API gives them all the same "type" value,
391
+ * and there is no way to tell them apart in certain scenarios.
392
+ */
393
+ interface OpenAIResponseMessageOutput {
394
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
395
+ role: 'system' | 'developer' | 'user' | 'assistant';
396
+ id?: string | null;
397
+ status?: string | null;
398
+ type?: 'message';
399
+ }
400
+ namespace OpenAIResponseMessageOutput {
401
+ /**
402
+ * Text content for input messages in OpenAI response format.
403
+ */
404
+ interface OpenAIResponseInputMessageContentText {
405
+ text: string;
406
+ type?: 'input_text';
407
+ }
408
+ /**
409
+ * Image content for input messages in OpenAI response format.
410
+ */
411
+ interface OpenAIResponseInputMessageContentImage {
412
+ detail?: 'low' | 'high' | 'auto';
413
+ file_id?: string | null;
414
+ image_url?: string | null;
415
+ type?: 'input_image';
416
+ }
417
+ /**
418
+ * File content for input messages in OpenAI response format.
419
+ */
420
+ interface OpenAIResponseInputMessageContentFile {
421
+ file_data?: string | null;
422
+ file_id?: string | null;
423
+ file_url?: string | null;
424
+ filename?: string | null;
425
+ type?: 'input_file';
426
+ }
427
+ /**
428
+ * Text content within an output message of an OpenAI response.
429
+ */
430
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
431
+ text: string;
432
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
433
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
434
+ type?: 'output_text';
435
+ }
436
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
437
+ /**
438
+ * File citation annotation for referencing specific files in response content.
439
+ */
440
+ interface OpenAIResponseAnnotationFileCitation {
441
+ file_id: string;
442
+ filename: string;
443
+ index: number;
444
+ type?: 'file_citation';
445
+ }
446
+ /**
447
+ * URL citation annotation for referencing external web resources.
448
+ */
449
+ interface OpenAIResponseAnnotationCitation {
450
+ end_index: number;
451
+ start_index: number;
452
+ title: string;
453
+ url: string;
454
+ type?: 'url_citation';
455
+ }
456
+ /**
457
+ * Container file citation annotation referencing a file within a container.
458
+ */
459
+ interface OpenAIResponseAnnotationContainerFileCitation {
460
+ container_id: string;
461
+ end_index: number;
462
+ file_id: string;
463
+ filename: string;
464
+ start_index: number;
465
+ type?: 'container_file_citation';
466
+ }
467
+ /**
468
+ * File path annotation referencing a generated file in response content.
469
+ */
470
+ interface OpenAIResponseAnnotationFilePath {
471
+ file_id: string;
472
+ index: number;
473
+ type?: 'file_path';
474
+ }
475
+ /**
476
+ * The log probability for a token from an OpenAI-compatible chat completion
477
+ * response.
478
+ */
479
+ interface Logprob {
480
+ /**
481
+ * The token.
482
+ */
483
+ token: string;
484
+ /**
485
+ * The log probability of the token.
486
+ */
487
+ logprob: number;
488
+ /**
489
+ * The bytes for the token.
490
+ */
491
+ bytes?: Array<number> | null;
492
+ /**
493
+ * The top log probabilities for the token.
494
+ */
495
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
496
+ }
497
+ namespace Logprob {
498
+ /**
499
+ * The top log probability for a token from an OpenAI-compatible chat completion
500
+ * response.
501
+ */
502
+ interface TopLogprob {
503
+ /**
504
+ * The token.
505
+ */
506
+ token: string;
507
+ /**
508
+ * The log probability of the token.
509
+ */
510
+ logprob: number;
511
+ /**
512
+ * The bytes for the token.
513
+ */
514
+ bytes?: Array<number> | null;
515
+ }
516
+ }
517
+ }
518
+ /**
519
+ * Refusal content within a streamed response part.
520
+ */
521
+ interface OpenAIResponseContentPartRefusal {
522
+ refusal: string;
523
+ type?: 'refusal';
524
+ }
525
+ }
526
+ /**
527
+ * Web search tool call output message for OpenAI responses.
528
+ */
529
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
530
+ id: string;
531
+ status: string;
532
+ type?: 'web_search_call';
533
+ }
534
+ /**
535
+ * File search tool call output message for OpenAI responses.
536
+ */
537
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
538
+ id: string;
539
+ queries: Array<string>;
540
+ status: string;
541
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
542
+ type?: 'file_search_call';
543
+ }
544
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
545
+ /**
546
+ * Search results returned by the file search operation.
547
+ */
548
+ interface Result {
549
+ attributes: {
550
+ [key: string]: unknown;
551
+ };
552
+ file_id: string;
553
+ filename: string;
554
+ score: number;
555
+ text: string;
556
+ }
557
+ }
558
+ /**
559
+ * Function tool call output message for OpenAI responses.
560
+ */
561
+ interface OpenAIResponseOutputMessageFunctionToolCall {
562
+ arguments: string;
563
+ call_id: string;
564
+ name: string;
565
+ id?: string | null;
566
+ status?: string | null;
567
+ type?: 'function_call';
568
+ }
569
+ /**
570
+ * This represents the output of a function call that gets passed back to the
571
+ * model.
572
+ */
573
+ interface OpenAIResponseInputFunctionToolCallOutput {
574
+ call_id: string;
575
+ output: string | Array<OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile>;
576
+ id?: string | null;
577
+ status?: string | null;
578
+ type?: 'function_call_output';
579
+ }
580
+ namespace OpenAIResponseInputFunctionToolCallOutput {
581
+ /**
582
+ * Text content for input messages in OpenAI response format.
583
+ */
584
+ interface OpenAIResponseInputMessageContentText {
585
+ text: string;
586
+ type?: 'input_text';
587
+ }
588
+ /**
589
+ * Image content for input messages in OpenAI response format.
590
+ */
591
+ interface OpenAIResponseInputMessageContentImage {
592
+ detail?: 'low' | 'high' | 'auto';
593
+ file_id?: string | null;
594
+ image_url?: string | null;
595
+ type?: 'input_image';
596
+ }
597
+ /**
598
+ * File content for input messages in OpenAI response format.
599
+ */
600
+ interface OpenAIResponseInputMessageContentFile {
601
+ file_data?: string | null;
602
+ file_id?: string | null;
603
+ file_url?: string | null;
604
+ filename?: string | null;
605
+ type?: 'input_file';
606
+ }
607
+ }
608
+ /**
609
+ * A request for human approval of a tool invocation.
610
+ */
611
+ interface OpenAIResponseMcpApprovalRequest {
612
+ id: string;
613
+ arguments: string;
614
+ name: string;
615
+ server_label: string;
616
+ type?: 'mcp_approval_request';
617
+ }
618
+ /**
619
+ * A response to an MCP approval request.
620
+ */
621
+ interface OpenAIResponseMcpApprovalResponse {
622
+ approval_request_id: string;
623
+ approve: boolean;
624
+ id?: string | null;
625
+ reason?: string | null;
626
+ type?: 'mcp_approval_response';
627
+ }
628
+ /**
629
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
630
+ */
631
+ interface OpenAIResponseOutputMessageMcpCall {
632
+ id: string;
633
+ arguments: string;
634
+ name: string;
635
+ server_label: string;
636
+ error?: string | null;
637
+ output?: string | null;
638
+ type?: 'mcp_call';
639
+ }
640
+ /**
641
+ * MCP list tools output message containing available tools from an MCP server.
642
+ */
643
+ interface OpenAIResponseOutputMessageMcpListTools {
644
+ id: string;
645
+ server_label: string;
646
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
647
+ type?: 'mcp_list_tools';
648
+ }
649
+ namespace OpenAIResponseOutputMessageMcpListTools {
650
+ /**
651
+ * Tool definition returned by MCP list tools operation.
652
+ */
653
+ interface Tool {
654
+ input_schema: {
655
+ [key: string]: unknown;
656
+ };
657
+ name: string;
658
+ description?: string | null;
659
+ }
660
+ }
661
+ /**
662
+ * Reasoning output from the model, representing the model's thinking process.
663
+ */
664
+ interface OpenAIResponseOutputMessageReasoningItem {
665
+ /**
666
+ * Unique identifier for the reasoning output item.
667
+ */
668
+ id: string;
669
+ /**
670
+ * Summary of the reasoning output.
671
+ */
672
+ summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
673
+ /**
674
+ * The reasoning content from the model.
675
+ */
676
+ content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
677
+ /**
678
+ * The status of the reasoning output.
679
+ */
680
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
681
+ /**
682
+ * The type identifier, always 'reasoning'.
683
+ */
684
+ type?: 'reasoning';
685
+ }
686
+ namespace OpenAIResponseOutputMessageReasoningItem {
687
+ /**
688
+ * A summary of reasoning output from the model.
689
+ */
690
+ interface Summary {
691
+ /**
692
+ * The summary text of the reasoning output.
693
+ */
694
+ text: string;
695
+ /**
696
+ * The type identifier, always 'summary_text'.
697
+ */
698
+ type?: 'summary_text';
699
+ }
700
+ /**
701
+ * Reasoning text from the model.
702
+ */
703
+ interface Content {
704
+ /**
705
+ * The reasoning text content from the model.
706
+ */
707
+ text: string;
708
+ /**
709
+ * The type identifier, always 'reasoning_text'.
710
+ */
711
+ type?: 'reasoning_text';
712
+ }
713
+ }
714
+ }
715
+ /**
716
+ * Response for deleted conversation item.
717
+ */
718
+ export interface ItemDeleteResponse {
719
+ /**
720
+ * The deleted item identifier
721
+ */
722
+ id: string;
723
+ /**
724
+ * Whether the object was deleted
725
+ */
726
+ deleted?: boolean;
727
+ /**
728
+ * Object type
729
+ */
730
+ object?: string;
731
+ }
732
+ /**
733
+ * Corresponds to the various Message types in the Responses API. They are all
734
+ * under one type because the Responses API gives them all the same "type" value,
735
+ * and there is no way to tell them apart in certain scenarios.
736
+ */
737
+ export type ItemGetResponse = ItemGetResponse.OpenAIResponseMessageOutput | ItemGetResponse.OpenAIResponseOutputMessageWebSearchToolCall | ItemGetResponse.OpenAIResponseOutputMessageFileSearchToolCall | ItemGetResponse.OpenAIResponseOutputMessageFunctionToolCall | ItemGetResponse.OpenAIResponseInputFunctionToolCallOutput | ItemGetResponse.OpenAIResponseMcpApprovalRequest | ItemGetResponse.OpenAIResponseMcpApprovalResponse | ItemGetResponse.OpenAIResponseOutputMessageMcpCall | ItemGetResponse.OpenAIResponseOutputMessageMcpListTools | ItemGetResponse.OpenAIResponseOutputMessageReasoningItem;
738
+ export declare namespace ItemGetResponse {
739
+ /**
740
+ * Corresponds to the various Message types in the Responses API. They are all
741
+ * under one type because the Responses API gives them all the same "type" value,
742
+ * and there is no way to tell them apart in certain scenarios.
743
+ */
744
+ interface OpenAIResponseMessageOutput {
745
+ content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
746
+ role: 'system' | 'developer' | 'user' | 'assistant';
747
+ id?: string | null;
748
+ status?: string | null;
749
+ type?: 'message';
750
+ }
751
+ namespace OpenAIResponseMessageOutput {
752
+ /**
753
+ * Text content for input messages in OpenAI response format.
754
+ */
755
+ interface OpenAIResponseInputMessageContentText {
756
+ text: string;
757
+ type?: 'input_text';
758
+ }
759
+ /**
760
+ * Image content for input messages in OpenAI response format.
761
+ */
762
+ interface OpenAIResponseInputMessageContentImage {
763
+ detail?: 'low' | 'high' | 'auto';
764
+ file_id?: string | null;
765
+ image_url?: string | null;
766
+ type?: 'input_image';
767
+ }
768
+ /**
769
+ * File content for input messages in OpenAI response format.
770
+ */
771
+ interface OpenAIResponseInputMessageContentFile {
772
+ file_data?: string | null;
773
+ file_id?: string | null;
774
+ file_url?: string | null;
775
+ filename?: string | null;
776
+ type?: 'input_file';
777
+ }
778
+ /**
779
+ * Text content within an output message of an OpenAI response.
780
+ */
781
+ interface OpenAIResponseOutputMessageContentOutputTextOutput {
782
+ text: string;
783
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
784
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
785
+ type?: 'output_text';
786
+ }
787
+ namespace OpenAIResponseOutputMessageContentOutputTextOutput {
788
+ /**
789
+ * File citation annotation for referencing specific files in response content.
790
+ */
791
+ interface OpenAIResponseAnnotationFileCitation {
792
+ file_id: string;
793
+ filename: string;
794
+ index: number;
795
+ type?: 'file_citation';
796
+ }
797
+ /**
798
+ * URL citation annotation for referencing external web resources.
799
+ */
800
+ interface OpenAIResponseAnnotationCitation {
801
+ end_index: number;
802
+ start_index: number;
803
+ title: string;
804
+ url: string;
805
+ type?: 'url_citation';
806
+ }
807
+ /**
808
+ * Container file citation annotation referencing a file within a container.
809
+ */
810
+ interface OpenAIResponseAnnotationContainerFileCitation {
811
+ container_id: string;
812
+ end_index: number;
813
+ file_id: string;
814
+ filename: string;
815
+ start_index: number;
816
+ type?: 'container_file_citation';
817
+ }
818
+ /**
819
+ * File path annotation referencing a generated file in response content.
820
+ */
821
+ interface OpenAIResponseAnnotationFilePath {
822
+ file_id: string;
823
+ index: number;
824
+ type?: 'file_path';
825
+ }
826
+ /**
827
+ * The log probability for a token from an OpenAI-compatible chat completion
828
+ * response.
829
+ */
830
+ interface Logprob {
831
+ /**
832
+ * The token.
833
+ */
834
+ token: string;
835
+ /**
836
+ * The log probability of the token.
837
+ */
838
+ logprob: number;
839
+ /**
840
+ * The bytes for the token.
841
+ */
842
+ bytes?: Array<number> | null;
843
+ /**
844
+ * The top log probabilities for the token.
845
+ */
846
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
847
+ }
848
+ namespace Logprob {
849
+ /**
850
+ * The top log probability for a token from an OpenAI-compatible chat completion
851
+ * response.
852
+ */
853
+ interface TopLogprob {
854
+ /**
855
+ * The token.
856
+ */
857
+ token: string;
858
+ /**
859
+ * The log probability of the token.
860
+ */
861
+ logprob: number;
862
+ /**
863
+ * The bytes for the token.
864
+ */
865
+ bytes?: Array<number> | null;
866
+ }
867
+ }
868
+ }
869
+ /**
870
+ * Refusal content within a streamed response part.
871
+ */
872
+ interface OpenAIResponseContentPartRefusal {
873
+ refusal: string;
874
+ type?: 'refusal';
875
+ }
876
+ }
877
+ /**
878
+ * Web search tool call output message for OpenAI responses.
879
+ */
880
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
881
+ id: string;
882
+ status: string;
883
+ type?: 'web_search_call';
884
+ }
885
+ /**
886
+ * File search tool call output message for OpenAI responses.
887
+ */
888
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
889
+ id: string;
890
+ queries: Array<string>;
891
+ status: string;
892
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
893
+ type?: 'file_search_call';
894
+ }
895
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
896
+ /**
897
+ * Search results returned by the file search operation.
898
+ */
899
+ interface Result {
900
+ attributes: {
901
+ [key: string]: unknown;
902
+ };
903
+ file_id: string;
904
+ filename: string;
905
+ score: number;
906
+ text: string;
907
+ }
908
+ }
909
+ /**
910
+ * Function tool call output message for OpenAI responses.
911
+ */
912
+ interface OpenAIResponseOutputMessageFunctionToolCall {
913
+ arguments: string;
914
+ call_id: string;
915
+ name: string;
916
+ id?: string | null;
917
+ status?: string | null;
918
+ type?: 'function_call';
919
+ }
920
+ /**
921
+ * This represents the output of a function call that gets passed back to the
922
+ * model.
923
+ */
924
+ interface OpenAIResponseInputFunctionToolCallOutput {
925
+ call_id: string;
926
+ output: string | Array<OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile>;
927
+ id?: string | null;
928
+ status?: string | null;
929
+ type?: 'function_call_output';
930
+ }
931
+ namespace OpenAIResponseInputFunctionToolCallOutput {
932
+ /**
933
+ * Text content for input messages in OpenAI response format.
934
+ */
935
+ interface OpenAIResponseInputMessageContentText {
936
+ text: string;
937
+ type?: 'input_text';
938
+ }
939
+ /**
940
+ * Image content for input messages in OpenAI response format.
941
+ */
942
+ interface OpenAIResponseInputMessageContentImage {
943
+ detail?: 'low' | 'high' | 'auto';
944
+ file_id?: string | null;
945
+ image_url?: string | null;
946
+ type?: 'input_image';
947
+ }
948
+ /**
949
+ * File content for input messages in OpenAI response format.
950
+ */
951
+ interface OpenAIResponseInputMessageContentFile {
952
+ file_data?: string | null;
953
+ file_id?: string | null;
954
+ file_url?: string | null;
955
+ filename?: string | null;
956
+ type?: 'input_file';
957
+ }
958
+ }
959
+ /**
960
+ * A request for human approval of a tool invocation.
961
+ */
962
+ interface OpenAIResponseMcpApprovalRequest {
963
+ id: string;
964
+ arguments: string;
965
+ name: string;
966
+ server_label: string;
967
+ type?: 'mcp_approval_request';
968
+ }
969
+ /**
970
+ * A response to an MCP approval request.
971
+ */
972
+ interface OpenAIResponseMcpApprovalResponse {
973
+ approval_request_id: string;
974
+ approve: boolean;
975
+ id?: string | null;
976
+ reason?: string | null;
977
+ type?: 'mcp_approval_response';
978
+ }
979
+ /**
980
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
981
+ */
982
+ interface OpenAIResponseOutputMessageMcpCall {
983
+ id: string;
984
+ arguments: string;
985
+ name: string;
986
+ server_label: string;
987
+ error?: string | null;
988
+ output?: string | null;
989
+ type?: 'mcp_call';
990
+ }
991
+ /**
992
+ * MCP list tools output message containing available tools from an MCP server.
993
+ */
994
+ interface OpenAIResponseOutputMessageMcpListTools {
995
+ id: string;
996
+ server_label: string;
997
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
998
+ type?: 'mcp_list_tools';
999
+ }
1000
+ namespace OpenAIResponseOutputMessageMcpListTools {
1001
+ /**
1002
+ * Tool definition returned by MCP list tools operation.
1003
+ */
1004
+ interface Tool {
1005
+ input_schema: {
1006
+ [key: string]: unknown;
1007
+ };
1008
+ name: string;
1009
+ description?: string | null;
1010
+ }
1011
+ }
1012
+ /**
1013
+ * Reasoning output from the model, representing the model's thinking process.
1014
+ */
1015
+ interface OpenAIResponseOutputMessageReasoningItem {
1016
+ /**
1017
+ * Unique identifier for the reasoning output item.
1018
+ */
1019
+ id: string;
1020
+ /**
1021
+ * Summary of the reasoning output.
1022
+ */
1023
+ summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
1024
+ /**
1025
+ * The reasoning content from the model.
1026
+ */
1027
+ content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
1028
+ /**
1029
+ * The status of the reasoning output.
1030
+ */
1031
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
1032
+ /**
1033
+ * The type identifier, always 'reasoning'.
1034
+ */
1035
+ type?: 'reasoning';
1036
+ }
1037
+ namespace OpenAIResponseOutputMessageReasoningItem {
1038
+ /**
1039
+ * A summary of reasoning output from the model.
1040
+ */
1041
+ interface Summary {
1042
+ /**
1043
+ * The summary text of the reasoning output.
1044
+ */
1045
+ text: string;
1046
+ /**
1047
+ * The type identifier, always 'summary_text'.
1048
+ */
1049
+ type?: 'summary_text';
1050
+ }
1051
+ /**
1052
+ * Reasoning text from the model.
1053
+ */
1054
+ interface Content {
1055
+ /**
1056
+ * The reasoning text content from the model.
1057
+ */
1058
+ text: string;
1059
+ /**
1060
+ * The type identifier, always 'reasoning_text'.
1061
+ */
1062
+ type?: 'reasoning_text';
1063
+ }
1064
+ }
1065
+ }
1066
+ export interface ItemCreateParams {
1067
+ /**
1068
+ * Items to include in the conversation context. You may add up to 20 items at a
1069
+ * time.
1070
+ */
1071
+ items: Array<ItemCreateParams.OpenAIResponseMessageInput | ItemCreateParams.OpenAIResponseOutputMessageWebSearchToolCall | ItemCreateParams.OpenAIResponseOutputMessageFileSearchToolCall | ItemCreateParams.OpenAIResponseOutputMessageFunctionToolCall | ItemCreateParams.OpenAIResponseInputFunctionToolCallOutput | ItemCreateParams.OpenAIResponseMcpApprovalRequest | ItemCreateParams.OpenAIResponseMcpApprovalResponse | ItemCreateParams.OpenAIResponseOutputMessageMcpCall | ItemCreateParams.OpenAIResponseOutputMessageMcpListTools | ItemCreateParams.OpenAIResponseOutputMessageReasoningItem>;
1072
+ }
1073
+ export declare namespace ItemCreateParams {
1074
+ /**
1075
+ * Corresponds to the various Message types in the Responses API. They are all
1076
+ * under one type because the Responses API gives them all the same "type" value,
1077
+ * and there is no way to tell them apart in certain scenarios.
1078
+ */
1079
+ interface OpenAIResponseMessageInput {
1080
+ content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
1081
+ role: 'system' | 'developer' | 'user' | 'assistant';
1082
+ id?: string | null;
1083
+ status?: string | null;
1084
+ type?: 'message';
1085
+ }
1086
+ namespace OpenAIResponseMessageInput {
1087
+ /**
1088
+ * Text content for input messages in OpenAI response format.
1089
+ */
1090
+ interface OpenAIResponseInputMessageContentText {
1091
+ text: string;
1092
+ type?: 'input_text';
1093
+ }
1094
+ /**
1095
+ * Image content for input messages in OpenAI response format.
1096
+ */
1097
+ interface OpenAIResponseInputMessageContentImage {
1098
+ detail?: 'low' | 'high' | 'auto';
1099
+ file_id?: string | null;
1100
+ image_url?: string | null;
1101
+ type?: 'input_image';
1102
+ }
1103
+ /**
1104
+ * File content for input messages in OpenAI response format.
1105
+ */
1106
+ interface OpenAIResponseInputMessageContentFile {
1107
+ file_data?: string | null;
1108
+ file_id?: string | null;
1109
+ file_url?: string | null;
1110
+ filename?: string | null;
1111
+ type?: 'input_file';
1112
+ }
1113
+ /**
1114
+ * Text content within an output message of an OpenAI response.
1115
+ */
1116
+ interface OpenAIResponseOutputMessageContentOutputTextInput {
1117
+ text: string;
1118
+ annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
1119
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
1120
+ type?: 'output_text';
1121
+ }
1122
+ namespace OpenAIResponseOutputMessageContentOutputTextInput {
1123
+ /**
1124
+ * File citation annotation for referencing specific files in response content.
1125
+ */
1126
+ interface OpenAIResponseAnnotationFileCitation {
1127
+ file_id: string;
1128
+ filename: string;
1129
+ index: number;
1130
+ type?: 'file_citation';
1131
+ }
1132
+ /**
1133
+ * URL citation annotation for referencing external web resources.
1134
+ */
1135
+ interface OpenAIResponseAnnotationCitation {
1136
+ end_index: number;
1137
+ start_index: number;
1138
+ title: string;
1139
+ url: string;
1140
+ type?: 'url_citation';
1141
+ }
1142
+ /**
1143
+ * Container file citation annotation referencing a file within a container.
1144
+ */
1145
+ interface OpenAIResponseAnnotationContainerFileCitation {
1146
+ container_id: string;
1147
+ end_index: number;
1148
+ file_id: string;
1149
+ filename: string;
1150
+ start_index: number;
1151
+ type?: 'container_file_citation';
1152
+ }
1153
+ /**
1154
+ * File path annotation referencing a generated file in response content.
1155
+ */
1156
+ interface OpenAIResponseAnnotationFilePath {
1157
+ file_id: string;
1158
+ index: number;
1159
+ type?: 'file_path';
1160
+ }
1161
+ /**
1162
+ * The log probability for a token from an OpenAI-compatible chat completion
1163
+ * response.
1164
+ */
1165
+ interface Logprob {
1166
+ /**
1167
+ * The token.
1168
+ */
1169
+ token: string;
1170
+ /**
1171
+ * The log probability of the token.
1172
+ */
1173
+ logprob: number;
1174
+ /**
1175
+ * The bytes for the token.
1176
+ */
1177
+ bytes?: Array<number> | null;
1178
+ /**
1179
+ * The top log probabilities for the token.
1180
+ */
1181
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1182
+ }
1183
+ namespace Logprob {
1184
+ /**
1185
+ * The top log probability for a token from an OpenAI-compatible chat completion
1186
+ * response.
1187
+ */
1188
+ interface TopLogprob {
1189
+ /**
1190
+ * The token.
1191
+ */
1192
+ token: string;
1193
+ /**
1194
+ * The log probability of the token.
1195
+ */
1196
+ logprob: number;
1197
+ /**
1198
+ * The bytes for the token.
1199
+ */
1200
+ bytes?: Array<number> | null;
1201
+ }
1202
+ }
1203
+ }
1204
+ /**
1205
+ * Refusal content within a streamed response part.
1206
+ */
1207
+ interface OpenAIResponseContentPartRefusal {
1208
+ refusal: string;
1209
+ type?: 'refusal';
1210
+ }
1211
+ }
1212
+ /**
1213
+ * Web search tool call output message for OpenAI responses.
1214
+ */
1215
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
1216
+ id: string;
1217
+ status: string;
1218
+ type?: 'web_search_call';
1219
+ }
1220
+ /**
1221
+ * File search tool call output message for OpenAI responses.
1222
+ */
1223
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
1224
+ id: string;
1225
+ queries: Array<string>;
1226
+ status: string;
1227
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
1228
+ type?: 'file_search_call';
1229
+ }
1230
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
1231
+ /**
1232
+ * Search results returned by the file search operation.
1233
+ */
1234
+ interface Result {
1235
+ attributes: {
1236
+ [key: string]: unknown;
1237
+ };
1238
+ file_id: string;
1239
+ filename: string;
1240
+ score: number;
1241
+ text: string;
1242
+ }
1243
+ }
1244
+ /**
1245
+ * Function tool call output message for OpenAI responses.
1246
+ */
1247
+ interface OpenAIResponseOutputMessageFunctionToolCall {
1248
+ arguments: string;
1249
+ call_id: string;
1250
+ name: string;
1251
+ id?: string | null;
1252
+ status?: string | null;
1253
+ type?: 'function_call';
1254
+ }
1255
+ /**
1256
+ * This represents the output of a function call that gets passed back to the
1257
+ * model.
1258
+ */
1259
+ interface OpenAIResponseInputFunctionToolCallOutput {
1260
+ call_id: string;
1261
+ output: string | Array<OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile>;
1262
+ id?: string | null;
1263
+ status?: string | null;
1264
+ type?: 'function_call_output';
1265
+ }
1266
+ namespace OpenAIResponseInputFunctionToolCallOutput {
1267
+ /**
1268
+ * Text content for input messages in OpenAI response format.
1269
+ */
1270
+ interface OpenAIResponseInputMessageContentText {
1271
+ text: string;
1272
+ type?: 'input_text';
1273
+ }
1274
+ /**
1275
+ * Image content for input messages in OpenAI response format.
1276
+ */
1277
+ interface OpenAIResponseInputMessageContentImage {
1278
+ detail?: 'low' | 'high' | 'auto';
1279
+ file_id?: string | null;
1280
+ image_url?: string | null;
1281
+ type?: 'input_image';
1282
+ }
1283
+ /**
1284
+ * File content for input messages in OpenAI response format.
1285
+ */
1286
+ interface OpenAIResponseInputMessageContentFile {
1287
+ file_data?: string | null;
1288
+ file_id?: string | null;
1289
+ file_url?: string | null;
1290
+ filename?: string | null;
1291
+ type?: 'input_file';
1292
+ }
1293
+ }
1294
+ /**
1295
+ * A request for human approval of a tool invocation.
1296
+ */
1297
+ interface OpenAIResponseMcpApprovalRequest {
1298
+ id: string;
1299
+ arguments: string;
1300
+ name: string;
1301
+ server_label: string;
1302
+ type?: 'mcp_approval_request';
1303
+ }
1304
+ /**
1305
+ * A response to an MCP approval request.
1306
+ */
1307
+ interface OpenAIResponseMcpApprovalResponse {
1308
+ approval_request_id: string;
1309
+ approve: boolean;
1310
+ id?: string | null;
1311
+ reason?: string | null;
1312
+ type?: 'mcp_approval_response';
1313
+ }
1314
+ /**
1315
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1316
+ */
1317
+ interface OpenAIResponseOutputMessageMcpCall {
1318
+ id: string;
1319
+ arguments: string;
1320
+ name: string;
1321
+ server_label: string;
1322
+ error?: string | null;
1323
+ output?: string | null;
1324
+ type?: 'mcp_call';
1325
+ }
1326
+ /**
1327
+ * MCP list tools output message containing available tools from an MCP server.
1328
+ */
1329
+ interface OpenAIResponseOutputMessageMcpListTools {
1330
+ id: string;
1331
+ server_label: string;
1332
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1333
+ type?: 'mcp_list_tools';
1334
+ }
1335
+ namespace OpenAIResponseOutputMessageMcpListTools {
1336
+ /**
1337
+ * Tool definition returned by MCP list tools operation.
1338
+ */
1339
+ interface Tool {
1340
+ input_schema: {
1341
+ [key: string]: unknown;
1342
+ };
1343
+ name: string;
1344
+ description?: string | null;
1345
+ }
1346
+ }
1347
+ /**
1348
+ * Reasoning output from the model, representing the model's thinking process.
1349
+ */
1350
+ interface OpenAIResponseOutputMessageReasoningItem {
1351
+ /**
1352
+ * Unique identifier for the reasoning output item.
1353
+ */
1354
+ id: string;
1355
+ /**
1356
+ * Summary of the reasoning output.
1357
+ */
1358
+ summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
1359
+ /**
1360
+ * The reasoning content from the model.
1361
+ */
1362
+ content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
1363
+ /**
1364
+ * The status of the reasoning output.
1365
+ */
1366
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
1367
+ /**
1368
+ * The type identifier, always 'reasoning'.
1369
+ */
1370
+ type?: 'reasoning';
1371
+ }
1372
+ namespace OpenAIResponseOutputMessageReasoningItem {
1373
+ /**
1374
+ * A summary of reasoning output from the model.
1375
+ */
1376
+ interface Summary {
1377
+ /**
1378
+ * The summary text of the reasoning output.
1379
+ */
1380
+ text: string;
1381
+ /**
1382
+ * The type identifier, always 'summary_text'.
1383
+ */
1384
+ type?: 'summary_text';
1385
+ }
1386
+ /**
1387
+ * Reasoning text from the model.
1388
+ */
1389
+ interface Content {
1390
+ /**
1391
+ * The reasoning text content from the model.
1392
+ */
1393
+ text: string;
1394
+ /**
1395
+ * The type identifier, always 'reasoning_text'.
1396
+ */
1397
+ type?: 'reasoning_text';
1398
+ }
1399
+ }
1400
+ }
1401
+ export interface ItemListParams extends OpenAICursorPageParams {
1402
+ include?: Array<'web_search_call.action.sources' | 'code_interpreter_call.outputs' | 'computer_call_output.output.image_url' | 'file_search_call.results' | 'message.input_image.image_url' | 'message.output_text.logprobs' | 'reasoning.encrypted_content'> | null;
1403
+ order?: 'asc' | 'desc' | null;
1404
+ }
1405
+ export declare namespace Items {
1406
+ export { type ItemCreateResponse as ItemCreateResponse, type ItemListResponse as ItemListResponse, type ItemDeleteResponse as ItemDeleteResponse, type ItemGetResponse as ItemGetResponse, ItemListResponsesOpenAICursorPage as ItemListResponsesOpenAICursorPage, type ItemCreateParams as ItemCreateParams, type ItemListParams as ItemListParams, };
1407
+ }
1408
+ //# sourceMappingURL=items.d.ts.map