@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16274

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 (42) hide show
  1. package/dist/llm.d.ts +60 -60
  2. package/dist/protocols/anthropic-messages.d.ts +303 -303
  3. package/dist/protocols/anthropic-messages.js +1 -0
  4. package/dist/protocols/bedrock-converse.d.ts +246 -242
  5. package/dist/protocols/gemini.d.ts +136 -132
  6. package/dist/protocols/gemini.js +1 -0
  7. package/dist/protocols/open-responses.d.ts +232 -232
  8. package/dist/protocols/openai-chat.d.ts +147 -141
  9. package/dist/protocols/openai-chat.js +1 -0
  10. package/dist/protocols/openai-compatible-chat.d.ts +48 -46
  11. package/dist/protocols/openai-compatible-responses.d.ts +56 -56
  12. package/dist/protocols/openai-responses.d.ts +388 -388
  13. package/dist/protocols/shared.d.ts +5 -4
  14. package/dist/protocols/shared.js +1 -0
  15. package/dist/protocols/utils/bedrock-media.d.ts +10 -10
  16. package/dist/protocols/utils/tool-stream.d.ts +180 -180
  17. package/dist/providers/amazon-bedrock.d.ts +109 -107
  18. package/dist/providers/anthropic-compatible.d.ts +145 -145
  19. package/dist/providers/anthropic.d.ts +145 -145
  20. package/dist/providers/azure.d.ts +112 -110
  21. package/dist/providers/cloudflare.d.ts +144 -138
  22. package/dist/providers/github-copilot.d.ts +112 -110
  23. package/dist/providers/google-vertex-chat.d.ts +48 -46
  24. package/dist/providers/google-vertex-messages.d.ts +145 -146
  25. package/dist/providers/google-vertex-responses.d.ts +56 -56
  26. package/dist/providers/google-vertex.d.ts +52 -50
  27. package/dist/providers/google.d.ts +52 -50
  28. package/dist/providers/openai-compatible-responses.d.ts +56 -56
  29. package/dist/providers/openai-compatible.d.ts +48 -46
  30. package/dist/providers/openai.d.ts +176 -174
  31. package/dist/providers/openrouter.d.ts +147 -141
  32. package/dist/providers/xai.d.ts +112 -110
  33. package/dist/route/client.d.ts +60 -60
  34. package/dist/schema/errors.d.ts +2 -6
  35. package/dist/schema/errors.js +2 -5
  36. package/dist/schema/events.d.ts +1117 -1115
  37. package/dist/schema/messages.d.ts +9 -9
  38. package/dist/schema/messages.js +3 -4
  39. package/dist/tool-runtime.js +1 -1
  40. package/dist/tool.d.ts +5 -4
  41. package/dist/tool.js +1 -0
  42. package/package.json +5 -5
@@ -25,196 +25,202 @@ export type WorkersAIOptions = WorkersAIURL & RouteDefaultsInput & ProviderAuthO
25
25
  export declare const aiGatewayBaseURL: (input: GatewayURL) => string;
26
26
  export declare const workersAIBaseURL: (input: WorkersAIURL) => string;
27
27
  export declare const aiGatewayRoute: import("../route").Route<{
28
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
29
- readonly role: import("effect/Schema").Literal<"system">;
30
- readonly content: import("effect/Schema").String;
31
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
32
- readonly role: import("effect/Schema").Literal<"user">;
33
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
34
- readonly type: import("effect/Schema").Literal<"text">;
35
- readonly text: import("effect/Schema").String;
36
- }>, import("effect/Schema").Struct<{
37
- readonly type: import("effect/Schema").Literal<"image_url">;
38
- readonly image_url: import("effect/Schema").Struct<{
39
- readonly url: import("effect/Schema").String;
40
- }>;
41
- }>]>>]>;
42
- }, "Type"> | {
28
+ readonly model: string;
29
+ readonly messages: readonly ({
30
+ readonly role: "system";
31
+ readonly content: string;
32
+ } | {
33
+ readonly role: "user";
34
+ readonly content: string | readonly ({
35
+ readonly type: "text";
36
+ readonly text: string;
37
+ } | {
38
+ readonly type: "image_url";
39
+ readonly image_url: {
40
+ readonly url: string;
41
+ };
42
+ })[];
43
+ } | {
43
44
  readonly [x: string]: unknown;
44
45
  readonly content: string | null;
45
46
  readonly role: "assistant";
46
47
  readonly reasoning?: string | undefined;
47
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
48
- readonly id: import("effect/Schema").String;
49
- readonly type: import("effect/Schema").tag<"function">;
50
- readonly function: import("effect/Schema").Struct<{
51
- readonly name: import("effect/Schema").String;
52
- readonly arguments: import("effect/Schema").String;
53
- }>;
54
- }, "Type">[] | undefined;
55
48
  readonly reasoning_content?: string | undefined;
56
49
  readonly reasoning_text?: string | undefined;
50
+ readonly tool_calls?: readonly {
51
+ readonly id: string;
52
+ readonly type: "function";
53
+ readonly function: {
54
+ readonly name: string;
55
+ readonly arguments: string;
56
+ };
57
+ }[] | undefined;
57
58
  readonly reasoning_details?: unknown;
58
- } | import("effect/Schema").Struct.ReadonlySide<{
59
- readonly role: import("effect/Schema").Literal<"tool">;
60
- readonly tool_call_id: import("effect/Schema").String;
61
- readonly content: import("effect/Schema").String;
62
- }, "Type">)[];
63
- readonly model: string;
59
+ } | {
60
+ readonly role: "tool";
61
+ readonly tool_call_id: string;
62
+ readonly content: string;
63
+ })[];
64
64
  readonly stream: true;
65
65
  readonly stop?: readonly string[] | undefined;
66
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
67
- readonly type: import("effect/Schema").tag<"function">;
68
- readonly function: import("effect/Schema").Struct<{
69
- readonly name: import("effect/Schema").String;
70
- readonly description: import("effect/Schema").String;
71
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
72
- }>;
73
- }, "Type">[] | undefined;
66
+ readonly tools?: readonly {
67
+ readonly type: "function";
68
+ readonly function: {
69
+ readonly name: string;
70
+ readonly description: string;
71
+ readonly parameters: {
72
+ readonly [x: string]: unknown;
73
+ };
74
+ };
75
+ }[] | undefined;
74
76
  readonly temperature?: number | undefined;
75
77
  readonly seed?: number | undefined;
76
78
  readonly frequency_penalty?: number | undefined;
77
79
  readonly max_tokens?: number | undefined;
78
80
  readonly presence_penalty?: number | undefined;
79
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
80
- readonly include_usage: import("effect/Schema").Boolean;
81
- }, "Type"> | undefined;
82
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
83
- readonly type: import("effect/Schema").tag<"function">;
84
- readonly function: import("effect/Schema").Struct<{
85
- readonly name: import("effect/Schema").String;
86
- }>;
87
- }, "Type"> | undefined;
81
+ readonly stream_options?: {
82
+ readonly include_usage: boolean;
83
+ } | undefined;
84
+ readonly tool_choice?: "required" | "none" | "auto" | {
85
+ readonly type: "function";
86
+ readonly function: {
87
+ readonly name: string;
88
+ };
89
+ } | undefined;
88
90
  readonly top_p?: number | undefined;
89
91
  readonly store?: boolean | undefined;
90
92
  readonly reasoning_effort?: string | undefined;
91
93
  }, import("../route/transport/http").HttpPrepared<string>>;
92
94
  export declare const workersAIRoute: import("../route").Route<{
93
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
94
- readonly role: import("effect/Schema").Literal<"system">;
95
- readonly content: import("effect/Schema").String;
96
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
97
- readonly role: import("effect/Schema").Literal<"user">;
98
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
99
- readonly type: import("effect/Schema").Literal<"text">;
100
- readonly text: import("effect/Schema").String;
101
- }>, import("effect/Schema").Struct<{
102
- readonly type: import("effect/Schema").Literal<"image_url">;
103
- readonly image_url: import("effect/Schema").Struct<{
104
- readonly url: import("effect/Schema").String;
105
- }>;
106
- }>]>>]>;
107
- }, "Type"> | {
95
+ readonly model: string;
96
+ readonly messages: readonly ({
97
+ readonly role: "system";
98
+ readonly content: string;
99
+ } | {
100
+ readonly role: "user";
101
+ readonly content: string | readonly ({
102
+ readonly type: "text";
103
+ readonly text: string;
104
+ } | {
105
+ readonly type: "image_url";
106
+ readonly image_url: {
107
+ readonly url: string;
108
+ };
109
+ })[];
110
+ } | {
108
111
  readonly [x: string]: unknown;
109
112
  readonly content: string | null;
110
113
  readonly role: "assistant";
111
114
  readonly reasoning?: string | undefined;
112
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
113
- readonly id: import("effect/Schema").String;
114
- readonly type: import("effect/Schema").tag<"function">;
115
- readonly function: import("effect/Schema").Struct<{
116
- readonly name: import("effect/Schema").String;
117
- readonly arguments: import("effect/Schema").String;
118
- }>;
119
- }, "Type">[] | undefined;
120
115
  readonly reasoning_content?: string | undefined;
121
116
  readonly reasoning_text?: string | undefined;
117
+ readonly tool_calls?: readonly {
118
+ readonly id: string;
119
+ readonly type: "function";
120
+ readonly function: {
121
+ readonly name: string;
122
+ readonly arguments: string;
123
+ };
124
+ }[] | undefined;
122
125
  readonly reasoning_details?: unknown;
123
- } | import("effect/Schema").Struct.ReadonlySide<{
124
- readonly role: import("effect/Schema").Literal<"tool">;
125
- readonly tool_call_id: import("effect/Schema").String;
126
- readonly content: import("effect/Schema").String;
127
- }, "Type">)[];
128
- readonly model: string;
126
+ } | {
127
+ readonly role: "tool";
128
+ readonly tool_call_id: string;
129
+ readonly content: string;
130
+ })[];
129
131
  readonly stream: true;
130
132
  readonly stop?: readonly string[] | undefined;
131
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
132
- readonly type: import("effect/Schema").tag<"function">;
133
- readonly function: import("effect/Schema").Struct<{
134
- readonly name: import("effect/Schema").String;
135
- readonly description: import("effect/Schema").String;
136
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
137
- }>;
138
- }, "Type">[] | undefined;
133
+ readonly tools?: readonly {
134
+ readonly type: "function";
135
+ readonly function: {
136
+ readonly name: string;
137
+ readonly description: string;
138
+ readonly parameters: {
139
+ readonly [x: string]: unknown;
140
+ };
141
+ };
142
+ }[] | undefined;
139
143
  readonly temperature?: number | undefined;
140
144
  readonly seed?: number | undefined;
141
145
  readonly frequency_penalty?: number | undefined;
142
146
  readonly max_tokens?: number | undefined;
143
147
  readonly presence_penalty?: number | undefined;
144
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
145
- readonly include_usage: import("effect/Schema").Boolean;
146
- }, "Type"> | undefined;
147
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
148
- readonly type: import("effect/Schema").tag<"function">;
149
- readonly function: import("effect/Schema").Struct<{
150
- readonly name: import("effect/Schema").String;
151
- }>;
152
- }, "Type"> | undefined;
148
+ readonly stream_options?: {
149
+ readonly include_usage: boolean;
150
+ } | undefined;
151
+ readonly tool_choice?: "required" | "none" | "auto" | {
152
+ readonly type: "function";
153
+ readonly function: {
154
+ readonly name: string;
155
+ };
156
+ } | undefined;
153
157
  readonly top_p?: number | undefined;
154
158
  readonly store?: boolean | undefined;
155
159
  readonly reasoning_effort?: string | undefined;
156
160
  }, import("../route/transport/http").HttpPrepared<string>>;
157
161
  export declare const routes: import("../route").Route<{
158
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
159
- readonly role: import("effect/Schema").Literal<"system">;
160
- readonly content: import("effect/Schema").String;
161
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
162
- readonly role: import("effect/Schema").Literal<"user">;
163
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
164
- readonly type: import("effect/Schema").Literal<"text">;
165
- readonly text: import("effect/Schema").String;
166
- }>, import("effect/Schema").Struct<{
167
- readonly type: import("effect/Schema").Literal<"image_url">;
168
- readonly image_url: import("effect/Schema").Struct<{
169
- readonly url: import("effect/Schema").String;
170
- }>;
171
- }>]>>]>;
172
- }, "Type"> | {
162
+ readonly model: string;
163
+ readonly messages: readonly ({
164
+ readonly role: "system";
165
+ readonly content: string;
166
+ } | {
167
+ readonly role: "user";
168
+ readonly content: string | readonly ({
169
+ readonly type: "text";
170
+ readonly text: string;
171
+ } | {
172
+ readonly type: "image_url";
173
+ readonly image_url: {
174
+ readonly url: string;
175
+ };
176
+ })[];
177
+ } | {
173
178
  readonly [x: string]: unknown;
174
179
  readonly content: string | null;
175
180
  readonly role: "assistant";
176
181
  readonly reasoning?: string | undefined;
177
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
178
- readonly id: import("effect/Schema").String;
179
- readonly type: import("effect/Schema").tag<"function">;
180
- readonly function: import("effect/Schema").Struct<{
181
- readonly name: import("effect/Schema").String;
182
- readonly arguments: import("effect/Schema").String;
183
- }>;
184
- }, "Type">[] | undefined;
185
182
  readonly reasoning_content?: string | undefined;
186
183
  readonly reasoning_text?: string | undefined;
184
+ readonly tool_calls?: readonly {
185
+ readonly id: string;
186
+ readonly type: "function";
187
+ readonly function: {
188
+ readonly name: string;
189
+ readonly arguments: string;
190
+ };
191
+ }[] | undefined;
187
192
  readonly reasoning_details?: unknown;
188
- } | import("effect/Schema").Struct.ReadonlySide<{
189
- readonly role: import("effect/Schema").Literal<"tool">;
190
- readonly tool_call_id: import("effect/Schema").String;
191
- readonly content: import("effect/Schema").String;
192
- }, "Type">)[];
193
- readonly model: string;
193
+ } | {
194
+ readonly role: "tool";
195
+ readonly tool_call_id: string;
196
+ readonly content: string;
197
+ })[];
194
198
  readonly stream: true;
195
199
  readonly stop?: readonly string[] | undefined;
196
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
197
- readonly type: import("effect/Schema").tag<"function">;
198
- readonly function: import("effect/Schema").Struct<{
199
- readonly name: import("effect/Schema").String;
200
- readonly description: import("effect/Schema").String;
201
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
202
- }>;
203
- }, "Type">[] | undefined;
200
+ readonly tools?: readonly {
201
+ readonly type: "function";
202
+ readonly function: {
203
+ readonly name: string;
204
+ readonly description: string;
205
+ readonly parameters: {
206
+ readonly [x: string]: unknown;
207
+ };
208
+ };
209
+ }[] | undefined;
204
210
  readonly temperature?: number | undefined;
205
211
  readonly seed?: number | undefined;
206
212
  readonly frequency_penalty?: number | undefined;
207
213
  readonly max_tokens?: number | undefined;
208
214
  readonly presence_penalty?: number | undefined;
209
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
210
- readonly include_usage: import("effect/Schema").Boolean;
211
- }, "Type"> | undefined;
212
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
213
- readonly type: import("effect/Schema").tag<"function">;
214
- readonly function: import("effect/Schema").Struct<{
215
- readonly name: import("effect/Schema").String;
216
- }>;
217
- }, "Type"> | undefined;
215
+ readonly stream_options?: {
216
+ readonly include_usage: boolean;
217
+ } | undefined;
218
+ readonly tool_choice?: "required" | "none" | "auto" | {
219
+ readonly type: "function";
220
+ readonly function: {
221
+ readonly name: string;
222
+ };
223
+ } | undefined;
218
224
  readonly top_p?: number | undefined;
219
225
  readonly store?: boolean | undefined;
220
226
  readonly reasoning_effort?: string | undefined;
@@ -10,130 +10,132 @@ export type ModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & Provide
10
10
  };
11
11
  export declare const shouldUseResponsesApi: (modelID: string | ModelID, endpoint?: ModelOptions["endpoint"]) => boolean;
12
12
  export declare const routes: (import("../route").Route<{
13
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
14
- readonly role: import("effect/Schema").Literal<"system">;
15
- readonly content: import("effect/Schema").String;
16
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
17
- readonly role: import("effect/Schema").Literal<"user">;
18
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
19
- readonly type: import("effect/Schema").Literal<"text">;
20
- readonly text: import("effect/Schema").String;
21
- }>, import("effect/Schema").Struct<{
22
- readonly type: import("effect/Schema").Literal<"image_url">;
23
- readonly image_url: import("effect/Schema").Struct<{
24
- readonly url: import("effect/Schema").String;
25
- }>;
26
- }>]>>]>;
27
- }, "Type"> | {
13
+ readonly model: string;
14
+ readonly messages: readonly ({
15
+ readonly role: "system";
16
+ readonly content: string;
17
+ } | {
18
+ readonly role: "user";
19
+ readonly content: string | readonly ({
20
+ readonly type: "text";
21
+ readonly text: string;
22
+ } | {
23
+ readonly type: "image_url";
24
+ readonly image_url: {
25
+ readonly url: string;
26
+ };
27
+ })[];
28
+ } | {
28
29
  readonly [x: string]: unknown;
29
30
  readonly content: string | null;
30
31
  readonly role: "assistant";
31
32
  readonly reasoning?: string | undefined;
32
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
33
- readonly id: import("effect/Schema").String;
34
- readonly type: import("effect/Schema").tag<"function">;
35
- readonly function: import("effect/Schema").Struct<{
36
- readonly name: import("effect/Schema").String;
37
- readonly arguments: import("effect/Schema").String;
38
- }>;
39
- }, "Type">[] | undefined;
40
33
  readonly reasoning_content?: string | undefined;
41
34
  readonly reasoning_text?: string | undefined;
35
+ readonly tool_calls?: readonly {
36
+ readonly id: string;
37
+ readonly type: "function";
38
+ readonly function: {
39
+ readonly name: string;
40
+ readonly arguments: string;
41
+ };
42
+ }[] | undefined;
42
43
  readonly reasoning_details?: unknown;
43
- } | import("effect/Schema").Struct.ReadonlySide<{
44
- readonly role: import("effect/Schema").Literal<"tool">;
45
- readonly tool_call_id: import("effect/Schema").String;
46
- readonly content: import("effect/Schema").String;
47
- }, "Type">)[];
48
- readonly model: string;
44
+ } | {
45
+ readonly role: "tool";
46
+ readonly tool_call_id: string;
47
+ readonly content: string;
48
+ })[];
49
49
  readonly stream: true;
50
50
  readonly stop?: readonly string[] | undefined;
51
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
52
- readonly type: import("effect/Schema").tag<"function">;
53
- readonly function: import("effect/Schema").Struct<{
54
- readonly name: import("effect/Schema").String;
55
- readonly description: import("effect/Schema").String;
56
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
57
- }>;
58
- }, "Type">[] | undefined;
51
+ readonly tools?: readonly {
52
+ readonly type: "function";
53
+ readonly function: {
54
+ readonly name: string;
55
+ readonly description: string;
56
+ readonly parameters: {
57
+ readonly [x: string]: unknown;
58
+ };
59
+ };
60
+ }[] | undefined;
59
61
  readonly temperature?: number | undefined;
60
62
  readonly seed?: number | undefined;
61
63
  readonly frequency_penalty?: number | undefined;
62
64
  readonly max_tokens?: number | undefined;
63
65
  readonly presence_penalty?: number | undefined;
64
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
65
- readonly include_usage: import("effect/Schema").Boolean;
66
- }, "Type"> | undefined;
67
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
68
- readonly type: import("effect/Schema").tag<"function">;
69
- readonly function: import("effect/Schema").Struct<{
70
- readonly name: import("effect/Schema").String;
71
- }>;
72
- }, "Type"> | undefined;
66
+ readonly stream_options?: {
67
+ readonly include_usage: boolean;
68
+ } | undefined;
69
+ readonly tool_choice?: "required" | "none" | "auto" | {
70
+ readonly type: "function";
71
+ readonly function: {
72
+ readonly name: string;
73
+ };
74
+ } | undefined;
73
75
  readonly top_p?: number | undefined;
74
76
  readonly store?: boolean | undefined;
75
77
  readonly reasoning_effort?: string | undefined;
76
78
  }, import("../route/transport/http").HttpPrepared<string>> | import("../route").Route<{
77
79
  readonly input: readonly ({
78
80
  readonly type: "reasoning";
79
- readonly summary: readonly import("effect/Schema").Struct.ReadonlySide<{
80
- readonly type: import("effect/Schema").tag<"summary_text">;
81
- readonly text: import("effect/Schema").String;
82
- }, "Type">[];
81
+ readonly summary: readonly {
82
+ readonly type: "summary_text";
83
+ readonly text: string;
84
+ }[];
83
85
  readonly id?: string | undefined;
84
86
  readonly encrypted_content?: string | null | undefined;
85
- } | import("effect/Schema").Struct.ReadonlySide<{
86
- readonly type: import("effect/Schema").tag<"item_reference">;
87
- readonly id: import("effect/Schema").String;
88
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
89
- readonly role: import("effect/Schema").tag<"system">;
90
- readonly content: import("effect/Schema").String;
91
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
92
- readonly role: import("effect/Schema").tag<"user">;
93
- readonly content: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
94
- readonly type: import("effect/Schema").tag<"input_text">;
95
- readonly text: import("effect/Schema").String;
96
- }>, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
97
- readonly type: import("effect/Schema").tag<"input_image">;
98
- readonly image_url: import("effect/Schema").String;
99
- }>, import("effect/Schema").Struct<{
100
- readonly type: import("effect/Schema").tag<"input_file">;
101
- readonly filename: import("effect/Schema").String;
102
- readonly file_data: import("effect/Schema").String;
103
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
104
- }>]>]>>;
105
- }, "Type"> | {
106
- readonly content: readonly import("effect/Schema").Struct.ReadonlySide<{
107
- readonly type: import("effect/Schema").tag<"output_text">;
108
- readonly text: import("effect/Schema").String;
109
- }, "Type">[];
87
+ } | {
88
+ readonly type: "item_reference";
89
+ readonly id: string;
90
+ } | {
91
+ readonly role: "system";
92
+ readonly content: string;
93
+ } | {
94
+ readonly role: "user";
95
+ readonly content: readonly ({
96
+ readonly type: "input_image";
97
+ readonly image_url: string;
98
+ } | {
99
+ readonly type: "input_file";
100
+ readonly filename: string;
101
+ readonly file_data: string;
102
+ readonly mime_type?: string | undefined;
103
+ } | {
104
+ readonly type: "input_text";
105
+ readonly text: string;
106
+ })[];
107
+ } | {
108
+ readonly content: readonly {
109
+ readonly type: "output_text";
110
+ readonly text: string;
111
+ }[];
110
112
  readonly role: "assistant";
111
113
  readonly phase?: "commentary" | "final_answer" | undefined;
112
- } | import("effect/Schema").Struct.ReadonlySide<{
113
- readonly type: import("effect/Schema").tag<"function_call">;
114
- readonly call_id: import("effect/Schema").String;
115
- readonly name: import("effect/Schema").String;
116
- readonly arguments: import("effect/Schema").String;
117
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
118
- readonly type: import("effect/Schema").tag<"function_call_output">;
119
- readonly call_id: import("effect/Schema").String;
120
- readonly output: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
121
- readonly type: import("effect/Schema").tag<"input_text">;
122
- readonly text: import("effect/Schema").String;
123
- }>, import("effect/Schema").Struct<{
124
- readonly type: import("effect/Schema").tag<"input_image">;
125
- readonly image_url: import("effect/Schema").String;
126
- }>, import("effect/Schema").Struct<{
127
- readonly type: import("effect/Schema").tag<"input_file">;
128
- readonly filename: import("effect/Schema").String;
129
- readonly file_data: import("effect/Schema").String;
130
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
131
- }>]>>]>;
132
- }, "Type"> | {
133
- readonly content: readonly import("effect/Schema").Struct.ReadonlySide<{
134
- readonly type: import("effect/Schema").tag<"output_text">;
135
- readonly text: import("effect/Schema").String;
136
- }, "Type">[];
114
+ } | {
115
+ readonly type: "function_call";
116
+ readonly call_id: string;
117
+ readonly name: string;
118
+ readonly arguments: string;
119
+ } | {
120
+ readonly type: "function_call_output";
121
+ readonly call_id: string;
122
+ readonly output: string | readonly ({
123
+ readonly type: "input_image";
124
+ readonly image_url: string;
125
+ } | {
126
+ readonly type: "input_file";
127
+ readonly filename: string;
128
+ readonly file_data: string;
129
+ readonly mime_type?: string | undefined;
130
+ } | {
131
+ readonly type: "input_text";
132
+ readonly text: string;
133
+ })[];
134
+ } | {
135
+ readonly content: readonly {
136
+ readonly type: "output_text";
137
+ readonly text: string;
138
+ }[];
137
139
  readonly role: "assistant";
138
140
  readonly phase?: "commentary" | "final_answer" | null | undefined;
139
141
  })[];
@@ -142,9 +144,10 @@ export declare const routes: (import("../route").Route<{
142
144
  readonly text?: {
143
145
  readonly verbosity?: "low" | "medium" | "high" | undefined;
144
146
  } | undefined;
147
+ readonly instructions?: string | undefined;
145
148
  readonly reasoning?: {
146
- readonly effort?: string | undefined;
147
149
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
150
+ readonly effort?: string | undefined;
148
151
  } | undefined;
149
152
  readonly tools?: readonly ({
150
153
  readonly type: "function";
@@ -156,25 +159,24 @@ export declare const routes: (import("../route").Route<{
156
159
  readonly strict?: boolean | undefined;
157
160
  } | {
158
161
  readonly type: "image_generation";
159
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
160
162
  readonly size?: string | undefined;
163
+ readonly action?: "generate" | "auto" | "edit" | undefined;
164
+ readonly output_format?: "png" | "jpeg" | "webp" | undefined;
161
165
  readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
162
166
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
163
167
  readonly output_compression?: number | undefined;
164
- readonly action?: "generate" | "auto" | "edit" | undefined;
165
168
  readonly input_fidelity?: "low" | "high" | undefined;
166
169
  readonly partial_images?: number | undefined;
167
170
  })[] | undefined;
168
171
  readonly temperature?: number | undefined;
169
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
170
- readonly type: import("effect/Schema").tag<"function">;
171
- readonly name: import("effect/Schema").String;
172
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
173
- readonly type: import("effect/Schema").tag<"image_generation">;
174
- }, "Type"> | undefined;
172
+ readonly tool_choice?: "required" | "none" | "auto" | {
173
+ readonly type: "function";
174
+ readonly name: string;
175
+ } | {
176
+ readonly type: "image_generation";
177
+ } | undefined;
175
178
  readonly top_p?: number | undefined;
176
179
  readonly include?: readonly ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | undefined;
177
- readonly instructions?: string | undefined;
178
180
  readonly store?: boolean | undefined;
179
181
  readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
180
182
  readonly prompt_cache_key?: string | undefined;