openai 6.44.0 → 6.46.0

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 (482) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +85 -102
  3. package/_vendor/zod-to-json-schema/parseDef.d.mts.map +1 -1
  4. package/_vendor/zod-to-json-schema/parseDef.d.ts.map +1 -1
  5. package/_vendor/zod-to-json-schema/parseDef.js +41 -15
  6. package/_vendor/zod-to-json-schema/parseDef.js.map +1 -1
  7. package/_vendor/zod-to-json-schema/parseDef.mjs +41 -15
  8. package/_vendor/zod-to-json-schema/parseDef.mjs.map +1 -1
  9. package/_vendor/zod-to-json-schema/parsers/branded.d.mts +1 -1
  10. package/_vendor/zod-to-json-schema/parsers/branded.d.mts.map +1 -1
  11. package/_vendor/zod-to-json-schema/parsers/branded.d.ts +1 -1
  12. package/_vendor/zod-to-json-schema/parsers/branded.d.ts.map +1 -1
  13. package/_vendor/zod-to-json-schema/parsers/branded.js +2 -2
  14. package/_vendor/zod-to-json-schema/parsers/branded.js.map +1 -1
  15. package/_vendor/zod-to-json-schema/parsers/branded.mjs +2 -2
  16. package/_vendor/zod-to-json-schema/parsers/branded.mjs.map +1 -1
  17. package/_vendor/zod-to-json-schema/parsers/catch.d.mts +1 -1
  18. package/_vendor/zod-to-json-schema/parsers/catch.d.mts.map +1 -1
  19. package/_vendor/zod-to-json-schema/parsers/catch.d.ts +1 -1
  20. package/_vendor/zod-to-json-schema/parsers/catch.d.ts.map +1 -1
  21. package/_vendor/zod-to-json-schema/parsers/catch.js +2 -2
  22. package/_vendor/zod-to-json-schema/parsers/catch.js.map +1 -1
  23. package/_vendor/zod-to-json-schema/parsers/catch.mjs +2 -2
  24. package/_vendor/zod-to-json-schema/parsers/catch.mjs.map +1 -1
  25. package/_vendor/zod-to-json-schema/parsers/default.d.mts +1 -1
  26. package/_vendor/zod-to-json-schema/parsers/default.d.mts.map +1 -1
  27. package/_vendor/zod-to-json-schema/parsers/default.d.ts +1 -1
  28. package/_vendor/zod-to-json-schema/parsers/default.d.ts.map +1 -1
  29. package/_vendor/zod-to-json-schema/parsers/default.js +2 -2
  30. package/_vendor/zod-to-json-schema/parsers/default.js.map +1 -1
  31. package/_vendor/zod-to-json-schema/parsers/default.mjs +2 -2
  32. package/_vendor/zod-to-json-schema/parsers/default.mjs.map +1 -1
  33. package/_vendor/zod-to-json-schema/parsers/nullable.d.mts +1 -1
  34. package/_vendor/zod-to-json-schema/parsers/nullable.d.mts.map +1 -1
  35. package/_vendor/zod-to-json-schema/parsers/nullable.d.ts +1 -1
  36. package/_vendor/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
  37. package/_vendor/zod-to-json-schema/parsers/nullable.js +2 -2
  38. package/_vendor/zod-to-json-schema/parsers/nullable.js.map +1 -1
  39. package/_vendor/zod-to-json-schema/parsers/nullable.mjs +2 -2
  40. package/_vendor/zod-to-json-schema/parsers/nullable.mjs.map +1 -1
  41. package/_vendor/zod-to-json-schema/parsers/optional.d.mts +1 -1
  42. package/_vendor/zod-to-json-schema/parsers/optional.d.mts.map +1 -1
  43. package/_vendor/zod-to-json-schema/parsers/optional.d.ts +1 -1
  44. package/_vendor/zod-to-json-schema/parsers/optional.d.ts.map +1 -1
  45. package/_vendor/zod-to-json-schema/parsers/optional.js +3 -3
  46. package/_vendor/zod-to-json-schema/parsers/optional.js.map +1 -1
  47. package/_vendor/zod-to-json-schema/parsers/optional.mjs +3 -3
  48. package/_vendor/zod-to-json-schema/parsers/optional.mjs.map +1 -1
  49. package/_vendor/zod-to-json-schema/parsers/pipeline.d.mts +1 -1
  50. package/_vendor/zod-to-json-schema/parsers/pipeline.d.mts.map +1 -1
  51. package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts +1 -1
  52. package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts.map +1 -1
  53. package/_vendor/zod-to-json-schema/parsers/pipeline.js +3 -3
  54. package/_vendor/zod-to-json-schema/parsers/pipeline.js.map +1 -1
  55. package/_vendor/zod-to-json-schema/parsers/pipeline.mjs +3 -3
  56. package/_vendor/zod-to-json-schema/parsers/pipeline.mjs.map +1 -1
  57. package/_vendor/zod-to-json-schema/parsers/promise.d.mts +1 -1
  58. package/_vendor/zod-to-json-schema/parsers/promise.d.mts.map +1 -1
  59. package/_vendor/zod-to-json-schema/parsers/promise.d.ts +1 -1
  60. package/_vendor/zod-to-json-schema/parsers/promise.d.ts.map +1 -1
  61. package/_vendor/zod-to-json-schema/parsers/promise.js +2 -2
  62. package/_vendor/zod-to-json-schema/parsers/promise.js.map +1 -1
  63. package/_vendor/zod-to-json-schema/parsers/promise.mjs +2 -2
  64. package/_vendor/zod-to-json-schema/parsers/promise.mjs.map +1 -1
  65. package/_vendor/zod-to-json-schema/parsers/readonly.d.mts +1 -1
  66. package/_vendor/zod-to-json-schema/parsers/readonly.d.mts.map +1 -1
  67. package/_vendor/zod-to-json-schema/parsers/readonly.d.ts +1 -1
  68. package/_vendor/zod-to-json-schema/parsers/readonly.d.ts.map +1 -1
  69. package/_vendor/zod-to-json-schema/parsers/readonly.js +2 -2
  70. package/_vendor/zod-to-json-schema/parsers/readonly.js.map +1 -1
  71. package/_vendor/zod-to-json-schema/parsers/readonly.mjs +2 -2
  72. package/_vendor/zod-to-json-schema/parsers/readonly.mjs.map +1 -1
  73. package/auth/workload-identity-auth.d.mts.map +1 -1
  74. package/auth/workload-identity-auth.d.ts.map +1 -1
  75. package/auth/workload-identity-auth.js +12 -4
  76. package/auth/workload-identity-auth.js.map +1 -1
  77. package/auth/workload-identity-auth.mjs +13 -5
  78. package/auth/workload-identity-auth.mjs.map +1 -1
  79. package/azure.d.mts +3 -1
  80. package/azure.d.mts.map +1 -1
  81. package/azure.d.ts +3 -1
  82. package/azure.d.ts.map +1 -1
  83. package/azure.js.map +1 -1
  84. package/azure.mjs.map +1 -1
  85. package/beta/realtime/internal-base.d.mts +14 -1
  86. package/beta/realtime/internal-base.d.mts.map +1 -1
  87. package/beta/realtime/internal-base.d.ts +14 -1
  88. package/beta/realtime/internal-base.d.ts.map +1 -1
  89. package/beta/realtime/internal-base.js +21 -5
  90. package/beta/realtime/internal-base.js.map +1 -1
  91. package/beta/realtime/internal-base.mjs +21 -5
  92. package/beta/realtime/internal-base.mjs.map +1 -1
  93. package/beta/realtime/websocket.d.mts +3 -5
  94. package/beta/realtime/websocket.d.mts.map +1 -1
  95. package/beta/realtime/websocket.d.ts +3 -5
  96. package/beta/realtime/websocket.d.ts.map +1 -1
  97. package/beta/realtime/websocket.js +2 -3
  98. package/beta/realtime/websocket.js.map +1 -1
  99. package/beta/realtime/websocket.mjs +3 -4
  100. package/beta/realtime/websocket.mjs.map +1 -1
  101. package/beta/realtime/ws.d.mts +3 -5
  102. package/beta/realtime/ws.d.mts.map +1 -1
  103. package/beta/realtime/ws.d.ts +3 -5
  104. package/beta/realtime/ws.d.ts.map +1 -1
  105. package/beta/realtime/ws.js +2 -3
  106. package/beta/realtime/ws.js.map +1 -1
  107. package/beta/realtime/ws.mjs +3 -4
  108. package/beta/realtime/ws.mjs.map +1 -1
  109. package/client.d.mts +9 -1
  110. package/client.d.mts.map +1 -1
  111. package/client.d.ts +9 -1
  112. package/client.d.ts.map +1 -1
  113. package/client.js +56 -9
  114. package/client.js.map +1 -1
  115. package/client.mjs +56 -9
  116. package/client.mjs.map +1 -1
  117. package/helpers/audio.d.mts.map +1 -1
  118. package/helpers/audio.d.ts.map +1 -1
  119. package/helpers/audio.js +16 -3
  120. package/helpers/audio.js.map +1 -1
  121. package/helpers/audio.mjs +17 -4
  122. package/helpers/audio.mjs.map +1 -1
  123. package/helpers/zod.d.mts.map +1 -1
  124. package/helpers/zod.d.ts.map +1 -1
  125. package/helpers/zod.js +12 -0
  126. package/helpers/zod.js.map +1 -1
  127. package/helpers/zod.mjs +12 -0
  128. package/helpers/zod.mjs.map +1 -1
  129. package/internal/bedrock.d.mts +34 -0
  130. package/internal/bedrock.d.mts.map +1 -0
  131. package/internal/bedrock.d.ts +34 -0
  132. package/internal/bedrock.d.ts.map +1 -0
  133. package/internal/bedrock.js +107 -0
  134. package/internal/bedrock.js.map +1 -0
  135. package/internal/bedrock.mjs +99 -0
  136. package/internal/bedrock.mjs.map +1 -0
  137. package/internal/provider.d.mts +23 -0
  138. package/internal/provider.d.mts.map +1 -0
  139. package/internal/provider.d.ts +23 -0
  140. package/internal/provider.d.ts.map +1 -0
  141. package/internal/provider.js +36 -0
  142. package/internal/provider.js.map +1 -0
  143. package/internal/provider.mjs +32 -0
  144. package/internal/provider.mjs.map +1 -0
  145. package/internal/utils/log.d.mts.map +1 -1
  146. package/internal/utils/log.d.ts.map +1 -1
  147. package/internal/utils/log.js +1 -0
  148. package/internal/utils/log.js.map +1 -1
  149. package/internal/utils/log.mjs +1 -0
  150. package/internal/utils/log.mjs.map +1 -1
  151. package/lib/AbstractChatCompletionRunner.d.mts +15 -4
  152. package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
  153. package/lib/AbstractChatCompletionRunner.d.ts +15 -4
  154. package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  155. package/lib/AbstractChatCompletionRunner.js +77 -40
  156. package/lib/AbstractChatCompletionRunner.js.map +1 -1
  157. package/lib/AbstractChatCompletionRunner.mjs +77 -40
  158. package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  159. package/lib/AssistantStream.d.mts.map +1 -1
  160. package/lib/AssistantStream.d.ts.map +1 -1
  161. package/lib/AssistantStream.js +5 -25
  162. package/lib/AssistantStream.js.map +1 -1
  163. package/lib/AssistantStream.mjs +5 -25
  164. package/lib/AssistantStream.mjs.map +1 -1
  165. package/lib/ChatCompletionRunner.js +1 -1
  166. package/lib/ChatCompletionRunner.js.map +1 -1
  167. package/lib/ChatCompletionRunner.mjs +1 -1
  168. package/lib/ChatCompletionRunner.mjs.map +1 -1
  169. package/lib/ChatCompletionStream.d.mts.map +1 -1
  170. package/lib/ChatCompletionStream.d.ts.map +1 -1
  171. package/lib/ChatCompletionStream.js +11 -17
  172. package/lib/ChatCompletionStream.js.map +1 -1
  173. package/lib/ChatCompletionStream.mjs +11 -17
  174. package/lib/ChatCompletionStream.mjs.map +1 -1
  175. package/lib/ChatCompletionStreamingRunner.js +1 -1
  176. package/lib/ChatCompletionStreamingRunner.js.map +1 -1
  177. package/lib/ChatCompletionStreamingRunner.mjs +1 -1
  178. package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
  179. package/lib/EventEmitter.d.mts.map +1 -1
  180. package/lib/EventEmitter.d.ts.map +1 -1
  181. package/lib/EventEmitter.js +12 -2
  182. package/lib/EventEmitter.js.map +1 -1
  183. package/lib/EventEmitter.mjs +12 -2
  184. package/lib/EventEmitter.mjs.map +1 -1
  185. package/lib/EventStream.d.mts +1 -0
  186. package/lib/EventStream.d.mts.map +1 -1
  187. package/lib/EventStream.d.ts +1 -0
  188. package/lib/EventStream.d.ts.map +1 -1
  189. package/lib/EventStream.js +19 -2
  190. package/lib/EventStream.js.map +1 -1
  191. package/lib/EventStream.mjs +19 -2
  192. package/lib/EventStream.mjs.map +1 -1
  193. package/lib/ResponsesParser.d.mts.map +1 -1
  194. package/lib/ResponsesParser.d.ts.map +1 -1
  195. package/lib/ResponsesParser.js +12 -4
  196. package/lib/ResponsesParser.js.map +1 -1
  197. package/lib/ResponsesParser.mjs +12 -4
  198. package/lib/ResponsesParser.mjs.map +1 -1
  199. package/lib/responses/ResponseAccumulator.d.mts +15 -0
  200. package/lib/responses/ResponseAccumulator.d.mts.map +1 -0
  201. package/lib/responses/ResponseAccumulator.d.ts +15 -0
  202. package/lib/responses/ResponseAccumulator.d.ts.map +1 -0
  203. package/lib/responses/ResponseAccumulator.js +403 -0
  204. package/lib/responses/ResponseAccumulator.js.map +1 -0
  205. package/lib/responses/ResponseAccumulator.mjs +400 -0
  206. package/lib/responses/ResponseAccumulator.mjs.map +1 -0
  207. package/lib/responses/ResponseInputItems.d.mts +19 -0
  208. package/lib/responses/ResponseInputItems.d.mts.map +1 -0
  209. package/lib/responses/ResponseInputItems.d.ts +19 -0
  210. package/lib/responses/ResponseInputItems.d.ts.map +1 -0
  211. package/lib/responses/ResponseInputItems.js +104 -0
  212. package/lib/responses/ResponseInputItems.js.map +1 -0
  213. package/lib/responses/ResponseInputItems.mjs +100 -0
  214. package/lib/responses/ResponseInputItems.mjs.map +1 -0
  215. package/lib/responses/ResponseStream.d.mts.map +1 -1
  216. package/lib/responses/ResponseStream.d.ts.map +1 -1
  217. package/lib/responses/ResponseStream.js +5 -90
  218. package/lib/responses/ResponseStream.js.map +1 -1
  219. package/lib/responses/ResponseStream.mjs +5 -90
  220. package/lib/responses/ResponseStream.mjs.map +1 -1
  221. package/package.json +24 -1
  222. package/providers/bedrock/aws.d.mts +24 -0
  223. package/providers/bedrock/aws.d.mts.map +1 -0
  224. package/providers/bedrock/aws.d.ts +24 -0
  225. package/providers/bedrock/aws.d.ts.map +1 -0
  226. package/providers/bedrock/aws.js +170 -0
  227. package/providers/bedrock/aws.js.map +1 -0
  228. package/providers/bedrock/aws.mjs +166 -0
  229. package/providers/bedrock/aws.mjs.map +1 -0
  230. package/providers/bedrock.d.mts +7 -0
  231. package/providers/bedrock.d.mts.map +1 -0
  232. package/providers/bedrock.d.ts +7 -0
  233. package/providers/bedrock.d.ts.map +1 -0
  234. package/providers/bedrock.js +26 -0
  235. package/providers/bedrock.js.map +1 -0
  236. package/providers/bedrock.mjs +22 -0
  237. package/providers/bedrock.mjs.map +1 -0
  238. package/realtime/internal-base.d.mts +28 -1
  239. package/realtime/internal-base.d.mts.map +1 -1
  240. package/realtime/internal-base.d.ts +28 -1
  241. package/realtime/internal-base.d.ts.map +1 -1
  242. package/realtime/internal-base.js +50 -7
  243. package/realtime/internal-base.js.map +1 -1
  244. package/realtime/internal-base.mjs +49 -7
  245. package/realtime/internal-base.mjs.map +1 -1
  246. package/realtime/websocket.d.mts +4 -7
  247. package/realtime/websocket.d.mts.map +1 -1
  248. package/realtime/websocket.d.ts +4 -7
  249. package/realtime/websocket.d.ts.map +1 -1
  250. package/realtime/websocket.js +4 -8
  251. package/realtime/websocket.js.map +1 -1
  252. package/realtime/websocket.mjs +5 -9
  253. package/realtime/websocket.mjs.map +1 -1
  254. package/realtime/ws.d.mts +4 -7
  255. package/realtime/ws.d.mts.map +1 -1
  256. package/realtime/ws.d.ts +4 -7
  257. package/realtime/ws.d.ts.map +1 -1
  258. package/realtime/ws.js +4 -8
  259. package/realtime/ws.js.map +1 -1
  260. package/realtime/ws.mjs +5 -9
  261. package/realtime/ws.mjs.map +1 -1
  262. package/resources/beta/assistants.d.mts +12 -26
  263. package/resources/beta/assistants.d.mts.map +1 -1
  264. package/resources/beta/assistants.d.ts +12 -26
  265. package/resources/beta/assistants.d.ts.map +1 -1
  266. package/resources/beta/beta.d.mts +6 -1
  267. package/resources/beta/beta.d.mts.map +1 -1
  268. package/resources/beta/beta.d.ts +6 -1
  269. package/resources/beta/beta.d.ts.map +1 -1
  270. package/resources/beta/beta.js +4 -0
  271. package/resources/beta/beta.js.map +1 -1
  272. package/resources/beta/beta.mjs +4 -0
  273. package/resources/beta/beta.mjs.map +1 -1
  274. package/resources/beta/index.d.mts +1 -0
  275. package/resources/beta/index.d.mts.map +1 -1
  276. package/resources/beta/index.d.ts +1 -0
  277. package/resources/beta/index.d.ts.map +1 -1
  278. package/resources/beta/index.js +5 -3
  279. package/resources/beta/index.js.map +1 -1
  280. package/resources/beta/index.mjs +1 -0
  281. package/resources/beta/index.mjs.map +1 -1
  282. package/resources/beta/responses/index.d.mts +6 -0
  283. package/resources/beta/responses/index.d.mts.map +1 -0
  284. package/resources/beta/responses/index.d.ts +6 -0
  285. package/resources/beta/responses/index.d.ts.map +1 -0
  286. package/resources/beta/responses/index.js +11 -0
  287. package/resources/beta/responses/index.js.map +1 -0
  288. package/resources/beta/responses/index.mjs +5 -0
  289. package/resources/beta/responses/index.mjs.map +1 -0
  290. package/resources/beta/responses/input-items.d.mts +69 -0
  291. package/resources/beta/responses/input-items.d.mts.map +1 -0
  292. package/resources/beta/responses/input-items.d.ts +69 -0
  293. package/resources/beta/responses/input-items.d.ts.map +1 -0
  294. package/resources/beta/responses/input-items.js +37 -0
  295. package/resources/beta/responses/input-items.js.map +1 -0
  296. package/resources/beta/responses/input-items.mjs +33 -0
  297. package/resources/beta/responses/input-items.mjs.map +1 -0
  298. package/resources/beta/responses/input-tokens.d.mts +191 -0
  299. package/resources/beta/responses/input-tokens.d.mts.map +1 -0
  300. package/resources/beta/responses/input-tokens.d.ts +191 -0
  301. package/resources/beta/responses/input-tokens.d.ts.map +1 -0
  302. package/resources/beta/responses/input-tokens.js +34 -0
  303. package/resources/beta/responses/input-tokens.js.map +1 -0
  304. package/resources/beta/responses/input-tokens.mjs +30 -0
  305. package/resources/beta/responses/input-tokens.mjs.map +1 -0
  306. package/resources/beta/responses/internal-base.d.mts +71 -0
  307. package/resources/beta/responses/internal-base.d.mts.map +1 -0
  308. package/resources/beta/responses/internal-base.d.ts +71 -0
  309. package/resources/beta/responses/internal-base.d.ts.map +1 -0
  310. package/resources/beta/responses/internal-base.js +48 -0
  311. package/resources/beta/responses/internal-base.js.map +1 -0
  312. package/resources/beta/responses/internal-base.mjs +42 -0
  313. package/resources/beta/responses/internal-base.mjs.map +1 -0
  314. package/resources/beta/responses/responses.d.mts +9985 -0
  315. package/resources/beta/responses/responses.d.mts.map +1 -0
  316. package/resources/beta/responses/responses.d.ts +9985 -0
  317. package/resources/beta/responses/responses.d.ts.map +1 -0
  318. package/resources/beta/responses/responses.js +121 -0
  319. package/resources/beta/responses/responses.js.map +1 -0
  320. package/resources/beta/responses/responses.mjs +116 -0
  321. package/resources/beta/responses/responses.mjs.map +1 -0
  322. package/resources/beta/responses/ws-base.d.mts +106 -0
  323. package/resources/beta/responses/ws-base.d.mts.map +1 -0
  324. package/resources/beta/responses/ws-base.d.ts +106 -0
  325. package/resources/beta/responses/ws-base.d.ts.map +1 -0
  326. package/resources/beta/responses/ws-base.js +476 -0
  327. package/resources/beta/responses/ws-base.js.map +1 -0
  328. package/resources/beta/responses/ws-base.mjs +472 -0
  329. package/resources/beta/responses/ws-base.mjs.map +1 -0
  330. package/resources/beta/responses/ws.d.mts +13 -0
  331. package/resources/beta/responses/ws.d.mts.map +1 -0
  332. package/resources/beta/responses/ws.d.ts +13 -0
  333. package/resources/beta/responses/ws.d.ts.map +1 -0
  334. package/resources/beta/responses/ws.js +31 -0
  335. package/resources/beta/responses/ws.js.map +1 -0
  336. package/resources/beta/responses/ws.mjs +26 -0
  337. package/resources/beta/responses/ws.mjs.map +1 -0
  338. package/resources/beta/responses.d.mts +2 -0
  339. package/resources/beta/responses.d.mts.map +1 -0
  340. package/resources/beta/responses.d.ts +2 -0
  341. package/resources/beta/responses.d.ts.map +1 -0
  342. package/resources/beta/responses.js +6 -0
  343. package/resources/beta/responses.js.map +1 -0
  344. package/resources/beta/responses.mjs +3 -0
  345. package/resources/beta/responses.mjs.map +1 -0
  346. package/resources/beta/threads/runs/runs.d.mts +6 -13
  347. package/resources/beta/threads/runs/runs.d.mts.map +1 -1
  348. package/resources/beta/threads/runs/runs.d.ts +6 -13
  349. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  350. package/resources/beta/threads/runs/runs.js.map +1 -1
  351. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  352. package/resources/chat/completions/completions.d.mts +155 -14
  353. package/resources/chat/completions/completions.d.mts.map +1 -1
  354. package/resources/chat/completions/completions.d.ts +155 -14
  355. package/resources/chat/completions/completions.d.ts.map +1 -1
  356. package/resources/chat/completions/completions.js.map +1 -1
  357. package/resources/chat/completions/completions.mjs.map +1 -1
  358. package/resources/completions.d.mts +4 -0
  359. package/resources/completions.d.mts.map +1 -1
  360. package/resources/completions.d.ts +4 -0
  361. package/resources/completions.d.ts.map +1 -1
  362. package/resources/conversations/conversations.d.mts +19 -0
  363. package/resources/conversations/conversations.d.mts.map +1 -1
  364. package/resources/conversations/conversations.d.ts +19 -0
  365. package/resources/conversations/conversations.d.ts.map +1 -1
  366. package/resources/conversations/conversations.js.map +1 -1
  367. package/resources/conversations/conversations.mjs.map +1 -1
  368. package/resources/conversations/items.d.mts +45 -1
  369. package/resources/conversations/items.d.mts.map +1 -1
  370. package/resources/conversations/items.d.ts +45 -1
  371. package/resources/conversations/items.d.ts.map +1 -1
  372. package/resources/evals/runs/runs.d.mts +66 -143
  373. package/resources/evals/runs/runs.d.mts.map +1 -1
  374. package/resources/evals/runs/runs.d.ts +66 -143
  375. package/resources/evals/runs/runs.d.ts.map +1 -1
  376. package/resources/evals/runs/runs.js.map +1 -1
  377. package/resources/evals/runs/runs.mjs.map +1 -1
  378. package/resources/graders/grader-models.d.mts +6 -13
  379. package/resources/graders/grader-models.d.mts.map +1 -1
  380. package/resources/graders/grader-models.d.ts +6 -13
  381. package/resources/graders/grader-models.d.ts.map +1 -1
  382. package/resources/realtime/calls.d.mts +1 -1
  383. package/resources/realtime/calls.d.mts.map +1 -1
  384. package/resources/realtime/calls.d.ts +1 -1
  385. package/resources/realtime/calls.d.ts.map +1 -1
  386. package/resources/realtime/client-secrets.d.mts +5 -1
  387. package/resources/realtime/client-secrets.d.mts.map +1 -1
  388. package/resources/realtime/client-secrets.d.ts +5 -1
  389. package/resources/realtime/client-secrets.d.ts.map +1 -1
  390. package/resources/realtime/realtime.d.mts +9 -1
  391. package/resources/realtime/realtime.d.mts.map +1 -1
  392. package/resources/realtime/realtime.d.ts +9 -1
  393. package/resources/realtime/realtime.d.ts.map +1 -1
  394. package/resources/realtime/realtime.js.map +1 -1
  395. package/resources/realtime/realtime.mjs.map +1 -1
  396. package/resources/responses/input-tokens.d.mts +7 -1
  397. package/resources/responses/input-tokens.d.mts.map +1 -1
  398. package/resources/responses/input-tokens.d.ts +7 -1
  399. package/resources/responses/input-tokens.d.ts.map +1 -1
  400. package/resources/responses/responses.d.mts +816 -24
  401. package/resources/responses/responses.d.mts.map +1 -1
  402. package/resources/responses/responses.d.ts +816 -24
  403. package/resources/responses/responses.d.ts.map +1 -1
  404. package/resources/responses/responses.js +1 -1
  405. package/resources/responses/responses.js.map +1 -1
  406. package/resources/responses/responses.mjs +1 -1
  407. package/resources/responses/responses.mjs.map +1 -1
  408. package/resources/shared.d.mts +20 -28
  409. package/resources/shared.d.mts.map +1 -1
  410. package/resources/shared.d.ts +20 -28
  411. package/resources/shared.d.ts.map +1 -1
  412. package/resources/webhooks/webhooks.d.mts +54 -2
  413. package/resources/webhooks/webhooks.d.mts.map +1 -1
  414. package/resources/webhooks/webhooks.d.ts +54 -2
  415. package/resources/webhooks/webhooks.d.ts.map +1 -1
  416. package/src/_vendor/zod-to-json-schema/parseDef.ts +44 -16
  417. package/src/_vendor/zod-to-json-schema/parsers/branded.ts +2 -2
  418. package/src/_vendor/zod-to-json-schema/parsers/catch.ts +2 -2
  419. package/src/_vendor/zod-to-json-schema/parsers/default.ts +6 -2
  420. package/src/_vendor/zod-to-json-schema/parsers/nullable.ts +13 -5
  421. package/src/_vendor/zod-to-json-schema/parsers/optional.ts +14 -6
  422. package/src/_vendor/zod-to-json-schema/parsers/pipeline.ts +3 -2
  423. package/src/_vendor/zod-to-json-schema/parsers/promise.ts +6 -2
  424. package/src/_vendor/zod-to-json-schema/parsers/readonly.ts +2 -2
  425. package/src/auth/workload-identity-auth.ts +16 -5
  426. package/src/azure.ts +4 -1
  427. package/src/beta/realtime/internal-base.ts +43 -5
  428. package/src/beta/realtime/websocket.ts +10 -7
  429. package/src/beta/realtime/ws.ts +10 -7
  430. package/src/client.ts +80 -18
  431. package/src/helpers/audio.ts +18 -4
  432. package/src/helpers/zod.ts +16 -0
  433. package/src/internal/bedrock.ts +153 -0
  434. package/src/internal/provider.ts +60 -0
  435. package/src/internal/utils/log.ts +1 -0
  436. package/src/lib/AbstractChatCompletionRunner.ts +111 -45
  437. package/src/lib/AssistantStream.ts +5 -21
  438. package/src/lib/ChatCompletionRunner.ts +1 -1
  439. package/src/lib/ChatCompletionStream.ts +11 -15
  440. package/src/lib/ChatCompletionStreamingRunner.ts +1 -1
  441. package/src/lib/EventEmitter.ts +11 -2
  442. package/src/lib/EventStream.ts +20 -0
  443. package/src/lib/ResponsesParser.ts +18 -4
  444. package/src/lib/responses/ResponseAccumulator.ts +421 -0
  445. package/src/lib/responses/ResponseInputItems.ts +129 -0
  446. package/src/lib/responses/ResponseStream.ts +4 -93
  447. package/src/providers/bedrock/aws.ts +255 -0
  448. package/src/providers/bedrock.ts +33 -0
  449. package/src/realtime/internal-base.ts +90 -7
  450. package/src/realtime/websocket.ts +15 -13
  451. package/src/realtime/ws.ts +15 -13
  452. package/src/resources/beta/assistants.ts +12 -26
  453. package/src/resources/beta/beta.ts +330 -2
  454. package/src/resources/beta/index.ts +163 -0
  455. package/src/resources/beta/responses/index.ts +169 -0
  456. package/src/resources/beta/responses/input-items.ts +105 -0
  457. package/src/resources/beta/responses/input-tokens.ts +245 -0
  458. package/src/resources/beta/responses/internal-base.ts +117 -0
  459. package/src/resources/beta/responses/responses.ts +12632 -0
  460. package/src/resources/beta/responses/ws-base.ts +615 -0
  461. package/src/resources/beta/responses/ws.ts +38 -0
  462. package/src/resources/beta/responses.ts +3 -0
  463. package/src/resources/beta/threads/runs/runs.ts +6 -13
  464. package/src/resources/chat/completions/completions.ts +171 -14
  465. package/src/resources/completions.ts +5 -0
  466. package/src/resources/conversations/conversations.ts +21 -0
  467. package/src/resources/conversations/items.ts +56 -0
  468. package/src/resources/evals/runs/runs.ts +66 -143
  469. package/src/resources/graders/grader-models.ts +6 -13
  470. package/src/resources/realtime/calls.ts +2 -0
  471. package/src/resources/realtime/client-secrets.ts +7 -0
  472. package/src/resources/realtime/realtime.ts +12 -0
  473. package/src/resources/responses/input-tokens.ts +8 -0
  474. package/src/resources/responses/responses.ts +950 -15
  475. package/src/resources/shared.ts +23 -27
  476. package/src/resources/webhooks/api.md +1 -0
  477. package/src/resources/webhooks/webhooks.ts +65 -1
  478. package/src/version.ts +1 -1
  479. package/version.d.mts +1 -1
  480. package/version.d.ts +1 -1
  481. package/version.js +1 -1
  482. package/version.mjs +1 -1
@@ -21,7 +21,7 @@ export interface ParsedResponseOutputMessage<ParsedT> extends ResponseOutputMess
21
21
  export interface ParsedResponseFunctionToolCall extends ResponseFunctionToolCall {
22
22
  parsed_arguments: any;
23
23
  }
24
- export type ParsedResponseOutputItem<ParsedT> = ParsedResponseOutputMessage<ParsedT> | ParsedResponseFunctionToolCall | ResponseFileSearchToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseOutputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
24
+ export type ParsedResponseOutputItem<ParsedT> = ParsedResponseOutputMessage<ParsedT> | ParsedResponseFunctionToolCall | ResponseFileSearchToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseOutputItem.Program | ResponseOutputItem.ProgramOutput | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseOutputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
25
25
  export interface ParsedResponse<ParsedT> extends Response {
26
26
  output: Array<ParsedResponseOutputItem<ParsedT>>;
27
27
  output_parsed: ParsedT | null;
@@ -104,7 +104,7 @@ export declare class Responses extends APIResource {
104
104
  * @example
105
105
  * ```ts
106
106
  * const compactedResponse = await client.responses.compact({
107
- * model: 'gpt-5.4',
107
+ * model: 'gpt-5.6-sol',
108
108
  * });
109
109
  * ```
110
110
  */
@@ -119,6 +119,10 @@ export interface ApplyPatchTool {
119
119
  * The type of the tool. Always `apply_patch`.
120
120
  */
121
121
  type: 'apply_patch';
122
+ /**
123
+ * The tool invocation context(s).
124
+ */
125
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
122
126
  }
123
127
  export interface CompactedResponse {
124
128
  /**
@@ -456,6 +460,10 @@ export interface CustomTool {
456
460
  * The type of the custom tool. Always `custom`.
457
461
  */
458
462
  type: 'custom';
463
+ /**
464
+ * The tool invocation context(s).
465
+ */
466
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
459
467
  /**
460
468
  * Whether this tool should be deferred and discovered via tool search.
461
469
  */
@@ -573,6 +581,10 @@ export interface FunctionShellTool {
573
581
  * The type of the shell tool. Always `shell`.
574
582
  */
575
583
  type: 'shell';
584
+ /**
585
+ * The tool invocation context(s).
586
+ */
587
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
576
588
  environment?: ContainerAuto | LocalEnvironment | ContainerReference | null;
577
589
  }
578
590
  /**
@@ -592,13 +604,17 @@ export interface FunctionTool {
592
604
  [key: string]: unknown;
593
605
  } | null;
594
606
  /**
595
- * Whether to enforce strict parameter validation. Default `true`.
607
+ * Whether strict parameter validation is enforced for this function tool.
596
608
  */
597
609
  strict: boolean | null;
598
610
  /**
599
611
  * The type of the function tool. Always `function`.
600
612
  */
601
613
  type: 'function';
614
+ /**
615
+ * The tool invocation context(s).
616
+ */
617
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
602
618
  /**
603
619
  * Whether this function is deferred and loaded via tool search.
604
620
  */
@@ -608,6 +624,13 @@ export interface FunctionTool {
608
624
  * call the function.
609
625
  */
610
626
  description?: string | null;
627
+ /**
628
+ * A JSON schema object describing the JSON value encoded in string outputs for
629
+ * this function.
630
+ */
631
+ output_schema?: {
632
+ [key: string]: unknown;
633
+ } | null;
611
634
  }
612
635
  export interface InlineSkill {
613
636
  /**
@@ -693,12 +716,28 @@ export declare namespace NamespaceTool {
693
716
  interface Function {
694
717
  name: string;
695
718
  type: 'function';
719
+ /**
720
+ * The tool invocation context(s).
721
+ */
722
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
696
723
  /**
697
724
  * Whether this function should be deferred and discovered via tool search.
698
725
  */
699
726
  defer_loading?: boolean;
700
727
  description?: string | null;
728
+ /**
729
+ * A JSON Schema describing the JSON value encoded in string outputs for this
730
+ * function tool. This does not describe content-array outputs.
731
+ */
732
+ output_schema?: {
733
+ [key: string]: unknown;
734
+ } | null;
701
735
  parameters?: unknown | null;
736
+ /**
737
+ * Whether to enforce strict parameter validation. If omitted, Responses attempts
738
+ * to use strict validation when the schema is compatible, and falls back to
739
+ * non-strict validation otherwise.
740
+ */
702
741
  strict?: boolean | null;
703
742
  }
704
743
  }
@@ -775,7 +814,7 @@ export interface Response {
775
814
  * response. See the `tools` parameter to see how to specify which tools the model
776
815
  * can call.
777
816
  */
778
- tool_choice: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ToolChoiceApplyPatch | ToolChoiceShell;
817
+ tool_choice: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | Response.SpecificProgrammaticToolCallingParam | ToolChoiceApplyPatch | ToolChoiceShell;
779
818
  /**
780
819
  * An array of tools the model may call while generating a response. You can
781
820
  * specify which tool to use by setting the `tool_choice` parameter.
@@ -851,11 +890,21 @@ export interface Response {
851
890
  */
852
891
  prompt_cache_key?: string;
853
892
  /**
893
+ * The prompt-caching options that were applied to the response. Supported for
894
+ * `gpt-5.6` and later models.
895
+ */
896
+ prompt_cache_options?: Response.PromptCacheOptions;
897
+ /**
898
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
899
+ *
854
900
  * The retention policy for the prompt cache. Set to `24h` to enable extended
855
901
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
856
902
  * of 24 hours.
857
903
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
858
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
904
+ * This field expresses a maximum retention policy, while
905
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
906
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
907
+ * models, only `24h` is supported.
859
908
  *
860
909
  * For older models that support both `in_memory` and `24h`, the default depends on
861
910
  * your organization's data retention policy:
@@ -953,6 +1002,12 @@ export declare namespace Response {
953
1002
  */
954
1003
  reason?: 'max_output_tokens' | 'content_filter';
955
1004
  }
1005
+ interface SpecificProgrammaticToolCallingParam {
1006
+ /**
1007
+ * The tool to call. Always `programmatic_tool_calling`.
1008
+ */
1009
+ type: 'programmatic_tool_calling';
1010
+ }
956
1011
  /**
957
1012
  * The conversation that this response belonged to. Input items and output items
958
1013
  * from this response were automatically added to this conversation.
@@ -1087,6 +1142,20 @@ export declare namespace Response {
1087
1142
  type: 'error';
1088
1143
  }
1089
1144
  }
1145
+ /**
1146
+ * The prompt-caching options that were applied to the response. Supported for
1147
+ * `gpt-5.6` and later models.
1148
+ */
1149
+ interface PromptCacheOptions {
1150
+ /**
1151
+ * Whether implicit prompt-cache breakpoints were enabled.
1152
+ */
1153
+ mode: 'implicit' | 'explicit';
1154
+ /**
1155
+ * The minimum lifetime applied to each cache breakpoint.
1156
+ */
1157
+ ttl: '30m';
1158
+ }
1090
1159
  }
1091
1160
  /**
1092
1161
  * A tool call that applies file diffs by creating, deleting, or updating files.
@@ -1114,6 +1183,10 @@ export interface ResponseApplyPatchToolCall {
1114
1183
  * The type of the item. Always `apply_patch_call`.
1115
1184
  */
1116
1185
  type: 'apply_patch_call';
1186
+ /**
1187
+ * The execution context that produced this tool call.
1188
+ */
1189
+ caller?: ResponseApplyPatchToolCall.Direct | ResponseApplyPatchToolCall.Program | null;
1117
1190
  /**
1118
1191
  * The ID of the entity that created this tool call.
1119
1192
  */
@@ -1167,6 +1240,16 @@ export declare namespace ResponseApplyPatchToolCall {
1167
1240
  */
1168
1241
  type: 'update_file';
1169
1242
  }
1243
+ interface Direct {
1244
+ type: 'direct';
1245
+ }
1246
+ interface Program {
1247
+ /**
1248
+ * The call ID of the program item that produced this tool call.
1249
+ */
1250
+ caller_id: string;
1251
+ type: 'program';
1252
+ }
1170
1253
  }
1171
1254
  /**
1172
1255
  * The output emitted by an apply patch tool call.
@@ -1189,6 +1272,10 @@ export interface ResponseApplyPatchToolCallOutput {
1189
1272
  * The type of the item. Always `apply_patch_call_output`.
1190
1273
  */
1191
1274
  type: 'apply_patch_call_output';
1275
+ /**
1276
+ * The execution context that produced this tool call.
1277
+ */
1278
+ caller?: ResponseApplyPatchToolCallOutput.Direct | ResponseApplyPatchToolCallOutput.Program | null;
1192
1279
  /**
1193
1280
  * The ID of the entity that created this tool call output.
1194
1281
  */
@@ -1198,6 +1285,18 @@ export interface ResponseApplyPatchToolCallOutput {
1198
1285
  */
1199
1286
  output?: string | null;
1200
1287
  }
1288
+ export declare namespace ResponseApplyPatchToolCallOutput {
1289
+ interface Direct {
1290
+ type: 'direct';
1291
+ }
1292
+ interface Program {
1293
+ /**
1294
+ * The call ID of the program item that produced this tool call.
1295
+ */
1296
+ caller_id: string;
1297
+ type: 'program';
1298
+ }
1299
+ }
1201
1300
  /**
1202
1301
  * Emitted when there is a partial audio response.
1203
1302
  */
@@ -1973,11 +2072,27 @@ export interface ResponseCustomToolCall {
1973
2072
  * The unique ID of the custom tool call in the OpenAI platform.
1974
2073
  */
1975
2074
  id?: string;
2075
+ /**
2076
+ * The execution context that produced this tool call.
2077
+ */
2078
+ caller?: ResponseCustomToolCall.Direct | ResponseCustomToolCall.Program | null;
1976
2079
  /**
1977
2080
  * The namespace of the custom tool being called.
1978
2081
  */
1979
2082
  namespace?: string;
1980
2083
  }
2084
+ export declare namespace ResponseCustomToolCall {
2085
+ interface Direct {
2086
+ type: 'direct';
2087
+ }
2088
+ interface Program {
2089
+ /**
2090
+ * The call ID of the program item that produced this tool call.
2091
+ */
2092
+ caller_id: string;
2093
+ type: 'program';
2094
+ }
2095
+ }
1981
2096
  /**
1982
2097
  * Event representing a delta (partial update) to the input of a custom tool call.
1983
2098
  */
@@ -2067,6 +2182,28 @@ export interface ResponseCustomToolCallOutput {
2067
2182
  * The unique ID of the custom tool call output in the OpenAI platform.
2068
2183
  */
2069
2184
  id?: string;
2185
+ /**
2186
+ * The execution context that produced this tool call.
2187
+ */
2188
+ caller?: ResponseCustomToolCallOutput.Direct | ResponseCustomToolCallOutput.Program | null;
2189
+ }
2190
+ export declare namespace ResponseCustomToolCallOutput {
2191
+ interface Direct {
2192
+ /**
2193
+ * The caller type. Always `direct`.
2194
+ */
2195
+ type: 'direct';
2196
+ }
2197
+ interface Program {
2198
+ /**
2199
+ * The call ID of the program item that produced this tool call.
2200
+ */
2201
+ caller_id: string;
2202
+ /**
2203
+ * The caller type. Always `program`.
2204
+ */
2205
+ type: 'program';
2206
+ }
2070
2207
  }
2071
2208
  /**
2072
2209
  * The output of a custom tool call from your code, being sent back to the model.
@@ -2093,7 +2230,7 @@ export interface ResponseError {
2093
2230
  /**
2094
2231
  * The error code for the response.
2095
2232
  */
2096
- code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
2233
+ code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'bio_policy' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
2097
2234
  /**
2098
2235
  * A human-readable description of the error.
2099
2236
  */
@@ -2444,6 +2581,10 @@ export interface ResponseFunctionShellToolCall {
2444
2581
  * The type of the item. Always `shell_call`.
2445
2582
  */
2446
2583
  type: 'shell_call';
2584
+ /**
2585
+ * The execution context that produced this tool call.
2586
+ */
2587
+ caller?: ResponseFunctionShellToolCall.Direct | ResponseFunctionShellToolCall.Program | null;
2447
2588
  /**
2448
2589
  * The ID of the entity that created this tool call.
2449
2590
  */
@@ -2464,6 +2605,16 @@ export declare namespace ResponseFunctionShellToolCall {
2464
2605
  */
2465
2606
  timeout_ms: number | null;
2466
2607
  }
2608
+ interface Direct {
2609
+ type: 'direct';
2610
+ }
2611
+ interface Program {
2612
+ /**
2613
+ * The call ID of the program item that produced this tool call.
2614
+ */
2615
+ caller_id: string;
2616
+ type: 'program';
2617
+ }
2467
2618
  }
2468
2619
  /**
2469
2620
  * The output of a shell tool call that was emitted.
@@ -2496,6 +2647,10 @@ export interface ResponseFunctionShellToolCallOutput {
2496
2647
  * The type of the shell call output. Always `shell_call_output`.
2497
2648
  */
2498
2649
  type: 'shell_call_output';
2650
+ /**
2651
+ * The execution context that produced this tool call.
2652
+ */
2653
+ caller?: ResponseFunctionShellToolCallOutput.Direct | ResponseFunctionShellToolCallOutput.Program | null;
2499
2654
  /**
2500
2655
  * The identifier of the actor that created the item.
2501
2656
  */
@@ -2548,6 +2703,16 @@ export declare namespace ResponseFunctionShellToolCallOutput {
2548
2703
  type: 'exit';
2549
2704
  }
2550
2705
  }
2706
+ interface Direct {
2707
+ type: 'direct';
2708
+ }
2709
+ interface Program {
2710
+ /**
2711
+ * The call ID of the program item that produced this tool call.
2712
+ */
2713
+ caller_id: string;
2714
+ type: 'program';
2715
+ }
2551
2716
  }
2552
2717
  /**
2553
2718
  * A tool call to run a function. See the
@@ -2575,6 +2740,10 @@ export interface ResponseFunctionToolCall {
2575
2740
  * The unique ID of the function tool call.
2576
2741
  */
2577
2742
  id?: string;
2743
+ /**
2744
+ * The execution context that produced this tool call.
2745
+ */
2746
+ caller?: ResponseFunctionToolCall.Direct | ResponseFunctionToolCall.Program | null;
2578
2747
  /**
2579
2748
  * The namespace of the function to run.
2580
2749
  */
@@ -2585,6 +2754,18 @@ export interface ResponseFunctionToolCall {
2585
2754
  */
2586
2755
  status?: 'in_progress' | 'completed' | 'incomplete';
2587
2756
  }
2757
+ export declare namespace ResponseFunctionToolCall {
2758
+ interface Direct {
2759
+ type: 'direct';
2760
+ }
2761
+ interface Program {
2762
+ /**
2763
+ * The call ID of the program item that produced this tool call.
2764
+ */
2765
+ caller_id: string;
2766
+ type: 'program';
2767
+ }
2768
+ }
2588
2769
  /**
2589
2770
  * A tool call to run a function. See the
2590
2771
  * [function calling guide](https://platform.openai.com/docs/guides/function-calling)
@@ -2628,11 +2809,33 @@ export interface ResponseFunctionToolCallOutputItem {
2628
2809
  * The type of the function tool call output. Always `function_call_output`.
2629
2810
  */
2630
2811
  type: 'function_call_output';
2812
+ /**
2813
+ * The execution context that produced this tool call.
2814
+ */
2815
+ caller?: ResponseFunctionToolCallOutputItem.Direct | ResponseFunctionToolCallOutputItem.Program | null;
2631
2816
  /**
2632
2817
  * The identifier of the actor that created the item.
2633
2818
  */
2634
2819
  created_by?: string;
2635
2820
  }
2821
+ export declare namespace ResponseFunctionToolCallOutputItem {
2822
+ interface Direct {
2823
+ /**
2824
+ * The caller type. Always `direct`.
2825
+ */
2826
+ type: 'direct';
2827
+ }
2828
+ interface Program {
2829
+ /**
2830
+ * The call ID of the program item that produced this tool call.
2831
+ */
2832
+ caller_id: string;
2833
+ /**
2834
+ * The caller type. Always `program`.
2835
+ */
2836
+ type: 'program';
2837
+ }
2838
+ }
2636
2839
  /**
2637
2840
  * The results of a web search tool call. See the
2638
2841
  * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for
@@ -2920,11 +3123,13 @@ export interface ResponseInputFile {
2920
3123
  */
2921
3124
  type: 'input_file';
2922
3125
  /**
2923
- * The detail level of the file to be sent to the model. Use `low` for the default
2924
- * rendering behavior, or `high` to render the file at higher quality. Defaults to
2925
- * `low`.
3126
+ * The detail level of the file to be sent to the model. Use `auto` to let the
3127
+ * system select the detail level; for GPT-5.6 and later models, `auto` uses
3128
+ * high-quality rendering, which may increase input token usage. Use `low` for
3129
+ * lower-cost rendering, or `high` to render the file at higher quality. Defaults
3130
+ * to `auto`.
2926
3131
  */
2927
- detail?: 'low' | 'high';
3132
+ detail?: 'auto' | 'low' | 'high';
2928
3133
  /**
2929
3134
  * The content of the file to be sent to the model.
2930
3135
  */
@@ -2941,6 +3146,25 @@ export interface ResponseInputFile {
2941
3146
  * The name of the file to be sent to the model.
2942
3147
  */
2943
3148
  filename?: string;
3149
+ /**
3150
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3151
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3152
+ * token block.
3153
+ */
3154
+ prompt_cache_breakpoint?: ResponseInputFile.PromptCacheBreakpoint;
3155
+ }
3156
+ export declare namespace ResponseInputFile {
3157
+ /**
3158
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3159
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3160
+ * token block.
3161
+ */
3162
+ interface PromptCacheBreakpoint {
3163
+ /**
3164
+ * The breakpoint mode. Always `explicit`.
3165
+ */
3166
+ mode: 'explicit';
3167
+ }
2944
3168
  }
2945
3169
  /**
2946
3170
  * A file input to the model.
@@ -2951,11 +3175,13 @@ export interface ResponseInputFileContent {
2951
3175
  */
2952
3176
  type: 'input_file';
2953
3177
  /**
2954
- * The detail level of the file to be sent to the model. Use `low` for the default
2955
- * rendering behavior, or `high` to render the file at higher quality. Defaults to
2956
- * `low`.
3178
+ * The detail level of the file to be sent to the model. Use `auto` to let the
3179
+ * system select the detail level; for GPT-5.6 and later models, `auto` uses
3180
+ * high-quality rendering, which may increase input token usage. Use `low` for
3181
+ * lower-cost rendering, or `high` to render the file at higher quality. Defaults
3182
+ * to `auto`.
2957
3183
  */
2958
- detail?: 'low' | 'high';
3184
+ detail?: 'auto' | 'low' | 'high';
2959
3185
  /**
2960
3186
  * The base64-encoded data of the file to be sent to the model.
2961
3187
  */
@@ -2972,6 +3198,25 @@ export interface ResponseInputFileContent {
2972
3198
  * The name of the file to be sent to the model.
2973
3199
  */
2974
3200
  filename?: string | null;
3201
+ /**
3202
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3203
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3204
+ * token block.
3205
+ */
3206
+ prompt_cache_breakpoint?: ResponseInputFileContent.PromptCacheBreakpoint | null;
3207
+ }
3208
+ export declare namespace ResponseInputFileContent {
3209
+ /**
3210
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3211
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3212
+ * token block.
3213
+ */
3214
+ interface PromptCacheBreakpoint {
3215
+ /**
3216
+ * The breakpoint mode. Always `explicit`.
3217
+ */
3218
+ mode: 'explicit';
3219
+ }
2975
3220
  }
2976
3221
  /**
2977
3222
  * An image input to the model. Learn about
@@ -2996,6 +3241,25 @@ export interface ResponseInputImage {
2996
3241
  * encoded image in a data URL.
2997
3242
  */
2998
3243
  image_url?: string | null;
3244
+ /**
3245
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3246
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3247
+ * token block.
3248
+ */
3249
+ prompt_cache_breakpoint?: ResponseInputImage.PromptCacheBreakpoint;
3250
+ }
3251
+ export declare namespace ResponseInputImage {
3252
+ /**
3253
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3254
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3255
+ * token block.
3256
+ */
3257
+ interface PromptCacheBreakpoint {
3258
+ /**
3259
+ * The breakpoint mode. Always `explicit`.
3260
+ */
3261
+ mode: 'explicit';
3262
+ }
2999
3263
  }
3000
3264
  /**
3001
3265
  * An image input to the model. Learn about
@@ -3020,6 +3284,25 @@ export interface ResponseInputImageContent {
3020
3284
  * encoded image in a data URL.
3021
3285
  */
3022
3286
  image_url?: string | null;
3287
+ /**
3288
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3289
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3290
+ * token block.
3291
+ */
3292
+ prompt_cache_breakpoint?: ResponseInputImageContent.PromptCacheBreakpoint | null;
3293
+ }
3294
+ export declare namespace ResponseInputImageContent {
3295
+ /**
3296
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3297
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3298
+ * token block.
3299
+ */
3300
+ interface PromptCacheBreakpoint {
3301
+ /**
3302
+ * The breakpoint mode. Always `explicit`.
3303
+ */
3304
+ mode: 'explicit';
3305
+ }
3023
3306
  }
3024
3307
  /**
3025
3308
  * A message input to the model with a role indicating instruction following
@@ -3028,7 +3311,7 @@ export interface ResponseInputImageContent {
3028
3311
  * `assistant` role are presumed to have been generated by the model in previous
3029
3312
  * interactions.
3030
3313
  */
3031
- export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference;
3314
+ export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference | ResponseInputItem.Program | ResponseInputItem.ProgramOutput;
3032
3315
  export declare namespace ResponseInputItem {
3033
3316
  /**
3034
3317
  * A message input to the model with a role indicating instruction following
@@ -3126,12 +3409,34 @@ export declare namespace ResponseInputItem {
3126
3409
  * returned via API.
3127
3410
  */
3128
3411
  id?: string | null;
3412
+ /**
3413
+ * The execution context that produced this tool call.
3414
+ */
3415
+ caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
3129
3416
  /**
3130
3417
  * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3131
3418
  * Populated when items are returned via API.
3132
3419
  */
3133
3420
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
3134
3421
  }
3422
+ namespace FunctionCallOutput {
3423
+ interface Direct {
3424
+ /**
3425
+ * The caller type. Always `direct`.
3426
+ */
3427
+ type: 'direct';
3428
+ }
3429
+ interface Program {
3430
+ /**
3431
+ * The call ID of the program item that produced this tool call.
3432
+ */
3433
+ caller_id: string;
3434
+ /**
3435
+ * The caller type. Always `program`.
3436
+ */
3437
+ type: 'program';
3438
+ }
3439
+ }
3135
3440
  interface ToolSearchCall {
3136
3441
  /**
3137
3442
  * The arguments supplied to the tool search call.
@@ -3297,6 +3602,10 @@ export declare namespace ResponseInputItem {
3297
3602
  * API.
3298
3603
  */
3299
3604
  id?: string | null;
3605
+ /**
3606
+ * The execution context that produced this tool call.
3607
+ */
3608
+ caller?: ShellCall.Direct | ShellCall.Program | null;
3300
3609
  /**
3301
3610
  * The environment to execute the shell commands in.
3302
3611
  */
@@ -3326,6 +3635,22 @@ export declare namespace ResponseInputItem {
3326
3635
  */
3327
3636
  timeout_ms?: number | null;
3328
3637
  }
3638
+ interface Direct {
3639
+ /**
3640
+ * The caller type. Always `direct`.
3641
+ */
3642
+ type: 'direct';
3643
+ }
3644
+ interface Program {
3645
+ /**
3646
+ * The call ID of the program item that produced this tool call.
3647
+ */
3648
+ caller_id: string;
3649
+ /**
3650
+ * The caller type. Always `program`.
3651
+ */
3652
+ type: 'program';
3653
+ }
3329
3654
  }
3330
3655
  /**
3331
3656
  * The streamed output items emitted by a shell tool call.
@@ -3349,6 +3674,10 @@ export declare namespace ResponseInputItem {
3349
3674
  * returned via API.
3350
3675
  */
3351
3676
  id?: string | null;
3677
+ /**
3678
+ * The execution context that produced this tool call.
3679
+ */
3680
+ caller?: ShellCallOutput.Direct | ShellCallOutput.Program | null;
3352
3681
  /**
3353
3682
  * The maximum number of UTF-8 characters captured for this shell call's combined
3354
3683
  * output.
@@ -3359,6 +3688,24 @@ export declare namespace ResponseInputItem {
3359
3688
  */
3360
3689
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
3361
3690
  }
3691
+ namespace ShellCallOutput {
3692
+ interface Direct {
3693
+ /**
3694
+ * The caller type. Always `direct`.
3695
+ */
3696
+ type: 'direct';
3697
+ }
3698
+ interface Program {
3699
+ /**
3700
+ * The call ID of the program item that produced this tool call.
3701
+ */
3702
+ caller_id: string;
3703
+ /**
3704
+ * The caller type. Always `program`.
3705
+ */
3706
+ type: 'program';
3707
+ }
3708
+ }
3362
3709
  /**
3363
3710
  * A tool call representing a request to create, delete, or update files using diff
3364
3711
  * patches.
@@ -3386,6 +3733,10 @@ export declare namespace ResponseInputItem {
3386
3733
  * via API.
3387
3734
  */
3388
3735
  id?: string | null;
3736
+ /**
3737
+ * The execution context that produced this tool call.
3738
+ */
3739
+ caller?: ApplyPatchCall.Direct | ApplyPatchCall.Program | null;
3389
3740
  }
3390
3741
  namespace ApplyPatchCall {
3391
3742
  /**
@@ -3435,6 +3786,22 @@ export declare namespace ResponseInputItem {
3435
3786
  */
3436
3787
  type: 'update_file';
3437
3788
  }
3789
+ interface Direct {
3790
+ /**
3791
+ * The caller type. Always `direct`.
3792
+ */
3793
+ type: 'direct';
3794
+ }
3795
+ interface Program {
3796
+ /**
3797
+ * The call ID of the program item that produced this tool call.
3798
+ */
3799
+ caller_id: string;
3800
+ /**
3801
+ * The caller type. Always `program`.
3802
+ */
3803
+ type: 'program';
3804
+ }
3438
3805
  }
3439
3806
  /**
3440
3807
  * The streamed output emitted by an apply patch tool call.
@@ -3457,12 +3824,34 @@ export declare namespace ResponseInputItem {
3457
3824
  * returned via API.
3458
3825
  */
3459
3826
  id?: string | null;
3827
+ /**
3828
+ * The execution context that produced this tool call.
3829
+ */
3830
+ caller?: ApplyPatchCallOutput.Direct | ApplyPatchCallOutput.Program | null;
3460
3831
  /**
3461
3832
  * Optional human-readable log text from the apply patch tool (e.g., patch results
3462
3833
  * or errors).
3463
3834
  */
3464
3835
  output?: string | null;
3465
3836
  }
3837
+ namespace ApplyPatchCallOutput {
3838
+ interface Direct {
3839
+ /**
3840
+ * The caller type. Always `direct`.
3841
+ */
3842
+ type: 'direct';
3843
+ }
3844
+ interface Program {
3845
+ /**
3846
+ * The call ID of the program item that produced this tool call.
3847
+ */
3848
+ caller_id: string;
3849
+ /**
3850
+ * The caller type. Always `program`.
3851
+ */
3852
+ type: 'program';
3853
+ }
3854
+ }
3466
3855
  /**
3467
3856
  * A list of tools available on an MCP server.
3468
3857
  */
@@ -3627,6 +4016,50 @@ export declare namespace ResponseInputItem {
3627
4016
  */
3628
4017
  type?: 'item_reference' | null;
3629
4018
  }
4019
+ interface Program {
4020
+ /**
4021
+ * The unique ID of this program item.
4022
+ */
4023
+ id: string;
4024
+ /**
4025
+ * The stable call ID of the program item.
4026
+ */
4027
+ call_id: string;
4028
+ /**
4029
+ * The JavaScript source executed by programmatic tool calling.
4030
+ */
4031
+ code: string;
4032
+ /**
4033
+ * Opaque program replay fingerprint that must be round-tripped.
4034
+ */
4035
+ fingerprint: string;
4036
+ /**
4037
+ * The item type. Always `program`.
4038
+ */
4039
+ type: 'program';
4040
+ }
4041
+ interface ProgramOutput {
4042
+ /**
4043
+ * The unique ID of this program output item.
4044
+ */
4045
+ id: string;
4046
+ /**
4047
+ * The call ID of the program item.
4048
+ */
4049
+ call_id: string;
4050
+ /**
4051
+ * The result produced by the program item.
4052
+ */
4053
+ result: string;
4054
+ /**
4055
+ * The terminal status of the program output.
4056
+ */
4057
+ status: 'completed' | 'incomplete';
4058
+ /**
4059
+ * The item type. Always `program_output`.
4060
+ */
4061
+ type: 'program_output';
4062
+ }
3630
4063
  }
3631
4064
  /**
3632
4065
  * A list of one or many input items to the model, containing different content
@@ -3669,6 +4102,25 @@ export interface ResponseInputText {
3669
4102
  * The type of the input item. Always `input_text`.
3670
4103
  */
3671
4104
  type: 'input_text';
4105
+ /**
4106
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4107
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4108
+ * token block.
4109
+ */
4110
+ prompt_cache_breakpoint?: ResponseInputText.PromptCacheBreakpoint;
4111
+ }
4112
+ export declare namespace ResponseInputText {
4113
+ /**
4114
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4115
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4116
+ * token block.
4117
+ */
4118
+ interface PromptCacheBreakpoint {
4119
+ /**
4120
+ * The breakpoint mode. Always `explicit`.
4121
+ */
4122
+ mode: 'explicit';
4123
+ }
3672
4124
  }
3673
4125
  /**
3674
4126
  * A text input to the model.
@@ -3682,11 +4134,30 @@ export interface ResponseInputTextContent {
3682
4134
  * The type of the input item. Always `input_text`.
3683
4135
  */
3684
4136
  type: 'input_text';
4137
+ /**
4138
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4139
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4140
+ * token block.
4141
+ */
4142
+ prompt_cache_breakpoint?: ResponseInputTextContent.PromptCacheBreakpoint | null;
4143
+ }
4144
+ export declare namespace ResponseInputTextContent {
4145
+ /**
4146
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4147
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4148
+ * token block.
4149
+ */
4150
+ interface PromptCacheBreakpoint {
4151
+ /**
4152
+ * The breakpoint mode. Always `explicit`.
4153
+ */
4154
+ mode: 'explicit';
4155
+ }
3685
4156
  }
3686
4157
  /**
3687
4158
  * Content item used to generate a response.
3688
4159
  */
3689
- export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
4160
+ export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseReasoningItem | ResponseItem.Program | ResponseItem.ProgramOutput | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
3690
4161
  export declare namespace ResponseItem {
3691
4162
  interface AdditionalTools {
3692
4163
  /**
@@ -3706,6 +4177,50 @@ export declare namespace ResponseItem {
3706
4177
  */
3707
4178
  type: 'additional_tools';
3708
4179
  }
4180
+ interface Program {
4181
+ /**
4182
+ * The unique ID of the program item.
4183
+ */
4184
+ id: string;
4185
+ /**
4186
+ * The stable call ID of the program item.
4187
+ */
4188
+ call_id: string;
4189
+ /**
4190
+ * The JavaScript source executed by programmatic tool calling.
4191
+ */
4192
+ code: string;
4193
+ /**
4194
+ * Opaque program replay fingerprint that must be round-tripped.
4195
+ */
4196
+ fingerprint: string;
4197
+ /**
4198
+ * The type of the item. Always `program`.
4199
+ */
4200
+ type: 'program';
4201
+ }
4202
+ interface ProgramOutput {
4203
+ /**
4204
+ * The unique ID of the program output item.
4205
+ */
4206
+ id: string;
4207
+ /**
4208
+ * The call ID of the program item.
4209
+ */
4210
+ call_id: string;
4211
+ /**
4212
+ * The result produced by the program item.
4213
+ */
4214
+ result: string;
4215
+ /**
4216
+ * The terminal status of the program output item.
4217
+ */
4218
+ status: 'completed' | 'incomplete';
4219
+ /**
4220
+ * The type of the item. Always `program_output`.
4221
+ */
4222
+ type: 'program_output';
4223
+ }
3709
4224
  /**
3710
4225
  * An image generation request made by the model.
3711
4226
  */
@@ -4157,8 +4672,52 @@ export interface ResponseOutputAudio {
4157
4672
  /**
4158
4673
  * An output message from the model.
4159
4674
  */
4160
- export type ResponseOutputItem = ResponseOutputMessage | ResponseFileSearchToolCall | ResponseFunctionToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseReasoningItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseOutputItem.AdditionalTools | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
4675
+ export type ResponseOutputItem = ResponseOutputMessage | ResponseFileSearchToolCall | ResponseFunctionToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseReasoningItem | ResponseOutputItem.Program | ResponseOutputItem.ProgramOutput | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseOutputItem.AdditionalTools | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
4161
4676
  export declare namespace ResponseOutputItem {
4677
+ interface Program {
4678
+ /**
4679
+ * The unique ID of the program item.
4680
+ */
4681
+ id: string;
4682
+ /**
4683
+ * The stable call ID of the program item.
4684
+ */
4685
+ call_id: string;
4686
+ /**
4687
+ * The JavaScript source executed by programmatic tool calling.
4688
+ */
4689
+ code: string;
4690
+ /**
4691
+ * Opaque program replay fingerprint that must be round-tripped.
4692
+ */
4693
+ fingerprint: string;
4694
+ /**
4695
+ * The type of the item. Always `program`.
4696
+ */
4697
+ type: 'program';
4698
+ }
4699
+ interface ProgramOutput {
4700
+ /**
4701
+ * The unique ID of the program output item.
4702
+ */
4703
+ id: string;
4704
+ /**
4705
+ * The call ID of the program item.
4706
+ */
4707
+ call_id: string;
4708
+ /**
4709
+ * The result produced by the program item.
4710
+ */
4711
+ result: string;
4712
+ /**
4713
+ * The terminal status of the program output item.
4714
+ */
4715
+ status: 'completed' | 'incomplete';
4716
+ /**
4717
+ * The type of the item. Always `program_output`.
4718
+ */
4719
+ type: 'program_output';
4720
+ }
4162
4721
  interface AdditionalTools {
4163
4722
  /**
4164
4723
  * The unique ID of the additional tools item.
@@ -4845,6 +5404,11 @@ export interface ResponseReasoningSummaryPartDoneEvent {
4845
5404
  * The type of the event. Always `response.reasoning_summary_part.done`.
4846
5405
  */
4847
5406
  type: 'response.reasoning_summary_part.done';
5407
+ /**
5408
+ * The completion status of the summary part. Omitted when the part completed
5409
+ * normally and set to `incomplete` when generation was interrupted.
5410
+ */
5411
+ status?: 'incomplete';
4848
5412
  }
4849
5413
  export declare namespace ResponseReasoningSummaryPartDoneEvent {
4850
5414
  /**
@@ -5324,6 +5888,10 @@ export declare namespace ResponseUsage {
5324
5888
  * A detailed breakdown of the input tokens.
5325
5889
  */
5326
5890
  interface InputTokensDetails {
5891
+ /**
5892
+ * The number of input tokens that were written to the cache.
5893
+ */
5894
+ cache_write_tokens: number;
5327
5895
  /**
5328
5896
  * The number of tokens that were retrieved from the cache.
5329
5897
  * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
@@ -5522,11 +6090,28 @@ export interface ResponsesClientEvent {
5522
6090
  */
5523
6091
  prompt_cache_key?: string;
5524
6092
  /**
6093
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6094
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6095
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6096
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
6097
+ * up to the latest 80 breakpoints in the conversation, without a content-block
6098
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6099
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
6100
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6101
+ * for current details.
6102
+ */
6103
+ prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
6104
+ /**
6105
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
6106
+ *
5525
6107
  * The retention policy for the prompt cache. Set to `24h` to enable extended
5526
6108
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
5527
6109
  * of 24 hours.
5528
6110
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
5529
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
6111
+ * This field expresses a maximum retention policy, while
6112
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
6113
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
6114
+ * models, only `24h` is supported.
5530
6115
  *
5531
6116
  * For older models that support both `in_memory` and `24h`, the default depends on
5532
6117
  * your organization's data retention policy:
@@ -5608,7 +6193,7 @@ export interface ResponsesClientEvent {
5608
6193
  * response. See the `tools` parameter to see how to specify which tools the model
5609
6194
  * can call.
5610
6195
  */
5611
- tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ToolChoiceApplyPatch | ToolChoiceShell;
6196
+ tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ResponsesClientEvent.SpecificProgrammaticToolCallingParam | ToolChoiceApplyPatch | ToolChoiceShell;
5612
6197
  /**
5613
6198
  * An array of tools the model may call while generating a response. You can
5614
6199
  * specify which tool to use by setting the `tool_choice` parameter.
@@ -5685,6 +6270,67 @@ export declare namespace ResponsesClientEvent {
5685
6270
  * 'omni-moderation-latest'.
5686
6271
  */
5687
6272
  model: string;
6273
+ /**
6274
+ * The policy to apply to moderated response input and output.
6275
+ */
6276
+ policy?: Moderation.Policy | null;
6277
+ }
6278
+ namespace Moderation {
6279
+ /**
6280
+ * The policy to apply to moderated response input and output.
6281
+ */
6282
+ interface Policy {
6283
+ /**
6284
+ * The moderation policy for the response input.
6285
+ */
6286
+ input?: Policy.Input | null;
6287
+ /**
6288
+ * The moderation policy for the response output.
6289
+ */
6290
+ output?: Policy.Output | null;
6291
+ }
6292
+ namespace Policy {
6293
+ /**
6294
+ * The moderation policy for the response input.
6295
+ */
6296
+ interface Input {
6297
+ mode: 'score' | 'block';
6298
+ }
6299
+ /**
6300
+ * The moderation policy for the response output.
6301
+ */
6302
+ interface Output {
6303
+ mode: 'score' | 'block';
6304
+ }
6305
+ }
6306
+ }
6307
+ /**
6308
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6309
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6310
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6311
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
6312
+ * up to the latest 80 breakpoints in the conversation, without a content-block
6313
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6314
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
6315
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6316
+ * for current details.
6317
+ */
6318
+ interface PromptCacheOptions {
6319
+ /**
6320
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
6321
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
6322
+ * and writes up to the latest three explicit breakpoints in the request. With
6323
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
6324
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
6325
+ * request does not use prompt caching.
6326
+ */
6327
+ mode?: 'implicit' | 'explicit';
6328
+ /**
6329
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
6330
+ * written by the request. Defaults to `30m`, which is currently the only supported
6331
+ * value. The backend may retain cache entries for longer.
6332
+ */
6333
+ ttl?: '30m';
5688
6334
  }
5689
6335
  /**
5690
6336
  * Options for streaming responses. Only set this when you set `stream: true`.
@@ -5700,6 +6346,12 @@ export declare namespace ResponsesClientEvent {
5700
6346
  */
5701
6347
  include_obfuscation?: boolean;
5702
6348
  }
6349
+ interface SpecificProgrammaticToolCallingParam {
6350
+ /**
6351
+ * The tool to call. Always `programmatic_tool_calling`.
6352
+ */
6353
+ type: 'programmatic_tool_calling';
6354
+ }
5703
6355
  }
5704
6356
  /**
5705
6357
  * Server events emitted by the Responses WebSocket server.
@@ -5722,7 +6374,7 @@ export interface SkillReference {
5722
6374
  /**
5723
6375
  * A tool that can be used to generate a response.
5724
6376
  */
5725
- export type Tool = FunctionTool | FileSearchTool | ComputerTool | ComputerUsePreviewTool | WebSearchTool | Tool.Mcp | Tool.CodeInterpreter | Tool.ImageGeneration | Tool.LocalShell | FunctionShellTool | CustomTool | NamespaceTool | ToolSearchTool | WebSearchPreviewTool | ApplyPatchTool;
6377
+ export type Tool = FunctionTool | FileSearchTool | ComputerTool | ComputerUsePreviewTool | WebSearchTool | Tool.Mcp | Tool.CodeInterpreter | Tool.ProgrammaticToolCalling | Tool.ImageGeneration | Tool.LocalShell | FunctionShellTool | CustomTool | NamespaceTool | ToolSearchTool | WebSearchPreviewTool | ApplyPatchTool;
5726
6378
  export declare namespace Tool {
5727
6379
  /**
5728
6380
  * Give the model access to additional tools via remote Model Context Protocol
@@ -5738,6 +6390,10 @@ export declare namespace Tool {
5738
6390
  * The type of the MCP tool. Always `mcp`.
5739
6391
  */
5740
6392
  type: 'mcp';
6393
+ /**
6394
+ * The tool invocation context(s).
6395
+ */
6396
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
5741
6397
  /**
5742
6398
  * List of allowed tool names or a filter object.
5743
6399
  */
@@ -5876,6 +6532,10 @@ export declare namespace Tool {
5876
6532
  * The type of the code interpreter tool. Always `code_interpreter`.
5877
6533
  */
5878
6534
  type: 'code_interpreter';
6535
+ /**
6536
+ * The tool invocation context(s).
6537
+ */
6538
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
5879
6539
  }
5880
6540
  namespace CodeInterpreter {
5881
6541
  /**
@@ -5901,6 +6561,12 @@ export declare namespace Tool {
5901
6561
  network_policy?: ResponsesAPI.ContainerNetworkPolicyDisabled | ResponsesAPI.ContainerNetworkPolicyAllowlist;
5902
6562
  }
5903
6563
  }
6564
+ interface ProgrammaticToolCalling {
6565
+ /**
6566
+ * The type of the tool. Always `programmatic_tool_calling`.
6567
+ */
6568
+ type: 'programmatic_tool_calling';
6569
+ }
5904
6570
  /**
5905
6571
  * A tool that generates images using the GPT image models.
5906
6572
  */
@@ -6385,11 +7051,28 @@ export interface ResponseCreateParamsBase {
6385
7051
  */
6386
7052
  prompt_cache_key?: string;
6387
7053
  /**
7054
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7055
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7056
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7057
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7058
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7059
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7060
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7061
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7062
+ * for current details.
7063
+ */
7064
+ prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
7065
+ /**
7066
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7067
+ *
6388
7068
  * The retention policy for the prompt cache. Set to `24h` to enable extended
6389
7069
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6390
7070
  * of 24 hours.
6391
7071
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6392
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
7072
+ * This field expresses a maximum retention policy, while
7073
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7074
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7075
+ * models, only `24h` is supported.
6393
7076
  *
6394
7077
  * For older models that support both `in_memory` and `24h`, the default depends on
6395
7078
  * your organization's data retention policy:
@@ -6470,7 +7153,7 @@ export interface ResponseCreateParamsBase {
6470
7153
  * response. See the `tools` parameter to see how to specify which tools the model
6471
7154
  * can call.
6472
7155
  */
6473
- tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ToolChoiceApplyPatch | ToolChoiceShell;
7156
+ tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ResponseCreateParams.SpecificProgrammaticToolCallingParam | ToolChoiceApplyPatch | ToolChoiceShell;
6474
7157
  /**
6475
7158
  * An array of tools the model may call while generating a response. You can
6476
7159
  * specify which tool to use by setting the `tool_choice` parameter.
@@ -6547,6 +7230,67 @@ export declare namespace ResponseCreateParams {
6547
7230
  * 'omni-moderation-latest'.
6548
7231
  */
6549
7232
  model: string;
7233
+ /**
7234
+ * The policy to apply to moderated response input and output.
7235
+ */
7236
+ policy?: Moderation.Policy | null;
7237
+ }
7238
+ namespace Moderation {
7239
+ /**
7240
+ * The policy to apply to moderated response input and output.
7241
+ */
7242
+ interface Policy {
7243
+ /**
7244
+ * The moderation policy for the response input.
7245
+ */
7246
+ input?: Policy.Input | null;
7247
+ /**
7248
+ * The moderation policy for the response output.
7249
+ */
7250
+ output?: Policy.Output | null;
7251
+ }
7252
+ namespace Policy {
7253
+ /**
7254
+ * The moderation policy for the response input.
7255
+ */
7256
+ interface Input {
7257
+ mode: 'score' | 'block';
7258
+ }
7259
+ /**
7260
+ * The moderation policy for the response output.
7261
+ */
7262
+ interface Output {
7263
+ mode: 'score' | 'block';
7264
+ }
7265
+ }
7266
+ }
7267
+ /**
7268
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7269
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7270
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7271
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7272
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7273
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7274
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7275
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7276
+ * for current details.
7277
+ */
7278
+ interface PromptCacheOptions {
7279
+ /**
7280
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
7281
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
7282
+ * and writes up to the latest three explicit breakpoints in the request. With
7283
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
7284
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
7285
+ * request does not use prompt caching.
7286
+ */
7287
+ mode?: 'implicit' | 'explicit';
7288
+ /**
7289
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
7290
+ * written by the request. Defaults to `30m`, which is currently the only supported
7291
+ * value. The backend may retain cache entries for longer.
7292
+ */
7293
+ ttl?: '30m';
6550
7294
  }
6551
7295
  /**
6552
7296
  * Options for streaming responses. Only set this when you set `stream: true`.
@@ -6562,6 +7306,12 @@ export declare namespace ResponseCreateParams {
6562
7306
  */
6563
7307
  include_obfuscation?: boolean;
6564
7308
  }
7309
+ interface SpecificProgrammaticToolCallingParam {
7310
+ /**
7311
+ * The tool to call. Always `programmatic_tool_calling`.
7312
+ */
7313
+ type: 'programmatic_tool_calling';
7314
+ }
6565
7315
  type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
6566
7316
  type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
6567
7317
  }
@@ -6651,7 +7401,7 @@ export interface ResponseCompactParams {
6651
7401
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
6652
7402
  * available models.
6653
7403
  */
6654
- model: 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | (string & {}) | null;
7404
+ model: 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | (string & {}) | null;
6655
7405
  /**
6656
7406
  * Text, image, or file inputs to the model, used to generate a response
6657
7407
  */
@@ -6675,7 +7425,19 @@ export interface ResponseCompactParams {
6675
7425
  */
6676
7426
  prompt_cache_key?: string | null;
6677
7427
  /**
6678
- * How long to retain a prompt cache entry created by this request.
7428
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7429
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7430
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7431
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7432
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7433
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7434
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7435
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7436
+ * for current details.
7437
+ */
7438
+ prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
7439
+ /**
7440
+ * @deprecated How long to retain a prompt cache entry created by this request.
6679
7441
  */
6680
7442
  prompt_cache_retention?: 'in_memory' | '24h' | null;
6681
7443
  /**
@@ -6683,6 +7445,36 @@ export interface ResponseCompactParams {
6683
7445
  */
6684
7446
  service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
6685
7447
  }
7448
+ export declare namespace ResponseCompactParams {
7449
+ /**
7450
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7451
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7452
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7453
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7454
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7455
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7456
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7457
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7458
+ * for current details.
7459
+ */
7460
+ interface PromptCacheOptions {
7461
+ /**
7462
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
7463
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
7464
+ * and writes up to the latest three explicit breakpoints in the request. With
7465
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
7466
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
7467
+ * request does not use prompt caching.
7468
+ */
7469
+ mode?: 'implicit' | 'explicit';
7470
+ /**
7471
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
7472
+ * written by the request. Defaults to `30m`, which is currently the only supported
7473
+ * value. The backend may retain cache entries for longer.
7474
+ */
7475
+ ttl?: '30m';
7476
+ }
7477
+ }
6686
7478
  export declare namespace Responses {
6687
7479
  export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseStatus as ResponseStatus, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
6688
7480
  export { InputItems as InputItems, type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams, };