@radheim/ai 0.0.0-stage → 2.4.3

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 (560) hide show
  1. package/README.md +1890 -3
  2. package/dist/ai.d.ts +36 -0
  3. package/dist/ai.js +46 -0
  4. package/dist/cache-policy.d.ts +6 -0
  5. package/dist/cache-policy.js +205 -0
  6. package/dist/decision-client.d.ts +10 -0
  7. package/dist/decision-client.js +42 -0
  8. package/dist/decision.d.ts +378 -0
  9. package/dist/decision.js +171 -0
  10. package/dist/effect.d.ts +59 -0
  11. package/dist/effect.js +33 -0
  12. package/dist/effort-updates.d.ts +12 -0
  13. package/dist/effort-updates.js +23 -0
  14. package/dist/embedding-client.d.ts +10 -0
  15. package/dist/embedding-client.js +17 -0
  16. package/dist/embedding.d.ts +113 -0
  17. package/dist/embedding.js +76 -0
  18. package/dist/experimental/cloudflare-run-extraction.d.ts +17 -0
  19. package/dist/experimental/cloudflare-run-extraction.js +85 -0
  20. package/dist/experimental/extraction.d.ts +153 -0
  21. package/dist/experimental/extraction.js +103 -0
  22. package/dist/experimental/realtime.d.ts +80 -0
  23. package/dist/experimental/realtime.js +96 -0
  24. package/dist/experimental.d.ts +10 -0
  25. package/dist/experimental.js +6 -0
  26. package/dist/fetch-middleware.d.ts +7 -0
  27. package/dist/fetch-middleware.js +41 -0
  28. package/dist/generation.d.ts +77 -0
  29. package/dist/generation.js +109 -0
  30. package/dist/image-client.d.ts +14 -0
  31. package/dist/image-client.js +39 -0
  32. package/dist/image.d.ts +323 -0
  33. package/dist/image.js +103 -0
  34. package/dist/index.d.ts +300 -0
  35. package/dist/index.js +179 -0
  36. package/dist/llm.d.ts +109 -0
  37. package/dist/llm.js +177 -0
  38. package/dist/loop.d.ts +38 -0
  39. package/dist/loop.js +139 -0
  40. package/dist/media-client.d.ts +30 -0
  41. package/dist/media-client.js +44 -0
  42. package/dist/media-model.d.ts +49 -0
  43. package/dist/media-model.js +55 -0
  44. package/dist/media.d.ts +237 -0
  45. package/dist/media.js +285 -0
  46. package/dist/promise-media.d.ts +20 -0
  47. package/dist/promise-media.js +16 -0
  48. package/dist/protocols/alibaba-chat.d.ts +315 -0
  49. package/dist/protocols/alibaba-chat.js +78 -0
  50. package/dist/protocols/alibaba-images.d.ts +22 -0
  51. package/dist/protocols/alibaba-images.js +77 -0
  52. package/dist/protocols/alibaba-messages.d.ts +413 -0
  53. package/dist/protocols/alibaba-messages.js +44 -0
  54. package/dist/protocols/alibaba-responses.d.ts +298 -0
  55. package/dist/protocols/alibaba-responses.js +67 -0
  56. package/dist/protocols/anthropic-messages.d.ts +1213 -0
  57. package/dist/protocols/anthropic-messages.js +1412 -0
  58. package/dist/protocols/assemblyai-transcription.d.ts +41 -0
  59. package/dist/protocols/assemblyai-transcription.js +137 -0
  60. package/dist/protocols/bedrock-converse.d.ts +548 -0
  61. package/dist/protocols/bedrock-converse.js +801 -0
  62. package/dist/protocols/bedrock-event-stream.d.ts +14 -0
  63. package/dist/protocols/bedrock-event-stream.js +100 -0
  64. package/dist/protocols/cartesia-speech.d.ts +117 -0
  65. package/dist/protocols/cartesia-speech.js +120 -0
  66. package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
  67. package/dist/protocols/cloudflare-run-decisions.js +36 -0
  68. package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
  69. package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
  70. package/dist/protocols/cohere-chat.d.ts +184 -0
  71. package/dist/protocols/cohere-chat.js +317 -0
  72. package/dist/protocols/deepgram-speech.d.ts +109 -0
  73. package/dist/protocols/deepgram-speech.js +93 -0
  74. package/dist/protocols/deepgram-transcription.d.ts +26 -0
  75. package/dist/protocols/deepgram-transcription.js +119 -0
  76. package/dist/protocols/elevenlabs-speech.d.ts +112 -0
  77. package/dist/protocols/elevenlabs-speech.js +111 -0
  78. package/dist/protocols/elevenlabs-transcription.d.ts +28 -0
  79. package/dist/protocols/elevenlabs-transcription.js +137 -0
  80. package/dist/protocols/gemini.d.ts +388 -0
  81. package/dist/protocols/gemini.js +741 -0
  82. package/dist/protocols/google-decisions.d.ts +13 -0
  83. package/dist/protocols/google-decisions.js +133 -0
  84. package/dist/protocols/google-embed-content.d.ts +34 -0
  85. package/dist/protocols/google-embed-content.js +110 -0
  86. package/dist/protocols/google-images.d.ts +18 -0
  87. package/dist/protocols/google-images.js +169 -0
  88. package/dist/protocols/google-interactions-video.d.ts +38 -0
  89. package/dist/protocols/google-interactions-video.js +185 -0
  90. package/dist/protocols/google-interactions.d.ts +554 -0
  91. package/dist/protocols/google-interactions.js +756 -0
  92. package/dist/protocols/google-speech.d.ts +120 -0
  93. package/dist/protocols/google-speech.js +94 -0
  94. package/dist/protocols/google-transcription.d.ts +148 -0
  95. package/dist/protocols/google-transcription.js +129 -0
  96. package/dist/protocols/google-vertex-predict-embeddings.d.ts +18 -0
  97. package/dist/protocols/google-vertex-predict-embeddings.js +74 -0
  98. package/dist/protocols/index.d.ts +21 -0
  99. package/dist/protocols/index.js +21 -0
  100. package/dist/protocols/meta-images.d.ts +26 -0
  101. package/dist/protocols/meta-images.js +101 -0
  102. package/dist/protocols/meta-messages.d.ts +423 -0
  103. package/dist/protocols/meta-messages.js +63 -0
  104. package/dist/protocols/meta-responses.d.ts +533 -0
  105. package/dist/protocols/meta-responses.js +189 -0
  106. package/dist/protocols/minimax-images.d.ts +25 -0
  107. package/dist/protocols/minimax-images.js +150 -0
  108. package/dist/protocols/minimax-video.d.ts +45 -0
  109. package/dist/protocols/minimax-video.js +296 -0
  110. package/dist/protocols/mistral-chat.d.ts +565 -0
  111. package/dist/protocols/mistral-chat.js +606 -0
  112. package/dist/protocols/open-responses-channel.d.ts +25 -0
  113. package/dist/protocols/open-responses-channel.js +137 -0
  114. package/dist/protocols/open-responses-continuation.d.ts +18 -0
  115. package/dist/protocols/open-responses-continuation.js +172 -0
  116. package/dist/protocols/open-responses.d.ts +2509 -0
  117. package/dist/protocols/open-responses.js +1335 -0
  118. package/dist/protocols/openai-chat.d.ts +2571 -0
  119. package/dist/protocols/openai-chat.js +1140 -0
  120. package/dist/protocols/openai-compatible-chat.d.ts +184 -0
  121. package/dist/protocols/openai-compatible-chat.js +19 -0
  122. package/dist/protocols/openai-compatible-responses.d.ts +231 -0
  123. package/dist/protocols/openai-compatible-responses.js +18 -0
  124. package/dist/protocols/openai-decisions.d.ts +22 -0
  125. package/dist/protocols/openai-decisions.js +141 -0
  126. package/dist/protocols/openai-embeddings.d.ts +16 -0
  127. package/dist/protocols/openai-embeddings.js +76 -0
  128. package/dist/protocols/openai-freeform.d.ts +78 -0
  129. package/dist/protocols/openai-freeform.js +222 -0
  130. package/dist/protocols/openai-images.d.ts +148 -0
  131. package/dist/protocols/openai-images.js +303 -0
  132. package/dist/protocols/openai-responses.d.ts +1600 -0
  133. package/dist/protocols/openai-responses.js +360 -0
  134. package/dist/protocols/openai-speech.d.ts +110 -0
  135. package/dist/protocols/openai-speech.js +112 -0
  136. package/dist/protocols/openai-transcription.d.ts +185 -0
  137. package/dist/protocols/openai-transcription.js +206 -0
  138. package/dist/protocols/openrouter-video.d.ts +36 -0
  139. package/dist/protocols/openrouter-video.js +139 -0
  140. package/dist/protocols/seedance-video.d.ts +45 -0
  141. package/dist/protocols/seedance-video.js +217 -0
  142. package/dist/protocols/shared.d.ts +249 -0
  143. package/dist/protocols/shared.js +446 -0
  144. package/dist/protocols/system-one.d.ts +145 -0
  145. package/dist/protocols/system-one.js +272 -0
  146. package/dist/protocols/utils/bedrock-auth.d.ts +60 -0
  147. package/dist/protocols/utils/bedrock-auth.js +86 -0
  148. package/dist/protocols/utils/bedrock-cache.d.ts +19 -0
  149. package/dist/protocols/utils/bedrock-cache.js +49 -0
  150. package/dist/protocols/utils/bedrock-media.d.ts +53 -0
  151. package/dist/protocols/utils/bedrock-media.js +98 -0
  152. package/dist/protocols/utils/cache.d.ts +25 -0
  153. package/dist/protocols/utils/cache.js +33 -0
  154. package/dist/protocols/utils/claude-model.d.ts +8 -0
  155. package/dist/protocols/utils/claude-model.js +15 -0
  156. package/dist/protocols/utils/gateway-protocol.d.ts +17 -0
  157. package/dist/protocols/utils/gateway-protocol.js +59 -0
  158. package/dist/protocols/utils/gemini-generate-content.d.ts +75 -0
  159. package/dist/protocols/utils/gemini-generate-content.js +96 -0
  160. package/dist/protocols/utils/gemini-json-schema.d.ts +8 -0
  161. package/dist/protocols/utils/gemini-json-schema.js +76 -0
  162. package/dist/protocols/utils/image-sizing.d.ts +31 -0
  163. package/dist/protocols/utils/image-sizing.js +73 -0
  164. package/dist/protocols/utils/lifecycle.d.ts +24 -0
  165. package/dist/protocols/utils/lifecycle.js +62 -0
  166. package/dist/protocols/utils/media-input.d.ts +32 -0
  167. package/dist/protocols/utils/media-input.js +62 -0
  168. package/dist/protocols/utils/mistral-tool-id.d.ts +5 -0
  169. package/dist/protocols/utils/mistral-tool-id.js +31 -0
  170. package/dist/protocols/utils/open-responses-options.d.ts +54 -0
  171. package/dist/protocols/utils/open-responses-options.js +59 -0
  172. package/dist/protocols/utils/partial-json-options.d.ts +61 -0
  173. package/dist/protocols/utils/partial-json-options.js +51 -0
  174. package/dist/protocols/utils/partial-json.d.ts +8 -0
  175. package/dist/protocols/utils/partial-json.js +280 -0
  176. package/dist/protocols/utils/responses-checkpoint.d.ts +4 -0
  177. package/dist/protocols/utils/responses-checkpoint.js +103 -0
  178. package/dist/protocols/utils/responses-compaction.d.ts +6 -0
  179. package/dist/protocols/utils/responses-compaction.js +162 -0
  180. package/dist/protocols/utils/responses-hosted-tools.d.ts +122 -0
  181. package/dist/protocols/utils/responses-hosted-tools.js +63 -0
  182. package/dist/protocols/utils/speaker-turns.d.ts +3 -0
  183. package/dist/protocols/utils/speaker-turns.js +9 -0
  184. package/dist/protocols/utils/speech-stream.d.ts +49 -0
  185. package/dist/protocols/utils/speech-stream.js +64 -0
  186. package/dist/protocols/utils/tool-schema.d.ts +10 -0
  187. package/dist/protocols/utils/tool-schema.js +109 -0
  188. package/dist/protocols/utils/tool-stream.d.ts +478 -0
  189. package/dist/protocols/utils/tool-stream.js +153 -0
  190. package/dist/protocols/venice-chat.d.ts +340 -0
  191. package/dist/protocols/venice-chat.js +283 -0
  192. package/dist/protocols/xai-images.d.ts +25 -0
  193. package/dist/protocols/xai-images.js +87 -0
  194. package/dist/protocols/xai-responses.d.ts +294 -0
  195. package/dist/protocols/xai-responses.js +86 -0
  196. package/dist/protocols/xai-video.d.ts +35 -0
  197. package/dist/protocols/xai-video.js +159 -0
  198. package/dist/protocols/zai-chat.d.ts +296 -0
  199. package/dist/protocols/zai-chat.js +56 -0
  200. package/dist/protocols/zai-images.d.ts +20 -0
  201. package/dist/protocols/zai-images.js +79 -0
  202. package/dist/protocols/zai-messages.d.ts +409 -0
  203. package/dist/protocols/zai-messages.js +30 -0
  204. package/dist/protocols.d.ts +1 -0
  205. package/dist/protocols.js +1 -0
  206. package/dist/provider-error.d.ts +22 -0
  207. package/dist/provider-error.js +228 -0
  208. package/dist/provider-package.d.ts +17 -0
  209. package/dist/provider-package.js +1 -0
  210. package/dist/providers/alibaba/chat.d.ts +1 -0
  211. package/dist/providers/alibaba/chat.js +1 -0
  212. package/dist/providers/alibaba/embeddings.d.ts +2 -0
  213. package/dist/providers/alibaba/embeddings.js +1 -0
  214. package/dist/providers/alibaba/images.d.ts +2 -0
  215. package/dist/providers/alibaba/images.js +1 -0
  216. package/dist/providers/alibaba/messages.d.ts +3 -0
  217. package/dist/providers/alibaba/messages.js +1 -0
  218. package/dist/providers/alibaba/responses.d.ts +3 -0
  219. package/dist/providers/alibaba/responses.js +1 -0
  220. package/dist/providers/alibaba.d.ts +905 -0
  221. package/dist/providers/alibaba.js +119 -0
  222. package/dist/providers/amazon-bedrock/mantle/chat.d.ts +2 -0
  223. package/dist/providers/amazon-bedrock/mantle/chat.js +1 -0
  224. package/dist/providers/amazon-bedrock/mantle/messages.d.ts +2 -0
  225. package/dist/providers/amazon-bedrock/mantle/messages.js +1 -0
  226. package/dist/providers/amazon-bedrock/mantle/responses.d.ts +2 -0
  227. package/dist/providers/amazon-bedrock/mantle/responses.js +1 -0
  228. package/dist/providers/amazon-bedrock/mantle.d.ts +2 -0
  229. package/dist/providers/amazon-bedrock/mantle.js +1 -0
  230. package/dist/providers/amazon-bedrock-mantle.d.ts +789 -0
  231. package/dist/providers/amazon-bedrock-mantle.js +107 -0
  232. package/dist/providers/amazon-bedrock.d.ts +190 -0
  233. package/dist/providers/amazon-bedrock.js +44 -0
  234. package/dist/providers/anthropic-compatible.d.ts +364 -0
  235. package/dist/providers/anthropic-compatible.js +47 -0
  236. package/dist/providers/anthropic.d.ts +362 -0
  237. package/dist/providers/anthropic.js +36 -0
  238. package/dist/providers/assemblyai.d.ts +19 -0
  239. package/dist/providers/assemblyai.js +19 -0
  240. package/dist/providers/azure/chat.d.ts +2 -0
  241. package/dist/providers/azure/chat.js +1 -0
  242. package/dist/providers/azure/embeddings.d.ts +2 -0
  243. package/dist/providers/azure/embeddings.js +1 -0
  244. package/dist/providers/azure/images.d.ts +2 -0
  245. package/dist/providers/azure/images.js +1 -0
  246. package/dist/providers/azure/messages.d.ts +2 -0
  247. package/dist/providers/azure/messages.js +1 -0
  248. package/dist/providers/azure/responses.d.ts +2 -0
  249. package/dist/providers/azure/responses.js +1 -0
  250. package/dist/providers/azure.d.ts +1074 -0
  251. package/dist/providers/azure.js +150 -0
  252. package/dist/providers/baseten/decisions.d.ts +2 -0
  253. package/dist/providers/baseten/decisions.js +1 -0
  254. package/dist/providers/baseten.d.ts +384 -0
  255. package/dist/providers/baseten.js +56 -0
  256. package/dist/providers/byteplus/videos.d.ts +2 -0
  257. package/dist/providers/byteplus/videos.js +1 -0
  258. package/dist/providers/byteplus.d.ts +24 -0
  259. package/dist/providers/byteplus.js +21 -0
  260. package/dist/providers/cartesia.d.ts +18 -0
  261. package/dist/providers/cartesia.js +17 -0
  262. package/dist/providers/cerebras.d.ts +375 -0
  263. package/dist/providers/cerebras.js +33 -0
  264. package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
  265. package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
  266. package/dist/providers/cloudflare-ai-gateway.d.ts +1581 -0
  267. package/dist/providers/cloudflare-ai-gateway.js +120 -0
  268. package/dist/providers/cloudflare-shared.d.ts +9 -0
  269. package/dist/providers/cloudflare-shared.js +25 -0
  270. package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
  271. package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
  272. package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
  273. package/dist/providers/cloudflare-workers-ai/images.js +1 -0
  274. package/dist/providers/cloudflare-workers-ai.d.ts +391 -0
  275. package/dist/providers/cloudflare-workers-ai.js +69 -0
  276. package/dist/providers/cohere/chat.d.ts +4 -0
  277. package/dist/providers/cohere/chat.js +3 -0
  278. package/dist/providers/cohere/embeddings.d.ts +2 -0
  279. package/dist/providers/cohere/embeddings.js +1 -0
  280. package/dist/providers/cohere.d.ts +502 -0
  281. package/dist/providers/cohere.js +55 -0
  282. package/dist/providers/deepgram.d.ts +22 -0
  283. package/dist/providers/deepgram.js +20 -0
  284. package/dist/providers/deepinfra/embeddings.d.ts +2 -0
  285. package/dist/providers/deepinfra/embeddings.js +1 -0
  286. package/dist/providers/deepinfra.d.ts +378 -0
  287. package/dist/providers/deepinfra.js +52 -0
  288. package/dist/providers/deepseek.d.ts +376 -0
  289. package/dist/providers/deepseek.js +30 -0
  290. package/dist/providers/digitalocean/decisions.d.ts +2 -0
  291. package/dist/providers/digitalocean/decisions.js +1 -0
  292. package/dist/providers/digitalocean/embeddings.d.ts +2 -0
  293. package/dist/providers/digitalocean/embeddings.js +1 -0
  294. package/dist/providers/digitalocean/images.d.ts +2 -0
  295. package/dist/providers/digitalocean/images.js +1 -0
  296. package/dist/providers/digitalocean/responses.d.ts +4 -0
  297. package/dist/providers/digitalocean/responses.js +1 -0
  298. package/dist/providers/digitalocean.d.ts +874 -0
  299. package/dist/providers/digitalocean.js +106 -0
  300. package/dist/providers/elevenlabs.d.ts +22 -0
  301. package/dist/providers/elevenlabs.js +22 -0
  302. package/dist/providers/fireworks/embeddings.d.ts +2 -0
  303. package/dist/providers/fireworks/embeddings.js +1 -0
  304. package/dist/providers/fireworks.d.ts +379 -0
  305. package/dist/providers/fireworks.js +40 -0
  306. package/dist/providers/google/decisions.d.ts +2 -0
  307. package/dist/providers/google/decisions.js +1 -0
  308. package/dist/providers/google/embeddings.d.ts +2 -0
  309. package/dist/providers/google/embeddings.js +1 -0
  310. package/dist/providers/google/images.d.ts +2 -0
  311. package/dist/providers/google/images.js +1 -0
  312. package/dist/providers/google/interactions.d.ts +7 -0
  313. package/dist/providers/google/interactions.js +3 -0
  314. package/dist/providers/google/videos.d.ts +2 -0
  315. package/dist/providers/google/videos.js +1 -0
  316. package/dist/providers/google-vertex/chat.d.ts +2 -0
  317. package/dist/providers/google-vertex/chat.js +1 -0
  318. package/dist/providers/google-vertex/embeddings.d.ts +2 -0
  319. package/dist/providers/google-vertex/embeddings.js +1 -0
  320. package/dist/providers/google-vertex/gemini.d.ts +2 -0
  321. package/dist/providers/google-vertex/gemini.js +1 -0
  322. package/dist/providers/google-vertex/images.d.ts +2 -0
  323. package/dist/providers/google-vertex/images.js +1 -0
  324. package/dist/providers/google-vertex/interactions.d.ts +2 -0
  325. package/dist/providers/google-vertex/interactions.js +1 -0
  326. package/dist/providers/google-vertex/messages.d.ts +2 -0
  327. package/dist/providers/google-vertex/messages.js +1 -0
  328. package/dist/providers/google-vertex/mistral.d.ts +2 -0
  329. package/dist/providers/google-vertex/mistral.js +1 -0
  330. package/dist/providers/google-vertex/responses.d.ts +2 -0
  331. package/dist/providers/google-vertex/responses.js +1 -0
  332. package/dist/providers/google-vertex-chat.d.ts +204 -0
  333. package/dist/providers/google-vertex-chat.js +29 -0
  334. package/dist/providers/google-vertex-interactions.d.ts +111 -0
  335. package/dist/providers/google-vertex-interactions.js +62 -0
  336. package/dist/providers/google-vertex-messages.d.ts +362 -0
  337. package/dist/providers/google-vertex-messages.js +51 -0
  338. package/dist/providers/google-vertex-mistral.d.ts +120 -0
  339. package/dist/providers/google-vertex-mistral.js +43 -0
  340. package/dist/providers/google-vertex-responses.d.ts +253 -0
  341. package/dist/providers/google-vertex-responses.js +30 -0
  342. package/dist/providers/google-vertex-shared.d.ts +58 -0
  343. package/dist/providers/google-vertex-shared.js +128 -0
  344. package/dist/providers/google-vertex.d.ts +132 -0
  345. package/dist/providers/google-vertex.js +161 -0
  346. package/dist/providers/google.d.ts +246 -0
  347. package/dist/providers/google.js +80 -0
  348. package/dist/providers/groq.d.ts +470 -0
  349. package/dist/providers/groq.js +63 -0
  350. package/dist/providers/index.d.ts +45 -0
  351. package/dist/providers/index.js +45 -0
  352. package/dist/providers/meta/chat.d.ts +2 -0
  353. package/dist/providers/meta/chat.js +1 -0
  354. package/dist/providers/meta/images.d.ts +2 -0
  355. package/dist/providers/meta/images.js +1 -0
  356. package/dist/providers/meta/messages.d.ts +2 -0
  357. package/dist/providers/meta/messages.js +1 -0
  358. package/dist/providers/meta/responses.d.ts +2 -0
  359. package/dist/providers/meta/responses.js +1 -0
  360. package/dist/providers/meta.d.ts +804 -0
  361. package/dist/providers/meta.js +96 -0
  362. package/dist/providers/minimax/chat.d.ts +4 -0
  363. package/dist/providers/minimax/chat.js +3 -0
  364. package/dist/providers/minimax/images.d.ts +3 -0
  365. package/dist/providers/minimax/images.js +1 -0
  366. package/dist/providers/minimax/messages.d.ts +1 -0
  367. package/dist/providers/minimax/messages.js +1 -0
  368. package/dist/providers/minimax/responses.d.ts +4 -0
  369. package/dist/providers/minimax/responses.js +3 -0
  370. package/dist/providers/minimax/videos.d.ts +3 -0
  371. package/dist/providers/minimax/videos.js +1 -0
  372. package/dist/providers/minimax.d.ts +798 -0
  373. package/dist/providers/minimax.js +99 -0
  374. package/dist/providers/mistral.d.ts +208 -0
  375. package/dist/providers/mistral.js +17 -0
  376. package/dist/providers/moonshot/chat.d.ts +1 -0
  377. package/dist/providers/moonshot/chat.js +1 -0
  378. package/dist/providers/moonshot/messages.d.ts +4 -0
  379. package/dist/providers/moonshot/messages.js +3 -0
  380. package/dist/providers/moonshot/responses.d.ts +4 -0
  381. package/dist/providers/moonshot/responses.js +3 -0
  382. package/dist/providers/moonshot.d.ts +785 -0
  383. package/dist/providers/moonshot.js +78 -0
  384. package/dist/providers/open-responses-options.d.ts +5 -0
  385. package/dist/providers/open-responses-options.js +1 -0
  386. package/dist/providers/openai/chat.d.ts +2 -0
  387. package/dist/providers/openai/chat.js +1 -0
  388. package/dist/providers/openai/embeddings.d.ts +2 -0
  389. package/dist/providers/openai/embeddings.js +1 -0
  390. package/dist/providers/openai/images.d.ts +2 -0
  391. package/dist/providers/openai/images.js +1 -0
  392. package/dist/providers/openai/responses.d.ts +2 -0
  393. package/dist/providers/openai/responses.js +1 -0
  394. package/dist/providers/openai-compatible/decisions.d.ts +2 -0
  395. package/dist/providers/openai-compatible/decisions.js +1 -0
  396. package/dist/providers/openai-compatible/embeddings.d.ts +2 -0
  397. package/dist/providers/openai-compatible/embeddings.js +1 -0
  398. package/dist/providers/openai-compatible/images.d.ts +2 -0
  399. package/dist/providers/openai-compatible/images.js +1 -0
  400. package/dist/providers/openai-compatible/responses.d.ts +1 -0
  401. package/dist/providers/openai-compatible/responses.js +1 -0
  402. package/dist/providers/openai-compatible-responses.d.ts +250 -0
  403. package/dist/providers/openai-compatible-responses.js +26 -0
  404. package/dist/providers/openai-compatible.d.ts +208 -0
  405. package/dist/providers/openai-compatible.js +71 -0
  406. package/dist/providers/openai-options.d.ts +21 -0
  407. package/dist/providers/openai-options.js +37 -0
  408. package/dist/providers/openai.d.ts +522 -0
  409. package/dist/providers/openai.js +118 -0
  410. package/dist/providers/opencode/decisions.d.ts +2 -0
  411. package/dist/providers/opencode/decisions.js +1 -0
  412. package/dist/providers/opencode.d.ts +23 -0
  413. package/dist/providers/opencode.js +25 -0
  414. package/dist/providers/openrouter/decisions.d.ts +2 -0
  415. package/dist/providers/openrouter/decisions.js +1 -0
  416. package/dist/providers/openrouter/embeddings.d.ts +2 -0
  417. package/dist/providers/openrouter/embeddings.js +1 -0
  418. package/dist/providers/openrouter/images.d.ts +2 -0
  419. package/dist/providers/openrouter/images.js +1 -0
  420. package/dist/providers/openrouter/responses.d.ts +3 -0
  421. package/dist/providers/openrouter/responses.js +1 -0
  422. package/dist/providers/openrouter/videos.d.ts +2 -0
  423. package/dist/providers/openrouter/videos.js +1 -0
  424. package/dist/providers/openrouter.d.ts +1204 -0
  425. package/dist/providers/openrouter.js +210 -0
  426. package/dist/providers/settings.d.ts +40 -0
  427. package/dist/providers/settings.js +18 -0
  428. package/dist/providers/togetherai.d.ts +375 -0
  429. package/dist/providers/togetherai.js +30 -0
  430. package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
  431. package/dist/providers/typesafe-ai/decisions.js +1 -0
  432. package/dist/providers/typesafe-ai.d.ts +23 -0
  433. package/dist/providers/typesafe-ai.js +25 -0
  434. package/dist/providers/venice/responses.d.ts +4 -0
  435. package/dist/providers/venice/responses.js +1 -0
  436. package/dist/providers/venice.d.ts +632 -0
  437. package/dist/providers/venice.js +57 -0
  438. package/dist/providers/vercel-ai-gateway/chat.d.ts +2 -0
  439. package/dist/providers/vercel-ai-gateway/chat.js +1 -0
  440. package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
  441. package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
  442. package/dist/providers/vercel-ai-gateway/embeddings.d.ts +2 -0
  443. package/dist/providers/vercel-ai-gateway/embeddings.js +1 -0
  444. package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
  445. package/dist/providers/vercel-ai-gateway/images.js +1 -0
  446. package/dist/providers/vercel-ai-gateway/messages.d.ts +2 -0
  447. package/dist/providers/vercel-ai-gateway/messages.js +1 -0
  448. package/dist/providers/vercel-ai-gateway/responses.d.ts +2 -0
  449. package/dist/providers/vercel-ai-gateway/responses.js +1 -0
  450. package/dist/providers/vercel-ai-gateway.d.ts +111 -0
  451. package/dist/providers/vercel-ai-gateway.js +181 -0
  452. package/dist/providers/volcengine/videos.d.ts +2 -0
  453. package/dist/providers/volcengine/videos.js +1 -0
  454. package/dist/providers/volcengine.d.ts +24 -0
  455. package/dist/providers/volcengine.js +21 -0
  456. package/dist/providers/xai/images.d.ts +2 -0
  457. package/dist/providers/xai/images.js +1 -0
  458. package/dist/providers/xai/videos.d.ts +2 -0
  459. package/dist/providers/xai/videos.js +1 -0
  460. package/dist/providers/xai.d.ts +235 -0
  461. package/dist/providers/xai.js +89 -0
  462. package/dist/providers/zai/chat.d.ts +1 -0
  463. package/dist/providers/zai/chat.js +1 -0
  464. package/dist/providers/zai/images.d.ts +2 -0
  465. package/dist/providers/zai/images.js +1 -0
  466. package/dist/providers/zai-coding-plan/chat.d.ts +1 -0
  467. package/dist/providers/zai-coding-plan/chat.js +1 -0
  468. package/dist/providers/zai-coding-plan/messages.d.ts +4 -0
  469. package/dist/providers/zai-coding-plan/messages.js +3 -0
  470. package/dist/providers/zai-coding-plan/responses.d.ts +4 -0
  471. package/dist/providers/zai-coding-plan/responses.js +3 -0
  472. package/dist/providers/zai-coding-plan.d.ts +846 -0
  473. package/dist/providers/zai-coding-plan.js +56 -0
  474. package/dist/providers/zai.d.ts +285 -0
  475. package/dist/providers/zai.js +44 -0
  476. package/dist/providers.d.ts +1 -0
  477. package/dist/providers.js +1 -0
  478. package/dist/public.d.ts +18 -0
  479. package/dist/public.js +7 -0
  480. package/dist/route/auth-options.d.ts +35 -0
  481. package/dist/route/auth-options.js +17 -0
  482. package/dist/route/auth.d.ts +52 -0
  483. package/dist/route/auth.js +92 -0
  484. package/dist/route/client.d.ts +229 -0
  485. package/dist/route/client.js +293 -0
  486. package/dist/route/decision.d.ts +55 -0
  487. package/dist/route/decision.js +73 -0
  488. package/dist/route/embedding.d.ts +58 -0
  489. package/dist/route/embedding.js +85 -0
  490. package/dist/route/endpoint.d.ts +29 -0
  491. package/dist/route/endpoint.js +21 -0
  492. package/dist/route/executor-service.d.ts +54 -0
  493. package/dist/route/executor-service.js +115 -0
  494. package/dist/route/executor.d.ts +37 -0
  495. package/dist/route/executor.js +225 -0
  496. package/dist/route/framing.d.ts +44 -0
  497. package/dist/route/framing.js +63 -0
  498. package/dist/route/index.d.ts +21 -0
  499. package/dist/route/index.js +18 -0
  500. package/dist/route/media-protocol.d.ts +187 -0
  501. package/dist/route/media-protocol.js +117 -0
  502. package/dist/route/media.d.ts +91 -0
  503. package/dist/route/media.js +251 -0
  504. package/dist/route/protocol.d.ts +85 -0
  505. package/dist/route/protocol.js +19 -0
  506. package/dist/route/transport/http.d.ts +34 -0
  507. package/dist/route/transport/http.js +67 -0
  508. package/dist/route/transport/index.d.ts +42 -0
  509. package/dist/route/transport/index.js +4 -0
  510. package/dist/route/transport/websocket-channel.d.ts +56 -0
  511. package/dist/route/transport/websocket-channel.js +1 -0
  512. package/dist/route/transport/websocket.d.ts +32 -0
  513. package/dist/route/transport/websocket.js +315 -0
  514. package/dist/route.d.ts +1 -0
  515. package/dist/route.js +1 -0
  516. package/dist/schema/errors.d.ts +194 -0
  517. package/dist/schema/errors.js +217 -0
  518. package/dist/schema/events.d.ts +11001 -0
  519. package/dist/schema/events.js +542 -0
  520. package/dist/schema/ids.d.ts +17 -0
  521. package/dist/schema/ids.js +10 -0
  522. package/dist/schema/index.d.ts +5 -0
  523. package/dist/schema/index.js +5 -0
  524. package/dist/schema/messages.d.ts +2706 -0
  525. package/dist/schema/messages.js +344 -0
  526. package/dist/schema/options.d.ts +270 -0
  527. package/dist/schema/options.js +198 -0
  528. package/dist/speech.d.ts +266 -0
  529. package/dist/speech.js +114 -0
  530. package/dist/test-ai.d.ts +15 -0
  531. package/dist/test-ai.js +49 -0
  532. package/dist/testing.d.ts +1585 -0
  533. package/dist/testing.js +108 -0
  534. package/dist/tool-history.d.ts +2 -0
  535. package/dist/tool-history.js +91 -0
  536. package/dist/tool-runtime.d.ts +22 -0
  537. package/dist/tool-runtime.js +55 -0
  538. package/dist/tool-updates.d.ts +34 -0
  539. package/dist/tool-updates.js +93 -0
  540. package/dist/tool.d.ts +150 -0
  541. package/dist/tool.js +159 -0
  542. package/dist/transcription.d.ts +254 -0
  543. package/dist/transcription.js +119 -0
  544. package/dist/utils/bytes.d.ts +1 -0
  545. package/dist/utils/bytes.js +10 -0
  546. package/dist/utils/json.d.ts +4 -0
  547. package/dist/utils/json.js +4 -0
  548. package/dist/utils/media-type.d.ts +8 -0
  549. package/dist/utils/media-type.js +93 -0
  550. package/dist/utils/provider-codes.d.ts +3 -0
  551. package/dist/utils/provider-codes.js +41 -0
  552. package/dist/utils/record.d.ts +2 -0
  553. package/dist/utils/record.js +2 -0
  554. package/dist/utils/sanitize.d.ts +5 -0
  555. package/dist/utils/sanitize.js +31 -0
  556. package/dist/video-client.d.ts +12 -0
  557. package/dist/video-client.js +24 -0
  558. package/dist/video.d.ts +178 -0
  559. package/dist/video.js +79 -0
  560. package/package.json +648 -4
@@ -0,0 +1,2509 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { HttpTransport } from "../route/transport/index.js";
3
+ import { Protocol } from "../route/protocol.js";
4
+ import { AIError, StreamEvent, Usage, type LLMRequest, type MediaPart, type ProviderMetadata, type ToolChanges, type ToolDefinition } from "../schema/index.js";
5
+ import type { Media } from "../media.js";
6
+ import { OpenResponsesOptions } from "./utils/open-responses-options.js";
7
+ import { Lifecycle } from "./utils/lifecycle.js";
8
+ import { ToolStream } from "./utils/tool-stream.js";
9
+ import { OpenAIFreeform } from "./openai-freeform.js";
10
+ export declare const PATH = "/responses";
11
+ export declare const OpenResponsesInputText: Schema.Struct<{
12
+ readonly type: Schema.tag<"input_text">;
13
+ readonly text: Schema.String;
14
+ }>;
15
+ export declare const OpenResponsesInputImage: Schema.Struct<{
16
+ readonly type: Schema.tag<"input_image">;
17
+ readonly image_url: Schema.String;
18
+ readonly detail: Schema.optional<Schema.String>;
19
+ }>;
20
+ export declare const OpenResponsesInputFile: Schema.Struct<{
21
+ readonly type: Schema.tag<"input_file">;
22
+ readonly filename: Schema.optional<Schema.String>;
23
+ readonly detail: Schema.optional<Schema.String>;
24
+ readonly file_data: Schema.optional<Schema.String>;
25
+ readonly file_url: Schema.optional<Schema.String>;
26
+ }>;
27
+ declare const MediaInput: Schema.Union<readonly [Schema.Struct<{
28
+ readonly type: Schema.tag<"input_image">;
29
+ readonly image_url: Schema.String;
30
+ readonly detail: Schema.optional<Schema.String>;
31
+ }>, Schema.Struct<{
32
+ readonly type: Schema.tag<"input_file">;
33
+ readonly filename: Schema.optional<Schema.String>;
34
+ readonly detail: Schema.optional<Schema.String>;
35
+ readonly file_data: Schema.optional<Schema.String>;
36
+ readonly file_url: Schema.optional<Schema.String>;
37
+ }>, Schema.Struct<{
38
+ readonly type: Schema.tag<"input_video">;
39
+ readonly video_url: Schema.String;
40
+ }>]>;
41
+ export type MediaInput = Schema.Schema.Type<typeof MediaInput>;
42
+ export declare const OpenResponsesOutputText: Schema.Struct<{
43
+ readonly type: Schema.tag<"output_text">;
44
+ readonly text: Schema.String;
45
+ }>;
46
+ export declare const MessagePhase: Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>;
47
+ type MessagePhase = Schema.Schema.Type<typeof MessagePhase>;
48
+ export declare const MessageMetadata: Schema.Struct<{
49
+ readonly itemId: Schema.optional<Schema.String>;
50
+ readonly status: Schema.optional<Schema.String>;
51
+ readonly phase: Schema.optional<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
52
+ }>;
53
+ export declare const OpenResponsesReasoningItem: Schema.Struct<{
54
+ readonly type: Schema.tag<"reasoning">;
55
+ readonly id: Schema.optionalKey<Schema.String>;
56
+ readonly summary: Schema.$Array<Schema.Struct<{
57
+ readonly type: Schema.tag<"summary_text">;
58
+ readonly text: Schema.String;
59
+ }>>;
60
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
61
+ }>;
62
+ export declare const HostedToolItem: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
63
+ readonly type: Schema.tag<"web_search_call">;
64
+ readonly id: Schema.String;
65
+ readonly status: Schema.optional<Schema.String>;
66
+ readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
67
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
68
+ readonly type: Schema.tag<"file_search_call">;
69
+ readonly id: Schema.String;
70
+ readonly status: Schema.optional<Schema.String>;
71
+ readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
72
+ readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
73
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
74
+ readonly type: Schema.tag<"code_interpreter_call">;
75
+ readonly id: Schema.String;
76
+ readonly status: Schema.optional<Schema.String>;
77
+ readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
78
+ readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
79
+ readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
80
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
81
+ readonly type: Schema.tag<"mcp_call">;
82
+ readonly id: Schema.String;
83
+ readonly status: Schema.optional<Schema.String>;
84
+ readonly server_label: Schema.optional<Schema.String>;
85
+ readonly name: Schema.optional<Schema.String>;
86
+ readonly arguments: Schema.optional<Schema.String>;
87
+ readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
88
+ readonly error: Schema.optional<Schema.Unknown>;
89
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>;
90
+ export type HostedToolItem = Schema.Schema.Type<typeof HostedToolItem>;
91
+ export declare const CompactionItem: Schema.Struct<{
92
+ readonly type: Schema.Literal<"compaction">;
93
+ readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
94
+ readonly encrypted_content: Schema.String;
95
+ }>;
96
+ export declare const ConfigurationUpdate: Schema.Struct<{
97
+ readonly type: Schema.Literal<"configuration_update">;
98
+ readonly reasoning: Schema.Struct<{
99
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
100
+ }>;
101
+ }>;
102
+ export type ConfigurationUpdate = Schema.Schema.Type<typeof ConfigurationUpdate>;
103
+ export declare const HostedToolReplay: Schema.StructWithRest<Schema.Struct<{
104
+ readonly type: Schema.String;
105
+ readonly id: Schema.String;
106
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
107
+ export type HostedToolReplayItem = Schema.Schema.Type<typeof HostedToolReplay>;
108
+ export declare const Tool: Schema.Struct<{
109
+ readonly type: Schema.tag<"function">;
110
+ readonly name: Schema.String;
111
+ readonly description: Schema.String;
112
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
113
+ readonly strict: Schema.optional<Schema.Boolean>;
114
+ }>;
115
+ export declare const CustomTool: Schema.Struct<{
116
+ readonly type: Schema.tag<"custom">;
117
+ readonly name: Schema.String;
118
+ readonly description: Schema.String;
119
+ readonly format: Schema.Union<readonly [Schema.Struct<{
120
+ readonly type: Schema.tag<"text">;
121
+ }>, Schema.Struct<{
122
+ readonly type: Schema.tag<"grammar">;
123
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
124
+ readonly definition: Schema.String;
125
+ }>]>;
126
+ }>;
127
+ export declare const HostedTool: Schema.StructWithRest<Schema.Struct<{
128
+ readonly type: Schema.String;
129
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
130
+ export type HostedTool = Schema.Schema.Type<typeof HostedTool>;
131
+ export declare const AdditionalTools: Schema.Struct<{
132
+ readonly type: Schema.Literal<"additional_tools">;
133
+ readonly role: Schema.Literal<"developer">;
134
+ readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
135
+ readonly type: Schema.tag<"function">;
136
+ readonly name: Schema.String;
137
+ readonly description: Schema.String;
138
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
139
+ readonly strict: Schema.optional<Schema.Boolean>;
140
+ }>, Schema.Struct<{
141
+ readonly type: Schema.tag<"custom">;
142
+ readonly name: Schema.String;
143
+ readonly description: Schema.String;
144
+ readonly format: Schema.Union<readonly [Schema.Struct<{
145
+ readonly type: Schema.tag<"text">;
146
+ }>, Schema.Struct<{
147
+ readonly type: Schema.tag<"grammar">;
148
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
149
+ readonly definition: Schema.String;
150
+ }>]>;
151
+ }>, Schema.StructWithRest<Schema.Struct<{
152
+ readonly type: Schema.String;
153
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
154
+ }>;
155
+ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
156
+ readonly type: Schema.Literal<"compaction">;
157
+ readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
158
+ readonly encrypted_content: Schema.String;
159
+ }>, Schema.Struct<{
160
+ readonly type: Schema.Literal<"configuration_update">;
161
+ readonly reasoning: Schema.Struct<{
162
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
163
+ }>;
164
+ }>, Schema.Struct<{
165
+ readonly type: Schema.Literal<"additional_tools">;
166
+ readonly role: Schema.Literal<"developer">;
167
+ readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
168
+ readonly type: Schema.tag<"function">;
169
+ readonly name: Schema.String;
170
+ readonly description: Schema.String;
171
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
172
+ readonly strict: Schema.optional<Schema.Boolean>;
173
+ }>, Schema.Struct<{
174
+ readonly type: Schema.tag<"custom">;
175
+ readonly name: Schema.String;
176
+ readonly description: Schema.String;
177
+ readonly format: Schema.Union<readonly [Schema.Struct<{
178
+ readonly type: Schema.tag<"text">;
179
+ }>, Schema.Struct<{
180
+ readonly type: Schema.tag<"grammar">;
181
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
182
+ readonly definition: Schema.String;
183
+ }>]>;
184
+ }>, Schema.StructWithRest<Schema.Struct<{
185
+ readonly type: Schema.String;
186
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
187
+ }>, Schema.Struct<{
188
+ readonly type: Schema.tag<"message">;
189
+ readonly role: Schema.tag<"system">;
190
+ readonly content: Schema.String;
191
+ }>, Schema.Struct<{
192
+ readonly type: Schema.tag<"message">;
193
+ readonly role: Schema.tag<"developer">;
194
+ readonly content: Schema.String;
195
+ }>, Schema.Struct<{
196
+ readonly type: Schema.tag<"message">;
197
+ readonly role: Schema.tag<"user">;
198
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
199
+ readonly type: Schema.tag<"input_text">;
200
+ readonly text: Schema.String;
201
+ }>, Schema.Union<readonly [Schema.Struct<{
202
+ readonly type: Schema.tag<"input_image">;
203
+ readonly image_url: Schema.String;
204
+ readonly detail: Schema.optional<Schema.String>;
205
+ }>, Schema.Struct<{
206
+ readonly type: Schema.tag<"input_file">;
207
+ readonly filename: Schema.optional<Schema.String>;
208
+ readonly detail: Schema.optional<Schema.String>;
209
+ readonly file_data: Schema.optional<Schema.String>;
210
+ readonly file_url: Schema.optional<Schema.String>;
211
+ }>, Schema.Struct<{
212
+ readonly type: Schema.tag<"input_video">;
213
+ readonly video_url: Schema.String;
214
+ }>]>]>>;
215
+ readonly id: Schema.optional<Schema.String>;
216
+ readonly status: Schema.optional<Schema.String>;
217
+ }>, Schema.Struct<{
218
+ readonly type: Schema.tag<"message">;
219
+ readonly id: Schema.optionalKey<Schema.String>;
220
+ readonly role: Schema.tag<"assistant">;
221
+ readonly content: Schema.$Array<Schema.Struct<{
222
+ readonly type: Schema.tag<"output_text">;
223
+ readonly text: Schema.String;
224
+ }>>;
225
+ readonly phase: Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
226
+ readonly status: Schema.optional<Schema.String>;
227
+ }>, Schema.Struct<{
228
+ readonly type: Schema.tag<"reasoning">;
229
+ readonly id: Schema.optionalKey<Schema.String>;
230
+ readonly summary: Schema.$Array<Schema.Struct<{
231
+ readonly type: Schema.tag<"summary_text">;
232
+ readonly text: Schema.String;
233
+ }>>;
234
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
235
+ }>, Schema.Struct<{
236
+ readonly type: Schema.tag<"function_call">;
237
+ readonly id: Schema.optionalKey<Schema.String>;
238
+ readonly call_id: Schema.String;
239
+ readonly name: Schema.String;
240
+ readonly namespace: Schema.optional<Schema.String>;
241
+ readonly arguments: Schema.String;
242
+ }>, Schema.Struct<{
243
+ readonly type: Schema.Literals<readonly ["function_call_output", "custom_tool_call_output"]>;
244
+ readonly call_id: Schema.String;
245
+ readonly output: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
246
+ readonly type: Schema.tag<"input_text">;
247
+ readonly text: Schema.String;
248
+ }>, Schema.Struct<{
249
+ readonly type: Schema.tag<"input_image">;
250
+ readonly image_url: Schema.String;
251
+ readonly detail: Schema.optional<Schema.String>;
252
+ }>, Schema.Struct<{
253
+ readonly type: Schema.tag<"input_file">;
254
+ readonly filename: Schema.optional<Schema.String>;
255
+ readonly detail: Schema.optional<Schema.String>;
256
+ readonly file_data: Schema.optional<Schema.String>;
257
+ readonly file_url: Schema.optional<Schema.String>;
258
+ }>, Schema.Struct<{
259
+ readonly type: Schema.tag<"input_video">;
260
+ readonly video_url: Schema.String;
261
+ }>]>>]>;
262
+ }>, Schema.Struct<{
263
+ readonly type: Schema.tag<"custom_tool_call">;
264
+ readonly id: Schema.optionalKey<Schema.String>;
265
+ readonly call_id: Schema.String;
266
+ readonly name: Schema.String;
267
+ readonly input: Schema.String;
268
+ }>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
269
+ readonly type: Schema.tag<"web_search_call">;
270
+ readonly id: Schema.String;
271
+ readonly status: Schema.optional<Schema.String>;
272
+ readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
273
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
274
+ readonly type: Schema.tag<"file_search_call">;
275
+ readonly id: Schema.String;
276
+ readonly status: Schema.optional<Schema.String>;
277
+ readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
278
+ readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
279
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
280
+ readonly type: Schema.tag<"code_interpreter_call">;
281
+ readonly id: Schema.String;
282
+ readonly status: Schema.optional<Schema.String>;
283
+ readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
284
+ readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
285
+ readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
286
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
287
+ readonly type: Schema.tag<"mcp_call">;
288
+ readonly id: Schema.String;
289
+ readonly status: Schema.optional<Schema.String>;
290
+ readonly server_label: Schema.optional<Schema.String>;
291
+ readonly name: Schema.optional<Schema.String>;
292
+ readonly arguments: Schema.optional<Schema.String>;
293
+ readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
294
+ readonly error: Schema.optional<Schema.Unknown>;
295
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
296
+ readonly type: Schema.String;
297
+ readonly id: Schema.String;
298
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>;
299
+ type OpenResponsesInputItem = Schema.Schema.Type<typeof InputItem>;
300
+ export declare const ToolChoice: Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
301
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
302
+ readonly name: Schema.String;
303
+ }>, Schema.Struct<{
304
+ readonly type: Schema.tag<"allowed_tools">;
305
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
306
+ readonly tools: Schema.$Array<Schema.Struct<{
307
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
308
+ readonly name: Schema.String;
309
+ }>>;
310
+ }>]>;
311
+ export declare const coreFields: {
312
+ model: Schema.String;
313
+ input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
314
+ readonly type: Schema.Literal<"compaction">;
315
+ readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
316
+ readonly encrypted_content: Schema.String;
317
+ }>, Schema.Struct<{
318
+ readonly type: Schema.Literal<"configuration_update">;
319
+ readonly reasoning: Schema.Struct<{
320
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
321
+ }>;
322
+ }>, Schema.Struct<{
323
+ readonly type: Schema.Literal<"additional_tools">;
324
+ readonly role: Schema.Literal<"developer">;
325
+ readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
326
+ readonly type: Schema.tag<"function">;
327
+ readonly name: Schema.String;
328
+ readonly description: Schema.String;
329
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
330
+ readonly strict: Schema.optional<Schema.Boolean>;
331
+ }>, Schema.Struct<{
332
+ readonly type: Schema.tag<"custom">;
333
+ readonly name: Schema.String;
334
+ readonly description: Schema.String;
335
+ readonly format: Schema.Union<readonly [Schema.Struct<{
336
+ readonly type: Schema.tag<"text">;
337
+ }>, Schema.Struct<{
338
+ readonly type: Schema.tag<"grammar">;
339
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
340
+ readonly definition: Schema.String;
341
+ }>]>;
342
+ }>, Schema.StructWithRest<Schema.Struct<{
343
+ readonly type: Schema.String;
344
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
345
+ }>, Schema.Struct<{
346
+ readonly type: Schema.tag<"message">;
347
+ readonly role: Schema.tag<"system">;
348
+ readonly content: Schema.String;
349
+ }>, Schema.Struct<{
350
+ readonly type: Schema.tag<"message">;
351
+ readonly role: Schema.tag<"developer">;
352
+ readonly content: Schema.String;
353
+ }>, Schema.Struct<{
354
+ readonly type: Schema.tag<"message">;
355
+ readonly role: Schema.tag<"user">;
356
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
357
+ readonly type: Schema.tag<"input_text">;
358
+ readonly text: Schema.String;
359
+ }>, Schema.Union<readonly [Schema.Struct<{
360
+ readonly type: Schema.tag<"input_image">;
361
+ readonly image_url: Schema.String;
362
+ readonly detail: Schema.optional<Schema.String>;
363
+ }>, Schema.Struct<{
364
+ readonly type: Schema.tag<"input_file">;
365
+ readonly filename: Schema.optional<Schema.String>;
366
+ readonly detail: Schema.optional<Schema.String>;
367
+ readonly file_data: Schema.optional<Schema.String>;
368
+ readonly file_url: Schema.optional<Schema.String>;
369
+ }>, Schema.Struct<{
370
+ readonly type: Schema.tag<"input_video">;
371
+ readonly video_url: Schema.String;
372
+ }>]>]>>;
373
+ readonly id: Schema.optional<Schema.String>;
374
+ readonly status: Schema.optional<Schema.String>;
375
+ }>, Schema.Struct<{
376
+ readonly type: Schema.tag<"message">;
377
+ readonly id: Schema.optionalKey<Schema.String>;
378
+ readonly role: Schema.tag<"assistant">;
379
+ readonly content: Schema.$Array<Schema.Struct<{
380
+ readonly type: Schema.tag<"output_text">;
381
+ readonly text: Schema.String;
382
+ }>>;
383
+ readonly phase: Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
384
+ readonly status: Schema.optional<Schema.String>;
385
+ }>, Schema.Struct<{
386
+ readonly type: Schema.tag<"reasoning">;
387
+ readonly id: Schema.optionalKey<Schema.String>;
388
+ readonly summary: Schema.$Array<Schema.Struct<{
389
+ readonly type: Schema.tag<"summary_text">;
390
+ readonly text: Schema.String;
391
+ }>>;
392
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
393
+ }>, Schema.Struct<{
394
+ readonly type: Schema.tag<"function_call">;
395
+ readonly id: Schema.optionalKey<Schema.String>;
396
+ readonly call_id: Schema.String;
397
+ readonly name: Schema.String;
398
+ readonly namespace: Schema.optional<Schema.String>;
399
+ readonly arguments: Schema.String;
400
+ }>, Schema.Struct<{
401
+ readonly type: Schema.Literals<readonly ["function_call_output", "custom_tool_call_output"]>;
402
+ readonly call_id: Schema.String;
403
+ readonly output: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
404
+ readonly type: Schema.tag<"input_text">;
405
+ readonly text: Schema.String;
406
+ }>, Schema.Struct<{
407
+ readonly type: Schema.tag<"input_image">;
408
+ readonly image_url: Schema.String;
409
+ readonly detail: Schema.optional<Schema.String>;
410
+ }>, Schema.Struct<{
411
+ readonly type: Schema.tag<"input_file">;
412
+ readonly filename: Schema.optional<Schema.String>;
413
+ readonly detail: Schema.optional<Schema.String>;
414
+ readonly file_data: Schema.optional<Schema.String>;
415
+ readonly file_url: Schema.optional<Schema.String>;
416
+ }>, Schema.Struct<{
417
+ readonly type: Schema.tag<"input_video">;
418
+ readonly video_url: Schema.String;
419
+ }>]>>]>;
420
+ }>, Schema.Struct<{
421
+ readonly type: Schema.tag<"custom_tool_call">;
422
+ readonly id: Schema.optionalKey<Schema.String>;
423
+ readonly call_id: Schema.String;
424
+ readonly name: Schema.String;
425
+ readonly input: Schema.String;
426
+ }>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
427
+ readonly type: Schema.tag<"web_search_call">;
428
+ readonly id: Schema.String;
429
+ readonly status: Schema.optional<Schema.String>;
430
+ readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
431
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
432
+ readonly type: Schema.tag<"file_search_call">;
433
+ readonly id: Schema.String;
434
+ readonly status: Schema.optional<Schema.String>;
435
+ readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
436
+ readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
437
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
438
+ readonly type: Schema.tag<"code_interpreter_call">;
439
+ readonly id: Schema.String;
440
+ readonly status: Schema.optional<Schema.String>;
441
+ readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
442
+ readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
443
+ readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
444
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
445
+ readonly type: Schema.tag<"mcp_call">;
446
+ readonly id: Schema.String;
447
+ readonly status: Schema.optional<Schema.String>;
448
+ readonly server_label: Schema.optional<Schema.String>;
449
+ readonly name: Schema.optional<Schema.String>;
450
+ readonly arguments: Schema.optional<Schema.String>;
451
+ readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
452
+ readonly error: Schema.optional<Schema.Unknown>;
453
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
454
+ readonly type: Schema.String;
455
+ readonly id: Schema.String;
456
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
457
+ instructions: Schema.optional<Schema.String>;
458
+ tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
459
+ readonly type: Schema.tag<"function">;
460
+ readonly name: Schema.String;
461
+ readonly description: Schema.String;
462
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
463
+ readonly strict: Schema.optional<Schema.Boolean>;
464
+ }>, Schema.Struct<{
465
+ readonly type: Schema.tag<"custom">;
466
+ readonly name: Schema.String;
467
+ readonly description: Schema.String;
468
+ readonly format: Schema.Union<readonly [Schema.Struct<{
469
+ readonly type: Schema.tag<"text">;
470
+ }>, Schema.Struct<{
471
+ readonly type: Schema.tag<"grammar">;
472
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
473
+ readonly definition: Schema.String;
474
+ }>]>;
475
+ }>, Schema.StructWithRest<Schema.Struct<{
476
+ readonly type: Schema.String;
477
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>>;
478
+ tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
479
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
480
+ readonly name: Schema.String;
481
+ }>, Schema.Struct<{
482
+ readonly type: Schema.tag<"allowed_tools">;
483
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
484
+ readonly tools: Schema.$Array<Schema.Struct<{
485
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
486
+ readonly name: Schema.String;
487
+ }>>;
488
+ }>]>>;
489
+ store: Schema.optional<Schema.Boolean>;
490
+ metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
491
+ safety_identifier: Schema.optional<Schema.String>;
492
+ stream_options: Schema.optional<Schema.Struct<{
493
+ readonly include_obfuscation: Schema.optional<Schema.Boolean>;
494
+ }>>;
495
+ top_logprobs: Schema.optional<Schema.Int>;
496
+ truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
497
+ service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">, import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">>>;
498
+ prompt_cache_key: Schema.optional<Schema.String>;
499
+ include: Schema.optional<Schema.$Array<Schema.declare<import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">, import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">>>>;
500
+ reasoning: Schema.optional<Schema.Struct<{
501
+ readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
502
+ readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
503
+ }>>;
504
+ text: Schema.optional<Schema.Struct<{
505
+ readonly verbosity: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium">, import("../schema/options.js").OpenString<"high" | "low" | "medium">>>;
506
+ }>>;
507
+ max_output_tokens: Schema.optional<Schema.Number>;
508
+ max_tool_calls: Schema.optional<Schema.Int>;
509
+ parallel_tool_calls: Schema.optional<Schema.Boolean>;
510
+ temperature: Schema.optional<Schema.Number>;
511
+ top_p: Schema.optional<Schema.Number>;
512
+ presence_penalty: Schema.optional<Schema.Number>;
513
+ frequency_penalty: Schema.optional<Schema.Number>;
514
+ };
515
+ export declare const OpenResponsesBody: Schema.Struct<{
516
+ readonly model: Schema.String;
517
+ readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
518
+ readonly type: Schema.Literal<"compaction">;
519
+ readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
520
+ readonly encrypted_content: Schema.String;
521
+ }>, Schema.Struct<{
522
+ readonly type: Schema.Literal<"configuration_update">;
523
+ readonly reasoning: Schema.Struct<{
524
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
525
+ }>;
526
+ }>, Schema.Struct<{
527
+ readonly type: Schema.Literal<"additional_tools">;
528
+ readonly role: Schema.Literal<"developer">;
529
+ readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
530
+ readonly type: Schema.tag<"function">;
531
+ readonly name: Schema.String;
532
+ readonly description: Schema.String;
533
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
534
+ readonly strict: Schema.optional<Schema.Boolean>;
535
+ }>, Schema.Struct<{
536
+ readonly type: Schema.tag<"custom">;
537
+ readonly name: Schema.String;
538
+ readonly description: Schema.String;
539
+ readonly format: Schema.Union<readonly [Schema.Struct<{
540
+ readonly type: Schema.tag<"text">;
541
+ }>, Schema.Struct<{
542
+ readonly type: Schema.tag<"grammar">;
543
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
544
+ readonly definition: Schema.String;
545
+ }>]>;
546
+ }>, Schema.StructWithRest<Schema.Struct<{
547
+ readonly type: Schema.String;
548
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
549
+ }>, Schema.Struct<{
550
+ readonly type: Schema.tag<"message">;
551
+ readonly role: Schema.tag<"system">;
552
+ readonly content: Schema.String;
553
+ }>, Schema.Struct<{
554
+ readonly type: Schema.tag<"message">;
555
+ readonly role: Schema.tag<"developer">;
556
+ readonly content: Schema.String;
557
+ }>, Schema.Struct<{
558
+ readonly type: Schema.tag<"message">;
559
+ readonly role: Schema.tag<"user">;
560
+ readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
561
+ readonly type: Schema.tag<"input_text">;
562
+ readonly text: Schema.String;
563
+ }>, Schema.Union<readonly [Schema.Struct<{
564
+ readonly type: Schema.tag<"input_image">;
565
+ readonly image_url: Schema.String;
566
+ readonly detail: Schema.optional<Schema.String>;
567
+ }>, Schema.Struct<{
568
+ readonly type: Schema.tag<"input_file">;
569
+ readonly filename: Schema.optional<Schema.String>;
570
+ readonly detail: Schema.optional<Schema.String>;
571
+ readonly file_data: Schema.optional<Schema.String>;
572
+ readonly file_url: Schema.optional<Schema.String>;
573
+ }>, Schema.Struct<{
574
+ readonly type: Schema.tag<"input_video">;
575
+ readonly video_url: Schema.String;
576
+ }>]>]>>;
577
+ readonly id: Schema.optional<Schema.String>;
578
+ readonly status: Schema.optional<Schema.String>;
579
+ }>, Schema.Struct<{
580
+ readonly type: Schema.tag<"message">;
581
+ readonly id: Schema.optionalKey<Schema.String>;
582
+ readonly role: Schema.tag<"assistant">;
583
+ readonly content: Schema.$Array<Schema.Struct<{
584
+ readonly type: Schema.tag<"output_text">;
585
+ readonly text: Schema.String;
586
+ }>>;
587
+ readonly phase: Schema.optionalKey<Schema.NullOr<Schema.Literals<readonly ["commentary", "final_answer"]>>>;
588
+ readonly status: Schema.optional<Schema.String>;
589
+ }>, Schema.Struct<{
590
+ readonly type: Schema.tag<"reasoning">;
591
+ readonly id: Schema.optionalKey<Schema.String>;
592
+ readonly summary: Schema.$Array<Schema.Struct<{
593
+ readonly type: Schema.tag<"summary_text">;
594
+ readonly text: Schema.String;
595
+ }>>;
596
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
597
+ }>, Schema.Struct<{
598
+ readonly type: Schema.tag<"function_call">;
599
+ readonly id: Schema.optionalKey<Schema.String>;
600
+ readonly call_id: Schema.String;
601
+ readonly name: Schema.String;
602
+ readonly namespace: Schema.optional<Schema.String>;
603
+ readonly arguments: Schema.String;
604
+ }>, Schema.Struct<{
605
+ readonly type: Schema.Literals<readonly ["function_call_output", "custom_tool_call_output"]>;
606
+ readonly call_id: Schema.String;
607
+ readonly output: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
608
+ readonly type: Schema.tag<"input_text">;
609
+ readonly text: Schema.String;
610
+ }>, Schema.Struct<{
611
+ readonly type: Schema.tag<"input_image">;
612
+ readonly image_url: Schema.String;
613
+ readonly detail: Schema.optional<Schema.String>;
614
+ }>, Schema.Struct<{
615
+ readonly type: Schema.tag<"input_file">;
616
+ readonly filename: Schema.optional<Schema.String>;
617
+ readonly detail: Schema.optional<Schema.String>;
618
+ readonly file_data: Schema.optional<Schema.String>;
619
+ readonly file_url: Schema.optional<Schema.String>;
620
+ }>, Schema.Struct<{
621
+ readonly type: Schema.tag<"input_video">;
622
+ readonly video_url: Schema.String;
623
+ }>]>>]>;
624
+ }>, Schema.Struct<{
625
+ readonly type: Schema.tag<"custom_tool_call">;
626
+ readonly id: Schema.optionalKey<Schema.String>;
627
+ readonly call_id: Schema.String;
628
+ readonly name: Schema.String;
629
+ readonly input: Schema.String;
630
+ }>, Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
631
+ readonly type: Schema.tag<"web_search_call">;
632
+ readonly id: Schema.String;
633
+ readonly status: Schema.optional<Schema.String>;
634
+ readonly action: Schema.optional<Schema.NullOr<Schema.$Record<Schema.String, Schema.Unknown>>>;
635
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
636
+ readonly type: Schema.tag<"file_search_call">;
637
+ readonly id: Schema.String;
638
+ readonly status: Schema.optional<Schema.String>;
639
+ readonly queries: Schema.optional<Schema.$Array<Schema.String>>;
640
+ readonly results: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
641
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
642
+ readonly type: Schema.tag<"code_interpreter_call">;
643
+ readonly id: Schema.String;
644
+ readonly status: Schema.optional<Schema.String>;
645
+ readonly code: Schema.optional<Schema.NullOr<Schema.String>>;
646
+ readonly container_id: Schema.optional<Schema.NullOr<Schema.String>>;
647
+ readonly outputs: Schema.optional<Schema.NullOr<Schema.$Array<Schema.$Record<Schema.String, Schema.Unknown>>>>;
648
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.StructWithRest<Schema.Struct<{
649
+ readonly type: Schema.tag<"mcp_call">;
650
+ readonly id: Schema.String;
651
+ readonly status: Schema.optional<Schema.String>;
652
+ readonly server_label: Schema.optional<Schema.String>;
653
+ readonly name: Schema.optional<Schema.String>;
654
+ readonly arguments: Schema.optional<Schema.String>;
655
+ readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
656
+ readonly error: Schema.optional<Schema.Unknown>;
657
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
658
+ readonly type: Schema.String;
659
+ readonly id: Schema.String;
660
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
661
+ readonly instructions: Schema.optional<Schema.String>;
662
+ readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
663
+ readonly type: Schema.tag<"function">;
664
+ readonly name: Schema.String;
665
+ readonly description: Schema.String;
666
+ readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
667
+ readonly strict: Schema.optional<Schema.Boolean>;
668
+ }>, Schema.Struct<{
669
+ readonly type: Schema.tag<"custom">;
670
+ readonly name: Schema.String;
671
+ readonly description: Schema.String;
672
+ readonly format: Schema.Union<readonly [Schema.Struct<{
673
+ readonly type: Schema.tag<"text">;
674
+ }>, Schema.Struct<{
675
+ readonly type: Schema.tag<"grammar">;
676
+ readonly syntax: Schema.Literals<readonly ["lark", "regex"]>;
677
+ readonly definition: Schema.String;
678
+ }>]>;
679
+ }>, Schema.StructWithRest<Schema.Struct<{
680
+ readonly type: Schema.String;
681
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>>;
682
+ readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
683
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
684
+ readonly name: Schema.String;
685
+ }>, Schema.Struct<{
686
+ readonly type: Schema.tag<"allowed_tools">;
687
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
688
+ readonly tools: Schema.$Array<Schema.Struct<{
689
+ readonly type: Schema.Literals<readonly ["function", "custom"]>;
690
+ readonly name: Schema.String;
691
+ }>>;
692
+ }>]>>;
693
+ readonly store: Schema.optional<Schema.Boolean>;
694
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
695
+ readonly safety_identifier: Schema.optional<Schema.String>;
696
+ readonly stream_options: Schema.optional<Schema.Struct<{
697
+ readonly include_obfuscation: Schema.optional<Schema.Boolean>;
698
+ }>>;
699
+ readonly top_logprobs: Schema.optional<Schema.Int>;
700
+ readonly truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
701
+ readonly service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">, import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">>>;
702
+ readonly prompt_cache_key: Schema.optional<Schema.String>;
703
+ readonly include: Schema.optional<Schema.$Array<Schema.declare<import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">, import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">>>>;
704
+ readonly reasoning: Schema.optional<Schema.Struct<{
705
+ readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
706
+ readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
707
+ }>>;
708
+ readonly text: Schema.optional<Schema.Struct<{
709
+ readonly verbosity: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium">, import("../schema/options.js").OpenString<"high" | "low" | "medium">>>;
710
+ }>>;
711
+ readonly max_output_tokens: Schema.optional<Schema.Number>;
712
+ readonly max_tool_calls: Schema.optional<Schema.Int>;
713
+ readonly parallel_tool_calls: Schema.optional<Schema.Boolean>;
714
+ readonly temperature: Schema.optional<Schema.Number>;
715
+ readonly top_p: Schema.optional<Schema.Number>;
716
+ readonly presence_penalty: Schema.optional<Schema.Number>;
717
+ readonly frequency_penalty: Schema.optional<Schema.Number>;
718
+ readonly stream: Schema.Literal<true>;
719
+ }>;
720
+ export type OpenResponsesBody = Schema.Schema.Type<typeof OpenResponsesBody>;
721
+ export declare const OpenResponsesUsage: Schema.StructWithRest<Schema.Struct<{
722
+ readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
723
+ readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
724
+ readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
725
+ readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
726
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
727
+ readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
728
+ readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
729
+ readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
730
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
731
+ readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
732
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
733
+ type OpenResponsesUsage = Schema.Schema.Type<typeof OpenResponsesUsage>;
734
+ export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
735
+ readonly type: Schema.String;
736
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
737
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
738
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
739
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
740
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
741
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
742
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
743
+ export type StreamItem = Schema.Schema.Type<typeof StreamItem>;
744
+ export type OutputItem = StreamItem & {
745
+ readonly id: string;
746
+ };
747
+ export declare const Event: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
748
+ readonly type: Schema.String;
749
+ readonly delta: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
750
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
751
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
752
+ readonly item_id: Schema.optional<Schema.String>;
753
+ readonly output_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
754
+ readonly summary_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
755
+ readonly item: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
756
+ readonly type: Schema.String;
757
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
758
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
759
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
760
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
761
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
762
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
763
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
764
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
765
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
766
+ readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
767
+ readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
768
+ readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
769
+ }>>>;
770
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
771
+ readonly type: Schema.String;
772
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
773
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
774
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
775
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
776
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
777
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
778
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
779
+ readonly type: Schema.String;
780
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
781
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
782
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
783
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
784
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
785
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
786
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
787
+ readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
788
+ readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
789
+ readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
790
+ readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
791
+ readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
792
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
793
+ readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
794
+ readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
795
+ readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
796
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
797
+ readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
798
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
799
+ readonly error: Schema.optional<Schema.Unknown>;
800
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
801
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
802
+ readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
803
+ readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
804
+ readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
805
+ }>>>;
806
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
807
+ readonly type: Schema.String;
808
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
809
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
810
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
811
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
812
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
813
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
814
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
815
+ readonly type: Schema.String;
816
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
817
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
818
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
819
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
820
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
821
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
822
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
823
+ readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
824
+ readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
825
+ readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
826
+ readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
827
+ readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
828
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
829
+ readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
830
+ readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
831
+ readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
832
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
833
+ readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
834
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
835
+ readonly error: Schema.optional<Schema.Unknown>;
836
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, never, never>;
837
+ readonly code: Schema.optional<Schema.Unknown>;
838
+ readonly message: Schema.optional<Schema.Unknown>;
839
+ readonly error: Schema.optional<Schema.Unknown>;
840
+ readonly status: Schema.optional<Schema.Unknown>;
841
+ readonly status_code: Schema.optional<Schema.Unknown>;
842
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.decodeTo<Schema.StructWithRest<Schema.Struct<{
843
+ readonly type: Schema.String;
844
+ readonly delta: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
845
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
846
+ readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
847
+ readonly item_id: Schema.optional<Schema.String>;
848
+ readonly output_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
849
+ readonly summary_index: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optional<Schema.NullOr<Schema.Number>>, never, never>;
850
+ readonly item: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
851
+ readonly type: Schema.String;
852
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
853
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
854
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
855
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
856
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
857
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
858
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
859
+ readonly response: Schema.decodeTo<Schema.optional<Schema.toType<Schema.StructWithRest<Schema.Struct<{
860
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
861
+ readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
862
+ readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
863
+ readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
864
+ }>>>;
865
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
866
+ readonly type: Schema.String;
867
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
868
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
869
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
870
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
871
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
872
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
873
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
874
+ readonly type: Schema.String;
875
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
876
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
877
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
878
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
879
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
880
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
881
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
882
+ readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
883
+ readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
884
+ readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
885
+ readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
886
+ readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
887
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
888
+ readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
889
+ readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
890
+ readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
891
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
892
+ readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
893
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
894
+ readonly error: Schema.optional<Schema.Unknown>;
895
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
896
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
897
+ readonly service_tier: Schema.optional<Schema.NullOr<Schema.String>>;
898
+ readonly incomplete_details: Schema.optional<Schema.NullOr<Schema.Struct<{
899
+ readonly reason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
900
+ }>>>;
901
+ readonly output: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
902
+ readonly type: Schema.String;
903
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
904
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
905
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
906
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
907
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
908
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
909
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, Schema.optional<Schema.NullOr<Schema.$Array<Schema.StructWithRest<Schema.Struct<{
910
+ readonly type: Schema.String;
911
+ readonly id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
912
+ readonly call_id: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
913
+ readonly name: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
914
+ readonly namespace: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
915
+ readonly arguments: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optional<Schema.NullOr<Schema.String>>, never, never>;
916
+ readonly encrypted_content: Schema.optional<Schema.NullOr<Schema.String>>;
917
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>>, never, never>;
918
+ readonly usage: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
919
+ readonly input_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
920
+ readonly input_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
921
+ readonly cached_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
922
+ readonly cache_write_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
923
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
924
+ readonly output_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
925
+ readonly output_tokens_details: Schema.optional<Schema.NullOr<Schema.StructWithRest<Schema.Struct<{
926
+ readonly reasoning_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
927
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
928
+ readonly total_tokens: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
929
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>;
930
+ readonly error: Schema.optional<Schema.Unknown>;
931
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>>>, never, never>;
932
+ readonly code: Schema.optional<Schema.Unknown>;
933
+ readonly message: Schema.optional<Schema.Unknown>;
934
+ readonly error: Schema.optional<Schema.Unknown>;
935
+ readonly status: Schema.optional<Schema.Unknown>;
936
+ readonly status_code: Schema.optional<Schema.Unknown>;
937
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.$Record<Schema.String, Schema.Unknown>, never, never>]>;
938
+ export type Event = Schema.Schema.Type<typeof Event>;
939
+ export type NormalizedEvent = Event & {
940
+ readonly item?: OutputItem | null;
941
+ };
942
+ /** Decodes one WebSocket frame. */
943
+ export declare const decodeChannelEvent: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
944
+ readonly [x: string]: unknown;
945
+ readonly type: string;
946
+ readonly delta?: string | undefined;
947
+ readonly arguments?: string | undefined;
948
+ readonly text?: string | undefined;
949
+ readonly item_id?: string | undefined;
950
+ readonly output_index?: number | undefined;
951
+ readonly summary_index?: number | undefined;
952
+ readonly item?: {
953
+ readonly [x: string]: unknown;
954
+ readonly type: string;
955
+ readonly id?: string | undefined;
956
+ readonly call_id?: string | undefined;
957
+ readonly name?: string | undefined;
958
+ readonly namespace?: string | undefined;
959
+ readonly arguments?: string | undefined;
960
+ readonly encrypted_content?: string | null | undefined;
961
+ } | null | undefined;
962
+ readonly response?: {
963
+ readonly [x: string]: unknown;
964
+ readonly id?: string | undefined;
965
+ readonly service_tier?: string | null | undefined;
966
+ readonly incomplete_details?: {
967
+ readonly reason?: string | undefined;
968
+ } | null | undefined;
969
+ readonly output?: readonly {
970
+ readonly [x: string]: unknown;
971
+ readonly type: string;
972
+ readonly id?: string | undefined;
973
+ readonly call_id?: string | undefined;
974
+ readonly name?: string | undefined;
975
+ readonly namespace?: string | undefined;
976
+ readonly arguments?: string | undefined;
977
+ readonly encrypted_content?: string | null | undefined;
978
+ }[] | undefined;
979
+ readonly usage?: {
980
+ readonly [x: string]: unknown;
981
+ readonly input_tokens?: number | undefined;
982
+ readonly input_tokens_details?: {
983
+ readonly [x: string]: unknown;
984
+ readonly cached_tokens?: number | undefined;
985
+ readonly cache_write_tokens?: number | undefined;
986
+ } | null | undefined;
987
+ readonly output_tokens?: number | undefined;
988
+ readonly output_tokens_details?: {
989
+ readonly [x: string]: unknown;
990
+ readonly reasoning_tokens?: number | undefined;
991
+ } | null | undefined;
992
+ readonly total_tokens?: number | undefined;
993
+ } | null | undefined;
994
+ readonly error?: unknown;
995
+ } | undefined;
996
+ readonly code?: unknown;
997
+ readonly message?: unknown;
998
+ readonly error?: unknown;
999
+ readonly status?: unknown;
1000
+ readonly status_code?: unknown;
1001
+ }, Schema.SchemaError, never>;
1002
+ export interface ProviderAdapter {
1003
+ readonly id: string;
1004
+ readonly name: string;
1005
+ readonly nativeTool?: (native: NonNullable<ToolDefinition["native"]>) => Effect.Effect<HostedTool, AIError>;
1006
+ readonly lowerMedia?: (input: {
1007
+ readonly part: MediaPart;
1008
+ readonly media: Media.Inline | undefined;
1009
+ readonly request: LLMRequest;
1010
+ }) => MediaInput | undefined;
1011
+ readonly restoreHostedToolItem?: (item: unknown) => HostedToolReplayItem | undefined;
1012
+ /** Lowers a `Message.tools(...)` marker sent in place; routes without it must fold tool updates. */
1013
+ readonly lowerToolChanges?: (changes: ToolChanges) => Effect.Effect<ReadonlyArray<OpenResponsesInputItem>, AIError>;
1014
+ }
1015
+ export interface ParserState {
1016
+ readonly provider: LLMRequest["model"]["provider"];
1017
+ readonly completedCompactions: ReadonlySet<string>;
1018
+ readonly id: string;
1019
+ readonly name: string;
1020
+ readonly providerMetadataKey: string;
1021
+ readonly tools: ToolStream.State<string>;
1022
+ readonly custom: ReadonlyMap<string, OpenAIFreeform.Custom>;
1023
+ readonly hasFunctionCall: boolean;
1024
+ readonly lifecycle: Lifecycle.State;
1025
+ readonly outputItems: Readonly<Record<number, string>>;
1026
+ readonly message: {
1027
+ readonly id: string;
1028
+ readonly phase: MessagePhase | null | undefined;
1029
+ } | undefined;
1030
+ readonly reasoningItems: Readonly<Record<string, ReasoningStreamItem>>;
1031
+ }
1032
+ type ReasoningSummaryStatus = "active" | "can-conclude" | "concluded";
1033
+ interface ReasoningStreamItem {
1034
+ readonly encryptedContent: string | null | undefined;
1035
+ readonly summaryParts: Readonly<Record<number, ReasoningSummaryStatus>>;
1036
+ readonly deltaIndexes: ReadonlySet<number>;
1037
+ }
1038
+ export declare const lowerTool: (protocolName: string, tool: ToolDefinition) => Effect.Effect<{
1039
+ type: "function";
1040
+ name: string;
1041
+ description: string;
1042
+ parameters: {
1043
+ readonly [x: string]: unknown;
1044
+ };
1045
+ strict: boolean;
1046
+ }, AIError, never>;
1047
+ export declare const lowerCustomTool: (tool: ToolDefinition, custom: OpenAIFreeform.Custom) => {
1048
+ type: "custom";
1049
+ name: string;
1050
+ description: string;
1051
+ format: {
1052
+ syntax: "lark" | "regex";
1053
+ definition: string;
1054
+ type: "grammar";
1055
+ } | {
1056
+ type: "text";
1057
+ };
1058
+ };
1059
+ export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter: ProviderAdapter, custom: ReadonlyMap<string, OpenAIFreeform.Custom>) => Effect.Effect<({
1060
+ readonly type: "custom";
1061
+ readonly name: string;
1062
+ readonly description: string;
1063
+ readonly format: {
1064
+ readonly type: "text";
1065
+ } | {
1066
+ readonly type: "grammar";
1067
+ readonly syntax: "lark" | "regex";
1068
+ readonly definition: string;
1069
+ };
1070
+ } | {
1071
+ readonly type: "function";
1072
+ readonly name: string;
1073
+ readonly description: string;
1074
+ readonly parameters: {
1075
+ readonly [x: string]: unknown;
1076
+ };
1077
+ readonly strict?: boolean | undefined;
1078
+ } | {
1079
+ readonly [x: string]: unknown;
1080
+ readonly type: string;
1081
+ })[], AIError, never>;
1082
+ export declare const namedTool: (name: string, custom: ReadonlyMap<string, OpenAIFreeform.Custom>) => {
1083
+ type: "custom" | "function";
1084
+ name: string;
1085
+ };
1086
+ export declare const lowerToolChoice: (toolChoice: NonNullable<LLMRequest["toolChoice"]>, custom: ReadonlyMap<string, OpenAIFreeform.Custom>) => "auto" | "none" | "required" | {
1087
+ type: "custom" | "function";
1088
+ name: string;
1089
+ };
1090
+ export declare const lowerMessages: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
1091
+ readonly [x: string]: unknown;
1092
+ }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<({
1093
+ readonly type: "configuration_update";
1094
+ readonly reasoning: {
1095
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1096
+ };
1097
+ } | {
1098
+ readonly type: "additional_tools";
1099
+ readonly role: "developer";
1100
+ readonly tools: readonly ({
1101
+ readonly type: "custom";
1102
+ readonly name: string;
1103
+ readonly description: string;
1104
+ readonly format: {
1105
+ readonly type: "text";
1106
+ } | {
1107
+ readonly type: "grammar";
1108
+ readonly syntax: "lark" | "regex";
1109
+ readonly definition: string;
1110
+ };
1111
+ } | {
1112
+ readonly type: "function";
1113
+ readonly name: string;
1114
+ readonly description: string;
1115
+ readonly parameters: {
1116
+ readonly [x: string]: unknown;
1117
+ };
1118
+ readonly strict?: boolean | undefined;
1119
+ } | {
1120
+ readonly [x: string]: unknown;
1121
+ readonly type: string;
1122
+ })[];
1123
+ } | {
1124
+ readonly type: "message";
1125
+ readonly role: "system";
1126
+ readonly content: string;
1127
+ } | {
1128
+ readonly type: "message";
1129
+ readonly role: "developer";
1130
+ readonly content: string;
1131
+ } | {
1132
+ readonly type: "custom_tool_call_output" | "function_call_output";
1133
+ readonly call_id: string;
1134
+ readonly output: string | readonly ({
1135
+ readonly type: "input_text";
1136
+ readonly text: string;
1137
+ } | {
1138
+ readonly type: "input_video";
1139
+ readonly video_url: string;
1140
+ } | {
1141
+ readonly type: "input_image";
1142
+ readonly image_url: string;
1143
+ readonly detail?: string | undefined;
1144
+ } | {
1145
+ readonly type: "input_file";
1146
+ readonly filename?: string | undefined;
1147
+ readonly detail?: string | undefined;
1148
+ readonly file_data?: string | undefined;
1149
+ readonly file_url?: string | undefined;
1150
+ })[];
1151
+ } | {
1152
+ readonly type: "reasoning";
1153
+ readonly id?: string | undefined;
1154
+ readonly summary: readonly {
1155
+ readonly type: "summary_text";
1156
+ readonly text: string;
1157
+ }[];
1158
+ readonly encrypted_content?: string | null | undefined;
1159
+ } | {
1160
+ readonly type: "compaction";
1161
+ readonly id?: string | null | undefined;
1162
+ readonly encrypted_content: string;
1163
+ } | {
1164
+ readonly type: "message";
1165
+ readonly role: "user";
1166
+ readonly content: readonly ({
1167
+ readonly type: "input_text";
1168
+ readonly text: string;
1169
+ } | {
1170
+ readonly type: "input_video";
1171
+ readonly video_url: string;
1172
+ } | {
1173
+ readonly type: "input_image";
1174
+ readonly image_url: string;
1175
+ readonly detail?: string | undefined;
1176
+ } | {
1177
+ readonly type: "input_file";
1178
+ readonly filename?: string | undefined;
1179
+ readonly detail?: string | undefined;
1180
+ readonly file_data?: string | undefined;
1181
+ readonly file_url?: string | undefined;
1182
+ })[];
1183
+ readonly id?: string | undefined;
1184
+ readonly status?: string | undefined;
1185
+ } | {
1186
+ readonly type: "message";
1187
+ readonly id?: string | undefined;
1188
+ readonly role: "assistant";
1189
+ readonly content: readonly {
1190
+ readonly type: "output_text";
1191
+ readonly text: string;
1192
+ }[];
1193
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
1194
+ readonly status?: string | undefined;
1195
+ } | {
1196
+ readonly type: "function_call";
1197
+ readonly id?: string | undefined;
1198
+ readonly call_id: string;
1199
+ readonly name: string;
1200
+ readonly namespace?: string | undefined;
1201
+ readonly arguments: string;
1202
+ } | {
1203
+ readonly type: "custom_tool_call";
1204
+ readonly id?: string | undefined;
1205
+ readonly call_id: string;
1206
+ readonly name: string;
1207
+ readonly input: string;
1208
+ } | {
1209
+ readonly [x: string]: unknown;
1210
+ readonly type: "web_search_call";
1211
+ readonly id: string;
1212
+ readonly status?: string | undefined;
1213
+ readonly action?: {
1214
+ readonly [x: string]: unknown;
1215
+ } | null | undefined;
1216
+ } | {
1217
+ readonly [x: string]: unknown;
1218
+ readonly type: "file_search_call";
1219
+ readonly id: string;
1220
+ readonly status?: string | undefined;
1221
+ readonly queries?: readonly string[] | undefined;
1222
+ readonly results?: readonly {
1223
+ readonly [x: string]: unknown;
1224
+ }[] | null | undefined;
1225
+ } | {
1226
+ readonly [x: string]: unknown;
1227
+ readonly type: "code_interpreter_call";
1228
+ readonly id: string;
1229
+ readonly status?: string | undefined;
1230
+ readonly code?: string | null | undefined;
1231
+ readonly container_id?: string | null | undefined;
1232
+ readonly outputs?: readonly {
1233
+ readonly [x: string]: unknown;
1234
+ }[] | null | undefined;
1235
+ } | {
1236
+ readonly [x: string]: unknown;
1237
+ readonly type: "mcp_call";
1238
+ readonly id: string;
1239
+ readonly status?: string | undefined;
1240
+ readonly server_label?: string | undefined;
1241
+ readonly name?: string | undefined;
1242
+ readonly arguments?: string | undefined;
1243
+ readonly output?: string | null | undefined;
1244
+ readonly error?: unknown;
1245
+ } | {
1246
+ readonly [x: string]: unknown;
1247
+ readonly type: string;
1248
+ readonly id: string;
1249
+ })[], AIError, never>;
1250
+ export declare const lowerConversation: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
1251
+ readonly [x: string]: unknown;
1252
+ }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
1253
+ model: string & import("effect/Brand").Brand<"AI.ModelID">;
1254
+ input: ({
1255
+ readonly type: "configuration_update";
1256
+ readonly reasoning: {
1257
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1258
+ };
1259
+ } | {
1260
+ readonly type: "additional_tools";
1261
+ readonly role: "developer";
1262
+ readonly tools: readonly ({
1263
+ readonly type: "custom";
1264
+ readonly name: string;
1265
+ readonly description: string;
1266
+ readonly format: {
1267
+ readonly type: "text";
1268
+ } | {
1269
+ readonly type: "grammar";
1270
+ readonly syntax: "lark" | "regex";
1271
+ readonly definition: string;
1272
+ };
1273
+ } | {
1274
+ readonly type: "function";
1275
+ readonly name: string;
1276
+ readonly description: string;
1277
+ readonly parameters: {
1278
+ readonly [x: string]: unknown;
1279
+ };
1280
+ readonly strict?: boolean | undefined;
1281
+ } | {
1282
+ readonly [x: string]: unknown;
1283
+ readonly type: string;
1284
+ })[];
1285
+ } | {
1286
+ readonly type: "message";
1287
+ readonly role: "system";
1288
+ readonly content: string;
1289
+ } | {
1290
+ readonly type: "message";
1291
+ readonly role: "developer";
1292
+ readonly content: string;
1293
+ } | {
1294
+ readonly type: "custom_tool_call_output" | "function_call_output";
1295
+ readonly call_id: string;
1296
+ readonly output: string | readonly ({
1297
+ readonly type: "input_text";
1298
+ readonly text: string;
1299
+ } | {
1300
+ readonly type: "input_video";
1301
+ readonly video_url: string;
1302
+ } | {
1303
+ readonly type: "input_image";
1304
+ readonly image_url: string;
1305
+ readonly detail?: string | undefined;
1306
+ } | {
1307
+ readonly type: "input_file";
1308
+ readonly filename?: string | undefined;
1309
+ readonly detail?: string | undefined;
1310
+ readonly file_data?: string | undefined;
1311
+ readonly file_url?: string | undefined;
1312
+ })[];
1313
+ } | {
1314
+ readonly type: "reasoning";
1315
+ readonly id?: string | undefined;
1316
+ readonly summary: readonly {
1317
+ readonly type: "summary_text";
1318
+ readonly text: string;
1319
+ }[];
1320
+ readonly encrypted_content?: string | null | undefined;
1321
+ } | {
1322
+ readonly type: "compaction";
1323
+ readonly id?: string | null | undefined;
1324
+ readonly encrypted_content: string;
1325
+ } | {
1326
+ readonly type: "message";
1327
+ readonly role: "user";
1328
+ readonly content: readonly ({
1329
+ readonly type: "input_text";
1330
+ readonly text: string;
1331
+ } | {
1332
+ readonly type: "input_video";
1333
+ readonly video_url: string;
1334
+ } | {
1335
+ readonly type: "input_image";
1336
+ readonly image_url: string;
1337
+ readonly detail?: string | undefined;
1338
+ } | {
1339
+ readonly type: "input_file";
1340
+ readonly filename?: string | undefined;
1341
+ readonly detail?: string | undefined;
1342
+ readonly file_data?: string | undefined;
1343
+ readonly file_url?: string | undefined;
1344
+ })[];
1345
+ readonly id?: string | undefined;
1346
+ readonly status?: string | undefined;
1347
+ } | {
1348
+ readonly type: "message";
1349
+ readonly id?: string | undefined;
1350
+ readonly role: "assistant";
1351
+ readonly content: readonly {
1352
+ readonly type: "output_text";
1353
+ readonly text: string;
1354
+ }[];
1355
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
1356
+ readonly status?: string | undefined;
1357
+ } | {
1358
+ readonly type: "function_call";
1359
+ readonly id?: string | undefined;
1360
+ readonly call_id: string;
1361
+ readonly name: string;
1362
+ readonly namespace?: string | undefined;
1363
+ readonly arguments: string;
1364
+ } | {
1365
+ readonly type: "custom_tool_call";
1366
+ readonly id?: string | undefined;
1367
+ readonly call_id: string;
1368
+ readonly name: string;
1369
+ readonly input: string;
1370
+ } | {
1371
+ readonly [x: string]: unknown;
1372
+ readonly type: string;
1373
+ readonly id: string;
1374
+ })[];
1375
+ }, AIError, never>;
1376
+ export declare const lowerGeneration: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => {
1377
+ stream: true;
1378
+ max_output_tokens: number | undefined;
1379
+ temperature: number | undefined;
1380
+ top_p: number | undefined;
1381
+ presence_penalty: number | undefined;
1382
+ frequency_penalty: number | undefined;
1383
+ store?: boolean | undefined;
1384
+ metadata?: {
1385
+ readonly [x: string]: string;
1386
+ } | undefined;
1387
+ safety_identifier?: string | undefined;
1388
+ stream_options?: {
1389
+ include_obfuscation: boolean;
1390
+ } | undefined;
1391
+ top_logprobs?: number | undefined;
1392
+ prompt_cache_key?: string | undefined;
1393
+ include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
1394
+ reasoning?: {
1395
+ effort: OpenResponsesOptions.ReasoningEffort | undefined;
1396
+ summary: "auto" | "concise" | "detailed" | undefined;
1397
+ } | undefined;
1398
+ text?: {
1399
+ verbosity: import("../schema/options.js").OpenString<"high" | "low" | "medium">;
1400
+ } | undefined;
1401
+ service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
1402
+ max_tool_calls?: number | undefined;
1403
+ parallel_tool_calls?: boolean | undefined;
1404
+ truncation?: "auto" | "disabled" | undefined;
1405
+ };
1406
+ export declare const resolveParallelToolCalls: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => boolean | undefined;
1407
+ export declare const allowedToolChoice: (options: OpenResponsesOptions.Resolved, custom: ReadonlyMap<string, OpenAIFreeform.Custom>) => {
1408
+ type: "allowed_tools";
1409
+ mode: "auto" | "none" | "required";
1410
+ tools: {
1411
+ type: "custom" | "function";
1412
+ name: string;
1413
+ }[];
1414
+ } | undefined;
1415
+ /** Expects tool namespaces already flattened, as `protocol.body.from` passes it; otherwise run `ProviderShared.flattenRequest` first. */
1416
+ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
1417
+ readonly [x: string]: unknown;
1418
+ }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
1419
+ model: string & import("effect/Brand").Brand<"AI.ModelID">;
1420
+ input: ({
1421
+ readonly type: "configuration_update";
1422
+ readonly reasoning: {
1423
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1424
+ };
1425
+ } | {
1426
+ readonly type: "additional_tools";
1427
+ readonly role: "developer";
1428
+ readonly tools: readonly ({
1429
+ readonly type: "custom";
1430
+ readonly name: string;
1431
+ readonly description: string;
1432
+ readonly format: {
1433
+ readonly type: "text";
1434
+ } | {
1435
+ readonly type: "grammar";
1436
+ readonly syntax: "lark" | "regex";
1437
+ readonly definition: string;
1438
+ };
1439
+ } | {
1440
+ readonly type: "function";
1441
+ readonly name: string;
1442
+ readonly description: string;
1443
+ readonly parameters: {
1444
+ readonly [x: string]: unknown;
1445
+ };
1446
+ readonly strict?: boolean | undefined;
1447
+ } | {
1448
+ readonly [x: string]: unknown;
1449
+ readonly type: string;
1450
+ })[];
1451
+ } | {
1452
+ readonly type: "message";
1453
+ readonly role: "system";
1454
+ readonly content: string;
1455
+ } | {
1456
+ readonly type: "message";
1457
+ readonly role: "developer";
1458
+ readonly content: string;
1459
+ } | {
1460
+ readonly type: "custom_tool_call_output" | "function_call_output";
1461
+ readonly call_id: string;
1462
+ readonly output: string | readonly ({
1463
+ readonly type: "input_text";
1464
+ readonly text: string;
1465
+ } | {
1466
+ readonly type: "input_video";
1467
+ readonly video_url: string;
1468
+ } | {
1469
+ readonly type: "input_image";
1470
+ readonly image_url: string;
1471
+ readonly detail?: string | undefined;
1472
+ } | {
1473
+ readonly type: "input_file";
1474
+ readonly filename?: string | undefined;
1475
+ readonly detail?: string | undefined;
1476
+ readonly file_data?: string | undefined;
1477
+ readonly file_url?: string | undefined;
1478
+ })[];
1479
+ } | {
1480
+ readonly type: "reasoning";
1481
+ readonly id?: string | undefined;
1482
+ readonly summary: readonly {
1483
+ readonly type: "summary_text";
1484
+ readonly text: string;
1485
+ }[];
1486
+ readonly encrypted_content?: string | null | undefined;
1487
+ } | {
1488
+ readonly type: "compaction";
1489
+ readonly id?: string | null | undefined;
1490
+ readonly encrypted_content: string;
1491
+ } | {
1492
+ readonly type: "message";
1493
+ readonly role: "user";
1494
+ readonly content: readonly ({
1495
+ readonly type: "input_text";
1496
+ readonly text: string;
1497
+ } | {
1498
+ readonly type: "input_video";
1499
+ readonly video_url: string;
1500
+ } | {
1501
+ readonly type: "input_image";
1502
+ readonly image_url: string;
1503
+ readonly detail?: string | undefined;
1504
+ } | {
1505
+ readonly type: "input_file";
1506
+ readonly filename?: string | undefined;
1507
+ readonly detail?: string | undefined;
1508
+ readonly file_data?: string | undefined;
1509
+ readonly file_url?: string | undefined;
1510
+ })[];
1511
+ readonly id?: string | undefined;
1512
+ readonly status?: string | undefined;
1513
+ } | {
1514
+ readonly type: "message";
1515
+ readonly id?: string | undefined;
1516
+ readonly role: "assistant";
1517
+ readonly content: readonly {
1518
+ readonly type: "output_text";
1519
+ readonly text: string;
1520
+ }[];
1521
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
1522
+ readonly status?: string | undefined;
1523
+ } | {
1524
+ readonly type: "function_call";
1525
+ readonly id?: string | undefined;
1526
+ readonly call_id: string;
1527
+ readonly name: string;
1528
+ readonly namespace?: string | undefined;
1529
+ readonly arguments: string;
1530
+ } | {
1531
+ readonly type: "custom_tool_call";
1532
+ readonly id?: string | undefined;
1533
+ readonly call_id: string;
1534
+ readonly name: string;
1535
+ readonly input: string;
1536
+ } | {
1537
+ readonly [x: string]: unknown;
1538
+ readonly type: string;
1539
+ readonly id: string;
1540
+ })[];
1541
+ stream: true;
1542
+ max_output_tokens: number | undefined;
1543
+ temperature: number | undefined;
1544
+ top_p: number | undefined;
1545
+ presence_penalty: number | undefined;
1546
+ frequency_penalty: number | undefined;
1547
+ store?: boolean | undefined;
1548
+ metadata?: {
1549
+ readonly [x: string]: string;
1550
+ } | undefined;
1551
+ safety_identifier?: string | undefined;
1552
+ stream_options?: {
1553
+ include_obfuscation: boolean;
1554
+ } | undefined;
1555
+ top_logprobs?: number | undefined;
1556
+ prompt_cache_key?: string | undefined;
1557
+ include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
1558
+ reasoning?: {
1559
+ effort: OpenResponsesOptions.ReasoningEffort | undefined;
1560
+ summary: "auto" | "concise" | "detailed" | undefined;
1561
+ } | undefined;
1562
+ text?: {
1563
+ verbosity: import("../schema/options.js").OpenString<"high" | "low" | "medium">;
1564
+ } | undefined;
1565
+ service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
1566
+ max_tool_calls?: number | undefined;
1567
+ parallel_tool_calls?: boolean | undefined;
1568
+ truncation?: "auto" | "disabled" | undefined;
1569
+ tools: ({
1570
+ readonly type: "custom";
1571
+ readonly name: string;
1572
+ readonly description: string;
1573
+ readonly format: {
1574
+ readonly type: "text";
1575
+ } | {
1576
+ readonly type: "grammar";
1577
+ readonly syntax: "lark" | "regex";
1578
+ readonly definition: string;
1579
+ };
1580
+ } | {
1581
+ readonly type: "function";
1582
+ readonly name: string;
1583
+ readonly description: string;
1584
+ readonly parameters: {
1585
+ readonly [x: string]: unknown;
1586
+ };
1587
+ readonly strict?: boolean | undefined;
1588
+ } | {
1589
+ readonly [x: string]: unknown;
1590
+ readonly type: string;
1591
+ })[] | undefined;
1592
+ tool_choice: "auto" | "none" | "required" | {
1593
+ type: "custom" | "function";
1594
+ name: string;
1595
+ } | {
1596
+ type: "allowed_tools";
1597
+ mode: "auto" | "none" | "required";
1598
+ tools: {
1599
+ type: "custom" | "function";
1600
+ name: string;
1601
+ }[];
1602
+ } | undefined;
1603
+ }, AIError, never>;
1604
+ /** Expects tool namespaces already flattened, as `protocol.body.from` passes it; otherwise run `ProviderShared.flattenRequest` first. */
1605
+ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1606
+ model: string & import("effect/Brand").Brand<"AI.ModelID">;
1607
+ input: ({
1608
+ readonly type: "configuration_update";
1609
+ readonly reasoning: {
1610
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1611
+ };
1612
+ } | {
1613
+ readonly type: "additional_tools";
1614
+ readonly role: "developer";
1615
+ readonly tools: readonly ({
1616
+ readonly type: "custom";
1617
+ readonly name: string;
1618
+ readonly description: string;
1619
+ readonly format: {
1620
+ readonly type: "text";
1621
+ } | {
1622
+ readonly type: "grammar";
1623
+ readonly syntax: "lark" | "regex";
1624
+ readonly definition: string;
1625
+ };
1626
+ } | {
1627
+ readonly type: "function";
1628
+ readonly name: string;
1629
+ readonly description: string;
1630
+ readonly parameters: {
1631
+ readonly [x: string]: unknown;
1632
+ };
1633
+ readonly strict?: boolean | undefined;
1634
+ } | {
1635
+ readonly [x: string]: unknown;
1636
+ readonly type: string;
1637
+ })[];
1638
+ } | {
1639
+ readonly type: "message";
1640
+ readonly role: "system";
1641
+ readonly content: string;
1642
+ } | {
1643
+ readonly type: "message";
1644
+ readonly role: "developer";
1645
+ readonly content: string;
1646
+ } | {
1647
+ readonly type: "custom_tool_call_output" | "function_call_output";
1648
+ readonly call_id: string;
1649
+ readonly output: string | readonly ({
1650
+ readonly type: "input_text";
1651
+ readonly text: string;
1652
+ } | {
1653
+ readonly type: "input_video";
1654
+ readonly video_url: string;
1655
+ } | {
1656
+ readonly type: "input_image";
1657
+ readonly image_url: string;
1658
+ readonly detail?: string | undefined;
1659
+ } | {
1660
+ readonly type: "input_file";
1661
+ readonly filename?: string | undefined;
1662
+ readonly detail?: string | undefined;
1663
+ readonly file_data?: string | undefined;
1664
+ readonly file_url?: string | undefined;
1665
+ })[];
1666
+ } | {
1667
+ readonly type: "reasoning";
1668
+ readonly id?: string | undefined;
1669
+ readonly summary: readonly {
1670
+ readonly type: "summary_text";
1671
+ readonly text: string;
1672
+ }[];
1673
+ readonly encrypted_content?: string | null | undefined;
1674
+ } | {
1675
+ readonly type: "compaction";
1676
+ readonly id?: string | null | undefined;
1677
+ readonly encrypted_content: string;
1678
+ } | {
1679
+ readonly type: "message";
1680
+ readonly role: "user";
1681
+ readonly content: readonly ({
1682
+ readonly type: "input_text";
1683
+ readonly text: string;
1684
+ } | {
1685
+ readonly type: "input_video";
1686
+ readonly video_url: string;
1687
+ } | {
1688
+ readonly type: "input_image";
1689
+ readonly image_url: string;
1690
+ readonly detail?: string | undefined;
1691
+ } | {
1692
+ readonly type: "input_file";
1693
+ readonly filename?: string | undefined;
1694
+ readonly detail?: string | undefined;
1695
+ readonly file_data?: string | undefined;
1696
+ readonly file_url?: string | undefined;
1697
+ })[];
1698
+ readonly id?: string | undefined;
1699
+ readonly status?: string | undefined;
1700
+ } | {
1701
+ readonly type: "message";
1702
+ readonly id?: string | undefined;
1703
+ readonly role: "assistant";
1704
+ readonly content: readonly {
1705
+ readonly type: "output_text";
1706
+ readonly text: string;
1707
+ }[];
1708
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
1709
+ readonly status?: string | undefined;
1710
+ } | {
1711
+ readonly type: "function_call";
1712
+ readonly id?: string | undefined;
1713
+ readonly call_id: string;
1714
+ readonly name: string;
1715
+ readonly namespace?: string | undefined;
1716
+ readonly arguments: string;
1717
+ } | {
1718
+ readonly type: "custom_tool_call";
1719
+ readonly id?: string | undefined;
1720
+ readonly call_id: string;
1721
+ readonly name: string;
1722
+ readonly input: string;
1723
+ } | {
1724
+ readonly [x: string]: unknown;
1725
+ readonly type: string;
1726
+ readonly id: string;
1727
+ })[];
1728
+ stream: true;
1729
+ max_output_tokens: number | undefined;
1730
+ temperature: number | undefined;
1731
+ top_p: number | undefined;
1732
+ presence_penalty: number | undefined;
1733
+ frequency_penalty: number | undefined;
1734
+ store?: boolean | undefined;
1735
+ metadata?: {
1736
+ readonly [x: string]: string;
1737
+ } | undefined;
1738
+ safety_identifier?: string | undefined;
1739
+ stream_options?: {
1740
+ include_obfuscation: boolean;
1741
+ } | undefined;
1742
+ top_logprobs?: number | undefined;
1743
+ prompt_cache_key?: string | undefined;
1744
+ include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
1745
+ reasoning?: {
1746
+ effort: OpenResponsesOptions.ReasoningEffort | undefined;
1747
+ summary: "auto" | "concise" | "detailed" | undefined;
1748
+ } | undefined;
1749
+ text?: {
1750
+ verbosity: import("../schema/options.js").OpenString<"high" | "low" | "medium">;
1751
+ } | undefined;
1752
+ service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
1753
+ max_tool_calls?: number | undefined;
1754
+ parallel_tool_calls?: boolean | undefined;
1755
+ truncation?: "auto" | "disabled" | undefined;
1756
+ tools: ({
1757
+ readonly type: "custom";
1758
+ readonly name: string;
1759
+ readonly description: string;
1760
+ readonly format: {
1761
+ readonly type: "text";
1762
+ } | {
1763
+ readonly type: "grammar";
1764
+ readonly syntax: "lark" | "regex";
1765
+ readonly definition: string;
1766
+ };
1767
+ } | {
1768
+ readonly type: "function";
1769
+ readonly name: string;
1770
+ readonly description: string;
1771
+ readonly parameters: {
1772
+ readonly [x: string]: unknown;
1773
+ };
1774
+ readonly strict?: boolean | undefined;
1775
+ } | {
1776
+ readonly [x: string]: unknown;
1777
+ readonly type: string;
1778
+ })[] | undefined;
1779
+ tool_choice: "auto" | "none" | "required" | {
1780
+ type: "custom" | "function";
1781
+ name: string;
1782
+ } | {
1783
+ type: "allowed_tools";
1784
+ mode: "auto" | "none" | "required";
1785
+ tools: {
1786
+ type: "custom" | "function";
1787
+ name: string;
1788
+ }[];
1789
+ } | undefined;
1790
+ }, AIError, never>;
1791
+ export declare const mapUsage: (usage: OpenResponsesUsage | null | undefined, providerMetadataKey: string, ...frames: ReadonlyArray<unknown>) => Usage | undefined;
1792
+ export declare const metadataKey: (model: LLMRequest["model"]) => string;
1793
+ export declare const providerMetadata: (state: ParserState, metadata: Record<string, unknown>) => ProviderMetadata;
1794
+ export type StepResult = readonly [ParserState, ReadonlyArray<StreamEvent>];
1795
+ export declare const terminal: (event: Event) => boolean;
1796
+ export declare const normalize: (state: Pick<ParserState, "outputItems">, input: Event) => NormalizedEvent;
1797
+ export declare const onReasoningDelta: (state: ParserState, event: Event, itemID: string) => StepResult;
1798
+ export declare const onReasoningDone: (state: ParserState, event: Event, itemID: string) => StepResult;
1799
+ /** Error code and message from wherever the frame put them; top-level fields win over nested ones. */
1800
+ export declare const errorDetail: (event: Event) => {
1801
+ message: string | undefined;
1802
+ code: string | undefined;
1803
+ };
1804
+ export declare const providerFailure: (event: Event, fallback: string, body?: string) => AIError;
1805
+ export declare const step: (state: ParserState, event: NormalizedEvent) => AIError | Effect.Effect<StepResult, never, never> | Effect.Effect<[ParserState, readonly ({
1806
+ readonly type: "step-start";
1807
+ readonly index: number;
1808
+ } | {
1809
+ readonly type: "raw";
1810
+ readonly data: unknown;
1811
+ } | {
1812
+ readonly type: "text-start";
1813
+ readonly id: string;
1814
+ readonly providerMetadata?: {
1815
+ readonly [x: string]: {
1816
+ readonly [x: string]: unknown;
1817
+ };
1818
+ } | undefined;
1819
+ } | {
1820
+ readonly type: "text-delta";
1821
+ readonly id: string;
1822
+ readonly text: string;
1823
+ readonly providerMetadata?: {
1824
+ readonly [x: string]: {
1825
+ readonly [x: string]: unknown;
1826
+ };
1827
+ } | undefined;
1828
+ } | {
1829
+ readonly type: "text-end";
1830
+ readonly id: string;
1831
+ readonly text?: string | undefined;
1832
+ readonly providerMetadata?: {
1833
+ readonly [x: string]: {
1834
+ readonly [x: string]: unknown;
1835
+ };
1836
+ } | undefined;
1837
+ } | {
1838
+ readonly type: "reasoning-start";
1839
+ readonly id: string;
1840
+ readonly providerMetadata?: {
1841
+ readonly [x: string]: {
1842
+ readonly [x: string]: unknown;
1843
+ };
1844
+ } | undefined;
1845
+ } | {
1846
+ readonly type: "reasoning-delta";
1847
+ readonly id: string;
1848
+ readonly text: string;
1849
+ readonly providerMetadata?: {
1850
+ readonly [x: string]: {
1851
+ readonly [x: string]: unknown;
1852
+ };
1853
+ } | undefined;
1854
+ } | {
1855
+ readonly type: "reasoning-end";
1856
+ readonly id: string;
1857
+ readonly text?: string | undefined;
1858
+ readonly providerMetadata?: {
1859
+ readonly [x: string]: {
1860
+ readonly [x: string]: unknown;
1861
+ };
1862
+ } | undefined;
1863
+ } | {
1864
+ readonly type: "tool-input-start";
1865
+ readonly id: string;
1866
+ readonly name: string;
1867
+ readonly namespace?: string | undefined;
1868
+ readonly providerExecuted?: boolean | undefined;
1869
+ readonly providerMetadata?: {
1870
+ readonly [x: string]: {
1871
+ readonly [x: string]: unknown;
1872
+ };
1873
+ } | undefined;
1874
+ } | {
1875
+ readonly type: "tool-input-delta";
1876
+ readonly id: string;
1877
+ readonly name: string;
1878
+ readonly namespace?: string | undefined;
1879
+ readonly text: string;
1880
+ readonly input?: unknown;
1881
+ } | {
1882
+ readonly type: "tool-input-end";
1883
+ readonly id: string;
1884
+ readonly name: string;
1885
+ readonly namespace?: string | undefined;
1886
+ readonly providerMetadata?: {
1887
+ readonly [x: string]: {
1888
+ readonly [x: string]: unknown;
1889
+ };
1890
+ } | undefined;
1891
+ } | {
1892
+ readonly type: "tool-input-error";
1893
+ readonly id: string;
1894
+ readonly name: string;
1895
+ readonly namespace?: string | undefined;
1896
+ readonly raw: string;
1897
+ } | {
1898
+ readonly type: "tool-call";
1899
+ readonly id: string;
1900
+ readonly name: string;
1901
+ readonly namespace?: string | undefined;
1902
+ readonly input: unknown;
1903
+ readonly providerExecuted?: boolean | undefined;
1904
+ readonly providerMetadata?: {
1905
+ readonly [x: string]: {
1906
+ readonly [x: string]: unknown;
1907
+ };
1908
+ } | undefined;
1909
+ } | {
1910
+ readonly type: "tool-result";
1911
+ readonly id: string;
1912
+ readonly name: string;
1913
+ readonly namespace?: string | undefined;
1914
+ readonly result: {
1915
+ readonly type: "json";
1916
+ readonly value: unknown;
1917
+ } | {
1918
+ readonly type: "text";
1919
+ readonly value: unknown;
1920
+ } | {
1921
+ readonly type: "error";
1922
+ readonly value: unknown;
1923
+ } | {
1924
+ readonly type: "content";
1925
+ readonly value: readonly ({
1926
+ readonly type: "text";
1927
+ readonly text: string;
1928
+ } | {
1929
+ readonly type: "file";
1930
+ readonly uri: string;
1931
+ readonly mime: string;
1932
+ readonly name?: string | undefined;
1933
+ })[];
1934
+ };
1935
+ readonly output?: {
1936
+ readonly structured: unknown;
1937
+ readonly content: readonly ({
1938
+ readonly type: "text";
1939
+ readonly text: string;
1940
+ } | {
1941
+ readonly type: "file";
1942
+ readonly uri: string;
1943
+ readonly mime: string;
1944
+ readonly name?: string | undefined;
1945
+ })[];
1946
+ } | undefined;
1947
+ readonly providerExecuted?: boolean | undefined;
1948
+ readonly providerMetadata?: {
1949
+ readonly [x: string]: {
1950
+ readonly [x: string]: unknown;
1951
+ };
1952
+ } | undefined;
1953
+ } | {
1954
+ readonly reason: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
1955
+ readonly detail?: string | undefined;
1956
+ readonly raw?: string | undefined;
1957
+ readonly type: "step-finish";
1958
+ readonly index: number;
1959
+ readonly usage?: Usage | undefined;
1960
+ readonly providerMetadata?: {
1961
+ readonly [x: string]: {
1962
+ readonly [x: string]: unknown;
1963
+ };
1964
+ } | undefined;
1965
+ } | {
1966
+ readonly reason: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
1967
+ readonly detail?: string | undefined;
1968
+ readonly raw?: string | undefined;
1969
+ readonly type: "finish";
1970
+ readonly usage?: Usage | undefined;
1971
+ readonly message?: import("../schema/messages.js").AssistantMessage | undefined;
1972
+ readonly providerMetadata?: {
1973
+ readonly [x: string]: {
1974
+ readonly [x: string]: unknown;
1975
+ };
1976
+ } | undefined;
1977
+ } | {
1978
+ readonly type: "media";
1979
+ readonly media: Media.Asset;
1980
+ readonly providerMetadata?: {
1981
+ readonly [x: string]: {
1982
+ readonly [x: string]: unknown;
1983
+ };
1984
+ } | undefined;
1985
+ } | ({
1986
+ readonly type: "compaction";
1987
+ readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
1988
+ readonly id?: string | undefined;
1989
+ readonly encrypted?: string | undefined;
1990
+ readonly text?: string | null | undefined;
1991
+ } & ({
1992
+ readonly encrypted: string;
1993
+ readonly text?: never;
1994
+ } | {
1995
+ readonly text: string | null;
1996
+ readonly encrypted?: never;
1997
+ })))[]], AIError, never>;
1998
+ /**
1999
+ * The provider-neutral Open Responses protocol. Provider-specific Responses
2000
+ * implementations compose this baseline with their own tools and event variants.
2001
+ */
2002
+ export declare const initial: (request: LLMRequest, adapter?: ProviderAdapter) => ParserState;
2003
+ export declare const protocol: Protocol<{
2004
+ readonly model: string;
2005
+ readonly input: readonly ({
2006
+ readonly type: "configuration_update";
2007
+ readonly reasoning: {
2008
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
2009
+ };
2010
+ } | {
2011
+ readonly type: "additional_tools";
2012
+ readonly role: "developer";
2013
+ readonly tools: readonly ({
2014
+ readonly type: "custom";
2015
+ readonly name: string;
2016
+ readonly description: string;
2017
+ readonly format: {
2018
+ readonly type: "text";
2019
+ } | {
2020
+ readonly type: "grammar";
2021
+ readonly syntax: "lark" | "regex";
2022
+ readonly definition: string;
2023
+ };
2024
+ } | {
2025
+ readonly type: "function";
2026
+ readonly name: string;
2027
+ readonly description: string;
2028
+ readonly parameters: {
2029
+ readonly [x: string]: unknown;
2030
+ };
2031
+ readonly strict?: boolean | undefined;
2032
+ } | {
2033
+ readonly [x: string]: unknown;
2034
+ readonly type: string;
2035
+ })[];
2036
+ } | {
2037
+ readonly type: "message";
2038
+ readonly role: "system";
2039
+ readonly content: string;
2040
+ } | {
2041
+ readonly type: "message";
2042
+ readonly role: "developer";
2043
+ readonly content: string;
2044
+ } | {
2045
+ readonly type: "custom_tool_call_output" | "function_call_output";
2046
+ readonly call_id: string;
2047
+ readonly output: string | readonly ({
2048
+ readonly type: "input_text";
2049
+ readonly text: string;
2050
+ } | {
2051
+ readonly type: "input_video";
2052
+ readonly video_url: string;
2053
+ } | {
2054
+ readonly type: "input_image";
2055
+ readonly image_url: string;
2056
+ readonly detail?: string | undefined;
2057
+ } | {
2058
+ readonly type: "input_file";
2059
+ readonly filename?: string | undefined;
2060
+ readonly detail?: string | undefined;
2061
+ readonly file_data?: string | undefined;
2062
+ readonly file_url?: string | undefined;
2063
+ })[];
2064
+ } | {
2065
+ readonly type: "reasoning";
2066
+ readonly id?: string | undefined;
2067
+ readonly summary: readonly {
2068
+ readonly type: "summary_text";
2069
+ readonly text: string;
2070
+ }[];
2071
+ readonly encrypted_content?: string | null | undefined;
2072
+ } | {
2073
+ readonly type: "compaction";
2074
+ readonly id?: string | null | undefined;
2075
+ readonly encrypted_content: string;
2076
+ } | {
2077
+ readonly type: "message";
2078
+ readonly role: "user";
2079
+ readonly content: readonly ({
2080
+ readonly type: "input_text";
2081
+ readonly text: string;
2082
+ } | {
2083
+ readonly type: "input_video";
2084
+ readonly video_url: string;
2085
+ } | {
2086
+ readonly type: "input_image";
2087
+ readonly image_url: string;
2088
+ readonly detail?: string | undefined;
2089
+ } | {
2090
+ readonly type: "input_file";
2091
+ readonly filename?: string | undefined;
2092
+ readonly detail?: string | undefined;
2093
+ readonly file_data?: string | undefined;
2094
+ readonly file_url?: string | undefined;
2095
+ })[];
2096
+ readonly id?: string | undefined;
2097
+ readonly status?: string | undefined;
2098
+ } | {
2099
+ readonly type: "message";
2100
+ readonly id?: string | undefined;
2101
+ readonly role: "assistant";
2102
+ readonly content: readonly {
2103
+ readonly type: "output_text";
2104
+ readonly text: string;
2105
+ }[];
2106
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
2107
+ readonly status?: string | undefined;
2108
+ } | {
2109
+ readonly type: "function_call";
2110
+ readonly id?: string | undefined;
2111
+ readonly call_id: string;
2112
+ readonly name: string;
2113
+ readonly namespace?: string | undefined;
2114
+ readonly arguments: string;
2115
+ } | {
2116
+ readonly type: "custom_tool_call";
2117
+ readonly id?: string | undefined;
2118
+ readonly call_id: string;
2119
+ readonly name: string;
2120
+ readonly input: string;
2121
+ } | {
2122
+ readonly [x: string]: unknown;
2123
+ readonly type: "web_search_call";
2124
+ readonly id: string;
2125
+ readonly status?: string | undefined;
2126
+ readonly action?: {
2127
+ readonly [x: string]: unknown;
2128
+ } | null | undefined;
2129
+ } | {
2130
+ readonly [x: string]: unknown;
2131
+ readonly type: "file_search_call";
2132
+ readonly id: string;
2133
+ readonly status?: string | undefined;
2134
+ readonly queries?: readonly string[] | undefined;
2135
+ readonly results?: readonly {
2136
+ readonly [x: string]: unknown;
2137
+ }[] | null | undefined;
2138
+ } | {
2139
+ readonly [x: string]: unknown;
2140
+ readonly type: "code_interpreter_call";
2141
+ readonly id: string;
2142
+ readonly status?: string | undefined;
2143
+ readonly code?: string | null | undefined;
2144
+ readonly container_id?: string | null | undefined;
2145
+ readonly outputs?: readonly {
2146
+ readonly [x: string]: unknown;
2147
+ }[] | null | undefined;
2148
+ } | {
2149
+ readonly [x: string]: unknown;
2150
+ readonly type: "mcp_call";
2151
+ readonly id: string;
2152
+ readonly status?: string | undefined;
2153
+ readonly server_label?: string | undefined;
2154
+ readonly name?: string | undefined;
2155
+ readonly arguments?: string | undefined;
2156
+ readonly output?: string | null | undefined;
2157
+ readonly error?: unknown;
2158
+ } | {
2159
+ readonly [x: string]: unknown;
2160
+ readonly type: string;
2161
+ readonly id: string;
2162
+ })[];
2163
+ readonly instructions?: string | undefined;
2164
+ readonly tools?: readonly ({
2165
+ readonly type: "custom";
2166
+ readonly name: string;
2167
+ readonly description: string;
2168
+ readonly format: {
2169
+ readonly type: "text";
2170
+ } | {
2171
+ readonly type: "grammar";
2172
+ readonly syntax: "lark" | "regex";
2173
+ readonly definition: string;
2174
+ };
2175
+ } | {
2176
+ readonly type: "function";
2177
+ readonly name: string;
2178
+ readonly description: string;
2179
+ readonly parameters: {
2180
+ readonly [x: string]: unknown;
2181
+ };
2182
+ readonly strict?: boolean | undefined;
2183
+ } | {
2184
+ readonly [x: string]: unknown;
2185
+ readonly type: string;
2186
+ })[] | undefined;
2187
+ readonly tool_choice?: "auto" | "none" | "required" | {
2188
+ readonly type: "custom" | "function";
2189
+ readonly name: string;
2190
+ } | {
2191
+ readonly type: "allowed_tools";
2192
+ readonly mode: "auto" | "none" | "required";
2193
+ readonly tools: readonly {
2194
+ readonly type: "custom" | "function";
2195
+ readonly name: string;
2196
+ }[];
2197
+ } | undefined;
2198
+ readonly store?: boolean | undefined;
2199
+ readonly metadata?: {
2200
+ readonly [x: string]: string;
2201
+ } | undefined;
2202
+ readonly safety_identifier?: string | undefined;
2203
+ readonly stream_options?: {
2204
+ readonly include_obfuscation?: boolean | undefined;
2205
+ } | undefined;
2206
+ readonly top_logprobs?: number | undefined;
2207
+ readonly truncation?: "auto" | "disabled" | undefined;
2208
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
2209
+ readonly prompt_cache_key?: string | undefined;
2210
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
2211
+ readonly reasoning?: {
2212
+ readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
2213
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
2214
+ } | undefined;
2215
+ readonly text?: {
2216
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
2217
+ } | undefined;
2218
+ readonly max_output_tokens?: number | undefined;
2219
+ readonly max_tool_calls?: number | undefined;
2220
+ readonly parallel_tool_calls?: boolean | undefined;
2221
+ readonly temperature?: number | undefined;
2222
+ readonly top_p?: number | undefined;
2223
+ readonly presence_penalty?: number | undefined;
2224
+ readonly frequency_penalty?: number | undefined;
2225
+ readonly stream: true;
2226
+ }, string, {
2227
+ readonly [x: string]: unknown;
2228
+ readonly type: string;
2229
+ readonly delta?: string | undefined;
2230
+ readonly arguments?: string | undefined;
2231
+ readonly text?: string | undefined;
2232
+ readonly item_id?: string | undefined;
2233
+ readonly output_index?: number | undefined;
2234
+ readonly summary_index?: number | undefined;
2235
+ readonly item?: {
2236
+ readonly [x: string]: unknown;
2237
+ readonly type: string;
2238
+ readonly id?: string | undefined;
2239
+ readonly call_id?: string | undefined;
2240
+ readonly name?: string | undefined;
2241
+ readonly namespace?: string | undefined;
2242
+ readonly arguments?: string | undefined;
2243
+ readonly encrypted_content?: string | null | undefined;
2244
+ } | null | undefined;
2245
+ readonly response?: {
2246
+ readonly [x: string]: unknown;
2247
+ readonly id?: string | undefined;
2248
+ readonly service_tier?: string | null | undefined;
2249
+ readonly incomplete_details?: {
2250
+ readonly reason?: string | undefined;
2251
+ } | null | undefined;
2252
+ readonly output?: readonly {
2253
+ readonly [x: string]: unknown;
2254
+ readonly type: string;
2255
+ readonly id?: string | undefined;
2256
+ readonly call_id?: string | undefined;
2257
+ readonly name?: string | undefined;
2258
+ readonly namespace?: string | undefined;
2259
+ readonly arguments?: string | undefined;
2260
+ readonly encrypted_content?: string | null | undefined;
2261
+ }[] | undefined;
2262
+ readonly usage?: {
2263
+ readonly [x: string]: unknown;
2264
+ readonly input_tokens?: number | undefined;
2265
+ readonly input_tokens_details?: {
2266
+ readonly [x: string]: unknown;
2267
+ readonly cached_tokens?: number | undefined;
2268
+ readonly cache_write_tokens?: number | undefined;
2269
+ } | null | undefined;
2270
+ readonly output_tokens?: number | undefined;
2271
+ readonly output_tokens_details?: {
2272
+ readonly [x: string]: unknown;
2273
+ readonly reasoning_tokens?: number | undefined;
2274
+ } | null | undefined;
2275
+ readonly total_tokens?: number | undefined;
2276
+ } | null | undefined;
2277
+ readonly error?: unknown;
2278
+ } | undefined;
2279
+ readonly code?: unknown;
2280
+ readonly message?: unknown;
2281
+ readonly error?: unknown;
2282
+ readonly status?: unknown;
2283
+ readonly status_code?: unknown;
2284
+ }, ParserState>;
2285
+ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
2286
+ readonly model: string;
2287
+ readonly input: readonly ({
2288
+ readonly type: "configuration_update";
2289
+ readonly reasoning: {
2290
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
2291
+ };
2292
+ } | {
2293
+ readonly type: "additional_tools";
2294
+ readonly role: "developer";
2295
+ readonly tools: readonly ({
2296
+ readonly type: "custom";
2297
+ readonly name: string;
2298
+ readonly description: string;
2299
+ readonly format: {
2300
+ readonly type: "text";
2301
+ } | {
2302
+ readonly type: "grammar";
2303
+ readonly syntax: "lark" | "regex";
2304
+ readonly definition: string;
2305
+ };
2306
+ } | {
2307
+ readonly type: "function";
2308
+ readonly name: string;
2309
+ readonly description: string;
2310
+ readonly parameters: {
2311
+ readonly [x: string]: unknown;
2312
+ };
2313
+ readonly strict?: boolean | undefined;
2314
+ } | {
2315
+ readonly [x: string]: unknown;
2316
+ readonly type: string;
2317
+ })[];
2318
+ } | {
2319
+ readonly type: "message";
2320
+ readonly role: "system";
2321
+ readonly content: string;
2322
+ } | {
2323
+ readonly type: "message";
2324
+ readonly role: "developer";
2325
+ readonly content: string;
2326
+ } | {
2327
+ readonly type: "custom_tool_call_output" | "function_call_output";
2328
+ readonly call_id: string;
2329
+ readonly output: string | readonly ({
2330
+ readonly type: "input_text";
2331
+ readonly text: string;
2332
+ } | {
2333
+ readonly type: "input_video";
2334
+ readonly video_url: string;
2335
+ } | {
2336
+ readonly type: "input_image";
2337
+ readonly image_url: string;
2338
+ readonly detail?: string | undefined;
2339
+ } | {
2340
+ readonly type: "input_file";
2341
+ readonly filename?: string | undefined;
2342
+ readonly detail?: string | undefined;
2343
+ readonly file_data?: string | undefined;
2344
+ readonly file_url?: string | undefined;
2345
+ })[];
2346
+ } | {
2347
+ readonly type: "reasoning";
2348
+ readonly id?: string | undefined;
2349
+ readonly summary: readonly {
2350
+ readonly type: "summary_text";
2351
+ readonly text: string;
2352
+ }[];
2353
+ readonly encrypted_content?: string | null | undefined;
2354
+ } | {
2355
+ readonly type: "compaction";
2356
+ readonly id?: string | null | undefined;
2357
+ readonly encrypted_content: string;
2358
+ } | {
2359
+ readonly type: "message";
2360
+ readonly role: "user";
2361
+ readonly content: readonly ({
2362
+ readonly type: "input_text";
2363
+ readonly text: string;
2364
+ } | {
2365
+ readonly type: "input_video";
2366
+ readonly video_url: string;
2367
+ } | {
2368
+ readonly type: "input_image";
2369
+ readonly image_url: string;
2370
+ readonly detail?: string | undefined;
2371
+ } | {
2372
+ readonly type: "input_file";
2373
+ readonly filename?: string | undefined;
2374
+ readonly detail?: string | undefined;
2375
+ readonly file_data?: string | undefined;
2376
+ readonly file_url?: string | undefined;
2377
+ })[];
2378
+ readonly id?: string | undefined;
2379
+ readonly status?: string | undefined;
2380
+ } | {
2381
+ readonly type: "message";
2382
+ readonly id?: string | undefined;
2383
+ readonly role: "assistant";
2384
+ readonly content: readonly {
2385
+ readonly type: "output_text";
2386
+ readonly text: string;
2387
+ }[];
2388
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
2389
+ readonly status?: string | undefined;
2390
+ } | {
2391
+ readonly type: "function_call";
2392
+ readonly id?: string | undefined;
2393
+ readonly call_id: string;
2394
+ readonly name: string;
2395
+ readonly namespace?: string | undefined;
2396
+ readonly arguments: string;
2397
+ } | {
2398
+ readonly type: "custom_tool_call";
2399
+ readonly id?: string | undefined;
2400
+ readonly call_id: string;
2401
+ readonly name: string;
2402
+ readonly input: string;
2403
+ } | {
2404
+ readonly [x: string]: unknown;
2405
+ readonly type: "web_search_call";
2406
+ readonly id: string;
2407
+ readonly status?: string | undefined;
2408
+ readonly action?: {
2409
+ readonly [x: string]: unknown;
2410
+ } | null | undefined;
2411
+ } | {
2412
+ readonly [x: string]: unknown;
2413
+ readonly type: "file_search_call";
2414
+ readonly id: string;
2415
+ readonly status?: string | undefined;
2416
+ readonly queries?: readonly string[] | undefined;
2417
+ readonly results?: readonly {
2418
+ readonly [x: string]: unknown;
2419
+ }[] | null | undefined;
2420
+ } | {
2421
+ readonly [x: string]: unknown;
2422
+ readonly type: "code_interpreter_call";
2423
+ readonly id: string;
2424
+ readonly status?: string | undefined;
2425
+ readonly code?: string | null | undefined;
2426
+ readonly container_id?: string | null | undefined;
2427
+ readonly outputs?: readonly {
2428
+ readonly [x: string]: unknown;
2429
+ }[] | null | undefined;
2430
+ } | {
2431
+ readonly [x: string]: unknown;
2432
+ readonly type: "mcp_call";
2433
+ readonly id: string;
2434
+ readonly status?: string | undefined;
2435
+ readonly server_label?: string | undefined;
2436
+ readonly name?: string | undefined;
2437
+ readonly arguments?: string | undefined;
2438
+ readonly output?: string | null | undefined;
2439
+ readonly error?: unknown;
2440
+ } | {
2441
+ readonly [x: string]: unknown;
2442
+ readonly type: string;
2443
+ readonly id: string;
2444
+ })[];
2445
+ readonly instructions?: string | undefined;
2446
+ readonly tools?: readonly ({
2447
+ readonly type: "custom";
2448
+ readonly name: string;
2449
+ readonly description: string;
2450
+ readonly format: {
2451
+ readonly type: "text";
2452
+ } | {
2453
+ readonly type: "grammar";
2454
+ readonly syntax: "lark" | "regex";
2455
+ readonly definition: string;
2456
+ };
2457
+ } | {
2458
+ readonly type: "function";
2459
+ readonly name: string;
2460
+ readonly description: string;
2461
+ readonly parameters: {
2462
+ readonly [x: string]: unknown;
2463
+ };
2464
+ readonly strict?: boolean | undefined;
2465
+ } | {
2466
+ readonly [x: string]: unknown;
2467
+ readonly type: string;
2468
+ })[] | undefined;
2469
+ readonly tool_choice?: "auto" | "none" | "required" | {
2470
+ readonly type: "custom" | "function";
2471
+ readonly name: string;
2472
+ } | {
2473
+ readonly type: "allowed_tools";
2474
+ readonly mode: "auto" | "none" | "required";
2475
+ readonly tools: readonly {
2476
+ readonly type: "custom" | "function";
2477
+ readonly name: string;
2478
+ }[];
2479
+ } | undefined;
2480
+ readonly store?: boolean | undefined;
2481
+ readonly metadata?: {
2482
+ readonly [x: string]: string;
2483
+ } | undefined;
2484
+ readonly safety_identifier?: string | undefined;
2485
+ readonly stream_options?: {
2486
+ readonly include_obfuscation?: boolean | undefined;
2487
+ } | undefined;
2488
+ readonly top_logprobs?: number | undefined;
2489
+ readonly truncation?: "auto" | "disabled" | undefined;
2490
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
2491
+ readonly prompt_cache_key?: string | undefined;
2492
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
2493
+ readonly reasoning?: {
2494
+ readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
2495
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
2496
+ } | undefined;
2497
+ readonly text?: {
2498
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
2499
+ } | undefined;
2500
+ readonly max_output_tokens?: number | undefined;
2501
+ readonly max_tool_calls?: number | undefined;
2502
+ readonly parallel_tool_calls?: boolean | undefined;
2503
+ readonly temperature?: number | undefined;
2504
+ readonly top_p?: number | undefined;
2505
+ readonly presence_penalty?: number | undefined;
2506
+ readonly frequency_penalty?: number | undefined;
2507
+ readonly stream: true;
2508
+ }, string>;
2509
+ export * as OpenResponses from "./open-responses.js";