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

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
@@ -89,66 +89,68 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
89
89
  export type OpenRouterBody = Schema.Schema.Type<typeof OpenRouterBody>;
90
90
  export declare const protocol: Protocol<{
91
91
  readonly [x: string]: any;
92
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
93
- readonly role: Schema.Literal<"system">;
94
- readonly content: Schema.String;
95
- }, "Type"> | Schema.Struct.ReadonlySide<{
96
- readonly role: Schema.Literal<"user">;
97
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
98
- readonly type: Schema.Literal<"text">;
99
- readonly text: Schema.String;
100
- }>, Schema.Struct<{
101
- readonly type: Schema.Literal<"image_url">;
102
- readonly image_url: Schema.Struct<{
103
- readonly url: Schema.String;
104
- }>;
105
- }>]>>]>;
106
- }, "Type"> | {
92
+ readonly model: string;
93
+ readonly messages: readonly ({
94
+ readonly role: "system";
95
+ readonly content: string;
96
+ } | {
97
+ readonly role: "user";
98
+ readonly content: string | readonly ({
99
+ readonly type: "text";
100
+ readonly text: string;
101
+ } | {
102
+ readonly type: "image_url";
103
+ readonly image_url: {
104
+ readonly url: string;
105
+ };
106
+ })[];
107
+ } | {
107
108
  readonly [x: string]: unknown;
108
109
  readonly content: string | null;
109
110
  readonly role: "assistant";
110
111
  readonly reasoning?: string | undefined;
111
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
112
- readonly id: Schema.String;
113
- readonly type: Schema.tag<"function">;
114
- readonly function: Schema.Struct<{
115
- readonly name: Schema.String;
116
- readonly arguments: Schema.String;
117
- }>;
118
- }, "Type">[] | undefined;
119
112
  readonly reasoning_content?: string | undefined;
120
113
  readonly reasoning_text?: string | undefined;
114
+ readonly tool_calls?: readonly {
115
+ readonly id: string;
116
+ readonly type: "function";
117
+ readonly function: {
118
+ readonly name: string;
119
+ readonly arguments: string;
120
+ };
121
+ }[] | undefined;
121
122
  readonly reasoning_details?: unknown;
122
- } | Schema.Struct.ReadonlySide<{
123
- readonly role: Schema.Literal<"tool">;
124
- readonly tool_call_id: Schema.String;
125
- readonly content: Schema.String;
126
- }, "Type">)[];
127
- readonly model: string;
123
+ } | {
124
+ readonly role: "tool";
125
+ readonly tool_call_id: string;
126
+ readonly content: string;
127
+ })[];
128
128
  readonly stream: true;
129
129
  readonly stop?: readonly string[] | undefined;
130
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
131
- readonly type: Schema.tag<"function">;
132
- readonly function: Schema.Struct<{
133
- readonly name: Schema.String;
134
- readonly description: Schema.String;
135
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
136
- }>;
137
- }, "Type">[] | undefined;
130
+ readonly tools?: readonly {
131
+ readonly type: "function";
132
+ readonly function: {
133
+ readonly name: string;
134
+ readonly description: string;
135
+ readonly parameters: {
136
+ readonly [x: string]: unknown;
137
+ };
138
+ };
139
+ }[] | undefined;
138
140
  readonly temperature?: number | undefined;
139
141
  readonly seed?: number | undefined;
140
142
  readonly frequency_penalty?: number | undefined;
141
143
  readonly max_tokens?: number | undefined;
142
144
  readonly presence_penalty?: number | undefined;
143
- readonly stream_options?: Schema.Struct.ReadonlySide<{
144
- readonly include_usage: Schema.Boolean;
145
- }, "Type"> | undefined;
146
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
147
- readonly type: Schema.tag<"function">;
148
- readonly function: Schema.Struct<{
149
- readonly name: Schema.String;
150
- }>;
151
- }, "Type"> | undefined;
145
+ readonly stream_options?: {
146
+ readonly include_usage: boolean;
147
+ } | undefined;
148
+ readonly tool_choice?: "required" | "none" | "auto" | {
149
+ readonly type: "function";
150
+ readonly function: {
151
+ readonly name: string;
152
+ };
153
+ } | undefined;
152
154
  readonly top_p?: number | undefined;
153
155
  readonly store?: boolean | undefined;
154
156
  readonly reasoning_effort?: string | undefined;
@@ -172,8 +174,10 @@ export declare const protocol: Protocol<{
172
174
  readonly choices?: readonly {
173
175
  readonly delta?: {
174
176
  readonly [x: string]: unknown;
175
- readonly content?: string | null | undefined;
176
177
  readonly reasoning?: string | null | undefined;
178
+ readonly reasoning_content?: string | null | undefined;
179
+ readonly reasoning_text?: string | null | undefined;
180
+ readonly content?: string | null | undefined;
177
181
  readonly tool_calls?: readonly {
178
182
  readonly index: number;
179
183
  readonly function?: {
@@ -182,8 +186,6 @@ export declare const protocol: Protocol<{
182
186
  } | null | undefined;
183
187
  readonly id?: string | null | undefined;
184
188
  }[] | null | undefined;
185
- readonly reasoning_content?: string | null | undefined;
186
- readonly reasoning_text?: string | null | undefined;
187
189
  readonly reasoning_details?: unknown;
188
190
  } | null | undefined;
189
191
  readonly finish_reason?: string | null | undefined;
@@ -192,132 +194,136 @@ export declare const protocol: Protocol<{
192
194
  }, OpenAIChat.ParserState>;
193
195
  export declare const route: Route<{
194
196
  readonly [x: string]: any;
195
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
196
- readonly role: Schema.Literal<"system">;
197
- readonly content: Schema.String;
198
- }, "Type"> | Schema.Struct.ReadonlySide<{
199
- readonly role: Schema.Literal<"user">;
200
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
201
- readonly type: Schema.Literal<"text">;
202
- readonly text: Schema.String;
203
- }>, Schema.Struct<{
204
- readonly type: Schema.Literal<"image_url">;
205
- readonly image_url: Schema.Struct<{
206
- readonly url: Schema.String;
207
- }>;
208
- }>]>>]>;
209
- }, "Type"> | {
197
+ readonly model: string;
198
+ readonly messages: readonly ({
199
+ readonly role: "system";
200
+ readonly content: string;
201
+ } | {
202
+ readonly role: "user";
203
+ readonly content: string | readonly ({
204
+ readonly type: "text";
205
+ readonly text: string;
206
+ } | {
207
+ readonly type: "image_url";
208
+ readonly image_url: {
209
+ readonly url: string;
210
+ };
211
+ })[];
212
+ } | {
210
213
  readonly [x: string]: unknown;
211
214
  readonly content: string | null;
212
215
  readonly role: "assistant";
213
216
  readonly reasoning?: string | undefined;
214
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
215
- readonly id: Schema.String;
216
- readonly type: Schema.tag<"function">;
217
- readonly function: Schema.Struct<{
218
- readonly name: Schema.String;
219
- readonly arguments: Schema.String;
220
- }>;
221
- }, "Type">[] | undefined;
222
217
  readonly reasoning_content?: string | undefined;
223
218
  readonly reasoning_text?: string | undefined;
219
+ readonly tool_calls?: readonly {
220
+ readonly id: string;
221
+ readonly type: "function";
222
+ readonly function: {
223
+ readonly name: string;
224
+ readonly arguments: string;
225
+ };
226
+ }[] | undefined;
224
227
  readonly reasoning_details?: unknown;
225
- } | Schema.Struct.ReadonlySide<{
226
- readonly role: Schema.Literal<"tool">;
227
- readonly tool_call_id: Schema.String;
228
- readonly content: Schema.String;
229
- }, "Type">)[];
230
- readonly model: string;
228
+ } | {
229
+ readonly role: "tool";
230
+ readonly tool_call_id: string;
231
+ readonly content: string;
232
+ })[];
231
233
  readonly stream: true;
232
234
  readonly stop?: readonly string[] | undefined;
233
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
234
- readonly type: Schema.tag<"function">;
235
- readonly function: Schema.Struct<{
236
- readonly name: Schema.String;
237
- readonly description: Schema.String;
238
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
239
- }>;
240
- }, "Type">[] | undefined;
235
+ readonly tools?: readonly {
236
+ readonly type: "function";
237
+ readonly function: {
238
+ readonly name: string;
239
+ readonly description: string;
240
+ readonly parameters: {
241
+ readonly [x: string]: unknown;
242
+ };
243
+ };
244
+ }[] | undefined;
241
245
  readonly temperature?: number | undefined;
242
246
  readonly seed?: number | undefined;
243
247
  readonly frequency_penalty?: number | undefined;
244
248
  readonly max_tokens?: number | undefined;
245
249
  readonly presence_penalty?: number | undefined;
246
- readonly stream_options?: Schema.Struct.ReadonlySide<{
247
- readonly include_usage: Schema.Boolean;
248
- }, "Type"> | undefined;
249
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
250
- readonly type: Schema.tag<"function">;
251
- readonly function: Schema.Struct<{
252
- readonly name: Schema.String;
253
- }>;
254
- }, "Type"> | undefined;
250
+ readonly stream_options?: {
251
+ readonly include_usage: boolean;
252
+ } | undefined;
253
+ readonly tool_choice?: "required" | "none" | "auto" | {
254
+ readonly type: "function";
255
+ readonly function: {
256
+ readonly name: string;
257
+ };
258
+ } | undefined;
255
259
  readonly top_p?: number | undefined;
256
260
  readonly store?: boolean | undefined;
257
261
  readonly reasoning_effort?: string | undefined;
258
262
  }, import("../route/transport/http").HttpPrepared<string>>;
259
263
  export declare const routes: Route<{
260
264
  readonly [x: string]: any;
261
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
262
- readonly role: Schema.Literal<"system">;
263
- readonly content: Schema.String;
264
- }, "Type"> | Schema.Struct.ReadonlySide<{
265
- readonly role: Schema.Literal<"user">;
266
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
267
- readonly type: Schema.Literal<"text">;
268
- readonly text: Schema.String;
269
- }>, Schema.Struct<{
270
- readonly type: Schema.Literal<"image_url">;
271
- readonly image_url: Schema.Struct<{
272
- readonly url: Schema.String;
273
- }>;
274
- }>]>>]>;
275
- }, "Type"> | {
265
+ readonly model: string;
266
+ readonly messages: readonly ({
267
+ readonly role: "system";
268
+ readonly content: string;
269
+ } | {
270
+ readonly role: "user";
271
+ readonly content: string | readonly ({
272
+ readonly type: "text";
273
+ readonly text: string;
274
+ } | {
275
+ readonly type: "image_url";
276
+ readonly image_url: {
277
+ readonly url: string;
278
+ };
279
+ })[];
280
+ } | {
276
281
  readonly [x: string]: unknown;
277
282
  readonly content: string | null;
278
283
  readonly role: "assistant";
279
284
  readonly reasoning?: string | undefined;
280
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
281
- readonly id: Schema.String;
282
- readonly type: Schema.tag<"function">;
283
- readonly function: Schema.Struct<{
284
- readonly name: Schema.String;
285
- readonly arguments: Schema.String;
286
- }>;
287
- }, "Type">[] | undefined;
288
285
  readonly reasoning_content?: string | undefined;
289
286
  readonly reasoning_text?: string | undefined;
287
+ readonly tool_calls?: readonly {
288
+ readonly id: string;
289
+ readonly type: "function";
290
+ readonly function: {
291
+ readonly name: string;
292
+ readonly arguments: string;
293
+ };
294
+ }[] | undefined;
290
295
  readonly reasoning_details?: unknown;
291
- } | Schema.Struct.ReadonlySide<{
292
- readonly role: Schema.Literal<"tool">;
293
- readonly tool_call_id: Schema.String;
294
- readonly content: Schema.String;
295
- }, "Type">)[];
296
- readonly model: string;
296
+ } | {
297
+ readonly role: "tool";
298
+ readonly tool_call_id: string;
299
+ readonly content: string;
300
+ })[];
297
301
  readonly stream: true;
298
302
  readonly stop?: readonly string[] | undefined;
299
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
300
- readonly type: Schema.tag<"function">;
301
- readonly function: Schema.Struct<{
302
- readonly name: Schema.String;
303
- readonly description: Schema.String;
304
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
305
- }>;
306
- }, "Type">[] | undefined;
303
+ readonly tools?: readonly {
304
+ readonly type: "function";
305
+ readonly function: {
306
+ readonly name: string;
307
+ readonly description: string;
308
+ readonly parameters: {
309
+ readonly [x: string]: unknown;
310
+ };
311
+ };
312
+ }[] | undefined;
307
313
  readonly temperature?: number | undefined;
308
314
  readonly seed?: number | undefined;
309
315
  readonly frequency_penalty?: number | undefined;
310
316
  readonly max_tokens?: number | undefined;
311
317
  readonly presence_penalty?: number | undefined;
312
- readonly stream_options?: Schema.Struct.ReadonlySide<{
313
- readonly include_usage: Schema.Boolean;
314
- }, "Type"> | undefined;
315
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
316
- readonly type: Schema.tag<"function">;
317
- readonly function: Schema.Struct<{
318
- readonly name: Schema.String;
319
- }>;
320
- }, "Type"> | undefined;
318
+ readonly stream_options?: {
319
+ readonly include_usage: boolean;
320
+ } | undefined;
321
+ readonly tool_choice?: "required" | "none" | "auto" | {
322
+ readonly type: "function";
323
+ readonly function: {
324
+ readonly name: string;
325
+ };
326
+ } | undefined;
321
327
  readonly top_p?: number | undefined;
322
328
  readonly store?: boolean | undefined;
323
329
  readonly reasoning_effort?: string | undefined;
@@ -7,130 +7,132 @@ export type ModelOptions = RouteDefaultsInput & ProviderAuthOption<"optional"> &
7
7
  };
8
8
  export type { XAIImageOptions } from "../protocols/xai-images";
9
9
  export declare const routes: (import("../route").Route<{
10
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
11
- readonly role: import("effect/Schema").Literal<"system">;
12
- readonly content: import("effect/Schema").String;
13
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
14
- readonly role: import("effect/Schema").Literal<"user">;
15
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
16
- readonly type: import("effect/Schema").Literal<"text">;
17
- readonly text: import("effect/Schema").String;
18
- }>, import("effect/Schema").Struct<{
19
- readonly type: import("effect/Schema").Literal<"image_url">;
20
- readonly image_url: import("effect/Schema").Struct<{
21
- readonly url: import("effect/Schema").String;
22
- }>;
23
- }>]>>]>;
24
- }, "Type"> | {
10
+ readonly model: string;
11
+ readonly messages: readonly ({
12
+ readonly role: "system";
13
+ readonly content: string;
14
+ } | {
15
+ readonly role: "user";
16
+ readonly content: string | readonly ({
17
+ readonly type: "text";
18
+ readonly text: string;
19
+ } | {
20
+ readonly type: "image_url";
21
+ readonly image_url: {
22
+ readonly url: string;
23
+ };
24
+ })[];
25
+ } | {
25
26
  readonly [x: string]: unknown;
26
27
  readonly content: string | null;
27
28
  readonly role: "assistant";
28
29
  readonly reasoning?: string | undefined;
29
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
30
- readonly id: import("effect/Schema").String;
31
- readonly type: import("effect/Schema").tag<"function">;
32
- readonly function: import("effect/Schema").Struct<{
33
- readonly name: import("effect/Schema").String;
34
- readonly arguments: import("effect/Schema").String;
35
- }>;
36
- }, "Type">[] | undefined;
37
30
  readonly reasoning_content?: string | undefined;
38
31
  readonly reasoning_text?: string | undefined;
32
+ readonly tool_calls?: readonly {
33
+ readonly id: string;
34
+ readonly type: "function";
35
+ readonly function: {
36
+ readonly name: string;
37
+ readonly arguments: string;
38
+ };
39
+ }[] | undefined;
39
40
  readonly reasoning_details?: unknown;
40
- } | import("effect/Schema").Struct.ReadonlySide<{
41
- readonly role: import("effect/Schema").Literal<"tool">;
42
- readonly tool_call_id: import("effect/Schema").String;
43
- readonly content: import("effect/Schema").String;
44
- }, "Type">)[];
45
- readonly model: string;
41
+ } | {
42
+ readonly role: "tool";
43
+ readonly tool_call_id: string;
44
+ readonly content: string;
45
+ })[];
46
46
  readonly stream: true;
47
47
  readonly stop?: readonly string[] | undefined;
48
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
49
- readonly type: import("effect/Schema").tag<"function">;
50
- readonly function: import("effect/Schema").Struct<{
51
- readonly name: import("effect/Schema").String;
52
- readonly description: import("effect/Schema").String;
53
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
54
- }>;
55
- }, "Type">[] | undefined;
48
+ readonly tools?: readonly {
49
+ readonly type: "function";
50
+ readonly function: {
51
+ readonly name: string;
52
+ readonly description: string;
53
+ readonly parameters: {
54
+ readonly [x: string]: unknown;
55
+ };
56
+ };
57
+ }[] | undefined;
56
58
  readonly temperature?: number | undefined;
57
59
  readonly seed?: number | undefined;
58
60
  readonly frequency_penalty?: number | undefined;
59
61
  readonly max_tokens?: number | undefined;
60
62
  readonly presence_penalty?: number | undefined;
61
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
62
- readonly include_usage: import("effect/Schema").Boolean;
63
- }, "Type"> | undefined;
64
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
65
- readonly type: import("effect/Schema").tag<"function">;
66
- readonly function: import("effect/Schema").Struct<{
67
- readonly name: import("effect/Schema").String;
68
- }>;
69
- }, "Type"> | undefined;
63
+ readonly stream_options?: {
64
+ readonly include_usage: boolean;
65
+ } | undefined;
66
+ readonly tool_choice?: "required" | "none" | "auto" | {
67
+ readonly type: "function";
68
+ readonly function: {
69
+ readonly name: string;
70
+ };
71
+ } | undefined;
70
72
  readonly top_p?: number | undefined;
71
73
  readonly store?: boolean | undefined;
72
74
  readonly reasoning_effort?: string | undefined;
73
75
  }, import("../route/transport/http").HttpPrepared<string>> | import("../route").Route<{
74
76
  readonly input: readonly ({
75
77
  readonly type: "reasoning";
76
- readonly summary: readonly import("effect/Schema").Struct.ReadonlySide<{
77
- readonly type: import("effect/Schema").tag<"summary_text">;
78
- readonly text: import("effect/Schema").String;
79
- }, "Type">[];
78
+ readonly summary: readonly {
79
+ readonly type: "summary_text";
80
+ readonly text: string;
81
+ }[];
80
82
  readonly id?: string | undefined;
81
83
  readonly encrypted_content?: string | null | undefined;
82
- } | import("effect/Schema").Struct.ReadonlySide<{
83
- readonly type: import("effect/Schema").tag<"item_reference">;
84
- readonly id: import("effect/Schema").String;
85
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
86
- readonly role: import("effect/Schema").tag<"system">;
87
- readonly content: import("effect/Schema").String;
88
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
89
- readonly role: import("effect/Schema").tag<"user">;
90
- readonly content: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
91
- readonly type: import("effect/Schema").tag<"input_text">;
92
- readonly text: import("effect/Schema").String;
93
- }>, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
94
- readonly type: import("effect/Schema").tag<"input_image">;
95
- readonly image_url: import("effect/Schema").String;
96
- }>, import("effect/Schema").Struct<{
97
- readonly type: import("effect/Schema").tag<"input_file">;
98
- readonly filename: import("effect/Schema").String;
99
- readonly file_data: import("effect/Schema").String;
100
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
101
- }>]>]>>;
102
- }, "Type"> | {
103
- readonly content: readonly import("effect/Schema").Struct.ReadonlySide<{
104
- readonly type: import("effect/Schema").tag<"output_text">;
105
- readonly text: import("effect/Schema").String;
106
- }, "Type">[];
84
+ } | {
85
+ readonly type: "item_reference";
86
+ readonly id: string;
87
+ } | {
88
+ readonly role: "system";
89
+ readonly content: string;
90
+ } | {
91
+ readonly role: "user";
92
+ readonly content: readonly ({
93
+ readonly type: "input_image";
94
+ readonly image_url: string;
95
+ } | {
96
+ readonly type: "input_file";
97
+ readonly filename: string;
98
+ readonly file_data: string;
99
+ readonly mime_type?: string | undefined;
100
+ } | {
101
+ readonly type: "input_text";
102
+ readonly text: string;
103
+ })[];
104
+ } | {
105
+ readonly content: readonly {
106
+ readonly type: "output_text";
107
+ readonly text: string;
108
+ }[];
107
109
  readonly role: "assistant";
108
110
  readonly phase?: "commentary" | "final_answer" | undefined;
109
- } | import("effect/Schema").Struct.ReadonlySide<{
110
- readonly type: import("effect/Schema").tag<"function_call">;
111
- readonly call_id: import("effect/Schema").String;
112
- readonly name: import("effect/Schema").String;
113
- readonly arguments: import("effect/Schema").String;
114
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
115
- readonly type: import("effect/Schema").tag<"function_call_output">;
116
- readonly call_id: import("effect/Schema").String;
117
- readonly output: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
118
- readonly type: import("effect/Schema").tag<"input_text">;
119
- readonly text: import("effect/Schema").String;
120
- }>, import("effect/Schema").Struct<{
121
- readonly type: import("effect/Schema").tag<"input_image">;
122
- readonly image_url: import("effect/Schema").String;
123
- }>, import("effect/Schema").Struct<{
124
- readonly type: import("effect/Schema").tag<"input_file">;
125
- readonly filename: import("effect/Schema").String;
126
- readonly file_data: import("effect/Schema").String;
127
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
128
- }>]>>]>;
129
- }, "Type"> | {
130
- readonly content: readonly import("effect/Schema").Struct.ReadonlySide<{
131
- readonly type: import("effect/Schema").tag<"output_text">;
132
- readonly text: import("effect/Schema").String;
133
- }, "Type">[];
111
+ } | {
112
+ readonly type: "function_call";
113
+ readonly call_id: string;
114
+ readonly name: string;
115
+ readonly arguments: string;
116
+ } | {
117
+ readonly type: "function_call_output";
118
+ readonly call_id: string;
119
+ readonly output: string | readonly ({
120
+ readonly type: "input_image";
121
+ readonly image_url: string;
122
+ } | {
123
+ readonly type: "input_file";
124
+ readonly filename: string;
125
+ readonly file_data: string;
126
+ readonly mime_type?: string | undefined;
127
+ } | {
128
+ readonly type: "input_text";
129
+ readonly text: string;
130
+ })[];
131
+ } | {
132
+ readonly content: readonly {
133
+ readonly type: "output_text";
134
+ readonly text: string;
135
+ }[];
134
136
  readonly role: "assistant";
135
137
  readonly phase?: "commentary" | "final_answer" | null | undefined;
136
138
  })[];
@@ -139,9 +141,10 @@ export declare const routes: (import("../route").Route<{
139
141
  readonly text?: {
140
142
  readonly verbosity?: "low" | "medium" | "high" | undefined;
141
143
  } | undefined;
144
+ readonly instructions?: string | undefined;
142
145
  readonly reasoning?: {
143
- readonly effort?: string | undefined;
144
146
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
147
+ readonly effort?: string | undefined;
145
148
  } | undefined;
146
149
  readonly tools?: readonly ({
147
150
  readonly type: "function";
@@ -153,25 +156,24 @@ export declare const routes: (import("../route").Route<{
153
156
  readonly strict?: boolean | undefined;
154
157
  } | {
155
158
  readonly type: "image_generation";
156
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
157
159
  readonly size?: string | undefined;
160
+ readonly action?: "generate" | "auto" | "edit" | undefined;
161
+ readonly output_format?: "png" | "jpeg" | "webp" | undefined;
158
162
  readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
159
163
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
160
164
  readonly output_compression?: number | undefined;
161
- readonly action?: "generate" | "auto" | "edit" | undefined;
162
165
  readonly input_fidelity?: "low" | "high" | undefined;
163
166
  readonly partial_images?: number | undefined;
164
167
  })[] | undefined;
165
168
  readonly temperature?: number | undefined;
166
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
167
- readonly type: import("effect/Schema").tag<"function">;
168
- readonly name: import("effect/Schema").String;
169
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
170
- readonly type: import("effect/Schema").tag<"image_generation">;
171
- }, "Type"> | undefined;
169
+ readonly tool_choice?: "required" | "none" | "auto" | {
170
+ readonly type: "function";
171
+ readonly name: string;
172
+ } | {
173
+ readonly type: "image_generation";
174
+ } | undefined;
172
175
  readonly top_p?: number | undefined;
173
176
  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;
174
- readonly instructions?: string | undefined;
175
177
  readonly store?: boolean | undefined;
176
178
  readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
177
179
  readonly prompt_cache_key?: string | undefined;