@better-agent/providers 0.1.0-canary.0
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 +3 -0
- package/dist/anthropic/index.d.mts +1196 -0
- package/dist/anthropic/index.d.mts.map +1 -0
- package/dist/anthropic/index.mjs +1909 -0
- package/dist/anthropic/index.mjs.map +1 -0
- package/dist/fetch-CW0dWlVC.mjs +84 -0
- package/dist/fetch-CW0dWlVC.mjs.map +1 -0
- package/dist/openai/index.d.mts +1629 -0
- package/dist/openai/index.d.mts.map +1 -0
- package/dist/openai/index.mjs +6690 -0
- package/dist/openai/index.mjs.map +1 -0
- package/dist/xai/index.d.mts +382 -0
- package/dist/xai/index.d.mts.map +1 -0
- package/dist/xai/index.mjs +1277 -0
- package/dist/xai/index.mjs.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,1629 @@
|
|
|
1
|
+
import { BetterAgentError } from "@better-agent/shared/errors";
|
|
2
|
+
import { Result } from "@better-agent/shared/neverthrow";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { HostedToolDefinition } from "@better-agent/core";
|
|
5
|
+
import { Capabilities, GenerativeModel, GenerativeModelCallOptions, ModalitiesParam, ModelDescriptor } from "@better-agent/core/providers";
|
|
6
|
+
|
|
7
|
+
//#region src/openai/audio-speech/schemas.d.ts
|
|
8
|
+
declare const OpenAIAudioSpeechModels: z.ZodEnum<{
|
|
9
|
+
"gpt-4o-mini-tts": "gpt-4o-mini-tts";
|
|
10
|
+
"tts-1": "tts-1";
|
|
11
|
+
"tts-1-hd": "tts-1-hd";
|
|
12
|
+
}>;
|
|
13
|
+
type OpenAIAudioSpeechModels = z.infer<typeof OpenAIAudioSpeechModels>;
|
|
14
|
+
declare const CreateSpeechRequest: z.ZodObject<{
|
|
15
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
16
|
+
"gpt-4o-mini-tts": "gpt-4o-mini-tts";
|
|
17
|
+
"tts-1": "tts-1";
|
|
18
|
+
"tts-1-hd": "tts-1-hd";
|
|
19
|
+
}>]>;
|
|
20
|
+
input: z.ZodString;
|
|
21
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
22
|
+
voice: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
23
|
+
alloy: "alloy";
|
|
24
|
+
ash: "ash";
|
|
25
|
+
ballad: "ballad";
|
|
26
|
+
coral: "coral";
|
|
27
|
+
echo: "echo";
|
|
28
|
+
sage: "sage";
|
|
29
|
+
shimmer: "shimmer";
|
|
30
|
+
verse: "verse";
|
|
31
|
+
fable: "fable";
|
|
32
|
+
onyx: "onyx";
|
|
33
|
+
nova: "nova";
|
|
34
|
+
}>]>;
|
|
35
|
+
response_format: z.ZodDefault<z.ZodEnum<{
|
|
36
|
+
mp3: "mp3";
|
|
37
|
+
opus: "opus";
|
|
38
|
+
aac: "aac";
|
|
39
|
+
flac: "flac";
|
|
40
|
+
wav: "wav";
|
|
41
|
+
pcm: "pcm";
|
|
42
|
+
}>>;
|
|
43
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
stream_format: z.ZodDefault<z.ZodEnum<{
|
|
45
|
+
audio: "audio";
|
|
46
|
+
sse: "sse";
|
|
47
|
+
}>>;
|
|
48
|
+
stream: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull]>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type OpenAICreateSpeechRequest = z.input<typeof CreateSpeechRequest>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/openai/audio-speech/types.d.ts
|
|
53
|
+
type OpenAIAudioSpeechCaps = {
|
|
54
|
+
inputModalities: {
|
|
55
|
+
text: true;
|
|
56
|
+
};
|
|
57
|
+
inputShape: "prompt";
|
|
58
|
+
replayMode: "single_turn_persistent";
|
|
59
|
+
supportsInstruction: false;
|
|
60
|
+
tools: false;
|
|
61
|
+
outputModalities: {
|
|
62
|
+
audio: true;
|
|
63
|
+
};
|
|
64
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
65
|
+
};
|
|
66
|
+
type OpenAIAudioSpeechEndpointOptions = {
|
|
67
|
+
instructions?: OpenAICreateSpeechRequest["instructions"];
|
|
68
|
+
voice?: OpenAICreateSpeechRequest["voice"];
|
|
69
|
+
response_format?: OpenAICreateSpeechRequest["response_format"];
|
|
70
|
+
speed?: OpenAICreateSpeechRequest["speed"];
|
|
71
|
+
stream_format?: OpenAICreateSpeechRequest["stream_format"];
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/openai/audio-transcription/schemas.d.ts
|
|
75
|
+
declare const OpenAIAudioTranscriptionModels: z.ZodEnum<{
|
|
76
|
+
"gpt-4o-transcribe": "gpt-4o-transcribe";
|
|
77
|
+
"gpt-4o-mini-transcribe": "gpt-4o-mini-transcribe";
|
|
78
|
+
"whisper-1": "whisper-1";
|
|
79
|
+
"gpt-4o-transcribe-diarize": "gpt-4o-transcribe-diarize";
|
|
80
|
+
}>;
|
|
81
|
+
type OpenAIAudioTranscriptionModels = z.infer<typeof OpenAIAudioTranscriptionModels>;
|
|
82
|
+
declare const CreateTranscriptionRequest: z.ZodObject<{
|
|
83
|
+
file: z.ZodString;
|
|
84
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
85
|
+
"gpt-4o-transcribe": "gpt-4o-transcribe";
|
|
86
|
+
"gpt-4o-mini-transcribe": "gpt-4o-mini-transcribe";
|
|
87
|
+
"whisper-1": "whisper-1";
|
|
88
|
+
"gpt-4o-transcribe-diarize": "gpt-4o-transcribe-diarize";
|
|
89
|
+
}>]>;
|
|
90
|
+
language: z.ZodOptional<z.ZodString>;
|
|
91
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
92
|
+
response_format: z.ZodDefault<z.ZodEnum<{
|
|
93
|
+
text: "text";
|
|
94
|
+
json: "json";
|
|
95
|
+
srt: "srt";
|
|
96
|
+
verbose_json: "verbose_json";
|
|
97
|
+
vtt: "vtt";
|
|
98
|
+
diarized_json: "diarized_json";
|
|
99
|
+
}>>;
|
|
100
|
+
temperature: z.ZodDefault<z.ZodNumber>;
|
|
101
|
+
include: z.ZodOptional<z.ZodArray<z.ZodLiteral<"logprobs">>>;
|
|
102
|
+
timestamp_granularities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
103
|
+
word: "word";
|
|
104
|
+
segment: "segment";
|
|
105
|
+
}>>>;
|
|
106
|
+
stream: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
107
|
+
chunking_strategy: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDefault<z.ZodLiteral<"auto">>, z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"server_vad">;
|
|
109
|
+
prefix_padding_ms: z.ZodDefault<z.ZodNumber>;
|
|
110
|
+
silence_duration_ms: z.ZodDefault<z.ZodNumber>;
|
|
111
|
+
threshold: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
}, z.core.$strict>]>, z.ZodNull]>>;
|
|
113
|
+
known_speaker_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
+
known_speaker_references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
type OpenAICreateTranscriptionRequest = z.input<typeof CreateTranscriptionRequest>;
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/openai/audio-transcription/types.d.ts
|
|
119
|
+
type OpenAIAudioTranscriptionCaps = {
|
|
120
|
+
inputModalities: {
|
|
121
|
+
audio: true;
|
|
122
|
+
};
|
|
123
|
+
inputShape: "prompt";
|
|
124
|
+
replayMode: "single_turn_persistent";
|
|
125
|
+
supportsInstruction: false;
|
|
126
|
+
outputModalities: {
|
|
127
|
+
text: true;
|
|
128
|
+
};
|
|
129
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
130
|
+
};
|
|
131
|
+
type OpenAIAudioTranscriptionEndpointOptions = {
|
|
132
|
+
language?: OpenAICreateTranscriptionRequest["language"];
|
|
133
|
+
prompt?: OpenAICreateTranscriptionRequest["prompt"];
|
|
134
|
+
response_format?: OpenAICreateTranscriptionRequest["response_format"];
|
|
135
|
+
temperature?: OpenAICreateTranscriptionRequest["temperature"];
|
|
136
|
+
include?: OpenAICreateTranscriptionRequest["include"];
|
|
137
|
+
timestamp_granularities?: OpenAICreateTranscriptionRequest["timestamp_granularities"];
|
|
138
|
+
stream?: OpenAICreateTranscriptionRequest["stream"];
|
|
139
|
+
chunking_strategy?: OpenAICreateTranscriptionRequest["chunking_strategy"];
|
|
140
|
+
known_speaker_names?: OpenAICreateTranscriptionRequest["known_speaker_names"];
|
|
141
|
+
known_speaker_references?: OpenAICreateTranscriptionRequest["known_speaker_references"];
|
|
142
|
+
};
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/openai/embeddings/schemas.d.ts
|
|
145
|
+
declare const OpenAIEmbeddingModels: z.ZodEnum<{
|
|
146
|
+
"text-embedding-3-small": "text-embedding-3-small";
|
|
147
|
+
"text-embedding-3-large": "text-embedding-3-large";
|
|
148
|
+
"text-embedding-ada-002": "text-embedding-ada-002";
|
|
149
|
+
}>;
|
|
150
|
+
type OpenAIEmbeddingModels = z.infer<typeof OpenAIEmbeddingModels>;
|
|
151
|
+
declare const CreateEmbeddingRequest: z.ZodObject<{
|
|
152
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDefault<z.ZodString>>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>;
|
|
153
|
+
model: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
154
|
+
"text-embedding-3-small": "text-embedding-3-small";
|
|
155
|
+
"text-embedding-3-large": "text-embedding-3-large";
|
|
156
|
+
"text-embedding-ada-002": "text-embedding-ada-002";
|
|
157
|
+
}>]>;
|
|
158
|
+
encoding_format: z.ZodDefault<z.ZodEnum<{
|
|
159
|
+
base64: "base64";
|
|
160
|
+
float: "float";
|
|
161
|
+
}>>;
|
|
162
|
+
dimensions: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
user: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
type OpenAICreateEmbeddingRequest = z.input<typeof CreateEmbeddingRequest>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/openai/embeddings/types.d.ts
|
|
168
|
+
type OpenAIEmbeddingCaps = {
|
|
169
|
+
inputModalities: {
|
|
170
|
+
text: true;
|
|
171
|
+
};
|
|
172
|
+
inputShape: "prompt";
|
|
173
|
+
replayMode: "single_turn_persistent";
|
|
174
|
+
supportsInstruction: false;
|
|
175
|
+
outputModalities: {
|
|
176
|
+
embedding: true;
|
|
177
|
+
};
|
|
178
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
179
|
+
};
|
|
180
|
+
type OpenAIEmbeddingEndpointOptions = Omit<OpenAICreateEmbeddingRequest, "input">;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/openai/images/schemas.d.ts
|
|
183
|
+
declare const OpenAIImageModels: z.ZodEnum<{
|
|
184
|
+
"dall-e-2": "dall-e-2";
|
|
185
|
+
"dall-e-3": "dall-e-3";
|
|
186
|
+
"gpt-image-1": "gpt-image-1";
|
|
187
|
+
"gpt-image-1-mini": "gpt-image-1-mini";
|
|
188
|
+
}>;
|
|
189
|
+
type OpenAIImageModels = z.infer<typeof OpenAIImageModels>;
|
|
190
|
+
declare const OpenAICreateImageSchema: z.ZodObject<{
|
|
191
|
+
prompt: z.ZodString;
|
|
192
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
193
|
+
"dall-e-2": "dall-e-2";
|
|
194
|
+
"dall-e-3": "dall-e-3";
|
|
195
|
+
"gpt-image-1": "gpt-image-1";
|
|
196
|
+
"gpt-image-1-mini": "gpt-image-1-mini";
|
|
197
|
+
}>]>>;
|
|
198
|
+
n: z.ZodDefault<z.ZodNumber>;
|
|
199
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
200
|
+
low: "low";
|
|
201
|
+
medium: "medium";
|
|
202
|
+
high: "high";
|
|
203
|
+
standard: "standard";
|
|
204
|
+
auto: "auto";
|
|
205
|
+
hd: "hd";
|
|
206
|
+
}>>;
|
|
207
|
+
response_format: z.ZodDefault<z.ZodEnum<{
|
|
208
|
+
url: "url";
|
|
209
|
+
b64_json: "b64_json";
|
|
210
|
+
}>>;
|
|
211
|
+
output_format: z.ZodDefault<z.ZodEnum<{
|
|
212
|
+
png: "png";
|
|
213
|
+
jpeg: "jpeg";
|
|
214
|
+
webp: "webp";
|
|
215
|
+
}>>;
|
|
216
|
+
output_compression: z.ZodDefault<z.ZodNumber>;
|
|
217
|
+
stream: z.ZodDefault<z.ZodBoolean>;
|
|
218
|
+
partial_images: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodNumber>, z.ZodNull]>>;
|
|
219
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
220
|
+
auto: "auto";
|
|
221
|
+
"1024x1024": "1024x1024";
|
|
222
|
+
"1536x1024": "1536x1024";
|
|
223
|
+
"1024x1536": "1024x1536";
|
|
224
|
+
"256x256": "256x256";
|
|
225
|
+
"512x512": "512x512";
|
|
226
|
+
"1792x1024": "1792x1024";
|
|
227
|
+
"1024x1792": "1024x1792";
|
|
228
|
+
}>>;
|
|
229
|
+
moderation: z.ZodDefault<z.ZodEnum<{
|
|
230
|
+
low: "low";
|
|
231
|
+
auto: "auto";
|
|
232
|
+
}>>;
|
|
233
|
+
background: z.ZodDefault<z.ZodEnum<{
|
|
234
|
+
auto: "auto";
|
|
235
|
+
transparent: "transparent";
|
|
236
|
+
opaque: "opaque";
|
|
237
|
+
}>>;
|
|
238
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
239
|
+
vivid: "vivid";
|
|
240
|
+
natural: "natural";
|
|
241
|
+
}>>;
|
|
242
|
+
user: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
declare const OpenAIEditImageSchema: z.ZodObject<{
|
|
245
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
246
|
+
"dall-e-2": "dall-e-2";
|
|
247
|
+
"dall-e-3": "dall-e-3";
|
|
248
|
+
"gpt-image-1": "gpt-image-1";
|
|
249
|
+
"gpt-image-1-mini": "gpt-image-1-mini";
|
|
250
|
+
}>]>>;
|
|
251
|
+
prompt: z.ZodString;
|
|
252
|
+
images: z.ZodArray<z.ZodObject<{
|
|
253
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
254
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
size: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
257
|
+
auto: "auto";
|
|
258
|
+
"1024x1024": "1024x1024";
|
|
259
|
+
"1536x1024": "1536x1024";
|
|
260
|
+
"1024x1536": "1024x1536";
|
|
261
|
+
"256x256": "256x256";
|
|
262
|
+
"512x512": "512x512";
|
|
263
|
+
"1792x1024": "1792x1024";
|
|
264
|
+
"1024x1792": "1024x1792";
|
|
265
|
+
}>>>;
|
|
266
|
+
quality: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
267
|
+
low: "low";
|
|
268
|
+
medium: "medium";
|
|
269
|
+
high: "high";
|
|
270
|
+
standard: "standard";
|
|
271
|
+
auto: "auto";
|
|
272
|
+
hd: "hd";
|
|
273
|
+
}>>>;
|
|
274
|
+
response_format: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
275
|
+
url: "url";
|
|
276
|
+
b64_json: "b64_json";
|
|
277
|
+
}>>>;
|
|
278
|
+
output_format: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
279
|
+
png: "png";
|
|
280
|
+
jpeg: "jpeg";
|
|
281
|
+
webp: "webp";
|
|
282
|
+
}>>>;
|
|
283
|
+
output_compression: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
284
|
+
stream: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
285
|
+
partial_images: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodNumber>, z.ZodNull]>>>;
|
|
286
|
+
moderation: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
287
|
+
low: "low";
|
|
288
|
+
auto: "auto";
|
|
289
|
+
}>>>;
|
|
290
|
+
background: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
291
|
+
auto: "auto";
|
|
292
|
+
transparent: "transparent";
|
|
293
|
+
opaque: "opaque";
|
|
294
|
+
}>>>;
|
|
295
|
+
user: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
296
|
+
input_fidelity: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
low: "low";
|
|
298
|
+
high: "high";
|
|
299
|
+
auto: "auto";
|
|
300
|
+
}>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
type OpenAICreateImageSchema = z.input<typeof OpenAICreateImageSchema>;
|
|
303
|
+
type OpenAIEditImageSchema = z.input<typeof OpenAIEditImageSchema>;
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/openai/images/types.d.ts
|
|
306
|
+
type OpenAIImageCaps = {
|
|
307
|
+
inputModalities: {
|
|
308
|
+
text: true;
|
|
309
|
+
image: true;
|
|
310
|
+
};
|
|
311
|
+
inputShape: "prompt";
|
|
312
|
+
replayMode: "single_turn_persistent";
|
|
313
|
+
supportsInstruction: false;
|
|
314
|
+
outputModalities: {
|
|
315
|
+
image: true;
|
|
316
|
+
};
|
|
317
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
318
|
+
};
|
|
319
|
+
type OpenAIImageEndpointOptions = {
|
|
320
|
+
n?: OpenAICreateImageSchema["n"];
|
|
321
|
+
quality?: OpenAICreateImageSchema["quality"];
|
|
322
|
+
response_format?: OpenAICreateImageSchema["response_format"];
|
|
323
|
+
output_format?: OpenAICreateImageSchema["output_format"];
|
|
324
|
+
output_compression?: OpenAICreateImageSchema["output_compression"];
|
|
325
|
+
stream?: OpenAICreateImageSchema["stream"];
|
|
326
|
+
partial_images?: OpenAICreateImageSchema["partial_images"];
|
|
327
|
+
size?: OpenAICreateImageSchema["size"];
|
|
328
|
+
moderation?: OpenAICreateImageSchema["moderation"];
|
|
329
|
+
background?: OpenAICreateImageSchema["background"];
|
|
330
|
+
style?: OpenAICreateImageSchema["style"];
|
|
331
|
+
input_fidelity?: OpenAIEditImageSchema["input_fidelity"];
|
|
332
|
+
user?: OpenAICreateImageSchema["user"];
|
|
333
|
+
};
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/openai/responses/schemas.d.ts
|
|
336
|
+
type OpenAICreateResponseSchema = z.infer<typeof OpenAICreateResponseSchema>;
|
|
337
|
+
type OpenAIResponseModels = z.infer<typeof OpenAIResponseModels>;
|
|
338
|
+
declare const OpenAIResponseModels: z.ZodEnum<{
|
|
339
|
+
"gpt-5.1": "gpt-5.1";
|
|
340
|
+
"gpt-5.1-2025-11-13": "gpt-5.1-2025-11-13";
|
|
341
|
+
"gpt-5.1-codex": "gpt-5.1-codex";
|
|
342
|
+
"gpt-5.1-codex-mini": "gpt-5.1-codex-mini";
|
|
343
|
+
"gpt-5.1-mini": "gpt-5.1-mini";
|
|
344
|
+
"gpt-5.1-chat-latest": "gpt-5.1-chat-latest";
|
|
345
|
+
"gpt-5": "gpt-5";
|
|
346
|
+
"gpt-5-mini": "gpt-5-mini";
|
|
347
|
+
"gpt-5-nano": "gpt-5-nano";
|
|
348
|
+
"gpt-5-2025-08-07": "gpt-5-2025-08-07";
|
|
349
|
+
"gpt-5-mini-2025-08-07": "gpt-5-mini-2025-08-07";
|
|
350
|
+
"gpt-5-nano-2025-08-07": "gpt-5-nano-2025-08-07";
|
|
351
|
+
"gpt-5-chat-latest": "gpt-5-chat-latest";
|
|
352
|
+
"gpt-5.2": "gpt-5.2";
|
|
353
|
+
"gpt-5.2-2025-12-11": "gpt-5.2-2025-12-11";
|
|
354
|
+
"gpt-5.2-chat-latest": "gpt-5.2-chat-latest";
|
|
355
|
+
"gpt-5.2-pro": "gpt-5.2-pro";
|
|
356
|
+
"gpt-5.2-pro-2025-12-11": "gpt-5.2-pro-2025-12-11";
|
|
357
|
+
"gpt-5.2-codex": "gpt-5.2-codex";
|
|
358
|
+
"gpt-5.3-chat-latest": "gpt-5.3-chat-latest";
|
|
359
|
+
"gpt-5.3-codex": "gpt-5.3-codex";
|
|
360
|
+
"gpt-5.4": "gpt-5.4";
|
|
361
|
+
"gpt-5.4-2026-03-05": "gpt-5.4-2026-03-05";
|
|
362
|
+
"gpt-5.4-mini": "gpt-5.4-mini";
|
|
363
|
+
"gpt-5.4-mini-2026-03-17": "gpt-5.4-mini-2026-03-17";
|
|
364
|
+
"gpt-5.4-nano": "gpt-5.4-nano";
|
|
365
|
+
"gpt-5.4-nano-2026-03-17": "gpt-5.4-nano-2026-03-17";
|
|
366
|
+
"gpt-5.4-pro": "gpt-5.4-pro";
|
|
367
|
+
"gpt-5.4-pro-2026-03-05": "gpt-5.4-pro-2026-03-05";
|
|
368
|
+
"gpt-4.1": "gpt-4.1";
|
|
369
|
+
"gpt-4.1-mini": "gpt-4.1-mini";
|
|
370
|
+
"gpt-4.1-nano": "gpt-4.1-nano";
|
|
371
|
+
"gpt-4.1-2025-04-14": "gpt-4.1-2025-04-14";
|
|
372
|
+
"gpt-4.1-mini-2025-04-14": "gpt-4.1-mini-2025-04-14";
|
|
373
|
+
"gpt-4.1-nano-2025-04-14": "gpt-4.1-nano-2025-04-14";
|
|
374
|
+
"o4-mini": "o4-mini";
|
|
375
|
+
"o4-mini-2025-04-16": "o4-mini-2025-04-16";
|
|
376
|
+
o3: "o3";
|
|
377
|
+
"o3-2025-04-16": "o3-2025-04-16";
|
|
378
|
+
"o3-mini": "o3-mini";
|
|
379
|
+
"o3-mini-2025-01-31": "o3-mini-2025-01-31";
|
|
380
|
+
o1: "o1";
|
|
381
|
+
"o1-2024-12-17": "o1-2024-12-17";
|
|
382
|
+
"o1-preview": "o1-preview";
|
|
383
|
+
"o1-preview-2024-09-12": "o1-preview-2024-09-12";
|
|
384
|
+
"o1-mini": "o1-mini";
|
|
385
|
+
"o1-mini-2024-09-12": "o1-mini-2024-09-12";
|
|
386
|
+
"gpt-4o": "gpt-4o";
|
|
387
|
+
"gpt-4o-2024-11-20": "gpt-4o-2024-11-20";
|
|
388
|
+
"gpt-4o-2024-08-06": "gpt-4o-2024-08-06";
|
|
389
|
+
"gpt-4o-2024-05-13": "gpt-4o-2024-05-13";
|
|
390
|
+
"gpt-4o-audio-preview": "gpt-4o-audio-preview";
|
|
391
|
+
"gpt-4o-audio-preview-2024-10-01": "gpt-4o-audio-preview-2024-10-01";
|
|
392
|
+
"gpt-4o-audio-preview-2024-12-17": "gpt-4o-audio-preview-2024-12-17";
|
|
393
|
+
"gpt-4o-audio-preview-2025-06-03": "gpt-4o-audio-preview-2025-06-03";
|
|
394
|
+
"gpt-4o-mini-audio-preview": "gpt-4o-mini-audio-preview";
|
|
395
|
+
"gpt-4o-mini-audio-preview-2024-12-17": "gpt-4o-mini-audio-preview-2024-12-17";
|
|
396
|
+
"gpt-4o-search-preview": "gpt-4o-search-preview";
|
|
397
|
+
"gpt-4o-mini-search-preview": "gpt-4o-mini-search-preview";
|
|
398
|
+
"gpt-4o-search-preview-2025-03-11": "gpt-4o-search-preview-2025-03-11";
|
|
399
|
+
"gpt-4o-mini-search-preview-2025-03-11": "gpt-4o-mini-search-preview-2025-03-11";
|
|
400
|
+
"chatgpt-4o-latest": "chatgpt-4o-latest";
|
|
401
|
+
"codex-mini-latest": "codex-mini-latest";
|
|
402
|
+
"gpt-4o-mini": "gpt-4o-mini";
|
|
403
|
+
"gpt-4o-mini-2024-07-18": "gpt-4o-mini-2024-07-18";
|
|
404
|
+
"gpt-4-turbo": "gpt-4-turbo";
|
|
405
|
+
"gpt-4-turbo-2024-04-09": "gpt-4-turbo-2024-04-09";
|
|
406
|
+
"gpt-4-0125-preview": "gpt-4-0125-preview";
|
|
407
|
+
"gpt-4-turbo-preview": "gpt-4-turbo-preview";
|
|
408
|
+
"gpt-4-1106-preview": "gpt-4-1106-preview";
|
|
409
|
+
"gpt-4-vision-preview": "gpt-4-vision-preview";
|
|
410
|
+
"gpt-4": "gpt-4";
|
|
411
|
+
"gpt-4-0314": "gpt-4-0314";
|
|
412
|
+
"gpt-4-0613": "gpt-4-0613";
|
|
413
|
+
"gpt-4-32k": "gpt-4-32k";
|
|
414
|
+
"gpt-4-32k-0314": "gpt-4-32k-0314";
|
|
415
|
+
"gpt-4-32k-0613": "gpt-4-32k-0613";
|
|
416
|
+
"gpt-3.5-turbo": "gpt-3.5-turbo";
|
|
417
|
+
"gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k";
|
|
418
|
+
"gpt-3.5-turbo-0301": "gpt-3.5-turbo-0301";
|
|
419
|
+
"gpt-3.5-turbo-0613": "gpt-3.5-turbo-0613";
|
|
420
|
+
"gpt-3.5-turbo-1106": "gpt-3.5-turbo-1106";
|
|
421
|
+
"gpt-3.5-turbo-0125": "gpt-3.5-turbo-0125";
|
|
422
|
+
"gpt-3.5-turbo-16k-0613": "gpt-3.5-turbo-16k-0613";
|
|
423
|
+
"o1-pro": "o1-pro";
|
|
424
|
+
"o1-pro-2025-03-19": "o1-pro-2025-03-19";
|
|
425
|
+
"o3-pro": "o3-pro";
|
|
426
|
+
"o3-pro-2025-06-10": "o3-pro-2025-06-10";
|
|
427
|
+
"o3-deep-research": "o3-deep-research";
|
|
428
|
+
"o3-deep-research-2025-06-26": "o3-deep-research-2025-06-26";
|
|
429
|
+
"o4-mini-deep-research": "o4-mini-deep-research";
|
|
430
|
+
"o4-mini-deep-research-2025-06-26": "o4-mini-deep-research-2025-06-26";
|
|
431
|
+
"computer-use-preview": "computer-use-preview";
|
|
432
|
+
"computer-use-preview-2025-03-11": "computer-use-preview-2025-03-11";
|
|
433
|
+
"gpt-5-codex": "gpt-5-codex";
|
|
434
|
+
"gpt-5-pro": "gpt-5-pro";
|
|
435
|
+
"gpt-5-pro-2025-10-06": "gpt-5-pro-2025-10-06";
|
|
436
|
+
"gpt-5.1-codex-max": "gpt-5.1-codex-max";
|
|
437
|
+
}>;
|
|
438
|
+
declare const OpenAICreateResponseSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
439
|
+
metadata: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodNull]>>;
|
|
440
|
+
top_logprobs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
441
|
+
temperature: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodNumber>, z.ZodNull]>>;
|
|
442
|
+
top_p: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodNumber>, z.ZodNull]>>;
|
|
443
|
+
user: z.ZodOptional<z.ZodString>;
|
|
444
|
+
safety_identifier: z.ZodOptional<z.ZodString>;
|
|
445
|
+
prompt_cache_key: z.ZodOptional<z.ZodString>;
|
|
446
|
+
service_tier: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodEnum<{
|
|
447
|
+
default: "default";
|
|
448
|
+
auto: "auto";
|
|
449
|
+
flex: "flex";
|
|
450
|
+
scale: "scale";
|
|
451
|
+
priority: "priority";
|
|
452
|
+
}>>, z.ZodNull]>>;
|
|
453
|
+
prompt_cache_retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
454
|
+
in_memory: "in_memory";
|
|
455
|
+
"24h": "24h";
|
|
456
|
+
}>, z.ZodNull]>>;
|
|
457
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
458
|
+
top_logprobs: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
460
|
+
previous_response_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
461
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
462
|
+
"gpt-5.1": "gpt-5.1";
|
|
463
|
+
"gpt-5.1-2025-11-13": "gpt-5.1-2025-11-13";
|
|
464
|
+
"gpt-5.1-codex": "gpt-5.1-codex";
|
|
465
|
+
"gpt-5.1-codex-mini": "gpt-5.1-codex-mini";
|
|
466
|
+
"gpt-5.1-mini": "gpt-5.1-mini";
|
|
467
|
+
"gpt-5.1-chat-latest": "gpt-5.1-chat-latest";
|
|
468
|
+
"gpt-5": "gpt-5";
|
|
469
|
+
"gpt-5-mini": "gpt-5-mini";
|
|
470
|
+
"gpt-5-nano": "gpt-5-nano";
|
|
471
|
+
"gpt-5-2025-08-07": "gpt-5-2025-08-07";
|
|
472
|
+
"gpt-5-mini-2025-08-07": "gpt-5-mini-2025-08-07";
|
|
473
|
+
"gpt-5-nano-2025-08-07": "gpt-5-nano-2025-08-07";
|
|
474
|
+
"gpt-5-chat-latest": "gpt-5-chat-latest";
|
|
475
|
+
"gpt-5.2": "gpt-5.2";
|
|
476
|
+
"gpt-5.2-2025-12-11": "gpt-5.2-2025-12-11";
|
|
477
|
+
"gpt-5.2-chat-latest": "gpt-5.2-chat-latest";
|
|
478
|
+
"gpt-5.2-pro": "gpt-5.2-pro";
|
|
479
|
+
"gpt-5.2-pro-2025-12-11": "gpt-5.2-pro-2025-12-11";
|
|
480
|
+
"gpt-5.2-codex": "gpt-5.2-codex";
|
|
481
|
+
"gpt-5.3-chat-latest": "gpt-5.3-chat-latest";
|
|
482
|
+
"gpt-5.3-codex": "gpt-5.3-codex";
|
|
483
|
+
"gpt-5.4": "gpt-5.4";
|
|
484
|
+
"gpt-5.4-2026-03-05": "gpt-5.4-2026-03-05";
|
|
485
|
+
"gpt-5.4-mini": "gpt-5.4-mini";
|
|
486
|
+
"gpt-5.4-mini-2026-03-17": "gpt-5.4-mini-2026-03-17";
|
|
487
|
+
"gpt-5.4-nano": "gpt-5.4-nano";
|
|
488
|
+
"gpt-5.4-nano-2026-03-17": "gpt-5.4-nano-2026-03-17";
|
|
489
|
+
"gpt-5.4-pro": "gpt-5.4-pro";
|
|
490
|
+
"gpt-5.4-pro-2026-03-05": "gpt-5.4-pro-2026-03-05";
|
|
491
|
+
"gpt-4.1": "gpt-4.1";
|
|
492
|
+
"gpt-4.1-mini": "gpt-4.1-mini";
|
|
493
|
+
"gpt-4.1-nano": "gpt-4.1-nano";
|
|
494
|
+
"gpt-4.1-2025-04-14": "gpt-4.1-2025-04-14";
|
|
495
|
+
"gpt-4.1-mini-2025-04-14": "gpt-4.1-mini-2025-04-14";
|
|
496
|
+
"gpt-4.1-nano-2025-04-14": "gpt-4.1-nano-2025-04-14";
|
|
497
|
+
"o4-mini": "o4-mini";
|
|
498
|
+
"o4-mini-2025-04-16": "o4-mini-2025-04-16";
|
|
499
|
+
o3: "o3";
|
|
500
|
+
"o3-2025-04-16": "o3-2025-04-16";
|
|
501
|
+
"o3-mini": "o3-mini";
|
|
502
|
+
"o3-mini-2025-01-31": "o3-mini-2025-01-31";
|
|
503
|
+
o1: "o1";
|
|
504
|
+
"o1-2024-12-17": "o1-2024-12-17";
|
|
505
|
+
"o1-preview": "o1-preview";
|
|
506
|
+
"o1-preview-2024-09-12": "o1-preview-2024-09-12";
|
|
507
|
+
"o1-mini": "o1-mini";
|
|
508
|
+
"o1-mini-2024-09-12": "o1-mini-2024-09-12";
|
|
509
|
+
"gpt-4o": "gpt-4o";
|
|
510
|
+
"gpt-4o-2024-11-20": "gpt-4o-2024-11-20";
|
|
511
|
+
"gpt-4o-2024-08-06": "gpt-4o-2024-08-06";
|
|
512
|
+
"gpt-4o-2024-05-13": "gpt-4o-2024-05-13";
|
|
513
|
+
"gpt-4o-audio-preview": "gpt-4o-audio-preview";
|
|
514
|
+
"gpt-4o-audio-preview-2024-10-01": "gpt-4o-audio-preview-2024-10-01";
|
|
515
|
+
"gpt-4o-audio-preview-2024-12-17": "gpt-4o-audio-preview-2024-12-17";
|
|
516
|
+
"gpt-4o-audio-preview-2025-06-03": "gpt-4o-audio-preview-2025-06-03";
|
|
517
|
+
"gpt-4o-mini-audio-preview": "gpt-4o-mini-audio-preview";
|
|
518
|
+
"gpt-4o-mini-audio-preview-2024-12-17": "gpt-4o-mini-audio-preview-2024-12-17";
|
|
519
|
+
"gpt-4o-search-preview": "gpt-4o-search-preview";
|
|
520
|
+
"gpt-4o-mini-search-preview": "gpt-4o-mini-search-preview";
|
|
521
|
+
"gpt-4o-search-preview-2025-03-11": "gpt-4o-search-preview-2025-03-11";
|
|
522
|
+
"gpt-4o-mini-search-preview-2025-03-11": "gpt-4o-mini-search-preview-2025-03-11";
|
|
523
|
+
"chatgpt-4o-latest": "chatgpt-4o-latest";
|
|
524
|
+
"codex-mini-latest": "codex-mini-latest";
|
|
525
|
+
"gpt-4o-mini": "gpt-4o-mini";
|
|
526
|
+
"gpt-4o-mini-2024-07-18": "gpt-4o-mini-2024-07-18";
|
|
527
|
+
"gpt-4-turbo": "gpt-4-turbo";
|
|
528
|
+
"gpt-4-turbo-2024-04-09": "gpt-4-turbo-2024-04-09";
|
|
529
|
+
"gpt-4-0125-preview": "gpt-4-0125-preview";
|
|
530
|
+
"gpt-4-turbo-preview": "gpt-4-turbo-preview";
|
|
531
|
+
"gpt-4-1106-preview": "gpt-4-1106-preview";
|
|
532
|
+
"gpt-4-vision-preview": "gpt-4-vision-preview";
|
|
533
|
+
"gpt-4": "gpt-4";
|
|
534
|
+
"gpt-4-0314": "gpt-4-0314";
|
|
535
|
+
"gpt-4-0613": "gpt-4-0613";
|
|
536
|
+
"gpt-4-32k": "gpt-4-32k";
|
|
537
|
+
"gpt-4-32k-0314": "gpt-4-32k-0314";
|
|
538
|
+
"gpt-4-32k-0613": "gpt-4-32k-0613";
|
|
539
|
+
"gpt-3.5-turbo": "gpt-3.5-turbo";
|
|
540
|
+
"gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k";
|
|
541
|
+
"gpt-3.5-turbo-0301": "gpt-3.5-turbo-0301";
|
|
542
|
+
"gpt-3.5-turbo-0613": "gpt-3.5-turbo-0613";
|
|
543
|
+
"gpt-3.5-turbo-1106": "gpt-3.5-turbo-1106";
|
|
544
|
+
"gpt-3.5-turbo-0125": "gpt-3.5-turbo-0125";
|
|
545
|
+
"gpt-3.5-turbo-16k-0613": "gpt-3.5-turbo-16k-0613";
|
|
546
|
+
"o1-pro": "o1-pro";
|
|
547
|
+
"o1-pro-2025-03-19": "o1-pro-2025-03-19";
|
|
548
|
+
"o3-pro": "o3-pro";
|
|
549
|
+
"o3-pro-2025-06-10": "o3-pro-2025-06-10";
|
|
550
|
+
"o3-deep-research": "o3-deep-research";
|
|
551
|
+
"o3-deep-research-2025-06-26": "o3-deep-research-2025-06-26";
|
|
552
|
+
"o4-mini-deep-research": "o4-mini-deep-research";
|
|
553
|
+
"o4-mini-deep-research-2025-06-26": "o4-mini-deep-research-2025-06-26";
|
|
554
|
+
"computer-use-preview": "computer-use-preview";
|
|
555
|
+
"computer-use-preview-2025-03-11": "computer-use-preview-2025-03-11";
|
|
556
|
+
"gpt-5-codex": "gpt-5-codex";
|
|
557
|
+
"gpt-5-pro": "gpt-5-pro";
|
|
558
|
+
"gpt-5-pro-2025-10-06": "gpt-5-pro-2025-10-06";
|
|
559
|
+
"gpt-5.1-codex-max": "gpt-5.1-codex-max";
|
|
560
|
+
}>]>>;
|
|
561
|
+
reasoning: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
562
|
+
effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodEnum<{
|
|
563
|
+
low: "low";
|
|
564
|
+
medium: "medium";
|
|
565
|
+
high: "high";
|
|
566
|
+
none: "none";
|
|
567
|
+
minimal: "minimal";
|
|
568
|
+
xhigh: "xhigh";
|
|
569
|
+
}>>, z.ZodNull]>>;
|
|
570
|
+
summary: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
571
|
+
auto: "auto";
|
|
572
|
+
concise: "concise";
|
|
573
|
+
detailed: "detailed";
|
|
574
|
+
}>, z.ZodNull]>>;
|
|
575
|
+
generate_summary: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
576
|
+
auto: "auto";
|
|
577
|
+
concise: "concise";
|
|
578
|
+
detailed: "detailed";
|
|
579
|
+
}>, z.ZodNull]>>;
|
|
580
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
581
|
+
background: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
582
|
+
max_output_tokens: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
583
|
+
max_tool_calls: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
584
|
+
text: z.ZodOptional<z.ZodObject<{
|
|
585
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
586
|
+
type: z.ZodLiteral<"text">;
|
|
587
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
588
|
+
type: z.ZodLiteral<"json_schema">;
|
|
589
|
+
description: z.ZodOptional<z.ZodString>;
|
|
590
|
+
name: z.ZodString;
|
|
591
|
+
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
592
|
+
strict: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
593
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
594
|
+
type: z.ZodLiteral<"json_object">;
|
|
595
|
+
}, z.core.$strip>]>>;
|
|
596
|
+
verbosity: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodEnum<{
|
|
597
|
+
low: "low";
|
|
598
|
+
medium: "medium";
|
|
599
|
+
high: "high";
|
|
600
|
+
}>>, z.ZodNull]>>;
|
|
601
|
+
}, z.core.$strip>>;
|
|
602
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
603
|
+
type: z.ZodDefault<z.ZodLiteral<"function">>;
|
|
604
|
+
name: z.ZodString;
|
|
605
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
606
|
+
parameters: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
|
|
607
|
+
strict: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNull]>;
|
|
608
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
609
|
+
type: z.ZodDefault<z.ZodLiteral<"file_search">>;
|
|
610
|
+
vector_store_ids: z.ZodArray<z.ZodString>;
|
|
611
|
+
max_num_results: z.ZodOptional<z.ZodNumber>;
|
|
612
|
+
ranking_options: z.ZodOptional<z.ZodObject<{
|
|
613
|
+
ranker: z.ZodOptional<z.ZodEnum<{
|
|
614
|
+
auto: "auto";
|
|
615
|
+
"default-2024-11-15": "default-2024-11-15";
|
|
616
|
+
}>>;
|
|
617
|
+
score_threshold: z.ZodOptional<z.ZodNumber>;
|
|
618
|
+
hybrid_search: z.ZodOptional<z.ZodObject<{
|
|
619
|
+
embedding_weight: z.ZodNumber;
|
|
620
|
+
text_weight: z.ZodNumber;
|
|
621
|
+
}, z.core.$strip>>;
|
|
622
|
+
}, z.core.$strip>>;
|
|
623
|
+
filters: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
624
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
625
|
+
eq: "eq";
|
|
626
|
+
ne: "ne";
|
|
627
|
+
gt: "gt";
|
|
628
|
+
gte: "gte";
|
|
629
|
+
lt: "lt";
|
|
630
|
+
lte: "lte";
|
|
631
|
+
}>>;
|
|
632
|
+
key: z.ZodString;
|
|
633
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
634
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
635
|
+
type: z.ZodEnum<{
|
|
636
|
+
and: "and";
|
|
637
|
+
or: "or";
|
|
638
|
+
}>;
|
|
639
|
+
filters: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
640
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
641
|
+
eq: "eq";
|
|
642
|
+
ne: "ne";
|
|
643
|
+
gt: "gt";
|
|
644
|
+
gte: "gte";
|
|
645
|
+
lt: "lt";
|
|
646
|
+
lte: "lte";
|
|
647
|
+
}>>;
|
|
648
|
+
key: z.ZodString;
|
|
649
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
650
|
+
}, z.core.$strict>, z.ZodAny]>>;
|
|
651
|
+
}, z.core.$strict>]>, z.ZodNull]>>;
|
|
652
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
653
|
+
type: z.ZodDefault<z.ZodLiteral<"computer_use_preview">>;
|
|
654
|
+
environment: z.ZodEnum<{
|
|
655
|
+
windows: "windows";
|
|
656
|
+
mac: "mac";
|
|
657
|
+
linux: "linux";
|
|
658
|
+
ubuntu: "ubuntu";
|
|
659
|
+
browser: "browser";
|
|
660
|
+
}>;
|
|
661
|
+
display_width: z.ZodNumber;
|
|
662
|
+
display_height: z.ZodNumber;
|
|
663
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
664
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
665
|
+
web_search: "web_search";
|
|
666
|
+
web_search_2025_08_26: "web_search_2025_08_26";
|
|
667
|
+
}>>;
|
|
668
|
+
filters: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
669
|
+
allowed_domains: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodArray<z.ZodString>>, z.ZodNull]>>;
|
|
670
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
671
|
+
user_location: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
672
|
+
type: z.ZodDefault<z.ZodLiteral<"approximate">>;
|
|
673
|
+
country: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
674
|
+
region: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
675
|
+
city: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
676
|
+
timezone: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
677
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
678
|
+
search_context_size: z.ZodDefault<z.ZodEnum<{
|
|
679
|
+
low: "low";
|
|
680
|
+
medium: "medium";
|
|
681
|
+
high: "high";
|
|
682
|
+
}>>;
|
|
683
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
684
|
+
type: z.ZodLiteral<"mcp">;
|
|
685
|
+
server_label: z.ZodString;
|
|
686
|
+
server_url: z.ZodOptional<z.ZodString>;
|
|
687
|
+
connector_id: z.ZodOptional<z.ZodEnum<{
|
|
688
|
+
connector_dropbox: "connector_dropbox";
|
|
689
|
+
connector_gmail: "connector_gmail";
|
|
690
|
+
connector_googlecalendar: "connector_googlecalendar";
|
|
691
|
+
connector_googledrive: "connector_googledrive";
|
|
692
|
+
connector_microsoftteams: "connector_microsoftteams";
|
|
693
|
+
connector_outlookcalendar: "connector_outlookcalendar";
|
|
694
|
+
connector_outlookemail: "connector_outlookemail";
|
|
695
|
+
connector_sharepoint: "connector_sharepoint";
|
|
696
|
+
}>>;
|
|
697
|
+
authorization: z.ZodOptional<z.ZodString>;
|
|
698
|
+
server_description: z.ZodOptional<z.ZodString>;
|
|
699
|
+
headers: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodNull]>>;
|
|
700
|
+
allowed_tools: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
701
|
+
tool_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
702
|
+
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
703
|
+
}, z.core.$strict>]>, z.ZodNull]>>;
|
|
704
|
+
require_approval: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
705
|
+
always: z.ZodOptional<z.ZodObject<{
|
|
706
|
+
tool_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
707
|
+
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
708
|
+
}, z.core.$strict>>;
|
|
709
|
+
never: z.ZodOptional<z.ZodObject<{
|
|
710
|
+
tool_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
711
|
+
read_only: z.ZodOptional<z.ZodBoolean>;
|
|
712
|
+
}, z.core.$strict>>;
|
|
713
|
+
}, z.core.$strict>, z.ZodEnum<{
|
|
714
|
+
never: "never";
|
|
715
|
+
always: "always";
|
|
716
|
+
}>]>>, z.ZodNull]>>;
|
|
717
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
718
|
+
type: z.ZodLiteral<"code_interpreter">;
|
|
719
|
+
container: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
720
|
+
type: z.ZodDefault<z.ZodLiteral<"auto">>;
|
|
721
|
+
file_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
722
|
+
memory_limit: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
723
|
+
"1g": "1g";
|
|
724
|
+
"4g": "4g";
|
|
725
|
+
"16g": "16g";
|
|
726
|
+
"64g": "64g";
|
|
727
|
+
}>, z.ZodNull]>>;
|
|
728
|
+
}, z.core.$strip>]>;
|
|
729
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
730
|
+
type: z.ZodLiteral<"image_generation">;
|
|
731
|
+
model: z.ZodDefault<z.ZodEnum<{
|
|
732
|
+
"gpt-image-1": "gpt-image-1";
|
|
733
|
+
"gpt-image-1-mini": "gpt-image-1-mini";
|
|
734
|
+
}>>;
|
|
735
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
736
|
+
low: "low";
|
|
737
|
+
medium: "medium";
|
|
738
|
+
high: "high";
|
|
739
|
+
auto: "auto";
|
|
740
|
+
}>>;
|
|
741
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
742
|
+
auto: "auto";
|
|
743
|
+
"1024x1024": "1024x1024";
|
|
744
|
+
"1536x1024": "1536x1024";
|
|
745
|
+
"1024x1536": "1024x1536";
|
|
746
|
+
}>>;
|
|
747
|
+
output_format: z.ZodDefault<z.ZodEnum<{
|
|
748
|
+
png: "png";
|
|
749
|
+
jpeg: "jpeg";
|
|
750
|
+
webp: "webp";
|
|
751
|
+
}>>;
|
|
752
|
+
output_compression: z.ZodDefault<z.ZodNumber>;
|
|
753
|
+
moderation: z.ZodDefault<z.ZodEnum<{
|
|
754
|
+
low: "low";
|
|
755
|
+
auto: "auto";
|
|
756
|
+
}>>;
|
|
757
|
+
background: z.ZodDefault<z.ZodEnum<{
|
|
758
|
+
auto: "auto";
|
|
759
|
+
transparent: "transparent";
|
|
760
|
+
opaque: "opaque";
|
|
761
|
+
}>>;
|
|
762
|
+
input_fidelity: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
763
|
+
low: "low";
|
|
764
|
+
high: "high";
|
|
765
|
+
}>, z.ZodNull]>>;
|
|
766
|
+
input_image_mask: z.ZodOptional<z.ZodObject<{
|
|
767
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
768
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
769
|
+
}, z.core.$strict>>;
|
|
770
|
+
partial_images: z.ZodDefault<z.ZodNumber>;
|
|
771
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
772
|
+
type: z.ZodDefault<z.ZodLiteral<"local_shell">>;
|
|
773
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
774
|
+
type: z.ZodDefault<z.ZodLiteral<"shell">>;
|
|
775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
776
|
+
type: z.ZodDefault<z.ZodLiteral<"custom">>;
|
|
777
|
+
name: z.ZodString;
|
|
778
|
+
description: z.ZodOptional<z.ZodString>;
|
|
779
|
+
format: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
780
|
+
type: z.ZodDefault<z.ZodLiteral<"text">>;
|
|
781
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
782
|
+
type: z.ZodDefault<z.ZodLiteral<"grammar">>;
|
|
783
|
+
syntax: z.ZodEnum<{
|
|
784
|
+
lark: "lark";
|
|
785
|
+
regex: "regex";
|
|
786
|
+
}>;
|
|
787
|
+
definition: z.ZodString;
|
|
788
|
+
}, z.core.$strip>]>>;
|
|
789
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
790
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
791
|
+
web_search_preview: "web_search_preview";
|
|
792
|
+
web_search_preview_2025_03_11: "web_search_preview_2025_03_11";
|
|
793
|
+
}>>;
|
|
794
|
+
user_location: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
795
|
+
type: z.ZodDefault<z.ZodLiteral<"approximate">>;
|
|
796
|
+
country: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
797
|
+
region: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
798
|
+
city: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
799
|
+
timezone: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
800
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
801
|
+
search_context_size: z.ZodOptional<z.ZodEnum<{
|
|
802
|
+
low: "low";
|
|
803
|
+
medium: "medium";
|
|
804
|
+
high: "high";
|
|
805
|
+
}>>;
|
|
806
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
807
|
+
type: z.ZodDefault<z.ZodLiteral<"apply_patch">>;
|
|
808
|
+
}, z.core.$strip>]>>>;
|
|
809
|
+
tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
810
|
+
auto: "auto";
|
|
811
|
+
none: "none";
|
|
812
|
+
required: "required";
|
|
813
|
+
}>, z.ZodObject<{
|
|
814
|
+
type: z.ZodLiteral<"allowed_tools">;
|
|
815
|
+
mode: z.ZodEnum<{
|
|
816
|
+
auto: "auto";
|
|
817
|
+
required: "required";
|
|
818
|
+
}>;
|
|
819
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
820
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
821
|
+
type: z.ZodEnum<{
|
|
822
|
+
file_search: "file_search";
|
|
823
|
+
computer_use_preview: "computer_use_preview";
|
|
824
|
+
code_interpreter: "code_interpreter";
|
|
825
|
+
image_generation: "image_generation";
|
|
826
|
+
web_search_preview: "web_search_preview";
|
|
827
|
+
web_search_preview_2025_03_11: "web_search_preview_2025_03_11";
|
|
828
|
+
}>;
|
|
829
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
830
|
+
type: z.ZodLiteral<"function">;
|
|
831
|
+
name: z.ZodString;
|
|
832
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
833
|
+
type: z.ZodLiteral<"mcp">;
|
|
834
|
+
server_label: z.ZodString;
|
|
835
|
+
name: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
836
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
837
|
+
type: z.ZodLiteral<"custom">;
|
|
838
|
+
name: z.ZodString;
|
|
839
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
840
|
+
type: z.ZodDefault<z.ZodLiteral<"apply_patch">>;
|
|
841
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
842
|
+
type: z.ZodDefault<z.ZodLiteral<"shell">>;
|
|
843
|
+
}, z.core.$strip>]>>;
|
|
844
|
+
prompt: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
845
|
+
id: z.ZodString;
|
|
846
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
847
|
+
variables: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
848
|
+
type: z.ZodDefault<z.ZodLiteral<"input_text">>;
|
|
849
|
+
text: z.ZodString;
|
|
850
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
851
|
+
type: z.ZodDefault<z.ZodLiteral<"input_image">>;
|
|
852
|
+
image_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
853
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
854
|
+
detail: z.ZodEnum<{
|
|
855
|
+
low: "low";
|
|
856
|
+
high: "high";
|
|
857
|
+
auto: "auto";
|
|
858
|
+
}>;
|
|
859
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
860
|
+
type: z.ZodDefault<z.ZodLiteral<"input_file">>;
|
|
861
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
862
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
863
|
+
file_url: z.ZodOptional<z.ZodString>;
|
|
864
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
865
|
+
}, z.core.$strip>]>>, z.ZodNull]>>;
|
|
866
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
867
|
+
truncation: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodEnum<{
|
|
868
|
+
disabled: "disabled";
|
|
869
|
+
auto: "auto";
|
|
870
|
+
}>>, z.ZodNull]>>;
|
|
871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
872
|
+
input: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
873
|
+
role: z.ZodEnum<{
|
|
874
|
+
user: "user";
|
|
875
|
+
assistant: "assistant";
|
|
876
|
+
system: "system";
|
|
877
|
+
developer: "developer";
|
|
878
|
+
}>;
|
|
879
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
880
|
+
type: z.ZodDefault<z.ZodLiteral<"input_text">>;
|
|
881
|
+
text: z.ZodString;
|
|
882
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
883
|
+
type: z.ZodDefault<z.ZodLiteral<"input_image">>;
|
|
884
|
+
image_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
885
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
886
|
+
detail: z.ZodEnum<{
|
|
887
|
+
low: "low";
|
|
888
|
+
high: "high";
|
|
889
|
+
auto: "auto";
|
|
890
|
+
}>;
|
|
891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
892
|
+
type: z.ZodDefault<z.ZodLiteral<"input_file">>;
|
|
893
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
894
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
895
|
+
file_url: z.ZodOptional<z.ZodString>;
|
|
896
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
897
|
+
}, z.core.$strip>]>>]>;
|
|
898
|
+
type: z.ZodOptional<z.ZodLiteral<"message">>;
|
|
899
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
900
|
+
type: z.ZodOptional<z.ZodLiteral<"message">>;
|
|
901
|
+
role: z.ZodEnum<{
|
|
902
|
+
user: "user";
|
|
903
|
+
system: "system";
|
|
904
|
+
developer: "developer";
|
|
905
|
+
}>;
|
|
906
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
907
|
+
in_progress: "in_progress";
|
|
908
|
+
completed: "completed";
|
|
909
|
+
incomplete: "incomplete";
|
|
910
|
+
}>>;
|
|
911
|
+
content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
912
|
+
type: z.ZodDefault<z.ZodLiteral<"input_text">>;
|
|
913
|
+
text: z.ZodString;
|
|
914
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
915
|
+
type: z.ZodDefault<z.ZodLiteral<"input_image">>;
|
|
916
|
+
image_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
917
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
918
|
+
detail: z.ZodEnum<{
|
|
919
|
+
low: "low";
|
|
920
|
+
high: "high";
|
|
921
|
+
auto: "auto";
|
|
922
|
+
}>;
|
|
923
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
924
|
+
type: z.ZodDefault<z.ZodLiteral<"input_file">>;
|
|
925
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
926
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
927
|
+
file_url: z.ZodOptional<z.ZodString>;
|
|
928
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
929
|
+
}, z.core.$strip>]>>;
|
|
930
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
931
|
+
id: z.ZodString;
|
|
932
|
+
type: z.ZodLiteral<"message">;
|
|
933
|
+
role: z.ZodLiteral<"assistant">;
|
|
934
|
+
content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
935
|
+
type: z.ZodDefault<z.ZodLiteral<"output_text">>;
|
|
936
|
+
text: z.ZodString;
|
|
937
|
+
annotations: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
938
|
+
type: z.ZodDefault<z.ZodLiteral<"file_citation">>;
|
|
939
|
+
file_id: z.ZodString;
|
|
940
|
+
index: z.ZodNumber;
|
|
941
|
+
filename: z.ZodString;
|
|
942
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
943
|
+
type: z.ZodDefault<z.ZodLiteral<"url_citation">>;
|
|
944
|
+
url: z.ZodString;
|
|
945
|
+
start_index: z.ZodNumber;
|
|
946
|
+
end_index: z.ZodNumber;
|
|
947
|
+
title: z.ZodString;
|
|
948
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
949
|
+
type: z.ZodDefault<z.ZodLiteral<"container_file_citation">>;
|
|
950
|
+
container_id: z.ZodString;
|
|
951
|
+
file_id: z.ZodString;
|
|
952
|
+
start_index: z.ZodNumber;
|
|
953
|
+
end_index: z.ZodNumber;
|
|
954
|
+
filename: z.ZodString;
|
|
955
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
956
|
+
type: z.ZodLiteral<"file_path">;
|
|
957
|
+
file_id: z.ZodString;
|
|
958
|
+
index: z.ZodNumber;
|
|
959
|
+
}, z.core.$strip>]>>;
|
|
960
|
+
logprobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
961
|
+
token: z.ZodString;
|
|
962
|
+
logprob: z.ZodNumber;
|
|
963
|
+
bytes: z.ZodArray<z.ZodNumber>;
|
|
964
|
+
top_logprobs: z.ZodArray<z.ZodObject<{
|
|
965
|
+
token: z.ZodString;
|
|
966
|
+
logprob: z.ZodNumber;
|
|
967
|
+
bytes: z.ZodArray<z.ZodNumber>;
|
|
968
|
+
}, z.core.$strip>>;
|
|
969
|
+
}, z.core.$strip>>>;
|
|
970
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
971
|
+
type: z.ZodDefault<z.ZodLiteral<"refusal">>;
|
|
972
|
+
refusal: z.ZodString;
|
|
973
|
+
}, z.core.$strip>]>>;
|
|
974
|
+
status: z.ZodEnum<{
|
|
975
|
+
in_progress: "in_progress";
|
|
976
|
+
completed: "completed";
|
|
977
|
+
incomplete: "incomplete";
|
|
978
|
+
}>;
|
|
979
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
980
|
+
id: z.ZodString;
|
|
981
|
+
type: z.ZodLiteral<"file_search_call">;
|
|
982
|
+
status: z.ZodEnum<{
|
|
983
|
+
in_progress: "in_progress";
|
|
984
|
+
completed: "completed";
|
|
985
|
+
incomplete: "incomplete";
|
|
986
|
+
searching: "searching";
|
|
987
|
+
failed: "failed";
|
|
988
|
+
}>;
|
|
989
|
+
queries: z.ZodArray<z.ZodString>;
|
|
990
|
+
results: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
991
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
992
|
+
text: z.ZodOptional<z.ZodString>;
|
|
993
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
994
|
+
attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>, z.ZodNull]>>;
|
|
995
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
996
|
+
}, z.core.$strip>>, z.ZodNull]>>;
|
|
997
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
998
|
+
type: z.ZodDefault<z.ZodLiteral<"computer_call">>;
|
|
999
|
+
id: z.ZodString;
|
|
1000
|
+
call_id: z.ZodString;
|
|
1001
|
+
action: z.ZodUnion<readonly [z.ZodObject<{
|
|
1002
|
+
type: z.ZodDefault<z.ZodLiteral<"click">>;
|
|
1003
|
+
button: z.ZodEnum<{
|
|
1004
|
+
left: "left";
|
|
1005
|
+
right: "right";
|
|
1006
|
+
wheel: "wheel";
|
|
1007
|
+
back: "back";
|
|
1008
|
+
forward: "forward";
|
|
1009
|
+
}>;
|
|
1010
|
+
x: z.ZodNumber;
|
|
1011
|
+
y: z.ZodNumber;
|
|
1012
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1013
|
+
type: z.ZodDefault<z.ZodLiteral<"double_click">>;
|
|
1014
|
+
x: z.ZodNumber;
|
|
1015
|
+
y: z.ZodNumber;
|
|
1016
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1017
|
+
type: z.ZodDefault<z.ZodLiteral<"drag">>;
|
|
1018
|
+
path: z.ZodArray<z.ZodObject<{
|
|
1019
|
+
x: z.ZodNumber;
|
|
1020
|
+
y: z.ZodNumber;
|
|
1021
|
+
}, z.core.$strip>>;
|
|
1022
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1023
|
+
type: z.ZodDefault<z.ZodLiteral<"keypress">>;
|
|
1024
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1025
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1026
|
+
type: z.ZodDefault<z.ZodLiteral<"move">>;
|
|
1027
|
+
x: z.ZodNumber;
|
|
1028
|
+
y: z.ZodNumber;
|
|
1029
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1030
|
+
type: z.ZodDefault<z.ZodLiteral<"screenshot">>;
|
|
1031
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1032
|
+
type: z.ZodDefault<z.ZodLiteral<"scroll">>;
|
|
1033
|
+
x: z.ZodNumber;
|
|
1034
|
+
y: z.ZodNumber;
|
|
1035
|
+
scroll_x: z.ZodNumber;
|
|
1036
|
+
scroll_y: z.ZodNumber;
|
|
1037
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1038
|
+
type: z.ZodDefault<z.ZodLiteral<"type">>;
|
|
1039
|
+
text: z.ZodString;
|
|
1040
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1041
|
+
type: z.ZodDefault<z.ZodLiteral<"wait">>;
|
|
1042
|
+
}, z.core.$strip>]>;
|
|
1043
|
+
pending_safety_checks: z.ZodArray<z.ZodObject<{
|
|
1044
|
+
id: z.ZodString;
|
|
1045
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1046
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
status: z.ZodEnum<{
|
|
1049
|
+
in_progress: "in_progress";
|
|
1050
|
+
completed: "completed";
|
|
1051
|
+
incomplete: "incomplete";
|
|
1052
|
+
}>;
|
|
1053
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1054
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1055
|
+
call_id: z.ZodString;
|
|
1056
|
+
type: z.ZodDefault<z.ZodLiteral<"computer_call_output">>;
|
|
1057
|
+
output: z.ZodObject<{
|
|
1058
|
+
type: z.ZodDefault<z.ZodLiteral<"computer_screenshot">>;
|
|
1059
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1060
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
}, z.core.$strip>;
|
|
1062
|
+
acknowledged_safety_checks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1063
|
+
id: z.ZodString;
|
|
1064
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1065
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1066
|
+
}, z.core.$strip>>, z.ZodNull]>>;
|
|
1067
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1068
|
+
in_progress: "in_progress";
|
|
1069
|
+
completed: "completed";
|
|
1070
|
+
incomplete: "incomplete";
|
|
1071
|
+
}>, z.ZodNull]>>;
|
|
1072
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1073
|
+
id: z.ZodString;
|
|
1074
|
+
type: z.ZodLiteral<"web_search_call">;
|
|
1075
|
+
status: z.ZodEnum<{
|
|
1076
|
+
in_progress: "in_progress";
|
|
1077
|
+
completed: "completed";
|
|
1078
|
+
searching: "searching";
|
|
1079
|
+
failed: "failed";
|
|
1080
|
+
}>;
|
|
1081
|
+
action: z.ZodUnion<readonly [z.ZodObject<{
|
|
1082
|
+
type: z.ZodLiteral<"search">;
|
|
1083
|
+
query: z.ZodString;
|
|
1084
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1085
|
+
type: z.ZodLiteral<"url">;
|
|
1086
|
+
url: z.ZodString;
|
|
1087
|
+
}, z.core.$strip>>>;
|
|
1088
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1089
|
+
type: z.ZodLiteral<"open_page">;
|
|
1090
|
+
url: z.ZodString;
|
|
1091
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1092
|
+
type: z.ZodLiteral<"find">;
|
|
1093
|
+
url: z.ZodString;
|
|
1094
|
+
pattern: z.ZodString;
|
|
1095
|
+
}, z.core.$strip>]>;
|
|
1096
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1097
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1098
|
+
type: z.ZodLiteral<"function_call">;
|
|
1099
|
+
call_id: z.ZodString;
|
|
1100
|
+
name: z.ZodString;
|
|
1101
|
+
arguments: z.ZodString;
|
|
1102
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1103
|
+
in_progress: "in_progress";
|
|
1104
|
+
completed: "completed";
|
|
1105
|
+
incomplete: "incomplete";
|
|
1106
|
+
}>>;
|
|
1107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1108
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1109
|
+
call_id: z.ZodString;
|
|
1110
|
+
type: z.ZodDefault<z.ZodLiteral<"function_call_output">>;
|
|
1111
|
+
output: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1112
|
+
type: z.ZodDefault<z.ZodLiteral<"input_text">>;
|
|
1113
|
+
text: z.ZodString;
|
|
1114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1115
|
+
type: z.ZodDefault<z.ZodLiteral<"input_image">>;
|
|
1116
|
+
image_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1117
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1118
|
+
detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1119
|
+
low: "low";
|
|
1120
|
+
high: "high";
|
|
1121
|
+
auto: "auto";
|
|
1122
|
+
}>, z.ZodNull]>>;
|
|
1123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1124
|
+
type: z.ZodDefault<z.ZodLiteral<"input_file">>;
|
|
1125
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1126
|
+
filename: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1127
|
+
file_data: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1128
|
+
file_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1129
|
+
}, z.core.$strip>]>>]>;
|
|
1130
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1131
|
+
in_progress: "in_progress";
|
|
1132
|
+
completed: "completed";
|
|
1133
|
+
incomplete: "incomplete";
|
|
1134
|
+
}>, z.ZodNull]>>;
|
|
1135
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1136
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1137
|
+
id: z.ZodString;
|
|
1138
|
+
encrypted_content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1139
|
+
summary: z.ZodArray<z.ZodObject<{
|
|
1140
|
+
type: z.ZodDefault<z.ZodLiteral<"summary_text">>;
|
|
1141
|
+
text: z.ZodString;
|
|
1142
|
+
}, z.core.$strip>>;
|
|
1143
|
+
content: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1144
|
+
type: z.ZodDefault<z.ZodLiteral<"reasoning_text">>;
|
|
1145
|
+
text: z.ZodString;
|
|
1146
|
+
}, z.core.$strip>>>;
|
|
1147
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1148
|
+
in_progress: "in_progress";
|
|
1149
|
+
completed: "completed";
|
|
1150
|
+
incomplete: "incomplete";
|
|
1151
|
+
}>>;
|
|
1152
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1153
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1154
|
+
type: z.ZodDefault<z.ZodLiteral<"compaction">>;
|
|
1155
|
+
encrypted_content: z.ZodString;
|
|
1156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1157
|
+
type: z.ZodLiteral<"image_generation_call">;
|
|
1158
|
+
id: z.ZodString;
|
|
1159
|
+
status: z.ZodEnum<{
|
|
1160
|
+
in_progress: "in_progress";
|
|
1161
|
+
completed: "completed";
|
|
1162
|
+
failed: "failed";
|
|
1163
|
+
generating: "generating";
|
|
1164
|
+
}>;
|
|
1165
|
+
result: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
1166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1167
|
+
type: z.ZodDefault<z.ZodLiteral<"code_interpreter_call">>;
|
|
1168
|
+
id: z.ZodString;
|
|
1169
|
+
status: z.ZodEnum<{
|
|
1170
|
+
in_progress: "in_progress";
|
|
1171
|
+
completed: "completed";
|
|
1172
|
+
incomplete: "incomplete";
|
|
1173
|
+
failed: "failed";
|
|
1174
|
+
interpreting: "interpreting";
|
|
1175
|
+
}>;
|
|
1176
|
+
container_id: z.ZodString;
|
|
1177
|
+
code: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
1178
|
+
outputs: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1179
|
+
type: z.ZodDefault<z.ZodLiteral<"logs">>;
|
|
1180
|
+
logs: z.ZodString;
|
|
1181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1182
|
+
type: z.ZodDefault<z.ZodLiteral<"image">>;
|
|
1183
|
+
url: z.ZodString;
|
|
1184
|
+
}, z.core.$strip>]>>, z.ZodNull]>;
|
|
1185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1186
|
+
type: z.ZodLiteral<"local_shell_call">;
|
|
1187
|
+
id: z.ZodString;
|
|
1188
|
+
call_id: z.ZodString;
|
|
1189
|
+
action: z.ZodObject<{
|
|
1190
|
+
type: z.ZodDefault<z.ZodLiteral<"exec">>;
|
|
1191
|
+
command: z.ZodArray<z.ZodString>;
|
|
1192
|
+
timeout_ms: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
1193
|
+
working_directory: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1194
|
+
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1195
|
+
user: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1196
|
+
}, z.core.$strip>;
|
|
1197
|
+
status: z.ZodEnum<{
|
|
1198
|
+
in_progress: "in_progress";
|
|
1199
|
+
completed: "completed";
|
|
1200
|
+
incomplete: "incomplete";
|
|
1201
|
+
}>;
|
|
1202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1203
|
+
type: z.ZodLiteral<"local_shell_call_output">;
|
|
1204
|
+
id: z.ZodString;
|
|
1205
|
+
output: z.ZodString;
|
|
1206
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1207
|
+
in_progress: "in_progress";
|
|
1208
|
+
completed: "completed";
|
|
1209
|
+
incomplete: "incomplete";
|
|
1210
|
+
}>, z.ZodNull]>>;
|
|
1211
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1212
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1213
|
+
call_id: z.ZodString;
|
|
1214
|
+
type: z.ZodDefault<z.ZodLiteral<"shell_call">>;
|
|
1215
|
+
action: z.ZodObject<{
|
|
1216
|
+
commands: z.ZodArray<z.ZodString>;
|
|
1217
|
+
timeout_ms: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
1218
|
+
max_output_length: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
1219
|
+
}, z.core.$strip>;
|
|
1220
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1221
|
+
in_progress: "in_progress";
|
|
1222
|
+
completed: "completed";
|
|
1223
|
+
incomplete: "incomplete";
|
|
1224
|
+
}>, z.ZodNull]>>;
|
|
1225
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1226
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1227
|
+
call_id: z.ZodString;
|
|
1228
|
+
type: z.ZodDefault<z.ZodLiteral<"shell_call_output">>;
|
|
1229
|
+
output: z.ZodArray<z.ZodObject<{
|
|
1230
|
+
stdout: z.ZodString;
|
|
1231
|
+
stderr: z.ZodString;
|
|
1232
|
+
outcome: z.ZodUnion<readonly [z.ZodObject<{
|
|
1233
|
+
type: z.ZodDefault<z.ZodLiteral<"timeout">>;
|
|
1234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1235
|
+
type: z.ZodDefault<z.ZodLiteral<"exit">>;
|
|
1236
|
+
exit_code: z.ZodNumber;
|
|
1237
|
+
}, z.core.$strip>]>;
|
|
1238
|
+
}, z.core.$strip>>;
|
|
1239
|
+
max_output_length: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
|
|
1240
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1241
|
+
type: z.ZodDefault<z.ZodLiteral<"apply_patch_call">>;
|
|
1242
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1243
|
+
call_id: z.ZodString;
|
|
1244
|
+
status: z.ZodEnum<{
|
|
1245
|
+
in_progress: "in_progress";
|
|
1246
|
+
completed: "completed";
|
|
1247
|
+
}>;
|
|
1248
|
+
operation: z.ZodUnion<readonly [z.ZodObject<{
|
|
1249
|
+
type: z.ZodDefault<z.ZodLiteral<"create_file">>;
|
|
1250
|
+
path: z.ZodString;
|
|
1251
|
+
diff: z.ZodString;
|
|
1252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1253
|
+
type: z.ZodDefault<z.ZodLiteral<"delete_file">>;
|
|
1254
|
+
path: z.ZodString;
|
|
1255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1256
|
+
type: z.ZodDefault<z.ZodLiteral<"update_file">>;
|
|
1257
|
+
path: z.ZodString;
|
|
1258
|
+
diff: z.ZodString;
|
|
1259
|
+
}, z.core.$strip>]>;
|
|
1260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1261
|
+
type: z.ZodDefault<z.ZodLiteral<"apply_patch_call_output">>;
|
|
1262
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1263
|
+
call_id: z.ZodString;
|
|
1264
|
+
status: z.ZodEnum<{
|
|
1265
|
+
completed: "completed";
|
|
1266
|
+
failed: "failed";
|
|
1267
|
+
}>;
|
|
1268
|
+
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1269
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1270
|
+
type: z.ZodLiteral<"mcp_list_tools">;
|
|
1271
|
+
id: z.ZodString;
|
|
1272
|
+
server_label: z.ZodString;
|
|
1273
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
1274
|
+
name: z.ZodString;
|
|
1275
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1276
|
+
input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1277
|
+
annotations: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
1278
|
+
}, z.core.$strip>>;
|
|
1279
|
+
error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1280
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1281
|
+
type: z.ZodLiteral<"mcp_approval_request">;
|
|
1282
|
+
id: z.ZodString;
|
|
1283
|
+
server_label: z.ZodString;
|
|
1284
|
+
name: z.ZodString;
|
|
1285
|
+
arguments: z.ZodString;
|
|
1286
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1287
|
+
type: z.ZodLiteral<"mcp_approval_response">;
|
|
1288
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1289
|
+
approval_request_id: z.ZodString;
|
|
1290
|
+
approve: z.ZodBoolean;
|
|
1291
|
+
reason: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1292
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1293
|
+
type: z.ZodLiteral<"mcp_call">;
|
|
1294
|
+
id: z.ZodString;
|
|
1295
|
+
server_label: z.ZodString;
|
|
1296
|
+
name: z.ZodString;
|
|
1297
|
+
arguments: z.ZodString;
|
|
1298
|
+
output: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1299
|
+
error: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1300
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1301
|
+
in_progress: "in_progress";
|
|
1302
|
+
completed: "completed";
|
|
1303
|
+
incomplete: "incomplete";
|
|
1304
|
+
failed: "failed";
|
|
1305
|
+
calling: "calling";
|
|
1306
|
+
}>>;
|
|
1307
|
+
approval_request_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1309
|
+
type: z.ZodLiteral<"custom_tool_call_output">;
|
|
1310
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1311
|
+
call_id: z.ZodString;
|
|
1312
|
+
output: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1313
|
+
type: z.ZodDefault<z.ZodLiteral<"input_text">>;
|
|
1314
|
+
text: z.ZodString;
|
|
1315
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1316
|
+
type: z.ZodDefault<z.ZodLiteral<"input_image">>;
|
|
1317
|
+
image_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1318
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1319
|
+
detail: z.ZodEnum<{
|
|
1320
|
+
low: "low";
|
|
1321
|
+
high: "high";
|
|
1322
|
+
auto: "auto";
|
|
1323
|
+
}>;
|
|
1324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1325
|
+
type: z.ZodDefault<z.ZodLiteral<"input_file">>;
|
|
1326
|
+
file_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1327
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1328
|
+
file_url: z.ZodOptional<z.ZodString>;
|
|
1329
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
1330
|
+
}, z.core.$strip>]>>]>;
|
|
1331
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1332
|
+
type: z.ZodLiteral<"custom_tool_call">;
|
|
1333
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1334
|
+
call_id: z.ZodString;
|
|
1335
|
+
name: z.ZodString;
|
|
1336
|
+
input: z.ZodString;
|
|
1337
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
1338
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodLiteral<"item_reference">>, z.ZodNull]>>;
|
|
1339
|
+
id: z.ZodString;
|
|
1340
|
+
}, z.core.$strip>]>>]>>;
|
|
1341
|
+
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
|
|
1342
|
+
"file_search_call.results": "file_search_call.results";
|
|
1343
|
+
"web_search_call.results": "web_search_call.results";
|
|
1344
|
+
"web_search_call.action.sources": "web_search_call.action.sources";
|
|
1345
|
+
"message.input_image.image_url": "message.input_image.image_url";
|
|
1346
|
+
"computer_call_output.output.image_url": "computer_call_output.output.image_url";
|
|
1347
|
+
"code_interpreter_call.outputs": "code_interpreter_call.outputs";
|
|
1348
|
+
"reasoning.encrypted_content": "reasoning.encrypted_content";
|
|
1349
|
+
"message.output_text.logprobs": "message.output_text.logprobs";
|
|
1350
|
+
}>>, z.ZodNull]>>;
|
|
1351
|
+
parallel_tool_calls: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
1352
|
+
store: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
1353
|
+
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
1354
|
+
stream: z.ZodOptional<z.ZodUnion<readonly [z.ZodDefault<z.ZodBoolean>, z.ZodNull]>>;
|
|
1355
|
+
stream_options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1356
|
+
include_obfuscation: z.ZodOptional<z.ZodBoolean>;
|
|
1357
|
+
}, z.core.$strip>, z.ZodNull]>>;
|
|
1358
|
+
conversation: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1359
|
+
id: z.ZodString;
|
|
1360
|
+
}, z.core.$strip>]>, z.ZodNull]>>;
|
|
1361
|
+
}, z.core.$strip>>>;
|
|
1362
|
+
//#endregion
|
|
1363
|
+
//#region src/openai/responses/types.d.ts
|
|
1364
|
+
interface OpenAIResponseCaps extends Capabilities {
|
|
1365
|
+
inputModalities: {
|
|
1366
|
+
text: true;
|
|
1367
|
+
image: true;
|
|
1368
|
+
file: true;
|
|
1369
|
+
};
|
|
1370
|
+
inputShape: "chat";
|
|
1371
|
+
replayMode: "multi_turn";
|
|
1372
|
+
supportsInstruction: true;
|
|
1373
|
+
outputModalities: {
|
|
1374
|
+
text: {
|
|
1375
|
+
options: {
|
|
1376
|
+
max_output_tokens?: OpenAICreateResponseSchema["max_output_tokens"];
|
|
1377
|
+
max_tool_calls?: OpenAICreateResponseSchema["max_tool_calls"];
|
|
1378
|
+
temperature?: OpenAICreateResponseSchema["temperature"];
|
|
1379
|
+
top_logprobs?: OpenAICreateResponseSchema["top_logprobs"];
|
|
1380
|
+
top_p?: OpenAICreateResponseSchema["top_p"];
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
tools: true;
|
|
1385
|
+
structured_output: true;
|
|
1386
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
1387
|
+
}
|
|
1388
|
+
type OpenAIResponseEndpointOptions = {
|
|
1389
|
+
conversation?: OpenAICreateResponseSchema["conversation"];
|
|
1390
|
+
include?: OpenAICreateResponseSchema["include"];
|
|
1391
|
+
instructions?: OpenAICreateResponseSchema["instructions"];
|
|
1392
|
+
logprobs?: boolean | number;
|
|
1393
|
+
max_output_tokens?: OpenAICreateResponseSchema["max_output_tokens"];
|
|
1394
|
+
metadata?: OpenAICreateResponseSchema["metadata"];
|
|
1395
|
+
max_tool_calls?: OpenAICreateResponseSchema["max_tool_calls"];
|
|
1396
|
+
maxToolCalls?: OpenAICreateResponseSchema["max_tool_calls"];
|
|
1397
|
+
parallel_tool_calls?: OpenAICreateResponseSchema["parallel_tool_calls"];
|
|
1398
|
+
previous_response_id?: OpenAICreateResponseSchema["previous_response_id"];
|
|
1399
|
+
prompt_cache_key?: OpenAICreateResponseSchema["prompt_cache_key"];
|
|
1400
|
+
prompt_cache_retention?: OpenAICreateResponseSchema["prompt_cache_retention"];
|
|
1401
|
+
reasoning?: OpenAICreateResponseSchema["reasoning"];
|
|
1402
|
+
reasoningEffort?: NonNullable<OpenAICreateResponseSchema["reasoning"]> extends infer TReasoning ? TReasoning extends {
|
|
1403
|
+
effort?: infer TEffort;
|
|
1404
|
+
} ? TEffort : never : never;
|
|
1405
|
+
reasoningSummary?: NonNullable<OpenAICreateResponseSchema["reasoning"]> extends infer TReasoning ? TReasoning extends {
|
|
1406
|
+
summary?: infer TSummary;
|
|
1407
|
+
} ? TSummary : never : never;
|
|
1408
|
+
safety_identifier?: OpenAICreateResponseSchema["safety_identifier"];
|
|
1409
|
+
service_tier?: OpenAICreateResponseSchema["service_tier"];
|
|
1410
|
+
store?: OpenAICreateResponseSchema["store"];
|
|
1411
|
+
temperature?: OpenAICreateResponseSchema["temperature"];
|
|
1412
|
+
text?: OpenAICreateResponseSchema["text"];
|
|
1413
|
+
textVerbosity?: NonNullable<OpenAICreateResponseSchema["text"]> extends infer TText ? TText extends {
|
|
1414
|
+
verbosity?: infer TVerbosity;
|
|
1415
|
+
} ? TVerbosity : never : never;
|
|
1416
|
+
top_logprobs?: OpenAICreateResponseSchema["top_logprobs"];
|
|
1417
|
+
top_p?: OpenAICreateResponseSchema["top_p"];
|
|
1418
|
+
truncation?: OpenAICreateResponseSchema["truncation"];
|
|
1419
|
+
};
|
|
1420
|
+
//#endregion
|
|
1421
|
+
//#region src/openai/shared/schemas.d.ts
|
|
1422
|
+
type OpenAIFileObject = z.infer<typeof OpenAIFileObject>;
|
|
1423
|
+
type OpenAIFileList = z.infer<typeof OpenAIFileList>;
|
|
1424
|
+
type OpenAIDeleteFileResponse = z.infer<typeof OpenAIDeleteFileResponse>;
|
|
1425
|
+
declare const OpenAIFileObject: z.ZodObject<{
|
|
1426
|
+
id: z.ZodString;
|
|
1427
|
+
object: z.ZodOptional<z.ZodString>;
|
|
1428
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
1429
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
1430
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1431
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1432
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
status_details: z.ZodOptional<z.ZodAny>;
|
|
1435
|
+
}, z.core.$loose>;
|
|
1436
|
+
declare const OpenAIFileList: z.ZodObject<{
|
|
1437
|
+
object: z.ZodOptional<z.ZodString>;
|
|
1438
|
+
data: z.ZodArray<z.ZodObject<{
|
|
1439
|
+
id: z.ZodString;
|
|
1440
|
+
object: z.ZodOptional<z.ZodString>;
|
|
1441
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
1442
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
1443
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1444
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1445
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1447
|
+
status_details: z.ZodOptional<z.ZodAny>;
|
|
1448
|
+
}, z.core.$loose>>;
|
|
1449
|
+
first_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1450
|
+
last_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1451
|
+
has_more: z.ZodOptional<z.ZodBoolean>;
|
|
1452
|
+
}, z.core.$loose>;
|
|
1453
|
+
declare const OpenAIDeleteFileResponse: z.ZodObject<{
|
|
1454
|
+
id: z.ZodString;
|
|
1455
|
+
object: z.ZodOptional<z.ZodString>;
|
|
1456
|
+
deleted: z.ZodBoolean;
|
|
1457
|
+
}, z.core.$loose>;
|
|
1458
|
+
//#endregion
|
|
1459
|
+
//#region src/openai/tools/index.d.ts
|
|
1460
|
+
type OpenAINativeToolByType<TType extends string> = TType extends "tool_search" ? {
|
|
1461
|
+
type: "tool_search";
|
|
1462
|
+
execution?: "server" | "client";
|
|
1463
|
+
description?: string;
|
|
1464
|
+
parameters?: Record<string, unknown>;
|
|
1465
|
+
} : NonNullable<OpenAICreateResponseSchema["tools"]>[number] extends infer TTool ? TTool extends {
|
|
1466
|
+
type: infer ToolType extends string;
|
|
1467
|
+
} ? TType extends ToolType ? TTool : never : never : never;
|
|
1468
|
+
type OpenAINativeToolConfig<TType extends string> = Omit<OpenAINativeToolByType<TType>, "type">;
|
|
1469
|
+
type OpenAINativeToolType = "web_search" | "web_search_preview" | "file_search" | "code_interpreter" | "image_generation" | "computer_use_preview" | "mcp" | "shell" | "local_shell" | "apply_patch" | "tool_search" | "custom";
|
|
1470
|
+
type OpenAINativeToolDefinition<TType extends OpenAINativeToolType = OpenAINativeToolType> = HostedToolDefinition<"openai", TType, OpenAINativeToolConfig<TType>>;
|
|
1471
|
+
type OpenAINativeToolBuilders = ReturnType<typeof createOpenAINativeToolBuilders>;
|
|
1472
|
+
declare function createOpenAINativeToolBuilders(): {
|
|
1473
|
+
webSearch: (config: OpenAINativeToolConfig<"web_search">) => OpenAINativeToolDefinition<"web_search">;
|
|
1474
|
+
webSearchPreview: (config: OpenAINativeToolConfig<"web_search_preview">) => OpenAINativeToolDefinition<"web_search_preview">;
|
|
1475
|
+
fileSearch: (config: OpenAINativeToolConfig<"file_search">) => OpenAINativeToolDefinition<"file_search">;
|
|
1476
|
+
codeInterpreter: (config: OpenAINativeToolConfig<"code_interpreter">) => OpenAINativeToolDefinition<"code_interpreter">;
|
|
1477
|
+
imageGeneration: (config: OpenAINativeToolConfig<"image_generation">) => OpenAINativeToolDefinition<"image_generation">;
|
|
1478
|
+
computerUsePreview: (config: OpenAINativeToolConfig<"computer_use_preview">) => OpenAINativeToolDefinition<"computer_use_preview">;
|
|
1479
|
+
mcp: (config: OpenAINativeToolConfig<"mcp">) => OpenAINativeToolDefinition<"mcp">;
|
|
1480
|
+
shell: (config?: {}) => OpenAINativeToolDefinition<"shell">;
|
|
1481
|
+
localShell: (config?: {}) => OpenAINativeToolDefinition<"local_shell">;
|
|
1482
|
+
applyPatch: (config?: {}) => OpenAINativeToolDefinition<"apply_patch">;
|
|
1483
|
+
toolSearch: (config?: OpenAINativeToolConfig<"tool_search">) => OpenAINativeToolDefinition<"tool_search">;
|
|
1484
|
+
custom: (config: OpenAINativeToolConfig<"custom">) => OpenAINativeToolDefinition<"custom">;
|
|
1485
|
+
};
|
|
1486
|
+
//#endregion
|
|
1487
|
+
//#region src/openai/videos/schemas.d.ts
|
|
1488
|
+
declare const OpenAIVideoModels: z.ZodEnum<{
|
|
1489
|
+
"sora-2": "sora-2";
|
|
1490
|
+
"sora-2-pro": "sora-2-pro";
|
|
1491
|
+
}>;
|
|
1492
|
+
type OpenAIVideoModels = z.infer<typeof OpenAIVideoModels>;
|
|
1493
|
+
declare const OpenAICreateVideoSchema: z.ZodObject<{
|
|
1494
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
|
|
1495
|
+
"sora-2": "sora-2";
|
|
1496
|
+
"sora-2-pro": "sora-2-pro";
|
|
1497
|
+
}>]>>;
|
|
1498
|
+
prompt: z.ZodString;
|
|
1499
|
+
input_reference: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
seconds: z.ZodOptional<z.ZodEnum<{
|
|
1501
|
+
4: "4";
|
|
1502
|
+
8: "8";
|
|
1503
|
+
12: "12";
|
|
1504
|
+
}>>;
|
|
1505
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
1506
|
+
"1792x1024": "1792x1024";
|
|
1507
|
+
"1024x1792": "1024x1792";
|
|
1508
|
+
"720x1280": "720x1280";
|
|
1509
|
+
"1280x720": "1280x720";
|
|
1510
|
+
}>>;
|
|
1511
|
+
}, z.core.$strip>;
|
|
1512
|
+
type OpenAICreateVideoSchema = z.input<typeof OpenAICreateVideoSchema>;
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region src/openai/videos/types.d.ts
|
|
1515
|
+
type OpenAIVideoCaps = {
|
|
1516
|
+
inputModalities: {
|
|
1517
|
+
text: true;
|
|
1518
|
+
image: true;
|
|
1519
|
+
};
|
|
1520
|
+
inputShape: "prompt";
|
|
1521
|
+
replayMode: "single_turn_persistent";
|
|
1522
|
+
supportsInstruction: false;
|
|
1523
|
+
outputModalities: {
|
|
1524
|
+
video: true;
|
|
1525
|
+
};
|
|
1526
|
+
additionalSupportedRoles: readonly ["developer"];
|
|
1527
|
+
};
|
|
1528
|
+
type OpenAIVideoEndpointOptions = {
|
|
1529
|
+
input_reference?: OpenAICreateVideoSchema["input_reference"];
|
|
1530
|
+
seconds?: OpenAICreateVideoSchema["seconds"];
|
|
1531
|
+
size?: OpenAICreateVideoSchema["size"];
|
|
1532
|
+
pollIntervalMs?: number;
|
|
1533
|
+
pollTimeoutMs?: number;
|
|
1534
|
+
};
|
|
1535
|
+
//#endregion
|
|
1536
|
+
//#region src/openai/types.d.ts
|
|
1537
|
+
type OpenAIUploadableFile = Blob | File | Uint8Array | ArrayBuffer;
|
|
1538
|
+
type OpenAIFileUploadRequest = {
|
|
1539
|
+
file: OpenAIUploadableFile;
|
|
1540
|
+
filename?: string;
|
|
1541
|
+
mimeType?: string;
|
|
1542
|
+
purpose?: string;
|
|
1543
|
+
};
|
|
1544
|
+
interface OpenAIFilesClient {
|
|
1545
|
+
/** Uploads a file and returns the provider-managed file object. */
|
|
1546
|
+
upload(body: OpenAIFileUploadRequest, options?: {
|
|
1547
|
+
signal?: AbortSignal | null;
|
|
1548
|
+
}): Promise<Result<OpenAIFileObject, BetterAgentError>>;
|
|
1549
|
+
/** Lists files available to the current OpenAI project. */
|
|
1550
|
+
list(options?: {
|
|
1551
|
+
signal?: AbortSignal | null;
|
|
1552
|
+
}): Promise<Result<OpenAIFileList, BetterAgentError>>;
|
|
1553
|
+
/** Retrieves metadata for a single OpenAI file id. */
|
|
1554
|
+
retrieve(fileId: string, options?: {
|
|
1555
|
+
signal?: AbortSignal | null;
|
|
1556
|
+
}): Promise<Result<OpenAIFileObject, BetterAgentError>>;
|
|
1557
|
+
/** Deletes a provider-managed OpenAI file. */
|
|
1558
|
+
delete(fileId: string, options?: {
|
|
1559
|
+
signal?: AbortSignal | null;
|
|
1560
|
+
}): Promise<Result<OpenAIDeleteFileResponse, BetterAgentError>>;
|
|
1561
|
+
/** Downloads raw file content for a provider-managed OpenAI file. */
|
|
1562
|
+
content(fileId: string, options?: {
|
|
1563
|
+
signal?: AbortSignal | null;
|
|
1564
|
+
}): Promise<Result<{
|
|
1565
|
+
data: ArrayBuffer;
|
|
1566
|
+
mimeType: string;
|
|
1567
|
+
}, BetterAgentError>>;
|
|
1568
|
+
}
|
|
1569
|
+
type SuggestedModelId<TKnown extends string> = TKnown | (string & {});
|
|
1570
|
+
type OpenAIKnownModelId = OpenAIResponseModels | OpenAIImageModels | OpenAIVideoModels | OpenAIAudioSpeechModels | OpenAIAudioTranscriptionModels | OpenAIEmbeddingModels;
|
|
1571
|
+
type OpenAIResponseModelId = SuggestedModelId<OpenAIResponseModels>;
|
|
1572
|
+
type OpenAIImageModelId = SuggestedModelId<OpenAIImageModels>;
|
|
1573
|
+
type OpenAIVideoModelId = SuggestedModelId<OpenAIVideoModels>;
|
|
1574
|
+
type OpenAIAudioSpeechModelId = SuggestedModelId<OpenAIAudioSpeechModels>;
|
|
1575
|
+
type OpenAIAudioTranscriptionModelId = SuggestedModelId<OpenAIAudioTranscriptionModels>;
|
|
1576
|
+
type OpenAIEmbeddingModelId = SuggestedModelId<OpenAIEmbeddingModels>;
|
|
1577
|
+
type OpenAIModelId = SuggestedModelId<OpenAIKnownModelId>;
|
|
1578
|
+
type OpenAIRouteHint = "responses" | "images" | "videos" | "audio.speech" | "audio.transcription" | "embeddings";
|
|
1579
|
+
type OpenAICapsFor<M extends OpenAIModelId> = M extends OpenAIResponseModels ? OpenAIResponseCaps : M extends OpenAIImageModels ? OpenAIImageCaps : M extends OpenAIVideoModels ? OpenAIVideoCaps : M extends OpenAIAudioSpeechModels ? OpenAIAudioSpeechCaps : M extends OpenAIAudioTranscriptionModels ? OpenAIAudioTranscriptionCaps : M extends OpenAIEmbeddingModels ? OpenAIEmbeddingCaps : OpenAIResponseCaps;
|
|
1580
|
+
type OpenAIOptionsFor<M extends OpenAIModelId> = M extends OpenAIResponseModels ? OpenAIResponseEndpointOptions : M extends OpenAIImageModels ? OpenAIImageEndpointOptions : M extends OpenAIVideoModels ? OpenAIVideoEndpointOptions : M extends OpenAIAudioSpeechModels ? OpenAIAudioSpeechEndpointOptions : M extends OpenAIAudioTranscriptionModels ? OpenAIAudioTranscriptionEndpointOptions : M extends OpenAIEmbeddingModels ? OpenAIEmbeddingEndpointOptions : OpenAIResponseEndpointOptions;
|
|
1581
|
+
type OpenAIModelsDescriptor = { [M in OpenAIKnownModelId]: ModelDescriptor<OpenAIOptionsFor<M>, OpenAICapsFor<M>> };
|
|
1582
|
+
type OpenAIGenerativeModel<M extends OpenAIModelId> = GenerativeModel<OpenAIOptionsFor<M>, "openai", M, OpenAICapsFor<M>>;
|
|
1583
|
+
type OpenAIResponseGenerativeModel<M extends OpenAIResponseModelId = OpenAIResponseModelId> = GenerativeModel<OpenAIResponseEndpointOptions, "openai", M, OpenAIResponseCaps>;
|
|
1584
|
+
type OpenAIImageGenerativeModel<M extends OpenAIImageModelId = OpenAIImageModelId> = GenerativeModel<OpenAIImageEndpointOptions, "openai", M, OpenAIImageCaps>;
|
|
1585
|
+
type OpenAIVideoGenerativeModel<M extends OpenAIVideoModelId = OpenAIVideoModelId> = GenerativeModel<OpenAIVideoEndpointOptions, "openai", M, OpenAIVideoCaps>;
|
|
1586
|
+
type OpenAIAudioSpeechGenerativeModel<M extends OpenAIAudioSpeechModelId = OpenAIAudioSpeechModelId> = GenerativeModel<OpenAIAudioSpeechEndpointOptions, "openai", M, OpenAIAudioSpeechCaps>;
|
|
1587
|
+
type OpenAIAudioTranscriptionGenerativeModel<M extends OpenAIAudioTranscriptionModelId = OpenAIAudioTranscriptionModelId> = GenerativeModel<OpenAIAudioTranscriptionEndpointOptions, "openai", M, OpenAIAudioTranscriptionCaps>;
|
|
1588
|
+
type OpenAIEmbeddingGenerativeModel<M extends OpenAIEmbeddingModelId = OpenAIEmbeddingModelId> = GenerativeModel<OpenAIEmbeddingEndpointOptions, "openai", M, OpenAIEmbeddingCaps>;
|
|
1589
|
+
interface OpenAIProvider {
|
|
1590
|
+
readonly id: "openai";
|
|
1591
|
+
readonly tools: OpenAINativeToolBuilders;
|
|
1592
|
+
readonly files: OpenAIFilesClient;
|
|
1593
|
+
model<M extends OpenAIKnownModelId>(modelId: M): OpenAIGenerativeModel<M>;
|
|
1594
|
+
model<M extends OpenAIModelId>(modelId: M): OpenAIGenerativeModel<M>;
|
|
1595
|
+
text<M extends OpenAIResponseModels>(modelId: M): OpenAIResponseGenerativeModel<M>;
|
|
1596
|
+
text<M extends OpenAIResponseModelId>(modelId: M): OpenAIResponseGenerativeModel<M>;
|
|
1597
|
+
image<M extends OpenAIImageModels>(modelId: M): OpenAIImageGenerativeModel<M>;
|
|
1598
|
+
image<M extends OpenAIImageModelId>(modelId: M): OpenAIImageGenerativeModel<M>;
|
|
1599
|
+
video<M extends OpenAIVideoModels>(modelId: M): OpenAIVideoGenerativeModel<M>;
|
|
1600
|
+
video<M extends OpenAIVideoModelId>(modelId: M): OpenAIVideoGenerativeModel<M>;
|
|
1601
|
+
audio<M extends OpenAIAudioSpeechModels>(modelId: M): OpenAIAudioSpeechGenerativeModel<M>;
|
|
1602
|
+
audio<M extends OpenAIAudioSpeechModelId>(modelId: M): OpenAIAudioSpeechGenerativeModel<M>;
|
|
1603
|
+
transcription<M extends OpenAIAudioTranscriptionModels>(modelId: M): OpenAIAudioTranscriptionGenerativeModel<M>;
|
|
1604
|
+
transcription<M extends OpenAIAudioTranscriptionModelId>(modelId: M): OpenAIAudioTranscriptionGenerativeModel<M>;
|
|
1605
|
+
embedding<M extends OpenAIEmbeddingModels>(modelId: M): OpenAIEmbeddingGenerativeModel<M>;
|
|
1606
|
+
embedding<M extends OpenAIEmbeddingModelId>(modelId: M): OpenAIEmbeddingGenerativeModel<M>;
|
|
1607
|
+
}
|
|
1608
|
+
type OpenAICallOptions<M extends OpenAIModelId, TModalities extends ModalitiesParam<OpenAICapsFor<M>> = undefined> = GenerativeModelCallOptions<OpenAICapsFor<M>, OpenAIOptionsFor<M>, TModalities>;
|
|
1609
|
+
interface OpenAIConfig {
|
|
1610
|
+
baseURL?: string;
|
|
1611
|
+
apiKey?: string;
|
|
1612
|
+
organization?: string;
|
|
1613
|
+
project?: string;
|
|
1614
|
+
headers?: Record<string, string>;
|
|
1615
|
+
}
|
|
1616
|
+
interface OpenAIError {
|
|
1617
|
+
error: {
|
|
1618
|
+
message: string;
|
|
1619
|
+
type: string;
|
|
1620
|
+
param: string | null;
|
|
1621
|
+
code: string;
|
|
1622
|
+
};
|
|
1623
|
+
}
|
|
1624
|
+
//#endregion
|
|
1625
|
+
//#region src/openai/provider.d.ts
|
|
1626
|
+
declare const createOpenAI: (config: OpenAIConfig) => OpenAIProvider;
|
|
1627
|
+
//#endregion
|
|
1628
|
+
export { type OpenAIAudioSpeechCaps, type OpenAIAudioSpeechEndpointOptions, OpenAIAudioSpeechGenerativeModel, OpenAIAudioSpeechModelId, type OpenAIAudioTranscriptionCaps, type OpenAIAudioTranscriptionEndpointOptions, OpenAIAudioTranscriptionGenerativeModel, OpenAIAudioTranscriptionModelId, OpenAICallOptions, OpenAICapsFor, OpenAIConfig, type OpenAIEmbeddingCaps, type OpenAIEmbeddingEndpointOptions, OpenAIEmbeddingGenerativeModel, OpenAIEmbeddingModelId, OpenAIError, OpenAIFileUploadRequest, OpenAIFilesClient, OpenAIGenerativeModel, type OpenAIImageCaps, type OpenAIImageEndpointOptions, OpenAIImageGenerativeModel, OpenAIImageModelId, OpenAIModelId, OpenAIModelsDescriptor, OpenAIOptionsFor, OpenAIProvider, type OpenAIResponseCaps, type OpenAIResponseEndpointOptions, OpenAIResponseGenerativeModel, OpenAIResponseModelId, OpenAIRouteHint, OpenAIUploadableFile, type OpenAIVideoCaps, type OpenAIVideoEndpointOptions, OpenAIVideoGenerativeModel, OpenAIVideoModelId, createOpenAI };
|
|
1629
|
+
//# sourceMappingURL=index.d.mts.map
|