@opencode/ai 0.0.0-dev-20498 → 0.0.0-dev-20501

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 (53) hide show
  1. package/README.md +25 -0
  2. package/dist/protocols/alibaba-chat.d.ts +3 -3
  3. package/dist/protocols/alibaba-responses.d.ts +16 -12
  4. package/dist/protocols/alibaba-responses.js +3 -5
  5. package/dist/protocols/google-interactions.d.ts +236 -0
  6. package/dist/protocols/google-interactions.js +478 -0
  7. package/dist/protocols/index.d.ts +1 -0
  8. package/dist/protocols/index.js +1 -0
  9. package/dist/protocols/meta-responses.d.ts +31 -58
  10. package/dist/protocols/meta-responses.js +5 -24
  11. package/dist/protocols/mistral-chat.d.ts +1 -1
  12. package/dist/protocols/open-responses.d.ts +406 -91
  13. package/dist/protocols/open-responses.js +12 -6
  14. package/dist/protocols/openai-chat.d.ts +5 -5
  15. package/dist/protocols/openai-compatible-chat.d.ts +1 -1
  16. package/dist/protocols/openai-compatible-responses.d.ts +16 -4
  17. package/dist/protocols/openai-responses.d.ts +87 -223
  18. package/dist/protocols/openai-responses.js +3 -10
  19. package/dist/protocols/xai-responses.d.ts +18 -21
  20. package/dist/protocols/xai-responses.js +2 -8
  21. package/dist/protocols/zai-chat.d.ts +3 -3
  22. package/dist/providers/alibaba.d.ts +17 -13
  23. package/dist/providers/amazon-bedrock-mantle.d.ts +17 -5
  24. package/dist/providers/azure.d.ts +13 -61
  25. package/dist/providers/baseten.d.ts +2 -2
  26. package/dist/providers/cerebras.d.ts +2 -2
  27. package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
  28. package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
  29. package/dist/providers/cohere.d.ts +2 -2
  30. package/dist/providers/deepinfra.d.ts +2 -2
  31. package/dist/providers/deepseek.d.ts +2 -2
  32. package/dist/providers/digitalocean.d.ts +5 -5
  33. package/dist/providers/fireworks.d.ts +2 -2
  34. package/dist/providers/google/interactions.d.ts +7 -0
  35. package/dist/providers/google/interactions.js +8 -0
  36. package/dist/providers/google-vertex-chat.d.ts +1 -1
  37. package/dist/providers/google-vertex-responses.d.ts +16 -4
  38. package/dist/providers/google.d.ts +94 -3
  39. package/dist/providers/google.js +8 -1
  40. package/dist/providers/groq.d.ts +4 -4
  41. package/dist/providers/meta.d.ts +15 -28
  42. package/dist/providers/minimax.d.ts +17 -5
  43. package/dist/providers/moonshot.d.ts +17 -5
  44. package/dist/providers/openai-compatible-responses.d.ts +16 -4
  45. package/dist/providers/openai-compatible.d.ts +1 -1
  46. package/dist/providers/openai.d.ts +7 -31
  47. package/dist/providers/openrouter.d.ts +5 -5
  48. package/dist/providers/togetherai.d.ts +2 -2
  49. package/dist/providers/xai.d.ts +1 -1
  50. package/dist/providers/zai-coding-plan.d.ts +17 -5
  51. package/dist/providers/zai.d.ts +1 -1
  52. package/dist/route/client.js +2 -5
  53. package/package.json +3 -3
@@ -95,11 +95,21 @@ export declare const ConfigurationUpdate: Schema.Struct<{
95
95
  readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
96
96
  }>;
97
97
  }>;
98
- type ConfigurationUpdate = Schema.Schema.Type<typeof ConfigurationUpdate>;
98
+ export type ConfigurationUpdate = Schema.Schema.Type<typeof ConfigurationUpdate>;
99
+ export declare const HostedToolReplay: Schema.StructWithRest<Schema.Struct<{
100
+ readonly type: Schema.String;
101
+ readonly id: Schema.String;
102
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
103
+ export type HostedToolReplayItem = Schema.Schema.Type<typeof HostedToolReplay>;
99
104
  export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
100
105
  readonly type: Schema.Literal<"compaction">;
101
106
  readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
102
107
  readonly encrypted_content: Schema.String;
108
+ }>, Schema.Struct<{
109
+ readonly type: Schema.Literal<"configuration_update">;
110
+ readonly reasoning: Schema.Struct<{
111
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
112
+ }>;
103
113
  }>, Schema.Struct<{
104
114
  readonly type: Schema.tag<"message">;
105
115
  readonly role: Schema.tag<"system">;
@@ -199,23 +209,10 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
199
209
  readonly arguments: Schema.optional<Schema.String>;
200
210
  readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
201
211
  readonly error: Schema.optional<Schema.Unknown>;
202
- }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>]>;
203
- type OpenResponsesInputItem = Schema.Schema.Type<typeof InputItem>;
204
- export type HostedToolReplayItem = {
205
- readonly type: string;
206
- readonly id: string;
207
- readonly [key: string]: unknown;
208
- };
209
- type LoweredInputItem = OpenResponsesInputItem | HostedToolReplayItem | ConfigurationUpdate | {
210
- readonly type: "message";
211
- readonly id?: string;
212
- readonly role: "assistant";
213
- readonly content: ReadonlyArray<{
214
- readonly type: "output_text";
215
- readonly text: string;
216
- }>;
217
- readonly phase?: MessagePhase | null;
218
- };
212
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
213
+ readonly type: Schema.String;
214
+ readonly id: Schema.String;
215
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>;
219
216
  export declare const Tool: Schema.Struct<{
220
217
  readonly type: Schema.tag<"function">;
221
218
  readonly name: Schema.String;
@@ -223,6 +220,10 @@ export declare const Tool: Schema.Struct<{
223
220
  readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
224
221
  readonly strict: Schema.optional<Schema.Boolean>;
225
222
  }>;
223
+ export declare const HostedTool: Schema.StructWithRest<Schema.Struct<{
224
+ readonly type: Schema.String;
225
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
226
+ export type HostedTool = Schema.Schema.Type<typeof HostedTool>;
226
227
  export declare const ToolChoice: Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
227
228
  readonly type: Schema.tag<"function">;
228
229
  readonly name: Schema.String;
@@ -240,6 +241,11 @@ export declare const coreFields: {
240
241
  readonly type: Schema.Literal<"compaction">;
241
242
  readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
242
243
  readonly encrypted_content: Schema.String;
244
+ }>, Schema.Struct<{
245
+ readonly type: Schema.Literal<"configuration_update">;
246
+ readonly reasoning: Schema.Struct<{
247
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
248
+ }>;
243
249
  }>, Schema.Struct<{
244
250
  readonly type: Schema.tag<"message">;
245
251
  readonly role: Schema.tag<"system">;
@@ -339,15 +345,20 @@ export declare const coreFields: {
339
345
  readonly arguments: Schema.optional<Schema.String>;
340
346
  readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
341
347
  readonly error: Schema.optional<Schema.Unknown>;
342
- }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>]>>;
348
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
349
+ readonly type: Schema.String;
350
+ readonly id: Schema.String;
351
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
343
352
  instructions: Schema.optional<Schema.String>;
344
- tools: Schema.optional<Schema.$Array<Schema.Struct<{
353
+ tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
345
354
  readonly type: Schema.tag<"function">;
346
355
  readonly name: Schema.String;
347
356
  readonly description: Schema.String;
348
357
  readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
349
358
  readonly strict: Schema.optional<Schema.Boolean>;
350
- }>>>;
359
+ }>, Schema.StructWithRest<Schema.Struct<{
360
+ readonly type: Schema.String;
361
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>>;
351
362
  tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
352
363
  readonly type: Schema.tag<"function">;
353
364
  readonly name: Schema.String;
@@ -385,13 +396,18 @@ export declare const coreFields: {
385
396
  presence_penalty: Schema.optional<Schema.Number>;
386
397
  frequency_penalty: Schema.optional<Schema.Number>;
387
398
  };
388
- declare const OpenResponsesBody: Schema.Struct<{
399
+ export declare const OpenResponsesBody: Schema.Struct<{
389
400
  readonly stream: Schema.Literal<true>;
390
401
  readonly model: Schema.String;
391
402
  readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
392
403
  readonly type: Schema.Literal<"compaction">;
393
404
  readonly id: Schema.optional<Schema.NullOr<Schema.String>>;
394
405
  readonly encrypted_content: Schema.String;
406
+ }>, Schema.Struct<{
407
+ readonly type: Schema.Literal<"configuration_update">;
408
+ readonly reasoning: Schema.Struct<{
409
+ readonly effort: Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>;
410
+ }>;
395
411
  }>, Schema.Struct<{
396
412
  readonly type: Schema.tag<"message">;
397
413
  readonly role: Schema.tag<"system">;
@@ -491,15 +507,20 @@ declare const OpenResponsesBody: Schema.Struct<{
491
507
  readonly arguments: Schema.optional<Schema.String>;
492
508
  readonly output: Schema.optional<Schema.NullOr<Schema.String>>;
493
509
  readonly error: Schema.optional<Schema.Unknown>;
494
- }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>]>>;
510
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>, Schema.StructWithRest<Schema.Struct<{
511
+ readonly type: Schema.String;
512
+ readonly id: Schema.String;
513
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>;
495
514
  readonly instructions: Schema.optional<Schema.String>;
496
- readonly tools: Schema.optional<Schema.$Array<Schema.Struct<{
515
+ readonly tools: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
497
516
  readonly type: Schema.tag<"function">;
498
517
  readonly name: Schema.String;
499
518
  readonly description: Schema.String;
500
519
  readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
501
520
  readonly strict: Schema.optional<Schema.Boolean>;
502
- }>>>;
521
+ }>, Schema.StructWithRest<Schema.Struct<{
522
+ readonly type: Schema.String;
523
+ }>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>]>>>;
503
524
  readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
504
525
  readonly type: Schema.tag<"function">;
505
526
  readonly name: Schema.String;
@@ -643,8 +664,8 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
643
664
  readonly name?: string | undefined;
644
665
  readonly namespace?: string | undefined;
645
666
  readonly arguments?: string | undefined;
646
- readonly encrypted_content?: string | null | undefined;
647
667
  readonly call_id?: string | undefined;
668
+ readonly encrypted_content?: string | null | undefined;
648
669
  }[] | undefined;
649
670
  readonly error?: unknown;
650
671
  readonly usage?: {
@@ -671,8 +692,8 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
671
692
  readonly name?: string | undefined;
672
693
  readonly namespace?: string | undefined;
673
694
  readonly arguments?: string | undefined;
674
- readonly encrypted_content?: string | null | undefined;
675
695
  readonly call_id?: string | undefined;
696
+ readonly encrypted_content?: string | null | undefined;
676
697
  } | null | undefined;
677
698
  readonly delta?: string | undefined;
678
699
  readonly arguments?: string | undefined;
@@ -684,9 +705,7 @@ export declare const decodeChannelEvent: (frame: string) => Effect.Effect<{
684
705
  export interface ProviderAdapter {
685
706
  readonly id: string;
686
707
  readonly name: string;
687
- readonly nativeTool?: (native: NonNullable<ToolDefinition["native"]>) => Effect.Effect<{
688
- readonly type: string;
689
- }, AIError>;
708
+ readonly nativeTool?: (native: NonNullable<ToolDefinition["native"]>) => Effect.Effect<HostedTool, AIError>;
690
709
  readonly lowerMedia?: (input: {
691
710
  readonly part: MediaPart;
692
711
  readonly media: Media.Inline | undefined;
@@ -725,9 +744,18 @@ export declare const lowerTool: (protocolName: string, tool: ToolDefinition) =>
725
744
  };
726
745
  strict: boolean;
727
746
  }, AIError, never>;
728
- export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter: ProviderAdapter) => Effect.Effect<{
747
+ export declare const lowerTools: (tools: ReadonlyArray<ToolDefinition>, adapter: ProviderAdapter) => Effect.Effect<({
748
+ readonly [x: string]: unknown;
729
749
  readonly type: string;
730
- }[], AIError, never>;
750
+ } | {
751
+ readonly type: "function";
752
+ readonly description: string;
753
+ readonly name: string;
754
+ readonly parameters: {
755
+ readonly [x: string]: unknown;
756
+ };
757
+ readonly strict?: boolean | undefined;
758
+ })[], AIError, never>;
731
759
  export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"required" | "auto" | "none" | {
732
760
  type: "function";
733
761
  name: string;
@@ -737,7 +765,129 @@ export declare const lowerConversation: (request: LLMRequest<import("../schema/o
737
765
  }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
738
766
  instructions?: string | undefined;
739
767
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
740
- input: LoweredInputItem[];
768
+ input: ({
769
+ readonly [x: string]: unknown;
770
+ readonly id: string;
771
+ readonly type: "web_search_call";
772
+ readonly status?: string | undefined;
773
+ readonly action?: {
774
+ readonly [x: string]: unknown;
775
+ } | null | undefined;
776
+ } | {
777
+ readonly [x: string]: unknown;
778
+ readonly id: string;
779
+ readonly type: "file_search_call";
780
+ readonly status?: string | undefined;
781
+ readonly queries?: readonly string[] | undefined;
782
+ readonly results?: readonly {
783
+ readonly [x: string]: unknown;
784
+ }[] | null | undefined;
785
+ } | {
786
+ readonly [x: string]: unknown;
787
+ readonly id: string;
788
+ readonly type: "code_interpreter_call";
789
+ readonly status?: string | undefined;
790
+ readonly code?: string | null | undefined;
791
+ readonly container_id?: string | null | undefined;
792
+ readonly outputs?: readonly {
793
+ readonly [x: string]: unknown;
794
+ }[] | null | undefined;
795
+ } | {
796
+ readonly [x: string]: unknown;
797
+ readonly id: string;
798
+ readonly type: "mcp_call";
799
+ readonly status?: string | undefined;
800
+ readonly name?: string | undefined;
801
+ readonly output?: string | null | undefined;
802
+ readonly error?: unknown;
803
+ readonly arguments?: string | undefined;
804
+ readonly server_label?: string | undefined;
805
+ } | {
806
+ readonly type: "configuration_update";
807
+ readonly reasoning: {
808
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
809
+ };
810
+ } | {
811
+ readonly [x: string]: unknown;
812
+ readonly type: string;
813
+ readonly id: string;
814
+ } | {
815
+ readonly type: "reasoning";
816
+ readonly summary: readonly {
817
+ readonly type: "summary_text";
818
+ readonly text: string;
819
+ }[];
820
+ readonly id?: string | undefined;
821
+ readonly encrypted_content?: string | null | undefined;
822
+ } | {
823
+ readonly type: "compaction";
824
+ readonly encrypted_content: string;
825
+ readonly id?: string | null | undefined;
826
+ } | {
827
+ readonly type: "message";
828
+ readonly role: "system";
829
+ readonly content: string;
830
+ } | {
831
+ readonly type: "message";
832
+ readonly role: "developer";
833
+ readonly content: string;
834
+ } | {
835
+ readonly type: "message";
836
+ readonly content: readonly ({
837
+ readonly type: "input_image";
838
+ readonly image_url: string;
839
+ readonly detail?: string | undefined;
840
+ } | {
841
+ readonly type: "input_file";
842
+ readonly filename: string;
843
+ readonly detail?: string | undefined;
844
+ readonly file_data?: string | undefined;
845
+ readonly file_url?: string | undefined;
846
+ } | {
847
+ readonly type: "input_text";
848
+ readonly text: string;
849
+ })[];
850
+ readonly role: "user";
851
+ readonly id?: string | undefined;
852
+ readonly status?: string | undefined;
853
+ } | {
854
+ readonly type: "message";
855
+ readonly content: readonly {
856
+ readonly type: "output_text";
857
+ readonly text: string;
858
+ }[];
859
+ readonly role: "assistant";
860
+ readonly id?: string | undefined;
861
+ readonly status?: string | undefined;
862
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
863
+ } | {
864
+ readonly type: "function_call";
865
+ readonly name: string;
866
+ readonly arguments: string;
867
+ readonly call_id: string;
868
+ readonly id?: string | undefined;
869
+ readonly namespace?: string | undefined;
870
+ } | {
871
+ readonly type: "function_call_output";
872
+ readonly call_id: string;
873
+ readonly output: string | readonly ({
874
+ readonly type: "input_image";
875
+ readonly image_url: string;
876
+ readonly detail?: string | undefined;
877
+ } | {
878
+ readonly type: "input_file";
879
+ readonly filename: string;
880
+ readonly detail?: string | undefined;
881
+ readonly file_data?: string | undefined;
882
+ readonly file_url?: string | undefined;
883
+ } | {
884
+ readonly type: "input_text";
885
+ readonly text: string;
886
+ } | {
887
+ readonly type: "input_video";
888
+ readonly video_url: string;
889
+ })[];
890
+ })[];
741
891
  }, AIError, never>;
742
892
  export declare const lowerGeneration: (request: LLMRequest, options?: OpenResponsesOptions.Resolved) => {
743
893
  truncation?: "auto" | "disabled" | undefined;
@@ -781,9 +931,18 @@ export declare const allowedToolChoice: (request: LLMRequest) => {
781
931
  export declare const fromRequestWithAdapter: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
782
932
  readonly [x: string]: unknown;
783
933
  }, import("../route.js").CompactionOperations | undefined>>, adapter: ProviderAdapter) => Effect.Effect<{
784
- tools: {
934
+ tools: ({
935
+ readonly [x: string]: unknown;
785
936
  readonly type: string;
786
- }[] | undefined;
937
+ } | {
938
+ readonly type: "function";
939
+ readonly description: string;
940
+ readonly name: string;
941
+ readonly parameters: {
942
+ readonly [x: string]: unknown;
943
+ };
944
+ readonly strict?: boolean | undefined;
945
+ })[] | undefined;
787
946
  tool_choice: "required" | "auto" | "none" | {
788
947
  type: "allowed_tools";
789
948
  mode: "required" | "auto" | "none";
@@ -825,12 +984,7 @@ export declare const fromRequestWithAdapter: (request: LLMRequest<import("../sch
825
984
  frequency_penalty: number | undefined;
826
985
  instructions?: string | undefined;
827
986
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
828
- input: LoweredInputItem[];
829
- }, AIError, never>;
830
- export declare const fromRequest: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
831
- readonly [x: string]: unknown;
832
- }, import("../route.js").CompactionOperations | undefined>>) => Effect.Effect<{
833
- readonly input: readonly ({
987
+ input: ({
834
988
  readonly [x: string]: unknown;
835
989
  readonly id: string;
836
990
  readonly type: "web_search_call";
@@ -867,6 +1021,15 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
867
1021
  readonly error?: unknown;
868
1022
  readonly arguments?: string | undefined;
869
1023
  readonly server_label?: string | undefined;
1024
+ } | {
1025
+ readonly type: "configuration_update";
1026
+ readonly reasoning: {
1027
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1028
+ };
1029
+ } | {
1030
+ readonly [x: string]: unknown;
1031
+ readonly type: string;
1032
+ readonly id: string;
870
1033
  } | {
871
1034
  readonly type: "reasoning";
872
1035
  readonly summary: readonly {
@@ -944,17 +1107,12 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
944
1107
  readonly video_url: string;
945
1108
  })[];
946
1109
  })[];
947
- readonly model: string;
948
- readonly stream: true;
949
- readonly metadata?: {
950
- readonly [x: string]: string;
951
- } | undefined;
952
- readonly instructions?: string | undefined;
953
- readonly reasoning?: {
954
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
955
- readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
956
- } | undefined;
957
- readonly tools?: readonly {
1110
+ }, AIError, never>;
1111
+ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
1112
+ tools: ({
1113
+ readonly [x: string]: unknown;
1114
+ readonly type: string;
1115
+ } | {
958
1116
  readonly type: "function";
959
1117
  readonly description: string;
960
1118
  readonly name: string;
@@ -962,38 +1120,171 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
962
1120
  readonly [x: string]: unknown;
963
1121
  };
964
1122
  readonly strict?: boolean | undefined;
965
- }[] | undefined;
966
- readonly text?: {
967
- readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
968
- } | undefined;
969
- readonly temperature?: number | undefined;
970
- readonly service_tier?: OpenResponsesOptions.ServiceTier | undefined;
971
- readonly tool_choice?: "required" | "auto" | "none" | {
972
- readonly type: "function";
973
- readonly name: string;
974
- } | {
975
- readonly type: "allowed_tools";
976
- readonly mode: "required" | "auto" | "none";
977
- readonly tools: readonly {
978
- readonly type: "function";
979
- readonly name: string;
1123
+ })[] | undefined;
1124
+ tool_choice: "required" | "auto" | "none" | {
1125
+ type: "allowed_tools";
1126
+ mode: "required" | "auto" | "none";
1127
+ tools: {
1128
+ type: "function";
1129
+ name: string;
980
1130
  }[];
1131
+ } | {
1132
+ type: "function";
1133
+ name: string;
981
1134
  } | undefined;
982
- readonly top_p?: number | undefined;
983
- readonly frequency_penalty?: number | undefined;
984
- readonly presence_penalty?: number | undefined;
985
- readonly prompt_cache_key?: string | undefined;
986
- readonly parallel_tool_calls?: boolean | undefined;
987
- readonly store?: boolean | undefined;
988
- readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
989
- readonly truncation?: "auto" | "disabled" | undefined;
990
- readonly stream_options?: {
991
- readonly include_obfuscation?: boolean | undefined;
1135
+ truncation?: "auto" | "disabled" | undefined;
1136
+ parallel_tool_calls?: boolean | undefined;
1137
+ max_tool_calls?: number | undefined;
1138
+ service_tier?: OpenResponsesOptions.ServiceTier | undefined;
1139
+ text?: {
1140
+ verbosity: OpenResponsesOptions.TextVerbosity;
992
1141
  } | undefined;
993
- readonly safety_identifier?: string | undefined;
994
- readonly top_logprobs?: number | undefined;
995
- readonly max_output_tokens?: number | undefined;
996
- readonly max_tool_calls?: number | undefined;
1142
+ reasoning?: {
1143
+ effort: OpenResponsesOptions.ReasoningEffort | undefined;
1144
+ summary: "auto" | "concise" | "detailed" | undefined;
1145
+ } | undefined;
1146
+ include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
1147
+ prompt_cache_key?: string | undefined;
1148
+ top_logprobs?: number | undefined;
1149
+ stream_options?: {
1150
+ include_obfuscation: boolean;
1151
+ } | undefined;
1152
+ safety_identifier?: string | undefined;
1153
+ metadata?: {
1154
+ readonly [x: string]: string;
1155
+ } | undefined;
1156
+ store?: boolean | undefined;
1157
+ stream: true;
1158
+ max_output_tokens: number | undefined;
1159
+ temperature: number | undefined;
1160
+ top_p: number | undefined;
1161
+ presence_penalty: number | undefined;
1162
+ frequency_penalty: number | undefined;
1163
+ instructions?: string | undefined;
1164
+ model: string & import("effect/Brand").Brand<"AI.ModelID">;
1165
+ input: ({
1166
+ readonly [x: string]: unknown;
1167
+ readonly id: string;
1168
+ readonly type: "web_search_call";
1169
+ readonly status?: string | undefined;
1170
+ readonly action?: {
1171
+ readonly [x: string]: unknown;
1172
+ } | null | undefined;
1173
+ } | {
1174
+ readonly [x: string]: unknown;
1175
+ readonly id: string;
1176
+ readonly type: "file_search_call";
1177
+ readonly status?: string | undefined;
1178
+ readonly queries?: readonly string[] | undefined;
1179
+ readonly results?: readonly {
1180
+ readonly [x: string]: unknown;
1181
+ }[] | null | undefined;
1182
+ } | {
1183
+ readonly [x: string]: unknown;
1184
+ readonly id: string;
1185
+ readonly type: "code_interpreter_call";
1186
+ readonly status?: string | undefined;
1187
+ readonly code?: string | null | undefined;
1188
+ readonly container_id?: string | null | undefined;
1189
+ readonly outputs?: readonly {
1190
+ readonly [x: string]: unknown;
1191
+ }[] | null | undefined;
1192
+ } | {
1193
+ readonly [x: string]: unknown;
1194
+ readonly id: string;
1195
+ readonly type: "mcp_call";
1196
+ readonly status?: string | undefined;
1197
+ readonly name?: string | undefined;
1198
+ readonly output?: string | null | undefined;
1199
+ readonly error?: unknown;
1200
+ readonly arguments?: string | undefined;
1201
+ readonly server_label?: string | undefined;
1202
+ } | {
1203
+ readonly type: "configuration_update";
1204
+ readonly reasoning: {
1205
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1206
+ };
1207
+ } | {
1208
+ readonly [x: string]: unknown;
1209
+ readonly type: string;
1210
+ readonly id: string;
1211
+ } | {
1212
+ readonly type: "reasoning";
1213
+ readonly summary: readonly {
1214
+ readonly type: "summary_text";
1215
+ readonly text: string;
1216
+ }[];
1217
+ readonly id?: string | undefined;
1218
+ readonly encrypted_content?: string | null | undefined;
1219
+ } | {
1220
+ readonly type: "compaction";
1221
+ readonly encrypted_content: string;
1222
+ readonly id?: string | null | undefined;
1223
+ } | {
1224
+ readonly type: "message";
1225
+ readonly role: "system";
1226
+ readonly content: string;
1227
+ } | {
1228
+ readonly type: "message";
1229
+ readonly role: "developer";
1230
+ readonly content: string;
1231
+ } | {
1232
+ readonly type: "message";
1233
+ readonly content: readonly ({
1234
+ readonly type: "input_image";
1235
+ readonly image_url: string;
1236
+ readonly detail?: string | undefined;
1237
+ } | {
1238
+ readonly type: "input_file";
1239
+ readonly filename: string;
1240
+ readonly detail?: string | undefined;
1241
+ readonly file_data?: string | undefined;
1242
+ readonly file_url?: string | undefined;
1243
+ } | {
1244
+ readonly type: "input_text";
1245
+ readonly text: string;
1246
+ })[];
1247
+ readonly role: "user";
1248
+ readonly id?: string | undefined;
1249
+ readonly status?: string | undefined;
1250
+ } | {
1251
+ readonly type: "message";
1252
+ readonly content: readonly {
1253
+ readonly type: "output_text";
1254
+ readonly text: string;
1255
+ }[];
1256
+ readonly role: "assistant";
1257
+ readonly id?: string | undefined;
1258
+ readonly status?: string | undefined;
1259
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
1260
+ } | {
1261
+ readonly type: "function_call";
1262
+ readonly name: string;
1263
+ readonly arguments: string;
1264
+ readonly call_id: string;
1265
+ readonly id?: string | undefined;
1266
+ readonly namespace?: string | undefined;
1267
+ } | {
1268
+ readonly type: "function_call_output";
1269
+ readonly call_id: string;
1270
+ readonly output: string | readonly ({
1271
+ readonly type: "input_image";
1272
+ readonly image_url: string;
1273
+ readonly detail?: string | undefined;
1274
+ } | {
1275
+ readonly type: "input_file";
1276
+ readonly filename: string;
1277
+ readonly detail?: string | undefined;
1278
+ readonly file_data?: string | undefined;
1279
+ readonly file_url?: string | undefined;
1280
+ } | {
1281
+ readonly type: "input_text";
1282
+ readonly text: string;
1283
+ } | {
1284
+ readonly type: "input_video";
1285
+ readonly video_url: string;
1286
+ })[];
1287
+ })[];
997
1288
  }, AIError, never>;
998
1289
  export declare const mapUsage: (usage: OpenResponsesUsage | null | undefined, providerMetadataKey: string) => Usage | undefined;
999
1290
  export declare const metadataKey: (model: LLMRequest["model"]) => string;
@@ -1268,6 +1559,15 @@ export declare const protocol: Protocol<{
1268
1559
  readonly error?: unknown;
1269
1560
  readonly arguments?: string | undefined;
1270
1561
  readonly server_label?: string | undefined;
1562
+ } | {
1563
+ readonly type: "configuration_update";
1564
+ readonly reasoning: {
1565
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1566
+ };
1567
+ } | {
1568
+ readonly [x: string]: unknown;
1569
+ readonly type: string;
1570
+ readonly id: string;
1271
1571
  } | {
1272
1572
  readonly type: "reasoning";
1273
1573
  readonly summary: readonly {
@@ -1355,7 +1655,10 @@ export declare const protocol: Protocol<{
1355
1655
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
1356
1656
  readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
1357
1657
  } | undefined;
1358
- readonly tools?: readonly {
1658
+ readonly tools?: readonly ({
1659
+ readonly [x: string]: unknown;
1660
+ readonly type: string;
1661
+ } | {
1359
1662
  readonly type: "function";
1360
1663
  readonly description: string;
1361
1664
  readonly name: string;
@@ -1363,7 +1666,7 @@ export declare const protocol: Protocol<{
1363
1666
  readonly [x: string]: unknown;
1364
1667
  };
1365
1668
  readonly strict?: boolean | undefined;
1366
- }[] | undefined;
1669
+ })[] | undefined;
1367
1670
  readonly text?: {
1368
1671
  readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
1369
1672
  } | undefined;
@@ -1383,9 +1686,10 @@ export declare const protocol: Protocol<{
1383
1686
  readonly top_p?: number | undefined;
1384
1687
  readonly frequency_penalty?: number | undefined;
1385
1688
  readonly presence_penalty?: number | undefined;
1689
+ readonly store?: boolean | undefined;
1690
+ readonly max_output_tokens?: number | undefined;
1386
1691
  readonly prompt_cache_key?: string | undefined;
1387
1692
  readonly parallel_tool_calls?: boolean | undefined;
1388
- readonly store?: boolean | undefined;
1389
1693
  readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
1390
1694
  readonly truncation?: "auto" | "disabled" | undefined;
1391
1695
  readonly stream_options?: {
@@ -1393,7 +1697,6 @@ export declare const protocol: Protocol<{
1393
1697
  } | undefined;
1394
1698
  readonly safety_identifier?: string | undefined;
1395
1699
  readonly top_logprobs?: number | undefined;
1396
- readonly max_output_tokens?: number | undefined;
1397
1700
  readonly max_tool_calls?: number | undefined;
1398
1701
  }, string, {
1399
1702
  readonly [x: string]: unknown;
@@ -1413,8 +1716,8 @@ export declare const protocol: Protocol<{
1413
1716
  readonly name?: string | undefined;
1414
1717
  readonly namespace?: string | undefined;
1415
1718
  readonly arguments?: string | undefined;
1416
- readonly encrypted_content?: string | null | undefined;
1417
1719
  readonly call_id?: string | undefined;
1720
+ readonly encrypted_content?: string | null | undefined;
1418
1721
  }[] | undefined;
1419
1722
  readonly error?: unknown;
1420
1723
  readonly usage?: {
@@ -1441,8 +1744,8 @@ export declare const protocol: Protocol<{
1441
1744
  readonly name?: string | undefined;
1442
1745
  readonly namespace?: string | undefined;
1443
1746
  readonly arguments?: string | undefined;
1444
- readonly encrypted_content?: string | null | undefined;
1445
1747
  readonly call_id?: string | undefined;
1748
+ readonly encrypted_content?: string | null | undefined;
1446
1749
  } | null | undefined;
1447
1750
  readonly delta?: string | undefined;
1448
1751
  readonly arguments?: string | undefined;
@@ -1489,6 +1792,15 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1489
1792
  readonly error?: unknown;
1490
1793
  readonly arguments?: string | undefined;
1491
1794
  readonly server_label?: string | undefined;
1795
+ } | {
1796
+ readonly type: "configuration_update";
1797
+ readonly reasoning: {
1798
+ readonly effort: OpenResponsesOptions.ReasoningEffort;
1799
+ };
1800
+ } | {
1801
+ readonly [x: string]: unknown;
1802
+ readonly type: string;
1803
+ readonly id: string;
1492
1804
  } | {
1493
1805
  readonly type: "reasoning";
1494
1806
  readonly summary: readonly {
@@ -1576,7 +1888,10 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1576
1888
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
1577
1889
  readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
1578
1890
  } | undefined;
1579
- readonly tools?: readonly {
1891
+ readonly tools?: readonly ({
1892
+ readonly [x: string]: unknown;
1893
+ readonly type: string;
1894
+ } | {
1580
1895
  readonly type: "function";
1581
1896
  readonly description: string;
1582
1897
  readonly name: string;
@@ -1584,7 +1899,7 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1584
1899
  readonly [x: string]: unknown;
1585
1900
  };
1586
1901
  readonly strict?: boolean | undefined;
1587
- }[] | undefined;
1902
+ })[] | undefined;
1588
1903
  readonly text?: {
1589
1904
  readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
1590
1905
  } | undefined;
@@ -1604,9 +1919,10 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1604
1919
  readonly top_p?: number | undefined;
1605
1920
  readonly frequency_penalty?: number | undefined;
1606
1921
  readonly presence_penalty?: number | undefined;
1922
+ readonly store?: boolean | undefined;
1923
+ readonly max_output_tokens?: number | undefined;
1607
1924
  readonly prompt_cache_key?: string | undefined;
1608
1925
  readonly parallel_tool_calls?: boolean | undefined;
1609
- readonly store?: boolean | undefined;
1610
1926
  readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
1611
1927
  readonly truncation?: "auto" | "disabled" | undefined;
1612
1928
  readonly stream_options?: {
@@ -1614,7 +1930,6 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1614
1930
  } | undefined;
1615
1931
  readonly safety_identifier?: string | undefined;
1616
1932
  readonly top_logprobs?: number | undefined;
1617
- readonly max_output_tokens?: number | undefined;
1618
1933
  readonly max_tool_calls?: number | undefined;
1619
1934
  }, string>;
1620
1935
  export * as OpenResponses from "./open-responses.js";