@opencode-ai/ai 0.0.0-beta-17639 → 0.0.0-beta-17728
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.
- package/README.md +17 -6
- package/dist/cache-policy.js +3 -5
- package/dist/protocols/anthropic-messages.d.ts +26 -28
- package/dist/protocols/anthropic-messages.js +5 -5
- package/dist/protocols/gemini.d.ts +5 -9
- package/dist/protocols/gemini.js +5 -4
- package/dist/protocols/open-responses.d.ts +176 -38
- package/dist/protocols/open-responses.js +108 -33
- package/dist/protocols/openai-chat.d.ts +17 -15
- package/dist/protocols/openai-chat.js +8 -2
- package/dist/protocols/openai-compatible-chat.d.ts +3 -3
- package/dist/protocols/openai-compatible-responses.d.ts +27 -5
- package/dist/protocols/openai-responses.d.ts +151 -33
- package/dist/protocols/openai-responses.js +4 -2
- package/dist/protocols/shared.d.ts +8 -14
- package/dist/protocols/shared.js +8 -14
- package/dist/protocols/utils/bedrock-cache.js +3 -4
- package/dist/protocols/utils/cache.js +3 -6
- package/dist/protocols/utils/open-responses-options.d.ts +46 -15
- package/dist/protocols/utils/open-responses-options.js +38 -25
- package/dist/protocols/utils/openai-options.d.ts +7 -5
- package/dist/protocols/utils/openai-options.js +3 -3
- package/dist/provider-package.d.ts +0 -5
- package/dist/providers/amazon-bedrock-mantle.d.ts +43 -19
- package/dist/providers/amazon-bedrock-mantle.js +0 -1
- package/dist/providers/amazon-bedrock.d.ts +3 -9
- package/dist/providers/amazon-bedrock.js +0 -1
- package/dist/providers/anthropic-compatible.d.ts +11 -11
- package/dist/providers/anthropic-compatible.js +0 -1
- package/dist/providers/anthropic.d.ts +12 -12
- package/dist/providers/anthropic.js +0 -1
- package/dist/providers/azure.d.ts +40 -16
- package/dist/providers/azure.js +0 -1
- package/dist/providers/cloudflare.d.ts +11 -11
- package/dist/providers/google-vertex-chat.d.ts +5 -5
- package/dist/providers/google-vertex-chat.js +0 -1
- package/dist/providers/google-vertex-messages.d.ts +11 -11
- package/dist/providers/google-vertex-messages.js +0 -1
- package/dist/providers/google-vertex-responses.d.ts +29 -7
- package/dist/providers/google-vertex-responses.js +1 -2
- package/dist/providers/google-vertex.d.ts +5 -7
- package/dist/providers/google-vertex.js +1 -2
- package/dist/providers/google.d.ts +4 -4
- package/dist/providers/google.js +0 -1
- package/dist/providers/open-responses-options.d.ts +3 -14
- package/dist/providers/openai-compatible-responses.d.ts +29 -7
- package/dist/providers/openai-compatible-responses.js +0 -1
- package/dist/providers/openai-compatible.d.ts +13 -12
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +2 -4
- package/dist/providers/openai-options.js +3 -3
- package/dist/providers/openai.d.ts +44 -20
- package/dist/providers/openai.js +0 -1
- package/dist/providers/openrouter.d.ts +16 -17
- package/dist/providers/openrouter.js +1 -2
- package/dist/providers/xai.d.ts +46 -24
- package/dist/providers/xai.js +1 -2
- package/dist/route/client.d.ts +2 -6
- package/dist/route/client.js +1 -2
- package/dist/route/framing.d.ts +2 -2
- package/dist/route/protocol.d.ts +1 -2
- package/dist/route/protocol.js +1 -2
- package/dist/schema/errors.js +2 -1
- package/dist/schema/events.d.ts +5 -3
- package/dist/schema/events.js +5 -2
- package/dist/schema/ids.d.ts +0 -13
- package/dist/schema/ids.js +0 -9
- package/dist/schema/messages.d.ts +7 -7
- package/dist/schema/messages.js +5 -2
- package/dist/schema/options.d.ts +6 -22
- package/dist/schema/options.js +6 -30
- 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";
|
|
@@ -39,6 +40,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
|
|
|
39
40
|
readonly mime_type: Schema.optional<Schema.String>;
|
|
40
41
|
}>]>]>>;
|
|
41
42
|
}>, Schema.Struct<{
|
|
43
|
+
readonly type: Schema.tag<"message">;
|
|
44
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
42
45
|
readonly role: Schema.tag<"assistant">;
|
|
43
46
|
readonly content: Schema.$Array<Schema.Struct<{
|
|
44
47
|
readonly type: Schema.tag<"output_text">;
|
|
@@ -58,6 +61,7 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
|
|
|
58
61
|
readonly id: Schema.String;
|
|
59
62
|
}>, Schema.Struct<{
|
|
60
63
|
readonly type: Schema.tag<"function_call">;
|
|
64
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
61
65
|
readonly call_id: Schema.String;
|
|
62
66
|
readonly name: Schema.String;
|
|
63
67
|
readonly arguments: Schema.String;
|
|
@@ -79,6 +83,8 @@ export declare const InputItem: Schema.Union<readonly [Schema.Struct<{
|
|
|
79
83
|
}>]>;
|
|
80
84
|
type OpenResponsesInputItem = Schema.Schema.Type<typeof InputItem>;
|
|
81
85
|
type LoweredInputItem = OpenResponsesInputItem | {
|
|
86
|
+
readonly type: "message";
|
|
87
|
+
readonly id?: string;
|
|
82
88
|
readonly role: "assistant";
|
|
83
89
|
readonly content: ReadonlyArray<{
|
|
84
90
|
readonly type: "output_text";
|
|
@@ -96,6 +102,13 @@ export declare const Tool: Schema.Struct<{
|
|
|
96
102
|
export declare const ToolChoice: Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
97
103
|
readonly type: Schema.tag<"function">;
|
|
98
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
|
+
}>>;
|
|
99
112
|
}>]>;
|
|
100
113
|
export declare const coreFields: {
|
|
101
114
|
model: Schema.String;
|
|
@@ -120,6 +133,8 @@ export declare const coreFields: {
|
|
|
120
133
|
readonly mime_type: Schema.optional<Schema.String>;
|
|
121
134
|
}>]>]>>;
|
|
122
135
|
}>, Schema.Struct<{
|
|
136
|
+
readonly type: Schema.tag<"message">;
|
|
137
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
123
138
|
readonly role: Schema.tag<"assistant">;
|
|
124
139
|
readonly content: Schema.$Array<Schema.Struct<{
|
|
125
140
|
readonly type: Schema.tag<"output_text">;
|
|
@@ -139,6 +154,7 @@ export declare const coreFields: {
|
|
|
139
154
|
readonly id: Schema.String;
|
|
140
155
|
}>, Schema.Struct<{
|
|
141
156
|
readonly type: Schema.tag<"function_call">;
|
|
157
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
142
158
|
readonly call_id: Schema.String;
|
|
143
159
|
readonly name: Schema.String;
|
|
144
160
|
readonly arguments: Schema.String;
|
|
@@ -169,22 +185,39 @@ export declare const coreFields: {
|
|
|
169
185
|
tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
170
186
|
readonly type: Schema.tag<"function">;
|
|
171
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
|
+
}>>;
|
|
172
195
|
}>]>>;
|
|
173
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>;
|
|
174
203
|
truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
|
|
175
204
|
service_tier: Schema.optional<Schema.Literals<readonly ["auto", "default", "flex", "priority"]>>;
|
|
176
205
|
prompt_cache_key: Schema.optional<Schema.String>;
|
|
177
|
-
include: Schema.optional<Schema.$Array<Schema.
|
|
206
|
+
include: Schema.optional<Schema.$Array<Schema.declare<OpenResponsesOptions.ResponseIncludable, OpenResponsesOptions.ResponseIncludable>>>;
|
|
178
207
|
reasoning: Schema.optional<Schema.Struct<{
|
|
179
|
-
readonly effort: Schema.optional<Schema.
|
|
208
|
+
readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
180
209
|
readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
|
|
181
210
|
}>>;
|
|
182
211
|
text: Schema.optional<Schema.Struct<{
|
|
183
|
-
readonly verbosity: Schema.optional<Schema.
|
|
212
|
+
readonly verbosity: Schema.optional<Schema.declare<OpenResponsesOptions.TextVerbosity, OpenResponsesOptions.TextVerbosity>>;
|
|
184
213
|
}>>;
|
|
185
214
|
max_output_tokens: Schema.optional<Schema.Number>;
|
|
215
|
+
max_tool_calls: Schema.optional<Schema.Int>;
|
|
216
|
+
parallel_tool_calls: Schema.optional<Schema.Boolean>;
|
|
186
217
|
temperature: Schema.optional<Schema.Number>;
|
|
187
218
|
top_p: Schema.optional<Schema.Number>;
|
|
219
|
+
presence_penalty: Schema.optional<Schema.Number>;
|
|
220
|
+
frequency_penalty: Schema.optional<Schema.Number>;
|
|
188
221
|
};
|
|
189
222
|
declare const OpenResponsesBody: Schema.Struct<{
|
|
190
223
|
readonly stream: Schema.Literal<true>;
|
|
@@ -210,6 +243,8 @@ declare const OpenResponsesBody: Schema.Struct<{
|
|
|
210
243
|
readonly mime_type: Schema.optional<Schema.String>;
|
|
211
244
|
}>]>]>>;
|
|
212
245
|
}>, Schema.Struct<{
|
|
246
|
+
readonly type: Schema.tag<"message">;
|
|
247
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
213
248
|
readonly role: Schema.tag<"assistant">;
|
|
214
249
|
readonly content: Schema.$Array<Schema.Struct<{
|
|
215
250
|
readonly type: Schema.tag<"output_text">;
|
|
@@ -229,6 +264,7 @@ declare const OpenResponsesBody: Schema.Struct<{
|
|
|
229
264
|
readonly id: Schema.String;
|
|
230
265
|
}>, Schema.Struct<{
|
|
231
266
|
readonly type: Schema.tag<"function_call">;
|
|
267
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
232
268
|
readonly call_id: Schema.String;
|
|
233
269
|
readonly name: Schema.String;
|
|
234
270
|
readonly arguments: Schema.String;
|
|
@@ -259,22 +295,39 @@ declare const OpenResponsesBody: Schema.Struct<{
|
|
|
259
295
|
readonly tool_choice: Schema.optional<Schema.Union<readonly [Schema.Literals<readonly ["auto", "none", "required"]>, Schema.Struct<{
|
|
260
296
|
readonly type: Schema.tag<"function">;
|
|
261
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
|
+
}>>;
|
|
262
305
|
}>]>>;
|
|
263
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>;
|
|
264
313
|
readonly truncation: Schema.optional<Schema.Literals<readonly ["auto", "disabled"]>>;
|
|
265
314
|
readonly service_tier: Schema.optional<Schema.Literals<readonly ["auto", "default", "flex", "priority"]>>;
|
|
266
315
|
readonly prompt_cache_key: Schema.optional<Schema.String>;
|
|
267
|
-
readonly include: Schema.optional<Schema.$Array<Schema.
|
|
316
|
+
readonly include: Schema.optional<Schema.$Array<Schema.declare<OpenResponsesOptions.ResponseIncludable, OpenResponsesOptions.ResponseIncludable>>>;
|
|
268
317
|
readonly reasoning: Schema.optional<Schema.Struct<{
|
|
269
|
-
readonly effort: Schema.optional<Schema.
|
|
318
|
+
readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
270
319
|
readonly summary: Schema.optional<Schema.Literals<readonly ["auto", "concise", "detailed"]>>;
|
|
271
320
|
}>>;
|
|
272
321
|
readonly text: Schema.optional<Schema.Struct<{
|
|
273
|
-
readonly verbosity: Schema.optional<Schema.
|
|
322
|
+
readonly verbosity: Schema.optional<Schema.declare<OpenResponsesOptions.TextVerbosity, OpenResponsesOptions.TextVerbosity>>;
|
|
274
323
|
}>>;
|
|
275
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>;
|
|
276
327
|
readonly temperature: Schema.optional<Schema.Number>;
|
|
277
328
|
readonly top_p: Schema.optional<Schema.Number>;
|
|
329
|
+
readonly presence_penalty: Schema.optional<Schema.Number>;
|
|
330
|
+
readonly frequency_penalty: Schema.optional<Schema.Number>;
|
|
278
331
|
}>;
|
|
279
332
|
export type OpenResponsesBody = Schema.Schema.Type<typeof OpenResponsesBody>;
|
|
280
333
|
export declare const StreamItem: Schema.StructWithRest<Schema.Struct<{
|
|
@@ -304,18 +357,18 @@ export declare const WebSocketErrorEvent: Schema.StructWithRest<Schema.Struct<{
|
|
|
304
357
|
export declare const decodeKnownErrorEvent: (event: Event) => Effect.Effect<{
|
|
305
358
|
readonly [x: string]: unknown;
|
|
306
359
|
readonly type: "error";
|
|
307
|
-
readonly error?: {
|
|
308
|
-
readonly type?: string | null | undefined;
|
|
309
|
-
readonly code?: string | null | undefined;
|
|
310
|
-
readonly message?: string | null | undefined;
|
|
311
|
-
readonly param?: string | null | undefined;
|
|
312
|
-
} | null | undefined;
|
|
313
360
|
readonly status?: number | undefined;
|
|
314
361
|
readonly code?: string | null | undefined;
|
|
315
362
|
readonly message?: string | undefined;
|
|
316
363
|
readonly headers?: {
|
|
317
364
|
readonly [x: string]: string | number | boolean;
|
|
318
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;
|
|
319
372
|
readonly param?: string | null | undefined;
|
|
320
373
|
readonly status_code?: number | undefined;
|
|
321
374
|
}, Schema.SchemaError, never>;
|
|
@@ -411,22 +464,32 @@ export declare const lowerTool: (protocolName: string, tool: ToolDefinition, inp
|
|
|
411
464
|
};
|
|
412
465
|
strict: boolean;
|
|
413
466
|
}, AIError, never>;
|
|
414
|
-
export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"required" | "
|
|
467
|
+
export declare const lowerToolChoice: (protocolName: string, toolChoice: NonNullable<LLMRequest["toolChoice"]>) => Effect.Effect<"required" | "auto" | "none" | {
|
|
415
468
|
type: "function";
|
|
416
469
|
name: string;
|
|
417
470
|
}, AIError, never>;
|
|
418
471
|
export declare const fromRequestWithExtension: (request: LLMRequest, extension: Extension) => Effect.Effect<{
|
|
419
472
|
truncation?: "auto" | "disabled" | undefined;
|
|
473
|
+
parallel_tool_calls?: boolean | undefined;
|
|
474
|
+
max_tool_calls?: number | undefined;
|
|
420
475
|
service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
421
476
|
text?: {
|
|
422
|
-
verbosity:
|
|
477
|
+
verbosity: OpenResponsesOptions.TextVerbosity;
|
|
423
478
|
} | undefined;
|
|
424
479
|
reasoning?: {
|
|
425
|
-
effort:
|
|
480
|
+
effort: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
426
481
|
summary: "auto" | "concise" | "detailed" | undefined;
|
|
427
482
|
} | undefined;
|
|
428
|
-
include?: readonly
|
|
483
|
+
include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
429
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;
|
|
430
493
|
store?: boolean | undefined;
|
|
431
494
|
instructions?: string | undefined;
|
|
432
495
|
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
@@ -440,7 +503,14 @@ export declare const fromRequestWithExtension: (request: LLMRequest, extension:
|
|
|
440
503
|
};
|
|
441
504
|
strict: boolean;
|
|
442
505
|
}[] | undefined;
|
|
443
|
-
tool_choice: "required" | "
|
|
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
|
+
} | {
|
|
444
514
|
type: "function";
|
|
445
515
|
name: string;
|
|
446
516
|
} | undefined;
|
|
@@ -448,6 +518,8 @@ export declare const fromRequestWithExtension: (request: LLMRequest, extension:
|
|
|
448
518
|
max_output_tokens: number | undefined;
|
|
449
519
|
temperature: number | undefined;
|
|
450
520
|
top_p: number | undefined;
|
|
521
|
+
presence_penalty: number | undefined;
|
|
522
|
+
frequency_penalty: number | undefined;
|
|
451
523
|
}, AIError, never>;
|
|
452
524
|
export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
453
525
|
readonly input: readonly ({
|
|
@@ -482,17 +554,20 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
482
554
|
readonly text: string;
|
|
483
555
|
})[];
|
|
484
556
|
} | {
|
|
557
|
+
readonly type: "message";
|
|
485
558
|
readonly content: readonly {
|
|
486
559
|
readonly type: "output_text";
|
|
487
560
|
readonly text: string;
|
|
488
561
|
}[];
|
|
489
562
|
readonly role: "assistant";
|
|
563
|
+
readonly id?: string | undefined;
|
|
490
564
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
491
565
|
} | {
|
|
492
566
|
readonly type: "function_call";
|
|
493
|
-
readonly call_id: string;
|
|
494
567
|
readonly name: string;
|
|
495
568
|
readonly arguments: string;
|
|
569
|
+
readonly call_id: string;
|
|
570
|
+
readonly id?: string | undefined;
|
|
496
571
|
} | {
|
|
497
572
|
readonly type: "function_call_output";
|
|
498
573
|
readonly call_id: string;
|
|
@@ -511,10 +586,13 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
511
586
|
})[];
|
|
512
587
|
readonly model: string;
|
|
513
588
|
readonly stream: true;
|
|
589
|
+
readonly metadata?: {
|
|
590
|
+
readonly [x: string]: string;
|
|
591
|
+
} | undefined;
|
|
514
592
|
readonly instructions?: string | undefined;
|
|
515
593
|
readonly reasoning?: {
|
|
516
594
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
517
|
-
readonly effort?:
|
|
595
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
518
596
|
} | undefined;
|
|
519
597
|
readonly tools?: readonly {
|
|
520
598
|
readonly type: "function";
|
|
@@ -526,20 +604,36 @@ export declare const fromRequest: (request: LLMRequest) => Effect.Effect<{
|
|
|
526
604
|
readonly strict?: boolean | undefined;
|
|
527
605
|
}[] | undefined;
|
|
528
606
|
readonly text?: {
|
|
529
|
-
readonly verbosity?:
|
|
607
|
+
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
530
608
|
} | undefined;
|
|
531
609
|
readonly temperature?: number | undefined;
|
|
532
|
-
readonly tool_choice?: "required" | "
|
|
610
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
533
611
|
readonly type: "function";
|
|
534
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
|
+
}[];
|
|
535
620
|
} | undefined;
|
|
536
621
|
readonly top_p?: number | undefined;
|
|
537
|
-
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;
|
|
538
622
|
readonly store?: boolean | undefined;
|
|
623
|
+
readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
539
624
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
625
|
+
readonly stream_options?: {
|
|
626
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
627
|
+
} | undefined;
|
|
540
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;
|
|
541
633
|
readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
542
634
|
readonly max_output_tokens?: number | undefined;
|
|
635
|
+
readonly max_tool_calls?: number | undefined;
|
|
636
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
543
637
|
}, AIError, never>;
|
|
544
638
|
export declare const providerMetadata: (state: ParserState, metadata: Record<string, unknown>) => ProviderMetadata;
|
|
545
639
|
export type StepResult = readonly [ParserState, ReadonlyArray<LLMEvent>];
|
|
@@ -767,17 +861,20 @@ export declare const protocol: Protocol<{
|
|
|
767
861
|
readonly text: string;
|
|
768
862
|
})[];
|
|
769
863
|
} | {
|
|
864
|
+
readonly type: "message";
|
|
770
865
|
readonly content: readonly {
|
|
771
866
|
readonly type: "output_text";
|
|
772
867
|
readonly text: string;
|
|
773
868
|
}[];
|
|
774
869
|
readonly role: "assistant";
|
|
870
|
+
readonly id?: string | undefined;
|
|
775
871
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
776
872
|
} | {
|
|
777
873
|
readonly type: "function_call";
|
|
778
|
-
readonly call_id: string;
|
|
779
874
|
readonly name: string;
|
|
780
875
|
readonly arguments: string;
|
|
876
|
+
readonly call_id: string;
|
|
877
|
+
readonly id?: string | undefined;
|
|
781
878
|
} | {
|
|
782
879
|
readonly type: "function_call_output";
|
|
783
880
|
readonly call_id: string;
|
|
@@ -796,10 +893,13 @@ export declare const protocol: Protocol<{
|
|
|
796
893
|
})[];
|
|
797
894
|
readonly model: string;
|
|
798
895
|
readonly stream: true;
|
|
896
|
+
readonly metadata?: {
|
|
897
|
+
readonly [x: string]: string;
|
|
898
|
+
} | undefined;
|
|
799
899
|
readonly instructions?: string | undefined;
|
|
800
900
|
readonly reasoning?: {
|
|
801
901
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
802
|
-
readonly effort?:
|
|
902
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
803
903
|
} | undefined;
|
|
804
904
|
readonly tools?: readonly {
|
|
805
905
|
readonly type: "function";
|
|
@@ -811,34 +911,50 @@ export declare const protocol: Protocol<{
|
|
|
811
911
|
readonly strict?: boolean | undefined;
|
|
812
912
|
}[] | undefined;
|
|
813
913
|
readonly text?: {
|
|
814
|
-
readonly verbosity?:
|
|
914
|
+
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
815
915
|
} | undefined;
|
|
816
916
|
readonly temperature?: number | undefined;
|
|
817
|
-
readonly tool_choice?: "required" | "
|
|
917
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
818
918
|
readonly type: "function";
|
|
819
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
|
+
}[];
|
|
820
927
|
} | undefined;
|
|
821
928
|
readonly top_p?: number | undefined;
|
|
822
|
-
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;
|
|
823
929
|
readonly store?: boolean | undefined;
|
|
930
|
+
readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
824
931
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
932
|
+
readonly stream_options?: {
|
|
933
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
934
|
+
} | undefined;
|
|
825
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;
|
|
826
940
|
readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
827
941
|
readonly max_output_tokens?: number | undefined;
|
|
942
|
+
readonly max_tool_calls?: number | undefined;
|
|
943
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
828
944
|
}, string, {
|
|
829
945
|
readonly [x: string]: unknown;
|
|
830
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;
|
|
831
952
|
readonly error?: {
|
|
832
953
|
readonly type?: string | null | undefined;
|
|
833
954
|
readonly code?: string | null | undefined;
|
|
834
955
|
readonly message?: string | null | undefined;
|
|
835
956
|
readonly param?: string | null | undefined;
|
|
836
957
|
} | null | undefined;
|
|
837
|
-
readonly status?: unknown;
|
|
838
|
-
readonly code?: string | null | undefined;
|
|
839
|
-
readonly message?: string | undefined;
|
|
840
|
-
readonly headers?: unknown;
|
|
841
|
-
readonly text?: string | undefined;
|
|
842
958
|
readonly item?: {
|
|
843
959
|
readonly [x: string]: unknown;
|
|
844
960
|
readonly type: string;
|
|
@@ -851,13 +967,13 @@ export declare const protocol: Protocol<{
|
|
|
851
967
|
readonly delta?: string | undefined;
|
|
852
968
|
readonly response?: {
|
|
853
969
|
readonly [x: string]: unknown;
|
|
970
|
+
readonly id?: string | undefined;
|
|
854
971
|
readonly error?: {
|
|
855
972
|
readonly type?: string | null | undefined;
|
|
856
973
|
readonly code?: string | null | undefined;
|
|
857
974
|
readonly message?: string | null | undefined;
|
|
858
975
|
readonly param?: string | null | undefined;
|
|
859
976
|
} | null | undefined;
|
|
860
|
-
readonly id?: string | undefined;
|
|
861
977
|
readonly usage?: {
|
|
862
978
|
readonly input_tokens?: number | undefined;
|
|
863
979
|
readonly output_tokens?: number | undefined;
|
|
@@ -913,17 +1029,20 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
913
1029
|
readonly text: string;
|
|
914
1030
|
})[];
|
|
915
1031
|
} | {
|
|
1032
|
+
readonly type: "message";
|
|
916
1033
|
readonly content: readonly {
|
|
917
1034
|
readonly type: "output_text";
|
|
918
1035
|
readonly text: string;
|
|
919
1036
|
}[];
|
|
920
1037
|
readonly role: "assistant";
|
|
1038
|
+
readonly id?: string | undefined;
|
|
921
1039
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
922
1040
|
} | {
|
|
923
1041
|
readonly type: "function_call";
|
|
924
|
-
readonly call_id: string;
|
|
925
1042
|
readonly name: string;
|
|
926
1043
|
readonly arguments: string;
|
|
1044
|
+
readonly call_id: string;
|
|
1045
|
+
readonly id?: string | undefined;
|
|
927
1046
|
} | {
|
|
928
1047
|
readonly type: "function_call_output";
|
|
929
1048
|
readonly call_id: string;
|
|
@@ -942,10 +1061,13 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
942
1061
|
})[];
|
|
943
1062
|
readonly model: string;
|
|
944
1063
|
readonly stream: true;
|
|
1064
|
+
readonly metadata?: {
|
|
1065
|
+
readonly [x: string]: string;
|
|
1066
|
+
} | undefined;
|
|
945
1067
|
readonly instructions?: string | undefined;
|
|
946
1068
|
readonly reasoning?: {
|
|
947
1069
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
948
|
-
readonly effort?:
|
|
1070
|
+
readonly effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
949
1071
|
} | undefined;
|
|
950
1072
|
readonly tools?: readonly {
|
|
951
1073
|
readonly type: "function";
|
|
@@ -957,19 +1079,35 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
957
1079
|
readonly strict?: boolean | undefined;
|
|
958
1080
|
}[] | undefined;
|
|
959
1081
|
readonly text?: {
|
|
960
|
-
readonly verbosity?:
|
|
1082
|
+
readonly verbosity?: OpenResponsesOptions.TextVerbosity | undefined;
|
|
961
1083
|
} | undefined;
|
|
962
1084
|
readonly temperature?: number | undefined;
|
|
963
|
-
readonly tool_choice?: "required" | "
|
|
1085
|
+
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
964
1086
|
readonly type: "function";
|
|
965
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
|
+
}[];
|
|
966
1095
|
} | undefined;
|
|
967
1096
|
readonly top_p?: number | undefined;
|
|
968
|
-
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;
|
|
969
1097
|
readonly store?: boolean | undefined;
|
|
1098
|
+
readonly include?: readonly OpenResponsesOptions.ResponseIncludable[] | undefined;
|
|
970
1099
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
1100
|
+
readonly stream_options?: {
|
|
1101
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
1102
|
+
} | undefined;
|
|
971
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;
|
|
972
1108
|
readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
973
1109
|
readonly max_output_tokens?: number | undefined;
|
|
1110
|
+
readonly max_tool_calls?: number | undefined;
|
|
1111
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
974
1112
|
}, string>;
|
|
975
1113
|
export * as OpenResponses from "./open-responses.js";
|