@opencode-ai/ai 0.0.0-beta-17595 → 0.0.0-beta-17727

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 (74) hide show
  1. package/README.md +17 -6
  2. package/dist/cache-policy.js +3 -5
  3. package/dist/protocols/anthropic-messages.d.ts +26 -28
  4. package/dist/protocols/anthropic-messages.js +21 -9
  5. package/dist/protocols/gemini.d.ts +5 -9
  6. package/dist/protocols/gemini.js +5 -4
  7. package/dist/protocols/open-responses.d.ts +200 -38
  8. package/dist/protocols/open-responses.js +115 -42
  9. package/dist/protocols/openai-chat.d.ts +17 -15
  10. package/dist/protocols/openai-chat.js +8 -2
  11. package/dist/protocols/openai-compatible-chat.d.ts +3 -3
  12. package/dist/protocols/openai-compatible-responses.d.ts +31 -5
  13. package/dist/protocols/openai-responses.d.ts +171 -33
  14. package/dist/protocols/openai-responses.js +4 -2
  15. package/dist/protocols/shared.d.ts +8 -14
  16. package/dist/protocols/shared.js +8 -14
  17. package/dist/protocols/utils/bedrock-cache.js +3 -4
  18. package/dist/protocols/utils/cache.js +3 -6
  19. package/dist/protocols/utils/open-responses-options.d.ts +49 -14
  20. package/dist/protocols/utils/open-responses-options.js +40 -22
  21. package/dist/protocols/utils/openai-options.d.ts +7 -5
  22. package/dist/protocols/utils/openai-options.js +3 -3
  23. package/dist/provider-package.d.ts +0 -5
  24. package/dist/providers/amazon-bedrock-mantle.d.ts +47 -19
  25. package/dist/providers/amazon-bedrock-mantle.js +0 -1
  26. package/dist/providers/amazon-bedrock.d.ts +3 -9
  27. package/dist/providers/amazon-bedrock.js +0 -1
  28. package/dist/providers/anthropic-compatible.d.ts +11 -11
  29. package/dist/providers/anthropic-compatible.js +0 -1
  30. package/dist/providers/anthropic.d.ts +12 -12
  31. package/dist/providers/anthropic.js +0 -1
  32. package/dist/providers/azure.d.ts +44 -16
  33. package/dist/providers/azure.js +0 -1
  34. package/dist/providers/cloudflare.d.ts +11 -11
  35. package/dist/providers/google-vertex-chat.d.ts +5 -5
  36. package/dist/providers/google-vertex-chat.js +0 -1
  37. package/dist/providers/google-vertex-messages.d.ts +11 -11
  38. package/dist/providers/google-vertex-messages.js +0 -1
  39. package/dist/providers/google-vertex-responses.d.ts +33 -7
  40. package/dist/providers/google-vertex-responses.js +1 -2
  41. package/dist/providers/google-vertex.d.ts +5 -7
  42. package/dist/providers/google-vertex.js +1 -2
  43. package/dist/providers/google.d.ts +4 -4
  44. package/dist/providers/google.js +0 -1
  45. package/dist/providers/open-responses-options.d.ts +3 -13
  46. package/dist/providers/openai-compatible-responses.d.ts +33 -7
  47. package/dist/providers/openai-compatible-responses.js +0 -1
  48. package/dist/providers/openai-compatible.d.ts +13 -12
  49. package/dist/providers/openai-compatible.js +1 -1
  50. package/dist/providers/openai-options.d.ts +2 -4
  51. package/dist/providers/openai-options.js +3 -3
  52. package/dist/providers/openai.d.ts +48 -20
  53. package/dist/providers/openai.js +0 -1
  54. package/dist/providers/openrouter.d.ts +16 -17
  55. package/dist/providers/openrouter.js +1 -2
  56. package/dist/providers/xai.d.ts +50 -24
  57. package/dist/providers/xai.js +1 -2
  58. package/dist/route/client.d.ts +2 -6
  59. package/dist/route/client.js +1 -2
  60. package/dist/route/framing.d.ts +2 -2
  61. package/dist/route/protocol.d.ts +1 -2
  62. package/dist/route/protocol.js +1 -2
  63. package/dist/schema/errors.js +2 -1
  64. package/dist/schema/events.d.ts +5 -3
  65. package/dist/schema/events.js +5 -2
  66. package/dist/schema/ids.d.ts +0 -13
  67. package/dist/schema/ids.js +0 -9
  68. package/dist/schema/messages.d.ts +7 -7
  69. package/dist/schema/messages.js +5 -2
  70. package/dist/schema/options.d.ts +6 -22
  71. package/dist/schema/options.js +6 -30
  72. package/dist/testing.d.ts +2 -1
  73. package/dist/testing.js +7 -2
  74. package/package.json +5 -5
@@ -3,6 +3,7 @@ import { HttpTransport } from "../route/transport/index.js";
3
3
  import { Protocol } from "../route/protocol.js";
4
4
  import { AIError, LLMEvent, Usage, type LLMRequest, type MediaPart, type ProviderMetadata, type ToolDefinition } from "../schema/index.js";
5
5
  import { ProviderShared } from "./shared.js";
6
+ import { OpenResponsesOptions } from "./utils/open-responses-options.js";
6
7
  import { Lifecycle } from "./utils/lifecycle.js";
7
8
  import { ToolStream } from "./utils/tool-stream.js";
8
9
  export declare const PATH = "/responses";
@@ -21,6 +22,9 @@ type MessagePhase = Schema.Schema.Type<typeof MessagePhase>;
21
22
  export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
22
23
  readonly role: Schema.tag<"system">;
23
24
  readonly content: Schema.String;
25
+ }>, Schema.Struct<{
26
+ readonly role: Schema.tag<"developer">;
27
+ readonly content: Schema.String;
24
28
  }>, Schema.Struct<{
25
29
  readonly role: Schema.tag<"user">;
26
30
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -36,6 +40,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
36
40
  readonly mime_type: Schema.optional<Schema.String>;
37
41
  }>]>]>>;
38
42
  }>, Schema.Struct<{
43
+ readonly type: Schema.tag<"message">;
44
+ readonly id: Schema.optionalKey<Schema.String>;
39
45
  readonly role: Schema.tag<"assistant">;
40
46
  readonly content: Schema.$Array<Schema.Struct<{
41
47
  readonly type: Schema.tag<"output_text">;
@@ -55,6 +61,7 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
55
61
  readonly id: Schema.String;
56
62
  }>, Schema.Struct<{
57
63
  readonly type: Schema.tag<"function_call">;
64
+ readonly id: Schema.optionalKey<Schema.String>;
58
65
  readonly call_id: Schema.String;
59
66
  readonly name: Schema.String;
60
67
  readonly arguments: Schema.String;
@@ -76,6 +83,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
76
83
  }>]>;
77
84
  type OpenResponsesInputItem = Schema.Schema.Type<typeof InputItem>;
78
85
  type LoweredInputItem = OpenResponsesInputItem | {
86
+ readonly type: "message";
87
+ readonly id?: string;
79
88
  readonly role: "assistant";
80
89
  readonly content: ReadonlyArray<{
81
90
  readonly type: "output_text";
@@ -93,12 +102,22 @@ export declare const Tool: Schema.Struct<{
93
102
  export declare const ToolChoice: Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
94
103
  readonly type: Schema.tag<"function">;
95
104
  readonly name: Schema.String;
105
+ }>, Schema.Struct<{
106
+ readonly type: Schema.tag<"allowed_tools">;
107
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
108
+ readonly tools: Schema.$Array<Schema.Struct<{
109
+ readonly type: Schema.tag<"function">;
110
+ readonly name: Schema.String;
111
+ }>>;
96
112
  }>]>;
97
113
  export declare const coreFields: {
98
114
  model: Schema.String;
99
115
  input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
100
116
  readonly role: Schema.tag<"system">;
101
117
  readonly content: Schema.String;
118
+ }>, Schema.Struct<{
119
+ readonly role: Schema.tag<"developer">;
120
+ readonly content: Schema.String;
102
121
  }>, Schema.Struct<{
103
122
  readonly role: Schema.tag<"user">;
104
123
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -114,6 +133,8 @@ export declare const coreFields: {
114
133
  readonly mime_type: Schema.optional<Schema.String>;
115
134
  }>]>]>>;
116
135
  }>, Schema.Struct<{
136
+ readonly type: Schema.tag<"message">;
137
+ readonly id: Schema.optionalKey<Schema.String>;
117
138
  readonly role: Schema.tag<"assistant">;
118
139
  readonly content: Schema.$Array<Schema.Struct<{
119
140
  readonly type: Schema.tag<"output_text">;
@@ -133,6 +154,7 @@ export declare const coreFields: {
133
154
  readonly id: Schema.String;
134
155
  }>, Schema.Struct<{
135
156
  readonly type: Schema.tag<"function_call">;
157
+ readonly id: Schema.optionalKey<Schema.String>;
136
158
  readonly call_id: Schema.String;
137
159
  readonly name: Schema.String;
138
160
  readonly arguments: Schema.String;
@@ -163,21 +185,39 @@ export declare const coreFields: {
163
185
  tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
164
186
  readonly type: Schema.tag<"function">;
165
187
  readonly name: Schema.String;
188
+ }>, Schema.Struct<{
189
+ readonly type: Schema.tag<"allowed_tools">;
190
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
191
+ readonly tools: Schema.$Array<Schema.Struct<{
192
+ readonly type: Schema.tag<"function">;
193
+ readonly name: Schema.String;
194
+ }>>;
166
195
  }>]>>;
167
196
  store: Schema.optional<Schema.Boolean>;
197
+ metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
198
+ safety_identifier: Schema.optional<Schema.String>;
199
+ stream_options: Schema.optional<Schema.Struct<{
200
+ readonly include_obfuscation: Schema.optional<Schema.Boolean>;
201
+ }>>;
202
+ top_logprobs: Schema.optional<Schema.Int>;
203
+ truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
168
204
  service_tier: Schema.optional<Schema.Literals<readonly ["auto", "default", "flex", "priority"]>>;
169
205
  prompt_cache_key: Schema.optional<Schema.String>;
170
- include: Schema.optional<Schema.$Array<Schema.Literals<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"]>>>;
206
+ include: Schema.optional<Schema.$Array<Schema.declare<OpenResponsesOptions.ResponseIncludable, OpenResponsesOptions.ResponseIncludable>>>;
171
207
  reasoning: Schema.optional<Schema.Struct<{
172
- readonly effort: Schema.optional<Schema.String>;
208
+ readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
173
209
  readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
174
210
  }>>;
175
211
  text: Schema.optional<Schema.Struct<{
176
- readonly verbosity: Schema.optional<Schema.Literals<readonly ["low", "medium", "high"]>>;
212
+ readonly verbosity: Schema.optional<Schema.declare<OpenResponsesOptions.TextVerbosity, OpenResponsesOptions.TextVerbosity>>;
177
213
  }>>;
178
214
  max_output_tokens: Schema.optional<Schema.Number>;
215
+ max_tool_calls: Schema.optional<Schema.Int>;
216
+ parallel_tool_calls: Schema.optional<Schema.Boolean>;
179
217
  temperature: Schema.optional<Schema.Number>;
180
218
  top_p: Schema.optional<Schema.Number>;
219
+ presence_penalty: Schema.optional<Schema.Number>;
220
+ frequency_penalty: Schema.optional<Schema.Number>;
181
221
  };
182
222
  declare const OpenResponsesBody: Schema.Struct<{
183
223
  readonly stream: Schema.Literal<true>;
@@ -185,6 +225,9 @@ declare const OpenResponsesBody: Schema.Struct<{
185
225
  readonly input: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
186
226
  readonly role: Schema.tag<"system">;
187
227
  readonly content: Schema.String;
228
+ }>, Schema.Struct<{
229
+ readonly role: Schema.tag<"developer">;
230
+ readonly content: Schema.String;
188
231
  }>, Schema.Struct<{
189
232
  readonly role: Schema.tag<"user">;
190
233
  readonly content: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
@@ -200,6 +243,8 @@ declare const OpenResponsesBody: Schema.Struct<{
200
243
  readonly mime_type: Schema.optional<Schema.String>;
201
244
  }>]>]>>;
202
245
  }>, Schema.Struct<{
246
+ readonly type: Schema.tag<"message">;
247
+ readonly id: Schema.optionalKey<Schema.String>;
203
248
  readonly role: Schema.tag<"assistant">;
204
249
  readonly content: Schema.$Array<Schema.Struct<{
205
250
  readonly type: Schema.tag<"output_text">;
@@ -219,6 +264,7 @@ declare const OpenResponsesBody: Schema.Struct<{
219
264
  readonly id: Schema.String;
220
265
  }>, Schema.Struct<{
221
266
  readonly type: Schema.tag<"function_call">;
267
+ readonly id: Schema.optionalKey<Schema.String>;
222
268
  readonly call_id: Schema.String;
223
269
  readonly name: Schema.String;
224
270
  readonly arguments: Schema.String;
@@ -249,21 +295,39 @@ declare const OpenResponsesBody: Schema.Struct<{
249
295
  readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
250
296
  readonly type: Schema.tag<"function">;
251
297
  readonly name: Schema.String;
298
+ }>, Schema.Struct<{
299
+ readonly type: Schema.tag<"allowed_tools">;
300
+ readonly mode: Schema.Literals<readonly ["auto", "none", "required"]>;
301
+ readonly tools: Schema.$Array<Schema.Struct<{
302
+ readonly type: Schema.tag<"function">;
303
+ readonly name: Schema.String;
304
+ }>>;
252
305
  }>]>>;
253
306
  readonly store: Schema.optional<Schema.Boolean>;
307
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
308
+ readonly safety_identifier: Schema.optional<Schema.String>;
309
+ readonly stream_options: Schema.optional<Schema.Struct<{
310
+ readonly include_obfuscation: Schema.optional<Schema.Boolean>;
311
+ }>>;
312
+ readonly top_logprobs: Schema.optional<Schema.Int>;
313
+ readonly truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
254
314
  readonly service_tier: Schema.optional<Schema.Literals<readonly ["auto", "default", "flex", "priority"]>>;
255
315
  readonly prompt_cache_key: Schema.optional<Schema.String>;
256
- readonly include: Schema.optional<Schema.$Array<Schema.Literals<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"]>>>;
316
+ readonly include: Schema.optional<Schema.$Array<Schema.declare<OpenResponsesOptions.ResponseIncludable, OpenResponsesOptions.ResponseIncludable>>>;
257
317
  readonly reasoning: Schema.optional<Schema.Struct<{
258
- readonly effort: Schema.optional<Schema.String>;
318
+ readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
259
319
  readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
260
320
  }>>;
261
321
  readonly text: Schema.optional<Schema.Struct<{
262
- readonly verbosity: Schema.optional<Schema.Literals<readonly ["low", "medium", "high"]>>;
322
+ readonly verbosity: Schema.optional<Schema.declare<OpenResponsesOptions.TextVerbosity, OpenResponsesOptions.TextVerbosity>>;
263
323
  }>>;
264
324
  readonly max_output_tokens: Schema.optional<Schema.Number>;
325
+ readonly max_tool_calls: Schema.optional<Schema.Int>;
326
+ readonly parallel_tool_calls: Schema.optional<Schema.Boolean>;
265
327
  readonly temperature: Schema.optional<Schema.Number>;
266
328
  readonly top_p: Schema.optional<Schema.Number>;
329
+ readonly presence_penalty: Schema.optional<Schema.Number>;
330
+ readonly frequency_penalty: Schema.optional<Schema.Number>;
267
331
  }>;
268
332
  export type OpenResponsesBody = Schema.Schema.Type<typeof OpenResponsesBody>;
269
333
  export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
@@ -293,18 +357,18 @@ export declare const WebSocketErrorEvent: Schema.StructWithRest<Schema.Struct<{
293
357
  export declare const decodeKnownErrorEvent: (event: Event) => Effect.Effect<{
294
358
  readonly [x: string]: unknown;
295
359
  readonly type: "error";
296
- readonly error?: {
297
- readonly type?: string | null | undefined;
298
- readonly code?: string | null | undefined;
299
- readonly message?: string | null | undefined;
300
- readonly param?: string | null | undefined;
301
- } | null | undefined;
302
360
  readonly status?: number | undefined;
303
361
  readonly code?: string | null | undefined;
304
362
  readonly message?: string | undefined;
305
363
  readonly headers?: {
306
364
  readonly [x: string]: string | number | boolean;
307
365
  } | undefined;
366
+ readonly error?: {
367
+ readonly type?: string | null | undefined;
368
+ readonly code?: string | null | undefined;
369
+ readonly message?: string | null | undefined;
370
+ readonly param?: string | null | undefined;
371
+ } | null | undefined;
308
372
  readonly param?: string | null | undefined;
309
373
  readonly status_code?: number | undefined;
310
374
  }, Schema.SchemaError, never>;
@@ -400,21 +464,32 @@ export declare const lowerTool: (protocolName: string, tool: ToolDefinition, inp
400
464
  };
401
465
  strict: boolean;
402
466
  }, AIError, never>;
403
- export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"required" | "none" | "auto" | {
467
+ export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"required" | "auto" | "none" | {
404
468
  type: "function";
405
469
  name: string;
406
470
  }, AIError, never>;
407
471
  export declare const fromRequestWithExtension: (request: LLMRequest, extension: Extension) => Effect.Effect<{
472
+ truncation?: "auto" | "disabled" | undefined;
473
+ parallel_tool_calls?: boolean | undefined;
474
+ max_tool_calls?: number | undefined;
408
475
  service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
409
476
  text?: {
410
- verbosity: "low" | "medium" | "high";
477
+ verbosity: OpenResponsesOptions.TextVerbosity;
411
478
  } | undefined;
412
479
  reasoning?: {
413
- effort: string | undefined;
480
+ effort: OpenResponsesOptions.ReasoningEffort | undefined;
414
481
  summary: "auto" | "concise" | "detailed" | undefined;
415
482
  } | undefined;
416
- 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;
483
+ include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
417
484
  prompt_cache_key?: string | undefined;
485
+ top_logprobs?: number | undefined;
486
+ stream_options?: {
487
+ include_obfuscation: boolean;
488
+ } | undefined;
489
+ safety_identifier?: string | undefined;
490
+ metadata?: {
491
+ readonly [x: string]: string;
492
+ } | undefined;
418
493
  store?: boolean | undefined;
419
494
  instructions?: string | undefined;
420
495
  model: string & import("effect/Brand").Brand<"AI.ModelID">;
@@ -428,7 +503,14 @@ export declare const fromRequestWithExtension: (request: LLMRequest, extension:
428
503
  };
429
504
  strict: boolean;
430
505
  }[] | undefined;
431
- tool_choice: "required" | "none" | "auto" | {
506
+ tool_choice: "required" | "auto" | "none" | {
507
+ type: "allowed_tools";
508
+ mode: "required" | "auto" | "none";
509
+ tools: {
510
+ type: "function";
511
+ name: string;
512
+ }[];
513
+ } | {
432
514
  type: "function";
433
515
  name: string;
434
516
  } | undefined;
@@ -436,6 +518,8 @@ export declare const fromRequestWithExtension: (request: LLMRequest, extension:
436
518
  max_output_tokens: number | undefined;
437
519
  temperature: number | undefined;
438
520
  top_p: number | undefined;
521
+ presence_penalty: number | undefined;
522
+ frequency_penalty: number | undefined;
439
523
  }, AIError, never>;
440
524
  export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
441
525
  readonly input: readonly ({
@@ -452,6 +536,9 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
452
536
  } | {
453
537
  readonly role: "system";
454
538
  readonly content: string;
539
+ } | {
540
+ readonly role: "developer";
541
+ readonly content: string;
455
542
  } | {
456
543
  readonly role: "user";
457
544
  readonly content: readonly ({
@@ -467,17 +554,20 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
467
554
  readonly text: string;
468
555
  })[];
469
556
  } | {
557
+ readonly type: "message";
470
558
  readonly content: readonly {
471
559
  readonly type: "output_text";
472
560
  readonly text: string;
473
561
  }[];
474
562
  readonly role: "assistant";
563
+ readonly id?: string | undefined;
475
564
  readonly phase?: "commentary" | "final_answer" | undefined;
476
565
  } | {
477
566
  readonly type: "function_call";
478
- readonly call_id: string;
479
567
  readonly name: string;
480
568
  readonly arguments: string;
569
+ readonly call_id: string;
570
+ readonly id?: string | undefined;
481
571
  } | {
482
572
  readonly type: "function_call_output";
483
573
  readonly call_id: string;
@@ -496,10 +586,13 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
496
586
  })[];
497
587
  readonly model: string;
498
588
  readonly stream: true;
589
+ readonly metadata?: {
590
+ readonly [x: string]: string;
591
+ } | undefined;
499
592
  readonly instructions?: string | undefined;
500
593
  readonly reasoning?: {
501
594
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
502
- readonly effort?: string | undefined;
595
+ readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
503
596
  } | undefined;
504
597
  readonly tools?: readonly {
505
598
  readonly type: "function";
@@ -511,19 +604,36 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
511
604
  readonly strict?: boolean | undefined;
512
605
  }[] | undefined;
513
606
  readonly text?: {
514
- readonly verbosity?: "low" | "medium" | "high" | undefined;
607
+ readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
515
608
  } | undefined;
516
609
  readonly temperature?: number | undefined;
517
- readonly tool_choice?: "required" | "none" | "auto" | {
610
+ readonly tool_choice?: "required" | "auto" | "none" | {
518
611
  readonly type: "function";
519
612
  readonly name: string;
613
+ } | {
614
+ readonly type: "allowed_tools";
615
+ readonly mode: "required" | "auto" | "none";
616
+ readonly tools: readonly {
617
+ readonly type: "function";
618
+ readonly name: string;
619
+ }[];
520
620
  } | undefined;
521
621
  readonly top_p?: number | undefined;
522
- 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;
523
622
  readonly store?: boolean | undefined;
623
+ readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
624
+ readonly truncation?: "auto" | "disabled" | undefined;
625
+ readonly stream_options?: {
626
+ readonly include_obfuscation?: boolean | undefined;
627
+ } | undefined;
524
628
  readonly prompt_cache_key?: string | undefined;
629
+ readonly frequency_penalty?: number | undefined;
630
+ readonly presence_penalty?: number | undefined;
631
+ readonly safety_identifier?: string | undefined;
632
+ readonly top_logprobs?: number | undefined;
525
633
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
526
634
  readonly max_output_tokens?: number | undefined;
635
+ readonly max_tool_calls?: number | undefined;
636
+ readonly parallel_tool_calls?: boolean | undefined;
527
637
  }, AIError, never>;
528
638
  export declare const providerMetadata: (state: ParserState, metadata: Record<string, unknown>) => ProviderMetadata;
529
639
  export type StepResult = readonly [ParserState, ReadonlyArray<LLMEvent>];
@@ -733,6 +843,9 @@ export declare const protocol: Protocol<{
733
843
  } | {
734
844
  readonly role: "system";
735
845
  readonly content: string;
846
+ } | {
847
+ readonly role: "developer";
848
+ readonly content: string;
736
849
  } | {
737
850
  readonly role: "user";
738
851
  readonly content: readonly ({
@@ -748,17 +861,20 @@ export declare const protocol: Protocol<{
748
861
  readonly text: string;
749
862
  })[];
750
863
  } | {
864
+ readonly type: "message";
751
865
  readonly content: readonly {
752
866
  readonly type: "output_text";
753
867
  readonly text: string;
754
868
  }[];
755
869
  readonly role: "assistant";
870
+ readonly id?: string | undefined;
756
871
  readonly phase?: "commentary" | "final_answer" | undefined;
757
872
  } | {
758
873
  readonly type: "function_call";
759
- readonly call_id: string;
760
874
  readonly name: string;
761
875
  readonly arguments: string;
876
+ readonly call_id: string;
877
+ readonly id?: string | undefined;
762
878
  } | {
763
879
  readonly type: "function_call_output";
764
880
  readonly call_id: string;
@@ -777,10 +893,13 @@ export declare const protocol: Protocol<{
777
893
  })[];
778
894
  readonly model: string;
779
895
  readonly stream: true;
896
+ readonly metadata?: {
897
+ readonly [x: string]: string;
898
+ } | undefined;
780
899
  readonly instructions?: string | undefined;
781
900
  readonly reasoning?: {
782
901
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
783
- readonly effort?: string | undefined;
902
+ readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
784
903
  } | undefined;
785
904
  readonly tools?: readonly {
786
905
  readonly type: "function";
@@ -792,33 +911,50 @@ export declare const protocol: Protocol<{
792
911
  readonly strict?: boolean | undefined;
793
912
  }[] | undefined;
794
913
  readonly text?: {
795
- readonly verbosity?: "low" | "medium" | "high" | undefined;
914
+ readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
796
915
  } | undefined;
797
916
  readonly temperature?: number | undefined;
798
- readonly tool_choice?: "required" | "none" | "auto" | {
917
+ readonly tool_choice?: "required" | "auto" | "none" | {
799
918
  readonly type: "function";
800
919
  readonly name: string;
920
+ } | {
921
+ readonly type: "allowed_tools";
922
+ readonly mode: "required" | "auto" | "none";
923
+ readonly tools: readonly {
924
+ readonly type: "function";
925
+ readonly name: string;
926
+ }[];
801
927
  } | undefined;
802
928
  readonly top_p?: number | undefined;
803
- 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;
804
929
  readonly store?: boolean | undefined;
930
+ readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
931
+ readonly truncation?: "auto" | "disabled" | undefined;
932
+ readonly stream_options?: {
933
+ readonly include_obfuscation?: boolean | undefined;
934
+ } | undefined;
805
935
  readonly prompt_cache_key?: string | undefined;
936
+ readonly frequency_penalty?: number | undefined;
937
+ readonly presence_penalty?: number | undefined;
938
+ readonly safety_identifier?: string | undefined;
939
+ readonly top_logprobs?: number | undefined;
806
940
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
807
941
  readonly max_output_tokens?: number | undefined;
942
+ readonly max_tool_calls?: number | undefined;
943
+ readonly parallel_tool_calls?: boolean | undefined;
808
944
  }, string, {
809
945
  readonly [x: string]: unknown;
810
946
  readonly type: string;
947
+ readonly status?: unknown;
948
+ readonly code?: string | null | undefined;
949
+ readonly message?: string | undefined;
950
+ readonly headers?: unknown;
951
+ readonly text?: string | undefined;
811
952
  readonly error?: {
812
953
  readonly type?: string | null | undefined;
813
954
  readonly code?: string | null | undefined;
814
955
  readonly message?: string | null | undefined;
815
956
  readonly param?: string | null | undefined;
816
957
  } | null | undefined;
817
- readonly status?: unknown;
818
- readonly code?: string | null | undefined;
819
- readonly message?: string | undefined;
820
- readonly headers?: unknown;
821
- readonly text?: string | undefined;
822
958
  readonly item?: {
823
959
  readonly [x: string]: unknown;
824
960
  readonly type: string;
@@ -831,13 +967,13 @@ export declare const protocol: Protocol<{
831
967
  readonly delta?: string | undefined;
832
968
  readonly response?: {
833
969
  readonly [x: string]: unknown;
970
+ readonly id?: string | undefined;
834
971
  readonly error?: {
835
972
  readonly type?: string | null | undefined;
836
973
  readonly code?: string | null | undefined;
837
974
  readonly message?: string | null | undefined;
838
975
  readonly param?: string | null | undefined;
839
976
  } | null | undefined;
840
- readonly id?: string | undefined;
841
977
  readonly usage?: {
842
978
  readonly input_tokens?: number | undefined;
843
979
  readonly output_tokens?: number | undefined;
@@ -875,6 +1011,9 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
875
1011
  } | {
876
1012
  readonly role: "system";
877
1013
  readonly content: string;
1014
+ } | {
1015
+ readonly role: "developer";
1016
+ readonly content: string;
878
1017
  } | {
879
1018
  readonly role: "user";
880
1019
  readonly content: readonly ({
@@ -890,17 +1029,20 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
890
1029
  readonly text: string;
891
1030
  })[];
892
1031
  } | {
1032
+ readonly type: "message";
893
1033
  readonly content: readonly {
894
1034
  readonly type: "output_text";
895
1035
  readonly text: string;
896
1036
  }[];
897
1037
  readonly role: "assistant";
1038
+ readonly id?: string | undefined;
898
1039
  readonly phase?: "commentary" | "final_answer" | undefined;
899
1040
  } | {
900
1041
  readonly type: "function_call";
901
- readonly call_id: string;
902
1042
  readonly name: string;
903
1043
  readonly arguments: string;
1044
+ readonly call_id: string;
1045
+ readonly id?: string | undefined;
904
1046
  } | {
905
1047
  readonly type: "function_call_output";
906
1048
  readonly call_id: string;
@@ -919,10 +1061,13 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
919
1061
  })[];
920
1062
  readonly model: string;
921
1063
  readonly stream: true;
1064
+ readonly metadata?: {
1065
+ readonly [x: string]: string;
1066
+ } | undefined;
922
1067
  readonly instructions?: string | undefined;
923
1068
  readonly reasoning?: {
924
1069
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
925
- readonly effort?: string | undefined;
1070
+ readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
926
1071
  } | undefined;
927
1072
  readonly tools?: readonly {
928
1073
  readonly type: "function";
@@ -934,18 +1079,35 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
934
1079
  readonly strict?: boolean | undefined;
935
1080
  }[] | undefined;
936
1081
  readonly text?: {
937
- readonly verbosity?: "low" | "medium" | "high" | undefined;
1082
+ readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
938
1083
  } | undefined;
939
1084
  readonly temperature?: number | undefined;
940
- readonly tool_choice?: "required" | "none" | "auto" | {
1085
+ readonly tool_choice?: "required" | "auto" | "none" | {
941
1086
  readonly type: "function";
942
1087
  readonly name: string;
1088
+ } | {
1089
+ readonly type: "allowed_tools";
1090
+ readonly mode: "required" | "auto" | "none";
1091
+ readonly tools: readonly {
1092
+ readonly type: "function";
1093
+ readonly name: string;
1094
+ }[];
943
1095
  } | undefined;
944
1096
  readonly top_p?: number | undefined;
945
- 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;
946
1097
  readonly store?: boolean | undefined;
1098
+ readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
1099
+ readonly truncation?: "auto" | "disabled" | undefined;
1100
+ readonly stream_options?: {
1101
+ readonly include_obfuscation?: boolean | undefined;
1102
+ } | undefined;
947
1103
  readonly prompt_cache_key?: string | undefined;
1104
+ readonly frequency_penalty?: number | undefined;
1105
+ readonly presence_penalty?: number | undefined;
1106
+ readonly safety_identifier?: string | undefined;
1107
+ readonly top_logprobs?: number | undefined;
948
1108
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
949
1109
  readonly max_output_tokens?: number | undefined;
1110
+ readonly max_tool_calls?: number | undefined;
1111
+ readonly parallel_tool_calls?: boolean | undefined;
950
1112
  }, string>;
951
1113
  export * as OpenResponses from "./open-responses.js";