@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
@@ -39,13 +39,18 @@ export type ParsedResponseOutputItem<ParsedT> =
39
39
  | ParsedResponseOutputMessage<ParsedT>
40
40
  | ParsedResponseFunctionToolCall
41
41
  | ResponseFileSearchToolCall
42
+ | ResponseFunctionToolCallOutputItem
42
43
  | ResponseFunctionWebSearch
43
44
  | ResponseComputerToolCall
45
+ | ResponseComputerToolCallOutputItem
46
+ | ResponseToolSearchCall
47
+ | ResponseToolSearchOutputItem
44
48
  | ResponseReasoningItem
45
49
  | ResponseCompactionItem
46
50
  | ResponseOutputItem.ImageGenerationCall
47
51
  | ResponseCodeInterpreterToolCall
48
52
  | ResponseOutputItem.LocalShellCall
53
+ | ResponseOutputItem.LocalShellCallOutput
49
54
  | ResponseFunctionShellToolCall
50
55
  | ResponseFunctionShellToolCallOutput
51
56
  | ResponseApplyPatchToolCall
@@ -53,7 +58,9 @@ export type ParsedResponseOutputItem<ParsedT> =
53
58
  | ResponseOutputItem.McpCall
54
59
  | ResponseOutputItem.McpListTools
55
60
  | ResponseOutputItem.McpApprovalRequest
56
- | ResponseCustomToolCall;
61
+ | ResponseOutputItem.McpApprovalResponse
62
+ | ResponseCustomToolCall
63
+ | ResponseCustomToolCallOutputItem;
57
64
 
58
65
  export interface ParsedResponse<ParsedT> extends Response {
59
66
  output: Array<ParsedResponseOutputItem<ParsedT>>;
@@ -99,9 +106,12 @@ export class Responses extends APIResource {
99
106
  options?: RequestOptions,
100
107
  ): APIPromise<Response> | APIPromise<Stream<ResponseStreamEvent>> {
101
108
  return (
102
- this._client.post('/responses', { body, ...options, stream: body.stream ?? false }) as
103
- | APIPromise<Response>
104
- | APIPromise<Stream<ResponseStreamEvent>>
109
+ this._client.post('/responses', {
110
+ body,
111
+ ...options,
112
+ stream: body.stream ?? false,
113
+ __security: { bearerAuth: true },
114
+ }) as APIPromise<Response> | APIPromise<Stream<ResponseStreamEvent>>
105
115
  )._thenUnwrap((rsp) => {
106
116
  if ('object' in rsp && rsp.object === 'response') {
107
117
  addOutputText(rsp as Response);
@@ -146,6 +156,7 @@ export class Responses extends APIResource {
146
156
  query,
147
157
  ...options,
148
158
  stream: query?.stream ?? false,
159
+ __security: { bearerAuth: true },
149
160
  }) as APIPromise<Response> | APIPromise<Stream<ResponseStreamEvent>>
150
161
  )._thenUnwrap((rsp) => {
151
162
  if ('object' in rsp && rsp.object === 'response') {
@@ -170,6 +181,7 @@ export class Responses extends APIResource {
170
181
  return this._client.delete(path`/responses/${responseID}`, {
171
182
  ...options,
172
183
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
184
+ __security: { bearerAuth: true },
173
185
  });
174
186
  }
175
187
 
@@ -205,21 +217,29 @@ export class Responses extends APIResource {
205
217
  * ```
206
218
  */
207
219
  cancel(responseID: string, options?: RequestOptions): APIPromise<Response> {
208
- return this._client.post(path`/responses/${responseID}/cancel`, options);
220
+ return this._client.post(path`/responses/${responseID}/cancel`, {
221
+ ...options,
222
+ __security: { bearerAuth: true },
223
+ });
209
224
  }
210
225
 
211
226
  /**
212
- * Compact conversation
227
+ * Compact a conversation. Returns a compacted response object.
228
+ *
229
+ * Learn when and how to compact long-running conversations in the
230
+ * [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window).
231
+ * For ZDR-compatible compaction details, see
232
+ * [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).
213
233
  *
214
234
  * @example
215
235
  * ```ts
216
236
  * const compactedResponse = await client.responses.compact({
217
- * model: 'gpt-5.2',
237
+ * model: 'gpt-5.4',
218
238
  * });
219
239
  * ```
220
240
  */
221
241
  compact(body: ResponseCompactParams, options?: RequestOptions): APIPromise<CompactedResponse> {
222
- return this._client.post('/responses/compact', { body, ...options });
242
+ return this._client.post('/responses/compact', { body, ...options, __security: { bearerAuth: true } });
223
243
  }
224
244
  }
225
245
 
@@ -264,11 +284,264 @@ export interface CompactedResponse {
264
284
  usage: ResponseUsage;
265
285
  }
266
286
 
287
+ /**
288
+ * A click action.
289
+ */
290
+ export type ComputerAction =
291
+ | ComputerAction.Click
292
+ | ComputerAction.DoubleClick
293
+ | ComputerAction.Drag
294
+ | ComputerAction.Keypress
295
+ | ComputerAction.Move
296
+ | ComputerAction.Screenshot
297
+ | ComputerAction.Scroll
298
+ | ComputerAction.Type
299
+ | ComputerAction.Wait;
300
+
301
+ export namespace ComputerAction {
302
+ /**
303
+ * A click action.
304
+ */
305
+ export interface Click {
306
+ /**
307
+ * Indicates which mouse button was pressed during the click. One of `left`,
308
+ * `right`, `wheel`, `back`, or `forward`.
309
+ */
310
+ button: 'left' | 'right' | 'wheel' | 'back' | 'forward';
311
+
312
+ /**
313
+ * Specifies the event type. For a click action, this property is always `click`.
314
+ */
315
+ type: 'click';
316
+
317
+ /**
318
+ * The x-coordinate where the click occurred.
319
+ */
320
+ x: number;
321
+
322
+ /**
323
+ * The y-coordinate where the click occurred.
324
+ */
325
+ y: number;
326
+
327
+ /**
328
+ * The keys being held while clicking.
329
+ */
330
+ keys?: Array<string> | null;
331
+ }
332
+
333
+ /**
334
+ * A double click action.
335
+ */
336
+ export interface DoubleClick {
337
+ /**
338
+ * The keys being held while double-clicking.
339
+ */
340
+ keys: Array<string> | null;
341
+
342
+ /**
343
+ * Specifies the event type. For a double click action, this property is always set
344
+ * to `double_click`.
345
+ */
346
+ type: 'double_click';
347
+
348
+ /**
349
+ * The x-coordinate where the double click occurred.
350
+ */
351
+ x: number;
352
+
353
+ /**
354
+ * The y-coordinate where the double click occurred.
355
+ */
356
+ y: number;
357
+ }
358
+
359
+ /**
360
+ * A drag action.
361
+ */
362
+ export interface Drag {
363
+ /**
364
+ * An array of coordinates representing the path of the drag action. Coordinates
365
+ * will appear as an array of objects, eg
366
+ *
367
+ * ```
368
+ * [
369
+ * { x: 100, y: 200 },
370
+ * { x: 200, y: 300 }
371
+ * ]
372
+ * ```
373
+ */
374
+ path: Array<Drag.Path>;
375
+
376
+ /**
377
+ * Specifies the event type. For a drag action, this property is always set to
378
+ * `drag`.
379
+ */
380
+ type: 'drag';
381
+
382
+ /**
383
+ * The keys being held while dragging the mouse.
384
+ */
385
+ keys?: Array<string> | null;
386
+ }
387
+
388
+ export namespace Drag {
389
+ /**
390
+ * An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.
391
+ */
392
+ export interface Path {
393
+ /**
394
+ * The x-coordinate.
395
+ */
396
+ x: number;
397
+
398
+ /**
399
+ * The y-coordinate.
400
+ */
401
+ y: number;
402
+ }
403
+ }
404
+
405
+ /**
406
+ * A collection of keypresses the model would like to perform.
407
+ */
408
+ export interface Keypress {
409
+ /**
410
+ * The combination of keys the model is requesting to be pressed. This is an array
411
+ * of strings, each representing a key.
412
+ */
413
+ keys: Array<string>;
414
+
415
+ /**
416
+ * Specifies the event type. For a keypress action, this property is always set to
417
+ * `keypress`.
418
+ */
419
+ type: 'keypress';
420
+ }
421
+
422
+ /**
423
+ * A mouse move action.
424
+ */
425
+ export interface Move {
426
+ /**
427
+ * Specifies the event type. For a move action, this property is always set to
428
+ * `move`.
429
+ */
430
+ type: 'move';
431
+
432
+ /**
433
+ * The x-coordinate to move to.
434
+ */
435
+ x: number;
436
+
437
+ /**
438
+ * The y-coordinate to move to.
439
+ */
440
+ y: number;
441
+
442
+ /**
443
+ * The keys being held while moving the mouse.
444
+ */
445
+ keys?: Array<string> | null;
446
+ }
447
+
448
+ /**
449
+ * A screenshot action.
450
+ */
451
+ export interface Screenshot {
452
+ /**
453
+ * Specifies the event type. For a screenshot action, this property is always set
454
+ * to `screenshot`.
455
+ */
456
+ type: 'screenshot';
457
+ }
458
+
459
+ /**
460
+ * A scroll action.
461
+ */
462
+ export interface Scroll {
463
+ /**
464
+ * The horizontal scroll distance.
465
+ */
466
+ scroll_x: number;
467
+
468
+ /**
469
+ * The vertical scroll distance.
470
+ */
471
+ scroll_y: number;
472
+
473
+ /**
474
+ * Specifies the event type. For a scroll action, this property is always set to
475
+ * `scroll`.
476
+ */
477
+ type: 'scroll';
478
+
479
+ /**
480
+ * The x-coordinate where the scroll occurred.
481
+ */
482
+ x: number;
483
+
484
+ /**
485
+ * The y-coordinate where the scroll occurred.
486
+ */
487
+ y: number;
488
+
489
+ /**
490
+ * The keys being held while scrolling.
491
+ */
492
+ keys?: Array<string> | null;
493
+ }
494
+
495
+ /**
496
+ * An action to type in text.
497
+ */
498
+ export interface Type {
499
+ /**
500
+ * The text to type.
501
+ */
502
+ text: string;
503
+
504
+ /**
505
+ * Specifies the event type. For a type action, this property is always set to
506
+ * `type`.
507
+ */
508
+ type: 'type';
509
+ }
510
+
511
+ /**
512
+ * A wait action.
513
+ */
514
+ export interface Wait {
515
+ /**
516
+ * Specifies the event type. For a wait action, this property is always set to
517
+ * `wait`.
518
+ */
519
+ type: 'wait';
520
+ }
521
+ }
522
+
523
+ /**
524
+ * Flattened batched actions for `computer_use`. Each action includes an `type`
525
+ * discriminator and action-specific fields.
526
+ */
527
+ export type ComputerActionList = Array<ComputerAction>;
528
+
267
529
  /**
268
530
  * A tool that controls a virtual computer. Learn more about the
269
531
  * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
270
532
  */
271
533
  export interface ComputerTool {
534
+ /**
535
+ * The type of the computer tool. Always `computer`.
536
+ */
537
+ type: 'computer';
538
+ }
539
+
540
+ /**
541
+ * A tool that controls a virtual computer. Learn more about the
542
+ * [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
543
+ */
544
+ export interface ComputerUsePreviewTool {
272
545
  /**
273
546
  * The height of the computer display.
274
547
  */
@@ -385,6 +658,11 @@ export interface CustomTool {
385
658
  */
386
659
  type: 'custom';
387
660
 
661
+ /**
662
+ * Whether this tool should be deferred and discovered via tool search.
663
+ */
664
+ defer_loading?: boolean;
665
+
388
666
  /**
389
667
  * Optional description of the custom tool, used to provide more context.
390
668
  */
@@ -416,6 +694,14 @@ export interface EasyInputMessage {
416
694
  */
417
695
  role: 'user' | 'assistant' | 'system' | 'developer';
418
696
 
697
+ /**
698
+ * Labels an `assistant` message as intermediate commentary (`commentary`) or the
699
+ * final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
700
+ * sending follow-up requests, preserve and resend phase on all assistant messages
701
+ * — dropping it can degrade performance. Not used for user messages.
702
+ */
703
+ phase?: 'commentary' | 'final_answer' | null;
704
+
419
705
  /**
420
706
  * The type of the message input. Always `message`.
421
707
  */
@@ -536,6 +822,11 @@ export interface FunctionTool {
536
822
  */
537
823
  type: 'function';
538
824
 
825
+ /**
826
+ * Whether this function is deferred and loaded via tool search.
827
+ */
828
+ defer_loading?: boolean;
829
+
539
830
  /**
540
831
  * A description of the function. Used by the model to determine whether or not to
541
832
  * call the function.
@@ -614,28 +905,72 @@ export interface LocalSkill {
614
905
  path: string;
615
906
  }
616
907
 
617
- export interface Response {
908
+ /**
909
+ * Groups function/custom tools under a shared namespace.
910
+ */
911
+ export interface NamespaceTool {
618
912
  /**
619
- * Unique identifier for this Response.
913
+ * A description of the namespace shown to the model.
620
914
  */
621
- id: string;
915
+ description: string;
622
916
 
623
917
  /**
624
- * Unix timestamp (in seconds) of when this Response was created.
918
+ * The namespace name used in tool calls (for example, `crm`).
625
919
  */
626
- created_at: number;
627
-
628
- output_text: string;
920
+ name: string;
629
921
 
630
922
  /**
631
- * An error object returned when the model fails to generate a Response.
923
+ * The function/custom tools available inside this namespace.
632
924
  */
633
- error: ResponseError | null;
925
+ tools: Array<NamespaceTool.Function | CustomTool>;
634
926
 
635
927
  /**
636
- * Details about why the response is incomplete.
928
+ * The type of the tool. Always `namespace`.
637
929
  */
638
- incomplete_details: Response.IncompleteDetails | null;
930
+ type: 'namespace';
931
+ }
932
+
933
+ export namespace NamespaceTool {
934
+ export interface Function {
935
+ name: string;
936
+
937
+ type: 'function';
938
+
939
+ /**
940
+ * Whether this function should be deferred and discovered via tool search.
941
+ */
942
+ defer_loading?: boolean;
943
+
944
+ description?: string | null;
945
+
946
+ parameters?: unknown | null;
947
+
948
+ strict?: boolean | null;
949
+ }
950
+ }
951
+
952
+ export interface Response {
953
+ /**
954
+ * Unique identifier for this Response.
955
+ */
956
+ id: string;
957
+
958
+ /**
959
+ * Unix timestamp (in seconds) of when this Response was created.
960
+ */
961
+ created_at: number;
962
+
963
+ output_text: string;
964
+
965
+ /**
966
+ * An error object returned when the model fails to generate a Response.
967
+ */
968
+ error: ResponseError | null;
969
+
970
+ /**
971
+ * Details about why the response is incomplete.
972
+ */
973
+ incomplete_details: Response.IncompleteDetails | null;
639
974
 
640
975
  /**
641
976
  * A system (or developer) message inserted into the model's context.
@@ -793,7 +1128,7 @@ export interface Response {
793
1128
  * of 24 hours.
794
1129
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
795
1130
  */
796
- prompt_cache_retention?: 'in-memory' | '24h' | null;
1131
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
797
1132
 
798
1133
  /**
799
1134
  * **gpt-5 and o-series models only**
@@ -806,8 +1141,9 @@ export interface Response {
806
1141
  /**
807
1142
  * A stable identifier used to help detect users of your application that may be
808
1143
  * violating OpenAI's usage policies. The IDs should be a string that uniquely
809
- * identifies each user. We recommend hashing their username or email address, in
810
- * order to avoid sending us any identifying information.
1144
+ * identifies each user, with a maximum length of 64 characters. We recommend
1145
+ * hashing their username or email address, in order to avoid sending us any
1146
+ * identifying information.
811
1147
  * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
812
1148
  */
813
1149
  safety_identifier?: string;
@@ -846,6 +1182,13 @@ export interface Response {
846
1182
  */
847
1183
  text?: ResponseTextConfig;
848
1184
 
1185
+ /**
1186
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
1187
+ * to return at each token position, each with an associated log probability. In
1188
+ * some cases, the number of returned tokens may be fewer than requested.
1189
+ */
1190
+ top_logprobs?: number | null;
1191
+
849
1192
  /**
850
1193
  * The truncation strategy to use for the model response.
851
1194
  *
@@ -1386,20 +1729,6 @@ export interface ResponseComputerToolCall {
1386
1729
  */
1387
1730
  id: string;
1388
1731
 
1389
- /**
1390
- * A click action.
1391
- */
1392
- action:
1393
- | ResponseComputerToolCall.Click
1394
- | ResponseComputerToolCall.DoubleClick
1395
- | ResponseComputerToolCall.Drag
1396
- | ResponseComputerToolCall.Keypress
1397
- | ResponseComputerToolCall.Move
1398
- | ResponseComputerToolCall.Screenshot
1399
- | ResponseComputerToolCall.Scroll
1400
- | ResponseComputerToolCall.Type
1401
- | ResponseComputerToolCall.Wait;
1402
-
1403
1732
  /**
1404
1733
  * An identifier used when responding to the tool call with output.
1405
1734
  */
@@ -1420,9 +1749,49 @@ export interface ResponseComputerToolCall {
1420
1749
  * The type of the computer call. Always `computer_call`.
1421
1750
  */
1422
1751
  type: 'computer_call';
1752
+
1753
+ /**
1754
+ * A click action.
1755
+ */
1756
+ action?:
1757
+ | ResponseComputerToolCall.Click
1758
+ | ResponseComputerToolCall.DoubleClick
1759
+ | ResponseComputerToolCall.Drag
1760
+ | ResponseComputerToolCall.Keypress
1761
+ | ResponseComputerToolCall.Move
1762
+ | ResponseComputerToolCall.Screenshot
1763
+ | ResponseComputerToolCall.Scroll
1764
+ | ResponseComputerToolCall.Type
1765
+ | ResponseComputerToolCall.Wait;
1766
+
1767
+ /**
1768
+ * Flattened batched actions for `computer_use`. Each action includes an `type`
1769
+ * discriminator and action-specific fields.
1770
+ */
1771
+ actions?: ComputerActionList;
1423
1772
  }
1424
1773
 
1425
1774
  export namespace ResponseComputerToolCall {
1775
+ /**
1776
+ * A pending safety check for the computer call.
1777
+ */
1778
+ export interface PendingSafetyCheck {
1779
+ /**
1780
+ * The ID of the pending safety check.
1781
+ */
1782
+ id: string;
1783
+
1784
+ /**
1785
+ * The type of the pending safety check.
1786
+ */
1787
+ code?: string | null;
1788
+
1789
+ /**
1790
+ * Details about the pending safety check.
1791
+ */
1792
+ message?: string | null;
1793
+ }
1794
+
1426
1795
  /**
1427
1796
  * A click action.
1428
1797
  */
@@ -1447,12 +1816,22 @@ export namespace ResponseComputerToolCall {
1447
1816
  * The y-coordinate where the click occurred.
1448
1817
  */
1449
1818
  y: number;
1819
+
1820
+ /**
1821
+ * The keys being held while clicking.
1822
+ */
1823
+ keys?: Array<string> | null;
1450
1824
  }
1451
1825
 
1452
1826
  /**
1453
1827
  * A double click action.
1454
1828
  */
1455
1829
  export interface DoubleClick {
1830
+ /**
1831
+ * The keys being held while double-clicking.
1832
+ */
1833
+ keys: Array<string> | null;
1834
+
1456
1835
  /**
1457
1836
  * Specifies the event type. For a double click action, this property is always set
1458
1837
  * to `double_click`.
@@ -1492,6 +1871,11 @@ export namespace ResponseComputerToolCall {
1492
1871
  * `drag`.
1493
1872
  */
1494
1873
  type: 'drag';
1874
+
1875
+ /**
1876
+ * The keys being held while dragging the mouse.
1877
+ */
1878
+ keys?: Array<string> | null;
1495
1879
  }
1496
1880
 
1497
1881
  export namespace Drag {
@@ -1547,6 +1931,11 @@ export namespace ResponseComputerToolCall {
1547
1931
  * The y-coordinate to move to.
1548
1932
  */
1549
1933
  y: number;
1934
+
1935
+ /**
1936
+ * The keys being held while moving the mouse.
1937
+ */
1938
+ keys?: Array<string> | null;
1550
1939
  }
1551
1940
 
1552
1941
  /**
@@ -1589,6 +1978,11 @@ export namespace ResponseComputerToolCall {
1589
1978
  * The y-coordinate where the scroll occurred.
1590
1979
  */
1591
1980
  y: number;
1981
+
1982
+ /**
1983
+ * The keys being held while scrolling.
1984
+ */
1985
+ keys?: Array<string> | null;
1592
1986
  }
1593
1987
 
1594
1988
  /**
@@ -1617,26 +2011,6 @@ export namespace ResponseComputerToolCall {
1617
2011
  */
1618
2012
  type: 'wait';
1619
2013
  }
1620
-
1621
- /**
1622
- * A pending safety check for the computer call.
1623
- */
1624
- export interface PendingSafetyCheck {
1625
- /**
1626
- * The ID of the pending safety check.
1627
- */
1628
- id: string;
1629
-
1630
- /**
1631
- * The type of the pending safety check.
1632
- */
1633
- code?: string | null;
1634
-
1635
- /**
1636
- * Details about the pending safety check.
1637
- */
1638
- message?: string | null;
1639
- }
1640
2014
  }
1641
2015
 
1642
2016
  export interface ResponseComputerToolCallOutputItem {
@@ -1655,6 +2029,12 @@ export interface ResponseComputerToolCallOutputItem {
1655
2029
  */
1656
2030
  output: ResponseComputerToolCallOutputScreenshot;
1657
2031
 
2032
+ /**
2033
+ * The status of the message input. One of `in_progress`, `completed`, or
2034
+ * `incomplete`. Populated when input items are returned via API.
2035
+ */
2036
+ status: 'completed' | 'incomplete' | 'failed' | 'in_progress';
2037
+
1658
2038
  /**
1659
2039
  * The type of the computer tool call output. Always `computer_call_output`.
1660
2040
  */
@@ -1667,10 +2047,9 @@ export interface ResponseComputerToolCallOutputItem {
1667
2047
  acknowledged_safety_checks?: Array<ResponseComputerToolCallOutputItem.AcknowledgedSafetyCheck>;
1668
2048
 
1669
2049
  /**
1670
- * The status of the message input. One of `in_progress`, `completed`, or
1671
- * `incomplete`. Populated when input items are returned via API.
2050
+ * The identifier of the actor that created the item.
1672
2051
  */
1673
- status?: 'in_progress' | 'completed' | 'incomplete';
2052
+ created_by?: string;
1674
2053
  }
1675
2054
 
1676
2055
  export namespace ResponseComputerToolCallOutputItem {
@@ -1918,6 +2297,11 @@ export interface ResponseCustomToolCall {
1918
2297
  * The unique ID of the custom tool call in the OpenAI platform.
1919
2298
  */
1920
2299
  id?: string;
2300
+
2301
+ /**
2302
+ * The namespace of the custom tool being called.
2303
+ */
2304
+ namespace?: string;
1921
2305
  }
1922
2306
 
1923
2307
  /**
@@ -1980,6 +2364,27 @@ export interface ResponseCustomToolCallInputDoneEvent {
1980
2364
  type: 'response.custom_tool_call_input.done';
1981
2365
  }
1982
2366
 
2367
+ /**
2368
+ * A call to a custom tool created by the model.
2369
+ */
2370
+ export interface ResponseCustomToolCallItem extends ResponseCustomToolCall {
2371
+ /**
2372
+ * The unique ID of the custom tool call item.
2373
+ */
2374
+ id: string;
2375
+
2376
+ /**
2377
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2378
+ * Populated when items are returned via API.
2379
+ */
2380
+ status: 'in_progress' | 'completed' | 'incomplete';
2381
+
2382
+ /**
2383
+ * The identifier of the actor that created the item.
2384
+ */
2385
+ created_by?: string;
2386
+ }
2387
+
1983
2388
  /**
1984
2389
  * The output of a custom tool call from your code, being sent back to the model.
1985
2390
  */
@@ -2006,6 +2411,27 @@ export interface ResponseCustomToolCallOutput {
2006
2411
  id?: string;
2007
2412
  }
2008
2413
 
2414
+ /**
2415
+ * The output of a custom tool call from your code, being sent back to the model.
2416
+ */
2417
+ export interface ResponseCustomToolCallOutputItem extends ResponseCustomToolCallOutput {
2418
+ /**
2419
+ * The unique ID of the custom tool call output item.
2420
+ */
2421
+ id: string;
2422
+
2423
+ /**
2424
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2425
+ * Populated when items are returned via API.
2426
+ */
2427
+ status: 'in_progress' | 'completed' | 'incomplete';
2428
+
2429
+ /**
2430
+ * The identifier of the actor that created the item.
2431
+ */
2432
+ created_by?: string;
2433
+ }
2434
+
2009
2435
  /**
2010
2436
  * An error object returned when the model fails to generate a Response.
2011
2437
  */
@@ -2601,6 +3027,11 @@ export interface ResponseFunctionToolCall {
2601
3027
  */
2602
3028
  id?: string;
2603
3029
 
3030
+ /**
3031
+ * The namespace of the function to run.
3032
+ */
3033
+ namespace?: string;
3034
+
2604
3035
  /**
2605
3036
  * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2606
3037
  * Populated when items are returned via API.
@@ -2618,6 +3049,17 @@ export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
2618
3049
  * The unique ID of the function tool call.
2619
3050
  */
2620
3051
  id: string;
3052
+
3053
+ /**
3054
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3055
+ * Populated when items are returned via API.
3056
+ */
3057
+ status: 'in_progress' | 'completed' | 'incomplete';
3058
+
3059
+ /**
3060
+ * The identifier of the actor that created the item.
3061
+ */
3062
+ created_by?: string;
2621
3063
  }
2622
3064
 
2623
3065
  export interface ResponseFunctionToolCallOutputItem {
@@ -2637,16 +3079,21 @@ export interface ResponseFunctionToolCallOutputItem {
2637
3079
  */
2638
3080
  output: string | Array<ResponseInputText | ResponseInputImage | ResponseInputFile>;
2639
3081
 
3082
+ /**
3083
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
3084
+ * Populated when items are returned via API.
3085
+ */
3086
+ status: 'in_progress' | 'completed' | 'incomplete';
3087
+
2640
3088
  /**
2641
3089
  * The type of the function tool call output. Always `function_call_output`.
2642
3090
  */
2643
3091
  type: 'function_call_output';
2644
3092
 
2645
3093
  /**
2646
- * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2647
- * Populated when items are returned via API.
3094
+ * The identifier of the actor that created the item.
2648
3095
  */
2649
- status?: 'in_progress' | 'completed' | 'incomplete';
3096
+ created_by?: string;
2650
3097
  }
2651
3098
 
2652
3099
  /**
@@ -2896,6 +3343,8 @@ export interface ResponseInProgressEvent {
2896
3343
  * Specify additional output data to include in the model response. Currently
2897
3344
  * supported values are:
2898
3345
  *
3346
+ * - `web_search_call.results`: Include the search results of the web search tool
3347
+ * call.
2899
3348
  * - `web_search_call.action.sources`: Include the sources of the web search tool
2900
3349
  * call.
2901
3350
  * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
@@ -2991,6 +3440,13 @@ export interface ResponseInputFile {
2991
3440
  */
2992
3441
  type: 'input_file';
2993
3442
 
3443
+ /**
3444
+ * The detail level of the file to be sent to the model. Use `low` for the default
3445
+ * rendering behavior, or `high` to render the file at higher quality. Defaults to
3446
+ * `low`.
3447
+ */
3448
+ detail?: 'low' | 'high';
3449
+
2994
3450
  /**
2995
3451
  * The content of the file to be sent to the model.
2996
3452
  */
@@ -3021,6 +3477,13 @@ export interface ResponseInputFileContent {
3021
3477
  */
3022
3478
  type: 'input_file';
3023
3479
 
3480
+ /**
3481
+ * The detail level of the file to be sent to the model. Use `low` for the default
3482
+ * rendering behavior, or `high` to render the file at higher quality. Defaults to
3483
+ * `low`.
3484
+ */
3485
+ detail?: 'low' | 'high';
3486
+
3024
3487
  /**
3025
3488
  * The base64-encoded data of the file to be sent to the model.
3026
3489
  */
@@ -3048,10 +3511,10 @@ export interface ResponseInputFileContent {
3048
3511
  */
3049
3512
  export interface ResponseInputImage {
3050
3513
  /**
3051
- * The detail level of the image to be sent to the model. One of `high`, `low`, or
3052
- * `auto`. Defaults to `auto`.
3514
+ * The detail level of the image to be sent to the model. One of `high`, `low`,
3515
+ * `auto`, or `original`. Defaults to `auto`.
3053
3516
  */
3054
- detail: 'low' | 'high' | 'auto';
3517
+ detail: 'low' | 'high' | 'auto' | 'original';
3055
3518
 
3056
3519
  /**
3057
3520
  * The type of the input item. Always `input_image`.
@@ -3081,10 +3544,10 @@ export interface ResponseInputImageContent {
3081
3544
  type: 'input_image';
3082
3545
 
3083
3546
  /**
3084
- * The detail level of the image to be sent to the model. One of `high`, `low`, or
3085
- * `auto`. Defaults to `auto`.
3547
+ * The detail level of the image to be sent to the model. One of `high`, `low`,
3548
+ * `auto`, or `original`. Defaults to `auto`.
3086
3549
  */
3087
- detail?: 'low' | 'high' | 'auto' | null;
3550
+ detail?: 'low' | 'high' | 'auto' | 'original' | null;
3088
3551
 
3089
3552
  /**
3090
3553
  * The ID of the file to be sent to the model.
@@ -3115,6 +3578,8 @@ export type ResponseInputItem =
3115
3578
  | ResponseFunctionWebSearch
3116
3579
  | ResponseFunctionToolCall
3117
3580
  | ResponseInputItem.FunctionCallOutput
3581
+ | ResponseInputItem.ToolSearchCall
3582
+ | ResponseToolSearchOutputItemParam
3118
3583
  | ResponseReasoningItem
3119
3584
  | ResponseCompactionItemParam
3120
3585
  | ResponseInputItem.ImageGenerationCall
@@ -3131,6 +3596,7 @@ export type ResponseInputItem =
3131
3596
  | ResponseInputItem.McpCall
3132
3597
  | ResponseCustomToolCallOutput
3133
3598
  | ResponseCustomToolCall
3599
+ | ResponseInputItem.CompactionTrigger
3134
3600
  | ResponseInputItem.ItemReference;
3135
3601
 
3136
3602
  export namespace ResponseInputItem {
@@ -3254,6 +3720,38 @@ export namespace ResponseInputItem {
3254
3720
  status?: 'in_progress' | 'completed' | 'incomplete' | null;
3255
3721
  }
3256
3722
 
3723
+ export interface ToolSearchCall {
3724
+ /**
3725
+ * The arguments supplied to the tool search call.
3726
+ */
3727
+ arguments: unknown;
3728
+
3729
+ /**
3730
+ * The item type. Always `tool_search_call`.
3731
+ */
3732
+ type: 'tool_search_call';
3733
+
3734
+ /**
3735
+ * The unique ID of this tool search call.
3736
+ */
3737
+ id?: string | null;
3738
+
3739
+ /**
3740
+ * The unique ID of the tool search call generated by the model.
3741
+ */
3742
+ call_id?: string | null;
3743
+
3744
+ /**
3745
+ * Whether tool search was executed by the server or by the client.
3746
+ */
3747
+ execution?: 'server' | 'client';
3748
+
3749
+ /**
3750
+ * The status of the tool search call.
3751
+ */
3752
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
3753
+ }
3754
+
3257
3755
  /**
3258
3756
  * An image generation request made by the model.
3259
3757
  */
@@ -3761,6 +4259,16 @@ export namespace ResponseInputItem {
3761
4259
  status?: 'in_progress' | 'completed' | 'incomplete' | 'calling' | 'failed';
3762
4260
  }
3763
4261
 
4262
+ /**
4263
+ * Compacts the current context. Must be the final input item.
4264
+ */
4265
+ export interface CompactionTrigger {
4266
+ /**
4267
+ * The type of the item. Always `compaction_trigger`.
4268
+ */
4269
+ type: 'compaction_trigger';
4270
+ }
4271
+
3764
4272
  /**
3765
4273
  * An internal identifier for an item to reference.
3766
4274
  */
@@ -3801,15 +4309,15 @@ export interface ResponseInputMessageItem {
3801
4309
  role: 'user' | 'system' | 'developer';
3802
4310
 
3803
4311
  /**
3804
- * The status of item. One of `in_progress`, `completed`, or `incomplete`.
3805
- * Populated when items are returned via API.
4312
+ * The type of the message input. Always set to `message`.
3806
4313
  */
3807
- status?: 'in_progress' | 'completed' | 'incomplete';
4314
+ type: 'message';
3808
4315
 
3809
4316
  /**
3810
- * The type of the message input. Always set to `message`.
4317
+ * The status of item. One of `in_progress`, `completed`, or `incomplete`.
4318
+ * Populated when items are returned via API.
3811
4319
  */
3812
- type?: 'message';
4320
+ status?: 'in_progress' | 'completed' | 'incomplete';
3813
4321
  }
3814
4322
 
3815
4323
  /**
@@ -3854,6 +4362,10 @@ export type ResponseItem =
3854
4362
  | ResponseFunctionWebSearch
3855
4363
  | ResponseFunctionToolCallItem
3856
4364
  | ResponseFunctionToolCallOutputItem
4365
+ | ResponseToolSearchCall
4366
+ | ResponseToolSearchOutputItem
4367
+ | ResponseReasoningItem
4368
+ | ResponseCompactionItem
3857
4369
  | ResponseItem.ImageGenerationCall
3858
4370
  | ResponseCodeInterpreterToolCall
3859
4371
  | ResponseItem.LocalShellCall
@@ -3865,7 +4377,9 @@ export type ResponseItem =
3865
4377
  | ResponseItem.McpListTools
3866
4378
  | ResponseItem.McpApprovalRequest
3867
4379
  | ResponseItem.McpApprovalResponse
3868
- | ResponseItem.McpCall;
4380
+ | ResponseItem.McpCall
4381
+ | ResponseCustomToolCallItem
4382
+ | ResponseCustomToolCallOutputItem;
3869
4383
 
3870
4384
  export namespace ResponseItem {
3871
4385
  /**
@@ -4406,13 +4920,18 @@ export type ResponseOutputItem =
4406
4920
  | ResponseOutputMessage
4407
4921
  | ResponseFileSearchToolCall
4408
4922
  | ResponseFunctionToolCall
4923
+ | ResponseFunctionToolCallOutputItem
4409
4924
  | ResponseFunctionWebSearch
4410
4925
  | ResponseComputerToolCall
4926
+ | ResponseComputerToolCallOutputItem
4411
4927
  | ResponseReasoningItem
4928
+ | ResponseToolSearchCall
4929
+ | ResponseToolSearchOutputItem
4412
4930
  | ResponseCompactionItem
4413
4931
  | ResponseOutputItem.ImageGenerationCall
4414
4932
  | ResponseCodeInterpreterToolCall
4415
4933
  | ResponseOutputItem.LocalShellCall
4934
+ | ResponseOutputItem.LocalShellCallOutput
4416
4935
  | ResponseFunctionShellToolCall
4417
4936
  | ResponseFunctionShellToolCallOutput
4418
4937
  | ResponseApplyPatchToolCall
@@ -4420,7 +4939,9 @@ export type ResponseOutputItem =
4420
4939
  | ResponseOutputItem.McpCall
4421
4940
  | ResponseOutputItem.McpListTools
4422
4941
  | ResponseOutputItem.McpApprovalRequest
4423
- | ResponseCustomToolCall;
4942
+ | ResponseOutputItem.McpApprovalResponse
4943
+ | ResponseCustomToolCall
4944
+ | ResponseCustomToolCallOutputItem;
4424
4945
 
4425
4946
  export namespace ResponseOutputItem {
4426
4947
  /**
@@ -4516,16 +5037,41 @@ export namespace ResponseOutputItem {
4516
5037
  }
4517
5038
 
4518
5039
  /**
4519
- * An invocation of a tool on an MCP server.
5040
+ * The output of a local shell tool call.
4520
5041
  */
4521
- export interface McpCall {
5042
+ export interface LocalShellCallOutput {
4522
5043
  /**
4523
- * The unique ID of the tool call.
5044
+ * The unique ID of the local shell tool call generated by the model.
4524
5045
  */
4525
5046
  id: string;
4526
5047
 
4527
5048
  /**
4528
- * A JSON string of the arguments passed to the tool.
5049
+ * A JSON string of the output of the local shell tool call.
5050
+ */
5051
+ output: string;
5052
+
5053
+ /**
5054
+ * The type of the local shell tool call output. Always `local_shell_call_output`.
5055
+ */
5056
+ type: 'local_shell_call_output';
5057
+
5058
+ /**
5059
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
5060
+ */
5061
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
5062
+ }
5063
+
5064
+ /**
5065
+ * An invocation of a tool on an MCP server.
5066
+ */
5067
+ export interface McpCall {
5068
+ /**
5069
+ * The unique ID of the tool call.
5070
+ */
5071
+ id: string;
5072
+
5073
+ /**
5074
+ * A JSON string of the arguments passed to the tool.
4529
5075
  */
4530
5076
  arguments: string;
4531
5077
 
@@ -4654,6 +5200,36 @@ export namespace ResponseOutputItem {
4654
5200
  */
4655
5201
  type: 'mcp_approval_request';
4656
5202
  }
5203
+
5204
+ /**
5205
+ * A response to an MCP approval request.
5206
+ */
5207
+ export interface McpApprovalResponse {
5208
+ /**
5209
+ * The unique ID of the approval response
5210
+ */
5211
+ id: string;
5212
+
5213
+ /**
5214
+ * The ID of the approval request being answered.
5215
+ */
5216
+ approval_request_id: string;
5217
+
5218
+ /**
5219
+ * Whether the request was approved.
5220
+ */
5221
+ approve: boolean;
5222
+
5223
+ /**
5224
+ * The type of the item. Always `mcp_approval_response`.
5225
+ */
5226
+ type: 'mcp_approval_response';
5227
+
5228
+ /**
5229
+ * Optional reason for the decision.
5230
+ */
5231
+ reason?: string | null;
5232
+ }
4657
5233
  }
4658
5234
 
4659
5235
  /**
@@ -4735,6 +5311,14 @@ export interface ResponseOutputMessage {
4735
5311
  * The type of the output message. Always `message`.
4736
5312
  */
4737
5313
  type: 'message';
5314
+
5315
+ /**
5316
+ * Labels an `assistant` message as intermediate commentary (`commentary`) or the
5317
+ * final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
5318
+ * sending follow-up requests, preserve and resend phase on all assistant messages
5319
+ * — dropping it can degrade performance. Not used for user messages.
5320
+ */
5321
+ phase?: 'commentary' | 'final_answer' | null;
4738
5322
  }
4739
5323
 
4740
5324
  /**
@@ -5541,7 +6125,7 @@ export namespace ResponseTextDeltaEvent {
5541
6125
  logprob: number;
5542
6126
 
5543
6127
  /**
5544
- * The log probability of the top 20 most likely tokens.
6128
+ * The log probabilities of up to 20 of the most likely tokens.
5545
6129
  */
5546
6130
  top_logprobs?: Array<Logprob.TopLogprob>;
5547
6131
  }
@@ -5619,7 +6203,7 @@ export namespace ResponseTextDoneEvent {
5619
6203
  logprob: number;
5620
6204
 
5621
6205
  /**
5622
- * The log probability of the top 20 most likely tokens.
6206
+ * The log probabilities of up to 20 of the most likely tokens.
5623
6207
  */
5624
6208
  top_logprobs?: Array<Logprob.TopLogprob>;
5625
6209
  }
@@ -5639,6 +6223,112 @@ export namespace ResponseTextDoneEvent {
5639
6223
  }
5640
6224
  }
5641
6225
 
6226
+ export interface ResponseToolSearchCall {
6227
+ /**
6228
+ * The unique ID of the tool search call item.
6229
+ */
6230
+ id: string;
6231
+
6232
+ /**
6233
+ * Arguments used for the tool search call.
6234
+ */
6235
+ arguments: unknown;
6236
+
6237
+ /**
6238
+ * The unique ID of the tool search call generated by the model.
6239
+ */
6240
+ call_id: string | null;
6241
+
6242
+ /**
6243
+ * Whether tool search was executed by the server or by the client.
6244
+ */
6245
+ execution: 'server' | 'client';
6246
+
6247
+ /**
6248
+ * The status of the tool search call item that was recorded.
6249
+ */
6250
+ status: 'in_progress' | 'completed' | 'incomplete';
6251
+
6252
+ /**
6253
+ * The type of the item. Always `tool_search_call`.
6254
+ */
6255
+ type: 'tool_search_call';
6256
+
6257
+ /**
6258
+ * The identifier of the actor that created the item.
6259
+ */
6260
+ created_by?: string;
6261
+ }
6262
+
6263
+ export interface ResponseToolSearchOutputItem {
6264
+ /**
6265
+ * The unique ID of the tool search output item.
6266
+ */
6267
+ id: string;
6268
+
6269
+ /**
6270
+ * The unique ID of the tool search call generated by the model.
6271
+ */
6272
+ call_id: string | null;
6273
+
6274
+ /**
6275
+ * Whether tool search was executed by the server or by the client.
6276
+ */
6277
+ execution: 'server' | 'client';
6278
+
6279
+ /**
6280
+ * The status of the tool search output item that was recorded.
6281
+ */
6282
+ status: 'in_progress' | 'completed' | 'incomplete';
6283
+
6284
+ /**
6285
+ * The loaded tool definitions returned by tool search.
6286
+ */
6287
+ tools: Array<Tool>;
6288
+
6289
+ /**
6290
+ * The type of the item. Always `tool_search_output`.
6291
+ */
6292
+ type: 'tool_search_output';
6293
+
6294
+ /**
6295
+ * The identifier of the actor that created the item.
6296
+ */
6297
+ created_by?: string;
6298
+ }
6299
+
6300
+ export interface ResponseToolSearchOutputItemParam {
6301
+ /**
6302
+ * The loaded tool definitions returned by the tool search output.
6303
+ */
6304
+ tools: Array<Tool>;
6305
+
6306
+ /**
6307
+ * The item type. Always `tool_search_output`.
6308
+ */
6309
+ type: 'tool_search_output';
6310
+
6311
+ /**
6312
+ * The unique ID of this tool search output.
6313
+ */
6314
+ id?: string | null;
6315
+
6316
+ /**
6317
+ * The unique ID of the tool search call generated by the model.
6318
+ */
6319
+ call_id?: string | null;
6320
+
6321
+ /**
6322
+ * Whether tool search was executed by the server or by the client.
6323
+ */
6324
+ execution?: 'server' | 'client';
6325
+
6326
+ /**
6327
+ * The status of the tool search output.
6328
+ */
6329
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
6330
+ }
6331
+
5642
6332
  /**
5643
6333
  * Represents token usage details including input tokens, output tokens, a
5644
6334
  * breakdown of output tokens, and the total tokens used.
@@ -5674,100 +6364,475 @@ export namespace ResponseUsage {
5674
6364
  /**
5675
6365
  * A detailed breakdown of the input tokens.
5676
6366
  */
5677
- export interface InputTokensDetails {
5678
- /**
5679
- * The number of tokens that were retrieved from the cache.
5680
- * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
5681
- */
5682
- cached_tokens: number;
5683
- }
6367
+ export interface InputTokensDetails {
6368
+ /**
6369
+ * The number of tokens that were retrieved from the cache.
6370
+ * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
6371
+ */
6372
+ cached_tokens: number;
6373
+ }
6374
+
6375
+ /**
6376
+ * A detailed breakdown of the output tokens.
6377
+ */
6378
+ export interface OutputTokensDetails {
6379
+ /**
6380
+ * The number of reasoning tokens.
6381
+ */
6382
+ reasoning_tokens: number;
6383
+ }
6384
+ }
6385
+
6386
+ /**
6387
+ * Emitted when a web search call is completed.
6388
+ */
6389
+ export interface ResponseWebSearchCallCompletedEvent {
6390
+ /**
6391
+ * Unique ID for the output item associated with the web search call.
6392
+ */
6393
+ item_id: string;
6394
+
6395
+ /**
6396
+ * The index of the output item that the web search call is associated with.
6397
+ */
6398
+ output_index: number;
6399
+
6400
+ /**
6401
+ * The sequence number of the web search call being processed.
6402
+ */
6403
+ sequence_number: number;
6404
+
6405
+ /**
6406
+ * The type of the event. Always `response.web_search_call.completed`.
6407
+ */
6408
+ type: 'response.web_search_call.completed';
6409
+ }
6410
+
6411
+ /**
6412
+ * Emitted when a web search call is initiated.
6413
+ */
6414
+ export interface ResponseWebSearchCallInProgressEvent {
6415
+ /**
6416
+ * Unique ID for the output item associated with the web search call.
6417
+ */
6418
+ item_id: string;
6419
+
6420
+ /**
6421
+ * The index of the output item that the web search call is associated with.
6422
+ */
6423
+ output_index: number;
6424
+
6425
+ /**
6426
+ * The sequence number of the web search call being processed.
6427
+ */
6428
+ sequence_number: number;
6429
+
6430
+ /**
6431
+ * The type of the event. Always `response.web_search_call.in_progress`.
6432
+ */
6433
+ type: 'response.web_search_call.in_progress';
6434
+ }
6435
+
6436
+ /**
6437
+ * Emitted when a web search call is executing.
6438
+ */
6439
+ export interface ResponseWebSearchCallSearchingEvent {
6440
+ /**
6441
+ * Unique ID for the output item associated with the web search call.
6442
+ */
6443
+ item_id: string;
6444
+
6445
+ /**
6446
+ * The index of the output item that the web search call is associated with.
6447
+ */
6448
+ output_index: number;
6449
+
6450
+ /**
6451
+ * The sequence number of the web search call being processed.
6452
+ */
6453
+ sequence_number: number;
6454
+
6455
+ /**
6456
+ * The type of the event. Always `response.web_search_call.searching`.
6457
+ */
6458
+ type: 'response.web_search_call.searching';
6459
+ }
6460
+
6461
+ export interface ResponsesClientEvent {
6462
+ /**
6463
+ * The type of the client event. Always `response.create`.
6464
+ */
6465
+ type: 'response.create';
6466
+
6467
+ /**
6468
+ * Whether to run the model response in the background.
6469
+ * [Learn more](https://platform.openai.com/docs/guides/background).
6470
+ */
6471
+ background?: boolean | null;
6472
+
6473
+ /**
6474
+ * Context management configuration for this request.
6475
+ */
6476
+ context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
6477
+
6478
+ /**
6479
+ * The conversation that this response belongs to. Items from this conversation are
6480
+ * prepended to `input_items` for this response request. Input items and output
6481
+ * items from this response are automatically added to this conversation after this
6482
+ * response completes.
6483
+ */
6484
+ conversation?: string | ResponseConversationParam | null;
6485
+
6486
+ /**
6487
+ * Specify additional output data to include in the model response. Currently
6488
+ * supported values are:
6489
+ *
6490
+ * - `web_search_call.action.sources`: Include the sources of the web search tool
6491
+ * call.
6492
+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
6493
+ * in code interpreter tool call items.
6494
+ * - `computer_call_output.output.image_url`: Include image urls from the computer
6495
+ * call output.
6496
+ * - `file_search_call.results`: Include the search results of the file search tool
6497
+ * call.
6498
+ * - `message.input_image.image_url`: Include image urls from the input message.
6499
+ * - `message.output_text.logprobs`: Include logprobs with assistant messages.
6500
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
6501
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
6502
+ * multi-turn conversations when using the Responses API statelessly (like when
6503
+ * the `store` parameter is set to `false`, or when an organization is enrolled
6504
+ * in the zero data retention program).
6505
+ */
6506
+ include?: Array<ResponseIncludable> | null;
6507
+
6508
+ /**
6509
+ * Text, image, or file inputs to the model, used to generate a response.
6510
+ *
6511
+ * Learn more:
6512
+ *
6513
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6514
+ * - [Image inputs](https://platform.openai.com/docs/guides/images)
6515
+ * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
6516
+ * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
6517
+ * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
6518
+ */
6519
+ input?: string | ResponseInput;
6520
+
6521
+ /**
6522
+ * A system (or developer) message inserted into the model's context.
6523
+ *
6524
+ * When using along with `previous_response_id`, the instructions from a previous
6525
+ * response will not be carried over to the next response. This makes it simple to
6526
+ * swap out system (or developer) messages in new responses.
6527
+ */
6528
+ instructions?: string | null;
6529
+
6530
+ /**
6531
+ * An upper bound for the number of tokens that can be generated for a response,
6532
+ * including visible output tokens and
6533
+ * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
6534
+ */
6535
+ max_output_tokens?: number | null;
6536
+
6537
+ /**
6538
+ * The maximum number of total calls to built-in tools that can be processed in a
6539
+ * response. This maximum number applies across all built-in tool calls, not per
6540
+ * individual tool. Any further attempts to call a tool by the model will be
6541
+ * ignored.
6542
+ */
6543
+ max_tool_calls?: number | null;
6544
+
6545
+ /**
6546
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
6547
+ * for storing additional information about the object in a structured format, and
6548
+ * querying for objects via API or the dashboard.
6549
+ *
6550
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
6551
+ * a maximum length of 512 characters.
6552
+ */
6553
+ metadata?: Shared.Metadata | null;
6554
+
6555
+ /**
6556
+ * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
6557
+ * wide range of models with different capabilities, performance characteristics,
6558
+ * and price points. Refer to the
6559
+ * [model guide](https://platform.openai.com/docs/models) to browse and compare
6560
+ * available models.
6561
+ */
6562
+ model?: Shared.ResponsesModel;
6563
+
6564
+ /**
6565
+ * Whether to allow the model to run tool calls in parallel.
6566
+ */
6567
+ parallel_tool_calls?: boolean | null;
6568
+
6569
+ /**
6570
+ * The unique ID of the previous response to the model. Use this to create
6571
+ * multi-turn conversations. Learn more about
6572
+ * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
6573
+ * Cannot be used in conjunction with `conversation`.
6574
+ */
6575
+ previous_response_id?: string | null;
6576
+
6577
+ /**
6578
+ * Reference to a prompt template and its variables.
6579
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
6580
+ */
6581
+ prompt?: ResponsePrompt | null;
6582
+
6583
+ /**
6584
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
6585
+ * hit rates. Replaces the `user` field.
6586
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
6587
+ */
6588
+ prompt_cache_key?: string;
6589
+
6590
+ /**
6591
+ * The retention policy for the prompt cache. Set to `24h` to enable extended
6592
+ * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6593
+ * of 24 hours.
6594
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6595
+ */
6596
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
6597
+
6598
+ /**
6599
+ * **gpt-5 and o-series models only**
6600
+ *
6601
+ * Configuration options for
6602
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
6603
+ */
6604
+ reasoning?: Shared.Reasoning | null;
6605
+
6606
+ /**
6607
+ * A stable identifier used to help detect users of your application that may be
6608
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
6609
+ * identifies each user, with a maximum length of 64 characters. We recommend
6610
+ * hashing their username or email address, in order to avoid sending us any
6611
+ * identifying information.
6612
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
6613
+ */
6614
+ safety_identifier?: string;
5684
6615
 
5685
6616
  /**
5686
- * A detailed breakdown of the output tokens.
6617
+ * Specifies the processing type used for serving the request.
6618
+ *
6619
+ * - If set to 'auto', then the request will be processed with the service tier
6620
+ * configured in the Project settings. Unless otherwise configured, the Project
6621
+ * will use 'default'.
6622
+ * - If set to 'default', then the request will be processed with the standard
6623
+ * pricing and performance for the selected model.
6624
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
6625
+ * '[priority](https://openai.com/api-priority-processing/)', then the request
6626
+ * will be processed with the corresponding service tier.
6627
+ * - When not set, the default behavior is 'auto'.
6628
+ *
6629
+ * When the `service_tier` parameter is set, the response body will include the
6630
+ * `service_tier` value based on the processing mode actually used to serve the
6631
+ * request. This response value may be different from the value set in the
6632
+ * parameter.
5687
6633
  */
5688
- export interface OutputTokensDetails {
5689
- /**
5690
- * The number of reasoning tokens.
5691
- */
5692
- reasoning_tokens: number;
5693
- }
5694
- }
6634
+ service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
5695
6635
 
5696
- /**
5697
- * Emitted when a web search call is completed.
5698
- */
5699
- export interface ResponseWebSearchCallCompletedEvent {
5700
6636
  /**
5701
- * Unique ID for the output item associated with the web search call.
6637
+ * Whether to store the generated model response for later retrieval via API.
5702
6638
  */
5703
- item_id: string;
6639
+ store?: boolean | null;
5704
6640
 
5705
6641
  /**
5706
- * The index of the output item that the web search call is associated with.
6642
+ * If set to true, the model response data will be streamed to the client as it is
6643
+ * generated using
6644
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
6645
+ * See the
6646
+ * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
6647
+ * for more information.
5707
6648
  */
5708
- output_index: number;
6649
+ stream?: boolean | null;
5709
6650
 
5710
6651
  /**
5711
- * The sequence number of the web search call being processed.
6652
+ * Options for streaming responses. Only set this when you set `stream: true`.
5712
6653
  */
5713
- sequence_number: number;
6654
+ stream_options?: ResponsesClientEvent.StreamOptions | null;
5714
6655
 
5715
6656
  /**
5716
- * The type of the event. Always `response.web_search_call.completed`.
6657
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
6658
+ * make the output more random, while lower values like 0.2 will make it more
6659
+ * focused and deterministic. We generally recommend altering this or `top_p` but
6660
+ * not both.
5717
6661
  */
5718
- type: 'response.web_search_call.completed';
5719
- }
6662
+ temperature?: number | null;
5720
6663
 
5721
- /**
5722
- * Emitted when a web search call is initiated.
5723
- */
5724
- export interface ResponseWebSearchCallInProgressEvent {
5725
6664
  /**
5726
- * Unique ID for the output item associated with the web search call.
6665
+ * Configuration options for a text response from the model. Can be plain text or
6666
+ * structured JSON data. Learn more:
6667
+ *
6668
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6669
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
5727
6670
  */
5728
- item_id: string;
6671
+ text?: ResponseTextConfig;
5729
6672
 
5730
6673
  /**
5731
- * The index of the output item that the web search call is associated with.
6674
+ * How the model should select which tool (or tools) to use when generating a
6675
+ * response. See the `tools` parameter to see how to specify which tools the model
6676
+ * can call.
5732
6677
  */
5733
- output_index: number;
6678
+ tool_choice?:
6679
+ | ToolChoiceOptions
6680
+ | ToolChoiceAllowed
6681
+ | ToolChoiceTypes
6682
+ | ToolChoiceFunction
6683
+ | ToolChoiceMcp
6684
+ | ToolChoiceCustom
6685
+ | ToolChoiceApplyPatch
6686
+ | ToolChoiceShell;
5734
6687
 
5735
6688
  /**
5736
- * The sequence number of the web search call being processed.
6689
+ * An array of tools the model may call while generating a response. You can
6690
+ * specify which tool to use by setting the `tool_choice` parameter.
6691
+ *
6692
+ * We support the following categories of tools:
6693
+ *
6694
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
6695
+ * capabilities, like
6696
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
6697
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
6698
+ * Learn more about
6699
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
6700
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
6701
+ * predefined connectors such as Google Drive and SharePoint. Learn more about
6702
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
6703
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
6704
+ * the model to call your own code with strongly typed arguments and outputs.
6705
+ * Learn more about
6706
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
6707
+ * You can also use custom tools to call your own code.
5737
6708
  */
5738
- sequence_number: number;
6709
+ tools?: Array<Tool>;
5739
6710
 
5740
6711
  /**
5741
- * The type of the event. Always `response.web_search_call.in_progress`.
6712
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
6713
+ * to return at each token position, each with an associated log probability. In
6714
+ * some cases, the number of returned tokens may be fewer than requested.
5742
6715
  */
5743
- type: 'response.web_search_call.in_progress';
5744
- }
6716
+ top_logprobs?: number | null;
5745
6717
 
5746
- /**
5747
- * Emitted when a web search call is executing.
5748
- */
5749
- export interface ResponseWebSearchCallSearchingEvent {
5750
6718
  /**
5751
- * Unique ID for the output item associated with the web search call.
6719
+ * An alternative to sampling with temperature, called nucleus sampling, where the
6720
+ * model considers the results of the tokens with top_p probability mass. So 0.1
6721
+ * means only the tokens comprising the top 10% probability mass are considered.
6722
+ *
6723
+ * We generally recommend altering this or `temperature` but not both.
5752
6724
  */
5753
- item_id: string;
6725
+ top_p?: number | null;
5754
6726
 
5755
6727
  /**
5756
- * The index of the output item that the web search call is associated with.
6728
+ * The truncation strategy to use for the model response.
6729
+ *
6730
+ * - `auto`: If the input to this Response exceeds the model's context window size,
6731
+ * the model will truncate the response to fit the context window by dropping
6732
+ * items from the beginning of the conversation.
6733
+ * - `disabled` (default): If the input size will exceed the context window size
6734
+ * for a model, the request will fail with a 400 error.
5757
6735
  */
5758
- output_index: number;
6736
+ truncation?: 'auto' | 'disabled' | null;
5759
6737
 
5760
6738
  /**
5761
- * The sequence number of the web search call being processed.
6739
+ * @deprecated This field is being replaced by `safety_identifier` and
6740
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
6741
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
6742
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
6743
+ * abuse.
6744
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
5762
6745
  */
5763
- sequence_number: number;
6746
+ user?: string;
6747
+ }
6748
+
6749
+ export namespace ResponsesClientEvent {
6750
+ export interface ContextManagement {
6751
+ /**
6752
+ * The context management entry type. Currently only 'compaction' is supported.
6753
+ */
6754
+ type: string;
6755
+
6756
+ /**
6757
+ * Token threshold at which compaction should be triggered for this entry.
6758
+ */
6759
+ compact_threshold?: number | null;
6760
+ }
5764
6761
 
5765
6762
  /**
5766
- * The type of the event. Always `response.web_search_call.searching`.
6763
+ * Options for streaming responses. Only set this when you set `stream: true`.
5767
6764
  */
5768
- type: 'response.web_search_call.searching';
6765
+ export interface StreamOptions {
6766
+ /**
6767
+ * When true, stream obfuscation will be enabled. Stream obfuscation adds random
6768
+ * characters to an `obfuscation` field on streaming delta events to normalize
6769
+ * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
6770
+ * fields are included by default, but add a small amount of overhead to the data
6771
+ * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
6772
+ * you trust the network links between your application and the OpenAI API.
6773
+ */
6774
+ include_obfuscation?: boolean;
6775
+ }
5769
6776
  }
5770
6777
 
6778
+ /**
6779
+ * Server events emitted by the Responses WebSocket server.
6780
+ */
6781
+ export type ResponsesServerEvent =
6782
+ | ResponseAudioDeltaEvent
6783
+ | ResponseAudioDoneEvent
6784
+ | ResponseAudioTranscriptDeltaEvent
6785
+ | ResponseAudioTranscriptDoneEvent
6786
+ | ResponseCodeInterpreterCallCodeDeltaEvent
6787
+ | ResponseCodeInterpreterCallCodeDoneEvent
6788
+ | ResponseCodeInterpreterCallCompletedEvent
6789
+ | ResponseCodeInterpreterCallInProgressEvent
6790
+ | ResponseCodeInterpreterCallInterpretingEvent
6791
+ | ResponseCompletedEvent
6792
+ | ResponseContentPartAddedEvent
6793
+ | ResponseContentPartDoneEvent
6794
+ | ResponseCreatedEvent
6795
+ | ResponseErrorEvent
6796
+ | ResponseFileSearchCallCompletedEvent
6797
+ | ResponseFileSearchCallInProgressEvent
6798
+ | ResponseFileSearchCallSearchingEvent
6799
+ | ResponseFunctionCallArgumentsDeltaEvent
6800
+ | ResponseFunctionCallArgumentsDoneEvent
6801
+ | ResponseInProgressEvent
6802
+ | ResponseFailedEvent
6803
+ | ResponseIncompleteEvent
6804
+ | ResponseOutputItemAddedEvent
6805
+ | ResponseOutputItemDoneEvent
6806
+ | ResponseReasoningSummaryPartAddedEvent
6807
+ | ResponseReasoningSummaryPartDoneEvent
6808
+ | ResponseReasoningSummaryTextDeltaEvent
6809
+ | ResponseReasoningSummaryTextDoneEvent
6810
+ | ResponseReasoningTextDeltaEvent
6811
+ | ResponseReasoningTextDoneEvent
6812
+ | ResponseRefusalDeltaEvent
6813
+ | ResponseRefusalDoneEvent
6814
+ | ResponseTextDeltaEvent
6815
+ | ResponseTextDoneEvent
6816
+ | ResponseWebSearchCallCompletedEvent
6817
+ | ResponseWebSearchCallInProgressEvent
6818
+ | ResponseWebSearchCallSearchingEvent
6819
+ | ResponseImageGenCallCompletedEvent
6820
+ | ResponseImageGenCallGeneratingEvent
6821
+ | ResponseImageGenCallInProgressEvent
6822
+ | ResponseImageGenCallPartialImageEvent
6823
+ | ResponseMcpCallArgumentsDeltaEvent
6824
+ | ResponseMcpCallArgumentsDoneEvent
6825
+ | ResponseMcpCallCompletedEvent
6826
+ | ResponseMcpCallFailedEvent
6827
+ | ResponseMcpCallInProgressEvent
6828
+ | ResponseMcpListToolsCompletedEvent
6829
+ | ResponseMcpListToolsFailedEvent
6830
+ | ResponseMcpListToolsInProgressEvent
6831
+ | ResponseOutputTextAnnotationAddedEvent
6832
+ | ResponseQueuedEvent
6833
+ | ResponseCustomToolCallInputDeltaEvent
6834
+ | ResponseCustomToolCallInputDoneEvent;
6835
+
5771
6836
  export interface SkillReference {
5772
6837
  /**
5773
6838
  * The ID of the referenced skill.
@@ -5792,6 +6857,7 @@ export type Tool =
5792
6857
  | FunctionTool
5793
6858
  | FileSearchTool
5794
6859
  | ComputerTool
6860
+ | ComputerUsePreviewTool
5795
6861
  | WebSearchTool
5796
6862
  | Tool.Mcp
5797
6863
  | Tool.CodeInterpreter
@@ -5799,6 +6865,8 @@ export type Tool =
5799
6865
  | Tool.LocalShell
5800
6866
  | FunctionShellTool
5801
6867
  | CustomTool
6868
+ | NamespaceTool
6869
+ | ToolSearchTool
5802
6870
  | WebSearchPreviewTool
5803
6871
  | ApplyPatchTool;
5804
6872
 
@@ -5858,6 +6926,11 @@ export namespace Tool {
5858
6926
  | 'connector_outlookemail'
5859
6927
  | 'connector_sharepoint';
5860
6928
 
6929
+ /**
6930
+ * Whether this MCP tool is deferred and discovered via tool search.
6931
+ */
6932
+ defer_loading?: boolean;
6933
+
5861
6934
  /**
5862
6935
  * Optional HTTP headers to send to the MCP server. Use for authentication or other
5863
6936
  * purposes.
@@ -6017,8 +7090,18 @@ export namespace Tool {
6017
7090
  action?: 'generate' | 'edit' | 'auto';
6018
7091
 
6019
7092
  /**
6020
- * Background type for the generated image. One of `transparent`, `opaque`, or
6021
- * `auto`. Default: `auto`.
7093
+ * Allows to set transparency for the background of the generated image(s). This
7094
+ * parameter is only supported for GPT image models that support transparent
7095
+ * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
7096
+ * When `auto` is used, the model will automatically determine the best background
7097
+ * for the image.
7098
+ *
7099
+ * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
7100
+ * backgrounds. Requests with `background` set to `transparent` will return an
7101
+ * error for these models; use `opaque` or `auto` instead.
7102
+ *
7103
+ * If `transparent`, the output format needs to support transparency, so it should
7104
+ * be set to either `png` (default value) or `webp`.
6022
7105
  */
6023
7106
  background?: 'transparent' | 'opaque' | 'auto';
6024
7107
 
@@ -6039,7 +7122,14 @@ export namespace Tool {
6039
7122
  /**
6040
7123
  * The image generation model to use. Default: `gpt-image-1`.
6041
7124
  */
6042
- model?: (string & {}) | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5';
7125
+ model?:
7126
+ | (string & {})
7127
+ | 'gpt-image-1'
7128
+ | 'gpt-image-1-mini'
7129
+ | 'gpt-image-2'
7130
+ | 'gpt-image-2-2026-04-21'
7131
+ | 'gpt-image-1.5'
7132
+ | 'chatgpt-image-latest';
6043
7133
 
6044
7134
  /**
6045
7135
  * Moderation level for the generated image. Default: `auto`.
@@ -6070,10 +7160,19 @@ export namespace Tool {
6070
7160
  quality?: 'low' | 'medium' | 'high' | 'auto';
6071
7161
 
6072
7162
  /**
6073
- * The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`,
6074
- * or `auto`. Default: `auto`.
7163
+ * The size of the generated images. For `gpt-image-2` and
7164
+ * `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
7165
+ * strings, for example `1536x864`. Width and height must both be divisible by 16
7166
+ * and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
7167
+ * `2560x1440` are experimental, and the maximum supported resolution is
7168
+ * `3840x2160`. The requested size must also satisfy the model's current pixel and
7169
+ * edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
7170
+ * supported by the GPT image models; `auto` is supported for models that allow
7171
+ * automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
7172
+ * `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
7173
+ * `1024x1792`.
6075
7174
  */
6076
- size?: '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
7175
+ size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
6077
7176
  }
6078
7177
 
6079
7178
  export namespace ImageGeneration {
@@ -6236,7 +7335,9 @@ export interface ToolChoiceTypes {
6236
7335
  *
6237
7336
  * - `file_search`
6238
7337
  * - `web_search_preview`
7338
+ * - `computer`
6239
7339
  * - `computer_use_preview`
7340
+ * - `computer_use`
6240
7341
  * - `code_interpreter`
6241
7342
  * - `mcp`
6242
7343
  * - `image_generation`
@@ -6244,13 +7345,40 @@ export interface ToolChoiceTypes {
6244
7345
  type:
6245
7346
  | 'file_search'
6246
7347
  | 'web_search_preview'
7348
+ | 'computer'
6247
7349
  | 'computer_use_preview'
7350
+ | 'computer_use'
6248
7351
  | 'web_search_preview_2025_03_11'
6249
7352
  | 'image_generation'
6250
7353
  | 'code_interpreter'
6251
7354
  | 'mcp';
6252
7355
  }
6253
7356
 
7357
+ /**
7358
+ * Hosted or BYOT tool search configuration for deferred tools.
7359
+ */
7360
+ export interface ToolSearchTool {
7361
+ /**
7362
+ * The type of the tool. Always `tool_search`.
7363
+ */
7364
+ type: 'tool_search';
7365
+
7366
+ /**
7367
+ * Description shown to the model for a client-executed tool search tool.
7368
+ */
7369
+ description?: string | null;
7370
+
7371
+ /**
7372
+ * Whether tool search is executed by the server or by the client.
7373
+ */
7374
+ execution?: 'server' | 'client';
7375
+
7376
+ /**
7377
+ * Parameter schema for a client-executed tool search tool.
7378
+ */
7379
+ parameters?: unknown | null;
7380
+ }
7381
+
6254
7382
  /**
6255
7383
  * This tool searches the web for relevant results to use in a response. Learn more
6256
7384
  * about the
@@ -6263,6 +7391,8 @@ export interface WebSearchPreviewTool {
6263
7391
  */
6264
7392
  type: 'web_search_preview' | 'web_search_preview_2025_03_11';
6265
7393
 
7394
+ search_content_types?: Array<'text' | 'image'>;
7395
+
6266
7396
  /**
6267
7397
  * High level guidance for the amount of context window space to use for the
6268
7398
  * search. One of `low`, `medium`, or `high`. `medium` is the default.
@@ -6510,7 +7640,7 @@ export interface ResponseCreateParamsBase {
6510
7640
  * of 24 hours.
6511
7641
  * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6512
7642
  */
6513
- prompt_cache_retention?: 'in-memory' | '24h' | null;
7643
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
6514
7644
 
6515
7645
  /**
6516
7646
  * **gpt-5 and o-series models only**
@@ -6523,8 +7653,9 @@ export interface ResponseCreateParamsBase {
6523
7653
  /**
6524
7654
  * A stable identifier used to help detect users of your application that may be
6525
7655
  * violating OpenAI's usage policies. The IDs should be a string that uniquely
6526
- * identifies each user. We recommend hashing their username or email address, in
6527
- * order to avoid sending us any identifying information.
7656
+ * identifies each user, with a maximum length of 64 characters. We recommend
7657
+ * hashing their username or email address, in order to avoid sending us any
7658
+ * identifying information.
6528
7659
  * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
6529
7660
  */
6530
7661
  safety_identifier?: string;
@@ -6623,6 +7754,13 @@ export interface ResponseCreateParamsBase {
6623
7754
  */
6624
7755
  tools?: Array<Tool>;
6625
7756
 
7757
+ /**
7758
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
7759
+ * to return at each token position, each with an associated log probability. In
7760
+ * some cases, the number of returned tokens may be fewer than requested.
7761
+ */
7762
+ top_logprobs?: number | null;
7763
+
6626
7764
  /**
6627
7765
  * An alternative to sampling with temperature, called nucleus sampling, where the
6628
7766
  * model considers the results of the tokens with top_p probability mass. So 0.1
@@ -6783,6 +7921,12 @@ export interface ResponseCompactParams {
6783
7921
  * available models.
6784
7922
  */
6785
7923
  model:
7924
+ | 'gpt-5.4'
7925
+ | 'gpt-5.4-mini'
7926
+ | 'gpt-5.4-nano'
7927
+ | 'gpt-5.4-mini-2026-03-17'
7928
+ | 'gpt-5.4-nano-2026-03-17'
7929
+ | 'gpt-5.3-chat-latest'
6786
7930
  | 'gpt-5.2'
6787
7931
  | 'gpt-5.2-2025-12-11'
6788
7932
  | 'gpt-5.2-chat-latest'
@@ -6892,6 +8036,21 @@ export interface ResponseCompactParams {
6892
8036
  * Cannot be used in conjunction with `conversation`.
6893
8037
  */
6894
8038
  previous_response_id?: string | null;
8039
+
8040
+ /**
8041
+ * A key to use when reading from or writing to the prompt cache.
8042
+ */
8043
+ prompt_cache_key?: string | null;
8044
+
8045
+ /**
8046
+ * How long to retain a prompt cache entry created by this request.
8047
+ */
8048
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
8049
+
8050
+ /**
8051
+ * The service tier to use for this request.
8052
+ */
8053
+ service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
6895
8054
  }
6896
8055
 
6897
8056
  Responses.InputItems = InputItems;
@@ -6901,7 +8060,10 @@ export declare namespace Responses {
6901
8060
  export {
6902
8061
  type ApplyPatchTool as ApplyPatchTool,
6903
8062
  type CompactedResponse as CompactedResponse,
8063
+ type ComputerAction as ComputerAction,
8064
+ type ComputerActionList as ComputerActionList,
6904
8065
  type ComputerTool as ComputerTool,
8066
+ type ComputerUsePreviewTool as ComputerUsePreviewTool,
6905
8067
  type ContainerAuto as ContainerAuto,
6906
8068
  type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist,
6907
8069
  type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled,
@@ -6916,6 +8078,7 @@ export declare namespace Responses {
6916
8078
  type InlineSkillSource as InlineSkillSource,
6917
8079
  type LocalEnvironment as LocalEnvironment,
6918
8080
  type LocalSkill as LocalSkill,
8081
+ type NamespaceTool as NamespaceTool,
6919
8082
  type Response as Response,
6920
8083
  type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall,
6921
8084
  type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput,
@@ -6944,7 +8107,9 @@ export declare namespace Responses {
6944
8107
  type ResponseCustomToolCall as ResponseCustomToolCall,
6945
8108
  type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent,
6946
8109
  type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent,
8110
+ type ResponseCustomToolCallItem as ResponseCustomToolCallItem,
6947
8111
  type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput,
8112
+ type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem,
6948
8113
  type ResponseError as ResponseError,
6949
8114
  type ResponseErrorEvent as ResponseErrorEvent,
6950
8115
  type ResponseFailedEvent as ResponseFailedEvent,
@@ -7018,10 +8183,15 @@ export declare namespace Responses {
7018
8183
  type ResponseTextConfig as ResponseTextConfig,
7019
8184
  type ResponseTextDeltaEvent as ResponseTextDeltaEvent,
7020
8185
  type ResponseTextDoneEvent as ResponseTextDoneEvent,
8186
+ type ResponseToolSearchCall as ResponseToolSearchCall,
8187
+ type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem,
8188
+ type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam,
7021
8189
  type ResponseUsage as ResponseUsage,
7022
8190
  type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent,
7023
8191
  type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent,
7024
8192
  type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent,
8193
+ type ResponsesClientEvent as ResponsesClientEvent,
8194
+ type ResponsesServerEvent as ResponsesServerEvent,
7025
8195
  type SkillReference as SkillReference,
7026
8196
  type Tool as Tool,
7027
8197
  type ToolChoiceAllowed as ToolChoiceAllowed,
@@ -7032,6 +8202,7 @@ export declare namespace Responses {
7032
8202
  type ToolChoiceOptions as ToolChoiceOptions,
7033
8203
  type ToolChoiceShell as ToolChoiceShell,
7034
8204
  type ToolChoiceTypes as ToolChoiceTypes,
8205
+ type ToolSearchTool as ToolSearchTool,
7035
8206
  type WebSearchPreviewTool as WebSearchPreviewTool,
7036
8207
  type WebSearchTool as WebSearchTool,
7037
8208
  type ResponseCreateParams as ResponseCreateParams,