@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
@@ -198,66 +198,68 @@ export interface ParserState {
198
198
  * Fireworks, DeepInfra, and (once added) Azure OpenAI Chat.
199
199
  */
200
200
  export declare const protocol: Protocol<{
201
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
202
- readonly role: Schema.Literal<"system">;
203
- readonly content: Schema.String;
204
- }, "Type"> | Schema.Struct.ReadonlySide<{
205
- readonly role: Schema.Literal<"user">;
206
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
207
- readonly type: Schema.Literal<"text">;
208
- readonly text: Schema.String;
209
- }>, Schema.Struct<{
210
- readonly type: Schema.Literal<"image_url">;
211
- readonly image_url: Schema.Struct<{
212
- readonly url: Schema.String;
213
- }>;
214
- }>]>>]>;
215
- }, "Type"> | {
201
+ readonly model: string;
202
+ readonly messages: readonly ({
203
+ readonly role: "system";
204
+ readonly content: string;
205
+ } | {
206
+ readonly role: "user";
207
+ readonly content: string | readonly ({
208
+ readonly type: "text";
209
+ readonly text: string;
210
+ } | {
211
+ readonly type: "image_url";
212
+ readonly image_url: {
213
+ readonly url: string;
214
+ };
215
+ })[];
216
+ } | {
216
217
  readonly [x: string]: unknown;
217
218
  readonly content: string | null;
218
219
  readonly role: "assistant";
219
220
  readonly reasoning?: string | undefined;
220
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
221
- readonly id: Schema.String;
222
- readonly type: Schema.tag<"function">;
223
- readonly function: Schema.Struct<{
224
- readonly name: Schema.String;
225
- readonly arguments: Schema.String;
226
- }>;
227
- }, "Type">[] | undefined;
228
221
  readonly reasoning_content?: string | undefined;
229
222
  readonly reasoning_text?: string | undefined;
223
+ readonly tool_calls?: readonly {
224
+ readonly id: string;
225
+ readonly type: "function";
226
+ readonly function: {
227
+ readonly name: string;
228
+ readonly arguments: string;
229
+ };
230
+ }[] | undefined;
230
231
  readonly reasoning_details?: unknown;
231
- } | Schema.Struct.ReadonlySide<{
232
- readonly role: Schema.Literal<"tool">;
233
- readonly tool_call_id: Schema.String;
234
- readonly content: Schema.String;
235
- }, "Type">)[];
236
- readonly model: string;
232
+ } | {
233
+ readonly role: "tool";
234
+ readonly tool_call_id: string;
235
+ readonly content: string;
236
+ })[];
237
237
  readonly stream: true;
238
238
  readonly stop?: readonly string[] | undefined;
239
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
240
- readonly type: Schema.tag<"function">;
241
- readonly function: Schema.Struct<{
242
- readonly name: Schema.String;
243
- readonly description: Schema.String;
244
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
245
- }>;
246
- }, "Type">[] | undefined;
239
+ readonly tools?: readonly {
240
+ readonly type: "function";
241
+ readonly function: {
242
+ readonly name: string;
243
+ readonly description: string;
244
+ readonly parameters: {
245
+ readonly [x: string]: unknown;
246
+ };
247
+ };
248
+ }[] | undefined;
247
249
  readonly temperature?: number | undefined;
248
250
  readonly seed?: number | undefined;
249
251
  readonly frequency_penalty?: number | undefined;
250
252
  readonly max_tokens?: number | undefined;
251
253
  readonly presence_penalty?: number | undefined;
252
- readonly stream_options?: Schema.Struct.ReadonlySide<{
253
- readonly include_usage: Schema.Boolean;
254
- }, "Type"> | undefined;
255
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
256
- readonly type: Schema.tag<"function">;
257
- readonly function: Schema.Struct<{
258
- readonly name: Schema.String;
259
- }>;
260
- }, "Type"> | undefined;
254
+ readonly stream_options?: {
255
+ readonly include_usage: boolean;
256
+ } | undefined;
257
+ readonly tool_choice?: "required" | "none" | "auto" | {
258
+ readonly type: "function";
259
+ readonly function: {
260
+ readonly name: string;
261
+ };
262
+ } | undefined;
261
263
  readonly top_p?: number | undefined;
262
264
  readonly store?: boolean | undefined;
263
265
  readonly reasoning_effort?: string | undefined;
@@ -281,8 +283,10 @@ export declare const protocol: Protocol<{
281
283
  readonly choices?: readonly {
282
284
  readonly delta?: {
283
285
  readonly [x: string]: unknown;
284
- readonly content?: string | null | undefined;
285
286
  readonly reasoning?: string | null | undefined;
287
+ readonly reasoning_content?: string | null | undefined;
288
+ readonly reasoning_text?: string | null | undefined;
289
+ readonly content?: string | null | undefined;
286
290
  readonly tool_calls?: readonly {
287
291
  readonly index: number;
288
292
  readonly function?: {
@@ -291,8 +295,6 @@ export declare const protocol: Protocol<{
291
295
  } | null | undefined;
292
296
  readonly id?: string | null | undefined;
293
297
  }[] | null | undefined;
294
- readonly reasoning_content?: string | null | undefined;
295
- readonly reasoning_text?: string | null | undefined;
296
298
  readonly reasoning_details?: unknown;
297
299
  } | null | undefined;
298
300
  readonly finish_reason?: string | null | undefined;
@@ -300,131 +302,135 @@ export declare const protocol: Protocol<{
300
302
  }[] | null | undefined;
301
303
  }, ParserState>;
302
304
  export declare const httpTransport: HttpTransport.HttpJsonTransport<{
303
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
304
- readonly role: Schema.Literal<"system">;
305
- readonly content: Schema.String;
306
- }, "Type"> | Schema.Struct.ReadonlySide<{
307
- readonly role: Schema.Literal<"user">;
308
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
309
- readonly type: Schema.Literal<"text">;
310
- readonly text: Schema.String;
311
- }>, Schema.Struct<{
312
- readonly type: Schema.Literal<"image_url">;
313
- readonly image_url: Schema.Struct<{
314
- readonly url: Schema.String;
315
- }>;
316
- }>]>>]>;
317
- }, "Type"> | {
305
+ readonly model: string;
306
+ readonly messages: readonly ({
307
+ readonly role: "system";
308
+ readonly content: string;
309
+ } | {
310
+ readonly role: "user";
311
+ readonly content: string | readonly ({
312
+ readonly type: "text";
313
+ readonly text: string;
314
+ } | {
315
+ readonly type: "image_url";
316
+ readonly image_url: {
317
+ readonly url: string;
318
+ };
319
+ })[];
320
+ } | {
318
321
  readonly [x: string]: unknown;
319
322
  readonly content: string | null;
320
323
  readonly role: "assistant";
321
324
  readonly reasoning?: string | undefined;
322
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
323
- readonly id: Schema.String;
324
- readonly type: Schema.tag<"function">;
325
- readonly function: Schema.Struct<{
326
- readonly name: Schema.String;
327
- readonly arguments: Schema.String;
328
- }>;
329
- }, "Type">[] | undefined;
330
325
  readonly reasoning_content?: string | undefined;
331
326
  readonly reasoning_text?: string | undefined;
327
+ readonly tool_calls?: readonly {
328
+ readonly id: string;
329
+ readonly type: "function";
330
+ readonly function: {
331
+ readonly name: string;
332
+ readonly arguments: string;
333
+ };
334
+ }[] | undefined;
332
335
  readonly reasoning_details?: unknown;
333
- } | Schema.Struct.ReadonlySide<{
334
- readonly role: Schema.Literal<"tool">;
335
- readonly tool_call_id: Schema.String;
336
- readonly content: Schema.String;
337
- }, "Type">)[];
338
- readonly model: string;
336
+ } | {
337
+ readonly role: "tool";
338
+ readonly tool_call_id: string;
339
+ readonly content: string;
340
+ })[];
339
341
  readonly stream: true;
340
342
  readonly stop?: readonly string[] | undefined;
341
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
342
- readonly type: Schema.tag<"function">;
343
- readonly function: Schema.Struct<{
344
- readonly name: Schema.String;
345
- readonly description: Schema.String;
346
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
347
- }>;
348
- }, "Type">[] | undefined;
343
+ readonly tools?: readonly {
344
+ readonly type: "function";
345
+ readonly function: {
346
+ readonly name: string;
347
+ readonly description: string;
348
+ readonly parameters: {
349
+ readonly [x: string]: unknown;
350
+ };
351
+ };
352
+ }[] | undefined;
349
353
  readonly temperature?: number | undefined;
350
354
  readonly seed?: number | undefined;
351
355
  readonly frequency_penalty?: number | undefined;
352
356
  readonly max_tokens?: number | undefined;
353
357
  readonly presence_penalty?: number | undefined;
354
- readonly stream_options?: Schema.Struct.ReadonlySide<{
355
- readonly include_usage: Schema.Boolean;
356
- }, "Type"> | undefined;
357
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
358
- readonly type: Schema.tag<"function">;
359
- readonly function: Schema.Struct<{
360
- readonly name: Schema.String;
361
- }>;
362
- }, "Type"> | undefined;
358
+ readonly stream_options?: {
359
+ readonly include_usage: boolean;
360
+ } | undefined;
361
+ readonly tool_choice?: "required" | "none" | "auto" | {
362
+ readonly type: "function";
363
+ readonly function: {
364
+ readonly name: string;
365
+ };
366
+ } | undefined;
363
367
  readonly top_p?: number | undefined;
364
368
  readonly store?: boolean | undefined;
365
369
  readonly reasoning_effort?: string | undefined;
366
370
  }, string>;
367
371
  export declare const route: Route<{
368
- readonly messages: readonly (Schema.Struct.ReadonlySide<{
369
- readonly role: Schema.Literal<"system">;
370
- readonly content: Schema.String;
371
- }, "Type"> | Schema.Struct.ReadonlySide<{
372
- readonly role: Schema.Literal<"user">;
373
- readonly content: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
374
- readonly type: Schema.Literal<"text">;
375
- readonly text: Schema.String;
376
- }>, Schema.Struct<{
377
- readonly type: Schema.Literal<"image_url">;
378
- readonly image_url: Schema.Struct<{
379
- readonly url: Schema.String;
380
- }>;
381
- }>]>>]>;
382
- }, "Type"> | {
372
+ readonly model: string;
373
+ readonly messages: readonly ({
374
+ readonly role: "system";
375
+ readonly content: string;
376
+ } | {
377
+ readonly role: "user";
378
+ readonly content: string | readonly ({
379
+ readonly type: "text";
380
+ readonly text: string;
381
+ } | {
382
+ readonly type: "image_url";
383
+ readonly image_url: {
384
+ readonly url: string;
385
+ };
386
+ })[];
387
+ } | {
383
388
  readonly [x: string]: unknown;
384
389
  readonly content: string | null;
385
390
  readonly role: "assistant";
386
391
  readonly reasoning?: string | undefined;
387
- readonly tool_calls?: readonly Schema.Struct.ReadonlySide<{
388
- readonly id: Schema.String;
389
- readonly type: Schema.tag<"function">;
390
- readonly function: Schema.Struct<{
391
- readonly name: Schema.String;
392
- readonly arguments: Schema.String;
393
- }>;
394
- }, "Type">[] | undefined;
395
392
  readonly reasoning_content?: string | undefined;
396
393
  readonly reasoning_text?: string | undefined;
394
+ readonly tool_calls?: readonly {
395
+ readonly id: string;
396
+ readonly type: "function";
397
+ readonly function: {
398
+ readonly name: string;
399
+ readonly arguments: string;
400
+ };
401
+ }[] | undefined;
397
402
  readonly reasoning_details?: unknown;
398
- } | Schema.Struct.ReadonlySide<{
399
- readonly role: Schema.Literal<"tool">;
400
- readonly tool_call_id: Schema.String;
401
- readonly content: Schema.String;
402
- }, "Type">)[];
403
- readonly model: string;
403
+ } | {
404
+ readonly role: "tool";
405
+ readonly tool_call_id: string;
406
+ readonly content: string;
407
+ })[];
404
408
  readonly stream: true;
405
409
  readonly stop?: readonly string[] | undefined;
406
- readonly tools?: readonly Schema.Struct.ReadonlySide<{
407
- readonly type: Schema.tag<"function">;
408
- readonly function: Schema.Struct<{
409
- readonly name: Schema.String;
410
- readonly description: Schema.String;
411
- readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
412
- }>;
413
- }, "Type">[] | undefined;
410
+ readonly tools?: readonly {
411
+ readonly type: "function";
412
+ readonly function: {
413
+ readonly name: string;
414
+ readonly description: string;
415
+ readonly parameters: {
416
+ readonly [x: string]: unknown;
417
+ };
418
+ };
419
+ }[] | undefined;
414
420
  readonly temperature?: number | undefined;
415
421
  readonly seed?: number | undefined;
416
422
  readonly frequency_penalty?: number | undefined;
417
423
  readonly max_tokens?: number | undefined;
418
424
  readonly presence_penalty?: number | undefined;
419
- readonly stream_options?: Schema.Struct.ReadonlySide<{
420
- readonly include_usage: Schema.Boolean;
421
- }, "Type"> | undefined;
422
- readonly tool_choice?: "required" | "none" | "auto" | Schema.Struct.ReadonlySide<{
423
- readonly type: Schema.tag<"function">;
424
- readonly function: Schema.Struct<{
425
- readonly name: Schema.String;
426
- }>;
427
- }, "Type"> | undefined;
425
+ readonly stream_options?: {
426
+ readonly include_usage: boolean;
427
+ } | undefined;
428
+ readonly tool_choice?: "required" | "none" | "auto" | {
429
+ readonly type: "function";
430
+ readonly function: {
431
+ readonly name: string;
432
+ };
433
+ } | undefined;
428
434
  readonly top_p?: number | undefined;
429
435
  readonly store?: boolean | undefined;
430
436
  readonly reasoning_effort?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  import { Effect, Schema } from "effect";
2
+ import { Tool } from "@opencode-ai/schema/tool";
2
3
  import { Route } from "../route/client";
3
4
  import { Auth } from "../route/auth";
4
5
  import { Endpoint } from "../route/endpoint";
@@ -8,66 +8,68 @@ export type OpenAICompatibleChatModelInput = RouteRoutedModelInput;
8
8
  * before model selection.
9
9
  */
10
10
  export declare const route: Route<{
11
- readonly messages: readonly (import("effect/Schema").Struct.ReadonlySide<{
12
- readonly role: import("effect/Schema").Literal<"system">;
13
- readonly content: import("effect/Schema").String;
14
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
15
- readonly role: import("effect/Schema").Literal<"user">;
16
- readonly content: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
17
- readonly type: import("effect/Schema").Literal<"text">;
18
- readonly text: import("effect/Schema").String;
19
- }>, import("effect/Schema").Struct<{
20
- readonly type: import("effect/Schema").Literal<"image_url">;
21
- readonly image_url: import("effect/Schema").Struct<{
22
- readonly url: import("effect/Schema").String;
23
- }>;
24
- }>]>>]>;
25
- }, "Type"> | {
11
+ readonly model: string;
12
+ readonly messages: readonly ({
13
+ readonly role: "system";
14
+ readonly content: string;
15
+ } | {
16
+ readonly role: "user";
17
+ readonly content: string | readonly ({
18
+ readonly type: "text";
19
+ readonly text: string;
20
+ } | {
21
+ readonly type: "image_url";
22
+ readonly image_url: {
23
+ readonly url: string;
24
+ };
25
+ })[];
26
+ } | {
26
27
  readonly [x: string]: unknown;
27
28
  readonly content: string | null;
28
29
  readonly role: "assistant";
29
30
  readonly reasoning?: string | undefined;
30
- readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
31
- readonly id: import("effect/Schema").String;
32
- readonly type: import("effect/Schema").tag<"function">;
33
- readonly function: import("effect/Schema").Struct<{
34
- readonly name: import("effect/Schema").String;
35
- readonly arguments: import("effect/Schema").String;
36
- }>;
37
- }, "Type">[] | undefined;
38
31
  readonly reasoning_content?: string | undefined;
39
32
  readonly reasoning_text?: string | undefined;
33
+ readonly tool_calls?: readonly {
34
+ readonly id: string;
35
+ readonly type: "function";
36
+ readonly function: {
37
+ readonly name: string;
38
+ readonly arguments: string;
39
+ };
40
+ }[] | undefined;
40
41
  readonly reasoning_details?: unknown;
41
- } | import("effect/Schema").Struct.ReadonlySide<{
42
- readonly role: import("effect/Schema").Literal<"tool">;
43
- readonly tool_call_id: import("effect/Schema").String;
44
- readonly content: import("effect/Schema").String;
45
- }, "Type">)[];
46
- readonly model: string;
42
+ } | {
43
+ readonly role: "tool";
44
+ readonly tool_call_id: string;
45
+ readonly content: string;
46
+ })[];
47
47
  readonly stream: true;
48
48
  readonly stop?: readonly string[] | undefined;
49
- readonly tools?: readonly import("effect/Schema").Struct.ReadonlySide<{
50
- readonly type: import("effect/Schema").tag<"function">;
51
- readonly function: import("effect/Schema").Struct<{
52
- readonly name: import("effect/Schema").String;
53
- readonly description: import("effect/Schema").String;
54
- readonly parameters: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>;
55
- }>;
56
- }, "Type">[] | undefined;
49
+ readonly tools?: readonly {
50
+ readonly type: "function";
51
+ readonly function: {
52
+ readonly name: string;
53
+ readonly description: string;
54
+ readonly parameters: {
55
+ readonly [x: string]: unknown;
56
+ };
57
+ };
58
+ }[] | undefined;
57
59
  readonly temperature?: number | undefined;
58
60
  readonly seed?: number | undefined;
59
61
  readonly frequency_penalty?: number | undefined;
60
62
  readonly max_tokens?: number | undefined;
61
63
  readonly presence_penalty?: number | undefined;
62
- readonly stream_options?: import("effect/Schema").Struct.ReadonlySide<{
63
- readonly include_usage: import("effect/Schema").Boolean;
64
- }, "Type"> | undefined;
65
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
66
- readonly type: import("effect/Schema").tag<"function">;
67
- readonly function: import("effect/Schema").Struct<{
68
- readonly name: import("effect/Schema").String;
69
- }>;
70
- }, "Type"> | undefined;
64
+ readonly stream_options?: {
65
+ readonly include_usage: boolean;
66
+ } | undefined;
67
+ readonly tool_choice?: "required" | "none" | "auto" | {
68
+ readonly type: "function";
69
+ readonly function: {
70
+ readonly name: string;
71
+ };
72
+ } | undefined;
71
73
  readonly top_p?: number | undefined;
72
74
  readonly store?: boolean | undefined;
73
75
  readonly reasoning_effort?: string | undefined;
@@ -8,68 +8,69 @@ export type OpenAICompatibleResponsesModelInput = RouteRoutedModelInput;
8
8
  export declare const route: Route<{
9
9
  readonly input: readonly ({
10
10
  readonly type: "reasoning";
11
- readonly summary: readonly import("effect/Schema").Struct.ReadonlySide<{
12
- readonly type: import("effect/Schema").tag<"summary_text">;
13
- readonly text: import("effect/Schema").String;
14
- }, "Type">[];
11
+ readonly summary: readonly {
12
+ readonly type: "summary_text";
13
+ readonly text: string;
14
+ }[];
15
15
  readonly id?: string | undefined;
16
16
  readonly encrypted_content?: string | null | undefined;
17
- } | import("effect/Schema").Struct.ReadonlySide<{
18
- readonly type: import("effect/Schema").tag<"item_reference">;
19
- readonly id: import("effect/Schema").String;
20
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
21
- readonly role: import("effect/Schema").tag<"system">;
22
- readonly content: import("effect/Schema").String;
23
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
24
- readonly role: import("effect/Schema").tag<"user">;
25
- readonly content: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
26
- readonly type: import("effect/Schema").tag<"input_text">;
27
- readonly text: import("effect/Schema").String;
28
- }>, import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
29
- readonly type: import("effect/Schema").tag<"input_image">;
30
- readonly image_url: import("effect/Schema").String;
31
- }>, import("effect/Schema").Struct<{
32
- readonly type: import("effect/Schema").tag<"input_file">;
33
- readonly filename: import("effect/Schema").String;
34
- readonly file_data: import("effect/Schema").String;
35
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
36
- }>]>]>>;
37
- }, "Type"> | {
38
- readonly content: readonly import("effect/Schema").Struct.ReadonlySide<{
39
- readonly type: import("effect/Schema").tag<"output_text">;
40
- readonly text: import("effect/Schema").String;
41
- }, "Type">[];
17
+ } | {
18
+ readonly type: "item_reference";
19
+ readonly id: string;
20
+ } | {
21
+ readonly role: "system";
22
+ readonly content: string;
23
+ } | {
24
+ readonly role: "user";
25
+ readonly content: readonly ({
26
+ readonly type: "input_image";
27
+ readonly image_url: string;
28
+ } | {
29
+ readonly type: "input_file";
30
+ readonly filename: string;
31
+ readonly file_data: string;
32
+ readonly mime_type?: string | undefined;
33
+ } | {
34
+ readonly type: "input_text";
35
+ readonly text: string;
36
+ })[];
37
+ } | {
38
+ readonly content: readonly {
39
+ readonly type: "output_text";
40
+ readonly text: string;
41
+ }[];
42
42
  readonly role: "assistant";
43
43
  readonly phase?: "commentary" | "final_answer" | undefined;
44
- } | import("effect/Schema").Struct.ReadonlySide<{
45
- readonly type: import("effect/Schema").tag<"function_call">;
46
- readonly call_id: import("effect/Schema").String;
47
- readonly name: import("effect/Schema").String;
48
- readonly arguments: import("effect/Schema").String;
49
- }, "Type"> | import("effect/Schema").Struct.ReadonlySide<{
50
- readonly type: import("effect/Schema").tag<"function_call_output">;
51
- readonly call_id: import("effect/Schema").String;
52
- readonly output: import("effect/Schema").Union<readonly [import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
53
- readonly type: import("effect/Schema").tag<"input_text">;
54
- readonly text: import("effect/Schema").String;
55
- }>, import("effect/Schema").Struct<{
56
- readonly type: import("effect/Schema").tag<"input_image">;
57
- readonly image_url: import("effect/Schema").String;
58
- }>, import("effect/Schema").Struct<{
59
- readonly type: import("effect/Schema").tag<"input_file">;
60
- readonly filename: import("effect/Schema").String;
61
- readonly file_data: import("effect/Schema").String;
62
- readonly mime_type: import("effect/Schema").optional<import("effect/Schema").String>;
63
- }>]>>]>;
64
- }, "Type">)[];
44
+ } | {
45
+ readonly type: "function_call";
46
+ readonly call_id: string;
47
+ readonly name: string;
48
+ readonly arguments: string;
49
+ } | {
50
+ readonly type: "function_call_output";
51
+ readonly call_id: string;
52
+ readonly output: string | readonly ({
53
+ readonly type: "input_image";
54
+ readonly image_url: string;
55
+ } | {
56
+ readonly type: "input_file";
57
+ readonly filename: string;
58
+ readonly file_data: string;
59
+ readonly mime_type?: string | undefined;
60
+ } | {
61
+ readonly type: "input_text";
62
+ readonly text: string;
63
+ })[];
64
+ })[];
65
65
  readonly model: string;
66
66
  readonly stream: true;
67
67
  readonly text?: {
68
68
  readonly verbosity?: "low" | "medium" | "high" | undefined;
69
69
  } | undefined;
70
+ readonly instructions?: string | undefined;
70
71
  readonly reasoning?: {
71
- readonly effort?: string | undefined;
72
72
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
73
+ readonly effort?: string | undefined;
73
74
  } | undefined;
74
75
  readonly tools?: readonly {
75
76
  readonly type: "function";
@@ -81,13 +82,12 @@ export declare const route: Route<{
81
82
  readonly strict?: boolean | undefined;
82
83
  }[] | undefined;
83
84
  readonly temperature?: number | undefined;
84
- readonly tool_choice?: "required" | "none" | "auto" | import("effect/Schema").Struct.ReadonlySide<{
85
- readonly type: import("effect/Schema").tag<"function">;
86
- readonly name: import("effect/Schema").String;
87
- }, "Type"> | undefined;
85
+ readonly tool_choice?: "required" | "none" | "auto" | {
86
+ readonly type: "function";
87
+ readonly name: string;
88
+ } | undefined;
88
89
  readonly top_p?: number | undefined;
89
90
  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;
90
- readonly instructions?: string | undefined;
91
91
  readonly store?: boolean | undefined;
92
92
  readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
93
93
  readonly prompt_cache_key?: string | undefined;