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
@@ -43,6 +43,8 @@ export type ParsedResponseOutputItem<ParsedT> =
43
43
  | ResponseFunctionWebSearch
44
44
  | ResponseComputerToolCall
45
45
  | ResponseComputerToolCallOutputItem
46
+ | ResponseOutputItem.Program
47
+ | ResponseOutputItem.ProgramOutput
46
48
  | ResponseToolSearchCall
47
49
  | ResponseToolSearchOutputItem
48
50
  | ResponseOutputItem.AdditionalTools
@@ -235,7 +237,7 @@ export class Responses extends APIResource {
235
237
  * @example
236
238
  * ```ts
237
239
  * const compactedResponse = await client.responses.compact({
238
- * model: 'gpt-5.4',
240
+ * model: 'gpt-5.6-sol',
239
241
  * });
240
242
  * ```
241
243
  */
@@ -254,6 +256,11 @@ export interface ApplyPatchTool {
254
256
  * The type of the tool. Always `apply_patch`.
255
257
  */
256
258
  type: 'apply_patch';
259
+
260
+ /**
261
+ * The tool invocation context(s).
262
+ */
263
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
257
264
  }
258
265
 
259
266
  export interface CompactedResponse {
@@ -659,6 +666,11 @@ export interface CustomTool {
659
666
  */
660
667
  type: 'custom';
661
668
 
669
+ /**
670
+ * The tool invocation context(s).
671
+ */
672
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
673
+
662
674
  /**
663
675
  * Whether this tool should be deferred and discovered via tool search.
664
676
  */
@@ -794,6 +806,11 @@ export interface FunctionShellTool {
794
806
  */
795
807
  type: 'shell';
796
808
 
809
+ /**
810
+ * The tool invocation context(s).
811
+ */
812
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
813
+
797
814
  environment?: ContainerAuto | LocalEnvironment | ContainerReference | null;
798
815
  }
799
816
 
@@ -814,7 +831,7 @@ export interface FunctionTool {
814
831
  parameters: { [key: string]: unknown } | null;
815
832
 
816
833
  /**
817
- * Whether to enforce strict parameter validation. Default `true`.
834
+ * Whether strict parameter validation is enforced for this function tool.
818
835
  */
819
836
  strict: boolean | null;
820
837
 
@@ -823,6 +840,11 @@ export interface FunctionTool {
823
840
  */
824
841
  type: 'function';
825
842
 
843
+ /**
844
+ * The tool invocation context(s).
845
+ */
846
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
847
+
826
848
  /**
827
849
  * Whether this function is deferred and loaded via tool search.
828
850
  */
@@ -833,6 +855,12 @@ export interface FunctionTool {
833
855
  * call the function.
834
856
  */
835
857
  description?: string | null;
858
+
859
+ /**
860
+ * A JSON schema object describing the JSON value encoded in string outputs for
861
+ * this function.
862
+ */
863
+ output_schema?: { [key: string]: unknown } | null;
836
864
  }
837
865
 
838
866
  export interface InlineSkill {
@@ -937,6 +965,11 @@ export namespace NamespaceTool {
937
965
 
938
966
  type: 'function';
939
967
 
968
+ /**
969
+ * The tool invocation context(s).
970
+ */
971
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
972
+
940
973
  /**
941
974
  * Whether this function should be deferred and discovered via tool search.
942
975
  */
@@ -944,8 +977,19 @@ export namespace NamespaceTool {
944
977
 
945
978
  description?: string | null;
946
979
 
980
+ /**
981
+ * A JSON Schema describing the JSON value encoded in string outputs for this
982
+ * function tool. This does not describe content-array outputs.
983
+ */
984
+ output_schema?: { [key: string]: unknown } | null;
985
+
947
986
  parameters?: unknown | null;
948
987
 
988
+ /**
989
+ * Whether to enforce strict parameter validation. If omitted, Responses attempts
990
+ * to use strict validation when the schema is compatible, and falls back to
991
+ * non-strict validation otherwise.
992
+ */
949
993
  strict?: boolean | null;
950
994
  }
951
995
  }
@@ -1042,6 +1086,7 @@ export interface Response {
1042
1086
  | ToolChoiceFunction
1043
1087
  | ToolChoiceMcp
1044
1088
  | ToolChoiceCustom
1089
+ | Response.SpecificProgrammaticToolCallingParam
1045
1090
  | ToolChoiceApplyPatch
1046
1091
  | ToolChoiceShell;
1047
1092
 
@@ -1130,11 +1175,22 @@ export interface Response {
1130
1175
  prompt_cache_key?: string;
1131
1176
 
1132
1177
  /**
1178
+ * The prompt-caching options that were applied to the response. Supported for
1179
+ * `gpt-5.6` and later models.
1180
+ */
1181
+ prompt_cache_options?: Response.PromptCacheOptions;
1182
+
1183
+ /**
1184
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
1185
+ *
1133
1186
  * The retention policy for the prompt cache. Set to `24h` to enable extended
1134
1187
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
1135
1188
  * of 24 hours.
1136
1189
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
1137
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
1190
+ * This field expresses a maximum retention policy, while
1191
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
1192
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
1193
+ * models, only `24h` is supported.
1138
1194
  *
1139
1195
  * For older models that support both `in_memory` and `24h`, the default depends on
1140
1196
  * your organization's data retention policy:
@@ -1243,6 +1299,13 @@ export namespace Response {
1243
1299
  reason?: 'max_output_tokens' | 'content_filter';
1244
1300
  }
1245
1301
 
1302
+ export interface SpecificProgrammaticToolCallingParam {
1303
+ /**
1304
+ * The tool to call. Always `programmatic_tool_calling`.
1305
+ */
1306
+ type: 'programmatic_tool_calling';
1307
+ }
1308
+
1246
1309
  /**
1247
1310
  * The conversation that this response belonged to. Input items and output items
1248
1311
  * from this response were automatically added to this conversation.
@@ -1385,6 +1448,22 @@ export namespace Response {
1385
1448
  type: 'error';
1386
1449
  }
1387
1450
  }
1451
+
1452
+ /**
1453
+ * The prompt-caching options that were applied to the response. Supported for
1454
+ * `gpt-5.6` and later models.
1455
+ */
1456
+ export interface PromptCacheOptions {
1457
+ /**
1458
+ * Whether implicit prompt-cache breakpoints were enabled.
1459
+ */
1460
+ mode: 'implicit' | 'explicit';
1461
+
1462
+ /**
1463
+ * The minimum lifetime applied to each cache breakpoint.
1464
+ */
1465
+ ttl: '30m';
1466
+ }
1388
1467
  }
1389
1468
 
1390
1469
  /**
@@ -1421,6 +1500,11 @@ export interface ResponseApplyPatchToolCall {
1421
1500
  */
1422
1501
  type: 'apply_patch_call';
1423
1502
 
1503
+ /**
1504
+ * The execution context that produced this tool call.
1505
+ */
1506
+ caller?: ResponseApplyPatchToolCall.Direct | ResponseApplyPatchToolCall.Program | null;
1507
+
1424
1508
  /**
1425
1509
  * The ID of the entity that created this tool call.
1426
1510
  */
@@ -1482,6 +1566,19 @@ export namespace ResponseApplyPatchToolCall {
1482
1566
  */
1483
1567
  type: 'update_file';
1484
1568
  }
1569
+
1570
+ export interface Direct {
1571
+ type: 'direct';
1572
+ }
1573
+
1574
+ export interface Program {
1575
+ /**
1576
+ * The call ID of the program item that produced this tool call.
1577
+ */
1578
+ caller_id: string;
1579
+
1580
+ type: 'program';
1581
+ }
1485
1582
  }
1486
1583
 
1487
1584
  /**
@@ -1509,6 +1606,11 @@ export interface ResponseApplyPatchToolCallOutput {
1509
1606
  */
1510
1607
  type: 'apply_patch_call_output';
1511
1608
 
1609
+ /**
1610
+ * The execution context that produced this tool call.
1611
+ */
1612
+ caller?: ResponseApplyPatchToolCallOutput.Direct | ResponseApplyPatchToolCallOutput.Program | null;
1613
+
1512
1614
  /**
1513
1615
  * The ID of the entity that created this tool call output.
1514
1616
  */
@@ -1520,6 +1622,21 @@ export interface ResponseApplyPatchToolCallOutput {
1520
1622
  output?: string | null;
1521
1623
  }
1522
1624
 
1625
+ export namespace ResponseApplyPatchToolCallOutput {
1626
+ export interface Direct {
1627
+ type: 'direct';
1628
+ }
1629
+
1630
+ export interface Program {
1631
+ /**
1632
+ * The call ID of the program item that produced this tool call.
1633
+ */
1634
+ caller_id: string;
1635
+
1636
+ type: 'program';
1637
+ }
1638
+ }
1639
+
1523
1640
  /**
1524
1641
  * Emitted when there is a partial audio response.
1525
1642
  */
@@ -2445,12 +2562,32 @@ export interface ResponseCustomToolCall {
2445
2562
  */
2446
2563
  id?: string;
2447
2564
 
2565
+ /**
2566
+ * The execution context that produced this tool call.
2567
+ */
2568
+ caller?: ResponseCustomToolCall.Direct | ResponseCustomToolCall.Program | null;
2569
+
2448
2570
  /**
2449
2571
  * The namespace of the custom tool being called.
2450
2572
  */
2451
2573
  namespace?: string;
2452
2574
  }
2453
2575
 
2576
+ export namespace ResponseCustomToolCall {
2577
+ export interface Direct {
2578
+ type: 'direct';
2579
+ }
2580
+
2581
+ export interface Program {
2582
+ /**
2583
+ * The call ID of the program item that produced this tool call.
2584
+ */
2585
+ caller_id: string;
2586
+
2587
+ type: 'program';
2588
+ }
2589
+ }
2590
+
2454
2591
  /**
2455
2592
  * Event representing a delta (partial update) to the input of a custom tool call.
2456
2593
  */
@@ -2556,6 +2693,32 @@ export interface ResponseCustomToolCallOutput {
2556
2693
  * The unique ID of the custom tool call output in the OpenAI platform.
2557
2694
  */
2558
2695
  id?: string;
2696
+
2697
+ /**
2698
+ * The execution context that produced this tool call.
2699
+ */
2700
+ caller?: ResponseCustomToolCallOutput.Direct | ResponseCustomToolCallOutput.Program | null;
2701
+ }
2702
+
2703
+ export namespace ResponseCustomToolCallOutput {
2704
+ export interface Direct {
2705
+ /**
2706
+ * The caller type. Always `direct`.
2707
+ */
2708
+ type: 'direct';
2709
+ }
2710
+
2711
+ export interface Program {
2712
+ /**
2713
+ * The call ID of the program item that produced this tool call.
2714
+ */
2715
+ caller_id: string;
2716
+
2717
+ /**
2718
+ * The caller type. Always `program`.
2719
+ */
2720
+ type: 'program';
2721
+ }
2559
2722
  }
2560
2723
 
2561
2724
  /**
@@ -2590,6 +2753,7 @@ export interface ResponseError {
2590
2753
  | 'server_error'
2591
2754
  | 'rate_limit_exceeded'
2592
2755
  | 'invalid_prompt'
2756
+ | 'bio_policy'
2593
2757
  | 'vector_store_timeout'
2594
2758
  | 'invalid_image'
2595
2759
  | 'invalid_image_format'
@@ -3020,6 +3184,11 @@ export interface ResponseFunctionShellToolCall {
3020
3184
  */
3021
3185
  type: 'shell_call';
3022
3186
 
3187
+ /**
3188
+ * The execution context that produced this tool call.
3189
+ */
3190
+ caller?: ResponseFunctionShellToolCall.Direct | ResponseFunctionShellToolCall.Program | null;
3191
+
3023
3192
  /**
3024
3193
  * The ID of the entity that created this tool call.
3025
3194
  */
@@ -3043,6 +3212,19 @@ export namespace ResponseFunctionShellToolCall {
3043
3212
  */
3044
3213
  timeout_ms: number | null;
3045
3214
  }
3215
+
3216
+ export interface Direct {
3217
+ type: 'direct';
3218
+ }
3219
+
3220
+ export interface Program {
3221
+ /**
3222
+ * The call ID of the program item that produced this tool call.
3223
+ */
3224
+ caller_id: string;
3225
+
3226
+ type: 'program';
3227
+ }
3046
3228
  }
3047
3229
 
3048
3230
  /**
@@ -3082,6 +3264,11 @@ export interface ResponseFunctionShellToolCallOutput {
3082
3264
  */
3083
3265
  type: 'shell_call_output';
3084
3266
 
3267
+ /**
3268
+ * The execution context that produced this tool call.
3269
+ */
3270
+ caller?: ResponseFunctionShellToolCallOutput.Direct | ResponseFunctionShellToolCallOutput.Program | null;
3271
+
3085
3272
  /**
3086
3273
  * The identifier of the actor that created the item.
3087
3274
  */
@@ -3141,6 +3328,19 @@ export namespace ResponseFunctionShellToolCallOutput {
3141
3328
  type: 'exit';
3142
3329
  }
3143
3330
  }
3331
+
3332
+ export interface Direct {
3333
+ type: 'direct';
3334
+ }
3335
+
3336
+ export interface Program {
3337
+ /**
3338
+ * The call ID of the program item that produced this tool call.
3339
+ */
3340
+ caller_id: string;
3341
+
3342
+ type: 'program';
3343
+ }
3144
3344
  }
3145
3345
 
3146
3346
  /**
@@ -3174,6 +3374,11 @@ export interface ResponseFunctionToolCall {
3174
3374
  */
3175
3375
  id?: string;
3176
3376
 
3377
+ /**
3378
+ * The execution context that produced this tool call.
3379
+ */
3380
+ caller?: ResponseFunctionToolCall.Direct | ResponseFunctionToolCall.Program | null;
3381
+
3177
3382
  /**
3178
3383
  * The namespace of the function to run.
3179
3384
  */
@@ -3186,6 +3391,21 @@ export interface ResponseFunctionToolCall {
3186
3391
  status?: 'in_progress' | 'completed' | 'incomplete';
3187
3392
  }
3188
3393
 
3394
+ export namespace ResponseFunctionToolCall {
3395
+ export interface Direct {
3396
+ type: 'direct';
3397
+ }
3398
+
3399
+ export interface Program {
3400
+ /**
3401
+ * The call ID of the program item that produced this tool call.
3402
+ */
3403
+ caller_id: string;
3404
+
3405
+ type: 'program';
3406
+ }
3407
+ }
3408
+
3189
3409
  /**
3190
3410
  * A tool call to run a function. See the
3191
3411
  * [function calling guide](https://platform.openai.com/docs/guides/function-calling)
@@ -3237,12 +3457,38 @@ export interface ResponseFunctionToolCallOutputItem {
3237
3457
  */
3238
3458
  type: 'function_call_output';
3239
3459
 
3460
+ /**
3461
+ * The execution context that produced this tool call.
3462
+ */
3463
+ caller?: ResponseFunctionToolCallOutputItem.Direct | ResponseFunctionToolCallOutputItem.Program | null;
3464
+
3240
3465
  /**
3241
3466
  * The identifier of the actor that created the item.
3242
3467
  */
3243
3468
  created_by?: string;
3244
3469
  }
3245
3470
 
3471
+ export namespace ResponseFunctionToolCallOutputItem {
3472
+ export interface Direct {
3473
+ /**
3474
+ * The caller type. Always `direct`.
3475
+ */
3476
+ type: 'direct';
3477
+ }
3478
+
3479
+ export interface Program {
3480
+ /**
3481
+ * The call ID of the program item that produced this tool call.
3482
+ */
3483
+ caller_id: string;
3484
+
3485
+ /**
3486
+ * The caller type. Always `program`.
3487
+ */
3488
+ type: 'program';
3489
+ }
3490
+ }
3491
+
3246
3492
  /**
3247
3493
  * The results of a web search tool call. See the
3248
3494
  * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for
@@ -3588,11 +3834,13 @@ export interface ResponseInputFile {
3588
3834
  type: 'input_file';
3589
3835
 
3590
3836
  /**
3591
- * The detail level of the file to be sent to the model. Use `low` for the default
3592
- * rendering behavior, or `high` to render the file at higher quality. Defaults to
3593
- * `low`.
3837
+ * The detail level of the file to be sent to the model. Use `auto` to let the
3838
+ * system select the detail level; for GPT-5.6 and later models, `auto` uses
3839
+ * high-quality rendering, which may increase input token usage. Use `low` for
3840
+ * lower-cost rendering, or `high` to render the file at higher quality. Defaults
3841
+ * to `auto`.
3594
3842
  */
3595
- detail?: 'low' | 'high';
3843
+ detail?: 'auto' | 'low' | 'high';
3596
3844
 
3597
3845
  /**
3598
3846
  * The content of the file to be sent to the model.
@@ -3613,6 +3861,27 @@ export interface ResponseInputFile {
3613
3861
  * The name of the file to be sent to the model.
3614
3862
  */
3615
3863
  filename?: string;
3864
+
3865
+ /**
3866
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3867
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3868
+ * token block.
3869
+ */
3870
+ prompt_cache_breakpoint?: ResponseInputFile.PromptCacheBreakpoint;
3871
+ }
3872
+
3873
+ export namespace ResponseInputFile {
3874
+ /**
3875
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3876
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3877
+ * token block.
3878
+ */
3879
+ export interface PromptCacheBreakpoint {
3880
+ /**
3881
+ * The breakpoint mode. Always `explicit`.
3882
+ */
3883
+ mode: 'explicit';
3884
+ }
3616
3885
  }
3617
3886
 
3618
3887
  /**
@@ -3625,11 +3894,13 @@ export interface ResponseInputFileContent {
3625
3894
  type: 'input_file';
3626
3895
 
3627
3896
  /**
3628
- * The detail level of the file to be sent to the model. Use `low` for the default
3629
- * rendering behavior, or `high` to render the file at higher quality. Defaults to
3630
- * `low`.
3897
+ * The detail level of the file to be sent to the model. Use `auto` to let the
3898
+ * system select the detail level; for GPT-5.6 and later models, `auto` uses
3899
+ * high-quality rendering, which may increase input token usage. Use `low` for
3900
+ * lower-cost rendering, or `high` to render the file at higher quality. Defaults
3901
+ * to `auto`.
3631
3902
  */
3632
- detail?: 'low' | 'high';
3903
+ detail?: 'auto' | 'low' | 'high';
3633
3904
 
3634
3905
  /**
3635
3906
  * The base64-encoded data of the file to be sent to the model.
@@ -3650,6 +3921,27 @@ export interface ResponseInputFileContent {
3650
3921
  * The name of the file to be sent to the model.
3651
3922
  */
3652
3923
  filename?: string | null;
3924
+
3925
+ /**
3926
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3927
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3928
+ * token block.
3929
+ */
3930
+ prompt_cache_breakpoint?: ResponseInputFileContent.PromptCacheBreakpoint | null;
3931
+ }
3932
+
3933
+ export namespace ResponseInputFileContent {
3934
+ /**
3935
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3936
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3937
+ * token block.
3938
+ */
3939
+ export interface PromptCacheBreakpoint {
3940
+ /**
3941
+ * The breakpoint mode. Always `explicit`.
3942
+ */
3943
+ mode: 'explicit';
3944
+ }
3653
3945
  }
3654
3946
 
3655
3947
  /**
@@ -3678,6 +3970,27 @@ export interface ResponseInputImage {
3678
3970
  * encoded image in a data URL.
3679
3971
  */
3680
3972
  image_url?: string | null;
3973
+
3974
+ /**
3975
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3976
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3977
+ * token block.
3978
+ */
3979
+ prompt_cache_breakpoint?: ResponseInputImage.PromptCacheBreakpoint;
3980
+ }
3981
+
3982
+ export namespace ResponseInputImage {
3983
+ /**
3984
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
3985
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
3986
+ * token block.
3987
+ */
3988
+ export interface PromptCacheBreakpoint {
3989
+ /**
3990
+ * The breakpoint mode. Always `explicit`.
3991
+ */
3992
+ mode: 'explicit';
3993
+ }
3681
3994
  }
3682
3995
 
3683
3996
  /**
@@ -3706,6 +4019,27 @@ export interface ResponseInputImageContent {
3706
4019
  * encoded image in a data URL.
3707
4020
  */
3708
4021
  image_url?: string | null;
4022
+
4023
+ /**
4024
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4025
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4026
+ * token block.
4027
+ */
4028
+ prompt_cache_breakpoint?: ResponseInputImageContent.PromptCacheBreakpoint | null;
4029
+ }
4030
+
4031
+ export namespace ResponseInputImageContent {
4032
+ /**
4033
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
4034
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
4035
+ * token block.
4036
+ */
4037
+ export interface PromptCacheBreakpoint {
4038
+ /**
4039
+ * The breakpoint mode. Always `explicit`.
4040
+ */
4041
+ mode: 'explicit';
4042
+ }
3709
4043
  }
3710
4044
 
3711
4045
  /**
@@ -3745,7 +4079,9 @@ export type ResponseInputItem =
3745
4079
  | ResponseCustomToolCallOutput
3746
4080
  | ResponseCustomToolCall
3747
4081
  | ResponseInputItem.CompactionTrigger
3748
- | ResponseInputItem.ItemReference;
4082
+ | ResponseInputItem.ItemReference
4083
+ | ResponseInputItem.Program
4084
+ | ResponseInputItem.ProgramOutput;
3749
4085
 
3750
4086
  export namespace ResponseInputItem {
3751
4087
  /**
@@ -3861,6 +4197,11 @@ export namespace ResponseInputItem {
3861
4197
  */
3862
4198
  id?: string | null;
3863
4199
 
4200
+ /**
4201
+ * The execution context that produced this tool call.
4202
+ */
4203
+ caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
4204
+
3864
4205
  /**
3865
4206
  * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3866
4207
  * Populated when items are returned via API.
@@ -3868,6 +4209,27 @@ export namespace ResponseInputItem {
3868
4209
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
3869
4210
  }
3870
4211
 
4212
+ export namespace FunctionCallOutput {
4213
+ export interface Direct {
4214
+ /**
4215
+ * The caller type. Always `direct`.
4216
+ */
4217
+ type: 'direct';
4218
+ }
4219
+
4220
+ export interface Program {
4221
+ /**
4222
+ * The call ID of the program item that produced this tool call.
4223
+ */
4224
+ caller_id: string;
4225
+
4226
+ /**
4227
+ * The caller type. Always `program`.
4228
+ */
4229
+ type: 'program';
4230
+ }
4231
+ }
4232
+
3871
4233
  export interface ToolSearchCall {
3872
4234
  /**
3873
4235
  * The arguments supplied to the tool search call.
@@ -4064,6 +4426,11 @@ export namespace ResponseInputItem {
4064
4426
  */
4065
4427
  id?: string | null;
4066
4428
 
4429
+ /**
4430
+ * The execution context that produced this tool call.
4431
+ */
4432
+ caller?: ShellCall.Direct | ShellCall.Program | null;
4433
+
4067
4434
  /**
4068
4435
  * The environment to execute the shell commands in.
4069
4436
  */
@@ -4097,6 +4464,25 @@ export namespace ResponseInputItem {
4097
4464
  */
4098
4465
  timeout_ms?: number | null;
4099
4466
  }
4467
+
4468
+ export interface Direct {
4469
+ /**
4470
+ * The caller type. Always `direct`.
4471
+ */
4472
+ type: 'direct';
4473
+ }
4474
+
4475
+ export interface Program {
4476
+ /**
4477
+ * The call ID of the program item that produced this tool call.
4478
+ */
4479
+ caller_id: string;
4480
+
4481
+ /**
4482
+ * The caller type. Always `program`.
4483
+ */
4484
+ type: 'program';
4485
+ }
4100
4486
  }
4101
4487
 
4102
4488
  /**
@@ -4125,6 +4511,11 @@ export namespace ResponseInputItem {
4125
4511
  */
4126
4512
  id?: string | null;
4127
4513
 
4514
+ /**
4515
+ * The execution context that produced this tool call.
4516
+ */
4517
+ caller?: ShellCallOutput.Direct | ShellCallOutput.Program | null;
4518
+
4128
4519
  /**
4129
4520
  * The maximum number of UTF-8 characters captured for this shell call's combined
4130
4521
  * output.
@@ -4137,6 +4528,27 @@ export namespace ResponseInputItem {
4137
4528
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
4138
4529
  }
4139
4530
 
4531
+ export namespace ShellCallOutput {
4532
+ export interface Direct {
4533
+ /**
4534
+ * The caller type. Always `direct`.
4535
+ */
4536
+ type: 'direct';
4537
+ }
4538
+
4539
+ export interface Program {
4540
+ /**
4541
+ * The call ID of the program item that produced this tool call.
4542
+ */
4543
+ caller_id: string;
4544
+
4545
+ /**
4546
+ * The caller type. Always `program`.
4547
+ */
4548
+ type: 'program';
4549
+ }
4550
+ }
4551
+
4140
4552
  /**
4141
4553
  * A tool call representing a request to create, delete, or update files using diff
4142
4554
  * patches.
@@ -4168,6 +4580,11 @@ export namespace ResponseInputItem {
4168
4580
  * via API.
4169
4581
  */
4170
4582
  id?: string | null;
4583
+
4584
+ /**
4585
+ * The execution context that produced this tool call.
4586
+ */
4587
+ caller?: ApplyPatchCall.Direct | ApplyPatchCall.Program | null;
4171
4588
  }
4172
4589
 
4173
4590
  export namespace ApplyPatchCall {
@@ -4225,6 +4642,25 @@ export namespace ResponseInputItem {
4225
4642
  */
4226
4643
  type: 'update_file';
4227
4644
  }
4645
+
4646
+ export interface Direct {
4647
+ /**
4648
+ * The caller type. Always `direct`.
4649
+ */
4650
+ type: 'direct';
4651
+ }
4652
+
4653
+ export interface Program {
4654
+ /**
4655
+ * The call ID of the program item that produced this tool call.
4656
+ */
4657
+ caller_id: string;
4658
+
4659
+ /**
4660
+ * The caller type. Always `program`.
4661
+ */
4662
+ type: 'program';
4663
+ }
4228
4664
  }
4229
4665
 
4230
4666
  /**
@@ -4252,6 +4688,11 @@ export namespace ResponseInputItem {
4252
4688
  */
4253
4689
  id?: string | null;
4254
4690
 
4691
+ /**
4692
+ * The execution context that produced this tool call.
4693
+ */
4694
+ caller?: ApplyPatchCallOutput.Direct | ApplyPatchCallOutput.Program | null;
4695
+
4255
4696
  /**
4256
4697
  * Optional human-readable log text from the apply patch tool (e.g., patch results
4257
4698
  * or errors).
@@ -4259,6 +4700,27 @@ export namespace ResponseInputItem {
4259
4700
  output?: string | null;
4260
4701
  }
4261
4702
 
4703
+ export namespace ApplyPatchCallOutput {
4704
+ export interface Direct {
4705
+ /**
4706
+ * The caller type. Always `direct`.
4707
+ */
4708
+ type: 'direct';
4709
+ }
4710
+
4711
+ export interface Program {
4712
+ /**
4713
+ * The call ID of the program item that produced this tool call.
4714
+ */
4715
+ caller_id: string;
4716
+
4717
+ /**
4718
+ * The caller type. Always `program`.
4719
+ */
4720
+ type: 'program';
4721
+ }
4722
+ }
4723
+
4262
4724
  /**
4263
4725
  * A list of tools available on an MCP server.
4264
4726
  */
@@ -4453,6 +4915,60 @@ export namespace ResponseInputItem {
4453
4915
  */
4454
4916
  type?: 'item_reference' | null;
4455
4917
  }
4918
+
4919
+ export interface Program {
4920
+ /**
4921
+ * The unique ID of this program item.
4922
+ */
4923
+ id: string;
4924
+
4925
+ /**
4926
+ * The stable call ID of the program item.
4927
+ */
4928
+ call_id: string;
4929
+
4930
+ /**
4931
+ * The JavaScript source executed by programmatic tool calling.
4932
+ */
4933
+ code: string;
4934
+
4935
+ /**
4936
+ * Opaque program replay fingerprint that must be round-tripped.
4937
+ */
4938
+ fingerprint: string;
4939
+
4940
+ /**
4941
+ * The item type. Always `program`.
4942
+ */
4943
+ type: 'program';
4944
+ }
4945
+
4946
+ export interface ProgramOutput {
4947
+ /**
4948
+ * The unique ID of this program output item.
4949
+ */
4950
+ id: string;
4951
+
4952
+ /**
4953
+ * The call ID of the program item.
4954
+ */
4955
+ call_id: string;
4956
+
4957
+ /**
4958
+ * The result produced by the program item.
4959
+ */
4960
+ result: string;
4961
+
4962
+ /**
4963
+ * The terminal status of the program output.
4964
+ */
4965
+ status: 'completed' | 'incomplete';
4966
+
4967
+ /**
4968
+ * The item type. Always `program_output`.
4969
+ */
4970
+ type: 'program_output';
4971
+ }
4456
4972
  }
4457
4973
 
4458
4974
  /**
@@ -4503,6 +5019,27 @@ export interface ResponseInputText {
4503
5019
  * The type of the input item. Always `input_text`.
4504
5020
  */
4505
5021
  type: 'input_text';
5022
+
5023
+ /**
5024
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
5025
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
5026
+ * token block.
5027
+ */
5028
+ prompt_cache_breakpoint?: ResponseInputText.PromptCacheBreakpoint;
5029
+ }
5030
+
5031
+ export namespace ResponseInputText {
5032
+ /**
5033
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
5034
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
5035
+ * token block.
5036
+ */
5037
+ export interface PromptCacheBreakpoint {
5038
+ /**
5039
+ * The breakpoint mode. Always `explicit`.
5040
+ */
5041
+ mode: 'explicit';
5042
+ }
4506
5043
  }
4507
5044
 
4508
5045
  /**
@@ -4518,6 +5055,27 @@ export interface ResponseInputTextContent {
4518
5055
  * The type of the input item. Always `input_text`.
4519
5056
  */
4520
5057
  type: 'input_text';
5058
+
5059
+ /**
5060
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
5061
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
5062
+ * token block.
5063
+ */
5064
+ prompt_cache_breakpoint?: ResponseInputTextContent.PromptCacheBreakpoint | null;
5065
+ }
5066
+
5067
+ export namespace ResponseInputTextContent {
5068
+ /**
5069
+ * Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL
5070
+ * from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a
5071
+ * token block.
5072
+ */
5073
+ export interface PromptCacheBreakpoint {
5074
+ /**
5075
+ * The breakpoint mode. Always `explicit`.
5076
+ */
5077
+ mode: 'explicit';
5078
+ }
4521
5079
  }
4522
5080
 
4523
5081
  /**
@@ -4536,6 +5094,8 @@ export type ResponseItem =
4536
5094
  | ResponseToolSearchOutputItem
4537
5095
  | ResponseItem.AdditionalTools
4538
5096
  | ResponseReasoningItem
5097
+ | ResponseItem.Program
5098
+ | ResponseItem.ProgramOutput
4539
5099
  | ResponseCompactionItem
4540
5100
  | ResponseItem.ImageGenerationCall
4541
5101
  | ResponseCodeInterpreterToolCall
@@ -4575,6 +5135,60 @@ export namespace ResponseItem {
4575
5135
  type: 'additional_tools';
4576
5136
  }
4577
5137
 
5138
+ export interface Program {
5139
+ /**
5140
+ * The unique ID of the program item.
5141
+ */
5142
+ id: string;
5143
+
5144
+ /**
5145
+ * The stable call ID of the program item.
5146
+ */
5147
+ call_id: string;
5148
+
5149
+ /**
5150
+ * The JavaScript source executed by programmatic tool calling.
5151
+ */
5152
+ code: string;
5153
+
5154
+ /**
5155
+ * Opaque program replay fingerprint that must be round-tripped.
5156
+ */
5157
+ fingerprint: string;
5158
+
5159
+ /**
5160
+ * The type of the item. Always `program`.
5161
+ */
5162
+ type: 'program';
5163
+ }
5164
+
5165
+ export interface ProgramOutput {
5166
+ /**
5167
+ * The unique ID of the program output item.
5168
+ */
5169
+ id: string;
5170
+
5171
+ /**
5172
+ * The call ID of the program item.
5173
+ */
5174
+ call_id: string;
5175
+
5176
+ /**
5177
+ * The result produced by the program item.
5178
+ */
5179
+ result: string;
5180
+
5181
+ /**
5182
+ * The terminal status of the program output item.
5183
+ */
5184
+ status: 'completed' | 'incomplete';
5185
+
5186
+ /**
5187
+ * The type of the item. Always `program_output`.
5188
+ */
5189
+ type: 'program_output';
5190
+ }
5191
+
4578
5192
  /**
4579
5193
  * An image generation request made by the model.
4580
5194
  */
@@ -5118,6 +5732,8 @@ export type ResponseOutputItem =
5118
5732
  | ResponseComputerToolCall
5119
5733
  | ResponseComputerToolCallOutputItem
5120
5734
  | ResponseReasoningItem
5735
+ | ResponseOutputItem.Program
5736
+ | ResponseOutputItem.ProgramOutput
5121
5737
  | ResponseToolSearchCall
5122
5738
  | ResponseToolSearchOutputItem
5123
5739
  | ResponseOutputItem.AdditionalTools
@@ -5138,6 +5754,60 @@ export type ResponseOutputItem =
5138
5754
  | ResponseCustomToolCallOutputItem;
5139
5755
 
5140
5756
  export namespace ResponseOutputItem {
5757
+ export interface Program {
5758
+ /**
5759
+ * The unique ID of the program item.
5760
+ */
5761
+ id: string;
5762
+
5763
+ /**
5764
+ * The stable call ID of the program item.
5765
+ */
5766
+ call_id: string;
5767
+
5768
+ /**
5769
+ * The JavaScript source executed by programmatic tool calling.
5770
+ */
5771
+ code: string;
5772
+
5773
+ /**
5774
+ * Opaque program replay fingerprint that must be round-tripped.
5775
+ */
5776
+ fingerprint: string;
5777
+
5778
+ /**
5779
+ * The type of the item. Always `program`.
5780
+ */
5781
+ type: 'program';
5782
+ }
5783
+
5784
+ export interface ProgramOutput {
5785
+ /**
5786
+ * The unique ID of the program output item.
5787
+ */
5788
+ id: string;
5789
+
5790
+ /**
5791
+ * The call ID of the program item.
5792
+ */
5793
+ call_id: string;
5794
+
5795
+ /**
5796
+ * The result produced by the program item.
5797
+ */
5798
+ result: string;
5799
+
5800
+ /**
5801
+ * The terminal status of the program output item.
5802
+ */
5803
+ status: 'completed' | 'incomplete';
5804
+
5805
+ /**
5806
+ * The type of the item. Always `program_output`.
5807
+ */
5808
+ type: 'program_output';
5809
+ }
5810
+
5141
5811
  export interface AdditionalTools {
5142
5812
  /**
5143
5813
  * The unique ID of the additional tools item.
@@ -5957,6 +6627,12 @@ export interface ResponseReasoningSummaryPartDoneEvent {
5957
6627
  * The type of the event. Always `response.reasoning_summary_part.done`.
5958
6628
  */
5959
6629
  type: 'response.reasoning_summary_part.done';
6630
+
6631
+ /**
6632
+ * The completion status of the summary part. Omitted when the part completed
6633
+ * normally and set to `incomplete` when generation was interrupted.
6634
+ */
6635
+ status?: 'incomplete';
5960
6636
  }
5961
6637
 
5962
6638
  export namespace ResponseReasoningSummaryPartDoneEvent {
@@ -6581,6 +7257,11 @@ export namespace ResponseUsage {
6581
7257
  * A detailed breakdown of the input tokens.
6582
7258
  */
6583
7259
  export interface InputTokensDetails {
7260
+ /**
7261
+ * The number of input tokens that were written to the cache.
7262
+ */
7263
+ cache_write_tokens: number;
7264
+
6584
7265
  /**
6585
7266
  * The number of tokens that were retrieved from the cache.
6586
7267
  * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
@@ -6809,11 +7490,29 @@ export interface ResponsesClientEvent {
6809
7490
  prompt_cache_key?: string;
6810
7491
 
6811
7492
  /**
7493
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7494
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7495
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7496
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7497
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7498
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7499
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7500
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7501
+ * for current details.
7502
+ */
7503
+ prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
7504
+
7505
+ /**
7506
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7507
+ *
6812
7508
  * The retention policy for the prompt cache. Set to `24h` to enable extended
6813
7509
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6814
7510
  * of 24 hours.
6815
7511
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6816
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
7512
+ * This field expresses a maximum retention policy, while
7513
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7514
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7515
+ * models, only `24h` is supported.
6817
7516
  *
6818
7517
  * For older models that support both `in_memory` and `24h`, the default depends on
6819
7518
  * your organization's data retention policy:
@@ -6911,6 +7610,7 @@ export interface ResponsesClientEvent {
6911
7610
  | ToolChoiceFunction
6912
7611
  | ToolChoiceMcp
6913
7612
  | ToolChoiceCustom
7613
+ | ResponsesClientEvent.SpecificProgrammaticToolCallingParam
6914
7614
  | ToolChoiceApplyPatch
6915
7615
  | ToolChoiceShell;
6916
7616
 
@@ -6997,6 +7697,74 @@ export namespace ResponsesClientEvent {
6997
7697
  * 'omni-moderation-latest'.
6998
7698
  */
6999
7699
  model: string;
7700
+
7701
+ /**
7702
+ * The policy to apply to moderated response input and output.
7703
+ */
7704
+ policy?: Moderation.Policy | null;
7705
+ }
7706
+
7707
+ export namespace Moderation {
7708
+ /**
7709
+ * The policy to apply to moderated response input and output.
7710
+ */
7711
+ export interface Policy {
7712
+ /**
7713
+ * The moderation policy for the response input.
7714
+ */
7715
+ input?: Policy.Input | null;
7716
+
7717
+ /**
7718
+ * The moderation policy for the response output.
7719
+ */
7720
+ output?: Policy.Output | null;
7721
+ }
7722
+
7723
+ export namespace Policy {
7724
+ /**
7725
+ * The moderation policy for the response input.
7726
+ */
7727
+ export interface Input {
7728
+ mode: 'score' | 'block';
7729
+ }
7730
+
7731
+ /**
7732
+ * The moderation policy for the response output.
7733
+ */
7734
+ export interface Output {
7735
+ mode: 'score' | 'block';
7736
+ }
7737
+ }
7738
+ }
7739
+
7740
+ /**
7741
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7742
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7743
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7744
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7745
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7746
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7747
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7748
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7749
+ * for current details.
7750
+ */
7751
+ export interface PromptCacheOptions {
7752
+ /**
7753
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
7754
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
7755
+ * and writes up to the latest three explicit breakpoints in the request. With
7756
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
7757
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
7758
+ * request does not use prompt caching.
7759
+ */
7760
+ mode?: 'implicit' | 'explicit';
7761
+
7762
+ /**
7763
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
7764
+ * written by the request. Defaults to `30m`, which is currently the only supported
7765
+ * value. The backend may retain cache entries for longer.
7766
+ */
7767
+ ttl?: '30m';
7000
7768
  }
7001
7769
 
7002
7770
  /**
@@ -7013,6 +7781,13 @@ export namespace ResponsesClientEvent {
7013
7781
  */
7014
7782
  include_obfuscation?: boolean;
7015
7783
  }
7784
+
7785
+ export interface SpecificProgrammaticToolCallingParam {
7786
+ /**
7787
+ * The tool to call. Always `programmatic_tool_calling`.
7788
+ */
7789
+ type: 'programmatic_tool_calling';
7790
+ }
7016
7791
  }
7017
7792
 
7018
7793
  /**
@@ -7101,6 +7876,7 @@ export type Tool =
7101
7876
  | WebSearchTool
7102
7877
  | Tool.Mcp
7103
7878
  | Tool.CodeInterpreter
7879
+ | Tool.ProgrammaticToolCalling
7104
7880
  | Tool.ImageGeneration
7105
7881
  | Tool.LocalShell
7106
7882
  | FunctionShellTool
@@ -7127,6 +7903,11 @@ export namespace Tool {
7127
7903
  */
7128
7904
  type: 'mcp';
7129
7905
 
7906
+ /**
7907
+ * The tool invocation context(s).
7908
+ */
7909
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
7910
+
7130
7911
  /**
7131
7912
  * List of allowed tool names or a filter object.
7132
7913
  */
@@ -7289,6 +8070,11 @@ export namespace Tool {
7289
8070
  * The type of the code interpreter tool. Always `code_interpreter`.
7290
8071
  */
7291
8072
  type: 'code_interpreter';
8073
+
8074
+ /**
8075
+ * The tool invocation context(s).
8076
+ */
8077
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
7292
8078
  }
7293
8079
 
7294
8080
  export namespace CodeInterpreter {
@@ -7321,6 +8107,13 @@ export namespace Tool {
7321
8107
  }
7322
8108
  }
7323
8109
 
8110
+ export interface ProgrammaticToolCalling {
8111
+ /**
8112
+ * The type of the tool. Always `programmatic_tool_calling`.
8113
+ */
8114
+ type: 'programmatic_tool_calling';
8115
+ }
8116
+
7324
8117
  /**
7325
8118
  * A tool that generates images using the GPT image models.
7326
8119
  */
@@ -7886,11 +8679,29 @@ export interface ResponseCreateParamsBase {
7886
8679
  prompt_cache_key?: string;
7887
8680
 
7888
8681
  /**
8682
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8683
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8684
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8685
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8686
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8687
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8688
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8689
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8690
+ * for current details.
8691
+ */
8692
+ prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
8693
+
8694
+ /**
8695
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
8696
+ *
7889
8697
  * The retention policy for the prompt cache. Set to `24h` to enable extended
7890
8698
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
7891
8699
  * of 24 hours.
7892
8700
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
7893
- * For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
8701
+ * This field expresses a maximum retention policy, while
8702
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
8703
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
8704
+ * models, only `24h` is supported.
7894
8705
  *
7895
8706
  * For older models that support both `in_memory` and `24h`, the default depends on
7896
8707
  * your organization's data retention policy:
@@ -7987,6 +8798,7 @@ export interface ResponseCreateParamsBase {
7987
8798
  | ToolChoiceFunction
7988
8799
  | ToolChoiceMcp
7989
8800
  | ToolChoiceCustom
8801
+ | ResponseCreateParams.SpecificProgrammaticToolCallingParam
7990
8802
  | ToolChoiceApplyPatch
7991
8803
  | ToolChoiceShell;
7992
8804
 
@@ -8073,6 +8885,74 @@ export namespace ResponseCreateParams {
8073
8885
  * 'omni-moderation-latest'.
8074
8886
  */
8075
8887
  model: string;
8888
+
8889
+ /**
8890
+ * The policy to apply to moderated response input and output.
8891
+ */
8892
+ policy?: Moderation.Policy | null;
8893
+ }
8894
+
8895
+ export namespace Moderation {
8896
+ /**
8897
+ * The policy to apply to moderated response input and output.
8898
+ */
8899
+ export interface Policy {
8900
+ /**
8901
+ * The moderation policy for the response input.
8902
+ */
8903
+ input?: Policy.Input | null;
8904
+
8905
+ /**
8906
+ * The moderation policy for the response output.
8907
+ */
8908
+ output?: Policy.Output | null;
8909
+ }
8910
+
8911
+ export namespace Policy {
8912
+ /**
8913
+ * The moderation policy for the response input.
8914
+ */
8915
+ export interface Input {
8916
+ mode: 'score' | 'block';
8917
+ }
8918
+
8919
+ /**
8920
+ * The moderation policy for the response output.
8921
+ */
8922
+ export interface Output {
8923
+ mode: 'score' | 'block';
8924
+ }
8925
+ }
8926
+ }
8927
+
8928
+ /**
8929
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8930
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8931
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8932
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8933
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8934
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8935
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8936
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8937
+ * for current details.
8938
+ */
8939
+ export interface PromptCacheOptions {
8940
+ /**
8941
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
8942
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
8943
+ * and writes up to the latest three explicit breakpoints in the request. With
8944
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
8945
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
8946
+ * request does not use prompt caching.
8947
+ */
8948
+ mode?: 'implicit' | 'explicit';
8949
+
8950
+ /**
8951
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
8952
+ * written by the request. Defaults to `30m`, which is currently the only supported
8953
+ * value. The backend may retain cache entries for longer.
8954
+ */
8955
+ ttl?: '30m';
8076
8956
  }
8077
8957
 
8078
8958
  /**
@@ -8090,6 +8970,13 @@ export namespace ResponseCreateParams {
8090
8970
  include_obfuscation?: boolean;
8091
8971
  }
8092
8972
 
8973
+ export interface SpecificProgrammaticToolCallingParam {
8974
+ /**
8975
+ * The tool to call. Always `programmatic_tool_calling`.
8976
+ */
8977
+ type: 'programmatic_tool_calling';
8978
+ }
8979
+
8093
8980
  export type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
8094
8981
  export type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
8095
8982
  }
@@ -8191,6 +9078,9 @@ export interface ResponseCompactParams {
8191
9078
  * available models.
8192
9079
  */
8193
9080
  model:
9081
+ | 'gpt-5.6-sol'
9082
+ | 'gpt-5.6-terra'
9083
+ | 'gpt-5.6-luna'
8194
9084
  | 'gpt-5.4'
8195
9085
  | 'gpt-5.4-mini'
8196
9086
  | 'gpt-5.4-nano'
@@ -8313,7 +9203,20 @@ export interface ResponseCompactParams {
8313
9203
  prompt_cache_key?: string | null;
8314
9204
 
8315
9205
  /**
8316
- * How long to retain a prompt cache entry created by this request.
9206
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
9207
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
9208
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
9209
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
9210
+ * up to the latest 80 breakpoints in the conversation, without a content-block
9211
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
9212
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
9213
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
9214
+ * for current details.
9215
+ */
9216
+ prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
9217
+
9218
+ /**
9219
+ * @deprecated How long to retain a prompt cache entry created by this request.
8317
9220
  */
8318
9221
  prompt_cache_retention?: 'in_memory' | '24h' | null;
8319
9222
 
@@ -8323,6 +9226,38 @@ export interface ResponseCompactParams {
8323
9226
  service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
8324
9227
  }
8325
9228
 
9229
+ export namespace ResponseCompactParams {
9230
+ /**
9231
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
9232
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
9233
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
9234
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
9235
+ * up to the latest 80 breakpoints in the conversation, without a content-block
9236
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
9237
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
9238
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
9239
+ * for current details.
9240
+ */
9241
+ export interface PromptCacheOptions {
9242
+ /**
9243
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
9244
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
9245
+ * and writes up to the latest three explicit breakpoints in the request. With
9246
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
9247
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
9248
+ * request does not use prompt caching.
9249
+ */
9250
+ mode?: 'implicit' | 'explicit';
9251
+
9252
+ /**
9253
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
9254
+ * written by the request. Defaults to `30m`, which is currently the only supported
9255
+ * value. The backend may retain cache entries for longer.
9256
+ */
9257
+ ttl?: '30m';
9258
+ }
9259
+ }
9260
+
8326
9261
  Responses.InputItems = InputItems;
8327
9262
  Responses.InputTokens = InputTokens;
8328
9263