@ai-sdk/openai 3.0.0-beta.23 → 3.0.0-beta.24
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/CHANGELOG.md +7 -0
- package/dist/index.js +654 -664
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -21
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +653 -663
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +20 -20
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/internal/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/internal/index.ts
|
|
@@ -63,17 +53,17 @@ var import_provider3 = require("@ai-sdk/provider");
|
|
|
63
53
|
var import_provider_utils5 = require("@ai-sdk/provider-utils");
|
|
64
54
|
|
|
65
55
|
// src/openai-error.ts
|
|
66
|
-
var
|
|
56
|
+
var import_v4 = require("zod/v4");
|
|
67
57
|
var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
68
|
-
var openaiErrorDataSchema = z.object({
|
|
69
|
-
error: z.object({
|
|
70
|
-
message: z.string(),
|
|
58
|
+
var openaiErrorDataSchema = import_v4.z.object({
|
|
59
|
+
error: import_v4.z.object({
|
|
60
|
+
message: import_v4.z.string(),
|
|
71
61
|
// The additional information below is handled loosely to support
|
|
72
62
|
// OpenAI-compatible providers that have slightly different error
|
|
73
63
|
// responses:
|
|
74
|
-
type: z.string().nullish(),
|
|
75
|
-
param: z.any().nullish(),
|
|
76
|
-
code: z.union([z.string(), z.number()]).nullish()
|
|
64
|
+
type: import_v4.z.string().nullish(),
|
|
65
|
+
param: import_v4.z.any().nullish(),
|
|
66
|
+
code: import_v4.z.union([import_v4.z.string(), import_v4.z.number()]).nullish()
|
|
77
67
|
})
|
|
78
68
|
});
|
|
79
69
|
var openaiFailedResponseHandler = (0, import_provider_utils.createJsonErrorResponseHandler)({
|
|
@@ -295,67 +285,67 @@ function mapOpenAIFinishReason(finishReason) {
|
|
|
295
285
|
|
|
296
286
|
// src/chat/openai-chat-api.ts
|
|
297
287
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
298
|
-
var
|
|
288
|
+
var import_v42 = require("zod/v4");
|
|
299
289
|
var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
|
|
300
290
|
() => (0, import_provider_utils3.zodSchema)(
|
|
301
|
-
|
|
302
|
-
id:
|
|
303
|
-
created:
|
|
304
|
-
model:
|
|
305
|
-
choices:
|
|
306
|
-
|
|
307
|
-
message:
|
|
308
|
-
role:
|
|
309
|
-
content:
|
|
310
|
-
tool_calls:
|
|
311
|
-
|
|
312
|
-
id:
|
|
313
|
-
type:
|
|
314
|
-
function:
|
|
315
|
-
name:
|
|
316
|
-
arguments:
|
|
291
|
+
import_v42.z.object({
|
|
292
|
+
id: import_v42.z.string().nullish(),
|
|
293
|
+
created: import_v42.z.number().nullish(),
|
|
294
|
+
model: import_v42.z.string().nullish(),
|
|
295
|
+
choices: import_v42.z.array(
|
|
296
|
+
import_v42.z.object({
|
|
297
|
+
message: import_v42.z.object({
|
|
298
|
+
role: import_v42.z.literal("assistant").nullish(),
|
|
299
|
+
content: import_v42.z.string().nullish(),
|
|
300
|
+
tool_calls: import_v42.z.array(
|
|
301
|
+
import_v42.z.object({
|
|
302
|
+
id: import_v42.z.string().nullish(),
|
|
303
|
+
type: import_v42.z.literal("function"),
|
|
304
|
+
function: import_v42.z.object({
|
|
305
|
+
name: import_v42.z.string(),
|
|
306
|
+
arguments: import_v42.z.string()
|
|
317
307
|
})
|
|
318
308
|
})
|
|
319
309
|
).nullish(),
|
|
320
|
-
annotations:
|
|
321
|
-
|
|
322
|
-
type:
|
|
323
|
-
start_index:
|
|
324
|
-
end_index:
|
|
325
|
-
url:
|
|
326
|
-
title:
|
|
310
|
+
annotations: import_v42.z.array(
|
|
311
|
+
import_v42.z.object({
|
|
312
|
+
type: import_v42.z.literal("url_citation"),
|
|
313
|
+
start_index: import_v42.z.number(),
|
|
314
|
+
end_index: import_v42.z.number(),
|
|
315
|
+
url: import_v42.z.string(),
|
|
316
|
+
title: import_v42.z.string()
|
|
327
317
|
})
|
|
328
318
|
).nullish()
|
|
329
319
|
}),
|
|
330
|
-
index:
|
|
331
|
-
logprobs:
|
|
332
|
-
content:
|
|
333
|
-
|
|
334
|
-
token:
|
|
335
|
-
logprob:
|
|
336
|
-
top_logprobs:
|
|
337
|
-
|
|
338
|
-
token:
|
|
339
|
-
logprob:
|
|
320
|
+
index: import_v42.z.number(),
|
|
321
|
+
logprobs: import_v42.z.object({
|
|
322
|
+
content: import_v42.z.array(
|
|
323
|
+
import_v42.z.object({
|
|
324
|
+
token: import_v42.z.string(),
|
|
325
|
+
logprob: import_v42.z.number(),
|
|
326
|
+
top_logprobs: import_v42.z.array(
|
|
327
|
+
import_v42.z.object({
|
|
328
|
+
token: import_v42.z.string(),
|
|
329
|
+
logprob: import_v42.z.number()
|
|
340
330
|
})
|
|
341
331
|
)
|
|
342
332
|
})
|
|
343
333
|
).nullish()
|
|
344
334
|
}).nullish(),
|
|
345
|
-
finish_reason:
|
|
335
|
+
finish_reason: import_v42.z.string().nullish()
|
|
346
336
|
})
|
|
347
337
|
),
|
|
348
|
-
usage:
|
|
349
|
-
prompt_tokens:
|
|
350
|
-
completion_tokens:
|
|
351
|
-
total_tokens:
|
|
352
|
-
prompt_tokens_details:
|
|
353
|
-
cached_tokens:
|
|
338
|
+
usage: import_v42.z.object({
|
|
339
|
+
prompt_tokens: import_v42.z.number().nullish(),
|
|
340
|
+
completion_tokens: import_v42.z.number().nullish(),
|
|
341
|
+
total_tokens: import_v42.z.number().nullish(),
|
|
342
|
+
prompt_tokens_details: import_v42.z.object({
|
|
343
|
+
cached_tokens: import_v42.z.number().nullish()
|
|
354
344
|
}).nullish(),
|
|
355
|
-
completion_tokens_details:
|
|
356
|
-
reasoning_tokens:
|
|
357
|
-
accepted_prediction_tokens:
|
|
358
|
-
rejected_prediction_tokens:
|
|
345
|
+
completion_tokens_details: import_v42.z.object({
|
|
346
|
+
reasoning_tokens: import_v42.z.number().nullish(),
|
|
347
|
+
accepted_prediction_tokens: import_v42.z.number().nullish(),
|
|
348
|
+
rejected_prediction_tokens: import_v42.z.number().nullish()
|
|
359
349
|
}).nullish()
|
|
360
350
|
}).nullish()
|
|
361
351
|
})
|
|
@@ -363,66 +353,66 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
|
|
|
363
353
|
);
|
|
364
354
|
var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
|
|
365
355
|
() => (0, import_provider_utils3.zodSchema)(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
id:
|
|
369
|
-
created:
|
|
370
|
-
model:
|
|
371
|
-
choices:
|
|
372
|
-
|
|
373
|
-
delta:
|
|
374
|
-
role:
|
|
375
|
-
content:
|
|
376
|
-
tool_calls:
|
|
377
|
-
|
|
378
|
-
index:
|
|
379
|
-
id:
|
|
380
|
-
type:
|
|
381
|
-
function:
|
|
382
|
-
name:
|
|
383
|
-
arguments:
|
|
356
|
+
import_v42.z.union([
|
|
357
|
+
import_v42.z.object({
|
|
358
|
+
id: import_v42.z.string().nullish(),
|
|
359
|
+
created: import_v42.z.number().nullish(),
|
|
360
|
+
model: import_v42.z.string().nullish(),
|
|
361
|
+
choices: import_v42.z.array(
|
|
362
|
+
import_v42.z.object({
|
|
363
|
+
delta: import_v42.z.object({
|
|
364
|
+
role: import_v42.z.enum(["assistant"]).nullish(),
|
|
365
|
+
content: import_v42.z.string().nullish(),
|
|
366
|
+
tool_calls: import_v42.z.array(
|
|
367
|
+
import_v42.z.object({
|
|
368
|
+
index: import_v42.z.number(),
|
|
369
|
+
id: import_v42.z.string().nullish(),
|
|
370
|
+
type: import_v42.z.literal("function").nullish(),
|
|
371
|
+
function: import_v42.z.object({
|
|
372
|
+
name: import_v42.z.string().nullish(),
|
|
373
|
+
arguments: import_v42.z.string().nullish()
|
|
384
374
|
})
|
|
385
375
|
})
|
|
386
376
|
).nullish(),
|
|
387
|
-
annotations:
|
|
388
|
-
|
|
389
|
-
type:
|
|
390
|
-
start_index:
|
|
391
|
-
end_index:
|
|
392
|
-
url:
|
|
393
|
-
title:
|
|
377
|
+
annotations: import_v42.z.array(
|
|
378
|
+
import_v42.z.object({
|
|
379
|
+
type: import_v42.z.literal("url_citation"),
|
|
380
|
+
start_index: import_v42.z.number(),
|
|
381
|
+
end_index: import_v42.z.number(),
|
|
382
|
+
url: import_v42.z.string(),
|
|
383
|
+
title: import_v42.z.string()
|
|
394
384
|
})
|
|
395
385
|
).nullish()
|
|
396
386
|
}).nullish(),
|
|
397
|
-
logprobs:
|
|
398
|
-
content:
|
|
399
|
-
|
|
400
|
-
token:
|
|
401
|
-
logprob:
|
|
402
|
-
top_logprobs:
|
|
403
|
-
|
|
404
|
-
token:
|
|
405
|
-
logprob:
|
|
387
|
+
logprobs: import_v42.z.object({
|
|
388
|
+
content: import_v42.z.array(
|
|
389
|
+
import_v42.z.object({
|
|
390
|
+
token: import_v42.z.string(),
|
|
391
|
+
logprob: import_v42.z.number(),
|
|
392
|
+
top_logprobs: import_v42.z.array(
|
|
393
|
+
import_v42.z.object({
|
|
394
|
+
token: import_v42.z.string(),
|
|
395
|
+
logprob: import_v42.z.number()
|
|
406
396
|
})
|
|
407
397
|
)
|
|
408
398
|
})
|
|
409
399
|
).nullish()
|
|
410
400
|
}).nullish(),
|
|
411
|
-
finish_reason:
|
|
412
|
-
index:
|
|
401
|
+
finish_reason: import_v42.z.string().nullish(),
|
|
402
|
+
index: import_v42.z.number()
|
|
413
403
|
})
|
|
414
404
|
),
|
|
415
|
-
usage:
|
|
416
|
-
prompt_tokens:
|
|
417
|
-
completion_tokens:
|
|
418
|
-
total_tokens:
|
|
419
|
-
prompt_tokens_details:
|
|
420
|
-
cached_tokens:
|
|
405
|
+
usage: import_v42.z.object({
|
|
406
|
+
prompt_tokens: import_v42.z.number().nullish(),
|
|
407
|
+
completion_tokens: import_v42.z.number().nullish(),
|
|
408
|
+
total_tokens: import_v42.z.number().nullish(),
|
|
409
|
+
prompt_tokens_details: import_v42.z.object({
|
|
410
|
+
cached_tokens: import_v42.z.number().nullish()
|
|
421
411
|
}).nullish(),
|
|
422
|
-
completion_tokens_details:
|
|
423
|
-
reasoning_tokens:
|
|
424
|
-
accepted_prediction_tokens:
|
|
425
|
-
rejected_prediction_tokens:
|
|
412
|
+
completion_tokens_details: import_v42.z.object({
|
|
413
|
+
reasoning_tokens: import_v42.z.number().nullish(),
|
|
414
|
+
accepted_prediction_tokens: import_v42.z.number().nullish(),
|
|
415
|
+
rejected_prediction_tokens: import_v42.z.number().nullish()
|
|
426
416
|
}).nullish()
|
|
427
417
|
}).nullish()
|
|
428
418
|
}),
|
|
@@ -433,17 +423,17 @@ var openaiChatChunkSchema = (0, import_provider_utils3.lazyValidator)(
|
|
|
433
423
|
|
|
434
424
|
// src/chat/openai-chat-options.ts
|
|
435
425
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
436
|
-
var
|
|
426
|
+
var import_v43 = require("zod/v4");
|
|
437
427
|
var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
|
|
438
428
|
() => (0, import_provider_utils4.zodSchema)(
|
|
439
|
-
|
|
429
|
+
import_v43.z.object({
|
|
440
430
|
/**
|
|
441
431
|
* Modify the likelihood of specified tokens appearing in the completion.
|
|
442
432
|
*
|
|
443
433
|
* Accepts a JSON object that maps tokens (specified by their token ID in
|
|
444
434
|
* the GPT tokenizer) to an associated bias value from -100 to 100.
|
|
445
435
|
*/
|
|
446
|
-
logitBias:
|
|
436
|
+
logitBias: import_v43.z.record(import_v43.z.coerce.number(), import_v43.z.number()).optional(),
|
|
447
437
|
/**
|
|
448
438
|
* Return the log probabilities of the tokens.
|
|
449
439
|
*
|
|
@@ -453,42 +443,42 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
|
|
|
453
443
|
* Setting to a number will return the log probabilities of the top n
|
|
454
444
|
* tokens that were generated.
|
|
455
445
|
*/
|
|
456
|
-
logprobs:
|
|
446
|
+
logprobs: import_v43.z.union([import_v43.z.boolean(), import_v43.z.number()]).optional(),
|
|
457
447
|
/**
|
|
458
448
|
* Whether to enable parallel function calling during tool use. Default to true.
|
|
459
449
|
*/
|
|
460
|
-
parallelToolCalls:
|
|
450
|
+
parallelToolCalls: import_v43.z.boolean().optional(),
|
|
461
451
|
/**
|
|
462
452
|
* A unique identifier representing your end-user, which can help OpenAI to
|
|
463
453
|
* monitor and detect abuse.
|
|
464
454
|
*/
|
|
465
|
-
user:
|
|
455
|
+
user: import_v43.z.string().optional(),
|
|
466
456
|
/**
|
|
467
457
|
* Reasoning effort for reasoning models. Defaults to `medium`.
|
|
468
458
|
*/
|
|
469
|
-
reasoningEffort:
|
|
459
|
+
reasoningEffort: import_v43.z.enum(["minimal", "low", "medium", "high"]).optional(),
|
|
470
460
|
/**
|
|
471
461
|
* Maximum number of completion tokens to generate. Useful for reasoning models.
|
|
472
462
|
*/
|
|
473
|
-
maxCompletionTokens:
|
|
463
|
+
maxCompletionTokens: import_v43.z.number().optional(),
|
|
474
464
|
/**
|
|
475
465
|
* Whether to enable persistence in responses API.
|
|
476
466
|
*/
|
|
477
|
-
store:
|
|
467
|
+
store: import_v43.z.boolean().optional(),
|
|
478
468
|
/**
|
|
479
469
|
* Metadata to associate with the request.
|
|
480
470
|
*/
|
|
481
|
-
metadata:
|
|
471
|
+
metadata: import_v43.z.record(import_v43.z.string().max(64), import_v43.z.string().max(512)).optional(),
|
|
482
472
|
/**
|
|
483
473
|
* Parameters for prediction mode.
|
|
484
474
|
*/
|
|
485
|
-
prediction:
|
|
475
|
+
prediction: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
|
|
486
476
|
/**
|
|
487
477
|
* Whether to use structured outputs.
|
|
488
478
|
*
|
|
489
479
|
* @default true
|
|
490
480
|
*/
|
|
491
|
-
structuredOutputs:
|
|
481
|
+
structuredOutputs: import_v43.z.boolean().optional(),
|
|
492
482
|
/**
|
|
493
483
|
* Service tier for the request.
|
|
494
484
|
* - 'auto': Default service tier. The request will be processed with the service tier configured in the
|
|
@@ -499,23 +489,23 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
|
|
|
499
489
|
*
|
|
500
490
|
* @default 'auto'
|
|
501
491
|
*/
|
|
502
|
-
serviceTier:
|
|
492
|
+
serviceTier: import_v43.z.enum(["auto", "flex", "priority", "default"]).optional(),
|
|
503
493
|
/**
|
|
504
494
|
* Whether to use strict JSON schema validation.
|
|
505
495
|
*
|
|
506
496
|
* @default false
|
|
507
497
|
*/
|
|
508
|
-
strictJsonSchema:
|
|
498
|
+
strictJsonSchema: import_v43.z.boolean().optional(),
|
|
509
499
|
/**
|
|
510
500
|
* Controls the verbosity of the model's responses.
|
|
511
501
|
* Lower values will result in more concise responses, while higher values will result in more verbose responses.
|
|
512
502
|
*/
|
|
513
|
-
textVerbosity:
|
|
503
|
+
textVerbosity: import_v43.z.enum(["low", "medium", "high"]).optional(),
|
|
514
504
|
/**
|
|
515
505
|
* A cache key for prompt caching. Allows manual control over prompt caching behavior.
|
|
516
506
|
* Useful for improving cache hit rates and working around automatic caching issues.
|
|
517
507
|
*/
|
|
518
|
-
promptCacheKey:
|
|
508
|
+
promptCacheKey: import_v43.z.string().optional(),
|
|
519
509
|
/**
|
|
520
510
|
* A stable identifier used to help detect users of your application
|
|
521
511
|
* that may be violating OpenAI's usage policies. The IDs should be a
|
|
@@ -523,7 +513,7 @@ var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
|
|
|
523
513
|
* username or email address, in order to avoid sending us any identifying
|
|
524
514
|
* information.
|
|
525
515
|
*/
|
|
526
|
-
safetyIdentifier:
|
|
516
|
+
safetyIdentifier: import_v43.z.string().optional()
|
|
527
517
|
})
|
|
528
518
|
)
|
|
529
519
|
);
|
|
@@ -1240,56 +1230,56 @@ function mapOpenAIFinishReason2(finishReason) {
|
|
|
1240
1230
|
}
|
|
1241
1231
|
|
|
1242
1232
|
// src/completion/openai-completion-api.ts
|
|
1243
|
-
var
|
|
1233
|
+
var import_v44 = require("zod/v4");
|
|
1244
1234
|
var import_provider_utils6 = require("@ai-sdk/provider-utils");
|
|
1245
1235
|
var openaiCompletionResponseSchema = (0, import_provider_utils6.lazyValidator)(
|
|
1246
1236
|
() => (0, import_provider_utils6.zodSchema)(
|
|
1247
|
-
|
|
1248
|
-
id:
|
|
1249
|
-
created:
|
|
1250
|
-
model:
|
|
1251
|
-
choices:
|
|
1252
|
-
|
|
1253
|
-
text:
|
|
1254
|
-
finish_reason:
|
|
1255
|
-
logprobs:
|
|
1256
|
-
tokens:
|
|
1257
|
-
token_logprobs:
|
|
1258
|
-
top_logprobs:
|
|
1237
|
+
import_v44.z.object({
|
|
1238
|
+
id: import_v44.z.string().nullish(),
|
|
1239
|
+
created: import_v44.z.number().nullish(),
|
|
1240
|
+
model: import_v44.z.string().nullish(),
|
|
1241
|
+
choices: import_v44.z.array(
|
|
1242
|
+
import_v44.z.object({
|
|
1243
|
+
text: import_v44.z.string(),
|
|
1244
|
+
finish_reason: import_v44.z.string(),
|
|
1245
|
+
logprobs: import_v44.z.object({
|
|
1246
|
+
tokens: import_v44.z.array(import_v44.z.string()),
|
|
1247
|
+
token_logprobs: import_v44.z.array(import_v44.z.number()),
|
|
1248
|
+
top_logprobs: import_v44.z.array(import_v44.z.record(import_v44.z.string(), import_v44.z.number())).nullish()
|
|
1259
1249
|
}).nullish()
|
|
1260
1250
|
})
|
|
1261
1251
|
),
|
|
1262
|
-
usage:
|
|
1263
|
-
prompt_tokens:
|
|
1264
|
-
completion_tokens:
|
|
1265
|
-
total_tokens:
|
|
1252
|
+
usage: import_v44.z.object({
|
|
1253
|
+
prompt_tokens: import_v44.z.number(),
|
|
1254
|
+
completion_tokens: import_v44.z.number(),
|
|
1255
|
+
total_tokens: import_v44.z.number()
|
|
1266
1256
|
}).nullish()
|
|
1267
1257
|
})
|
|
1268
1258
|
)
|
|
1269
1259
|
);
|
|
1270
1260
|
var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
|
|
1271
1261
|
() => (0, import_provider_utils6.zodSchema)(
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
id:
|
|
1275
|
-
created:
|
|
1276
|
-
model:
|
|
1277
|
-
choices:
|
|
1278
|
-
|
|
1279
|
-
text:
|
|
1280
|
-
finish_reason:
|
|
1281
|
-
index:
|
|
1282
|
-
logprobs:
|
|
1283
|
-
tokens:
|
|
1284
|
-
token_logprobs:
|
|
1285
|
-
top_logprobs:
|
|
1262
|
+
import_v44.z.union([
|
|
1263
|
+
import_v44.z.object({
|
|
1264
|
+
id: import_v44.z.string().nullish(),
|
|
1265
|
+
created: import_v44.z.number().nullish(),
|
|
1266
|
+
model: import_v44.z.string().nullish(),
|
|
1267
|
+
choices: import_v44.z.array(
|
|
1268
|
+
import_v44.z.object({
|
|
1269
|
+
text: import_v44.z.string(),
|
|
1270
|
+
finish_reason: import_v44.z.string().nullish(),
|
|
1271
|
+
index: import_v44.z.number(),
|
|
1272
|
+
logprobs: import_v44.z.object({
|
|
1273
|
+
tokens: import_v44.z.array(import_v44.z.string()),
|
|
1274
|
+
token_logprobs: import_v44.z.array(import_v44.z.number()),
|
|
1275
|
+
top_logprobs: import_v44.z.array(import_v44.z.record(import_v44.z.string(), import_v44.z.number())).nullish()
|
|
1286
1276
|
}).nullish()
|
|
1287
1277
|
})
|
|
1288
1278
|
),
|
|
1289
|
-
usage:
|
|
1290
|
-
prompt_tokens:
|
|
1291
|
-
completion_tokens:
|
|
1292
|
-
total_tokens:
|
|
1279
|
+
usage: import_v44.z.object({
|
|
1280
|
+
prompt_tokens: import_v44.z.number(),
|
|
1281
|
+
completion_tokens: import_v44.z.number(),
|
|
1282
|
+
total_tokens: import_v44.z.number()
|
|
1293
1283
|
}).nullish()
|
|
1294
1284
|
}),
|
|
1295
1285
|
openaiErrorDataSchema
|
|
@@ -1299,14 +1289,14 @@ var openaiCompletionChunkSchema = (0, import_provider_utils6.lazyValidator)(
|
|
|
1299
1289
|
|
|
1300
1290
|
// src/completion/openai-completion-options.ts
|
|
1301
1291
|
var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
1302
|
-
var
|
|
1292
|
+
var import_v45 = require("zod/v4");
|
|
1303
1293
|
var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
|
|
1304
1294
|
() => (0, import_provider_utils7.zodSchema)(
|
|
1305
|
-
|
|
1295
|
+
import_v45.z.object({
|
|
1306
1296
|
/**
|
|
1307
1297
|
Echo back the prompt in addition to the completion.
|
|
1308
1298
|
*/
|
|
1309
|
-
echo:
|
|
1299
|
+
echo: import_v45.z.boolean().optional(),
|
|
1310
1300
|
/**
|
|
1311
1301
|
Modify the likelihood of specified tokens appearing in the completion.
|
|
1312
1302
|
|
|
@@ -1321,16 +1311,16 @@ var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
|
|
|
1321
1311
|
As an example, you can pass {"50256": -100} to prevent the <|endoftext|>
|
|
1322
1312
|
token from being generated.
|
|
1323
1313
|
*/
|
|
1324
|
-
logitBias:
|
|
1314
|
+
logitBias: import_v45.z.record(import_v45.z.string(), import_v45.z.number()).optional(),
|
|
1325
1315
|
/**
|
|
1326
1316
|
The suffix that comes after a completion of inserted text.
|
|
1327
1317
|
*/
|
|
1328
|
-
suffix:
|
|
1318
|
+
suffix: import_v45.z.string().optional(),
|
|
1329
1319
|
/**
|
|
1330
1320
|
A unique identifier representing your end-user, which can help OpenAI to
|
|
1331
1321
|
monitor and detect abuse. Learn more.
|
|
1332
1322
|
*/
|
|
1333
|
-
user:
|
|
1323
|
+
user: import_v45.z.string().optional(),
|
|
1334
1324
|
/**
|
|
1335
1325
|
Return the log probabilities of the tokens. Including logprobs will increase
|
|
1336
1326
|
the response size and can slow down response times. However, it can
|
|
@@ -1340,7 +1330,7 @@ var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
|
|
|
1340
1330
|
Setting to a number will return the log probabilities of the top n
|
|
1341
1331
|
tokens that were generated.
|
|
1342
1332
|
*/
|
|
1343
|
-
logprobs:
|
|
1333
|
+
logprobs: import_v45.z.union([import_v45.z.boolean(), import_v45.z.number()]).optional()
|
|
1344
1334
|
})
|
|
1345
1335
|
)
|
|
1346
1336
|
);
|
|
@@ -1581,32 +1571,32 @@ var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
|
1581
1571
|
|
|
1582
1572
|
// src/embedding/openai-embedding-options.ts
|
|
1583
1573
|
var import_provider_utils9 = require("@ai-sdk/provider-utils");
|
|
1584
|
-
var
|
|
1574
|
+
var import_v46 = require("zod/v4");
|
|
1585
1575
|
var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazyValidator)(
|
|
1586
1576
|
() => (0, import_provider_utils9.zodSchema)(
|
|
1587
|
-
|
|
1577
|
+
import_v46.z.object({
|
|
1588
1578
|
/**
|
|
1589
1579
|
The number of dimensions the resulting output embeddings should have.
|
|
1590
1580
|
Only supported in text-embedding-3 and later models.
|
|
1591
1581
|
*/
|
|
1592
|
-
dimensions:
|
|
1582
|
+
dimensions: import_v46.z.number().optional(),
|
|
1593
1583
|
/**
|
|
1594
1584
|
A unique identifier representing your end-user, which can help OpenAI to
|
|
1595
1585
|
monitor and detect abuse. Learn more.
|
|
1596
1586
|
*/
|
|
1597
|
-
user:
|
|
1587
|
+
user: import_v46.z.string().optional()
|
|
1598
1588
|
})
|
|
1599
1589
|
)
|
|
1600
1590
|
);
|
|
1601
1591
|
|
|
1602
1592
|
// src/embedding/openai-embedding-api.ts
|
|
1603
1593
|
var import_provider_utils10 = require("@ai-sdk/provider-utils");
|
|
1604
|
-
var
|
|
1594
|
+
var import_v47 = require("zod/v4");
|
|
1605
1595
|
var openaiTextEmbeddingResponseSchema = (0, import_provider_utils10.lazyValidator)(
|
|
1606
1596
|
() => (0, import_provider_utils10.zodSchema)(
|
|
1607
|
-
|
|
1608
|
-
data:
|
|
1609
|
-
usage:
|
|
1597
|
+
import_v47.z.object({
|
|
1598
|
+
data: import_v47.z.array(import_v47.z.object({ embedding: import_v47.z.array(import_v47.z.number()) })),
|
|
1599
|
+
usage: import_v47.z.object({ prompt_tokens: import_v47.z.number() }).nullish()
|
|
1610
1600
|
})
|
|
1611
1601
|
)
|
|
1612
1602
|
);
|
|
@@ -1680,14 +1670,14 @@ var import_provider_utils13 = require("@ai-sdk/provider-utils");
|
|
|
1680
1670
|
|
|
1681
1671
|
// src/image/openai-image-api.ts
|
|
1682
1672
|
var import_provider_utils12 = require("@ai-sdk/provider-utils");
|
|
1683
|
-
var
|
|
1673
|
+
var import_v48 = require("zod/v4");
|
|
1684
1674
|
var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
|
|
1685
1675
|
() => (0, import_provider_utils12.zodSchema)(
|
|
1686
|
-
|
|
1687
|
-
data:
|
|
1688
|
-
|
|
1689
|
-
b64_json:
|
|
1690
|
-
revised_prompt:
|
|
1676
|
+
import_v48.z.object({
|
|
1677
|
+
data: import_v48.z.array(
|
|
1678
|
+
import_v48.z.object({
|
|
1679
|
+
b64_json: import_v48.z.string(),
|
|
1680
|
+
revised_prompt: import_v48.z.string().optional()
|
|
1691
1681
|
})
|
|
1692
1682
|
)
|
|
1693
1683
|
})
|
|
@@ -1790,32 +1780,32 @@ var import_provider_utils16 = require("@ai-sdk/provider-utils");
|
|
|
1790
1780
|
|
|
1791
1781
|
// src/transcription/openai-transcription-api.ts
|
|
1792
1782
|
var import_provider_utils14 = require("@ai-sdk/provider-utils");
|
|
1793
|
-
var
|
|
1783
|
+
var import_v49 = require("zod/v4");
|
|
1794
1784
|
var openaiTranscriptionResponseSchema = (0, import_provider_utils14.lazyValidator)(
|
|
1795
1785
|
() => (0, import_provider_utils14.zodSchema)(
|
|
1796
|
-
|
|
1797
|
-
text:
|
|
1798
|
-
language:
|
|
1799
|
-
duration:
|
|
1800
|
-
words:
|
|
1801
|
-
|
|
1802
|
-
word:
|
|
1803
|
-
start:
|
|
1804
|
-
end:
|
|
1786
|
+
import_v49.z.object({
|
|
1787
|
+
text: import_v49.z.string(),
|
|
1788
|
+
language: import_v49.z.string().nullish(),
|
|
1789
|
+
duration: import_v49.z.number().nullish(),
|
|
1790
|
+
words: import_v49.z.array(
|
|
1791
|
+
import_v49.z.object({
|
|
1792
|
+
word: import_v49.z.string(),
|
|
1793
|
+
start: import_v49.z.number(),
|
|
1794
|
+
end: import_v49.z.number()
|
|
1805
1795
|
})
|
|
1806
1796
|
).nullish(),
|
|
1807
|
-
segments:
|
|
1808
|
-
|
|
1809
|
-
id:
|
|
1810
|
-
seek:
|
|
1811
|
-
start:
|
|
1812
|
-
end:
|
|
1813
|
-
text:
|
|
1814
|
-
tokens:
|
|
1815
|
-
temperature:
|
|
1816
|
-
avg_logprob:
|
|
1817
|
-
compression_ratio:
|
|
1818
|
-
no_speech_prob:
|
|
1797
|
+
segments: import_v49.z.array(
|
|
1798
|
+
import_v49.z.object({
|
|
1799
|
+
id: import_v49.z.number(),
|
|
1800
|
+
seek: import_v49.z.number(),
|
|
1801
|
+
start: import_v49.z.number(),
|
|
1802
|
+
end: import_v49.z.number(),
|
|
1803
|
+
text: import_v49.z.string(),
|
|
1804
|
+
tokens: import_v49.z.array(import_v49.z.number()),
|
|
1805
|
+
temperature: import_v49.z.number(),
|
|
1806
|
+
avg_logprob: import_v49.z.number(),
|
|
1807
|
+
compression_ratio: import_v49.z.number(),
|
|
1808
|
+
no_speech_prob: import_v49.z.number()
|
|
1819
1809
|
})
|
|
1820
1810
|
).nullish()
|
|
1821
1811
|
})
|
|
@@ -1824,32 +1814,32 @@ var openaiTranscriptionResponseSchema = (0, import_provider_utils14.lazyValidato
|
|
|
1824
1814
|
|
|
1825
1815
|
// src/transcription/openai-transcription-options.ts
|
|
1826
1816
|
var import_provider_utils15 = require("@ai-sdk/provider-utils");
|
|
1827
|
-
var
|
|
1817
|
+
var import_v410 = require("zod/v4");
|
|
1828
1818
|
var openAITranscriptionProviderOptions = (0, import_provider_utils15.lazyValidator)(
|
|
1829
1819
|
() => (0, import_provider_utils15.zodSchema)(
|
|
1830
|
-
|
|
1820
|
+
import_v410.z.object({
|
|
1831
1821
|
/**
|
|
1832
1822
|
* Additional information to include in the transcription response.
|
|
1833
1823
|
*/
|
|
1834
|
-
include:
|
|
1824
|
+
include: import_v410.z.array(import_v410.z.string()).optional(),
|
|
1835
1825
|
/**
|
|
1836
1826
|
* The language of the input audio in ISO-639-1 format.
|
|
1837
1827
|
*/
|
|
1838
|
-
language:
|
|
1828
|
+
language: import_v410.z.string().optional(),
|
|
1839
1829
|
/**
|
|
1840
1830
|
* An optional text to guide the model's style or continue a previous audio segment.
|
|
1841
1831
|
*/
|
|
1842
|
-
prompt:
|
|
1832
|
+
prompt: import_v410.z.string().optional(),
|
|
1843
1833
|
/**
|
|
1844
1834
|
* The sampling temperature, between 0 and 1.
|
|
1845
1835
|
* @default 0
|
|
1846
1836
|
*/
|
|
1847
|
-
temperature:
|
|
1837
|
+
temperature: import_v410.z.number().min(0).max(1).default(0).optional(),
|
|
1848
1838
|
/**
|
|
1849
1839
|
* The timestamp granularities to populate for this transcription.
|
|
1850
1840
|
* @default ['segment']
|
|
1851
1841
|
*/
|
|
1852
|
-
timestampGranularities:
|
|
1842
|
+
timestampGranularities: import_v410.z.array(import_v410.z.enum(["word", "segment"])).default(["segment"]).optional()
|
|
1853
1843
|
})
|
|
1854
1844
|
)
|
|
1855
1845
|
);
|
|
@@ -2026,12 +2016,12 @@ var import_provider_utils18 = require("@ai-sdk/provider-utils");
|
|
|
2026
2016
|
|
|
2027
2017
|
// src/speech/openai-speech-options.ts
|
|
2028
2018
|
var import_provider_utils17 = require("@ai-sdk/provider-utils");
|
|
2029
|
-
var
|
|
2019
|
+
var import_v411 = require("zod/v4");
|
|
2030
2020
|
var openaiSpeechProviderOptionsSchema = (0, import_provider_utils17.lazyValidator)(
|
|
2031
2021
|
() => (0, import_provider_utils17.zodSchema)(
|
|
2032
|
-
|
|
2033
|
-
instructions:
|
|
2034
|
-
speed:
|
|
2022
|
+
import_v411.z.object({
|
|
2023
|
+
instructions: import_v411.z.string().nullish(),
|
|
2024
|
+
speed: import_v411.z.number().min(0.25).max(4).default(1).nullish()
|
|
2035
2025
|
})
|
|
2036
2026
|
)
|
|
2037
2027
|
);
|
|
@@ -2144,27 +2134,27 @@ var import_provider_utils29 = require("@ai-sdk/provider-utils");
|
|
|
2144
2134
|
// src/responses/convert-to-openai-responses-input.ts
|
|
2145
2135
|
var import_provider6 = require("@ai-sdk/provider");
|
|
2146
2136
|
var import_provider_utils20 = require("@ai-sdk/provider-utils");
|
|
2147
|
-
var
|
|
2137
|
+
var import_v413 = require("zod/v4");
|
|
2148
2138
|
|
|
2149
2139
|
// src/tool/local-shell.ts
|
|
2150
2140
|
var import_provider_utils19 = require("@ai-sdk/provider-utils");
|
|
2151
|
-
var
|
|
2141
|
+
var import_v412 = require("zod/v4");
|
|
2152
2142
|
var localShellInputSchema = (0, import_provider_utils19.lazySchema)(
|
|
2153
2143
|
() => (0, import_provider_utils19.zodSchema)(
|
|
2154
|
-
|
|
2155
|
-
action:
|
|
2156
|
-
type:
|
|
2157
|
-
command:
|
|
2158
|
-
timeoutMs:
|
|
2159
|
-
user:
|
|
2160
|
-
workingDirectory:
|
|
2161
|
-
env:
|
|
2144
|
+
import_v412.z.object({
|
|
2145
|
+
action: import_v412.z.object({
|
|
2146
|
+
type: import_v412.z.literal("exec"),
|
|
2147
|
+
command: import_v412.z.array(import_v412.z.string()),
|
|
2148
|
+
timeoutMs: import_v412.z.number().optional(),
|
|
2149
|
+
user: import_v412.z.string().optional(),
|
|
2150
|
+
workingDirectory: import_v412.z.string().optional(),
|
|
2151
|
+
env: import_v412.z.record(import_v412.z.string(), import_v412.z.string()).optional()
|
|
2162
2152
|
})
|
|
2163
2153
|
})
|
|
2164
2154
|
)
|
|
2165
2155
|
);
|
|
2166
2156
|
var localShellOutputSchema = (0, import_provider_utils19.lazySchema)(
|
|
2167
|
-
() => (0, import_provider_utils19.zodSchema)(
|
|
2157
|
+
() => (0, import_provider_utils19.zodSchema)(import_v412.z.object({ output: import_v412.z.string() }))
|
|
2168
2158
|
);
|
|
2169
2159
|
var localShell = (0, import_provider_utils19.createProviderDefinedToolFactoryWithOutputSchema)({
|
|
2170
2160
|
id: "openai.local_shell",
|
|
@@ -2438,9 +2428,9 @@ async function convertToOpenAIResponsesInput({
|
|
|
2438
2428
|
}
|
|
2439
2429
|
return { input, warnings };
|
|
2440
2430
|
}
|
|
2441
|
-
var openaiResponsesReasoningProviderOptionsSchema =
|
|
2442
|
-
itemId:
|
|
2443
|
-
reasoningEncryptedContent:
|
|
2431
|
+
var openaiResponsesReasoningProviderOptionsSchema = import_v413.z.object({
|
|
2432
|
+
itemId: import_v413.z.string().nullish(),
|
|
2433
|
+
reasoningEncryptedContent: import_v413.z.string().nullish()
|
|
2444
2434
|
});
|
|
2445
2435
|
|
|
2446
2436
|
// src/responses/map-openai-responses-finish-reason.ts
|
|
@@ -2463,260 +2453,260 @@ function mapOpenAIResponseFinishReason({
|
|
|
2463
2453
|
|
|
2464
2454
|
// src/responses/openai-responses-api.ts
|
|
2465
2455
|
var import_provider_utils21 = require("@ai-sdk/provider-utils");
|
|
2466
|
-
var
|
|
2456
|
+
var import_v414 = require("zod/v4");
|
|
2467
2457
|
var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
|
|
2468
2458
|
() => (0, import_provider_utils21.zodSchema)(
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
type:
|
|
2472
|
-
item_id:
|
|
2473
|
-
delta:
|
|
2474
|
-
logprobs:
|
|
2475
|
-
|
|
2476
|
-
token:
|
|
2477
|
-
logprob:
|
|
2478
|
-
top_logprobs:
|
|
2479
|
-
|
|
2480
|
-
token:
|
|
2481
|
-
logprob:
|
|
2459
|
+
import_v414.z.union([
|
|
2460
|
+
import_v414.z.object({
|
|
2461
|
+
type: import_v414.z.literal("response.output_text.delta"),
|
|
2462
|
+
item_id: import_v414.z.string(),
|
|
2463
|
+
delta: import_v414.z.string(),
|
|
2464
|
+
logprobs: import_v414.z.array(
|
|
2465
|
+
import_v414.z.object({
|
|
2466
|
+
token: import_v414.z.string(),
|
|
2467
|
+
logprob: import_v414.z.number(),
|
|
2468
|
+
top_logprobs: import_v414.z.array(
|
|
2469
|
+
import_v414.z.object({
|
|
2470
|
+
token: import_v414.z.string(),
|
|
2471
|
+
logprob: import_v414.z.number()
|
|
2482
2472
|
})
|
|
2483
2473
|
)
|
|
2484
2474
|
})
|
|
2485
2475
|
).nullish()
|
|
2486
2476
|
}),
|
|
2487
|
-
|
|
2488
|
-
type:
|
|
2489
|
-
response:
|
|
2490
|
-
incomplete_details:
|
|
2491
|
-
usage:
|
|
2492
|
-
input_tokens:
|
|
2493
|
-
input_tokens_details:
|
|
2494
|
-
output_tokens:
|
|
2495
|
-
output_tokens_details:
|
|
2477
|
+
import_v414.z.object({
|
|
2478
|
+
type: import_v414.z.enum(["response.completed", "response.incomplete"]),
|
|
2479
|
+
response: import_v414.z.object({
|
|
2480
|
+
incomplete_details: import_v414.z.object({ reason: import_v414.z.string() }).nullish(),
|
|
2481
|
+
usage: import_v414.z.object({
|
|
2482
|
+
input_tokens: import_v414.z.number(),
|
|
2483
|
+
input_tokens_details: import_v414.z.object({ cached_tokens: import_v414.z.number().nullish() }).nullish(),
|
|
2484
|
+
output_tokens: import_v414.z.number(),
|
|
2485
|
+
output_tokens_details: import_v414.z.object({ reasoning_tokens: import_v414.z.number().nullish() }).nullish()
|
|
2496
2486
|
}),
|
|
2497
|
-
service_tier:
|
|
2487
|
+
service_tier: import_v414.z.string().nullish()
|
|
2498
2488
|
})
|
|
2499
2489
|
}),
|
|
2500
|
-
|
|
2501
|
-
type:
|
|
2502
|
-
response:
|
|
2503
|
-
id:
|
|
2504
|
-
created_at:
|
|
2505
|
-
model:
|
|
2506
|
-
service_tier:
|
|
2490
|
+
import_v414.z.object({
|
|
2491
|
+
type: import_v414.z.literal("response.created"),
|
|
2492
|
+
response: import_v414.z.object({
|
|
2493
|
+
id: import_v414.z.string(),
|
|
2494
|
+
created_at: import_v414.z.number(),
|
|
2495
|
+
model: import_v414.z.string(),
|
|
2496
|
+
service_tier: import_v414.z.string().nullish()
|
|
2507
2497
|
})
|
|
2508
2498
|
}),
|
|
2509
|
-
|
|
2510
|
-
type:
|
|
2511
|
-
output_index:
|
|
2512
|
-
item:
|
|
2513
|
-
|
|
2514
|
-
type:
|
|
2515
|
-
id:
|
|
2499
|
+
import_v414.z.object({
|
|
2500
|
+
type: import_v414.z.literal("response.output_item.added"),
|
|
2501
|
+
output_index: import_v414.z.number(),
|
|
2502
|
+
item: import_v414.z.discriminatedUnion("type", [
|
|
2503
|
+
import_v414.z.object({
|
|
2504
|
+
type: import_v414.z.literal("message"),
|
|
2505
|
+
id: import_v414.z.string()
|
|
2516
2506
|
}),
|
|
2517
|
-
|
|
2518
|
-
type:
|
|
2519
|
-
id:
|
|
2520
|
-
encrypted_content:
|
|
2507
|
+
import_v414.z.object({
|
|
2508
|
+
type: import_v414.z.literal("reasoning"),
|
|
2509
|
+
id: import_v414.z.string(),
|
|
2510
|
+
encrypted_content: import_v414.z.string().nullish()
|
|
2521
2511
|
}),
|
|
2522
|
-
|
|
2523
|
-
type:
|
|
2524
|
-
id:
|
|
2525
|
-
call_id:
|
|
2526
|
-
name:
|
|
2527
|
-
arguments:
|
|
2512
|
+
import_v414.z.object({
|
|
2513
|
+
type: import_v414.z.literal("function_call"),
|
|
2514
|
+
id: import_v414.z.string(),
|
|
2515
|
+
call_id: import_v414.z.string(),
|
|
2516
|
+
name: import_v414.z.string(),
|
|
2517
|
+
arguments: import_v414.z.string()
|
|
2528
2518
|
}),
|
|
2529
|
-
|
|
2530
|
-
type:
|
|
2531
|
-
id:
|
|
2532
|
-
status:
|
|
2533
|
-
action:
|
|
2534
|
-
type:
|
|
2535
|
-
query:
|
|
2519
|
+
import_v414.z.object({
|
|
2520
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2521
|
+
id: import_v414.z.string(),
|
|
2522
|
+
status: import_v414.z.string(),
|
|
2523
|
+
action: import_v414.z.object({
|
|
2524
|
+
type: import_v414.z.literal("search"),
|
|
2525
|
+
query: import_v414.z.string().optional()
|
|
2536
2526
|
}).nullish()
|
|
2537
2527
|
}),
|
|
2538
|
-
|
|
2539
|
-
type:
|
|
2540
|
-
id:
|
|
2541
|
-
status:
|
|
2528
|
+
import_v414.z.object({
|
|
2529
|
+
type: import_v414.z.literal("computer_call"),
|
|
2530
|
+
id: import_v414.z.string(),
|
|
2531
|
+
status: import_v414.z.string()
|
|
2542
2532
|
}),
|
|
2543
|
-
|
|
2544
|
-
type:
|
|
2545
|
-
id:
|
|
2533
|
+
import_v414.z.object({
|
|
2534
|
+
type: import_v414.z.literal("file_search_call"),
|
|
2535
|
+
id: import_v414.z.string()
|
|
2546
2536
|
}),
|
|
2547
|
-
|
|
2548
|
-
type:
|
|
2549
|
-
id:
|
|
2537
|
+
import_v414.z.object({
|
|
2538
|
+
type: import_v414.z.literal("image_generation_call"),
|
|
2539
|
+
id: import_v414.z.string()
|
|
2550
2540
|
}),
|
|
2551
|
-
|
|
2552
|
-
type:
|
|
2553
|
-
id:
|
|
2554
|
-
container_id:
|
|
2555
|
-
code:
|
|
2556
|
-
outputs:
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2541
|
+
import_v414.z.object({
|
|
2542
|
+
type: import_v414.z.literal("code_interpreter_call"),
|
|
2543
|
+
id: import_v414.z.string(),
|
|
2544
|
+
container_id: import_v414.z.string(),
|
|
2545
|
+
code: import_v414.z.string().nullable(),
|
|
2546
|
+
outputs: import_v414.z.array(
|
|
2547
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2548
|
+
import_v414.z.object({ type: import_v414.z.literal("logs"), logs: import_v414.z.string() }),
|
|
2549
|
+
import_v414.z.object({ type: import_v414.z.literal("image"), url: import_v414.z.string() })
|
|
2560
2550
|
])
|
|
2561
2551
|
).nullable(),
|
|
2562
|
-
status:
|
|
2552
|
+
status: import_v414.z.string()
|
|
2563
2553
|
})
|
|
2564
2554
|
])
|
|
2565
2555
|
}),
|
|
2566
|
-
|
|
2567
|
-
type:
|
|
2568
|
-
output_index:
|
|
2569
|
-
item:
|
|
2570
|
-
|
|
2571
|
-
type:
|
|
2572
|
-
id:
|
|
2556
|
+
import_v414.z.object({
|
|
2557
|
+
type: import_v414.z.literal("response.output_item.done"),
|
|
2558
|
+
output_index: import_v414.z.number(),
|
|
2559
|
+
item: import_v414.z.discriminatedUnion("type", [
|
|
2560
|
+
import_v414.z.object({
|
|
2561
|
+
type: import_v414.z.literal("message"),
|
|
2562
|
+
id: import_v414.z.string()
|
|
2573
2563
|
}),
|
|
2574
|
-
|
|
2575
|
-
type:
|
|
2576
|
-
id:
|
|
2577
|
-
encrypted_content:
|
|
2564
|
+
import_v414.z.object({
|
|
2565
|
+
type: import_v414.z.literal("reasoning"),
|
|
2566
|
+
id: import_v414.z.string(),
|
|
2567
|
+
encrypted_content: import_v414.z.string().nullish()
|
|
2578
2568
|
}),
|
|
2579
|
-
|
|
2580
|
-
type:
|
|
2581
|
-
id:
|
|
2582
|
-
call_id:
|
|
2583
|
-
name:
|
|
2584
|
-
arguments:
|
|
2585
|
-
status:
|
|
2569
|
+
import_v414.z.object({
|
|
2570
|
+
type: import_v414.z.literal("function_call"),
|
|
2571
|
+
id: import_v414.z.string(),
|
|
2572
|
+
call_id: import_v414.z.string(),
|
|
2573
|
+
name: import_v414.z.string(),
|
|
2574
|
+
arguments: import_v414.z.string(),
|
|
2575
|
+
status: import_v414.z.literal("completed")
|
|
2586
2576
|
}),
|
|
2587
|
-
|
|
2588
|
-
type:
|
|
2589
|
-
id:
|
|
2590
|
-
code:
|
|
2591
|
-
container_id:
|
|
2592
|
-
outputs:
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2577
|
+
import_v414.z.object({
|
|
2578
|
+
type: import_v414.z.literal("code_interpreter_call"),
|
|
2579
|
+
id: import_v414.z.string(),
|
|
2580
|
+
code: import_v414.z.string().nullable(),
|
|
2581
|
+
container_id: import_v414.z.string(),
|
|
2582
|
+
outputs: import_v414.z.array(
|
|
2583
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2584
|
+
import_v414.z.object({ type: import_v414.z.literal("logs"), logs: import_v414.z.string() }),
|
|
2585
|
+
import_v414.z.object({ type: import_v414.z.literal("image"), url: import_v414.z.string() })
|
|
2596
2586
|
])
|
|
2597
2587
|
).nullable()
|
|
2598
2588
|
}),
|
|
2599
|
-
|
|
2600
|
-
type:
|
|
2601
|
-
id:
|
|
2602
|
-
result:
|
|
2589
|
+
import_v414.z.object({
|
|
2590
|
+
type: import_v414.z.literal("image_generation_call"),
|
|
2591
|
+
id: import_v414.z.string(),
|
|
2592
|
+
result: import_v414.z.string()
|
|
2603
2593
|
}),
|
|
2604
|
-
|
|
2605
|
-
type:
|
|
2606
|
-
id:
|
|
2607
|
-
status:
|
|
2608
|
-
action:
|
|
2609
|
-
|
|
2610
|
-
type:
|
|
2611
|
-
query:
|
|
2594
|
+
import_v414.z.object({
|
|
2595
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2596
|
+
id: import_v414.z.string(),
|
|
2597
|
+
status: import_v414.z.string(),
|
|
2598
|
+
action: import_v414.z.discriminatedUnion("type", [
|
|
2599
|
+
import_v414.z.object({
|
|
2600
|
+
type: import_v414.z.literal("search"),
|
|
2601
|
+
query: import_v414.z.string().nullish()
|
|
2612
2602
|
}),
|
|
2613
|
-
|
|
2614
|
-
type:
|
|
2615
|
-
url:
|
|
2603
|
+
import_v414.z.object({
|
|
2604
|
+
type: import_v414.z.literal("open_page"),
|
|
2605
|
+
url: import_v414.z.string()
|
|
2616
2606
|
}),
|
|
2617
|
-
|
|
2618
|
-
type:
|
|
2619
|
-
url:
|
|
2620
|
-
pattern:
|
|
2607
|
+
import_v414.z.object({
|
|
2608
|
+
type: import_v414.z.literal("find"),
|
|
2609
|
+
url: import_v414.z.string(),
|
|
2610
|
+
pattern: import_v414.z.string()
|
|
2621
2611
|
})
|
|
2622
2612
|
]).nullish()
|
|
2623
2613
|
}),
|
|
2624
|
-
|
|
2625
|
-
type:
|
|
2626
|
-
id:
|
|
2627
|
-
queries:
|
|
2628
|
-
results:
|
|
2629
|
-
|
|
2630
|
-
attributes:
|
|
2631
|
-
file_id:
|
|
2632
|
-
filename:
|
|
2633
|
-
score:
|
|
2634
|
-
text:
|
|
2614
|
+
import_v414.z.object({
|
|
2615
|
+
type: import_v414.z.literal("file_search_call"),
|
|
2616
|
+
id: import_v414.z.string(),
|
|
2617
|
+
queries: import_v414.z.array(import_v414.z.string()),
|
|
2618
|
+
results: import_v414.z.array(
|
|
2619
|
+
import_v414.z.object({
|
|
2620
|
+
attributes: import_v414.z.record(import_v414.z.string(), import_v414.z.unknown()),
|
|
2621
|
+
file_id: import_v414.z.string(),
|
|
2622
|
+
filename: import_v414.z.string(),
|
|
2623
|
+
score: import_v414.z.number(),
|
|
2624
|
+
text: import_v414.z.string()
|
|
2635
2625
|
})
|
|
2636
2626
|
).nullish()
|
|
2637
2627
|
}),
|
|
2638
|
-
|
|
2639
|
-
type:
|
|
2640
|
-
id:
|
|
2641
|
-
call_id:
|
|
2642
|
-
action:
|
|
2643
|
-
type:
|
|
2644
|
-
command:
|
|
2645
|
-
timeout_ms:
|
|
2646
|
-
user:
|
|
2647
|
-
working_directory:
|
|
2648
|
-
env:
|
|
2628
|
+
import_v414.z.object({
|
|
2629
|
+
type: import_v414.z.literal("local_shell_call"),
|
|
2630
|
+
id: import_v414.z.string(),
|
|
2631
|
+
call_id: import_v414.z.string(),
|
|
2632
|
+
action: import_v414.z.object({
|
|
2633
|
+
type: import_v414.z.literal("exec"),
|
|
2634
|
+
command: import_v414.z.array(import_v414.z.string()),
|
|
2635
|
+
timeout_ms: import_v414.z.number().optional(),
|
|
2636
|
+
user: import_v414.z.string().optional(),
|
|
2637
|
+
working_directory: import_v414.z.string().optional(),
|
|
2638
|
+
env: import_v414.z.record(import_v414.z.string(), import_v414.z.string()).optional()
|
|
2649
2639
|
})
|
|
2650
2640
|
}),
|
|
2651
|
-
|
|
2652
|
-
type:
|
|
2653
|
-
id:
|
|
2654
|
-
status:
|
|
2641
|
+
import_v414.z.object({
|
|
2642
|
+
type: import_v414.z.literal("computer_call"),
|
|
2643
|
+
id: import_v414.z.string(),
|
|
2644
|
+
status: import_v414.z.literal("completed")
|
|
2655
2645
|
})
|
|
2656
2646
|
])
|
|
2657
2647
|
}),
|
|
2658
|
-
|
|
2659
|
-
type:
|
|
2660
|
-
item_id:
|
|
2661
|
-
output_index:
|
|
2662
|
-
delta:
|
|
2648
|
+
import_v414.z.object({
|
|
2649
|
+
type: import_v414.z.literal("response.function_call_arguments.delta"),
|
|
2650
|
+
item_id: import_v414.z.string(),
|
|
2651
|
+
output_index: import_v414.z.number(),
|
|
2652
|
+
delta: import_v414.z.string()
|
|
2663
2653
|
}),
|
|
2664
|
-
|
|
2665
|
-
type:
|
|
2666
|
-
item_id:
|
|
2667
|
-
output_index:
|
|
2668
|
-
partial_image_b64:
|
|
2654
|
+
import_v414.z.object({
|
|
2655
|
+
type: import_v414.z.literal("response.image_generation_call.partial_image"),
|
|
2656
|
+
item_id: import_v414.z.string(),
|
|
2657
|
+
output_index: import_v414.z.number(),
|
|
2658
|
+
partial_image_b64: import_v414.z.string()
|
|
2669
2659
|
}),
|
|
2670
|
-
|
|
2671
|
-
type:
|
|
2672
|
-
item_id:
|
|
2673
|
-
output_index:
|
|
2674
|
-
delta:
|
|
2660
|
+
import_v414.z.object({
|
|
2661
|
+
type: import_v414.z.literal("response.code_interpreter_call_code.delta"),
|
|
2662
|
+
item_id: import_v414.z.string(),
|
|
2663
|
+
output_index: import_v414.z.number(),
|
|
2664
|
+
delta: import_v414.z.string()
|
|
2675
2665
|
}),
|
|
2676
|
-
|
|
2677
|
-
type:
|
|
2678
|
-
item_id:
|
|
2679
|
-
output_index:
|
|
2680
|
-
code:
|
|
2666
|
+
import_v414.z.object({
|
|
2667
|
+
type: import_v414.z.literal("response.code_interpreter_call_code.done"),
|
|
2668
|
+
item_id: import_v414.z.string(),
|
|
2669
|
+
output_index: import_v414.z.number(),
|
|
2670
|
+
code: import_v414.z.string()
|
|
2681
2671
|
}),
|
|
2682
|
-
|
|
2683
|
-
type:
|
|
2684
|
-
annotation:
|
|
2685
|
-
|
|
2686
|
-
type:
|
|
2687
|
-
url:
|
|
2688
|
-
title:
|
|
2672
|
+
import_v414.z.object({
|
|
2673
|
+
type: import_v414.z.literal("response.output_text.annotation.added"),
|
|
2674
|
+
annotation: import_v414.z.discriminatedUnion("type", [
|
|
2675
|
+
import_v414.z.object({
|
|
2676
|
+
type: import_v414.z.literal("url_citation"),
|
|
2677
|
+
url: import_v414.z.string(),
|
|
2678
|
+
title: import_v414.z.string()
|
|
2689
2679
|
}),
|
|
2690
|
-
|
|
2691
|
-
type:
|
|
2692
|
-
file_id:
|
|
2693
|
-
filename:
|
|
2694
|
-
index:
|
|
2695
|
-
start_index:
|
|
2696
|
-
end_index:
|
|
2697
|
-
quote:
|
|
2680
|
+
import_v414.z.object({
|
|
2681
|
+
type: import_v414.z.literal("file_citation"),
|
|
2682
|
+
file_id: import_v414.z.string(),
|
|
2683
|
+
filename: import_v414.z.string().nullish(),
|
|
2684
|
+
index: import_v414.z.number().nullish(),
|
|
2685
|
+
start_index: import_v414.z.number().nullish(),
|
|
2686
|
+
end_index: import_v414.z.number().nullish(),
|
|
2687
|
+
quote: import_v414.z.string().nullish()
|
|
2698
2688
|
})
|
|
2699
2689
|
])
|
|
2700
2690
|
}),
|
|
2701
|
-
|
|
2702
|
-
type:
|
|
2703
|
-
item_id:
|
|
2704
|
-
summary_index:
|
|
2691
|
+
import_v414.z.object({
|
|
2692
|
+
type: import_v414.z.literal("response.reasoning_summary_part.added"),
|
|
2693
|
+
item_id: import_v414.z.string(),
|
|
2694
|
+
summary_index: import_v414.z.number()
|
|
2705
2695
|
}),
|
|
2706
|
-
|
|
2707
|
-
type:
|
|
2708
|
-
item_id:
|
|
2709
|
-
summary_index:
|
|
2710
|
-
delta:
|
|
2696
|
+
import_v414.z.object({
|
|
2697
|
+
type: import_v414.z.literal("response.reasoning_summary_text.delta"),
|
|
2698
|
+
item_id: import_v414.z.string(),
|
|
2699
|
+
summary_index: import_v414.z.number(),
|
|
2700
|
+
delta: import_v414.z.string()
|
|
2711
2701
|
}),
|
|
2712
|
-
|
|
2713
|
-
type:
|
|
2714
|
-
code:
|
|
2715
|
-
message:
|
|
2716
|
-
param:
|
|
2717
|
-
sequence_number:
|
|
2702
|
+
import_v414.z.object({
|
|
2703
|
+
type: import_v414.z.literal("error"),
|
|
2704
|
+
code: import_v414.z.string(),
|
|
2705
|
+
message: import_v414.z.string(),
|
|
2706
|
+
param: import_v414.z.string().nullish(),
|
|
2707
|
+
sequence_number: import_v414.z.number()
|
|
2718
2708
|
}),
|
|
2719
|
-
|
|
2709
|
+
import_v414.z.object({ type: import_v414.z.string() }).loose().transform((value) => ({
|
|
2720
2710
|
type: "unknown_chunk",
|
|
2721
2711
|
message: value.type
|
|
2722
2712
|
}))
|
|
@@ -2726,158 +2716,158 @@ var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2726
2716
|
);
|
|
2727
2717
|
var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
|
|
2728
2718
|
() => (0, import_provider_utils21.zodSchema)(
|
|
2729
|
-
|
|
2730
|
-
id:
|
|
2731
|
-
created_at:
|
|
2732
|
-
error:
|
|
2733
|
-
code:
|
|
2734
|
-
message:
|
|
2719
|
+
import_v414.z.object({
|
|
2720
|
+
id: import_v414.z.string(),
|
|
2721
|
+
created_at: import_v414.z.number(),
|
|
2722
|
+
error: import_v414.z.object({
|
|
2723
|
+
code: import_v414.z.string(),
|
|
2724
|
+
message: import_v414.z.string()
|
|
2735
2725
|
}).nullish(),
|
|
2736
|
-
model:
|
|
2737
|
-
output:
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
type:
|
|
2741
|
-
role:
|
|
2742
|
-
id:
|
|
2743
|
-
content:
|
|
2744
|
-
|
|
2745
|
-
type:
|
|
2746
|
-
text:
|
|
2747
|
-
logprobs:
|
|
2748
|
-
|
|
2749
|
-
token:
|
|
2750
|
-
logprob:
|
|
2751
|
-
top_logprobs:
|
|
2752
|
-
|
|
2753
|
-
token:
|
|
2754
|
-
logprob:
|
|
2726
|
+
model: import_v414.z.string(),
|
|
2727
|
+
output: import_v414.z.array(
|
|
2728
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2729
|
+
import_v414.z.object({
|
|
2730
|
+
type: import_v414.z.literal("message"),
|
|
2731
|
+
role: import_v414.z.literal("assistant"),
|
|
2732
|
+
id: import_v414.z.string(),
|
|
2733
|
+
content: import_v414.z.array(
|
|
2734
|
+
import_v414.z.object({
|
|
2735
|
+
type: import_v414.z.literal("output_text"),
|
|
2736
|
+
text: import_v414.z.string(),
|
|
2737
|
+
logprobs: import_v414.z.array(
|
|
2738
|
+
import_v414.z.object({
|
|
2739
|
+
token: import_v414.z.string(),
|
|
2740
|
+
logprob: import_v414.z.number(),
|
|
2741
|
+
top_logprobs: import_v414.z.array(
|
|
2742
|
+
import_v414.z.object({
|
|
2743
|
+
token: import_v414.z.string(),
|
|
2744
|
+
logprob: import_v414.z.number()
|
|
2755
2745
|
})
|
|
2756
2746
|
)
|
|
2757
2747
|
})
|
|
2758
2748
|
).nullish(),
|
|
2759
|
-
annotations:
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
type:
|
|
2763
|
-
start_index:
|
|
2764
|
-
end_index:
|
|
2765
|
-
url:
|
|
2766
|
-
title:
|
|
2749
|
+
annotations: import_v414.z.array(
|
|
2750
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2751
|
+
import_v414.z.object({
|
|
2752
|
+
type: import_v414.z.literal("url_citation"),
|
|
2753
|
+
start_index: import_v414.z.number(),
|
|
2754
|
+
end_index: import_v414.z.number(),
|
|
2755
|
+
url: import_v414.z.string(),
|
|
2756
|
+
title: import_v414.z.string()
|
|
2767
2757
|
}),
|
|
2768
|
-
|
|
2769
|
-
type:
|
|
2770
|
-
file_id:
|
|
2771
|
-
filename:
|
|
2772
|
-
index:
|
|
2773
|
-
start_index:
|
|
2774
|
-
end_index:
|
|
2775
|
-
quote:
|
|
2758
|
+
import_v414.z.object({
|
|
2759
|
+
type: import_v414.z.literal("file_citation"),
|
|
2760
|
+
file_id: import_v414.z.string(),
|
|
2761
|
+
filename: import_v414.z.string().nullish(),
|
|
2762
|
+
index: import_v414.z.number().nullish(),
|
|
2763
|
+
start_index: import_v414.z.number().nullish(),
|
|
2764
|
+
end_index: import_v414.z.number().nullish(),
|
|
2765
|
+
quote: import_v414.z.string().nullish()
|
|
2776
2766
|
}),
|
|
2777
|
-
|
|
2778
|
-
type:
|
|
2767
|
+
import_v414.z.object({
|
|
2768
|
+
type: import_v414.z.literal("container_file_citation")
|
|
2779
2769
|
})
|
|
2780
2770
|
])
|
|
2781
2771
|
)
|
|
2782
2772
|
})
|
|
2783
2773
|
)
|
|
2784
2774
|
}),
|
|
2785
|
-
|
|
2786
|
-
type:
|
|
2787
|
-
id:
|
|
2788
|
-
status:
|
|
2789
|
-
action:
|
|
2790
|
-
|
|
2791
|
-
type:
|
|
2792
|
-
query:
|
|
2775
|
+
import_v414.z.object({
|
|
2776
|
+
type: import_v414.z.literal("web_search_call"),
|
|
2777
|
+
id: import_v414.z.string(),
|
|
2778
|
+
status: import_v414.z.string(),
|
|
2779
|
+
action: import_v414.z.discriminatedUnion("type", [
|
|
2780
|
+
import_v414.z.object({
|
|
2781
|
+
type: import_v414.z.literal("search"),
|
|
2782
|
+
query: import_v414.z.string().nullish()
|
|
2793
2783
|
}),
|
|
2794
|
-
|
|
2795
|
-
type:
|
|
2796
|
-
url:
|
|
2784
|
+
import_v414.z.object({
|
|
2785
|
+
type: import_v414.z.literal("open_page"),
|
|
2786
|
+
url: import_v414.z.string()
|
|
2797
2787
|
}),
|
|
2798
|
-
|
|
2799
|
-
type:
|
|
2800
|
-
url:
|
|
2801
|
-
pattern:
|
|
2788
|
+
import_v414.z.object({
|
|
2789
|
+
type: import_v414.z.literal("find"),
|
|
2790
|
+
url: import_v414.z.string(),
|
|
2791
|
+
pattern: import_v414.z.string()
|
|
2802
2792
|
})
|
|
2803
2793
|
]).nullish()
|
|
2804
2794
|
}),
|
|
2805
|
-
|
|
2806
|
-
type:
|
|
2807
|
-
id:
|
|
2808
|
-
queries:
|
|
2809
|
-
results:
|
|
2810
|
-
|
|
2811
|
-
attributes:
|
|
2812
|
-
file_id:
|
|
2813
|
-
filename:
|
|
2814
|
-
score:
|
|
2815
|
-
text:
|
|
2795
|
+
import_v414.z.object({
|
|
2796
|
+
type: import_v414.z.literal("file_search_call"),
|
|
2797
|
+
id: import_v414.z.string(),
|
|
2798
|
+
queries: import_v414.z.array(import_v414.z.string()),
|
|
2799
|
+
results: import_v414.z.array(
|
|
2800
|
+
import_v414.z.object({
|
|
2801
|
+
attributes: import_v414.z.record(import_v414.z.string(), import_v414.z.unknown()),
|
|
2802
|
+
file_id: import_v414.z.string(),
|
|
2803
|
+
filename: import_v414.z.string(),
|
|
2804
|
+
score: import_v414.z.number(),
|
|
2805
|
+
text: import_v414.z.string()
|
|
2816
2806
|
})
|
|
2817
2807
|
).nullish()
|
|
2818
2808
|
}),
|
|
2819
|
-
|
|
2820
|
-
type:
|
|
2821
|
-
id:
|
|
2822
|
-
code:
|
|
2823
|
-
container_id:
|
|
2824
|
-
outputs:
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2809
|
+
import_v414.z.object({
|
|
2810
|
+
type: import_v414.z.literal("code_interpreter_call"),
|
|
2811
|
+
id: import_v414.z.string(),
|
|
2812
|
+
code: import_v414.z.string().nullable(),
|
|
2813
|
+
container_id: import_v414.z.string(),
|
|
2814
|
+
outputs: import_v414.z.array(
|
|
2815
|
+
import_v414.z.discriminatedUnion("type", [
|
|
2816
|
+
import_v414.z.object({ type: import_v414.z.literal("logs"), logs: import_v414.z.string() }),
|
|
2817
|
+
import_v414.z.object({ type: import_v414.z.literal("image"), url: import_v414.z.string() })
|
|
2828
2818
|
])
|
|
2829
2819
|
).nullable()
|
|
2830
2820
|
}),
|
|
2831
|
-
|
|
2832
|
-
type:
|
|
2833
|
-
id:
|
|
2834
|
-
result:
|
|
2821
|
+
import_v414.z.object({
|
|
2822
|
+
type: import_v414.z.literal("image_generation_call"),
|
|
2823
|
+
id: import_v414.z.string(),
|
|
2824
|
+
result: import_v414.z.string()
|
|
2835
2825
|
}),
|
|
2836
|
-
|
|
2837
|
-
type:
|
|
2838
|
-
id:
|
|
2839
|
-
call_id:
|
|
2840
|
-
action:
|
|
2841
|
-
type:
|
|
2842
|
-
command:
|
|
2843
|
-
timeout_ms:
|
|
2844
|
-
user:
|
|
2845
|
-
working_directory:
|
|
2846
|
-
env:
|
|
2826
|
+
import_v414.z.object({
|
|
2827
|
+
type: import_v414.z.literal("local_shell_call"),
|
|
2828
|
+
id: import_v414.z.string(),
|
|
2829
|
+
call_id: import_v414.z.string(),
|
|
2830
|
+
action: import_v414.z.object({
|
|
2831
|
+
type: import_v414.z.literal("exec"),
|
|
2832
|
+
command: import_v414.z.array(import_v414.z.string()),
|
|
2833
|
+
timeout_ms: import_v414.z.number().optional(),
|
|
2834
|
+
user: import_v414.z.string().optional(),
|
|
2835
|
+
working_directory: import_v414.z.string().optional(),
|
|
2836
|
+
env: import_v414.z.record(import_v414.z.string(), import_v414.z.string()).optional()
|
|
2847
2837
|
})
|
|
2848
2838
|
}),
|
|
2849
|
-
|
|
2850
|
-
type:
|
|
2851
|
-
call_id:
|
|
2852
|
-
name:
|
|
2853
|
-
arguments:
|
|
2854
|
-
id:
|
|
2839
|
+
import_v414.z.object({
|
|
2840
|
+
type: import_v414.z.literal("function_call"),
|
|
2841
|
+
call_id: import_v414.z.string(),
|
|
2842
|
+
name: import_v414.z.string(),
|
|
2843
|
+
arguments: import_v414.z.string(),
|
|
2844
|
+
id: import_v414.z.string()
|
|
2855
2845
|
}),
|
|
2856
|
-
|
|
2857
|
-
type:
|
|
2858
|
-
id:
|
|
2859
|
-
status:
|
|
2846
|
+
import_v414.z.object({
|
|
2847
|
+
type: import_v414.z.literal("computer_call"),
|
|
2848
|
+
id: import_v414.z.string(),
|
|
2849
|
+
status: import_v414.z.string().optional()
|
|
2860
2850
|
}),
|
|
2861
|
-
|
|
2862
|
-
type:
|
|
2863
|
-
id:
|
|
2864
|
-
encrypted_content:
|
|
2865
|
-
summary:
|
|
2866
|
-
|
|
2867
|
-
type:
|
|
2868
|
-
text:
|
|
2851
|
+
import_v414.z.object({
|
|
2852
|
+
type: import_v414.z.literal("reasoning"),
|
|
2853
|
+
id: import_v414.z.string(),
|
|
2854
|
+
encrypted_content: import_v414.z.string().nullish(),
|
|
2855
|
+
summary: import_v414.z.array(
|
|
2856
|
+
import_v414.z.object({
|
|
2857
|
+
type: import_v414.z.literal("summary_text"),
|
|
2858
|
+
text: import_v414.z.string()
|
|
2869
2859
|
})
|
|
2870
2860
|
)
|
|
2871
2861
|
})
|
|
2872
2862
|
])
|
|
2873
2863
|
),
|
|
2874
|
-
service_tier:
|
|
2875
|
-
incomplete_details:
|
|
2876
|
-
usage:
|
|
2877
|
-
input_tokens:
|
|
2878
|
-
input_tokens_details:
|
|
2879
|
-
output_tokens:
|
|
2880
|
-
output_tokens_details:
|
|
2864
|
+
service_tier: import_v414.z.string().nullish(),
|
|
2865
|
+
incomplete_details: import_v414.z.object({ reason: import_v414.z.string() }).nullish(),
|
|
2866
|
+
usage: import_v414.z.object({
|
|
2867
|
+
input_tokens: import_v414.z.number(),
|
|
2868
|
+
input_tokens_details: import_v414.z.object({ cached_tokens: import_v414.z.number().nullish() }).nullish(),
|
|
2869
|
+
output_tokens: import_v414.z.number(),
|
|
2870
|
+
output_tokens_details: import_v414.z.object({ reasoning_tokens: import_v414.z.number().nullish() }).nullish()
|
|
2881
2871
|
})
|
|
2882
2872
|
})
|
|
2883
2873
|
)
|
|
@@ -2885,7 +2875,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils21.lazyValidator)(
|
|
|
2885
2875
|
|
|
2886
2876
|
// src/responses/openai-responses-options.ts
|
|
2887
2877
|
var import_provider_utils22 = require("@ai-sdk/provider-utils");
|
|
2888
|
-
var
|
|
2878
|
+
var import_v415 = require("zod/v4");
|
|
2889
2879
|
var TOP_LOGPROBS_MAX = 20;
|
|
2890
2880
|
var openaiResponsesReasoningModelIds = [
|
|
2891
2881
|
"o1",
|
|
@@ -2946,15 +2936,15 @@ var openaiResponsesModelIds = [
|
|
|
2946
2936
|
];
|
|
2947
2937
|
var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValidator)(
|
|
2948
2938
|
() => (0, import_provider_utils22.zodSchema)(
|
|
2949
|
-
|
|
2950
|
-
include:
|
|
2951
|
-
|
|
2939
|
+
import_v415.z.object({
|
|
2940
|
+
include: import_v415.z.array(
|
|
2941
|
+
import_v415.z.enum([
|
|
2952
2942
|
"reasoning.encrypted_content",
|
|
2953
2943
|
"file_search_call.results",
|
|
2954
2944
|
"message.output_text.logprobs"
|
|
2955
2945
|
])
|
|
2956
2946
|
).nullish(),
|
|
2957
|
-
instructions:
|
|
2947
|
+
instructions: import_v415.z.string().nullish(),
|
|
2958
2948
|
/**
|
|
2959
2949
|
* Return the log probabilities of the tokens.
|
|
2960
2950
|
*
|
|
@@ -2967,25 +2957,25 @@ var openaiResponsesProviderOptionsSchema = (0, import_provider_utils22.lazyValid
|
|
|
2967
2957
|
* @see https://platform.openai.com/docs/api-reference/responses/create
|
|
2968
2958
|
* @see https://cookbook.openai.com/examples/using_logprobs
|
|
2969
2959
|
*/
|
|
2970
|
-
logprobs:
|
|
2960
|
+
logprobs: import_v415.z.union([import_v415.z.boolean(), import_v415.z.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
|
|
2971
2961
|
/**
|
|
2972
2962
|
* The maximum number of total calls to built-in tools that can be processed in a response.
|
|
2973
2963
|
* This maximum number applies across all built-in tool calls, not per individual tool.
|
|
2974
2964
|
* Any further attempts to call a tool by the model will be ignored.
|
|
2975
2965
|
*/
|
|
2976
|
-
maxToolCalls:
|
|
2977
|
-
metadata:
|
|
2978
|
-
parallelToolCalls:
|
|
2979
|
-
previousResponseId:
|
|
2980
|
-
promptCacheKey:
|
|
2981
|
-
reasoningEffort:
|
|
2982
|
-
reasoningSummary:
|
|
2983
|
-
safetyIdentifier:
|
|
2984
|
-
serviceTier:
|
|
2985
|
-
store:
|
|
2986
|
-
strictJsonSchema:
|
|
2987
|
-
textVerbosity:
|
|
2988
|
-
user:
|
|
2966
|
+
maxToolCalls: import_v415.z.number().nullish(),
|
|
2967
|
+
metadata: import_v415.z.any().nullish(),
|
|
2968
|
+
parallelToolCalls: import_v415.z.boolean().nullish(),
|
|
2969
|
+
previousResponseId: import_v415.z.string().nullish(),
|
|
2970
|
+
promptCacheKey: import_v415.z.string().nullish(),
|
|
2971
|
+
reasoningEffort: import_v415.z.string().nullish(),
|
|
2972
|
+
reasoningSummary: import_v415.z.string().nullish(),
|
|
2973
|
+
safetyIdentifier: import_v415.z.string().nullish(),
|
|
2974
|
+
serviceTier: import_v415.z.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
2975
|
+
store: import_v415.z.boolean().nullish(),
|
|
2976
|
+
strictJsonSchema: import_v415.z.boolean().nullish(),
|
|
2977
|
+
textVerbosity: import_v415.z.enum(["low", "medium", "high"]).nullish(),
|
|
2978
|
+
user: import_v415.z.string().nullish()
|
|
2989
2979
|
})
|
|
2990
2980
|
)
|
|
2991
2981
|
);
|
|
@@ -2995,22 +2985,22 @@ var import_provider7 = require("@ai-sdk/provider");
|
|
|
2995
2985
|
|
|
2996
2986
|
// src/tool/code-interpreter.ts
|
|
2997
2987
|
var import_provider_utils23 = require("@ai-sdk/provider-utils");
|
|
2998
|
-
var
|
|
2988
|
+
var import_v416 = require("zod/v4");
|
|
2999
2989
|
var codeInterpreterInputSchema = (0, import_provider_utils23.lazySchema)(
|
|
3000
2990
|
() => (0, import_provider_utils23.zodSchema)(
|
|
3001
|
-
|
|
3002
|
-
code:
|
|
3003
|
-
containerId:
|
|
2991
|
+
import_v416.z.object({
|
|
2992
|
+
code: import_v416.z.string().nullish(),
|
|
2993
|
+
containerId: import_v416.z.string()
|
|
3004
2994
|
})
|
|
3005
2995
|
)
|
|
3006
2996
|
);
|
|
3007
2997
|
var codeInterpreterOutputSchema = (0, import_provider_utils23.lazySchema)(
|
|
3008
2998
|
() => (0, import_provider_utils23.zodSchema)(
|
|
3009
|
-
|
|
3010
|
-
outputs:
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
2999
|
+
import_v416.z.object({
|
|
3000
|
+
outputs: import_v416.z.array(
|
|
3001
|
+
import_v416.z.discriminatedUnion("type", [
|
|
3002
|
+
import_v416.z.object({ type: import_v416.z.literal("logs"), logs: import_v416.z.string() }),
|
|
3003
|
+
import_v416.z.object({ type: import_v416.z.literal("image"), url: import_v416.z.string() })
|
|
3014
3004
|
])
|
|
3015
3005
|
).nullish()
|
|
3016
3006
|
})
|
|
@@ -3018,11 +3008,11 @@ var codeInterpreterOutputSchema = (0, import_provider_utils23.lazySchema)(
|
|
|
3018
3008
|
);
|
|
3019
3009
|
var codeInterpreterArgsSchema = (0, import_provider_utils23.lazySchema)(
|
|
3020
3010
|
() => (0, import_provider_utils23.zodSchema)(
|
|
3021
|
-
|
|
3022
|
-
container:
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
fileIds:
|
|
3011
|
+
import_v416.z.object({
|
|
3012
|
+
container: import_v416.z.union([
|
|
3013
|
+
import_v416.z.string(),
|
|
3014
|
+
import_v416.z.object({
|
|
3015
|
+
fileIds: import_v416.z.array(import_v416.z.string()).optional()
|
|
3026
3016
|
})
|
|
3027
3017
|
]).optional()
|
|
3028
3018
|
})
|
|
@@ -3040,42 +3030,42 @@ var codeInterpreter = (args = {}) => {
|
|
|
3040
3030
|
|
|
3041
3031
|
// src/tool/file-search.ts
|
|
3042
3032
|
var import_provider_utils24 = require("@ai-sdk/provider-utils");
|
|
3043
|
-
var
|
|
3044
|
-
var comparisonFilterSchema =
|
|
3045
|
-
key:
|
|
3046
|
-
type:
|
|
3047
|
-
value:
|
|
3033
|
+
var import_v417 = require("zod/v4");
|
|
3034
|
+
var comparisonFilterSchema = import_v417.z.object({
|
|
3035
|
+
key: import_v417.z.string(),
|
|
3036
|
+
type: import_v417.z.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
|
|
3037
|
+
value: import_v417.z.union([import_v417.z.string(), import_v417.z.number(), import_v417.z.boolean()])
|
|
3048
3038
|
});
|
|
3049
|
-
var compoundFilterSchema =
|
|
3050
|
-
type:
|
|
3051
|
-
filters:
|
|
3052
|
-
|
|
3039
|
+
var compoundFilterSchema = import_v417.z.object({
|
|
3040
|
+
type: import_v417.z.enum(["and", "or"]),
|
|
3041
|
+
filters: import_v417.z.array(
|
|
3042
|
+
import_v417.z.union([comparisonFilterSchema, import_v417.z.lazy(() => compoundFilterSchema)])
|
|
3053
3043
|
)
|
|
3054
3044
|
});
|
|
3055
3045
|
var fileSearchArgsSchema = (0, import_provider_utils24.lazySchema)(
|
|
3056
3046
|
() => (0, import_provider_utils24.zodSchema)(
|
|
3057
|
-
|
|
3058
|
-
vectorStoreIds:
|
|
3059
|
-
maxNumResults:
|
|
3060
|
-
ranking:
|
|
3061
|
-
ranker:
|
|
3062
|
-
scoreThreshold:
|
|
3047
|
+
import_v417.z.object({
|
|
3048
|
+
vectorStoreIds: import_v417.z.array(import_v417.z.string()),
|
|
3049
|
+
maxNumResults: import_v417.z.number().optional(),
|
|
3050
|
+
ranking: import_v417.z.object({
|
|
3051
|
+
ranker: import_v417.z.string().optional(),
|
|
3052
|
+
scoreThreshold: import_v417.z.number().optional()
|
|
3063
3053
|
}).optional(),
|
|
3064
|
-
filters:
|
|
3054
|
+
filters: import_v417.z.union([comparisonFilterSchema, compoundFilterSchema]).optional()
|
|
3065
3055
|
})
|
|
3066
3056
|
)
|
|
3067
3057
|
);
|
|
3068
3058
|
var fileSearchOutputSchema = (0, import_provider_utils24.lazySchema)(
|
|
3069
3059
|
() => (0, import_provider_utils24.zodSchema)(
|
|
3070
|
-
|
|
3071
|
-
queries:
|
|
3072
|
-
results:
|
|
3073
|
-
|
|
3074
|
-
attributes:
|
|
3075
|
-
fileId:
|
|
3076
|
-
filename:
|
|
3077
|
-
score:
|
|
3078
|
-
text:
|
|
3060
|
+
import_v417.z.object({
|
|
3061
|
+
queries: import_v417.z.array(import_v417.z.string()),
|
|
3062
|
+
results: import_v417.z.array(
|
|
3063
|
+
import_v417.z.object({
|
|
3064
|
+
attributes: import_v417.z.record(import_v417.z.string(), import_v417.z.unknown()),
|
|
3065
|
+
fileId: import_v417.z.string(),
|
|
3066
|
+
filename: import_v417.z.string(),
|
|
3067
|
+
score: import_v417.z.number(),
|
|
3068
|
+
text: import_v417.z.string()
|
|
3079
3069
|
})
|
|
3080
3070
|
).nullable()
|
|
3081
3071
|
})
|
|
@@ -3084,46 +3074,46 @@ var fileSearchOutputSchema = (0, import_provider_utils24.lazySchema)(
|
|
|
3084
3074
|
var fileSearch = (0, import_provider_utils24.createProviderDefinedToolFactoryWithOutputSchema)({
|
|
3085
3075
|
id: "openai.file_search",
|
|
3086
3076
|
name: "file_search",
|
|
3087
|
-
inputSchema:
|
|
3077
|
+
inputSchema: import_v417.z.object({}),
|
|
3088
3078
|
outputSchema: fileSearchOutputSchema
|
|
3089
3079
|
});
|
|
3090
3080
|
|
|
3091
3081
|
// src/tool/web-search.ts
|
|
3092
3082
|
var import_provider_utils25 = require("@ai-sdk/provider-utils");
|
|
3093
|
-
var
|
|
3083
|
+
var import_v418 = require("zod/v4");
|
|
3094
3084
|
var webSearchArgsSchema = (0, import_provider_utils25.lazySchema)(
|
|
3095
3085
|
() => (0, import_provider_utils25.zodSchema)(
|
|
3096
|
-
|
|
3097
|
-
filters:
|
|
3098
|
-
allowedDomains:
|
|
3086
|
+
import_v418.z.object({
|
|
3087
|
+
filters: import_v418.z.object({
|
|
3088
|
+
allowedDomains: import_v418.z.array(import_v418.z.string()).optional()
|
|
3099
3089
|
}).optional(),
|
|
3100
|
-
searchContextSize:
|
|
3101
|
-
userLocation:
|
|
3102
|
-
type:
|
|
3103
|
-
country:
|
|
3104
|
-
city:
|
|
3105
|
-
region:
|
|
3106
|
-
timezone:
|
|
3090
|
+
searchContextSize: import_v418.z.enum(["low", "medium", "high"]).optional(),
|
|
3091
|
+
userLocation: import_v418.z.object({
|
|
3092
|
+
type: import_v418.z.literal("approximate"),
|
|
3093
|
+
country: import_v418.z.string().optional(),
|
|
3094
|
+
city: import_v418.z.string().optional(),
|
|
3095
|
+
region: import_v418.z.string().optional(),
|
|
3096
|
+
timezone: import_v418.z.string().optional()
|
|
3107
3097
|
}).optional()
|
|
3108
3098
|
})
|
|
3109
3099
|
)
|
|
3110
3100
|
);
|
|
3111
3101
|
var webSearchInputSchema = (0, import_provider_utils25.lazySchema)(
|
|
3112
3102
|
() => (0, import_provider_utils25.zodSchema)(
|
|
3113
|
-
|
|
3114
|
-
action:
|
|
3115
|
-
|
|
3116
|
-
type:
|
|
3117
|
-
query:
|
|
3103
|
+
import_v418.z.object({
|
|
3104
|
+
action: import_v418.z.discriminatedUnion("type", [
|
|
3105
|
+
import_v418.z.object({
|
|
3106
|
+
type: import_v418.z.literal("search"),
|
|
3107
|
+
query: import_v418.z.string().nullish()
|
|
3118
3108
|
}),
|
|
3119
|
-
|
|
3120
|
-
type:
|
|
3121
|
-
url:
|
|
3109
|
+
import_v418.z.object({
|
|
3110
|
+
type: import_v418.z.literal("open_page"),
|
|
3111
|
+
url: import_v418.z.string()
|
|
3122
3112
|
}),
|
|
3123
|
-
|
|
3124
|
-
type:
|
|
3125
|
-
url:
|
|
3126
|
-
pattern:
|
|
3113
|
+
import_v418.z.object({
|
|
3114
|
+
type: import_v418.z.literal("find"),
|
|
3115
|
+
url: import_v418.z.string(),
|
|
3116
|
+
pattern: import_v418.z.string()
|
|
3127
3117
|
})
|
|
3128
3118
|
]).nullish()
|
|
3129
3119
|
})
|
|
@@ -3137,61 +3127,61 @@ var webSearchToolFactory = (0, import_provider_utils25.createProviderDefinedTool
|
|
|
3137
3127
|
|
|
3138
3128
|
// src/tool/web-search-preview.ts
|
|
3139
3129
|
var import_provider_utils26 = require("@ai-sdk/provider-utils");
|
|
3140
|
-
var
|
|
3130
|
+
var import_v419 = require("zod/v4");
|
|
3141
3131
|
var webSearchPreviewArgsSchema = (0, import_provider_utils26.lazySchema)(
|
|
3142
3132
|
() => (0, import_provider_utils26.zodSchema)(
|
|
3143
|
-
|
|
3133
|
+
import_v419.z.object({
|
|
3144
3134
|
/**
|
|
3145
3135
|
* Search context size to use for the web search.
|
|
3146
3136
|
* - high: Most comprehensive context, highest cost, slower response
|
|
3147
3137
|
* - medium: Balanced context, cost, and latency (default)
|
|
3148
3138
|
* - low: Least context, lowest cost, fastest response
|
|
3149
3139
|
*/
|
|
3150
|
-
searchContextSize:
|
|
3140
|
+
searchContextSize: import_v419.z.enum(["low", "medium", "high"]).optional(),
|
|
3151
3141
|
/**
|
|
3152
3142
|
* User location information to provide geographically relevant search results.
|
|
3153
3143
|
*/
|
|
3154
|
-
userLocation:
|
|
3144
|
+
userLocation: import_v419.z.object({
|
|
3155
3145
|
/**
|
|
3156
3146
|
* Type of location (always 'approximate')
|
|
3157
3147
|
*/
|
|
3158
|
-
type:
|
|
3148
|
+
type: import_v419.z.literal("approximate"),
|
|
3159
3149
|
/**
|
|
3160
3150
|
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
3161
3151
|
*/
|
|
3162
|
-
country:
|
|
3152
|
+
country: import_v419.z.string().optional(),
|
|
3163
3153
|
/**
|
|
3164
3154
|
* City name (free text, e.g., 'Minneapolis')
|
|
3165
3155
|
*/
|
|
3166
|
-
city:
|
|
3156
|
+
city: import_v419.z.string().optional(),
|
|
3167
3157
|
/**
|
|
3168
3158
|
* Region name (free text, e.g., 'Minnesota')
|
|
3169
3159
|
*/
|
|
3170
|
-
region:
|
|
3160
|
+
region: import_v419.z.string().optional(),
|
|
3171
3161
|
/**
|
|
3172
3162
|
* IANA timezone (e.g., 'America/Chicago')
|
|
3173
3163
|
*/
|
|
3174
|
-
timezone:
|
|
3164
|
+
timezone: import_v419.z.string().optional()
|
|
3175
3165
|
}).optional()
|
|
3176
3166
|
})
|
|
3177
3167
|
)
|
|
3178
3168
|
);
|
|
3179
3169
|
var webSearchPreviewInputSchema = (0, import_provider_utils26.lazySchema)(
|
|
3180
3170
|
() => (0, import_provider_utils26.zodSchema)(
|
|
3181
|
-
|
|
3182
|
-
action:
|
|
3183
|
-
|
|
3184
|
-
type:
|
|
3185
|
-
query:
|
|
3171
|
+
import_v419.z.object({
|
|
3172
|
+
action: import_v419.z.discriminatedUnion("type", [
|
|
3173
|
+
import_v419.z.object({
|
|
3174
|
+
type: import_v419.z.literal("search"),
|
|
3175
|
+
query: import_v419.z.string().nullish()
|
|
3186
3176
|
}),
|
|
3187
|
-
|
|
3188
|
-
type:
|
|
3189
|
-
url:
|
|
3177
|
+
import_v419.z.object({
|
|
3178
|
+
type: import_v419.z.literal("open_page"),
|
|
3179
|
+
url: import_v419.z.string()
|
|
3190
3180
|
}),
|
|
3191
|
-
|
|
3192
|
-
type:
|
|
3193
|
-
url:
|
|
3194
|
-
pattern:
|
|
3181
|
+
import_v419.z.object({
|
|
3182
|
+
type: import_v419.z.literal("find"),
|
|
3183
|
+
url: import_v419.z.string(),
|
|
3184
|
+
pattern: import_v419.z.string()
|
|
3195
3185
|
})
|
|
3196
3186
|
]).nullish()
|
|
3197
3187
|
})
|
|
@@ -3205,29 +3195,29 @@ var webSearchPreview = (0, import_provider_utils26.createProviderDefinedToolFact
|
|
|
3205
3195
|
|
|
3206
3196
|
// src/tool/image-generation.ts
|
|
3207
3197
|
var import_provider_utils27 = require("@ai-sdk/provider-utils");
|
|
3208
|
-
var
|
|
3198
|
+
var import_v420 = require("zod/v4");
|
|
3209
3199
|
var imageGenerationArgsSchema = (0, import_provider_utils27.lazySchema)(
|
|
3210
3200
|
() => (0, import_provider_utils27.zodSchema)(
|
|
3211
|
-
|
|
3212
|
-
background:
|
|
3213
|
-
inputFidelity:
|
|
3214
|
-
inputImageMask:
|
|
3215
|
-
fileId:
|
|
3216
|
-
imageUrl:
|
|
3201
|
+
import_v420.z.object({
|
|
3202
|
+
background: import_v420.z.enum(["auto", "opaque", "transparent"]).optional(),
|
|
3203
|
+
inputFidelity: import_v420.z.enum(["low", "high"]).optional(),
|
|
3204
|
+
inputImageMask: import_v420.z.object({
|
|
3205
|
+
fileId: import_v420.z.string().optional(),
|
|
3206
|
+
imageUrl: import_v420.z.string().optional()
|
|
3217
3207
|
}).optional(),
|
|
3218
|
-
model:
|
|
3219
|
-
moderation:
|
|
3220
|
-
outputCompression:
|
|
3221
|
-
outputFormat:
|
|
3222
|
-
partialImages:
|
|
3223
|
-
quality:
|
|
3224
|
-
size:
|
|
3208
|
+
model: import_v420.z.string().optional(),
|
|
3209
|
+
moderation: import_v420.z.enum(["auto"]).optional(),
|
|
3210
|
+
outputCompression: import_v420.z.number().int().min(0).max(100).optional(),
|
|
3211
|
+
outputFormat: import_v420.z.enum(["png", "jpeg", "webp"]).optional(),
|
|
3212
|
+
partialImages: import_v420.z.number().int().min(0).max(3).optional(),
|
|
3213
|
+
quality: import_v420.z.enum(["auto", "low", "medium", "high"]).optional(),
|
|
3214
|
+
size: import_v420.z.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
|
|
3225
3215
|
}).strict()
|
|
3226
3216
|
)
|
|
3227
3217
|
);
|
|
3228
|
-
var imageGenerationInputSchema = (0, import_provider_utils27.lazySchema)(() => (0, import_provider_utils27.zodSchema)(
|
|
3218
|
+
var imageGenerationInputSchema = (0, import_provider_utils27.lazySchema)(() => (0, import_provider_utils27.zodSchema)(import_v420.z.object({})));
|
|
3229
3219
|
var imageGenerationOutputSchema = (0, import_provider_utils27.lazySchema)(
|
|
3230
|
-
() => (0, import_provider_utils27.zodSchema)(
|
|
3220
|
+
() => (0, import_provider_utils27.zodSchema)(import_v420.z.object({ result: import_v420.z.string() }))
|
|
3231
3221
|
);
|
|
3232
3222
|
var imageGenerationToolFactory = (0, import_provider_utils27.createProviderDefinedToolFactoryWithOutputSchema)({
|
|
3233
3223
|
id: "openai.image_generation",
|