@opencode/ai 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +283 -114
  2. package/dist/ai-client.d.ts +2 -2
  3. package/dist/ai-client.js +2 -1
  4. package/dist/cache-policy.d.ts +4 -0
  5. package/dist/cache-policy.js +20 -6
  6. package/dist/decision-client.d.ts +21 -0
  7. package/dist/decision-client.js +55 -0
  8. package/dist/decision.d.ts +472 -0
  9. package/dist/decision.js +158 -0
  10. package/dist/effect.d.ts +38 -0
  11. package/dist/effect.js +27 -0
  12. package/dist/effort-updates.d.ts +2 -2
  13. package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
  14. package/dist/experimental/cloudflare-run-extraction.js +83 -0
  15. package/dist/experimental/extraction.d.ts +183 -0
  16. package/dist/experimental/extraction.js +102 -0
  17. package/dist/experimental/realtime.d.ts +7 -2
  18. package/dist/experimental/realtime.js +5 -5
  19. package/dist/experimental.d.ts +2 -3
  20. package/dist/experimental.js +1 -2
  21. package/dist/image-client.d.ts +13 -22
  22. package/dist/image-client.js +0 -1
  23. package/dist/image.d.ts +154 -324
  24. package/dist/image.js +4 -11
  25. package/dist/index.d.ts +1426 -34
  26. package/dist/index.js +127 -24
  27. package/dist/llm.d.ts +16 -1
  28. package/dist/llm.js +34 -0
  29. package/dist/media-client.d.ts +2 -1
  30. package/dist/media-model.d.ts +3 -0
  31. package/dist/media-model.js +4 -1
  32. package/dist/media.d.ts +0 -7
  33. package/dist/media.js +0 -6
  34. package/dist/protocols/alibaba-chat.d.ts +32 -12
  35. package/dist/protocols/alibaba-images.d.ts +22 -0
  36. package/dist/protocols/alibaba-images.js +77 -0
  37. package/dist/protocols/alibaba-messages.d.ts +62 -27
  38. package/dist/protocols/alibaba-responses.d.ts +41 -38
  39. package/dist/protocols/anthropic-messages.d.ts +196 -94
  40. package/dist/protocols/anthropic-messages.js +47 -16
  41. package/dist/protocols/bedrock-converse.d.ts +140 -47
  42. package/dist/protocols/bedrock-converse.js +114 -18
  43. package/dist/protocols/bedrock-event-stream.js +1 -0
  44. package/dist/protocols/bfl-images.d.ts +9 -0
  45. package/dist/protocols/bfl-images.js +17 -15
  46. package/dist/protocols/cartesia-speech.d.ts +32 -50
  47. package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
  48. package/dist/protocols/cloudflare-run-decisions.js +36 -0
  49. package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
  50. package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
  51. package/dist/protocols/cohere-chat.d.ts +7 -8
  52. package/dist/protocols/deepgram-speech.d.ts +32 -50
  53. package/dist/protocols/elevenlabs-speech.d.ts +32 -50
  54. package/dist/protocols/fal-images.d.ts +10 -1
  55. package/dist/protocols/fal-images.js +16 -25
  56. package/dist/protocols/fal-video.js +1 -1
  57. package/dist/protocols/gemini.d.ts +37 -34
  58. package/dist/protocols/gemini.js +13 -8
  59. package/dist/protocols/google-images.d.ts +2 -2
  60. package/dist/protocols/google-images.js +8 -37
  61. package/dist/protocols/google-interactions.d.ts +18 -14
  62. package/dist/protocols/google-interactions.js +14 -7
  63. package/dist/protocols/google-speech.d.ts +32 -50
  64. package/dist/protocols/google-speech.js +0 -1
  65. package/dist/protocols/google-transcription.d.ts +32 -50
  66. package/dist/protocols/google-transcription.js +0 -1
  67. package/dist/protocols/google-video.d.ts +1 -1
  68. package/dist/protocols/google-video.js +2 -7
  69. package/dist/protocols/index.d.ts +3 -0
  70. package/dist/protocols/index.js +3 -0
  71. package/dist/protocols/meta-images.d.ts +7 -1
  72. package/dist/protocols/meta-images.js +10 -8
  73. package/dist/protocols/meta-messages.d.ts +73 -38
  74. package/dist/protocols/meta-messages.js +14 -1
  75. package/dist/protocols/meta-responses.d.ts +84 -78
  76. package/dist/protocols/meta-responses.js +29 -1
  77. package/dist/protocols/mistral-chat.d.ts +81 -78
  78. package/dist/protocols/mistral-chat.js +2 -1
  79. package/dist/protocols/open-responses-channel.js +47 -46
  80. package/dist/protocols/open-responses-continuation.d.ts +8 -2
  81. package/dist/protocols/open-responses-continuation.js +3 -1
  82. package/dist/protocols/open-responses.d.ts +426 -396
  83. package/dist/protocols/open-responses.js +16 -25
  84. package/dist/protocols/openai-chat.d.ts +764 -52
  85. package/dist/protocols/openai-chat.js +38 -25
  86. package/dist/protocols/openai-compatible-chat.d.ts +35 -15
  87. package/dist/protocols/openai-compatible-responses.d.ts +44 -42
  88. package/dist/protocols/openai-decisions.d.ts +22 -0
  89. package/dist/protocols/openai-decisions.js +128 -0
  90. package/dist/protocols/openai-images.d.ts +53 -56
  91. package/dist/protocols/openai-images.js +100 -34
  92. package/dist/protocols/openai-responses.d.ts +322 -264
  93. package/dist/protocols/openai-responses.js +33 -3
  94. package/dist/protocols/openai-speech.d.ts +32 -50
  95. package/dist/protocols/openai-speech.js +15 -5
  96. package/dist/protocols/openai-transcription.d.ts +32 -50
  97. package/dist/protocols/openai-transcription.js +15 -11
  98. package/dist/protocols/replicate-images.js +1 -1
  99. package/dist/protocols/runway-video.d.ts +1 -1
  100. package/dist/protocols/runway-video.js +1 -1
  101. package/dist/protocols/shared.d.ts +9 -1
  102. package/dist/protocols/shared.js +13 -2
  103. package/dist/protocols/stability-images.d.ts +5 -0
  104. package/dist/protocols/stability-images.js +4 -9
  105. package/dist/protocols/system-one.d.ts +101 -0
  106. package/dist/protocols/system-one.js +230 -0
  107. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  108. package/dist/protocols/utils/bedrock-cache.js +7 -6
  109. package/dist/protocols/utils/cache.d.ts +14 -3
  110. package/dist/protocols/utils/cache.js +11 -4
  111. package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
  112. package/dist/protocols/utils/gemini-generate-content.js +10 -16
  113. package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
  114. package/dist/protocols/utils/gemini-json-schema.js +3 -3
  115. package/dist/protocols/utils/image-sizing.d.ts +31 -0
  116. package/dist/protocols/utils/image-sizing.js +73 -0
  117. package/dist/protocols/utils/media-input.d.ts +4 -5
  118. package/dist/protocols/utils/media-input.js +8 -5
  119. package/dist/protocols/utils/partial-json-options.d.ts +0 -1
  120. package/dist/protocols/utils/partial-json-options.js +0 -1
  121. package/dist/protocols/utils/speech-stream.d.ts +0 -1
  122. package/dist/protocols/utils/speech-stream.js +0 -1
  123. package/dist/protocols/utils/tool-schema.js +15 -5
  124. package/dist/protocols/utils/tool-stream.d.ts +10 -1
  125. package/dist/protocols/venice-chat.d.ts +71 -53
  126. package/dist/protocols/venice-chat.js +7 -6
  127. package/dist/protocols/xai-images.d.ts +1 -2
  128. package/dist/protocols/xai-images.js +9 -2
  129. package/dist/protocols/xai-responses.d.ts +88 -78
  130. package/dist/protocols/xai-responses.js +28 -2
  131. package/dist/protocols/xai-video.d.ts +1 -1
  132. package/dist/protocols/xai-video.js +11 -8
  133. package/dist/protocols/zai-chat.d.ts +54 -30
  134. package/dist/protocols/zai-chat.js +8 -3
  135. package/dist/protocols/zai-images.d.ts +3 -1
  136. package/dist/protocols/zai-images.js +12 -11
  137. package/dist/protocols/zai-messages.d.ts +72 -35
  138. package/dist/protocols/zai-messages.js +3 -2
  139. package/dist/provider-error.js +24 -7
  140. package/dist/providers/alibaba/images.d.ts +2 -0
  141. package/dist/providers/alibaba/images.js +1 -0
  142. package/dist/providers/alibaba.d.ts +146 -85
  143. package/dist/providers/alibaba.js +16 -8
  144. package/dist/providers/amazon-bedrock-mantle.d.ts +277 -218
  145. package/dist/providers/amazon-bedrock.d.ts +48 -28
  146. package/dist/providers/amazon-bedrock.js +11 -11
  147. package/dist/providers/anthropic-compatible.d.ts +64 -29
  148. package/dist/providers/anthropic.d.ts +64 -29
  149. package/dist/providers/azure/images.d.ts +2 -0
  150. package/dist/providers/azure/images.js +1 -0
  151. package/dist/providers/azure.d.ts +156 -115
  152. package/dist/providers/azure.js +19 -1
  153. package/dist/providers/baseten/decisions.d.ts +2 -0
  154. package/dist/providers/baseten/decisions.js +1 -0
  155. package/dist/providers/baseten.d.ts +75 -25
  156. package/dist/providers/baseten.js +41 -8
  157. package/dist/providers/cerebras.d.ts +66 -24
  158. package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
  159. package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
  160. package/dist/providers/cloudflare-ai-gateway.d.ts +409 -272
  161. package/dist/providers/cloudflare-ai-gateway.js +33 -6
  162. package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
  163. package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
  164. package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
  165. package/dist/providers/cloudflare-workers-ai/images.js +1 -0
  166. package/dist/providers/cloudflare-workers-ai.d.ts +79 -25
  167. package/dist/providers/cloudflare-workers-ai.js +45 -9
  168. package/dist/providers/cohere.d.ts +117 -75
  169. package/dist/providers/deepinfra.d.ts +66 -24
  170. package/dist/providers/deepseek.d.ts +66 -24
  171. package/dist/providers/digitalocean/decisions.d.ts +2 -0
  172. package/dist/providers/digitalocean/decisions.js +1 -0
  173. package/dist/providers/digitalocean/images.d.ts +2 -0
  174. package/dist/providers/digitalocean/images.js +1 -0
  175. package/dist/providers/digitalocean.d.ts +108 -37
  176. package/dist/providers/digitalocean.js +39 -8
  177. package/dist/providers/fireworks.d.ts +66 -24
  178. package/dist/providers/google/images.d.ts +2 -0
  179. package/dist/providers/google/images.js +1 -0
  180. package/dist/providers/google-vertex/images.d.ts +2 -0
  181. package/dist/providers/google-vertex/images.js +1 -0
  182. package/dist/providers/google-vertex-chat.d.ts +33 -12
  183. package/dist/providers/google-vertex-messages.d.ts +64 -29
  184. package/dist/providers/google-vertex-mistral.d.ts +17 -17
  185. package/dist/providers/google-vertex-responses.d.ts +38 -35
  186. package/dist/providers/google-vertex.d.ts +20 -18
  187. package/dist/providers/google-vertex.js +32 -15
  188. package/dist/providers/google.d.ts +22 -21
  189. package/dist/providers/google.js +15 -8
  190. package/dist/providers/groq.d.ts +66 -28
  191. package/dist/providers/groq.js +0 -6
  192. package/dist/providers/meta.d.ts +144 -85
  193. package/dist/providers/minimax.d.ts +145 -86
  194. package/dist/providers/mistral.d.ts +28 -28
  195. package/dist/providers/moonshot.d.ts +277 -218
  196. package/dist/providers/open-responses-options.d.ts +0 -1
  197. package/dist/providers/open-responses-options.js +1 -1
  198. package/dist/providers/openai/images.d.ts +2 -0
  199. package/dist/providers/openai/images.js +1 -0
  200. package/dist/providers/openai-compatible/images.d.ts +2 -0
  201. package/dist/providers/openai-compatible/images.js +1 -0
  202. package/dist/providers/openai-compatible-responses.d.ts +38 -35
  203. package/dist/providers/openai-compatible.d.ts +36 -13
  204. package/dist/providers/openai-compatible.js +22 -10
  205. package/dist/providers/openai-options.d.ts +3 -2
  206. package/dist/providers/openai-options.js +0 -1
  207. package/dist/providers/openai.d.ts +146 -109
  208. package/dist/providers/openai.js +20 -4
  209. package/dist/providers/opencode/decisions.d.ts +2 -0
  210. package/dist/providers/opencode/decisions.js +1 -0
  211. package/dist/providers/opencode.d.ts +9 -10
  212. package/dist/providers/opencode.js +10 -8
  213. package/dist/providers/openrouter/decisions.d.ts +2 -0
  214. package/dist/providers/openrouter/decisions.js +1 -0
  215. package/dist/providers/openrouter/images.d.ts +2 -0
  216. package/dist/providers/openrouter/images.js +1 -0
  217. package/dist/providers/openrouter.d.ts +128 -47
  218. package/dist/providers/openrouter.js +38 -16
  219. package/dist/providers/togetherai.d.ts +66 -24
  220. package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
  221. package/dist/providers/typesafe-ai/decisions.js +1 -0
  222. package/dist/providers/typesafe-ai.d.ts +9 -10
  223. package/dist/providers/typesafe-ai.js +10 -8
  224. package/dist/providers/venice.d.ts +214 -20
  225. package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
  226. package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
  227. package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
  228. package/dist/providers/vercel-ai-gateway/images.js +1 -0
  229. package/dist/providers/vercel-ai-gateway.d.ts +10 -16
  230. package/dist/providers/vercel-ai-gateway.js +31 -85
  231. package/dist/providers/xai/images.d.ts +2 -0
  232. package/dist/providers/xai/images.js +1 -0
  233. package/dist/providers/xai.d.ts +40 -17
  234. package/dist/providers/xai.js +15 -8
  235. package/dist/providers/zai/images.d.ts +2 -0
  236. package/dist/providers/zai/images.js +1 -0
  237. package/dist/providers/zai-coding-plan.d.ts +224 -85
  238. package/dist/providers/zai.d.ts +110 -23
  239. package/dist/providers/zai.js +15 -8
  240. package/dist/route/auth-options.d.ts +0 -3
  241. package/dist/route/auth.d.ts +0 -2
  242. package/dist/route/auth.js +0 -2
  243. package/dist/route/client.d.ts +2 -4
  244. package/dist/route/client.js +29 -8
  245. package/dist/route/decision.d.ts +58 -0
  246. package/dist/route/decision.js +75 -0
  247. package/dist/route/executor-service.js +1 -1
  248. package/dist/route/executor.d.ts +1 -1
  249. package/dist/route/framing.d.ts +2 -0
  250. package/dist/route/index.d.ts +3 -0
  251. package/dist/route/index.js +3 -0
  252. package/dist/route/media-protocol.d.ts +1 -0
  253. package/dist/route/media-protocol.js +12 -8
  254. package/dist/route/media.d.ts +5 -1
  255. package/dist/route/media.js +6 -2
  256. package/dist/route/transport/http.js +1 -0
  257. package/dist/route/transport/index.d.ts +1 -0
  258. package/dist/schema/events.d.ts +148 -6
  259. package/dist/schema/events.js +20 -0
  260. package/dist/schema/messages.d.ts +6 -2
  261. package/dist/schema/messages.js +3 -0
  262. package/dist/schema/options.d.ts +5 -3
  263. package/dist/schema/options.js +8 -3
  264. package/dist/speech-client.d.ts +13 -22
  265. package/dist/speech-client.js +0 -1
  266. package/dist/speech.d.ts +148 -283
  267. package/dist/speech.js +2 -4
  268. package/dist/testing.d.ts +25 -24
  269. package/dist/testing.js +3 -21
  270. package/dist/transcription-client.d.ts +13 -22
  271. package/dist/transcription.d.ts +148 -283
  272. package/dist/transcription.js +1 -1
  273. package/dist/utils/media-type.js +22 -1
  274. package/dist/video-client.d.ts +13 -22
  275. package/dist/video-client.js +0 -1
  276. package/dist/video.d.ts +115 -250
  277. package/dist/video.js +3 -5
  278. package/package.json +516 -13
  279. package/dist/experimental/evaluation-client.d.ts +0 -21
  280. package/dist/experimental/evaluation-client.js +0 -64
  281. package/dist/experimental/evaluation.d.ts +0 -242
  282. package/dist/experimental/evaluation.js +0 -115
  283. package/dist/experimental/system-one.d.ts +0 -16
  284. package/dist/experimental/system-one.js +0 -135
  285. package/dist/promise.d.ts +0 -1021
  286. package/dist/promise.js +0 -101
  287. package/dist/provider.d.ts +0 -23
  288. package/dist/provider.js +0 -2
@@ -33,6 +33,9 @@ declare const MediaInput: Schema.Union<readonly [Schema.Struct<{
33
33
  readonly detail: Schema.optional<Schema.String>;
34
34
  readonly file_data: Schema.optional<Schema.String>;
35
35
  readonly file_url: Schema.optional<Schema.String>;
36
+ }>, Schema.Struct<{
37
+ readonly type: Schema.tag<"input_video">;
38
+ readonly video_url: Schema.String;
36
39
  }>]>;
37
40
  export type MediaInput = Schema.Schema.Type<typeof MediaInput>;
38
41
  export declare const OpenResponsesOutputText: Schema.Struct<{
@@ -134,6 +137,9 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
134
137
  readonly detail: Schema.optional<Schema.String>;
135
138
  readonly file_data: Schema.optional<Schema.String>;
136
139
  readonly file_url: Schema.optional<Schema.String>;
140
+ }>, Schema.Struct<{
141
+ readonly type: Schema.tag<"input_video">;
142
+ readonly video_url: Schema.String;
137
143
  }>]>]>>;
138
144
  readonly id: Schema.optional<Schema.String>;
139
145
  readonly status: Schema.optional<Schema.String>;
@@ -270,6 +276,9 @@ export declare const coreFields: {
270
276
  readonly detail: Schema.optional<Schema.String>;
271
277
  readonly file_data: Schema.optional<Schema.String>;
272
278
  readonly file_url: Schema.optional<Schema.String>;
279
+ }>, Schema.Struct<{
280
+ readonly type: Schema.tag<"input_video">;
281
+ readonly video_url: Schema.String;
273
282
  }>]>]>>;
274
283
  readonly id: Schema.optional<Schema.String>;
275
284
  readonly status: Schema.optional<Schema.String>;
@@ -431,6 +440,9 @@ export declare const OpenResponsesBody: Schema.Struct<{
431
440
  readonly detail: Schema.optional<Schema.String>;
432
441
  readonly file_data: Schema.optional<Schema.String>;
433
442
  readonly file_url: Schema.optional<Schema.String>;
443
+ }>, Schema.Struct<{
444
+ readonly type: Schema.tag<"input_video">;
445
+ readonly video_url: Schema.String;
434
446
  }>]>]>>;
435
447
  readonly id: Schema.optional<Schema.String>;
436
448
  readonly status: Schema.optional<Schema.String>;
@@ -883,9 +895,6 @@ export declare const lowerTool: (protocolName: string, tool: ToolDefinition) =>
883
895
  strict: boolean;
884
896
  }, AIError, never>;
885
897
  export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter: ProviderAdapter) => Effect.Effect<({
886
- readonly [x: string]: unknown;
887
- readonly type: string;
888
- } | {
889
898
  readonly type: "function";
890
899
  readonly name: string;
891
900
  readonly description: string;
@@ -893,6 +902,9 @@ export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter:
893
902
  readonly [x: string]: unknown;
894
903
  };
895
904
  readonly strict?: boolean | undefined;
905
+ } | {
906
+ readonly [x: string]: unknown;
907
+ readonly type: string;
896
908
  })[], AIError, never>;
897
909
  export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"auto" | "none" | "required" | {
898
910
  type: "function";
@@ -903,55 +915,10 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
903
915
  }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
904
916
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
905
917
  input: ({
906
- readonly [x: string]: unknown;
907
- readonly type: "web_search_call";
908
- readonly id: string;
909
- readonly status?: string | undefined;
910
- readonly action?: {
911
- readonly [x: string]: unknown;
912
- } | null | undefined;
913
- } | {
914
- readonly [x: string]: unknown;
915
- readonly type: "file_search_call";
916
- readonly id: string;
917
- readonly status?: string | undefined;
918
- readonly queries?: readonly string[] | undefined;
919
- readonly results?: readonly {
920
- readonly [x: string]: unknown;
921
- }[] | null | undefined;
922
- } | {
923
- readonly [x: string]: unknown;
924
- readonly type: "code_interpreter_call";
925
- readonly id: string;
926
- readonly status?: string | undefined;
927
- readonly code?: string | null | undefined;
928
- readonly container_id?: string | null | undefined;
929
- readonly outputs?: readonly {
930
- readonly [x: string]: unknown;
931
- }[] | null | undefined;
932
- } | {
933
- readonly [x: string]: unknown;
934
- readonly type: "mcp_call";
935
- readonly id: string;
936
- readonly status?: string | undefined;
937
- readonly server_label?: string | undefined;
938
- readonly name?: string | undefined;
939
- readonly arguments?: string | undefined;
940
- readonly output?: string | null | undefined;
941
- readonly error?: unknown;
942
- } | {
943
918
  readonly type: "configuration_update";
944
919
  readonly reasoning: {
945
920
  readonly effort: OpenResponsesOptions.ReasoningEffort;
946
921
  };
947
- } | {
948
- readonly [x: string]: unknown;
949
- readonly type: string;
950
- readonly id: string;
951
- } | {
952
- readonly type: "compaction";
953
- readonly id?: string | null | undefined;
954
- readonly encrypted_content: string;
955
922
  } | {
956
923
  readonly type: "message";
957
924
  readonly role: "system";
@@ -960,10 +927,48 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
960
927
  readonly type: "message";
961
928
  readonly role: "developer";
962
929
  readonly content: string;
930
+ } | {
931
+ readonly type: "function_call_output";
932
+ readonly call_id: string;
933
+ readonly output: string | readonly ({
934
+ readonly type: "input_text";
935
+ readonly text: string;
936
+ } | {
937
+ readonly type: "input_video";
938
+ readonly video_url: string;
939
+ } | {
940
+ readonly type: "input_image";
941
+ readonly image_url: string;
942
+ readonly detail?: string | undefined;
943
+ } | {
944
+ readonly type: "input_file";
945
+ readonly filename: string;
946
+ readonly detail?: string | undefined;
947
+ readonly file_data?: string | undefined;
948
+ readonly file_url?: string | undefined;
949
+ })[];
950
+ } | {
951
+ readonly type: "reasoning";
952
+ readonly id?: string | undefined;
953
+ readonly summary: readonly {
954
+ readonly type: "summary_text";
955
+ readonly text: string;
956
+ }[];
957
+ readonly encrypted_content?: string | null | undefined;
958
+ } | {
959
+ readonly type: "compaction";
960
+ readonly id?: string | null | undefined;
961
+ readonly encrypted_content: string;
963
962
  } | {
964
963
  readonly type: "message";
965
964
  readonly role: "user";
966
965
  readonly content: readonly ({
966
+ readonly type: "input_text";
967
+ readonly text: string;
968
+ } | {
969
+ readonly type: "input_video";
970
+ readonly video_url: string;
971
+ } | {
967
972
  readonly type: "input_image";
968
973
  readonly image_url: string;
969
974
  readonly detail?: string | undefined;
@@ -973,9 +978,6 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
973
978
  readonly detail?: string | undefined;
974
979
  readonly file_data?: string | undefined;
975
980
  readonly file_url?: string | undefined;
976
- } | {
977
- readonly type: "input_text";
978
- readonly text: string;
979
981
  })[];
980
982
  readonly id?: string | undefined;
981
983
  readonly status?: string | undefined;
@@ -989,14 +991,6 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
989
991
  }[];
990
992
  readonly phase?: "commentary" | "final_answer" | null | undefined;
991
993
  readonly status?: string | undefined;
992
- } | {
993
- readonly type: "reasoning";
994
- readonly id?: string | undefined;
995
- readonly summary: readonly {
996
- readonly type: "summary_text";
997
- readonly text: string;
998
- }[];
999
- readonly encrypted_content?: string | null | undefined;
1000
994
  } | {
1001
995
  readonly type: "function_call";
1002
996
  readonly id?: string | undefined;
@@ -1005,25 +999,46 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
1005
999
  readonly namespace?: string | undefined;
1006
1000
  readonly arguments: string;
1007
1001
  } | {
1008
- readonly type: "function_call_output";
1009
- readonly call_id: string;
1010
- readonly output: string | readonly ({
1011
- readonly type: "input_image";
1012
- readonly image_url: string;
1013
- readonly detail?: string | undefined;
1014
- } | {
1015
- readonly type: "input_file";
1016
- readonly filename: string;
1017
- readonly detail?: string | undefined;
1018
- readonly file_data?: string | undefined;
1019
- readonly file_url?: string | undefined;
1020
- } | {
1021
- readonly type: "input_text";
1022
- readonly text: string;
1023
- } | {
1024
- readonly type: "input_video";
1025
- readonly video_url: string;
1026
- })[];
1002
+ readonly [x: string]: unknown;
1003
+ readonly type: "web_search_call";
1004
+ readonly id: string;
1005
+ readonly status?: string | undefined;
1006
+ readonly action?: {
1007
+ readonly [x: string]: unknown;
1008
+ } | null | undefined;
1009
+ } | {
1010
+ readonly [x: string]: unknown;
1011
+ readonly type: "file_search_call";
1012
+ readonly id: string;
1013
+ readonly status?: string | undefined;
1014
+ readonly queries?: readonly string[] | undefined;
1015
+ readonly results?: readonly {
1016
+ readonly [x: string]: unknown;
1017
+ }[] | null | undefined;
1018
+ } | {
1019
+ readonly [x: string]: unknown;
1020
+ readonly type: "code_interpreter_call";
1021
+ readonly id: string;
1022
+ readonly status?: string | undefined;
1023
+ readonly code?: string | null | undefined;
1024
+ readonly container_id?: string | null | undefined;
1025
+ readonly outputs?: readonly {
1026
+ readonly [x: string]: unknown;
1027
+ }[] | null | undefined;
1028
+ } | {
1029
+ readonly [x: string]: unknown;
1030
+ readonly type: "mcp_call";
1031
+ readonly id: string;
1032
+ readonly status?: string | undefined;
1033
+ readonly server_label?: string | undefined;
1034
+ readonly name?: string | undefined;
1035
+ readonly arguments?: string | undefined;
1036
+ readonly output?: string | null | undefined;
1037
+ readonly error?: unknown;
1038
+ } | {
1039
+ readonly [x: string]: unknown;
1040
+ readonly type: string;
1041
+ readonly id: string;
1027
1042
  })[];
1028
1043
  instructions?: string | undefined;
1029
1044
  }, AIError, never>;
@@ -1057,8 +1072,8 @@ export declare const lowerGeneration: (request: LLMRequest, options?: OpenRespon
1057
1072
  parallel_tool_calls?: boolean | undefined;
1058
1073
  truncation?: "auto" | "disabled" | undefined;
1059
1074
  };
1060
- export declare const resolveParallelToolCalls: (request: LLMRequest) => boolean | undefined;
1061
- export declare const allowedToolChoice: (request: LLMRequest) => {
1075
+ export declare const resolveParallelToolCalls: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => boolean | undefined;
1076
+ export declare const allowedToolChoice: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => {
1062
1077
  type: "allowed_tools";
1063
1078
  mode: "auto" | "none" | "required";
1064
1079
  tools: {
@@ -1071,55 +1086,10 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1071
1086
  }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
1072
1087
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
1073
1088
  input: ({
1074
- readonly [x: string]: unknown;
1075
- readonly type: "web_search_call";
1076
- readonly id: string;
1077
- readonly status?: string | undefined;
1078
- readonly action?: {
1079
- readonly [x: string]: unknown;
1080
- } | null | undefined;
1081
- } | {
1082
- readonly [x: string]: unknown;
1083
- readonly type: "file_search_call";
1084
- readonly id: string;
1085
- readonly status?: string | undefined;
1086
- readonly queries?: readonly string[] | undefined;
1087
- readonly results?: readonly {
1088
- readonly [x: string]: unknown;
1089
- }[] | null | undefined;
1090
- } | {
1091
- readonly [x: string]: unknown;
1092
- readonly type: "code_interpreter_call";
1093
- readonly id: string;
1094
- readonly status?: string | undefined;
1095
- readonly code?: string | null | undefined;
1096
- readonly container_id?: string | null | undefined;
1097
- readonly outputs?: readonly {
1098
- readonly [x: string]: unknown;
1099
- }[] | null | undefined;
1100
- } | {
1101
- readonly [x: string]: unknown;
1102
- readonly type: "mcp_call";
1103
- readonly id: string;
1104
- readonly status?: string | undefined;
1105
- readonly server_label?: string | undefined;
1106
- readonly name?: string | undefined;
1107
- readonly arguments?: string | undefined;
1108
- readonly output?: string | null | undefined;
1109
- readonly error?: unknown;
1110
- } | {
1111
1089
  readonly type: "configuration_update";
1112
1090
  readonly reasoning: {
1113
1091
  readonly effort: OpenResponsesOptions.ReasoningEffort;
1114
1092
  };
1115
- } | {
1116
- readonly [x: string]: unknown;
1117
- readonly type: string;
1118
- readonly id: string;
1119
- } | {
1120
- readonly type: "compaction";
1121
- readonly id?: string | null | undefined;
1122
- readonly encrypted_content: string;
1123
1093
  } | {
1124
1094
  readonly type: "message";
1125
1095
  readonly role: "system";
@@ -1128,10 +1098,48 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1128
1098
  readonly type: "message";
1129
1099
  readonly role: "developer";
1130
1100
  readonly content: string;
1101
+ } | {
1102
+ readonly type: "function_call_output";
1103
+ readonly call_id: string;
1104
+ readonly output: string | readonly ({
1105
+ readonly type: "input_text";
1106
+ readonly text: string;
1107
+ } | {
1108
+ readonly type: "input_video";
1109
+ readonly video_url: string;
1110
+ } | {
1111
+ readonly type: "input_image";
1112
+ readonly image_url: string;
1113
+ readonly detail?: string | undefined;
1114
+ } | {
1115
+ readonly type: "input_file";
1116
+ readonly filename: string;
1117
+ readonly detail?: string | undefined;
1118
+ readonly file_data?: string | undefined;
1119
+ readonly file_url?: string | undefined;
1120
+ })[];
1121
+ } | {
1122
+ readonly type: "reasoning";
1123
+ readonly id?: string | undefined;
1124
+ readonly summary: readonly {
1125
+ readonly type: "summary_text";
1126
+ readonly text: string;
1127
+ }[];
1128
+ readonly encrypted_content?: string | null | undefined;
1129
+ } | {
1130
+ readonly type: "compaction";
1131
+ readonly id?: string | null | undefined;
1132
+ readonly encrypted_content: string;
1131
1133
  } | {
1132
1134
  readonly type: "message";
1133
1135
  readonly role: "user";
1134
1136
  readonly content: readonly ({
1137
+ readonly type: "input_text";
1138
+ readonly text: string;
1139
+ } | {
1140
+ readonly type: "input_video";
1141
+ readonly video_url: string;
1142
+ } | {
1135
1143
  readonly type: "input_image";
1136
1144
  readonly image_url: string;
1137
1145
  readonly detail?: string | undefined;
@@ -1141,9 +1149,6 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1141
1149
  readonly detail?: string | undefined;
1142
1150
  readonly file_data?: string | undefined;
1143
1151
  readonly file_url?: string | undefined;
1144
- } | {
1145
- readonly type: "input_text";
1146
- readonly text: string;
1147
1152
  })[];
1148
1153
  readonly id?: string | undefined;
1149
1154
  readonly status?: string | undefined;
@@ -1157,14 +1162,6 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1157
1162
  }[];
1158
1163
  readonly phase?: "commentary" | "final_answer" | null | undefined;
1159
1164
  readonly status?: string | undefined;
1160
- } | {
1161
- readonly type: "reasoning";
1162
- readonly id?: string | undefined;
1163
- readonly summary: readonly {
1164
- readonly type: "summary_text";
1165
- readonly text: string;
1166
- }[];
1167
- readonly encrypted_content?: string | null | undefined;
1168
1165
  } | {
1169
1166
  readonly type: "function_call";
1170
1167
  readonly id?: string | undefined;
@@ -1173,25 +1170,46 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1173
1170
  readonly namespace?: string | undefined;
1174
1171
  readonly arguments: string;
1175
1172
  } | {
1176
- readonly type: "function_call_output";
1177
- readonly call_id: string;
1178
- readonly output: string | readonly ({
1179
- readonly type: "input_image";
1180
- readonly image_url: string;
1181
- readonly detail?: string | undefined;
1182
- } | {
1183
- readonly type: "input_file";
1184
- readonly filename: string;
1185
- readonly detail?: string | undefined;
1186
- readonly file_data?: string | undefined;
1187
- readonly file_url?: string | undefined;
1188
- } | {
1189
- readonly type: "input_text";
1190
- readonly text: string;
1191
- } | {
1192
- readonly type: "input_video";
1193
- readonly video_url: string;
1194
- })[];
1173
+ readonly [x: string]: unknown;
1174
+ readonly type: "web_search_call";
1175
+ readonly id: string;
1176
+ readonly status?: string | undefined;
1177
+ readonly action?: {
1178
+ readonly [x: string]: unknown;
1179
+ } | null | undefined;
1180
+ } | {
1181
+ readonly [x: string]: unknown;
1182
+ readonly type: "file_search_call";
1183
+ readonly id: string;
1184
+ readonly status?: string | undefined;
1185
+ readonly queries?: readonly string[] | undefined;
1186
+ readonly results?: readonly {
1187
+ readonly [x: string]: unknown;
1188
+ }[] | null | undefined;
1189
+ } | {
1190
+ readonly [x: string]: unknown;
1191
+ readonly type: "code_interpreter_call";
1192
+ readonly id: string;
1193
+ readonly status?: string | undefined;
1194
+ readonly code?: string | null | undefined;
1195
+ readonly container_id?: string | null | undefined;
1196
+ readonly outputs?: readonly {
1197
+ readonly [x: string]: unknown;
1198
+ }[] | null | undefined;
1199
+ } | {
1200
+ readonly [x: string]: unknown;
1201
+ readonly type: "mcp_call";
1202
+ readonly id: string;
1203
+ readonly status?: string | undefined;
1204
+ readonly server_label?: string | undefined;
1205
+ readonly name?: string | undefined;
1206
+ readonly arguments?: string | undefined;
1207
+ readonly output?: string | null | undefined;
1208
+ readonly error?: unknown;
1209
+ } | {
1210
+ readonly [x: string]: unknown;
1211
+ readonly type: string;
1212
+ readonly id: string;
1195
1213
  })[];
1196
1214
  instructions?: string | undefined;
1197
1215
  stream: true;
@@ -1223,9 +1241,6 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1223
1241
  parallel_tool_calls?: boolean | undefined;
1224
1242
  truncation?: "auto" | "disabled" | undefined;
1225
1243
  tools: ({
1226
- readonly [x: string]: unknown;
1227
- readonly type: string;
1228
- } | {
1229
1244
  readonly type: "function";
1230
1245
  readonly name: string;
1231
1246
  readonly description: string;
@@ -1233,6 +1248,9 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1233
1248
  readonly [x: string]: unknown;
1234
1249
  };
1235
1250
  readonly strict?: boolean | undefined;
1251
+ } | {
1252
+ readonly [x: string]: unknown;
1253
+ readonly type: string;
1236
1254
  })[] | undefined;
1237
1255
  tool_choice: "auto" | "none" | "required" | {
1238
1256
  type: "function";
@@ -1249,55 +1267,10 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
1249
1267
  export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1250
1268
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
1251
1269
  input: ({
1252
- readonly [x: string]: unknown;
1253
- readonly type: "web_search_call";
1254
- readonly id: string;
1255
- readonly status?: string | undefined;
1256
- readonly action?: {
1257
- readonly [x: string]: unknown;
1258
- } | null | undefined;
1259
- } | {
1260
- readonly [x: string]: unknown;
1261
- readonly type: "file_search_call";
1262
- readonly id: string;
1263
- readonly status?: string | undefined;
1264
- readonly queries?: readonly string[] | undefined;
1265
- readonly results?: readonly {
1266
- readonly [x: string]: unknown;
1267
- }[] | null | undefined;
1268
- } | {
1269
- readonly [x: string]: unknown;
1270
- readonly type: "code_interpreter_call";
1271
- readonly id: string;
1272
- readonly status?: string | undefined;
1273
- readonly code?: string | null | undefined;
1274
- readonly container_id?: string | null | undefined;
1275
- readonly outputs?: readonly {
1276
- readonly [x: string]: unknown;
1277
- }[] | null | undefined;
1278
- } | {
1279
- readonly [x: string]: unknown;
1280
- readonly type: "mcp_call";
1281
- readonly id: string;
1282
- readonly status?: string | undefined;
1283
- readonly server_label?: string | undefined;
1284
- readonly name?: string | undefined;
1285
- readonly arguments?: string | undefined;
1286
- readonly output?: string | null | undefined;
1287
- readonly error?: unknown;
1288
- } | {
1289
1270
  readonly type: "configuration_update";
1290
1271
  readonly reasoning: {
1291
1272
  readonly effort: OpenResponsesOptions.ReasoningEffort;
1292
1273
  };
1293
- } | {
1294
- readonly [x: string]: unknown;
1295
- readonly type: string;
1296
- readonly id: string;
1297
- } | {
1298
- readonly type: "compaction";
1299
- readonly id?: string | null | undefined;
1300
- readonly encrypted_content: string;
1301
1274
  } | {
1302
1275
  readonly type: "message";
1303
1276
  readonly role: "system";
@@ -1306,10 +1279,48 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1306
1279
  readonly type: "message";
1307
1280
  readonly role: "developer";
1308
1281
  readonly content: string;
1282
+ } | {
1283
+ readonly type: "function_call_output";
1284
+ readonly call_id: string;
1285
+ readonly output: string | readonly ({
1286
+ readonly type: "input_text";
1287
+ readonly text: string;
1288
+ } | {
1289
+ readonly type: "input_video";
1290
+ readonly video_url: string;
1291
+ } | {
1292
+ readonly type: "input_image";
1293
+ readonly image_url: string;
1294
+ readonly detail?: string | undefined;
1295
+ } | {
1296
+ readonly type: "input_file";
1297
+ readonly filename: string;
1298
+ readonly detail?: string | undefined;
1299
+ readonly file_data?: string | undefined;
1300
+ readonly file_url?: string | undefined;
1301
+ })[];
1302
+ } | {
1303
+ readonly type: "reasoning";
1304
+ readonly id?: string | undefined;
1305
+ readonly summary: readonly {
1306
+ readonly type: "summary_text";
1307
+ readonly text: string;
1308
+ }[];
1309
+ readonly encrypted_content?: string | null | undefined;
1310
+ } | {
1311
+ readonly type: "compaction";
1312
+ readonly id?: string | null | undefined;
1313
+ readonly encrypted_content: string;
1309
1314
  } | {
1310
1315
  readonly type: "message";
1311
1316
  readonly role: "user";
1312
1317
  readonly content: readonly ({
1318
+ readonly type: "input_text";
1319
+ readonly text: string;
1320
+ } | {
1321
+ readonly type: "input_video";
1322
+ readonly video_url: string;
1323
+ } | {
1313
1324
  readonly type: "input_image";
1314
1325
  readonly image_url: string;
1315
1326
  readonly detail?: string | undefined;
@@ -1319,9 +1330,6 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1319
1330
  readonly detail?: string | undefined;
1320
1331
  readonly file_data?: string | undefined;
1321
1332
  readonly file_url?: string | undefined;
1322
- } | {
1323
- readonly type: "input_text";
1324
- readonly text: string;
1325
1333
  })[];
1326
1334
  readonly id?: string | undefined;
1327
1335
  readonly status?: string | undefined;
@@ -1335,14 +1343,6 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1335
1343
  }[];
1336
1344
  readonly phase?: "commentary" | "final_answer" | null | undefined;
1337
1345
  readonly status?: string | undefined;
1338
- } | {
1339
- readonly type: "reasoning";
1340
- readonly id?: string | undefined;
1341
- readonly summary: readonly {
1342
- readonly type: "summary_text";
1343
- readonly text: string;
1344
- }[];
1345
- readonly encrypted_content?: string | null | undefined;
1346
1346
  } | {
1347
1347
  readonly type: "function_call";
1348
1348
  readonly id?: string | undefined;
@@ -1351,25 +1351,46 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1351
1351
  readonly namespace?: string | undefined;
1352
1352
  readonly arguments: string;
1353
1353
  } | {
1354
- readonly type: "function_call_output";
1355
- readonly call_id: string;
1356
- readonly output: string | readonly ({
1357
- readonly type: "input_image";
1358
- readonly image_url: string;
1359
- readonly detail?: string | undefined;
1360
- } | {
1361
- readonly type: "input_file";
1362
- readonly filename: string;
1363
- readonly detail?: string | undefined;
1364
- readonly file_data?: string | undefined;
1365
- readonly file_url?: string | undefined;
1366
- } | {
1367
- readonly type: "input_text";
1368
- readonly text: string;
1369
- } | {
1370
- readonly type: "input_video";
1371
- readonly video_url: string;
1372
- })[];
1354
+ readonly [x: string]: unknown;
1355
+ readonly type: "web_search_call";
1356
+ readonly id: string;
1357
+ readonly status?: string | undefined;
1358
+ readonly action?: {
1359
+ readonly [x: string]: unknown;
1360
+ } | null | undefined;
1361
+ } | {
1362
+ readonly [x: string]: unknown;
1363
+ readonly type: "file_search_call";
1364
+ readonly id: string;
1365
+ readonly status?: string | undefined;
1366
+ readonly queries?: readonly string[] | undefined;
1367
+ readonly results?: readonly {
1368
+ readonly [x: string]: unknown;
1369
+ }[] | null | undefined;
1370
+ } | {
1371
+ readonly [x: string]: unknown;
1372
+ readonly type: "code_interpreter_call";
1373
+ readonly id: string;
1374
+ readonly status?: string | undefined;
1375
+ readonly code?: string | null | undefined;
1376
+ readonly container_id?: string | null | undefined;
1377
+ readonly outputs?: readonly {
1378
+ readonly [x: string]: unknown;
1379
+ }[] | null | undefined;
1380
+ } | {
1381
+ readonly [x: string]: unknown;
1382
+ readonly type: "mcp_call";
1383
+ readonly id: string;
1384
+ readonly status?: string | undefined;
1385
+ readonly server_label?: string | undefined;
1386
+ readonly name?: string | undefined;
1387
+ readonly arguments?: string | undefined;
1388
+ readonly output?: string | null | undefined;
1389
+ readonly error?: unknown;
1390
+ } | {
1391
+ readonly [x: string]: unknown;
1392
+ readonly type: string;
1393
+ readonly id: string;
1373
1394
  })[];
1374
1395
  instructions?: string | undefined;
1375
1396
  stream: true;
@@ -1401,9 +1422,6 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1401
1422
  parallel_tool_calls?: boolean | undefined;
1402
1423
  truncation?: "auto" | "disabled" | undefined;
1403
1424
  tools: ({
1404
- readonly [x: string]: unknown;
1405
- readonly type: string;
1406
- } | {
1407
1425
  readonly type: "function";
1408
1426
  readonly name: string;
1409
1427
  readonly description: string;
@@ -1411,6 +1429,9 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1411
1429
  readonly [x: string]: unknown;
1412
1430
  };
1413
1431
  readonly strict?: boolean | undefined;
1432
+ } | {
1433
+ readonly [x: string]: unknown;
1434
+ readonly type: string;
1414
1435
  })[] | undefined;
1415
1436
  tool_choice: "auto" | "none" | "required" | {
1416
1437
  type: "function";
@@ -1441,6 +1462,9 @@ export declare const providerFailure: (event: Event, fallback: string, body?: st
1441
1462
  export declare const step: (state: ParserState, event: NormalizedEvent) => AIError | Effect.Effect<StepResult, never, never> | Effect.Effect<[ParserState, readonly ({
1442
1463
  readonly type: "step-start";
1443
1464
  readonly index: number;
1465
+ } | {
1466
+ readonly type: "raw";
1467
+ readonly data: unknown;
1444
1468
  } | {
1445
1469
  readonly type: "text-start";
1446
1470
  readonly id: string;
@@ -1662,67 +1686,60 @@ export declare const initial: (request: LLMRequest, adapter?: ProviderAdapter) =
1662
1686
  export declare const protocol: Protocol<{
1663
1687
  readonly model: string;
1664
1688
  readonly input: readonly ({
1665
- readonly [x: string]: unknown;
1666
- readonly type: "web_search_call";
1667
- readonly id: string;
1668
- readonly status?: string | undefined;
1669
- readonly action?: {
1670
- readonly [x: string]: unknown;
1671
- } | null | undefined;
1689
+ readonly type: "configuration_update";
1690
+ readonly reasoning: {
1691
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1692
+ };
1672
1693
  } | {
1673
- readonly [x: string]: unknown;
1674
- readonly type: "file_search_call";
1675
- readonly id: string;
1676
- readonly status?: string | undefined;
1677
- readonly queries?: readonly string[] | undefined;
1678
- readonly results?: readonly {
1679
- readonly [x: string]: unknown;
1680
- }[] | null | undefined;
1694
+ readonly type: "message";
1695
+ readonly role: "system";
1696
+ readonly content: string;
1681
1697
  } | {
1682
- readonly [x: string]: unknown;
1683
- readonly type: "code_interpreter_call";
1684
- readonly id: string;
1685
- readonly status?: string | undefined;
1686
- readonly code?: string | null | undefined;
1687
- readonly container_id?: string | null | undefined;
1688
- readonly outputs?: readonly {
1689
- readonly [x: string]: unknown;
1690
- }[] | null | undefined;
1691
- } | {
1692
- readonly [x: string]: unknown;
1693
- readonly type: "mcp_call";
1694
- readonly id: string;
1695
- readonly status?: string | undefined;
1696
- readonly server_label?: string | undefined;
1697
- readonly name?: string | undefined;
1698
- readonly arguments?: string | undefined;
1699
- readonly output?: string | null | undefined;
1700
- readonly error?: unknown;
1698
+ readonly type: "message";
1699
+ readonly role: "developer";
1700
+ readonly content: string;
1701
1701
  } | {
1702
- readonly type: "configuration_update";
1703
- readonly reasoning: {
1704
- readonly effort: OpenResponsesOptions.ReasoningEffort;
1705
- };
1702
+ readonly type: "function_call_output";
1703
+ readonly call_id: string;
1704
+ readonly output: string | readonly ({
1705
+ readonly type: "input_text";
1706
+ readonly text: string;
1707
+ } | {
1708
+ readonly type: "input_video";
1709
+ readonly video_url: string;
1710
+ } | {
1711
+ readonly type: "input_image";
1712
+ readonly image_url: string;
1713
+ readonly detail?: string | undefined;
1714
+ } | {
1715
+ readonly type: "input_file";
1716
+ readonly filename: string;
1717
+ readonly detail?: string | undefined;
1718
+ readonly file_data?: string | undefined;
1719
+ readonly file_url?: string | undefined;
1720
+ })[];
1706
1721
  } | {
1707
- readonly [x: string]: unknown;
1708
- readonly type: string;
1709
- readonly id: string;
1722
+ readonly type: "reasoning";
1723
+ readonly id?: string | undefined;
1724
+ readonly summary: readonly {
1725
+ readonly type: "summary_text";
1726
+ readonly text: string;
1727
+ }[];
1728
+ readonly encrypted_content?: string | null | undefined;
1710
1729
  } | {
1711
1730
  readonly type: "compaction";
1712
1731
  readonly id?: string | null | undefined;
1713
1732
  readonly encrypted_content: string;
1714
- } | {
1715
- readonly type: "message";
1716
- readonly role: "system";
1717
- readonly content: string;
1718
- } | {
1719
- readonly type: "message";
1720
- readonly role: "developer";
1721
- readonly content: string;
1722
1733
  } | {
1723
1734
  readonly type: "message";
1724
1735
  readonly role: "user";
1725
1736
  readonly content: readonly ({
1737
+ readonly type: "input_text";
1738
+ readonly text: string;
1739
+ } | {
1740
+ readonly type: "input_video";
1741
+ readonly video_url: string;
1742
+ } | {
1726
1743
  readonly type: "input_image";
1727
1744
  readonly image_url: string;
1728
1745
  readonly detail?: string | undefined;
@@ -1732,9 +1749,6 @@ export declare const protocol: Protocol<{
1732
1749
  readonly detail?: string | undefined;
1733
1750
  readonly file_data?: string | undefined;
1734
1751
  readonly file_url?: string | undefined;
1735
- } | {
1736
- readonly type: "input_text";
1737
- readonly text: string;
1738
1752
  })[];
1739
1753
  readonly id?: string | undefined;
1740
1754
  readonly status?: string | undefined;
@@ -1748,14 +1762,6 @@ export declare const protocol: Protocol<{
1748
1762
  }[];
1749
1763
  readonly phase?: "commentary" | "final_answer" | null | undefined;
1750
1764
  readonly status?: string | undefined;
1751
- } | {
1752
- readonly type: "reasoning";
1753
- readonly id?: string | undefined;
1754
- readonly summary: readonly {
1755
- readonly type: "summary_text";
1756
- readonly text: string;
1757
- }[];
1758
- readonly encrypted_content?: string | null | undefined;
1759
1765
  } | {
1760
1766
  readonly type: "function_call";
1761
1767
  readonly id?: string | undefined;
@@ -1764,31 +1770,49 @@ export declare const protocol: Protocol<{
1764
1770
  readonly namespace?: string | undefined;
1765
1771
  readonly arguments: string;
1766
1772
  } | {
1767
- readonly type: "function_call_output";
1768
- readonly call_id: string;
1769
- readonly output: string | readonly ({
1770
- readonly type: "input_image";
1771
- readonly image_url: string;
1772
- readonly detail?: string | undefined;
1773
- } | {
1774
- readonly type: "input_file";
1775
- readonly filename: string;
1776
- readonly detail?: string | undefined;
1777
- readonly file_data?: string | undefined;
1778
- readonly file_url?: string | undefined;
1779
- } | {
1780
- readonly type: "input_text";
1781
- readonly text: string;
1782
- } | {
1783
- readonly type: "input_video";
1784
- readonly video_url: string;
1785
- })[];
1773
+ readonly [x: string]: unknown;
1774
+ readonly type: "web_search_call";
1775
+ readonly id: string;
1776
+ readonly status?: string | undefined;
1777
+ readonly action?: {
1778
+ readonly [x: string]: unknown;
1779
+ } | null | undefined;
1780
+ } | {
1781
+ readonly [x: string]: unknown;
1782
+ readonly type: "file_search_call";
1783
+ readonly id: string;
1784
+ readonly status?: string | undefined;
1785
+ readonly queries?: readonly string[] | undefined;
1786
+ readonly results?: readonly {
1787
+ readonly [x: string]: unknown;
1788
+ }[] | null | undefined;
1789
+ } | {
1790
+ readonly [x: string]: unknown;
1791
+ readonly type: "code_interpreter_call";
1792
+ readonly id: string;
1793
+ readonly status?: string | undefined;
1794
+ readonly code?: string | null | undefined;
1795
+ readonly container_id?: string | null | undefined;
1796
+ readonly outputs?: readonly {
1797
+ readonly [x: string]: unknown;
1798
+ }[] | null | undefined;
1799
+ } | {
1800
+ readonly [x: string]: unknown;
1801
+ readonly type: "mcp_call";
1802
+ readonly id: string;
1803
+ readonly status?: string | undefined;
1804
+ readonly server_label?: string | undefined;
1805
+ readonly name?: string | undefined;
1806
+ readonly arguments?: string | undefined;
1807
+ readonly output?: string | null | undefined;
1808
+ readonly error?: unknown;
1809
+ } | {
1810
+ readonly [x: string]: unknown;
1811
+ readonly type: string;
1812
+ readonly id: string;
1786
1813
  })[];
1787
1814
  readonly instructions?: string | undefined;
1788
1815
  readonly tools?: readonly ({
1789
- readonly [x: string]: unknown;
1790
- readonly type: string;
1791
- } | {
1792
1816
  readonly type: "function";
1793
1817
  readonly name: string;
1794
1818
  readonly description: string;
@@ -1796,6 +1820,9 @@ export declare const protocol: Protocol<{
1796
1820
  readonly [x: string]: unknown;
1797
1821
  };
1798
1822
  readonly strict?: boolean | undefined;
1823
+ } | {
1824
+ readonly [x: string]: unknown;
1825
+ readonly type: string;
1799
1826
  })[] | undefined;
1800
1827
  readonly tool_choice?: "auto" | "none" | "required" | {
1801
1828
  readonly type: "function";
@@ -1898,55 +1925,10 @@ export declare const protocol: Protocol<{
1898
1925
  export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1899
1926
  readonly model: string;
1900
1927
  readonly input: readonly ({
1901
- readonly [x: string]: unknown;
1902
- readonly type: "web_search_call";
1903
- readonly id: string;
1904
- readonly status?: string | undefined;
1905
- readonly action?: {
1906
- readonly [x: string]: unknown;
1907
- } | null | undefined;
1908
- } | {
1909
- readonly [x: string]: unknown;
1910
- readonly type: "file_search_call";
1911
- readonly id: string;
1912
- readonly status?: string | undefined;
1913
- readonly queries?: readonly string[] | undefined;
1914
- readonly results?: readonly {
1915
- readonly [x: string]: unknown;
1916
- }[] | null | undefined;
1917
- } | {
1918
- readonly [x: string]: unknown;
1919
- readonly type: "code_interpreter_call";
1920
- readonly id: string;
1921
- readonly status?: string | undefined;
1922
- readonly code?: string | null | undefined;
1923
- readonly container_id?: string | null | undefined;
1924
- readonly outputs?: readonly {
1925
- readonly [x: string]: unknown;
1926
- }[] | null | undefined;
1927
- } | {
1928
- readonly [x: string]: unknown;
1929
- readonly type: "mcp_call";
1930
- readonly id: string;
1931
- readonly status?: string | undefined;
1932
- readonly server_label?: string | undefined;
1933
- readonly name?: string | undefined;
1934
- readonly arguments?: string | undefined;
1935
- readonly output?: string | null | undefined;
1936
- readonly error?: unknown;
1937
- } | {
1938
1928
  readonly type: "configuration_update";
1939
1929
  readonly reasoning: {
1940
1930
  readonly effort: OpenResponsesOptions.ReasoningEffort;
1941
1931
  };
1942
- } | {
1943
- readonly [x: string]: unknown;
1944
- readonly type: string;
1945
- readonly id: string;
1946
- } | {
1947
- readonly type: "compaction";
1948
- readonly id?: string | null | undefined;
1949
- readonly encrypted_content: string;
1950
1932
  } | {
1951
1933
  readonly type: "message";
1952
1934
  readonly role: "system";
@@ -1955,10 +1937,48 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1955
1937
  readonly type: "message";
1956
1938
  readonly role: "developer";
1957
1939
  readonly content: string;
1940
+ } | {
1941
+ readonly type: "function_call_output";
1942
+ readonly call_id: string;
1943
+ readonly output: string | readonly ({
1944
+ readonly type: "input_text";
1945
+ readonly text: string;
1946
+ } | {
1947
+ readonly type: "input_video";
1948
+ readonly video_url: string;
1949
+ } | {
1950
+ readonly type: "input_image";
1951
+ readonly image_url: string;
1952
+ readonly detail?: string | undefined;
1953
+ } | {
1954
+ readonly type: "input_file";
1955
+ readonly filename: string;
1956
+ readonly detail?: string | undefined;
1957
+ readonly file_data?: string | undefined;
1958
+ readonly file_url?: string | undefined;
1959
+ })[];
1960
+ } | {
1961
+ readonly type: "reasoning";
1962
+ readonly id?: string | undefined;
1963
+ readonly summary: readonly {
1964
+ readonly type: "summary_text";
1965
+ readonly text: string;
1966
+ }[];
1967
+ readonly encrypted_content?: string | null | undefined;
1968
+ } | {
1969
+ readonly type: "compaction";
1970
+ readonly id?: string | null | undefined;
1971
+ readonly encrypted_content: string;
1958
1972
  } | {
1959
1973
  readonly type: "message";
1960
1974
  readonly role: "user";
1961
1975
  readonly content: readonly ({
1976
+ readonly type: "input_text";
1977
+ readonly text: string;
1978
+ } | {
1979
+ readonly type: "input_video";
1980
+ readonly video_url: string;
1981
+ } | {
1962
1982
  readonly type: "input_image";
1963
1983
  readonly image_url: string;
1964
1984
  readonly detail?: string | undefined;
@@ -1968,9 +1988,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1968
1988
  readonly detail?: string | undefined;
1969
1989
  readonly file_data?: string | undefined;
1970
1990
  readonly file_url?: string | undefined;
1971
- } | {
1972
- readonly type: "input_text";
1973
- readonly text: string;
1974
1991
  })[];
1975
1992
  readonly id?: string | undefined;
1976
1993
  readonly status?: string | undefined;
@@ -1984,14 +2001,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1984
2001
  }[];
1985
2002
  readonly phase?: "commentary" | "final_answer" | null | undefined;
1986
2003
  readonly status?: string | undefined;
1987
- } | {
1988
- readonly type: "reasoning";
1989
- readonly id?: string | undefined;
1990
- readonly summary: readonly {
1991
- readonly type: "summary_text";
1992
- readonly text: string;
1993
- }[];
1994
- readonly encrypted_content?: string | null | undefined;
1995
2004
  } | {
1996
2005
  readonly type: "function_call";
1997
2006
  readonly id?: string | undefined;
@@ -2000,31 +2009,49 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
2000
2009
  readonly namespace?: string | undefined;
2001
2010
  readonly arguments: string;
2002
2011
  } | {
2003
- readonly type: "function_call_output";
2004
- readonly call_id: string;
2005
- readonly output: string | readonly ({
2006
- readonly type: "input_image";
2007
- readonly image_url: string;
2008
- readonly detail?: string | undefined;
2009
- } | {
2010
- readonly type: "input_file";
2011
- readonly filename: string;
2012
- readonly detail?: string | undefined;
2013
- readonly file_data?: string | undefined;
2014
- readonly file_url?: string | undefined;
2015
- } | {
2016
- readonly type: "input_text";
2017
- readonly text: string;
2018
- } | {
2019
- readonly type: "input_video";
2020
- readonly video_url: string;
2021
- })[];
2012
+ readonly [x: string]: unknown;
2013
+ readonly type: "web_search_call";
2014
+ readonly id: string;
2015
+ readonly status?: string | undefined;
2016
+ readonly action?: {
2017
+ readonly [x: string]: unknown;
2018
+ } | null | undefined;
2019
+ } | {
2020
+ readonly [x: string]: unknown;
2021
+ readonly type: "file_search_call";
2022
+ readonly id: string;
2023
+ readonly status?: string | undefined;
2024
+ readonly queries?: readonly string[] | undefined;
2025
+ readonly results?: readonly {
2026
+ readonly [x: string]: unknown;
2027
+ }[] | null | undefined;
2028
+ } | {
2029
+ readonly [x: string]: unknown;
2030
+ readonly type: "code_interpreter_call";
2031
+ readonly id: string;
2032
+ readonly status?: string | undefined;
2033
+ readonly code?: string | null | undefined;
2034
+ readonly container_id?: string | null | undefined;
2035
+ readonly outputs?: readonly {
2036
+ readonly [x: string]: unknown;
2037
+ }[] | null | undefined;
2038
+ } | {
2039
+ readonly [x: string]: unknown;
2040
+ readonly type: "mcp_call";
2041
+ readonly id: string;
2042
+ readonly status?: string | undefined;
2043
+ readonly server_label?: string | undefined;
2044
+ readonly name?: string | undefined;
2045
+ readonly arguments?: string | undefined;
2046
+ readonly output?: string | null | undefined;
2047
+ readonly error?: unknown;
2048
+ } | {
2049
+ readonly [x: string]: unknown;
2050
+ readonly type: string;
2051
+ readonly id: string;
2022
2052
  })[];
2023
2053
  readonly instructions?: string | undefined;
2024
2054
  readonly tools?: readonly ({
2025
- readonly [x: string]: unknown;
2026
- readonly type: string;
2027
- } | {
2028
2055
  readonly type: "function";
2029
2056
  readonly name: string;
2030
2057
  readonly description: string;
@@ -2032,6 +2059,9 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
2032
2059
  readonly [x: string]: unknown;
2033
2060
  };
2034
2061
  readonly strict?: boolean | undefined;
2062
+ } | {
2063
+ readonly [x: string]: unknown;
2064
+ readonly type: string;
2035
2065
  })[] | undefined;
2036
2066
  readonly tool_choice?: "auto" | "none" | "required" | {
2037
2067
  readonly type: "function";