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