@nocobase/plugin-ai 2.1.7 → 2.1.8

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 (548) hide show
  1. package/dist/externalVersion.js +21 -21
  2. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.cjs +25 -34
  3. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.cts +10 -22
  4. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.ts +10 -22
  5. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.js +17 -25
  6. package/dist/node_modules/@langchain/xai/dist/chat_models/index.cjs +2 -2
  7. package/dist/node_modules/@langchain/xai/dist/chat_models/index.d.cts +3 -0
  8. package/dist/node_modules/@langchain/xai/dist/chat_models/index.js +3 -2
  9. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.cts +5 -12
  10. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.ts +5 -12
  11. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.cjs +18 -19
  12. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.cts +1 -1
  13. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.ts +1 -1
  14. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.js +13 -13
  15. package/dist/node_modules/@langchain/xai/dist/converters/responses.cjs +16 -22
  16. package/dist/node_modules/@langchain/xai/dist/converters/responses.js +7 -12
  17. package/dist/node_modules/@langchain/xai/dist/index.cjs +2 -2
  18. package/dist/node_modules/@langchain/xai/dist/index.d.ts +0 -1
  19. package/dist/node_modules/@langchain/xai/dist/index.js +1 -2
  20. package/dist/node_modules/@langchain/xai/dist/live_search.cjs +4 -5
  21. package/dist/node_modules/@langchain/xai/dist/live_search.js +4 -4
  22. package/dist/node_modules/@langchain/xai/dist/profiles.cjs +81 -97
  23. package/dist/node_modules/@langchain/xai/dist/profiles.js +81 -96
  24. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.cjs +1 -2
  25. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.js +1 -1
  26. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.cjs +1 -2
  27. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.js +1 -1
  28. package/dist/node_modules/@langchain/xai/dist/tools/index.cjs +6 -7
  29. package/dist/node_modules/@langchain/xai/dist/tools/index.d.cts +1 -2
  30. package/dist/node_modules/@langchain/xai/dist/tools/index.d.ts +1 -2
  31. package/dist/node_modules/@langchain/xai/dist/tools/index.js +6 -7
  32. package/dist/node_modules/@langchain/xai/dist/tools/live_search.cjs +3 -7
  33. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.cts +1 -2
  34. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.ts +1 -2
  35. package/dist/node_modules/@langchain/xai/dist/tools/live_search.js +3 -6
  36. package/dist/node_modules/@langchain/xai/dist/tools/web_search.cjs +1 -2
  37. package/dist/node_modules/@langchain/xai/dist/tools/web_search.js +1 -1
  38. package/dist/node_modules/@langchain/xai/dist/tools/x_search.cjs +1 -2
  39. package/dist/node_modules/@langchain/xai/dist/tools/x_search.js +1 -1
  40. package/dist/node_modules/@langchain/xai/package.json +1 -1
  41. package/dist/node_modules/fs-extra/package.json +1 -1
  42. package/dist/node_modules/jsonrepair/package.json +1 -1
  43. package/dist/node_modules/just-bash/package.json +1 -1
  44. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  45. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.mts +1 -1
  46. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.ts +1 -1
  47. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.mts +1 -1
  48. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.ts +1 -1
  49. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.mts +1 -1
  50. package/dist/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.ts +1 -1
  51. package/dist/node_modules/openai/api-promise.d.mts +1 -0
  52. package/dist/node_modules/openai/api-promise.d.ts +1 -0
  53. package/dist/node_modules/openai/auth/index.d.mts +4 -0
  54. package/dist/node_modules/openai/auth/index.d.ts +4 -0
  55. package/dist/node_modules/openai/auth/index.js +11 -0
  56. package/dist/node_modules/openai/auth/subject-token-providers.d.mts +20 -0
  57. package/dist/node_modules/openai/auth/subject-token-providers.d.ts +20 -0
  58. package/dist/node_modules/openai/auth/subject-token-providers.js +127 -0
  59. package/dist/node_modules/openai/auth/types.d.mts +23 -0
  60. package/dist/node_modules/openai/auth/types.d.ts +23 -0
  61. package/dist/node_modules/openai/auth/types.js +3 -0
  62. package/dist/node_modules/openai/auth/workload-identity-auth.d.mts +16 -0
  63. package/dist/node_modules/openai/auth/workload-identity-auth.d.ts +16 -0
  64. package/dist/node_modules/openai/auth/workload-identity-auth.js +95 -0
  65. package/dist/node_modules/openai/azure.d.mts +6 -2
  66. package/dist/node_modules/openai/azure.d.ts +6 -2
  67. package/dist/node_modules/openai/azure.js +4 -3
  68. package/dist/node_modules/openai/beta/realtime/websocket.js +7 -2
  69. package/dist/node_modules/openai/beta/realtime/ws.js +5 -1
  70. package/dist/node_modules/openai/bin/migration-config.json +1120 -0
  71. package/dist/node_modules/openai/client.d.mts +72 -10
  72. package/dist/node_modules/openai/client.d.ts +72 -10
  73. package/dist/node_modules/openai/client.js +207 -28
  74. package/dist/node_modules/openai/core/EventEmitter.d.mts +56 -0
  75. package/dist/node_modules/openai/core/EventEmitter.d.ts +56 -0
  76. package/dist/node_modules/openai/core/EventEmitter.js +93 -0
  77. package/dist/node_modules/openai/core/error.d.mts +15 -0
  78. package/dist/node_modules/openai/core/error.d.ts +15 -0
  79. package/dist/node_modules/openai/core/error.js +34 -1
  80. package/dist/node_modules/openai/core/pagination.d.mts +18 -0
  81. package/dist/node_modules/openai/core/pagination.d.ts +18 -0
  82. package/dist/node_modules/openai/core/pagination.js +32 -1
  83. package/dist/node_modules/openai/core/streaming.d.mts +1 -1
  84. package/dist/node_modules/openai/core/streaming.d.ts +1 -1
  85. package/dist/node_modules/openai/core/streaming.js +2 -2
  86. package/dist/node_modules/openai/error.d.mts +1 -0
  87. package/dist/node_modules/openai/error.d.ts +1 -0
  88. package/dist/node_modules/openai/index.d.mts +1 -1
  89. package/dist/node_modules/openai/index.d.ts +1 -1
  90. package/dist/node_modules/openai/index.js +1 -1
  91. package/dist/node_modules/openai/internal/parse.js +2 -2
  92. package/dist/node_modules/openai/internal/qs/index.d.mts +2 -2
  93. package/dist/node_modules/openai/internal/qs/index.d.ts +2 -2
  94. package/dist/node_modules/openai/internal/request-options.d.mts +5 -0
  95. package/dist/node_modules/openai/internal/request-options.d.ts +5 -0
  96. package/dist/node_modules/openai/internal/shims.d.mts +6 -0
  97. package/dist/node_modules/openai/internal/shims.d.ts +6 -0
  98. package/dist/node_modules/openai/internal/types.d.mts +17 -11
  99. package/dist/node_modules/openai/internal/types.d.ts +17 -11
  100. package/dist/node_modules/openai/internal/utils/env.js +2 -2
  101. package/dist/node_modules/openai/internal/utils/log.js +2 -0
  102. package/dist/node_modules/openai/internal/utils/query.d.mts +2 -0
  103. package/dist/node_modules/openai/internal/utils/query.d.ts +2 -0
  104. package/dist/node_modules/openai/internal/utils/query.js +10 -0
  105. package/dist/node_modules/openai/internal/utils.d.mts +1 -0
  106. package/dist/node_modules/openai/internal/utils.d.ts +1 -0
  107. package/dist/node_modules/openai/internal/utils.js +1 -0
  108. package/dist/node_modules/openai/internal/ws-adapter-browser.d.mts +34 -0
  109. package/dist/node_modules/openai/internal/ws-adapter-browser.d.ts +34 -0
  110. package/dist/node_modules/openai/internal/ws-adapter-browser.js +88 -0
  111. package/dist/node_modules/openai/internal/ws-adapter-node.d.mts +27 -0
  112. package/dist/node_modules/openai/internal/ws-adapter-node.d.ts +27 -0
  113. package/dist/node_modules/openai/internal/ws-adapter-node.js +90 -0
  114. package/dist/node_modules/openai/internal/ws-adapter.d.mts +24 -0
  115. package/dist/node_modules/openai/internal/ws-adapter.d.ts +24 -0
  116. package/dist/node_modules/openai/internal/ws-adapter.js +11 -0
  117. package/dist/node_modules/openai/internal/ws.d.mts +80 -0
  118. package/dist/node_modules/openai/internal/ws.d.ts +80 -0
  119. package/dist/node_modules/openai/internal/ws.js +153 -0
  120. package/dist/node_modules/openai/package.json +1 -1
  121. package/dist/node_modules/openai/pagination.d.mts +1 -0
  122. package/dist/node_modules/openai/pagination.d.ts +1 -0
  123. package/dist/node_modules/openai/realtime/websocket.js +7 -2
  124. package/dist/node_modules/openai/realtime/ws.js +5 -1
  125. package/dist/node_modules/openai/resource.d.mts +1 -0
  126. package/dist/node_modules/openai/resource.d.ts +1 -0
  127. package/dist/node_modules/openai/resources/admin/admin.d.mts +10 -0
  128. package/dist/node_modules/openai/resources/admin/admin.d.ts +10 -0
  129. package/dist/node_modules/openai/resources/admin/admin.js +17 -0
  130. package/dist/node_modules/openai/resources/admin/index.d.mts +3 -0
  131. package/dist/node_modules/openai/resources/admin/index.d.ts +3 -0
  132. package/dist/node_modules/openai/resources/admin/index.js +9 -0
  133. package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.d.mts +140 -0
  134. package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.d.ts +140 -0
  135. package/dist/node_modules/openai/resources/admin/organization/admin-api-keys.js +81 -0
  136. package/dist/node_modules/openai/resources/admin/organization/audit-logs.d.mts +1267 -0
  137. package/dist/node_modules/openai/resources/admin/organization/audit-logs.d.ts +1267 -0
  138. package/dist/node_modules/openai/resources/admin/organization/audit-logs.js +31 -0
  139. package/dist/node_modules/openai/resources/admin/organization/certificates.d.mts +322 -0
  140. package/dist/node_modules/openai/resources/admin/organization/certificates.d.ts +322 -0
  141. package/dist/node_modules/openai/resources/admin/organization/certificates.js +144 -0
  142. package/dist/node_modules/openai/resources/admin/organization/data-retention.d.mts +50 -0
  143. package/dist/node_modules/openai/resources/admin/organization/data-retention.d.ts +50 -0
  144. package/dist/node_modules/openai/resources/admin/organization/data-retention.js +42 -0
  145. package/dist/node_modules/openai/resources/admin/organization/groups/groups.d.mts +160 -0
  146. package/dist/node_modules/openai/resources/admin/organization/groups/groups.d.ts +160 -0
  147. package/dist/node_modules/openai/resources/admin/organization/groups/groups.js +109 -0
  148. package/dist/node_modules/openai/resources/admin/organization/groups/index.d.mts +4 -0
  149. package/dist/node_modules/openai/resources/admin/organization/groups/index.d.ts +4 -0
  150. package/dist/node_modules/openai/resources/admin/organization/groups/index.js +11 -0
  151. package/dist/node_modules/openai/resources/admin/organization/groups/roles.d.mts +275 -0
  152. package/dist/node_modules/openai/resources/admin/organization/groups/roles.d.ts +275 -0
  153. package/dist/node_modules/openai/resources/admin/organization/groups/roles.js +84 -0
  154. package/dist/node_modules/openai/resources/admin/organization/groups/users.d.mts +164 -0
  155. package/dist/node_modules/openai/resources/admin/organization/groups/users.d.ts +164 -0
  156. package/dist/node_modules/openai/resources/admin/organization/groups/users.js +84 -0
  157. package/dist/node_modules/openai/resources/admin/organization/groups.d.mts +2 -0
  158. package/dist/node_modules/openai/resources/admin/organization/groups.d.ts +2 -0
  159. package/dist/node_modules/openai/resources/admin/organization/groups.js +6 -0
  160. package/dist/node_modules/openai/resources/admin/organization/index.d.mts +13 -0
  161. package/dist/node_modules/openai/resources/admin/organization/index.d.ts +13 -0
  162. package/dist/node_modules/openai/resources/admin/organization/index.js +29 -0
  163. package/dist/node_modules/openai/resources/admin/organization/invites.d.mts +153 -0
  164. package/dist/node_modules/openai/resources/admin/organization/invites.d.ts +153 -0
  165. package/dist/node_modules/openai/resources/admin/organization/invites.js +83 -0
  166. package/dist/node_modules/openai/resources/admin/organization/organization.d.mts +50 -0
  167. package/dist/node_modules/openai/resources/admin/organization/organization.d.ts +50 -0
  168. package/dist/node_modules/openai/resources/admin/organization/organization.js +57 -0
  169. package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.d.mts +167 -0
  170. package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.d.ts +167 -0
  171. package/dist/node_modules/openai/resources/admin/organization/projects/api-keys.js +68 -0
  172. package/dist/node_modules/openai/resources/admin/organization/projects/certificates.d.mts +186 -0
  173. package/dist/node_modules/openai/resources/admin/organization/projects/certificates.d.ts +186 -0
  174. package/dist/node_modules/openai/resources/admin/organization/projects/certificates.js +64 -0
  175. package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.d.mts +53 -0
  176. package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.d.ts +53 -0
  177. package/dist/node_modules/openai/resources/admin/organization/projects/data-retention.js +46 -0
  178. package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.d.mts +142 -0
  179. package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.d.ts +142 -0
  180. package/dist/node_modules/openai/resources/admin/organization/projects/groups/groups.js +93 -0
  181. package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.d.mts +3 -0
  182. package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.d.ts +3 -0
  183. package/dist/node_modules/openai/resources/admin/organization/projects/groups/index.js +9 -0
  184. package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.d.mts +292 -0
  185. package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.d.ts +292 -0
  186. package/dist/node_modules/openai/resources/admin/organization/projects/groups/roles.js +87 -0
  187. package/dist/node_modules/openai/resources/admin/organization/projects/groups.d.mts +2 -0
  188. package/dist/node_modules/openai/resources/admin/organization/projects/groups.d.ts +2 -0
  189. package/dist/node_modules/openai/resources/admin/organization/projects/groups.js +6 -0
  190. package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.d.mts +174 -0
  191. package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.d.ts +174 -0
  192. package/dist/node_modules/openai/resources/admin/organization/projects/hosted-tool-permissions.js +45 -0
  193. package/dist/node_modules/openai/resources/admin/organization/projects/index.d.mts +13 -0
  194. package/dist/node_modules/openai/resources/admin/organization/projects/index.d.ts +13 -0
  195. package/dist/node_modules/openai/resources/admin/organization/projects/index.js +29 -0
  196. package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.d.mts +86 -0
  197. package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.d.ts +86 -0
  198. package/dist/node_modules/openai/resources/admin/organization/projects/model-permissions.js +63 -0
  199. package/dist/node_modules/openai/resources/admin/organization/projects/projects.d.mts +188 -0
  200. package/dist/node_modules/openai/resources/admin/organization/projects/projects.d.ts +188 -0
  201. package/dist/node_modules/openai/resources/admin/organization/projects/projects.js +149 -0
  202. package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.d.mts +120 -0
  203. package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.d.ts +120 -0
  204. package/dist/node_modules/openai/resources/admin/organization/projects/rate-limits.js +47 -0
  205. package/dist/node_modules/openai/resources/admin/organization/projects/roles.d.mts +146 -0
  206. package/dist/node_modules/openai/resources/admin/organization/projects/roles.d.ts +146 -0
  207. package/dist/node_modules/openai/resources/admin/organization/projects/roles.js +108 -0
  208. package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.d.mts +168 -0
  209. package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.d.ts +168 -0
  210. package/dist/node_modules/openai/resources/admin/organization/projects/service-accounts.js +101 -0
  211. package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.mts +241 -0
  212. package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.d.ts +241 -0
  213. package/dist/node_modules/openai/resources/admin/organization/projects/spend-alerts.js +102 -0
  214. package/dist/node_modules/openai/resources/admin/organization/projects/users/index.d.mts +3 -0
  215. package/dist/node_modules/openai/resources/admin/organization/projects/users/index.d.ts +3 -0
  216. package/dist/node_modules/openai/resources/admin/organization/projects/users/index.js +9 -0
  217. package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.d.mts +266 -0
  218. package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.d.ts +266 -0
  219. package/dist/node_modules/openai/resources/admin/organization/projects/users/roles.js +87 -0
  220. package/dist/node_modules/openai/resources/admin/organization/projects/users/users.d.mts +157 -0
  221. package/dist/node_modules/openai/resources/admin/organization/projects/users/users.d.ts +157 -0
  222. package/dist/node_modules/openai/resources/admin/organization/projects/users/users.js +116 -0
  223. package/dist/node_modules/openai/resources/admin/organization/projects/users.d.mts +2 -0
  224. package/dist/node_modules/openai/resources/admin/organization/projects/users.d.ts +2 -0
  225. package/dist/node_modules/openai/resources/admin/organization/projects/users.js +6 -0
  226. package/dist/node_modules/openai/resources/admin/organization/projects.d.mts +2 -0
  227. package/dist/node_modules/openai/resources/admin/organization/projects.d.ts +2 -0
  228. package/dist/node_modules/openai/resources/admin/organization/projects.js +6 -0
  229. package/dist/node_modules/openai/resources/admin/organization/roles.d.mts +153 -0
  230. package/dist/node_modules/openai/resources/admin/organization/roles.d.ts +153 -0
  231. package/dist/node_modules/openai/resources/admin/organization/roles.js +96 -0
  232. package/dist/node_modules/openai/resources/admin/organization/spend-alerts.d.mts +224 -0
  233. package/dist/node_modules/openai/resources/admin/organization/spend-alerts.d.ts +224 -0
  234. package/dist/node_modules/openai/resources/admin/organization/spend-alerts.js +93 -0
  235. package/dist/node_modules/openai/resources/admin/organization/usage.d.mts +5123 -0
  236. package/dist/node_modules/openai/resources/admin/organization/usage.d.ts +5123 -0
  237. package/dist/node_modules/openai/resources/admin/organization/usage.js +207 -0
  238. package/dist/node_modules/openai/resources/admin/organization/users/index.d.mts +3 -0
  239. package/dist/node_modules/openai/resources/admin/organization/users/index.d.ts +3 -0
  240. package/dist/node_modules/openai/resources/admin/organization/users/index.js +9 -0
  241. package/dist/node_modules/openai/resources/admin/organization/users/roles.d.mts +249 -0
  242. package/dist/node_modules/openai/resources/admin/organization/users/roles.d.ts +249 -0
  243. package/dist/node_modules/openai/resources/admin/organization/users/roles.js +84 -0
  244. package/dist/node_modules/openai/resources/admin/organization/users/users.d.mts +185 -0
  245. package/dist/node_modules/openai/resources/admin/organization/users/users.d.ts +185 -0
  246. package/dist/node_modules/openai/resources/admin/organization/users/users.js +84 -0
  247. package/dist/node_modules/openai/resources/admin/organization/users.d.mts +2 -0
  248. package/dist/node_modules/openai/resources/admin/organization/users.d.ts +2 -0
  249. package/dist/node_modules/openai/resources/admin/organization/users.js +6 -0
  250. package/dist/node_modules/openai/resources/admin/organization.d.mts +2 -0
  251. package/dist/node_modules/openai/resources/admin/organization.d.ts +2 -0
  252. package/dist/node_modules/openai/resources/admin/organization.js +6 -0
  253. package/dist/node_modules/openai/resources/admin.d.mts +2 -0
  254. package/dist/node_modules/openai/resources/admin.d.ts +2 -0
  255. package/dist/node_modules/openai/resources/admin.js +6 -0
  256. package/dist/node_modules/openai/resources/audio/speech.d.mts +22 -5
  257. package/dist/node_modules/openai/resources/audio/speech.d.ts +22 -5
  258. package/dist/node_modules/openai/resources/audio/speech.js +8 -2
  259. package/dist/node_modules/openai/resources/audio/transcriptions.d.mts +6 -0
  260. package/dist/node_modules/openai/resources/audio/transcriptions.d.ts +6 -0
  261. package/dist/node_modules/openai/resources/audio/transcriptions.js +4 -0
  262. package/dist/node_modules/openai/resources/audio/translations.d.mts +3 -0
  263. package/dist/node_modules/openai/resources/audio/translations.d.ts +3 -0
  264. package/dist/node_modules/openai/resources/audio/translations.js +4 -1
  265. package/dist/node_modules/openai/resources/batches.d.mts +8 -4
  266. package/dist/node_modules/openai/resources/batches.d.ts +8 -4
  267. package/dist/node_modules/openai/resources/batches.js +14 -4
  268. package/dist/node_modules/openai/resources/beta/assistants.d.mts +6 -2
  269. package/dist/node_modules/openai/resources/beta/assistants.d.ts +6 -2
  270. package/dist/node_modules/openai/resources/beta/assistants.js +8 -0
  271. package/dist/node_modules/openai/resources/beta/chatkit/sessions.d.mts +4 -2
  272. package/dist/node_modules/openai/resources/beta/chatkit/sessions.d.ts +4 -2
  273. package/dist/node_modules/openai/resources/beta/chatkit/sessions.js +6 -2
  274. package/dist/node_modules/openai/resources/beta/chatkit/threads.d.mts +4 -4
  275. package/dist/node_modules/openai/resources/beta/chatkit/threads.d.ts +4 -4
  276. package/dist/node_modules/openai/resources/beta/chatkit/threads.js +13 -5
  277. package/dist/node_modules/openai/resources/beta/realtime/sessions.js +1 -0
  278. package/dist/node_modules/openai/resources/beta/realtime/transcription-sessions.js +1 -0
  279. package/dist/node_modules/openai/resources/beta/threads/messages.d.mts +2 -0
  280. package/dist/node_modules/openai/resources/beta/threads/messages.d.ts +2 -0
  281. package/dist/node_modules/openai/resources/beta/threads/messages.js +7 -0
  282. package/dist/node_modules/openai/resources/beta/threads/runs/runs.d.mts +2 -0
  283. package/dist/node_modules/openai/resources/beta/threads/runs/runs.d.ts +2 -0
  284. package/dist/node_modules/openai/resources/beta/threads/runs/runs.js +10 -0
  285. package/dist/node_modules/openai/resources/beta/threads/runs/steps.d.mts +2 -0
  286. package/dist/node_modules/openai/resources/beta/threads/runs/steps.d.ts +2 -0
  287. package/dist/node_modules/openai/resources/beta/threads/runs/steps.js +4 -0
  288. package/dist/node_modules/openai/resources/beta/threads/threads.d.mts +8 -4
  289. package/dist/node_modules/openai/resources/beta/threads/threads.d.ts +8 -4
  290. package/dist/node_modules/openai/resources/beta/threads/threads.js +8 -0
  291. package/dist/node_modules/openai/resources/chat/completions/completions.d.mts +37 -18
  292. package/dist/node_modules/openai/resources/chat/completions/completions.d.ts +37 -18
  293. package/dist/node_modules/openai/resources/chat/completions/completions.js +27 -5
  294. package/dist/node_modules/openai/resources/chat/completions/messages.d.mts +3 -0
  295. package/dist/node_modules/openai/resources/chat/completions/messages.d.ts +3 -0
  296. package/dist/node_modules/openai/resources/chat/completions/messages.js +4 -1
  297. package/dist/node_modules/openai/resources/completions.d.mts +9 -3
  298. package/dist/node_modules/openai/resources/completions.d.ts +9 -3
  299. package/dist/node_modules/openai/resources/completions.js +9 -1
  300. package/dist/node_modules/openai/resources/containers/containers.js +11 -3
  301. package/dist/node_modules/openai/resources/containers/files/content.js +1 -0
  302. package/dist/node_modules/openai/resources/containers/files/files.js +7 -2
  303. package/dist/node_modules/openai/resources/conversations/conversations.d.mts +15 -0
  304. package/dist/node_modules/openai/resources/conversations/conversations.d.ts +15 -0
  305. package/dist/node_modules/openai/resources/conversations/conversations.js +17 -4
  306. package/dist/node_modules/openai/resources/conversations/items.d.mts +4 -1
  307. package/dist/node_modules/openai/resources/conversations/items.d.ts +4 -1
  308. package/dist/node_modules/openai/resources/conversations/items.js +14 -3
  309. package/dist/node_modules/openai/resources/embeddings.d.mts +3 -0
  310. package/dist/node_modules/openai/resources/embeddings.d.ts +3 -0
  311. package/dist/node_modules/openai/resources/embeddings.js +4 -0
  312. package/dist/node_modules/openai/resources/evals/evals.d.mts +3 -0
  313. package/dist/node_modules/openai/resources/evals/evals.d.ts +3 -0
  314. package/dist/node_modules/openai/resources/evals/evals.js +12 -5
  315. package/dist/node_modules/openai/resources/evals/runs/output-items.d.mts +3 -0
  316. package/dist/node_modules/openai/resources/evals/runs/output-items.d.ts +3 -0
  317. package/dist/node_modules/openai/resources/evals/runs/output-items.js +8 -2
  318. package/dist/node_modules/openai/resources/evals/runs/runs.d.mts +3 -0
  319. package/dist/node_modules/openai/resources/evals/runs/runs.d.ts +3 -0
  320. package/dist/node_modules/openai/resources/evals/runs/runs.js +21 -4
  321. package/dist/node_modules/openai/resources/files.d.mts +11 -1
  322. package/dist/node_modules/openai/resources/files.d.ts +11 -1
  323. package/dist/node_modules/openai/resources/files.js +20 -5
  324. package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.d.mts +3 -0
  325. package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.d.ts +3 -0
  326. package/dist/node_modules/openai/resources/fine-tuning/alpha/graders.js +13 -2
  327. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.mts +2 -2
  328. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.ts +2 -2
  329. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/index.d.mts +1 -1
  330. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/index.d.ts +1 -1
  331. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.mts +54 -7
  332. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.ts +54 -7
  333. package/dist/node_modules/openai/resources/fine-tuning/checkpoints/permissions.js +26 -9
  334. package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.mts +3 -0
  335. package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +3 -0
  336. package/dist/node_modules/openai/resources/fine-tuning/jobs/checkpoints.js +4 -1
  337. package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.d.mts +3 -0
  338. package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +3 -0
  339. package/dist/node_modules/openai/resources/fine-tuning/jobs/jobs.js +26 -7
  340. package/dist/node_modules/openai/resources/images.d.mts +56 -24
  341. package/dist/node_modules/openai/resources/images.d.ts +56 -24
  342. package/dist/node_modules/openai/resources/images.js +11 -3
  343. package/dist/node_modules/openai/resources/index.d.mts +2 -1
  344. package/dist/node_modules/openai/resources/index.d.ts +2 -1
  345. package/dist/node_modules/openai/resources/index.js +3 -1
  346. package/dist/node_modules/openai/resources/models.d.mts +3 -0
  347. package/dist/node_modules/openai/resources/models.d.ts +3 -0
  348. package/dist/node_modules/openai/resources/models.js +6 -3
  349. package/dist/node_modules/openai/resources/moderations.d.mts +3 -0
  350. package/dist/node_modules/openai/resources/moderations.d.ts +3 -0
  351. package/dist/node_modules/openai/resources/moderations.js +4 -1
  352. package/dist/node_modules/openai/resources/realtime/calls.d.mts +13 -3
  353. package/dist/node_modules/openai/resources/realtime/calls.d.ts +13 -3
  354. package/dist/node_modules/openai/resources/realtime/calls.js +4 -0
  355. package/dist/node_modules/openai/resources/realtime/client-secrets.d.mts +45 -39
  356. package/dist/node_modules/openai/resources/realtime/client-secrets.d.ts +45 -39
  357. package/dist/node_modules/openai/resources/realtime/client-secrets.js +19 -1
  358. package/dist/node_modules/openai/resources/realtime/index.d.mts +1 -1
  359. package/dist/node_modules/openai/resources/realtime/index.d.ts +1 -1
  360. package/dist/node_modules/openai/resources/realtime/realtime.d.mts +592 -21
  361. package/dist/node_modules/openai/resources/realtime/realtime.d.ts +592 -21
  362. package/dist/node_modules/openai/resources/responses/index.d.mts +2 -0
  363. package/dist/node_modules/openai/resources/responses/index.d.ts +2 -0
  364. package/dist/node_modules/openai/resources/responses/input-items.js +1 -1
  365. package/dist/node_modules/openai/resources/responses/input-tokens.d.mts +4 -1
  366. package/dist/node_modules/openai/resources/responses/input-tokens.d.ts +4 -1
  367. package/dist/node_modules/openai/resources/responses/input-tokens.js +9 -2
  368. package/dist/node_modules/openai/resources/responses/internal-base.d.mts +71 -0
  369. package/dist/node_modules/openai/resources/responses/internal-base.d.ts +71 -0
  370. package/dist/node_modules/openai/resources/responses/internal-base.js +48 -0
  371. package/dist/node_modules/openai/resources/responses/responses.d.mts +956 -64
  372. package/dist/node_modules/openai/resources/responses/responses.d.ts +956 -64
  373. package/dist/node_modules/openai/resources/responses/responses.js +20 -5
  374. package/dist/node_modules/openai/resources/responses/ws-base.d.mts +106 -0
  375. package/dist/node_modules/openai/resources/responses/ws-base.d.ts +106 -0
  376. package/dist/node_modules/openai/resources/responses/ws-base.js +476 -0
  377. package/dist/node_modules/openai/resources/responses/ws.d.mts +13 -0
  378. package/dist/node_modules/openai/resources/responses/ws.d.ts +13 -0
  379. package/dist/node_modules/openai/resources/responses/ws.js +31 -0
  380. package/dist/node_modules/openai/resources/shared.d.mts +3 -2
  381. package/dist/node_modules/openai/resources/shared.d.ts +3 -2
  382. package/dist/node_modules/openai/resources/skills/content.d.mts +1 -1
  383. package/dist/node_modules/openai/resources/skills/content.d.ts +1 -1
  384. package/dist/node_modules/openai/resources/skills/content.js +2 -1
  385. package/dist/node_modules/openai/resources/skills/skills.d.mts +5 -5
  386. package/dist/node_modules/openai/resources/skills/skills.d.ts +5 -5
  387. package/dist/node_modules/openai/resources/skills/skills.js +18 -10
  388. package/dist/node_modules/openai/resources/skills/versions/content.d.mts +1 -1
  389. package/dist/node_modules/openai/resources/skills/versions/content.d.ts +1 -1
  390. package/dist/node_modules/openai/resources/skills/versions/content.js +2 -1
  391. package/dist/node_modules/openai/resources/skills/versions/versions.d.mts +4 -4
  392. package/dist/node_modules/openai/resources/skills/versions/versions.d.ts +4 -4
  393. package/dist/node_modules/openai/resources/skills/versions/versions.js +14 -7
  394. package/dist/node_modules/openai/resources/uploads/parts.d.mts +3 -0
  395. package/dist/node_modules/openai/resources/uploads/parts.d.ts +3 -0
  396. package/dist/node_modules/openai/resources/uploads/parts.js +4 -1
  397. package/dist/node_modules/openai/resources/uploads/uploads.d.mts +10 -1
  398. package/dist/node_modules/openai/resources/uploads/uploads.d.ts +10 -1
  399. package/dist/node_modules/openai/resources/uploads/uploads.js +20 -4
  400. package/dist/node_modules/openai/resources/vector-stores/file-batches.d.mts +9 -3
  401. package/dist/node_modules/openai/resources/vector-stores/file-batches.d.ts +9 -3
  402. package/dist/node_modules/openai/resources/vector-stores/file-batches.js +9 -1
  403. package/dist/node_modules/openai/resources/vector-stores/files.d.mts +3 -1
  404. package/dist/node_modules/openai/resources/vector-stores/files.d.ts +3 -1
  405. package/dist/node_modules/openai/resources/vector-stores/files.js +10 -1
  406. package/dist/node_modules/openai/resources/vector-stores/vector-stores.js +6 -0
  407. package/dist/node_modules/openai/resources/videos.d.mts +123 -11
  408. package/dist/node_modules/openai/resources/videos.d.ts +123 -11
  409. package/dist/node_modules/openai/resources/videos.js +46 -11
  410. package/dist/node_modules/openai/src/auth/index.ts +9 -0
  411. package/dist/node_modules/openai/src/auth/subject-token-providers.ts +185 -0
  412. package/dist/node_modules/openai/src/auth/types.ts +28 -0
  413. package/dist/node_modules/openai/src/auth/workload-identity-auth.ts +122 -0
  414. package/dist/node_modules/openai/src/azure.ts +9 -4
  415. package/dist/node_modules/openai/src/beta/realtime/websocket.ts +7 -2
  416. package/dist/node_modules/openai/src/beta/realtime/ws.ts +5 -1
  417. package/dist/node_modules/openai/src/client.ts +312 -35
  418. package/dist/node_modules/openai/src/core/EventEmitter.ts +114 -0
  419. package/dist/node_modules/openai/src/core/error.ts +40 -0
  420. package/dist/node_modules/openai/src/core/pagination.ts +62 -0
  421. package/dist/node_modules/openai/src/core/streaming.ts +2 -1
  422. package/dist/node_modules/openai/src/index.ts +2 -0
  423. package/dist/node_modules/openai/src/internal/parse.ts +12 -2
  424. package/dist/node_modules/openai/src/internal/request-options.ts +2 -0
  425. package/dist/node_modules/openai/src/internal/types.ts +14 -8
  426. package/dist/node_modules/openai/src/internal/utils/env.ts +2 -2
  427. package/dist/node_modules/openai/src/internal/utils/log.ts +2 -0
  428. package/dist/node_modules/openai/src/internal/utils/query.ts +7 -0
  429. package/dist/node_modules/openai/src/internal/utils.ts +1 -0
  430. package/dist/node_modules/openai/src/internal/ws-adapter-browser.ts +123 -0
  431. package/dist/node_modules/openai/src/internal/ws-adapter-node.ts +105 -0
  432. package/dist/node_modules/openai/src/internal/ws-adapter.ts +30 -0
  433. package/dist/node_modules/openai/src/internal/ws.ts +193 -0
  434. package/dist/node_modules/openai/src/realtime/websocket.ts +7 -2
  435. package/dist/node_modules/openai/src/realtime/ws.ts +5 -1
  436. package/dist/node_modules/openai/src/resources/admin/admin.ts +15 -0
  437. package/dist/node_modules/openai/src/resources/admin/index.ts +4 -0
  438. package/dist/node_modules/openai/src/resources/admin/organization/admin-api-keys.ts +199 -0
  439. package/dist/node_modules/openai/src/resources/admin/organization/audit-logs.ts +1597 -0
  440. package/dist/node_modules/openai/src/resources/admin/organization/certificates.ts +458 -0
  441. package/dist/node_modules/openai/src/resources/admin/organization/data-retention.ts +79 -0
  442. package/dist/node_modules/openai/src/resources/admin/organization/groups/groups.ts +277 -0
  443. package/dist/node_modules/openai/src/resources/admin/organization/groups/index.ts +36 -0
  444. package/dist/node_modules/openai/src/resources/admin/organization/groups/roles.ts +359 -0
  445. package/dist/node_modules/openai/src/resources/admin/organization/groups/users.ts +232 -0
  446. package/dist/node_modules/openai/src/resources/admin/organization/groups.ts +3 -0
  447. package/dist/node_modules/openai/src/resources/admin/organization/index.ts +117 -0
  448. package/dist/node_modules/openai/src/resources/admin/organization/invites.ts +215 -0
  449. package/dist/node_modules/openai/src/resources/admin/organization/organization.ts +272 -0
  450. package/dist/node_modules/openai/src/resources/admin/organization/projects/api-keys.ts +239 -0
  451. package/dist/node_modules/openai/src/resources/admin/organization/projects/certificates.ts +269 -0
  452. package/dist/node_modules/openai/src/resources/admin/organization/projects/data-retention.ts +91 -0
  453. package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/groups.ts +231 -0
  454. package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/index.ts +24 -0
  455. package/dist/node_modules/openai/src/resources/admin/organization/projects/groups/roles.ts +386 -0
  456. package/dist/node_modules/openai/src/resources/admin/organization/projects/groups.ts +3 -0
  457. package/dist/node_modules/openai/src/resources/admin/organization/projects/hosted-tool-permissions.ts +217 -0
  458. package/dist/node_modules/openai/src/resources/admin/organization/projects/index.ts +102 -0
  459. package/dist/node_modules/openai/src/resources/admin/organization/projects/model-permissions.ts +123 -0
  460. package/dist/node_modules/openai/src/resources/admin/organization/projects/projects.ts +445 -0
  461. package/dist/node_modules/openai/src/resources/admin/organization/projects/rate-limits.ts +173 -0
  462. package/dist/node_modules/openai/src/resources/admin/organization/projects/roles.ts +210 -0
  463. package/dist/node_modules/openai/src/resources/admin/organization/projects/service-accounts.ts +266 -0
  464. package/dist/node_modules/openai/src/resources/admin/organization/projects/spend-alerts.ts +332 -0
  465. package/dist/node_modules/openai/src/resources/admin/organization/projects/users/index.ts +25 -0
  466. package/dist/node_modules/openai/src/resources/admin/organization/projects/users/roles.ts +351 -0
  467. package/dist/node_modules/openai/src/resources/admin/organization/projects/users/users.ts +256 -0
  468. package/dist/node_modules/openai/src/resources/admin/organization/projects/users.ts +3 -0
  469. package/dist/node_modules/openai/src/resources/admin/organization/projects.ts +3 -0
  470. package/dist/node_modules/openai/src/resources/admin/organization/roles.ts +217 -0
  471. package/dist/node_modules/openai/src/resources/admin/organization/spend-alerts.ts +301 -0
  472. package/dist/node_modules/openai/src/resources/admin/organization/usage.ts +6427 -0
  473. package/dist/node_modules/openai/src/resources/admin/organization/users/index.ts +22 -0
  474. package/dist/node_modules/openai/src/resources/admin/organization/users/roles.ts +328 -0
  475. package/dist/node_modules/openai/src/resources/admin/organization/users/users.ts +291 -0
  476. package/dist/node_modules/openai/src/resources/admin/organization/users.ts +3 -0
  477. package/dist/node_modules/openai/src/resources/admin/organization.ts +3 -0
  478. package/dist/node_modules/openai/src/resources/admin.ts +3 -0
  479. package/dist/node_modules/openai/src/resources/audio/speech.ts +26 -6
  480. package/dist/node_modules/openai/src/resources/audio/transcriptions.ts +7 -0
  481. package/dist/node_modules/openai/src/resources/audio/translations.ts +7 -1
  482. package/dist/node_modules/openai/src/resources/batches.ts +20 -8
  483. package/dist/node_modules/openai/src/resources/beta/assistants.ts +11 -2
  484. package/dist/node_modules/openai/src/resources/beta/chatkit/sessions.ts +6 -2
  485. package/dist/node_modules/openai/src/resources/beta/chatkit/threads.ts +13 -5
  486. package/dist/node_modules/openai/src/resources/beta/realtime/sessions.ts +1 -0
  487. package/dist/node_modules/openai/src/resources/beta/realtime/transcription-sessions.ts +1 -0
  488. package/dist/node_modules/openai/src/resources/beta/threads/messages.ts +7 -0
  489. package/dist/node_modules/openai/src/resources/beta/threads/runs/runs.ts +10 -0
  490. package/dist/node_modules/openai/src/resources/beta/threads/runs/steps.ts +4 -0
  491. package/dist/node_modules/openai/src/resources/beta/threads/threads.ts +14 -4
  492. package/dist/node_modules/openai/src/resources/chat/completions/completions.ts +64 -27
  493. package/dist/node_modules/openai/src/resources/chat/completions/messages.ts +4 -1
  494. package/dist/node_modules/openai/src/resources/completions.ts +15 -6
  495. package/dist/node_modules/openai/src/resources/containers/containers.ts +11 -3
  496. package/dist/node_modules/openai/src/resources/containers/files/content.ts +1 -0
  497. package/dist/node_modules/openai/src/resources/containers/files/files.ts +7 -2
  498. package/dist/node_modules/openai/src/resources/conversations/conversations.ts +31 -4
  499. package/dist/node_modules/openai/src/resources/conversations/items.ts +17 -3
  500. package/dist/node_modules/openai/src/resources/embeddings.ts +4 -0
  501. package/dist/node_modules/openai/src/resources/evals/evals.ts +12 -5
  502. package/dist/node_modules/openai/src/resources/evals/runs/output-items.ts +8 -2
  503. package/dist/node_modules/openai/src/resources/evals/runs/runs.ts +21 -4
  504. package/dist/node_modules/openai/src/resources/files.ts +23 -5
  505. package/dist/node_modules/openai/src/resources/fine-tuning/alpha/graders.ts +13 -2
  506. package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/checkpoints.ts +6 -0
  507. package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/index.ts +3 -0
  508. package/dist/node_modules/openai/src/resources/fine-tuning/checkpoints/permissions.ts +84 -10
  509. package/dist/node_modules/openai/src/resources/fine-tuning/jobs/checkpoints.ts +4 -1
  510. package/dist/node_modules/openai/src/resources/fine-tuning/jobs/jobs.ts +26 -7
  511. package/dist/node_modules/openai/src/resources/images.ts +74 -27
  512. package/dist/node_modules/openai/src/resources/index.ts +7 -0
  513. package/dist/node_modules/openai/src/resources/models.ts +6 -3
  514. package/dist/node_modules/openai/src/resources/moderations.ts +4 -1
  515. package/dist/node_modules/openai/src/resources/realtime/calls.ts +21 -2
  516. package/dist/node_modules/openai/src/resources/realtime/client-secrets.ts +54 -40
  517. package/dist/node_modules/openai/src/resources/realtime/index.ts +0 -1
  518. package/dist/node_modules/openai/src/resources/realtime/realtime.ts +705 -20
  519. package/dist/node_modules/openai/src/resources/responses/index.ts +2 -0
  520. package/dist/node_modules/openai/src/resources/responses/input-items.ts +1 -1
  521. package/dist/node_modules/openai/src/resources/responses/input-tokens.ts +9 -2
  522. package/dist/node_modules/openai/src/resources/responses/internal-base.ts +113 -0
  523. package/dist/node_modules/openai/src/resources/responses/responses.ts +1314 -143
  524. package/dist/node_modules/openai/src/resources/responses/ws-base.ts +611 -0
  525. package/dist/node_modules/openai/src/resources/responses/ws.ts +38 -0
  526. package/dist/node_modules/openai/src/resources/shared.ts +9 -1
  527. package/dist/node_modules/openai/src/resources/skills/content.ts +2 -1
  528. package/dist/node_modules/openai/src/resources/skills/skills.ts +21 -10
  529. package/dist/node_modules/openai/src/resources/skills/versions/content.ts +2 -1
  530. package/dist/node_modules/openai/src/resources/skills/versions/versions.ts +14 -7
  531. package/dist/node_modules/openai/src/resources/uploads/parts.ts +4 -1
  532. package/dist/node_modules/openai/src/resources/uploads/uploads.ts +20 -4
  533. package/dist/node_modules/openai/src/resources/vector-stores/file-batches.ts +18 -4
  534. package/dist/node_modules/openai/src/resources/vector-stores/files.ts +13 -2
  535. package/dist/node_modules/openai/src/resources/vector-stores/vector-stores.ts +6 -0
  536. package/dist/node_modules/openai/src/resources/videos.ts +186 -16
  537. package/dist/node_modules/openai/src/version.ts +1 -1
  538. package/dist/node_modules/openai/streaming.d.mts +1 -0
  539. package/dist/node_modules/openai/streaming.d.ts +1 -0
  540. package/dist/node_modules/openai/uploads.d.mts +1 -0
  541. package/dist/node_modules/openai/uploads.d.ts +1 -0
  542. package/dist/node_modules/openai/version.d.mts +1 -1
  543. package/dist/node_modules/openai/version.d.ts +1 -1
  544. package/dist/node_modules/openai/version.js +1 -1
  545. package/dist/node_modules/zod/package.json +1 -1
  546. package/dist/server/ai-employees/ai-employee.d.ts +1 -1
  547. package/package.json +13 -13
  548. package/dist/node_modules/@langchain/xai/dist/_virtual/rolldown_runtime.cjs +0 -25
@@ -21,7 +21,7 @@ export interface ParsedResponseOutputMessage<ParsedT> extends ResponseOutputMess
21
21
  export interface ParsedResponseFunctionToolCall extends ResponseFunctionToolCall {
22
22
  parsed_arguments: any;
23
23
  }
24
- export type ParsedResponseOutputItem<ParsedT> = ParsedResponseOutputMessage<ParsedT> | ParsedResponseFunctionToolCall | ResponseFileSearchToolCall | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseReasoningItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseCustomToolCall;
24
+ export type ParsedResponseOutputItem<ParsedT> = ParsedResponseOutputMessage<ParsedT> | ParsedResponseFunctionToolCall | ResponseFileSearchToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseReasoningItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
25
25
  export interface ParsedResponse<ParsedT> extends Response {
26
26
  output: Array<ParsedResponseOutputItem<ParsedT>>;
27
27
  output_parsed: ParsedT | null;
@@ -94,12 +94,17 @@ export declare class Responses extends APIResource {
94
94
  */
95
95
  cancel(responseID: string, options?: RequestOptions): APIPromise<Response>;
96
96
  /**
97
- * Compact conversation
97
+ * Compact a conversation. Returns a compacted response object.
98
+ *
99
+ * Learn when and how to compact long-running conversations in the
100
+ * [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window).
101
+ * For ZDR-compatible compaction details, see
102
+ * [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).
98
103
  *
99
104
  * @example
100
105
  * ```ts
101
106
  * const compactedResponse = await client.responses.compact({
102
- * model: 'gpt-5.2',
107
+ * model: 'gpt-5.4',
103
108
  * });
104
109
  * ```
105
110
  */
@@ -139,11 +144,222 @@ export interface CompactedResponse {
139
144
  */
140
145
  usage: ResponseUsage;
141
146
  }
147
+ /**
148
+ * A click action.
149
+ */
150
+ export type ComputerAction = ComputerAction.Click | ComputerAction.DoubleClick | ComputerAction.Drag | ComputerAction.Keypress | ComputerAction.Move | ComputerAction.Screenshot | ComputerAction.Scroll | ComputerAction.Type | ComputerAction.Wait;
151
+ export declare namespace ComputerAction {
152
+ /**
153
+ * A click action.
154
+ */
155
+ interface Click {
156
+ /**
157
+ * Indicates which mouse button was pressed during the click. One of `left`,
158
+ * `right`, `wheel`, `back`, or `forward`.
159
+ */
160
+ button: 'left' | 'right' | 'wheel' | 'back' | 'forward';
161
+ /**
162
+ * Specifies the event type. For a click action, this property is always `click`.
163
+ */
164
+ type: 'click';
165
+ /**
166
+ * The x-coordinate where the click occurred.
167
+ */
168
+ x: number;
169
+ /**
170
+ * The y-coordinate where the click occurred.
171
+ */
172
+ y: number;
173
+ /**
174
+ * The keys being held while clicking.
175
+ */
176
+ keys?: Array<string> | null;
177
+ }
178
+ /**
179
+ * A double click action.
180
+ */
181
+ interface DoubleClick {
182
+ /**
183
+ * The keys being held while double-clicking.
184
+ */
185
+ keys: Array<string> | null;
186
+ /**
187
+ * Specifies the event type. For a double click action, this property is always set
188
+ * to `double_click`.
189
+ */
190
+ type: 'double_click';
191
+ /**
192
+ * The x-coordinate where the double click occurred.
193
+ */
194
+ x: number;
195
+ /**
196
+ * The y-coordinate where the double click occurred.
197
+ */
198
+ y: number;
199
+ }
200
+ /**
201
+ * A drag action.
202
+ */
203
+ interface Drag {
204
+ /**
205
+ * An array of coordinates representing the path of the drag action. Coordinates
206
+ * will appear as an array of objects, eg
207
+ *
208
+ * ```
209
+ * [
210
+ * { x: 100, y: 200 },
211
+ * { x: 200, y: 300 }
212
+ * ]
213
+ * ```
214
+ */
215
+ path: Array<Drag.Path>;
216
+ /**
217
+ * Specifies the event type. For a drag action, this property is always set to
218
+ * `drag`.
219
+ */
220
+ type: 'drag';
221
+ /**
222
+ * The keys being held while dragging the mouse.
223
+ */
224
+ keys?: Array<string> | null;
225
+ }
226
+ namespace Drag {
227
+ /**
228
+ * An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.
229
+ */
230
+ interface Path {
231
+ /**
232
+ * The x-coordinate.
233
+ */
234
+ x: number;
235
+ /**
236
+ * The y-coordinate.
237
+ */
238
+ y: number;
239
+ }
240
+ }
241
+ /**
242
+ * A collection of keypresses the model would like to perform.
243
+ */
244
+ interface Keypress {
245
+ /**
246
+ * The combination of keys the model is requesting to be pressed. This is an array
247
+ * of strings, each representing a key.
248
+ */
249
+ keys: Array<string>;
250
+ /**
251
+ * Specifies the event type. For a keypress action, this property is always set to
252
+ * `keypress`.
253
+ */
254
+ type: 'keypress';
255
+ }
256
+ /**
257
+ * A mouse move action.
258
+ */
259
+ interface Move {
260
+ /**
261
+ * Specifies the event type. For a move action, this property is always set to
262
+ * `move`.
263
+ */
264
+ type: 'move';
265
+ /**
266
+ * The x-coordinate to move to.
267
+ */
268
+ x: number;
269
+ /**
270
+ * The y-coordinate to move to.
271
+ */
272
+ y: number;
273
+ /**
274
+ * The keys being held while moving the mouse.
275
+ */
276
+ keys?: Array<string> | null;
277
+ }
278
+ /**
279
+ * A screenshot action.
280
+ */
281
+ interface Screenshot {
282
+ /**
283
+ * Specifies the event type. For a screenshot action, this property is always set
284
+ * to `screenshot`.
285
+ */
286
+ type: 'screenshot';
287
+ }
288
+ /**
289
+ * A scroll action.
290
+ */
291
+ interface Scroll {
292
+ /**
293
+ * The horizontal scroll distance.
294
+ */
295
+ scroll_x: number;
296
+ /**
297
+ * The vertical scroll distance.
298
+ */
299
+ scroll_y: number;
300
+ /**
301
+ * Specifies the event type. For a scroll action, this property is always set to
302
+ * `scroll`.
303
+ */
304
+ type: 'scroll';
305
+ /**
306
+ * The x-coordinate where the scroll occurred.
307
+ */
308
+ x: number;
309
+ /**
310
+ * The y-coordinate where the scroll occurred.
311
+ */
312
+ y: number;
313
+ /**
314
+ * The keys being held while scrolling.
315
+ */
316
+ keys?: Array<string> | null;
317
+ }
318
+ /**
319
+ * An action to type in text.
320
+ */
321
+ interface Type {
322
+ /**
323
+ * The text to type.
324
+ */
325
+ text: string;
326
+ /**
327
+ * Specifies the event type. For a type action, this property is always set to
328
+ * `type`.
329
+ */
330
+ type: 'type';
331
+ }
332
+ /**
333
+ * A wait action.
334
+ */
335
+ interface Wait {
336
+ /**
337
+ * Specifies the event type. For a wait action, this property is always set to
338
+ * `wait`.
339
+ */
340
+ type: 'wait';
341
+ }
342
+ }
343
+ /**
344
+ * Flattened batched actions for `computer_use`. Each action includes an `type`
345
+ * discriminator and action-specific fields.
346
+ */
347
+ export type ComputerActionList = Array<ComputerAction>;
142
348
  /**
143
349
  * A tool that controls a virtual computer. Learn more about the
144
350
  * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
145
351
  */
146
352
  export interface ComputerTool {
353
+ /**
354
+ * The type of the computer tool. Always `computer`.
355
+ */
356
+ type: 'computer';
357
+ }
358
+ /**
359
+ * A tool that controls a virtual computer. Learn more about the
360
+ * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
361
+ */
362
+ export interface ComputerUsePreviewTool {
147
363
  /**
148
364
  * The height of the computer display.
149
365
  */
@@ -240,6 +456,10 @@ export interface CustomTool {
240
456
  * The type of the custom tool. Always `custom`.
241
457
  */
242
458
  type: 'custom';
459
+ /**
460
+ * Whether this tool should be deferred and discovered via tool search.
461
+ */
462
+ defer_loading?: boolean;
243
463
  /**
244
464
  * Optional description of the custom tool, used to provide more context.
245
465
  */
@@ -267,6 +487,13 @@ export interface EasyInputMessage {
267
487
  * `developer`.
268
488
  */
269
489
  role: 'user' | 'assistant' | 'system' | 'developer';
490
+ /**
491
+ * Labels an `assistant` message as intermediate commentary (`commentary`) or the
492
+ * final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
493
+ * sending follow-up requests, preserve and resend phase on all assistant messages
494
+ * — dropping it can degrade performance. Not used for user messages.
495
+ */
496
+ phase?: 'commentary' | 'final_answer' | null;
270
497
  /**
271
498
  * The type of the message input. Always `message`.
272
499
  */
@@ -372,6 +599,10 @@ export interface FunctionTool {
372
599
  * The type of the function tool. Always `function`.
373
600
  */
374
601
  type: 'function';
602
+ /**
603
+ * Whether this function is deferred and loaded via tool search.
604
+ */
605
+ defer_loading?: boolean;
375
606
  /**
376
607
  * A description of the function. Used by the model to determine whether or not to
377
608
  * call the function.
@@ -437,6 +668,40 @@ export interface LocalSkill {
437
668
  */
438
669
  path: string;
439
670
  }
671
+ /**
672
+ * Groups function/custom tools under a shared namespace.
673
+ */
674
+ export interface NamespaceTool {
675
+ /**
676
+ * A description of the namespace shown to the model.
677
+ */
678
+ description: string;
679
+ /**
680
+ * The namespace name used in tool calls (for example, `crm`).
681
+ */
682
+ name: string;
683
+ /**
684
+ * The function/custom tools available inside this namespace.
685
+ */
686
+ tools: Array<NamespaceTool.Function | CustomTool>;
687
+ /**
688
+ * The type of the tool. Always `namespace`.
689
+ */
690
+ type: 'namespace';
691
+ }
692
+ export declare namespace NamespaceTool {
693
+ interface Function {
694
+ name: string;
695
+ type: 'function';
696
+ /**
697
+ * Whether this function should be deferred and discovered via tool search.
698
+ */
699
+ defer_loading?: boolean;
700
+ description?: string | null;
701
+ parameters?: unknown | null;
702
+ strict?: boolean | null;
703
+ }
704
+ }
440
705
  export interface Response {
441
706
  /**
442
707
  * Unique identifier for this Response.
@@ -586,7 +851,7 @@ export interface Response {
586
851
  * of 24 hours.
587
852
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
588
853
  */
589
- prompt_cache_retention?: 'in-memory' | '24h' | null;
854
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
590
855
  /**
591
856
  * **gpt-5 and o-series models only**
592
857
  *
@@ -597,8 +862,9 @@ export interface Response {
597
862
  /**
598
863
  * A stable identifier used to help detect users of your application that may be
599
864
  * violating OpenAI's usage policies. The IDs should be a string that uniquely
600
- * identifies each user. We recommend hashing their username or email address, in
601
- * order to avoid sending us any identifying information.
865
+ * identifies each user, with a maximum length of 64 characters. We recommend
866
+ * hashing their username or email address, in order to avoid sending us any
867
+ * identifying information.
602
868
  * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
603
869
  */
604
870
  safety_identifier?: string;
@@ -633,6 +899,12 @@ export interface Response {
633
899
  * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
634
900
  */
635
901
  text?: ResponseTextConfig;
902
+ /**
903
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
904
+ * to return at each token position, each with an associated log probability. In
905
+ * some cases, the number of returned tokens may be fewer than requested.
906
+ */
907
+ top_logprobs?: number | null;
636
908
  /**
637
909
  * The truncation strategy to use for the model response.
638
910
  *
@@ -1092,10 +1364,6 @@ export interface ResponseComputerToolCall {
1092
1364
  * The unique ID of the computer call.
1093
1365
  */
1094
1366
  id: string;
1095
- /**
1096
- * A click action.
1097
- */
1098
- action: ResponseComputerToolCall.Click | ResponseComputerToolCall.DoubleClick | ResponseComputerToolCall.Drag | ResponseComputerToolCall.Keypress | ResponseComputerToolCall.Move | ResponseComputerToolCall.Screenshot | ResponseComputerToolCall.Scroll | ResponseComputerToolCall.Type | ResponseComputerToolCall.Wait;
1099
1367
  /**
1100
1368
  * An identifier used when responding to the tool call with output.
1101
1369
  */
@@ -1113,8 +1381,34 @@ export interface ResponseComputerToolCall {
1113
1381
  * The type of the computer call. Always `computer_call`.
1114
1382
  */
1115
1383
  type: 'computer_call';
1384
+ /**
1385
+ * A click action.
1386
+ */
1387
+ action?: ResponseComputerToolCall.Click | ResponseComputerToolCall.DoubleClick | ResponseComputerToolCall.Drag | ResponseComputerToolCall.Keypress | ResponseComputerToolCall.Move | ResponseComputerToolCall.Screenshot | ResponseComputerToolCall.Scroll | ResponseComputerToolCall.Type | ResponseComputerToolCall.Wait;
1388
+ /**
1389
+ * Flattened batched actions for `computer_use`. Each action includes an `type`
1390
+ * discriminator and action-specific fields.
1391
+ */
1392
+ actions?: ComputerActionList;
1116
1393
  }
1117
1394
  export declare namespace ResponseComputerToolCall {
1395
+ /**
1396
+ * A pending safety check for the computer call.
1397
+ */
1398
+ interface PendingSafetyCheck {
1399
+ /**
1400
+ * The ID of the pending safety check.
1401
+ */
1402
+ id: string;
1403
+ /**
1404
+ * The type of the pending safety check.
1405
+ */
1406
+ code?: string | null;
1407
+ /**
1408
+ * Details about the pending safety check.
1409
+ */
1410
+ message?: string | null;
1411
+ }
1118
1412
  /**
1119
1413
  * A click action.
1120
1414
  */
@@ -1136,11 +1430,19 @@ export declare namespace ResponseComputerToolCall {
1136
1430
  * The y-coordinate where the click occurred.
1137
1431
  */
1138
1432
  y: number;
1433
+ /**
1434
+ * The keys being held while clicking.
1435
+ */
1436
+ keys?: Array<string> | null;
1139
1437
  }
1140
1438
  /**
1141
1439
  * A double click action.
1142
1440
  */
1143
1441
  interface DoubleClick {
1442
+ /**
1443
+ * The keys being held while double-clicking.
1444
+ */
1445
+ keys: Array<string> | null;
1144
1446
  /**
1145
1447
  * Specifies the event type. For a double click action, this property is always set
1146
1448
  * to `double_click`.
@@ -1176,6 +1478,10 @@ export declare namespace ResponseComputerToolCall {
1176
1478
  * `drag`.
1177
1479
  */
1178
1480
  type: 'drag';
1481
+ /**
1482
+ * The keys being held while dragging the mouse.
1483
+ */
1484
+ keys?: Array<string> | null;
1179
1485
  }
1180
1486
  namespace Drag {
1181
1487
  /**
@@ -1224,6 +1530,10 @@ export declare namespace ResponseComputerToolCall {
1224
1530
  * The y-coordinate to move to.
1225
1531
  */
1226
1532
  y: number;
1533
+ /**
1534
+ * The keys being held while moving the mouse.
1535
+ */
1536
+ keys?: Array<string> | null;
1227
1537
  }
1228
1538
  /**
1229
1539
  * A screenshot action.
@@ -1260,6 +1570,10 @@ export declare namespace ResponseComputerToolCall {
1260
1570
  * The y-coordinate where the scroll occurred.
1261
1571
  */
1262
1572
  y: number;
1573
+ /**
1574
+ * The keys being held while scrolling.
1575
+ */
1576
+ keys?: Array<string> | null;
1263
1577
  }
1264
1578
  /**
1265
1579
  * An action to type in text.
@@ -1285,25 +1599,8 @@ export declare namespace ResponseComputerToolCall {
1285
1599
  */
1286
1600
  type: 'wait';
1287
1601
  }
1288
- /**
1289
- * A pending safety check for the computer call.
1290
- */
1291
- interface PendingSafetyCheck {
1292
- /**
1293
- * The ID of the pending safety check.
1294
- */
1295
- id: string;
1296
- /**
1297
- * The type of the pending safety check.
1298
- */
1299
- code?: string | null;
1300
- /**
1301
- * Details about the pending safety check.
1302
- */
1303
- message?: string | null;
1304
- }
1305
- }
1306
- export interface ResponseComputerToolCallOutputItem {
1602
+ }
1603
+ export interface ResponseComputerToolCallOutputItem {
1307
1604
  /**
1308
1605
  * The unique ID of the computer call tool output.
1309
1606
  */
@@ -1316,6 +1613,11 @@ export interface ResponseComputerToolCallOutputItem {
1316
1613
  * A computer screenshot image used with the computer use tool.
1317
1614
  */
1318
1615
  output: ResponseComputerToolCallOutputScreenshot;
1616
+ /**
1617
+ * The status of the message input. One of `in_progress`, `completed`, or
1618
+ * `incomplete`. Populated when input items are returned via API.
1619
+ */
1620
+ status: 'completed' | 'incomplete' | 'failed' | 'in_progress';
1319
1621
  /**
1320
1622
  * The type of the computer tool call output. Always `computer_call_output`.
1321
1623
  */
@@ -1326,10 +1628,9 @@ export interface ResponseComputerToolCallOutputItem {
1326
1628
  */
1327
1629
  acknowledged_safety_checks?: Array<ResponseComputerToolCallOutputItem.AcknowledgedSafetyCheck>;
1328
1630
  /**
1329
- * The status of the message input. One of `in_progress`, `completed`, or
1330
- * `incomplete`. Populated when input items are returned via API.
1631
+ * The identifier of the actor that created the item.
1331
1632
  */
1332
- status?: 'in_progress' | 'completed' | 'incomplete';
1633
+ created_by?: string;
1333
1634
  }
1334
1635
  export declare namespace ResponseComputerToolCallOutputItem {
1335
1636
  /**
@@ -1535,6 +1836,10 @@ export interface ResponseCustomToolCall {
1535
1836
  * The unique ID of the custom tool call in the OpenAI platform.
1536
1837
  */
1537
1838
  id?: string;
1839
+ /**
1840
+ * The namespace of the custom tool being called.
1841
+ */
1842
+ namespace?: string;
1538
1843
  }
1539
1844
  /**
1540
1845
  * Event representing a delta (partial update) to the input of a custom tool call.
@@ -1586,6 +1891,24 @@ export interface ResponseCustomToolCallInputDoneEvent {
1586
1891
  */
1587
1892
  type: 'response.custom_tool_call_input.done';
1588
1893
  }
1894
+ /**
1895
+ * A call to a custom tool created by the model.
1896
+ */
1897
+ export interface ResponseCustomToolCallItem extends ResponseCustomToolCall {
1898
+ /**
1899
+ * The unique ID of the custom tool call item.
1900
+ */
1901
+ id: string;
1902
+ /**
1903
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
1904
+ * Populated when items are returned via API.
1905
+ */
1906
+ status: 'in_progress' | 'completed' | 'incomplete';
1907
+ /**
1908
+ * The identifier of the actor that created the item.
1909
+ */
1910
+ created_by?: string;
1911
+ }
1589
1912
  /**
1590
1913
  * The output of a custom tool call from your code, being sent back to the model.
1591
1914
  */
@@ -1608,6 +1931,24 @@ export interface ResponseCustomToolCallOutput {
1608
1931
  */
1609
1932
  id?: string;
1610
1933
  }
1934
+ /**
1935
+ * The output of a custom tool call from your code, being sent back to the model.
1936
+ */
1937
+ export interface ResponseCustomToolCallOutputItem extends ResponseCustomToolCallOutput {
1938
+ /**
1939
+ * The unique ID of the custom tool call output item.
1940
+ */
1941
+ id: string;
1942
+ /**
1943
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
1944
+ * Populated when items are returned via API.
1945
+ */
1946
+ status: 'in_progress' | 'completed' | 'incomplete';
1947
+ /**
1948
+ * The identifier of the actor that created the item.
1949
+ */
1950
+ created_by?: string;
1951
+ }
1611
1952
  /**
1612
1953
  * An error object returned when the model fails to generate a Response.
1613
1954
  */
@@ -2097,6 +2438,10 @@ export interface ResponseFunctionToolCall {
2097
2438
  * The unique ID of the function tool call.
2098
2439
  */
2099
2440
  id?: string;
2441
+ /**
2442
+ * The namespace of the function to run.
2443
+ */
2444
+ namespace?: string;
2100
2445
  /**
2101
2446
  * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2102
2447
  * Populated when items are returned via API.
@@ -2113,6 +2458,15 @@ export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
2113
2458
  * The unique ID of the function tool call.
2114
2459
  */
2115
2460
  id: string;
2461
+ /**
2462
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2463
+ * Populated when items are returned via API.
2464
+ */
2465
+ status: 'in_progress' | 'completed' | 'incomplete';
2466
+ /**
2467
+ * The identifier of the actor that created the item.
2468
+ */
2469
+ created_by?: string;
2116
2470
  }
2117
2471
  export interface ResponseFunctionToolCallOutputItem {
2118
2472
  /**
@@ -2128,15 +2482,19 @@ export interface ResponseFunctionToolCallOutputItem {
2128
2482
  * list of output content.
2129
2483
  */
2130
2484
  output: string | Array<ResponseInputText | ResponseInputImage | ResponseInputFile>;
2485
+ /**
2486
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2487
+ * Populated when items are returned via API.
2488
+ */
2489
+ status: 'in_progress' | 'completed' | 'incomplete';
2131
2490
  /**
2132
2491
  * The type of the function tool call output. Always `function_call_output`.
2133
2492
  */
2134
2493
  type: 'function_call_output';
2135
2494
  /**
2136
- * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2137
- * Populated when items are returned via API.
2495
+ * The identifier of the actor that created the item.
2138
2496
  */
2139
- status?: 'in_progress' | 'completed' | 'incomplete';
2497
+ created_by?: string;
2140
2498
  }
2141
2499
  /**
2142
2500
  * The results of a web search tool call. See the
@@ -2346,6 +2704,8 @@ export interface ResponseInProgressEvent {
2346
2704
  * Specify additional output data to include in the model response. Currently
2347
2705
  * supported values are:
2348
2706
  *
2707
+ * - `web_search_call.results`: Include the search results of the web search tool
2708
+ * call.
2349
2709
  * - `web_search_call.action.sources`: Include the sources of the web search tool
2350
2710
  * call.
2351
2711
  * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
@@ -2422,6 +2782,12 @@ export interface ResponseInputFile {
2422
2782
  * The type of the input item. Always `input_file`.
2423
2783
  */
2424
2784
  type: 'input_file';
2785
+ /**
2786
+ * The detail level of the file to be sent to the model. Use `low` for the default
2787
+ * rendering behavior, or `high` to render the file at higher quality. Defaults to
2788
+ * `low`.
2789
+ */
2790
+ detail?: 'low' | 'high';
2425
2791
  /**
2426
2792
  * The content of the file to be sent to the model.
2427
2793
  */
@@ -2447,6 +2813,12 @@ export interface ResponseInputFileContent {
2447
2813
  * The type of the input item. Always `input_file`.
2448
2814
  */
2449
2815
  type: 'input_file';
2816
+ /**
2817
+ * The detail level of the file to be sent to the model. Use `low` for the default
2818
+ * rendering behavior, or `high` to render the file at higher quality. Defaults to
2819
+ * `low`.
2820
+ */
2821
+ detail?: 'low' | 'high';
2450
2822
  /**
2451
2823
  * The base64-encoded data of the file to be sent to the model.
2452
2824
  */
@@ -2470,10 +2842,10 @@ export interface ResponseInputFileContent {
2470
2842
  */
2471
2843
  export interface ResponseInputImage {
2472
2844
  /**
2473
- * The detail level of the image to be sent to the model. One of `high`, `low`, or
2474
- * `auto`. Defaults to `auto`.
2845
+ * The detail level of the image to be sent to the model. One of `high`, `low`,
2846
+ * `auto`, or `original`. Defaults to `auto`.
2475
2847
  */
2476
- detail: 'low' | 'high' | 'auto';
2848
+ detail: 'low' | 'high' | 'auto' | 'original';
2477
2849
  /**
2478
2850
  * The type of the input item. Always `input_image`.
2479
2851
  */
@@ -2498,10 +2870,10 @@ export interface ResponseInputImageContent {
2498
2870
  */
2499
2871
  type: 'input_image';
2500
2872
  /**
2501
- * The detail level of the image to be sent to the model. One of `high`, `low`, or
2502
- * `auto`. Defaults to `auto`.
2873
+ * The detail level of the image to be sent to the model. One of `high`, `low`,
2874
+ * `auto`, or `original`. Defaults to `auto`.
2503
2875
  */
2504
- detail?: 'low' | 'high' | 'auto' | null;
2876
+ detail?: 'low' | 'high' | 'auto' | 'original' | null;
2505
2877
  /**
2506
2878
  * The ID of the file to be sent to the model.
2507
2879
  */
@@ -2519,7 +2891,7 @@ export interface ResponseInputImageContent {
2519
2891
  * `assistant` role are presumed to have been generated by the model in previous
2520
2892
  * interactions.
2521
2893
  */
2522
- export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.ItemReference;
2894
+ export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference;
2523
2895
  export declare namespace ResponseInputItem {
2524
2896
  /**
2525
2897
  * A message input to the model with a role indicating instruction following
@@ -2623,6 +2995,32 @@ export declare namespace ResponseInputItem {
2623
2995
  */
2624
2996
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
2625
2997
  }
2998
+ interface ToolSearchCall {
2999
+ /**
3000
+ * The arguments supplied to the tool search call.
3001
+ */
3002
+ arguments: unknown;
3003
+ /**
3004
+ * The item type. Always `tool_search_call`.
3005
+ */
3006
+ type: 'tool_search_call';
3007
+ /**
3008
+ * The unique ID of this tool search call.
3009
+ */
3010
+ id?: string | null;
3011
+ /**
3012
+ * The unique ID of the tool search call generated by the model.
3013
+ */
3014
+ call_id?: string | null;
3015
+ /**
3016
+ * Whether tool search was executed by the server or by the client.
3017
+ */
3018
+ execution?: 'server' | 'client';
3019
+ /**
3020
+ * The status of the tool search call.
3021
+ */
3022
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
3023
+ }
2626
3024
  /**
2627
3025
  * An image generation request made by the model.
2628
3026
  */
@@ -3052,6 +3450,15 @@ export declare namespace ResponseInputItem {
3052
3450
  */
3053
3451
  status?: 'in_progress' | 'completed' | 'incomplete' | 'calling' | 'failed';
3054
3452
  }
3453
+ /**
3454
+ * Compacts the current context. Must be the final input item.
3455
+ */
3456
+ interface CompactionTrigger {
3457
+ /**
3458
+ * The type of the item. Always `compaction_trigger`.
3459
+ */
3460
+ type: 'compaction_trigger';
3461
+ }
3055
3462
  /**
3056
3463
  * An internal identifier for an item to reference.
3057
3464
  */
@@ -3085,15 +3492,15 @@ export interface ResponseInputMessageItem {
3085
3492
  * The role of the message input. One of `user`, `system`, or `developer`.
3086
3493
  */
3087
3494
  role: 'user' | 'system' | 'developer';
3495
+ /**
3496
+ * The type of the message input. Always set to `message`.
3497
+ */
3498
+ type: 'message';
3088
3499
  /**
3089
3500
  * The status of item. One of `in_progress`, `completed`, or `incomplete`.
3090
3501
  * Populated when items are returned via API.
3091
3502
  */
3092
3503
  status?: 'in_progress' | 'completed' | 'incomplete';
3093
- /**
3094
- * The type of the message input. Always set to `message`.
3095
- */
3096
- type?: 'message';
3097
3504
  }
3098
3505
  /**
3099
3506
  * A text input to the model.
@@ -3124,7 +3531,7 @@ export interface ResponseInputTextContent {
3124
3531
  /**
3125
3532
  * Content item used to generate a response.
3126
3533
  */
3127
- export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall;
3534
+ export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseReasoningItem | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
3128
3535
  export declare namespace ResponseItem {
3129
3536
  /**
3130
3537
  * An image generation request made by the model.
@@ -3577,7 +3984,7 @@ export interface ResponseOutputAudio {
3577
3984
  /**
3578
3985
  * An output message from the model.
3579
3986
  */
3580
- export type ResponseOutputItem = ResponseOutputMessage | ResponseFileSearchToolCall | ResponseFunctionToolCall | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseReasoningItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseCustomToolCall;
3987
+ export type ResponseOutputItem = ResponseOutputMessage | ResponseFileSearchToolCall | ResponseFunctionToolCall | ResponseFunctionToolCallOutputItem | ResponseFunctionWebSearch | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseReasoningItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseCompactionItem | ResponseOutputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseOutputItem.LocalShellCall | ResponseOutputItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseOutputItem.McpCall | ResponseOutputItem.McpListTools | ResponseOutputItem.McpApprovalRequest | ResponseOutputItem.McpApprovalResponse | ResponseCustomToolCall | ResponseCustomToolCallOutputItem;
3581
3988
  export declare namespace ResponseOutputItem {
3582
3989
  /**
3583
3990
  * An image generation request made by the model.
@@ -3658,6 +4065,27 @@ export declare namespace ResponseOutputItem {
3658
4065
  working_directory?: string | null;
3659
4066
  }
3660
4067
  }
4068
+ /**
4069
+ * The output of a local shell tool call.
4070
+ */
4071
+ interface LocalShellCallOutput {
4072
+ /**
4073
+ * The unique ID of the local shell tool call generated by the model.
4074
+ */
4075
+ id: string;
4076
+ /**
4077
+ * A JSON string of the output of the local shell tool call.
4078
+ */
4079
+ output: string;
4080
+ /**
4081
+ * The type of the local shell tool call output. Always `local_shell_call_output`.
4082
+ */
4083
+ type: 'local_shell_call_output';
4084
+ /**
4085
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
4086
+ */
4087
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
4088
+ }
3661
4089
  /**
3662
4090
  * An invocation of a tool on an MCP server.
3663
4091
  */
@@ -3775,6 +4203,31 @@ export declare namespace ResponseOutputItem {
3775
4203
  */
3776
4204
  type: 'mcp_approval_request';
3777
4205
  }
4206
+ /**
4207
+ * A response to an MCP approval request.
4208
+ */
4209
+ interface McpApprovalResponse {
4210
+ /**
4211
+ * The unique ID of the approval response
4212
+ */
4213
+ id: string;
4214
+ /**
4215
+ * The ID of the approval request being answered.
4216
+ */
4217
+ approval_request_id: string;
4218
+ /**
4219
+ * Whether the request was approved.
4220
+ */
4221
+ approve: boolean;
4222
+ /**
4223
+ * The type of the item. Always `mcp_approval_response`.
4224
+ */
4225
+ type: 'mcp_approval_response';
4226
+ /**
4227
+ * Optional reason for the decision.
4228
+ */
4229
+ reason?: string | null;
4230
+ }
3778
4231
  }
3779
4232
  /**
3780
4233
  * Emitted when a new output item is added.
@@ -3843,6 +4296,13 @@ export interface ResponseOutputMessage {
3843
4296
  * The type of the output message. Always `message`.
3844
4297
  */
3845
4298
  type: 'message';
4299
+ /**
4300
+ * Labels an `assistant` message as intermediate commentary (`commentary`) or the
4301
+ * final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
4302
+ * sending follow-up requests, preserve and resend phase on all assistant messages
4303
+ * — dropping it can degrade performance. Not used for user messages.
4304
+ */
4305
+ phase?: 'commentary' | 'final_answer' | null;
3846
4306
  }
3847
4307
  /**
3848
4308
  * A refusal from the model.
@@ -4473,7 +4933,7 @@ export declare namespace ResponseTextDeltaEvent {
4473
4933
  */
4474
4934
  logprob: number;
4475
4935
  /**
4476
- * The log probability of the top 20 most likely tokens.
4936
+ * The log probabilities of up to 20 of the most likely tokens.
4477
4937
  */
4478
4938
  top_logprobs?: Array<Logprob.TopLogprob>;
4479
4939
  }
@@ -4539,7 +4999,7 @@ export declare namespace ResponseTextDoneEvent {
4539
4999
  */
4540
5000
  logprob: number;
4541
5001
  /**
4542
- * The log probability of the top 20 most likely tokens.
5002
+ * The log probabilities of up to 20 of the most likely tokens.
4543
5003
  */
4544
5004
  top_logprobs?: Array<Logprob.TopLogprob>;
4545
5005
  }
@@ -4556,6 +5016,92 @@ export declare namespace ResponseTextDoneEvent {
4556
5016
  }
4557
5017
  }
4558
5018
  }
5019
+ export interface ResponseToolSearchCall {
5020
+ /**
5021
+ * The unique ID of the tool search call item.
5022
+ */
5023
+ id: string;
5024
+ /**
5025
+ * Arguments used for the tool search call.
5026
+ */
5027
+ arguments: unknown;
5028
+ /**
5029
+ * The unique ID of the tool search call generated by the model.
5030
+ */
5031
+ call_id: string | null;
5032
+ /**
5033
+ * Whether tool search was executed by the server or by the client.
5034
+ */
5035
+ execution: 'server' | 'client';
5036
+ /**
5037
+ * The status of the tool search call item that was recorded.
5038
+ */
5039
+ status: 'in_progress' | 'completed' | 'incomplete';
5040
+ /**
5041
+ * The type of the item. Always `tool_search_call`.
5042
+ */
5043
+ type: 'tool_search_call';
5044
+ /**
5045
+ * The identifier of the actor that created the item.
5046
+ */
5047
+ created_by?: string;
5048
+ }
5049
+ export interface ResponseToolSearchOutputItem {
5050
+ /**
5051
+ * The unique ID of the tool search output item.
5052
+ */
5053
+ id: string;
5054
+ /**
5055
+ * The unique ID of the tool search call generated by the model.
5056
+ */
5057
+ call_id: string | null;
5058
+ /**
5059
+ * Whether tool search was executed by the server or by the client.
5060
+ */
5061
+ execution: 'server' | 'client';
5062
+ /**
5063
+ * The status of the tool search output item that was recorded.
5064
+ */
5065
+ status: 'in_progress' | 'completed' | 'incomplete';
5066
+ /**
5067
+ * The loaded tool definitions returned by tool search.
5068
+ */
5069
+ tools: Array<Tool>;
5070
+ /**
5071
+ * The type of the item. Always `tool_search_output`.
5072
+ */
5073
+ type: 'tool_search_output';
5074
+ /**
5075
+ * The identifier of the actor that created the item.
5076
+ */
5077
+ created_by?: string;
5078
+ }
5079
+ export interface ResponseToolSearchOutputItemParam {
5080
+ /**
5081
+ * The loaded tool definitions returned by the tool search output.
5082
+ */
5083
+ tools: Array<Tool>;
5084
+ /**
5085
+ * The item type. Always `tool_search_output`.
5086
+ */
5087
+ type: 'tool_search_output';
5088
+ /**
5089
+ * The unique ID of this tool search output.
5090
+ */
5091
+ id?: string | null;
5092
+ /**
5093
+ * The unique ID of the tool search call generated by the model.
5094
+ */
5095
+ call_id?: string | null;
5096
+ /**
5097
+ * Whether tool search was executed by the server or by the client.
5098
+ */
5099
+ execution?: 'server' | 'client';
5100
+ /**
5101
+ * The status of the tool search output.
5102
+ */
5103
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
5104
+ }
4559
5105
  /**
4560
5106
  * Represents token usage details including input tokens, output tokens, a
4561
5107
  * breakdown of output tokens, and the total tokens used.
@@ -4666,6 +5212,286 @@ export interface ResponseWebSearchCallSearchingEvent {
4666
5212
  */
4667
5213
  type: 'response.web_search_call.searching';
4668
5214
  }
5215
+ export interface ResponsesClientEvent {
5216
+ /**
5217
+ * The type of the client event. Always `response.create`.
5218
+ */
5219
+ type: 'response.create';
5220
+ /**
5221
+ * Whether to run the model response in the background.
5222
+ * [Learn more](https://platform.openai.com/docs/guides/background).
5223
+ */
5224
+ background?: boolean | null;
5225
+ /**
5226
+ * Context management configuration for this request.
5227
+ */
5228
+ context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
5229
+ /**
5230
+ * The conversation that this response belongs to. Items from this conversation are
5231
+ * prepended to `input_items` for this response request. Input items and output
5232
+ * items from this response are automatically added to this conversation after this
5233
+ * response completes.
5234
+ */
5235
+ conversation?: string | ResponseConversationParam | null;
5236
+ /**
5237
+ * Specify additional output data to include in the model response. Currently
5238
+ * supported values are:
5239
+ *
5240
+ * - `web_search_call.action.sources`: Include the sources of the web search tool
5241
+ * call.
5242
+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
5243
+ * in code interpreter tool call items.
5244
+ * - `computer_call_output.output.image_url`: Include image urls from the computer
5245
+ * call output.
5246
+ * - `file_search_call.results`: Include the search results of the file search tool
5247
+ * call.
5248
+ * - `message.input_image.image_url`: Include image urls from the input message.
5249
+ * - `message.output_text.logprobs`: Include logprobs with assistant messages.
5250
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
5251
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
5252
+ * multi-turn conversations when using the Responses API statelessly (like when
5253
+ * the `store` parameter is set to `false`, or when an organization is enrolled
5254
+ * in the zero data retention program).
5255
+ */
5256
+ include?: Array<ResponseIncludable> | null;
5257
+ /**
5258
+ * Text, image, or file inputs to the model, used to generate a response.
5259
+ *
5260
+ * Learn more:
5261
+ *
5262
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
5263
+ * - [Image inputs](https://platform.openai.com/docs/guides/images)
5264
+ * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
5265
+ * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
5266
+ * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
5267
+ */
5268
+ input?: string | ResponseInput;
5269
+ /**
5270
+ * A system (or developer) message inserted into the model's context.
5271
+ *
5272
+ * When using along with `previous_response_id`, the instructions from a previous
5273
+ * response will not be carried over to the next response. This makes it simple to
5274
+ * swap out system (or developer) messages in new responses.
5275
+ */
5276
+ instructions?: string | null;
5277
+ /**
5278
+ * An upper bound for the number of tokens that can be generated for a response,
5279
+ * including visible output tokens and
5280
+ * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
5281
+ */
5282
+ max_output_tokens?: number | null;
5283
+ /**
5284
+ * The maximum number of total calls to built-in tools that can be processed in a
5285
+ * response. This maximum number applies across all built-in tool calls, not per
5286
+ * individual tool. Any further attempts to call a tool by the model will be
5287
+ * ignored.
5288
+ */
5289
+ max_tool_calls?: number | null;
5290
+ /**
5291
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
5292
+ * for storing additional information about the object in a structured format, and
5293
+ * querying for objects via API or the dashboard.
5294
+ *
5295
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
5296
+ * a maximum length of 512 characters.
5297
+ */
5298
+ metadata?: Shared.Metadata | null;
5299
+ /**
5300
+ * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
5301
+ * wide range of models with different capabilities, performance characteristics,
5302
+ * and price points. Refer to the
5303
+ * [model guide](https://platform.openai.com/docs/models) to browse and compare
5304
+ * available models.
5305
+ */
5306
+ model?: Shared.ResponsesModel;
5307
+ /**
5308
+ * Whether to allow the model to run tool calls in parallel.
5309
+ */
5310
+ parallel_tool_calls?: boolean | null;
5311
+ /**
5312
+ * The unique ID of the previous response to the model. Use this to create
5313
+ * multi-turn conversations. Learn more about
5314
+ * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
5315
+ * Cannot be used in conjunction with `conversation`.
5316
+ */
5317
+ previous_response_id?: string | null;
5318
+ /**
5319
+ * Reference to a prompt template and its variables.
5320
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
5321
+ */
5322
+ prompt?: ResponsePrompt | null;
5323
+ /**
5324
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
5325
+ * hit rates. Replaces the `user` field.
5326
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
5327
+ */
5328
+ prompt_cache_key?: string;
5329
+ /**
5330
+ * The retention policy for the prompt cache. Set to `24h` to enable extended
5331
+ * prompt caching, which keeps cached prefixes active for longer, up to a maximum
5332
+ * of 24 hours.
5333
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
5334
+ */
5335
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
5336
+ /**
5337
+ * **gpt-5 and o-series models only**
5338
+ *
5339
+ * Configuration options for
5340
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
5341
+ */
5342
+ reasoning?: Shared.Reasoning | null;
5343
+ /**
5344
+ * A stable identifier used to help detect users of your application that may be
5345
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
5346
+ * identifies each user, with a maximum length of 64 characters. We recommend
5347
+ * hashing their username or email address, in order to avoid sending us any
5348
+ * identifying information.
5349
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
5350
+ */
5351
+ safety_identifier?: string;
5352
+ /**
5353
+ * Specifies the processing type used for serving the request.
5354
+ *
5355
+ * - If set to 'auto', then the request will be processed with the service tier
5356
+ * configured in the Project settings. Unless otherwise configured, the Project
5357
+ * will use 'default'.
5358
+ * - If set to 'default', then the request will be processed with the standard
5359
+ * pricing and performance for the selected model.
5360
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
5361
+ * '[priority](https://openai.com/api-priority-processing/)', then the request
5362
+ * will be processed with the corresponding service tier.
5363
+ * - When not set, the default behavior is 'auto'.
5364
+ *
5365
+ * When the `service_tier` parameter is set, the response body will include the
5366
+ * `service_tier` value based on the processing mode actually used to serve the
5367
+ * request. This response value may be different from the value set in the
5368
+ * parameter.
5369
+ */
5370
+ service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
5371
+ /**
5372
+ * Whether to store the generated model response for later retrieval via API.
5373
+ */
5374
+ store?: boolean | null;
5375
+ /**
5376
+ * If set to true, the model response data will be streamed to the client as it is
5377
+ * generated using
5378
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
5379
+ * See the
5380
+ * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
5381
+ * for more information.
5382
+ */
5383
+ stream?: boolean | null;
5384
+ /**
5385
+ * Options for streaming responses. Only set this when you set `stream: true`.
5386
+ */
5387
+ stream_options?: ResponsesClientEvent.StreamOptions | null;
5388
+ /**
5389
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
5390
+ * make the output more random, while lower values like 0.2 will make it more
5391
+ * focused and deterministic. We generally recommend altering this or `top_p` but
5392
+ * not both.
5393
+ */
5394
+ temperature?: number | null;
5395
+ /**
5396
+ * Configuration options for a text response from the model. Can be plain text or
5397
+ * structured JSON data. Learn more:
5398
+ *
5399
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
5400
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
5401
+ */
5402
+ text?: ResponseTextConfig;
5403
+ /**
5404
+ * How the model should select which tool (or tools) to use when generating a
5405
+ * response. See the `tools` parameter to see how to specify which tools the model
5406
+ * can call.
5407
+ */
5408
+ tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ToolChoiceApplyPatch | ToolChoiceShell;
5409
+ /**
5410
+ * An array of tools the model may call while generating a response. You can
5411
+ * specify which tool to use by setting the `tool_choice` parameter.
5412
+ *
5413
+ * We support the following categories of tools:
5414
+ *
5415
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
5416
+ * capabilities, like
5417
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
5418
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
5419
+ * Learn more about
5420
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
5421
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
5422
+ * predefined connectors such as Google Drive and SharePoint. Learn more about
5423
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
5424
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
5425
+ * the model to call your own code with strongly typed arguments and outputs.
5426
+ * Learn more about
5427
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
5428
+ * You can also use custom tools to call your own code.
5429
+ */
5430
+ tools?: Array<Tool>;
5431
+ /**
5432
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
5433
+ * to return at each token position, each with an associated log probability. In
5434
+ * some cases, the number of returned tokens may be fewer than requested.
5435
+ */
5436
+ top_logprobs?: number | null;
5437
+ /**
5438
+ * An alternative to sampling with temperature, called nucleus sampling, where the
5439
+ * model considers the results of the tokens with top_p probability mass. So 0.1
5440
+ * means only the tokens comprising the top 10% probability mass are considered.
5441
+ *
5442
+ * We generally recommend altering this or `temperature` but not both.
5443
+ */
5444
+ top_p?: number | null;
5445
+ /**
5446
+ * The truncation strategy to use for the model response.
5447
+ *
5448
+ * - `auto`: If the input to this Response exceeds the model's context window size,
5449
+ * the model will truncate the response to fit the context window by dropping
5450
+ * items from the beginning of the conversation.
5451
+ * - `disabled` (default): If the input size will exceed the context window size
5452
+ * for a model, the request will fail with a 400 error.
5453
+ */
5454
+ truncation?: 'auto' | 'disabled' | null;
5455
+ /**
5456
+ * @deprecated This field is being replaced by `safety_identifier` and
5457
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
5458
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
5459
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
5460
+ * abuse.
5461
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
5462
+ */
5463
+ user?: string;
5464
+ }
5465
+ export declare namespace ResponsesClientEvent {
5466
+ interface ContextManagement {
5467
+ /**
5468
+ * The context management entry type. Currently only 'compaction' is supported.
5469
+ */
5470
+ type: string;
5471
+ /**
5472
+ * Token threshold at which compaction should be triggered for this entry.
5473
+ */
5474
+ compact_threshold?: number | null;
5475
+ }
5476
+ /**
5477
+ * Options for streaming responses. Only set this when you set `stream: true`.
5478
+ */
5479
+ interface StreamOptions {
5480
+ /**
5481
+ * When true, stream obfuscation will be enabled. Stream obfuscation adds random
5482
+ * characters to an `obfuscation` field on streaming delta events to normalize
5483
+ * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
5484
+ * fields are included by default, but add a small amount of overhead to the data
5485
+ * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
5486
+ * you trust the network links between your application and the OpenAI API.
5487
+ */
5488
+ include_obfuscation?: boolean;
5489
+ }
5490
+ }
5491
+ /**
5492
+ * Server events emitted by the Responses WebSocket server.
5493
+ */
5494
+ export type ResponsesServerEvent = ResponseAudioDeltaEvent | ResponseAudioDoneEvent | ResponseAudioTranscriptDeltaEvent | ResponseAudioTranscriptDoneEvent | ResponseCodeInterpreterCallCodeDeltaEvent | ResponseCodeInterpreterCallCodeDoneEvent | ResponseCodeInterpreterCallCompletedEvent | ResponseCodeInterpreterCallInProgressEvent | ResponseCodeInterpreterCallInterpretingEvent | ResponseCompletedEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFileSearchCallCompletedEvent | ResponseFileSearchCallInProgressEvent | ResponseFileSearchCallSearchingEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseInProgressEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningSummaryPartAddedEvent | ResponseReasoningSummaryPartDoneEvent | ResponseReasoningSummaryTextDeltaEvent | ResponseReasoningSummaryTextDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent | ResponseWebSearchCallCompletedEvent | ResponseWebSearchCallInProgressEvent | ResponseWebSearchCallSearchingEvent | ResponseImageGenCallCompletedEvent | ResponseImageGenCallGeneratingEvent | ResponseImageGenCallInProgressEvent | ResponseImageGenCallPartialImageEvent | ResponseMcpCallArgumentsDeltaEvent | ResponseMcpCallArgumentsDoneEvent | ResponseMcpCallCompletedEvent | ResponseMcpCallFailedEvent | ResponseMcpCallInProgressEvent | ResponseMcpListToolsCompletedEvent | ResponseMcpListToolsFailedEvent | ResponseMcpListToolsInProgressEvent | ResponseOutputTextAnnotationAddedEvent | ResponseQueuedEvent | ResponseCustomToolCallInputDeltaEvent | ResponseCustomToolCallInputDoneEvent;
4669
5495
  export interface SkillReference {
4670
5496
  /**
4671
5497
  * The ID of the referenced skill.
@@ -4683,7 +5509,7 @@ export interface SkillReference {
4683
5509
  /**
4684
5510
  * A tool that can be used to generate a response.
4685
5511
  */
4686
- export type Tool = FunctionTool | FileSearchTool | ComputerTool | WebSearchTool | Tool.Mcp | Tool.CodeInterpreter | Tool.ImageGeneration | Tool.LocalShell | FunctionShellTool | CustomTool | WebSearchPreviewTool | ApplyPatchTool;
5512
+ export type Tool = FunctionTool | FileSearchTool | ComputerTool | ComputerUsePreviewTool | WebSearchTool | Tool.Mcp | Tool.CodeInterpreter | Tool.ImageGeneration | Tool.LocalShell | FunctionShellTool | CustomTool | NamespaceTool | ToolSearchTool | WebSearchPreviewTool | ApplyPatchTool;
4687
5513
  export declare namespace Tool {
4688
5514
  /**
4689
5515
  * Give the model access to additional tools via remote Model Context Protocol
@@ -4727,6 +5553,10 @@ export declare namespace Tool {
4727
5553
  * - SharePoint: `connector_sharepoint`
4728
5554
  */
4729
5555
  connector_id?: 'connector_dropbox' | 'connector_gmail' | 'connector_googlecalendar' | 'connector_googledrive' | 'connector_microsoftteams' | 'connector_outlookcalendar' | 'connector_outlookemail' | 'connector_sharepoint';
5556
+ /**
5557
+ * Whether this MCP tool is deferred and discovered via tool search.
5558
+ */
5559
+ defer_loading?: boolean;
4730
5560
  /**
4731
5561
  * Optional HTTP headers to send to the MCP server. Use for authentication or other
4732
5562
  * purposes.
@@ -4866,8 +5696,18 @@ export declare namespace Tool {
4866
5696
  */
4867
5697
  action?: 'generate' | 'edit' | 'auto';
4868
5698
  /**
4869
- * Background type for the generated image. One of `transparent`, `opaque`, or
4870
- * `auto`. Default: `auto`.
5699
+ * Allows to set transparency for the background of the generated image(s). This
5700
+ * parameter is only supported for GPT image models that support transparent
5701
+ * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
5702
+ * When `auto` is used, the model will automatically determine the best background
5703
+ * for the image.
5704
+ *
5705
+ * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
5706
+ * backgrounds. Requests with `background` set to `transparent` will return an
5707
+ * error for these models; use `opaque` or `auto` instead.
5708
+ *
5709
+ * If `transparent`, the output format needs to support transparency, so it should
5710
+ * be set to either `png` (default value) or `webp`.
4871
5711
  */
4872
5712
  background?: 'transparent' | 'opaque' | 'auto';
4873
5713
  /**
@@ -4885,7 +5725,7 @@ export declare namespace Tool {
4885
5725
  /**
4886
5726
  * The image generation model to use. Default: `gpt-image-1`.
4887
5727
  */
4888
- model?: (string & {}) | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5';
5728
+ model?: (string & {}) | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-2' | 'gpt-image-2-2026-04-21' | 'gpt-image-1.5' | 'chatgpt-image-latest';
4889
5729
  /**
4890
5730
  * Moderation level for the generated image. Default: `auto`.
4891
5731
  */
@@ -4910,10 +5750,19 @@ export declare namespace Tool {
4910
5750
  */
4911
5751
  quality?: 'low' | 'medium' | 'high' | 'auto';
4912
5752
  /**
4913
- * The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`,
4914
- * or `auto`. Default: `auto`.
4915
- */
4916
- size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
5753
+ * The size of the generated images. For `gpt-image-2` and
5754
+ * `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
5755
+ * strings, for example `1536x864`. Width and height must both be divisible by 16
5756
+ * and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
5757
+ * `2560x1440` are experimental, and the maximum supported resolution is
5758
+ * `3840x2160`. The requested size must also satisfy the model's current pixel and
5759
+ * edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
5760
+ * supported by the GPT image models; `auto` is supported for models that allow
5761
+ * automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
5762
+ * `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
5763
+ * `1024x1792`.
5764
+ */
5765
+ size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
4917
5766
  }
4918
5767
  namespace ImageGeneration {
4919
5768
  /**
@@ -5061,12 +5910,35 @@ export interface ToolChoiceTypes {
5061
5910
  *
5062
5911
  * - `file_search`
5063
5912
  * - `web_search_preview`
5913
+ * - `computer`
5064
5914
  * - `computer_use_preview`
5915
+ * - `computer_use`
5065
5916
  * - `code_interpreter`
5066
5917
  * - `mcp`
5067
5918
  * - `image_generation`
5068
5919
  */
5069
- type: 'file_search' | 'web_search_preview' | 'computer_use_preview' | 'web_search_preview_2025_03_11' | 'image_generation' | 'code_interpreter' | 'mcp';
5920
+ type: 'file_search' | 'web_search_preview' | 'computer' | 'computer_use_preview' | 'computer_use' | 'web_search_preview_2025_03_11' | 'image_generation' | 'code_interpreter' | 'mcp';
5921
+ }
5922
+ /**
5923
+ * Hosted or BYOT tool search configuration for deferred tools.
5924
+ */
5925
+ export interface ToolSearchTool {
5926
+ /**
5927
+ * The type of the tool. Always `tool_search`.
5928
+ */
5929
+ type: 'tool_search';
5930
+ /**
5931
+ * Description shown to the model for a client-executed tool search tool.
5932
+ */
5933
+ description?: string | null;
5934
+ /**
5935
+ * Whether tool search is executed by the server or by the client.
5936
+ */
5937
+ execution?: 'server' | 'client';
5938
+ /**
5939
+ * Parameter schema for a client-executed tool search tool.
5940
+ */
5941
+ parameters?: unknown | null;
5070
5942
  }
5071
5943
  /**
5072
5944
  * This tool searches the web for relevant results to use in a response. Learn more
@@ -5079,6 +5951,7 @@ export interface WebSearchPreviewTool {
5079
5951
  * `web_search_preview_2025_03_11`.
5080
5952
  */
5081
5953
  type: 'web_search_preview' | 'web_search_preview_2025_03_11';
5954
+ search_content_types?: Array<'text' | 'image'>;
5082
5955
  /**
5083
5956
  * High level guidance for the amount of context window space to use for the
5084
5957
  * search. One of `low`, `medium`, or `high`. `medium` is the default.
@@ -5295,7 +6168,7 @@ export interface ResponseCreateParamsBase {
5295
6168
  * of 24 hours.
5296
6169
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
5297
6170
  */
5298
- prompt_cache_retention?: 'in-memory' | '24h' | null;
6171
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
5299
6172
  /**
5300
6173
  * **gpt-5 and o-series models only**
5301
6174
  *
@@ -5306,8 +6179,9 @@ export interface ResponseCreateParamsBase {
5306
6179
  /**
5307
6180
  * A stable identifier used to help detect users of your application that may be
5308
6181
  * violating OpenAI's usage policies. The IDs should be a string that uniquely
5309
- * identifies each user. We recommend hashing their username or email address, in
5310
- * order to avoid sending us any identifying information.
6182
+ * identifies each user, with a maximum length of 64 characters. We recommend
6183
+ * hashing their username or email address, in order to avoid sending us any
6184
+ * identifying information.
5311
6185
  * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
5312
6186
  */
5313
6187
  safety_identifier?: string;
@@ -5389,6 +6263,12 @@ export interface ResponseCreateParamsBase {
5389
6263
  * You can also use custom tools to call your own code.
5390
6264
  */
5391
6265
  tools?: Array<Tool>;
6266
+ /**
6267
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
6268
+ * to return at each token position, each with an associated log probability. In
6269
+ * some cases, the number of returned tokens may be fewer than requested.
6270
+ */
6271
+ top_logprobs?: number | null;
5392
6272
  /**
5393
6273
  * An alternative to sampling with temperature, called nucleus sampling, where the
5394
6274
  * model considers the results of the tokens with top_p probability mass. So 0.1
@@ -5531,7 +6411,7 @@ export interface ResponseCompactParams {
5531
6411
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
5532
6412
  * available models.
5533
6413
  */
5534
- model: 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | (string & {}) | null;
6414
+ model: 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | (string & {}) | null;
5535
6415
  /**
5536
6416
  * Text, image, or file inputs to the model, used to generate a response
5537
6417
  */
@@ -5550,9 +6430,21 @@ export interface ResponseCompactParams {
5550
6430
  * Cannot be used in conjunction with `conversation`.
5551
6431
  */
5552
6432
  previous_response_id?: string | null;
6433
+ /**
6434
+ * A key to use when reading from or writing to the prompt cache.
6435
+ */
6436
+ prompt_cache_key?: string | null;
6437
+ /**
6438
+ * How long to retain a prompt cache entry created by this request.
6439
+ */
6440
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
6441
+ /**
6442
+ * The service tier to use for this request.
6443
+ */
6444
+ service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
5553
6445
  }
5554
6446
  export declare namespace Responses {
5555
- export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerTool as ComputerTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseStatus as ResponseStatus, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
6447
+ export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseStatus as ResponseStatus, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
5556
6448
  export { InputItems as InputItems, type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams, };
5557
6449
  export { InputTokens as InputTokens, type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
5558
6450
  }