openai 6.45.0 → 6.47.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 (335) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +9 -2
  3. package/client.d.mts +1 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +1 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +11 -5
  8. package/client.js.map +1 -1
  9. package/client.mjs +11 -5
  10. package/client.mjs.map +1 -1
  11. package/core/streaming.d.mts.map +1 -1
  12. package/core/streaming.d.ts.map +1 -1
  13. package/core/streaming.js +38 -6
  14. package/core/streaming.js.map +1 -1
  15. package/core/streaming.mjs +38 -6
  16. package/core/streaming.mjs.map +1 -1
  17. package/core/uploads.d.mts +1 -1
  18. package/core/uploads.d.mts.map +1 -1
  19. package/core/uploads.d.ts +1 -1
  20. package/core/uploads.d.ts.map +1 -1
  21. package/core/uploads.js +3 -1
  22. package/core/uploads.js.map +1 -1
  23. package/core/uploads.mjs +1 -0
  24. package/core/uploads.mjs.map +1 -1
  25. package/helpers/audio.d.mts.map +1 -1
  26. package/helpers/audio.d.ts.map +1 -1
  27. package/helpers/audio.js +16 -3
  28. package/helpers/audio.js.map +1 -1
  29. package/helpers/audio.mjs +17 -4
  30. package/helpers/audio.mjs.map +1 -1
  31. package/helpers/zod.d.mts +20 -7
  32. package/helpers/zod.d.mts.map +1 -1
  33. package/helpers/zod.d.ts +20 -7
  34. package/helpers/zod.d.ts.map +1 -1
  35. package/helpers/zod.js +24 -12
  36. package/helpers/zod.js.map +1 -1
  37. package/helpers/zod.mjs +24 -12
  38. package/helpers/zod.mjs.map +1 -1
  39. package/index.d.mts +1 -1
  40. package/index.d.mts.map +1 -1
  41. package/index.d.ts +1 -1
  42. package/index.d.ts.map +1 -1
  43. package/index.js +2 -1
  44. package/index.js.map +1 -1
  45. package/index.mjs +1 -1
  46. package/index.mjs.map +1 -1
  47. package/internal/uploads.d.mts +26 -1
  48. package/internal/uploads.d.mts.map +1 -1
  49. package/internal/uploads.d.ts +26 -1
  50. package/internal/uploads.d.ts.map +1 -1
  51. package/internal/uploads.js +169 -1
  52. package/internal/uploads.js.map +1 -1
  53. package/internal/uploads.mjs +169 -2
  54. package/internal/uploads.mjs.map +1 -1
  55. package/lib/AbstractChatCompletionRunner.d.mts +3 -3
  56. package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
  57. package/lib/AbstractChatCompletionRunner.d.ts +3 -3
  58. package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  59. package/lib/AbstractChatCompletionRunner.js +18 -3
  60. package/lib/AbstractChatCompletionRunner.js.map +1 -1
  61. package/lib/AbstractChatCompletionRunner.mjs +18 -3
  62. package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  63. package/lib/AssistantStream.d.mts.map +1 -1
  64. package/lib/AssistantStream.d.ts.map +1 -1
  65. package/lib/AssistantStream.js +4 -3
  66. package/lib/AssistantStream.js.map +1 -1
  67. package/lib/AssistantStream.mjs +4 -3
  68. package/lib/AssistantStream.mjs.map +1 -1
  69. package/lib/ChatCompletionRunner.d.mts +26 -2
  70. package/lib/ChatCompletionRunner.d.mts.map +1 -1
  71. package/lib/ChatCompletionRunner.d.ts +26 -2
  72. package/lib/ChatCompletionRunner.d.ts.map +1 -1
  73. package/lib/ChatCompletionRunner.js.map +1 -1
  74. package/lib/ChatCompletionRunner.mjs.map +1 -1
  75. package/lib/ChatCompletionStream.d.mts +14 -1
  76. package/lib/ChatCompletionStream.d.mts.map +1 -1
  77. package/lib/ChatCompletionStream.d.ts +14 -1
  78. package/lib/ChatCompletionStream.d.ts.map +1 -1
  79. package/lib/ChatCompletionStream.js +75 -16
  80. package/lib/ChatCompletionStream.js.map +1 -1
  81. package/lib/ChatCompletionStream.mjs +74 -16
  82. package/lib/ChatCompletionStream.mjs.map +1 -1
  83. package/lib/ChatCompletionStreamingRunner.d.mts +25 -2
  84. package/lib/ChatCompletionStreamingRunner.d.mts.map +1 -1
  85. package/lib/ChatCompletionStreamingRunner.d.ts +25 -2
  86. package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
  87. package/lib/ChatCompletionStreamingRunner.js +77 -0
  88. package/lib/ChatCompletionStreamingRunner.js.map +1 -1
  89. package/lib/ChatCompletionStreamingRunner.mjs +78 -1
  90. package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
  91. package/lib/EventStream.d.mts +13 -0
  92. package/lib/EventStream.d.mts.map +1 -1
  93. package/lib/EventStream.d.ts +13 -0
  94. package/lib/EventStream.d.ts.map +1 -1
  95. package/lib/EventStream.js +107 -2
  96. package/lib/EventStream.js.map +1 -1
  97. package/lib/EventStream.mjs +107 -2
  98. package/lib/EventStream.mjs.map +1 -1
  99. package/lib/RunnableFunction.d.mts +38 -21
  100. package/lib/RunnableFunction.d.mts.map +1 -1
  101. package/lib/RunnableFunction.d.ts +38 -21
  102. package/lib/RunnableFunction.d.ts.map +1 -1
  103. package/lib/RunnableFunction.js.map +1 -1
  104. package/lib/RunnableFunction.mjs.map +1 -1
  105. package/lib/parser.d.mts +2 -2
  106. package/lib/parser.d.mts.map +1 -1
  107. package/lib/parser.d.ts +2 -2
  108. package/lib/parser.d.ts.map +1 -1
  109. package/lib/parser.js.map +1 -1
  110. package/lib/parser.mjs.map +1 -1
  111. package/lib/responses/ResponseAccumulator.d.mts +6 -1
  112. package/lib/responses/ResponseAccumulator.d.mts.map +1 -1
  113. package/lib/responses/ResponseAccumulator.d.ts +6 -1
  114. package/lib/responses/ResponseAccumulator.d.ts.map +1 -1
  115. package/lib/responses/ResponseAccumulator.js +1 -0
  116. package/lib/responses/ResponseAccumulator.js.map +1 -1
  117. package/lib/responses/ResponseAccumulator.mjs +1 -0
  118. package/lib/responses/ResponseAccumulator.mjs.map +1 -1
  119. package/lib/responses/ResponseInputItems.d.mts.map +1 -1
  120. package/lib/responses/ResponseInputItems.d.ts.map +1 -1
  121. package/lib/responses/ResponseInputItems.js +2 -0
  122. package/lib/responses/ResponseInputItems.js.map +1 -1
  123. package/lib/responses/ResponseInputItems.mjs +2 -0
  124. package/lib/responses/ResponseInputItems.mjs.map +1 -1
  125. package/lib/responses/ResponseStream.d.mts +6 -1
  126. package/lib/responses/ResponseStream.d.mts.map +1 -1
  127. package/lib/responses/ResponseStream.d.ts +6 -1
  128. package/lib/responses/ResponseStream.d.ts.map +1 -1
  129. package/lib/responses/ResponseStream.js +21 -0
  130. package/lib/responses/ResponseStream.js.map +1 -1
  131. package/lib/responses/ResponseStream.mjs +21 -0
  132. package/lib/responses/ResponseStream.mjs.map +1 -1
  133. package/package.json +1 -1
  134. package/resources/admin/organization/projects/api-keys.d.mts +12 -0
  135. package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
  136. package/resources/admin/organization/projects/api-keys.d.ts +12 -0
  137. package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
  138. package/resources/beta/assistants.d.mts +12 -26
  139. package/resources/beta/assistants.d.mts.map +1 -1
  140. package/resources/beta/assistants.d.ts +12 -26
  141. package/resources/beta/assistants.d.ts.map +1 -1
  142. package/resources/beta/beta.d.mts +6 -1
  143. package/resources/beta/beta.d.mts.map +1 -1
  144. package/resources/beta/beta.d.ts +6 -1
  145. package/resources/beta/beta.d.ts.map +1 -1
  146. package/resources/beta/beta.js +4 -0
  147. package/resources/beta/beta.js.map +1 -1
  148. package/resources/beta/beta.mjs +4 -0
  149. package/resources/beta/beta.mjs.map +1 -1
  150. package/resources/beta/index.d.mts +1 -0
  151. package/resources/beta/index.d.mts.map +1 -1
  152. package/resources/beta/index.d.ts +1 -0
  153. package/resources/beta/index.d.ts.map +1 -1
  154. package/resources/beta/index.js +5 -3
  155. package/resources/beta/index.js.map +1 -1
  156. package/resources/beta/index.mjs +1 -0
  157. package/resources/beta/index.mjs.map +1 -1
  158. package/resources/beta/responses/index.d.mts +6 -0
  159. package/resources/beta/responses/index.d.mts.map +1 -0
  160. package/resources/beta/responses/index.d.ts +6 -0
  161. package/resources/beta/responses/index.d.ts.map +1 -0
  162. package/resources/beta/responses/index.js +11 -0
  163. package/resources/beta/responses/index.js.map +1 -0
  164. package/resources/beta/responses/index.mjs +5 -0
  165. package/resources/beta/responses/index.mjs.map +1 -0
  166. package/resources/beta/responses/input-items.d.mts +69 -0
  167. package/resources/beta/responses/input-items.d.mts.map +1 -0
  168. package/resources/beta/responses/input-items.d.ts +69 -0
  169. package/resources/beta/responses/input-items.d.ts.map +1 -0
  170. package/resources/beta/responses/input-items.js +37 -0
  171. package/resources/beta/responses/input-items.js.map +1 -0
  172. package/resources/beta/responses/input-items.mjs +33 -0
  173. package/resources/beta/responses/input-items.mjs.map +1 -0
  174. package/resources/beta/responses/input-tokens.d.mts +191 -0
  175. package/resources/beta/responses/input-tokens.d.mts.map +1 -0
  176. package/resources/beta/responses/input-tokens.d.ts +191 -0
  177. package/resources/beta/responses/input-tokens.d.ts.map +1 -0
  178. package/resources/beta/responses/input-tokens.js +34 -0
  179. package/resources/beta/responses/input-tokens.js.map +1 -0
  180. package/resources/beta/responses/input-tokens.mjs +30 -0
  181. package/resources/beta/responses/input-tokens.mjs.map +1 -0
  182. package/resources/beta/responses/internal-base.d.mts +71 -0
  183. package/resources/beta/responses/internal-base.d.mts.map +1 -0
  184. package/resources/beta/responses/internal-base.d.ts +71 -0
  185. package/resources/beta/responses/internal-base.d.ts.map +1 -0
  186. package/resources/beta/responses/internal-base.js +48 -0
  187. package/resources/beta/responses/internal-base.js.map +1 -0
  188. package/resources/beta/responses/internal-base.mjs +42 -0
  189. package/resources/beta/responses/internal-base.mjs.map +1 -0
  190. package/resources/beta/responses/responses.d.mts +9986 -0
  191. package/resources/beta/responses/responses.d.mts.map +1 -0
  192. package/resources/beta/responses/responses.d.ts +9986 -0
  193. package/resources/beta/responses/responses.d.ts.map +1 -0
  194. package/resources/beta/responses/responses.js +121 -0
  195. package/resources/beta/responses/responses.js.map +1 -0
  196. package/resources/beta/responses/responses.mjs +116 -0
  197. package/resources/beta/responses/responses.mjs.map +1 -0
  198. package/resources/beta/responses/ws-base.d.mts +106 -0
  199. package/resources/beta/responses/ws-base.d.mts.map +1 -0
  200. package/resources/beta/responses/ws-base.d.ts +106 -0
  201. package/resources/beta/responses/ws-base.d.ts.map +1 -0
  202. package/resources/beta/responses/ws-base.js +476 -0
  203. package/resources/beta/responses/ws-base.js.map +1 -0
  204. package/resources/beta/responses/ws-base.mjs +472 -0
  205. package/resources/beta/responses/ws-base.mjs.map +1 -0
  206. package/resources/beta/responses/ws.d.mts +13 -0
  207. package/resources/beta/responses/ws.d.mts.map +1 -0
  208. package/resources/beta/responses/ws.d.ts +13 -0
  209. package/resources/beta/responses/ws.d.ts.map +1 -0
  210. package/resources/beta/responses/ws.js +31 -0
  211. package/resources/beta/responses/ws.js.map +1 -0
  212. package/resources/beta/responses/ws.mjs +26 -0
  213. package/resources/beta/responses/ws.mjs.map +1 -0
  214. package/resources/beta/responses.d.mts +2 -0
  215. package/resources/beta/responses.d.mts.map +1 -0
  216. package/resources/beta/responses.d.ts +2 -0
  217. package/resources/beta/responses.d.ts.map +1 -0
  218. package/resources/beta/responses.js +6 -0
  219. package/resources/beta/responses.js.map +1 -0
  220. package/resources/beta/responses.mjs +3 -0
  221. package/resources/beta/responses.mjs.map +1 -0
  222. package/resources/beta/threads/runs/runs.d.mts +6 -13
  223. package/resources/beta/threads/runs/runs.d.mts.map +1 -1
  224. package/resources/beta/threads/runs/runs.d.ts +6 -13
  225. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  226. package/resources/beta/threads/runs/runs.js.map +1 -1
  227. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  228. package/resources/chat/completions/completions.d.mts +170 -20
  229. package/resources/chat/completions/completions.d.mts.map +1 -1
  230. package/resources/chat/completions/completions.d.ts +170 -20
  231. package/resources/chat/completions/completions.d.ts.map +1 -1
  232. package/resources/chat/completions/completions.js.map +1 -1
  233. package/resources/chat/completions/completions.mjs.map +1 -1
  234. package/resources/completions.d.mts +4 -0
  235. package/resources/completions.d.mts.map +1 -1
  236. package/resources/completions.d.ts +4 -0
  237. package/resources/completions.d.ts.map +1 -1
  238. package/resources/conversations/conversations.d.mts +19 -0
  239. package/resources/conversations/conversations.d.mts.map +1 -1
  240. package/resources/conversations/conversations.d.ts +19 -0
  241. package/resources/conversations/conversations.d.ts.map +1 -1
  242. package/resources/conversations/conversations.js.map +1 -1
  243. package/resources/conversations/conversations.mjs.map +1 -1
  244. package/resources/conversations/items.d.mts +45 -1
  245. package/resources/conversations/items.d.mts.map +1 -1
  246. package/resources/conversations/items.d.ts +45 -1
  247. package/resources/conversations/items.d.ts.map +1 -1
  248. package/resources/evals/runs/runs.d.mts +66 -143
  249. package/resources/evals/runs/runs.d.mts.map +1 -1
  250. package/resources/evals/runs/runs.d.ts +66 -143
  251. package/resources/evals/runs/runs.d.ts.map +1 -1
  252. package/resources/evals/runs/runs.js.map +1 -1
  253. package/resources/evals/runs/runs.mjs.map +1 -1
  254. package/resources/graders/grader-models.d.mts +6 -13
  255. package/resources/graders/grader-models.d.mts.map +1 -1
  256. package/resources/graders/grader-models.d.ts +6 -13
  257. package/resources/graders/grader-models.d.ts.map +1 -1
  258. package/resources/realtime/calls.d.mts +1 -1
  259. package/resources/realtime/calls.d.mts.map +1 -1
  260. package/resources/realtime/calls.d.ts +1 -1
  261. package/resources/realtime/calls.d.ts.map +1 -1
  262. package/resources/realtime/client-secrets.d.mts +5 -1
  263. package/resources/realtime/client-secrets.d.mts.map +1 -1
  264. package/resources/realtime/client-secrets.d.ts +5 -1
  265. package/resources/realtime/client-secrets.d.ts.map +1 -1
  266. package/resources/realtime/realtime.d.mts +9 -1
  267. package/resources/realtime/realtime.d.mts.map +1 -1
  268. package/resources/realtime/realtime.d.ts +9 -1
  269. package/resources/realtime/realtime.d.ts.map +1 -1
  270. package/resources/realtime/realtime.js.map +1 -1
  271. package/resources/realtime/realtime.mjs.map +1 -1
  272. package/resources/responses/input-tokens.d.mts +7 -1
  273. package/resources/responses/input-tokens.d.mts.map +1 -1
  274. package/resources/responses/input-tokens.d.ts +7 -1
  275. package/resources/responses/input-tokens.d.ts.map +1 -1
  276. package/resources/responses/responses.d.mts +819 -26
  277. package/resources/responses/responses.d.mts.map +1 -1
  278. package/resources/responses/responses.d.ts +819 -26
  279. package/resources/responses/responses.d.ts.map +1 -1
  280. package/resources/responses/responses.js +1 -1
  281. package/resources/responses/responses.js.map +1 -1
  282. package/resources/responses/responses.mjs +1 -1
  283. package/resources/responses/responses.mjs.map +1 -1
  284. package/resources/shared.d.mts +20 -28
  285. package/resources/shared.d.mts.map +1 -1
  286. package/resources/shared.d.ts +20 -28
  287. package/resources/shared.d.ts.map +1 -1
  288. package/src/client.ts +13 -5
  289. package/src/core/streaming.ts +36 -8
  290. package/src/core/uploads.ts +6 -1
  291. package/src/helpers/audio.ts +18 -4
  292. package/src/helpers/zod.ts +62 -23
  293. package/src/index.ts +1 -1
  294. package/src/internal/uploads.ts +214 -4
  295. package/src/lib/AbstractChatCompletionRunner.ts +32 -9
  296. package/src/lib/AssistantStream.ts +4 -3
  297. package/src/lib/ChatCompletionRunner.ts +46 -6
  298. package/src/lib/ChatCompletionStream.ts +115 -17
  299. package/src/lib/ChatCompletionStreamingRunner.ts +144 -7
  300. package/src/lib/EventStream.ts +114 -4
  301. package/src/lib/RunnableFunction.ts +60 -31
  302. package/src/lib/parser.ts +4 -0
  303. package/src/lib/responses/ResponseAccumulator.ts +10 -1
  304. package/src/lib/responses/ResponseInputItems.ts +2 -0
  305. package/src/lib/responses/ResponseStream.ts +29 -1
  306. package/src/resources/admin/organization/projects/api-keys.ts +15 -1
  307. package/src/resources/beta/assistants.ts +12 -26
  308. package/src/resources/beta/beta.ts +330 -2
  309. package/src/resources/beta/index.ts +163 -0
  310. package/src/resources/beta/responses/index.ts +169 -0
  311. package/src/resources/beta/responses/input-items.ts +105 -0
  312. package/src/resources/beta/responses/input-tokens.ts +245 -0
  313. package/src/resources/beta/responses/internal-base.ts +117 -0
  314. package/src/resources/beta/responses/responses.ts +12633 -0
  315. package/src/resources/beta/responses/ws-base.ts +615 -0
  316. package/src/resources/beta/responses/ws.ts +38 -0
  317. package/src/resources/beta/responses.ts +3 -0
  318. package/src/resources/beta/threads/runs/runs.ts +6 -13
  319. package/src/resources/chat/completions/completions.ts +237 -23
  320. package/src/resources/completions.ts +5 -0
  321. package/src/resources/conversations/conversations.ts +21 -0
  322. package/src/resources/conversations/items.ts +56 -0
  323. package/src/resources/evals/runs/runs.ts +66 -143
  324. package/src/resources/graders/grader-models.ts +6 -13
  325. package/src/resources/realtime/calls.ts +2 -0
  326. package/src/resources/realtime/client-secrets.ts +7 -0
  327. package/src/resources/realtime/realtime.ts +12 -0
  328. package/src/resources/responses/input-tokens.ts +8 -0
  329. package/src/resources/responses/responses.ts +953 -17
  330. package/src/resources/shared.ts +23 -27
  331. package/src/version.ts +1 -1
  332. package/version.d.mts +1 -1
  333. package/version.d.ts +1 -1
  334. package/version.js +1 -1
  335. 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.
@@ -5828,8 +6498,9 @@ export interface ResponseReasoningItem {
5828
6498
  content?: Array<ResponseReasoningItem.Content>;
5829
6499
 
5830
6500
  /**
5831
- * The encrypted content of the reasoning item - populated when a response is
5832
- * generated with `reasoning.encrypted_content` in the `include` parameter.
6501
+ * The encrypted content of the reasoning item. This is populated by default for
6502
+ * reasoning items returned by `POST /v1/responses` and WebSocket `response.create`
6503
+ * requests.
5833
6504
  */
5834
6505
  encrypted_content?: string | null;
5835
6506
 
@@ -5957,6 +6628,12 @@ export interface ResponseReasoningSummaryPartDoneEvent {
5957
6628
  * The type of the event. Always `response.reasoning_summary_part.done`.
5958
6629
  */
5959
6630
  type: 'response.reasoning_summary_part.done';
6631
+
6632
+ /**
6633
+ * The completion status of the summary part. Omitted when the part completed
6634
+ * normally and set to `incomplete` when generation was interrupted.
6635
+ */
6636
+ status?: 'incomplete';
5960
6637
  }
5961
6638
 
5962
6639
  export namespace ResponseReasoningSummaryPartDoneEvent {
@@ -6581,6 +7258,11 @@ export namespace ResponseUsage {
6581
7258
  * A detailed breakdown of the input tokens.
6582
7259
  */
6583
7260
  export interface InputTokensDetails {
7261
+ /**
7262
+ * The number of input tokens that were written to the cache.
7263
+ */
7264
+ cache_write_tokens: number;
7265
+
6584
7266
  /**
6585
7267
  * The number of tokens that were retrieved from the cache.
6586
7268
  * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
@@ -6809,11 +7491,29 @@ export interface ResponsesClientEvent {
6809
7491
  prompt_cache_key?: string;
6810
7492
 
6811
7493
  /**
7494
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7495
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7496
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7497
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7498
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7499
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7500
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7501
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7502
+ * for current details.
7503
+ */
7504
+ prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
7505
+
7506
+ /**
7507
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7508
+ *
6812
7509
  * The retention policy for the prompt cache. Set to `24h` to enable extended
6813
7510
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6814
7511
  * of 24 hours.
6815
7512
  * [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.
7513
+ * This field expresses a maximum retention policy, while
7514
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7515
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7516
+ * models, only `24h` is supported.
6817
7517
  *
6818
7518
  * For older models that support both `in_memory` and `24h`, the default depends on
6819
7519
  * your organization's data retention policy:
@@ -6911,6 +7611,7 @@ export interface ResponsesClientEvent {
6911
7611
  | ToolChoiceFunction
6912
7612
  | ToolChoiceMcp
6913
7613
  | ToolChoiceCustom
7614
+ | ResponsesClientEvent.SpecificProgrammaticToolCallingParam
6914
7615
  | ToolChoiceApplyPatch
6915
7616
  | ToolChoiceShell;
6916
7617
 
@@ -6997,6 +7698,74 @@ export namespace ResponsesClientEvent {
6997
7698
  * 'omni-moderation-latest'.
6998
7699
  */
6999
7700
  model: string;
7701
+
7702
+ /**
7703
+ * The policy to apply to moderated response input and output.
7704
+ */
7705
+ policy?: Moderation.Policy | null;
7706
+ }
7707
+
7708
+ export namespace Moderation {
7709
+ /**
7710
+ * The policy to apply to moderated response input and output.
7711
+ */
7712
+ export interface Policy {
7713
+ /**
7714
+ * The moderation policy for the response input.
7715
+ */
7716
+ input?: Policy.Input | null;
7717
+
7718
+ /**
7719
+ * The moderation policy for the response output.
7720
+ */
7721
+ output?: Policy.Output | null;
7722
+ }
7723
+
7724
+ export namespace Policy {
7725
+ /**
7726
+ * The moderation policy for the response input.
7727
+ */
7728
+ export interface Input {
7729
+ mode: 'score' | 'block';
7730
+ }
7731
+
7732
+ /**
7733
+ * The moderation policy for the response output.
7734
+ */
7735
+ export interface Output {
7736
+ mode: 'score' | 'block';
7737
+ }
7738
+ }
7739
+ }
7740
+
7741
+ /**
7742
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7743
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7744
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7745
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7746
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7747
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7748
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7749
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7750
+ * for current details.
7751
+ */
7752
+ export interface PromptCacheOptions {
7753
+ /**
7754
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
7755
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
7756
+ * and writes up to the latest three explicit breakpoints in the request. With
7757
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
7758
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
7759
+ * request does not use prompt caching.
7760
+ */
7761
+ mode?: 'implicit' | 'explicit';
7762
+
7763
+ /**
7764
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
7765
+ * written by the request. Defaults to `30m`, which is currently the only supported
7766
+ * value. The backend may retain cache entries for longer.
7767
+ */
7768
+ ttl?: '30m';
7000
7769
  }
7001
7770
 
7002
7771
  /**
@@ -7013,6 +7782,13 @@ export namespace ResponsesClientEvent {
7013
7782
  */
7014
7783
  include_obfuscation?: boolean;
7015
7784
  }
7785
+
7786
+ export interface SpecificProgrammaticToolCallingParam {
7787
+ /**
7788
+ * The tool to call. Always `programmatic_tool_calling`.
7789
+ */
7790
+ type: 'programmatic_tool_calling';
7791
+ }
7016
7792
  }
7017
7793
 
7018
7794
  /**
@@ -7101,6 +7877,7 @@ export type Tool =
7101
7877
  | WebSearchTool
7102
7878
  | Tool.Mcp
7103
7879
  | Tool.CodeInterpreter
7880
+ | Tool.ProgrammaticToolCalling
7104
7881
  | Tool.ImageGeneration
7105
7882
  | Tool.LocalShell
7106
7883
  | FunctionShellTool
@@ -7127,6 +7904,11 @@ export namespace Tool {
7127
7904
  */
7128
7905
  type: 'mcp';
7129
7906
 
7907
+ /**
7908
+ * The tool invocation context(s).
7909
+ */
7910
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
7911
+
7130
7912
  /**
7131
7913
  * List of allowed tool names or a filter object.
7132
7914
  */
@@ -7289,6 +8071,11 @@ export namespace Tool {
7289
8071
  * The type of the code interpreter tool. Always `code_interpreter`.
7290
8072
  */
7291
8073
  type: 'code_interpreter';
8074
+
8075
+ /**
8076
+ * The tool invocation context(s).
8077
+ */
8078
+ allowed_callers?: Array<'direct' | 'programmatic'> | null;
7292
8079
  }
7293
8080
 
7294
8081
  export namespace CodeInterpreter {
@@ -7321,6 +8108,13 @@ export namespace Tool {
7321
8108
  }
7322
8109
  }
7323
8110
 
8111
+ export interface ProgrammaticToolCalling {
8112
+ /**
8113
+ * The type of the tool. Always `programmatic_tool_calling`.
8114
+ */
8115
+ type: 'programmatic_tool_calling';
8116
+ }
8117
+
7324
8118
  /**
7325
8119
  * A tool that generates images using the GPT image models.
7326
8120
  */
@@ -7886,11 +8680,29 @@ export interface ResponseCreateParamsBase {
7886
8680
  prompt_cache_key?: string;
7887
8681
 
7888
8682
  /**
8683
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8684
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8685
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8686
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8687
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8688
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8689
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8690
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8691
+ * for current details.
8692
+ */
8693
+ prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
8694
+
8695
+ /**
8696
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
8697
+ *
7889
8698
  * The retention policy for the prompt cache. Set to `24h` to enable extended
7890
8699
  * prompt caching, which keeps cached prefixes active for longer, up to a maximum
7891
8700
  * of 24 hours.
7892
8701
  * [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.
8702
+ * This field expresses a maximum retention policy, while
8703
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
8704
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
8705
+ * models, only `24h` is supported.
7894
8706
  *
7895
8707
  * For older models that support both `in_memory` and `24h`, the default depends on
7896
8708
  * your organization's data retention policy:
@@ -7987,6 +8799,7 @@ export interface ResponseCreateParamsBase {
7987
8799
  | ToolChoiceFunction
7988
8800
  | ToolChoiceMcp
7989
8801
  | ToolChoiceCustom
8802
+ | ResponseCreateParams.SpecificProgrammaticToolCallingParam
7990
8803
  | ToolChoiceApplyPatch
7991
8804
  | ToolChoiceShell;
7992
8805
 
@@ -8073,6 +8886,74 @@ export namespace ResponseCreateParams {
8073
8886
  * 'omni-moderation-latest'.
8074
8887
  */
8075
8888
  model: string;
8889
+
8890
+ /**
8891
+ * The policy to apply to moderated response input and output.
8892
+ */
8893
+ policy?: Moderation.Policy | null;
8894
+ }
8895
+
8896
+ export namespace Moderation {
8897
+ /**
8898
+ * The policy to apply to moderated response input and output.
8899
+ */
8900
+ export interface Policy {
8901
+ /**
8902
+ * The moderation policy for the response input.
8903
+ */
8904
+ input?: Policy.Input | null;
8905
+
8906
+ /**
8907
+ * The moderation policy for the response output.
8908
+ */
8909
+ output?: Policy.Output | null;
8910
+ }
8911
+
8912
+ export namespace Policy {
8913
+ /**
8914
+ * The moderation policy for the response input.
8915
+ */
8916
+ export interface Input {
8917
+ mode: 'score' | 'block';
8918
+ }
8919
+
8920
+ /**
8921
+ * The moderation policy for the response output.
8922
+ */
8923
+ export interface Output {
8924
+ mode: 'score' | 'block';
8925
+ }
8926
+ }
8927
+ }
8928
+
8929
+ /**
8930
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8931
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8932
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8933
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8934
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8935
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8936
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8937
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8938
+ * for current details.
8939
+ */
8940
+ export interface PromptCacheOptions {
8941
+ /**
8942
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
8943
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
8944
+ * and writes up to the latest three explicit breakpoints in the request. With
8945
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
8946
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
8947
+ * request does not use prompt caching.
8948
+ */
8949
+ mode?: 'implicit' | 'explicit';
8950
+
8951
+ /**
8952
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
8953
+ * written by the request. Defaults to `30m`, which is currently the only supported
8954
+ * value. The backend may retain cache entries for longer.
8955
+ */
8956
+ ttl?: '30m';
8076
8957
  }
8077
8958
 
8078
8959
  /**
@@ -8090,6 +8971,13 @@ export namespace ResponseCreateParams {
8090
8971
  include_obfuscation?: boolean;
8091
8972
  }
8092
8973
 
8974
+ export interface SpecificProgrammaticToolCallingParam {
8975
+ /**
8976
+ * The tool to call. Always `programmatic_tool_calling`.
8977
+ */
8978
+ type: 'programmatic_tool_calling';
8979
+ }
8980
+
8093
8981
  export type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming;
8094
8982
  export type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
8095
8983
  }
@@ -8191,6 +9079,9 @@ export interface ResponseCompactParams {
8191
9079
  * available models.
8192
9080
  */
8193
9081
  model:
9082
+ | 'gpt-5.6-sol'
9083
+ | 'gpt-5.6-terra'
9084
+ | 'gpt-5.6-luna'
8194
9085
  | 'gpt-5.4'
8195
9086
  | 'gpt-5.4-mini'
8196
9087
  | 'gpt-5.4-nano'
@@ -8313,7 +9204,20 @@ export interface ResponseCompactParams {
8313
9204
  prompt_cache_key?: string | null;
8314
9205
 
8315
9206
  /**
8316
- * How long to retain a prompt cache entry created by this request.
9207
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
9208
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
9209
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
9210
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
9211
+ * up to the latest 80 breakpoints in the conversation, without a content-block
9212
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
9213
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
9214
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
9215
+ * for current details.
9216
+ */
9217
+ prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
9218
+
9219
+ /**
9220
+ * @deprecated How long to retain a prompt cache entry created by this request.
8317
9221
  */
8318
9222
  prompt_cache_retention?: 'in_memory' | '24h' | null;
8319
9223
 
@@ -8323,6 +9227,38 @@ export interface ResponseCompactParams {
8323
9227
  service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
8324
9228
  }
8325
9229
 
9230
+ export namespace ResponseCompactParams {
9231
+ /**
9232
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
9233
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
9234
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
9235
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
9236
+ * up to the latest 80 breakpoints in the conversation, without a content-block
9237
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
9238
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
9239
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
9240
+ * for current details.
9241
+ */
9242
+ export interface PromptCacheOptions {
9243
+ /**
9244
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
9245
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
9246
+ * and writes up to the latest three explicit breakpoints in the request. With
9247
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
9248
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
9249
+ * request does not use prompt caching.
9250
+ */
9251
+ mode?: 'implicit' | 'explicit';
9252
+
9253
+ /**
9254
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
9255
+ * written by the request. Defaults to `30m`, which is currently the only supported
9256
+ * value. The backend may retain cache entries for longer.
9257
+ */
9258
+ ttl?: '30m';
9259
+ }
9260
+ }
9261
+
8326
9262
  Responses.InputItems = InputItems;
8327
9263
  Responses.InputTokens = InputTokens;
8328
9264