@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.
@@ -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 z = __toESM(require("zod/v4"));
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 z2 = __toESM(require("zod/v4"));
284
+ var import_v42 = require("zod/v4");
295
285
  var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
296
286
  () => (0, import_provider_utils3.zodSchema)(
297
- z2.object({
298
- id: z2.string().nullish(),
299
- created: z2.number().nullish(),
300
- model: z2.string().nullish(),
301
- choices: z2.array(
302
- z2.object({
303
- message: z2.object({
304
- role: z2.literal("assistant").nullish(),
305
- content: z2.string().nullish(),
306
- tool_calls: z2.array(
307
- z2.object({
308
- id: z2.string().nullish(),
309
- type: z2.literal("function"),
310
- function: z2.object({
311
- name: z2.string(),
312
- arguments: z2.string()
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: z2.array(
317
- z2.object({
318
- type: z2.literal("url_citation"),
319
- start_index: z2.number(),
320
- end_index: z2.number(),
321
- url: z2.string(),
322
- title: z2.string()
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: z2.number(),
327
- logprobs: z2.object({
328
- content: z2.array(
329
- z2.object({
330
- token: z2.string(),
331
- logprob: z2.number(),
332
- top_logprobs: z2.array(
333
- z2.object({
334
- token: z2.string(),
335
- logprob: z2.number()
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: z2.string().nullish()
331
+ finish_reason: import_v42.z.string().nullish()
342
332
  })
343
333
  ),
344
- usage: z2.object({
345
- prompt_tokens: z2.number().nullish(),
346
- completion_tokens: z2.number().nullish(),
347
- total_tokens: z2.number().nullish(),
348
- prompt_tokens_details: z2.object({
349
- cached_tokens: z2.number().nullish()
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: z2.object({
352
- reasoning_tokens: z2.number().nullish(),
353
- accepted_prediction_tokens: z2.number().nullish(),
354
- rejected_prediction_tokens: z2.number().nullish()
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
- z2.union([
363
- z2.object({
364
- id: z2.string().nullish(),
365
- created: z2.number().nullish(),
366
- model: z2.string().nullish(),
367
- choices: z2.array(
368
- z2.object({
369
- delta: z2.object({
370
- role: z2.enum(["assistant"]).nullish(),
371
- content: z2.string().nullish(),
372
- tool_calls: z2.array(
373
- z2.object({
374
- index: z2.number(),
375
- id: z2.string().nullish(),
376
- type: z2.literal("function").nullish(),
377
- function: z2.object({
378
- name: z2.string().nullish(),
379
- arguments: z2.string().nullish()
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: z2.array(
384
- z2.object({
385
- type: z2.literal("url_citation"),
386
- start_index: z2.number(),
387
- end_index: z2.number(),
388
- url: z2.string(),
389
- title: z2.string()
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: z2.object({
394
- content: z2.array(
395
- z2.object({
396
- token: z2.string(),
397
- logprob: z2.number(),
398
- top_logprobs: z2.array(
399
- z2.object({
400
- token: z2.string(),
401
- logprob: z2.number()
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: z2.string().nullish(),
408
- index: z2.number()
397
+ finish_reason: import_v42.z.string().nullish(),
398
+ index: import_v42.z.number()
409
399
  })
410
400
  ),
411
- usage: z2.object({
412
- prompt_tokens: z2.number().nullish(),
413
- completion_tokens: z2.number().nullish(),
414
- total_tokens: z2.number().nullish(),
415
- prompt_tokens_details: z2.object({
416
- cached_tokens: z2.number().nullish()
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: z2.object({
419
- reasoning_tokens: z2.number().nullish(),
420
- accepted_prediction_tokens: z2.number().nullish(),
421
- rejected_prediction_tokens: z2.number().nullish()
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 z3 = __toESM(require("zod/v4"));
422
+ var import_v43 = require("zod/v4");
433
423
  var openaiChatLanguageModelOptions = (0, import_provider_utils4.lazyValidator)(
434
424
  () => (0, import_provider_utils4.zodSchema)(
435
- z3.object({
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: z3.record(z3.coerce.number(), z3.number()).optional(),
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: z3.union([z3.boolean(), z3.number()]).optional(),
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: z3.boolean().optional(),
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: z3.string().optional(),
451
+ user: import_v43.z.string().optional(),
462
452
  /**
463
453
  * Reasoning effort for reasoning models. Defaults to `medium`.
464
454
  */
465
- reasoningEffort: z3.enum(["minimal", "low", "medium", "high"]).optional(),
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: z3.number().optional(),
459
+ maxCompletionTokens: import_v43.z.number().optional(),
470
460
  /**
471
461
  * Whether to enable persistence in responses API.
472
462
  */
473
- store: z3.boolean().optional(),
463
+ store: import_v43.z.boolean().optional(),
474
464
  /**
475
465
  * Metadata to associate with the request.
476
466
  */
477
- metadata: z3.record(z3.string().max(64), z3.string().max(512)).optional(),
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: z3.record(z3.string(), z3.any()).optional(),
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: z3.boolean().optional(),
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: z3.enum(["auto", "flex", "priority", "default"]).optional(),
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: z3.boolean().optional(),
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: z3.enum(["low", "medium", "high"]).optional(),
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: z3.string().optional(),
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: z3.string().optional()
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 z4 = __toESM(require("zod/v4"));
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
- z4.object({
1244
- id: z4.string().nullish(),
1245
- created: z4.number().nullish(),
1246
- model: z4.string().nullish(),
1247
- choices: z4.array(
1248
- z4.object({
1249
- text: z4.string(),
1250
- finish_reason: z4.string(),
1251
- logprobs: z4.object({
1252
- tokens: z4.array(z4.string()),
1253
- token_logprobs: z4.array(z4.number()),
1254
- top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()
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: z4.object({
1259
- prompt_tokens: z4.number(),
1260
- completion_tokens: z4.number(),
1261
- total_tokens: z4.number()
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
- z4.union([
1269
- z4.object({
1270
- id: z4.string().nullish(),
1271
- created: z4.number().nullish(),
1272
- model: z4.string().nullish(),
1273
- choices: z4.array(
1274
- z4.object({
1275
- text: z4.string(),
1276
- finish_reason: z4.string().nullish(),
1277
- index: z4.number(),
1278
- logprobs: z4.object({
1279
- tokens: z4.array(z4.string()),
1280
- token_logprobs: z4.array(z4.number()),
1281
- top_logprobs: z4.array(z4.record(z4.string(), z4.number())).nullish()
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: z4.object({
1286
- prompt_tokens: z4.number(),
1287
- completion_tokens: z4.number(),
1288
- total_tokens: z4.number()
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 z5 = __toESM(require("zod/v4"));
1288
+ var import_v45 = require("zod/v4");
1299
1289
  var openaiCompletionProviderOptions = (0, import_provider_utils7.lazyValidator)(
1300
1290
  () => (0, import_provider_utils7.zodSchema)(
1301
- z5.object({
1291
+ import_v45.z.object({
1302
1292
  /**
1303
1293
  Echo back the prompt in addition to the completion.
1304
1294
  */
1305
- echo: z5.boolean().optional(),
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: z5.record(z5.string(), z5.number()).optional(),
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: z5.string().optional(),
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: z5.string().optional(),
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: z5.union([z5.boolean(), z5.number()]).optional()
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 z6 = __toESM(require("zod/v4"));
1570
+ var import_v46 = require("zod/v4");
1581
1571
  var openaiEmbeddingProviderOptions = (0, import_provider_utils9.lazyValidator)(
1582
1572
  () => (0, import_provider_utils9.zodSchema)(
1583
- z6.object({
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: z6.number().optional(),
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: z6.string().optional()
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 z7 = __toESM(require("zod/v4"));
1590
+ var import_v47 = require("zod/v4");
1601
1591
  var openaiTextEmbeddingResponseSchema = (0, import_provider_utils10.lazyValidator)(
1602
1592
  () => (0, import_provider_utils10.zodSchema)(
1603
- z7.object({
1604
- data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
1605
- usage: z7.object({ prompt_tokens: z7.number() }).nullish()
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 z8 = __toESM(require("zod/v4"));
1669
+ var import_v48 = require("zod/v4");
1680
1670
  var openaiImageResponseSchema = (0, import_provider_utils12.lazyValidator)(
1681
1671
  () => (0, import_provider_utils12.zodSchema)(
1682
- z8.object({
1683
- data: z8.array(
1684
- z8.object({
1685
- b64_json: z8.string(),
1686
- revised_prompt: z8.string().optional()
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 z9 = __toESM(require("zod/v4"));
1779
+ var import_v49 = require("zod/v4");
1790
1780
  var openaiTranscriptionResponseSchema = (0, import_provider_utils14.lazyValidator)(
1791
1781
  () => (0, import_provider_utils14.zodSchema)(
1792
- z9.object({
1793
- text: z9.string(),
1794
- language: z9.string().nullish(),
1795
- duration: z9.number().nullish(),
1796
- words: z9.array(
1797
- z9.object({
1798
- word: z9.string(),
1799
- start: z9.number(),
1800
- end: z9.number()
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: z9.array(
1804
- z9.object({
1805
- id: z9.number(),
1806
- seek: z9.number(),
1807
- start: z9.number(),
1808
- end: z9.number(),
1809
- text: z9.string(),
1810
- tokens: z9.array(z9.number()),
1811
- temperature: z9.number(),
1812
- avg_logprob: z9.number(),
1813
- compression_ratio: z9.number(),
1814
- no_speech_prob: z9.number()
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 z10 = __toESM(require("zod/v4"));
1813
+ var import_v410 = require("zod/v4");
1824
1814
  var openAITranscriptionProviderOptions = (0, import_provider_utils15.lazyValidator)(
1825
1815
  () => (0, import_provider_utils15.zodSchema)(
1826
- z10.object({
1816
+ import_v410.z.object({
1827
1817
  /**
1828
1818
  * Additional information to include in the transcription response.
1829
1819
  */
1830
- include: z10.array(z10.string()).optional(),
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: z10.string().optional(),
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: z10.string().optional(),
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: z10.number().min(0).max(1).default(0).optional(),
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: z10.array(z10.enum(["word", "segment"])).default(["segment"]).optional()
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 z11 = __toESM(require("zod/v4"));
2015
+ var import_v411 = require("zod/v4");
2026
2016
  var openaiSpeechProviderOptionsSchema = (0, import_provider_utils17.lazyValidator)(
2027
2017
  () => (0, import_provider_utils17.zodSchema)(
2028
- z11.object({
2029
- instructions: z11.string().nullish(),
2030
- speed: z11.number().min(0.25).max(4).default(1).nullish()
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 z13 = __toESM(require("zod/v4"));
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 z12 = __toESM(require("zod/v4"));
2137
+ var import_v412 = require("zod/v4");
2148
2138
  var localShellInputSchema = (0, import_provider_utils19.lazySchema)(
2149
2139
  () => (0, import_provider_utils19.zodSchema)(
2150
- z12.object({
2151
- action: z12.object({
2152
- type: z12.literal("exec"),
2153
- command: z12.array(z12.string()),
2154
- timeoutMs: z12.number().optional(),
2155
- user: z12.string().optional(),
2156
- workingDirectory: z12.string().optional(),
2157
- env: z12.record(z12.string(), z12.string()).optional()
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)(z12.object({ output: z12.string() }))
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 = z13.object({
2435
- itemId: z13.string().nullish(),
2436
- reasoningEncryptedContent: z13.string().nullish()
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 z14 = __toESM(require("zod/v4"));
2449
+ var import_v414 = require("zod/v4");
2460
2450
  var openaiResponsesChunkSchema = (0, import_provider_utils21.lazyValidator)(
2461
2451
  () => (0, import_provider_utils21.zodSchema)(
2462
- z14.union([
2463
- z14.object({
2464
- type: z14.literal("response.output_text.delta"),
2465
- item_id: z14.string(),
2466
- delta: z14.string(),
2467
- logprobs: z14.array(
2468
- z14.object({
2469
- token: z14.string(),
2470
- logprob: z14.number(),
2471
- top_logprobs: z14.array(
2472
- z14.object({
2473
- token: z14.string(),
2474
- logprob: z14.number()
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
- z14.object({
2481
- type: z14.enum(["response.completed", "response.incomplete"]),
2482
- response: z14.object({
2483
- incomplete_details: z14.object({ reason: z14.string() }).nullish(),
2484
- usage: z14.object({
2485
- input_tokens: z14.number(),
2486
- input_tokens_details: z14.object({ cached_tokens: z14.number().nullish() }).nullish(),
2487
- output_tokens: z14.number(),
2488
- output_tokens_details: z14.object({ reasoning_tokens: z14.number().nullish() }).nullish()
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: z14.string().nullish()
2480
+ service_tier: import_v414.z.string().nullish()
2491
2481
  })
2492
2482
  }),
2493
- z14.object({
2494
- type: z14.literal("response.created"),
2495
- response: z14.object({
2496
- id: z14.string(),
2497
- created_at: z14.number(),
2498
- model: z14.string(),
2499
- service_tier: z14.string().nullish()
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
- z14.object({
2503
- type: z14.literal("response.output_item.added"),
2504
- output_index: z14.number(),
2505
- item: z14.discriminatedUnion("type", [
2506
- z14.object({
2507
- type: z14.literal("message"),
2508
- id: z14.string()
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
- z14.object({
2511
- type: z14.literal("reasoning"),
2512
- id: z14.string(),
2513
- encrypted_content: z14.string().nullish()
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
- z14.object({
2516
- type: z14.literal("function_call"),
2517
- id: z14.string(),
2518
- call_id: z14.string(),
2519
- name: z14.string(),
2520
- arguments: z14.string()
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
- z14.object({
2523
- type: z14.literal("web_search_call"),
2524
- id: z14.string(),
2525
- status: z14.string(),
2526
- action: z14.object({
2527
- type: z14.literal("search"),
2528
- query: z14.string().optional()
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
- z14.object({
2532
- type: z14.literal("computer_call"),
2533
- id: z14.string(),
2534
- status: z14.string()
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
- z14.object({
2537
- type: z14.literal("file_search_call"),
2538
- id: z14.string()
2526
+ import_v414.z.object({
2527
+ type: import_v414.z.literal("file_search_call"),
2528
+ id: import_v414.z.string()
2539
2529
  }),
2540
- z14.object({
2541
- type: z14.literal("image_generation_call"),
2542
- id: z14.string()
2530
+ import_v414.z.object({
2531
+ type: import_v414.z.literal("image_generation_call"),
2532
+ id: import_v414.z.string()
2543
2533
  }),
2544
- z14.object({
2545
- type: z14.literal("code_interpreter_call"),
2546
- id: z14.string(),
2547
- container_id: z14.string(),
2548
- code: z14.string().nullable(),
2549
- outputs: z14.array(
2550
- z14.discriminatedUnion("type", [
2551
- z14.object({ type: z14.literal("logs"), logs: z14.string() }),
2552
- z14.object({ type: z14.literal("image"), url: z14.string() })
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: z14.string()
2545
+ status: import_v414.z.string()
2556
2546
  })
2557
2547
  ])
2558
2548
  }),
2559
- z14.object({
2560
- type: z14.literal("response.output_item.done"),
2561
- output_index: z14.number(),
2562
- item: z14.discriminatedUnion("type", [
2563
- z14.object({
2564
- type: z14.literal("message"),
2565
- id: z14.string()
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
- z14.object({
2568
- type: z14.literal("reasoning"),
2569
- id: z14.string(),
2570
- encrypted_content: z14.string().nullish()
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
- z14.object({
2573
- type: z14.literal("function_call"),
2574
- id: z14.string(),
2575
- call_id: z14.string(),
2576
- name: z14.string(),
2577
- arguments: z14.string(),
2578
- status: z14.literal("completed")
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
- z14.object({
2581
- type: z14.literal("code_interpreter_call"),
2582
- id: z14.string(),
2583
- code: z14.string().nullable(),
2584
- container_id: z14.string(),
2585
- outputs: z14.array(
2586
- z14.discriminatedUnion("type", [
2587
- z14.object({ type: z14.literal("logs"), logs: z14.string() }),
2588
- z14.object({ type: z14.literal("image"), url: z14.string() })
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
- z14.object({
2593
- type: z14.literal("image_generation_call"),
2594
- id: z14.string(),
2595
- result: z14.string()
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
- z14.object({
2598
- type: z14.literal("web_search_call"),
2599
- id: z14.string(),
2600
- status: z14.string(),
2601
- action: z14.discriminatedUnion("type", [
2602
- z14.object({
2603
- type: z14.literal("search"),
2604
- query: z14.string().nullish()
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
- z14.object({
2607
- type: z14.literal("open_page"),
2608
- url: z14.string()
2596
+ import_v414.z.object({
2597
+ type: import_v414.z.literal("open_page"),
2598
+ url: import_v414.z.string()
2609
2599
  }),
2610
- z14.object({
2611
- type: z14.literal("find"),
2612
- url: z14.string(),
2613
- pattern: z14.string()
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
- z14.object({
2618
- type: z14.literal("file_search_call"),
2619
- id: z14.string(),
2620
- queries: z14.array(z14.string()),
2621
- results: z14.array(
2622
- z14.object({
2623
- attributes: z14.record(z14.string(), z14.unknown()),
2624
- file_id: z14.string(),
2625
- filename: z14.string(),
2626
- score: z14.number(),
2627
- text: z14.string()
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
- z14.object({
2632
- type: z14.literal("local_shell_call"),
2633
- id: z14.string(),
2634
- call_id: z14.string(),
2635
- action: z14.object({
2636
- type: z14.literal("exec"),
2637
- command: z14.array(z14.string()),
2638
- timeout_ms: z14.number().optional(),
2639
- user: z14.string().optional(),
2640
- working_directory: z14.string().optional(),
2641
- env: z14.record(z14.string(), z14.string()).optional()
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
- z14.object({
2645
- type: z14.literal("computer_call"),
2646
- id: z14.string(),
2647
- status: z14.literal("completed")
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
- z14.object({
2652
- type: z14.literal("response.function_call_arguments.delta"),
2653
- item_id: z14.string(),
2654
- output_index: z14.number(),
2655
- delta: z14.string()
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
- z14.object({
2658
- type: z14.literal("response.image_generation_call.partial_image"),
2659
- item_id: z14.string(),
2660
- output_index: z14.number(),
2661
- partial_image_b64: z14.string()
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
- z14.object({
2664
- type: z14.literal("response.code_interpreter_call_code.delta"),
2665
- item_id: z14.string(),
2666
- output_index: z14.number(),
2667
- delta: z14.string()
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
- z14.object({
2670
- type: z14.literal("response.code_interpreter_call_code.done"),
2671
- item_id: z14.string(),
2672
- output_index: z14.number(),
2673
- code: z14.string()
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
- z14.object({
2676
- type: z14.literal("response.output_text.annotation.added"),
2677
- annotation: z14.discriminatedUnion("type", [
2678
- z14.object({
2679
- type: z14.literal("url_citation"),
2680
- url: z14.string(),
2681
- title: z14.string()
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
- z14.object({
2684
- type: z14.literal("file_citation"),
2685
- file_id: z14.string(),
2686
- filename: z14.string().nullish(),
2687
- index: z14.number().nullish(),
2688
- start_index: z14.number().nullish(),
2689
- end_index: z14.number().nullish(),
2690
- quote: z14.string().nullish()
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
- z14.object({
2695
- type: z14.literal("response.reasoning_summary_part.added"),
2696
- item_id: z14.string(),
2697
- summary_index: z14.number()
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
- z14.object({
2700
- type: z14.literal("response.reasoning_summary_text.delta"),
2701
- item_id: z14.string(),
2702
- summary_index: z14.number(),
2703
- delta: z14.string()
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
- z14.object({
2706
- type: z14.literal("error"),
2707
- code: z14.string(),
2708
- message: z14.string(),
2709
- param: z14.string().nullish(),
2710
- sequence_number: z14.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
- z14.object({ type: z14.string() }).loose().transform((value) => ({
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
- z14.object({
2723
- id: z14.string(),
2724
- created_at: z14.number(),
2725
- error: z14.object({
2726
- code: z14.string(),
2727
- message: z14.string()
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: z14.string(),
2730
- output: z14.array(
2731
- z14.discriminatedUnion("type", [
2732
- z14.object({
2733
- type: z14.literal("message"),
2734
- role: z14.literal("assistant"),
2735
- id: z14.string(),
2736
- content: z14.array(
2737
- z14.object({
2738
- type: z14.literal("output_text"),
2739
- text: z14.string(),
2740
- logprobs: z14.array(
2741
- z14.object({
2742
- token: z14.string(),
2743
- logprob: z14.number(),
2744
- top_logprobs: z14.array(
2745
- z14.object({
2746
- token: z14.string(),
2747
- logprob: z14.number()
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: z14.array(
2753
- z14.discriminatedUnion("type", [
2754
- z14.object({
2755
- type: z14.literal("url_citation"),
2756
- start_index: z14.number(),
2757
- end_index: z14.number(),
2758
- url: z14.string(),
2759
- title: z14.string()
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
- z14.object({
2762
- type: z14.literal("file_citation"),
2763
- file_id: z14.string(),
2764
- filename: z14.string().nullish(),
2765
- index: z14.number().nullish(),
2766
- start_index: z14.number().nullish(),
2767
- end_index: z14.number().nullish(),
2768
- quote: z14.string().nullish()
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
- z14.object({
2771
- type: z14.literal("container_file_citation")
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
- z14.object({
2779
- type: z14.literal("web_search_call"),
2780
- id: z14.string(),
2781
- status: z14.string(),
2782
- action: z14.discriminatedUnion("type", [
2783
- z14.object({
2784
- type: z14.literal("search"),
2785
- query: z14.string().nullish()
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
- z14.object({
2788
- type: z14.literal("open_page"),
2789
- url: z14.string()
2777
+ import_v414.z.object({
2778
+ type: import_v414.z.literal("open_page"),
2779
+ url: import_v414.z.string()
2790
2780
  }),
2791
- z14.object({
2792
- type: z14.literal("find"),
2793
- url: z14.string(),
2794
- pattern: z14.string()
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
- z14.object({
2799
- type: z14.literal("file_search_call"),
2800
- id: z14.string(),
2801
- queries: z14.array(z14.string()),
2802
- results: z14.array(
2803
- z14.object({
2804
- attributes: z14.record(z14.string(), z14.unknown()),
2805
- file_id: z14.string(),
2806
- filename: z14.string(),
2807
- score: z14.number(),
2808
- text: z14.string()
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
- z14.object({
2813
- type: z14.literal("code_interpreter_call"),
2814
- id: z14.string(),
2815
- code: z14.string().nullable(),
2816
- container_id: z14.string(),
2817
- outputs: z14.array(
2818
- z14.discriminatedUnion("type", [
2819
- z14.object({ type: z14.literal("logs"), logs: z14.string() }),
2820
- z14.object({ type: z14.literal("image"), url: z14.string() })
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
- z14.object({
2825
- type: z14.literal("image_generation_call"),
2826
- id: z14.string(),
2827
- result: z14.string()
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
- z14.object({
2830
- type: z14.literal("local_shell_call"),
2831
- id: z14.string(),
2832
- call_id: z14.string(),
2833
- action: z14.object({
2834
- type: z14.literal("exec"),
2835
- command: z14.array(z14.string()),
2836
- timeout_ms: z14.number().optional(),
2837
- user: z14.string().optional(),
2838
- working_directory: z14.string().optional(),
2839
- env: z14.record(z14.string(), z14.string()).optional()
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
- z14.object({
2843
- type: z14.literal("function_call"),
2844
- call_id: z14.string(),
2845
- name: z14.string(),
2846
- arguments: z14.string(),
2847
- id: z14.string()
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
- z14.object({
2850
- type: z14.literal("computer_call"),
2851
- id: z14.string(),
2852
- status: z14.string().optional()
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
- z14.object({
2855
- type: z14.literal("reasoning"),
2856
- id: z14.string(),
2857
- encrypted_content: z14.string().nullish(),
2858
- summary: z14.array(
2859
- z14.object({
2860
- type: z14.literal("summary_text"),
2861
- text: z14.string()
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: z14.string().nullish(),
2868
- incomplete_details: z14.object({ reason: z14.string() }).nullish(),
2869
- usage: z14.object({
2870
- input_tokens: z14.number(),
2871
- input_tokens_details: z14.object({ cached_tokens: z14.number().nullish() }).nullish(),
2872
- output_tokens: z14.number(),
2873
- output_tokens_details: z14.object({ reasoning_tokens: z14.number().nullish() }).nullish()
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 z15 = __toESM(require("zod/v4"));
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
- z15.object({
2943
- include: z15.array(
2944
- z15.enum([
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: z15.string().nullish(),
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: z15.union([z15.boolean(), z15.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
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: z15.number().nullish(),
2970
- metadata: z15.any().nullish(),
2971
- parallelToolCalls: z15.boolean().nullish(),
2972
- previousResponseId: z15.string().nullish(),
2973
- promptCacheKey: z15.string().nullish(),
2974
- reasoningEffort: z15.string().nullish(),
2975
- reasoningSummary: z15.string().nullish(),
2976
- safetyIdentifier: z15.string().nullish(),
2977
- serviceTier: z15.enum(["auto", "flex", "priority", "default"]).nullish(),
2978
- store: z15.boolean().nullish(),
2979
- strictJsonSchema: z15.boolean().nullish(),
2980
- textVerbosity: z15.enum(["low", "medium", "high"]).nullish(),
2981
- user: z15.string().nullish()
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 z16 = __toESM(require("zod/v4"));
2981
+ var import_v416 = require("zod/v4");
2992
2982
  var codeInterpreterInputSchema = (0, import_provider_utils23.lazySchema)(
2993
2983
  () => (0, import_provider_utils23.zodSchema)(
2994
- z16.object({
2995
- code: z16.string().nullish(),
2996
- containerId: z16.string()
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
- z16.object({
3003
- outputs: z16.array(
3004
- z16.discriminatedUnion("type", [
3005
- z16.object({ type: z16.literal("logs"), logs: z16.string() }),
3006
- z16.object({ type: z16.literal("image"), url: z16.string() })
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
- z16.object({
3015
- container: z16.union([
3016
- z16.string(),
3017
- z16.object({
3018
- fileIds: z16.array(z16.string()).optional()
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 z17 = __toESM(require("zod/v4"));
3037
- var comparisonFilterSchema = z17.object({
3038
- key: z17.string(),
3039
- type: z17.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
3040
- value: z17.union([z17.string(), z17.number(), z17.boolean()])
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 = z17.object({
3043
- type: z17.enum(["and", "or"]),
3044
- filters: z17.array(
3045
- z17.union([comparisonFilterSchema, z17.lazy(() => compoundFilterSchema)])
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
- z17.object({
3051
- vectorStoreIds: z17.array(z17.string()),
3052
- maxNumResults: z17.number().optional(),
3053
- ranking: z17.object({
3054
- ranker: z17.string().optional(),
3055
- scoreThreshold: z17.number().optional()
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: z17.union([comparisonFilterSchema, compoundFilterSchema]).optional()
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
- z17.object({
3064
- queries: z17.array(z17.string()),
3065
- results: z17.array(
3066
- z17.object({
3067
- attributes: z17.record(z17.string(), z17.unknown()),
3068
- fileId: z17.string(),
3069
- filename: z17.string(),
3070
- score: z17.number(),
3071
- text: z17.string()
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: z17.object({}),
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 z18 = __toESM(require("zod/v4"));
3076
+ var import_v418 = require("zod/v4");
3087
3077
  var webSearchArgsSchema = (0, import_provider_utils25.lazySchema)(
3088
3078
  () => (0, import_provider_utils25.zodSchema)(
3089
- z18.object({
3090
- filters: z18.object({
3091
- allowedDomains: z18.array(z18.string()).optional()
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: z18.enum(["low", "medium", "high"]).optional(),
3094
- userLocation: z18.object({
3095
- type: z18.literal("approximate"),
3096
- country: z18.string().optional(),
3097
- city: z18.string().optional(),
3098
- region: z18.string().optional(),
3099
- timezone: z18.string().optional()
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
- z18.object({
3107
- action: z18.discriminatedUnion("type", [
3108
- z18.object({
3109
- type: z18.literal("search"),
3110
- query: z18.string().nullish()
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
- z18.object({
3113
- type: z18.literal("open_page"),
3114
- url: z18.string()
3102
+ import_v418.z.object({
3103
+ type: import_v418.z.literal("open_page"),
3104
+ url: import_v418.z.string()
3115
3105
  }),
3116
- z18.object({
3117
- type: z18.literal("find"),
3118
- url: z18.string(),
3119
- pattern: z18.string()
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 z19 = __toESM(require("zod/v4"));
3123
+ var import_v419 = require("zod/v4");
3134
3124
  var webSearchPreviewArgsSchema = (0, import_provider_utils26.lazySchema)(
3135
3125
  () => (0, import_provider_utils26.zodSchema)(
3136
- z19.object({
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: z19.enum(["low", "medium", "high"]).optional(),
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: z19.object({
3137
+ userLocation: import_v419.z.object({
3148
3138
  /**
3149
3139
  * Type of location (always 'approximate')
3150
3140
  */
3151
- type: z19.literal("approximate"),
3141
+ type: import_v419.z.literal("approximate"),
3152
3142
  /**
3153
3143
  * Two-letter ISO country code (e.g., 'US', 'GB')
3154
3144
  */
3155
- country: z19.string().optional(),
3145
+ country: import_v419.z.string().optional(),
3156
3146
  /**
3157
3147
  * City name (free text, e.g., 'Minneapolis')
3158
3148
  */
3159
- city: z19.string().optional(),
3149
+ city: import_v419.z.string().optional(),
3160
3150
  /**
3161
3151
  * Region name (free text, e.g., 'Minnesota')
3162
3152
  */
3163
- region: z19.string().optional(),
3153
+ region: import_v419.z.string().optional(),
3164
3154
  /**
3165
3155
  * IANA timezone (e.g., 'America/Chicago')
3166
3156
  */
3167
- timezone: z19.string().optional()
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
- z19.object({
3175
- action: z19.discriminatedUnion("type", [
3176
- z19.object({
3177
- type: z19.literal("search"),
3178
- query: z19.string().nullish()
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
- z19.object({
3181
- type: z19.literal("open_page"),
3182
- url: z19.string()
3170
+ import_v419.z.object({
3171
+ type: import_v419.z.literal("open_page"),
3172
+ url: import_v419.z.string()
3183
3173
  }),
3184
- z19.object({
3185
- type: z19.literal("find"),
3186
- url: z19.string(),
3187
- pattern: z19.string()
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 z20 = __toESM(require("zod/v4"));
3191
+ var import_v420 = require("zod/v4");
3202
3192
  var imageGenerationArgsSchema = (0, import_provider_utils27.lazySchema)(
3203
3193
  () => (0, import_provider_utils27.zodSchema)(
3204
- z20.object({
3205
- background: z20.enum(["auto", "opaque", "transparent"]).optional(),
3206
- inputFidelity: z20.enum(["low", "high"]).optional(),
3207
- inputImageMask: z20.object({
3208
- fileId: z20.string().optional(),
3209
- imageUrl: z20.string().optional()
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: z20.string().optional(),
3212
- moderation: z20.enum(["auto"]).optional(),
3213
- outputCompression: z20.number().int().min(0).max(100).optional(),
3214
- outputFormat: z20.enum(["png", "jpeg", "webp"]).optional(),
3215
- partialImages: z20.number().int().min(0).max(3).optional(),
3216
- quality: z20.enum(["auto", "low", "medium", "high"]).optional(),
3217
- size: z20.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
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)(z20.object({})));
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)(z20.object({ result: z20.string() }))
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",