@ai-sdk/openai 3.0.55 → 3.0.57

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.
@@ -1734,6 +1734,7 @@ import {
1734
1734
  convertToFormData,
1735
1735
  createJsonResponseHandler as createJsonResponseHandler4,
1736
1736
  downloadBlob,
1737
+ parseProviderOptions as parseProviderOptions4,
1737
1738
  postFormDataToApi,
1738
1739
  postJsonToApi as postJsonToApi4
1739
1740
  } from "@ai-sdk/provider-utils";
@@ -1768,7 +1769,12 @@ var openaiImageResponseSchema = lazySchema7(
1768
1769
  )
1769
1770
  );
1770
1771
 
1771
- // src/image/openai-image-options.ts
1772
+ // src/image/openai-image-model-options.ts
1773
+ import {
1774
+ lazySchema as lazySchema8,
1775
+ zodSchema as zodSchema8
1776
+ } from "@ai-sdk/provider-utils";
1777
+ import { z as z9 } from "zod/v4";
1772
1778
  var modelMaxImagesPerCall = {
1773
1779
  "dall-e-3": 1,
1774
1780
  "dall-e-2": 10,
@@ -1790,6 +1796,65 @@ function hasDefaultResponseFormat(modelId) {
1790
1796
  (prefix) => modelId.startsWith(prefix)
1791
1797
  );
1792
1798
  }
1799
+ var baseImageModelOptionsObject = z9.object({
1800
+ /**
1801
+ * Quality of the generated image(s).
1802
+ *
1803
+ * Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
1804
+ */
1805
+ quality: z9.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
1806
+ /**
1807
+ * Background behavior for the generated image(s).
1808
+ *
1809
+ * If `transparent`, the output format must support transparency
1810
+ * (i.e. `png` or `webp`).
1811
+ */
1812
+ background: z9.enum(["transparent", "opaque", "auto"]).optional(),
1813
+ /**
1814
+ * Format in which the generated image(s) are returned.
1815
+ */
1816
+ outputFormat: z9.enum(["png", "jpeg", "webp"]).optional(),
1817
+ /**
1818
+ * Compression level (0-100) for the generated image(s). Applies to the
1819
+ * `jpeg` and `webp` output formats.
1820
+ */
1821
+ outputCompression: z9.number().int().min(0).max(100).optional(),
1822
+ /**
1823
+ * A unique identifier representing your end-user, which can help OpenAI
1824
+ * to monitor and detect abuse.
1825
+ */
1826
+ user: z9.string().optional()
1827
+ });
1828
+ var openaiImageModelOptions = lazySchema8(
1829
+ () => zodSchema8(baseImageModelOptionsObject)
1830
+ );
1831
+ var openaiImageModelGenerationOptions = lazySchema8(
1832
+ () => zodSchema8(
1833
+ baseImageModelOptionsObject.extend({
1834
+ /**
1835
+ * Style of the generated image. `vivid` produces hyper-real and
1836
+ * dramatic images; `natural` produces more subdued, less hyper-real
1837
+ * looking images.
1838
+ */
1839
+ style: z9.enum(["vivid", "natural"]).optional(),
1840
+ /**
1841
+ * Content moderation level for the generated image(s). `low` applies
1842
+ * less restrictive filtering.
1843
+ */
1844
+ moderation: z9.enum(["auto", "low"]).optional()
1845
+ })
1846
+ )
1847
+ );
1848
+ var openaiImageModelEditOptions = lazySchema8(
1849
+ () => zodSchema8(
1850
+ baseImageModelOptionsObject.extend({
1851
+ /**
1852
+ * Fidelity of the output image(s) to the input image(s).
1853
+ */
1854
+ inputFidelity: z9.enum(["high", "low"]).optional()
1855
+ })
1856
+ )
1857
+ );
1793
1858
 
1794
1859
  // src/image/openai-image-model.ts
1795
1860
  var OpenAIImageModel = class {
@@ -1831,6 +1896,11 @@ var OpenAIImageModel = class {
1831
1896
  }
1832
1897
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
1833
1898
  if (files != null) {
1899
+ const openaiOptions2 = (_d = await parseProviderOptions4({
1900
+ provider: "openai",
1901
+ providerOptions,
1902
+ schema: openaiImageModelEditOptions
1903
+ })) != null ? _d : {};
1834
1904
  const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
1835
1905
  url: this.config.url({
1836
1906
  path: "/images/edits",
@@ -1857,7 +1927,12 @@ var OpenAIImageModel = class {
1857
1927
  mask: mask != null ? await fileToBlob(mask) : void 0,
1858
1928
  n,
1859
1929
  size,
1860
- ...(_d = providerOptions.openai) != null ? _d : {}
1930
+ quality: openaiOptions2.quality,
1931
+ background: openaiOptions2.background,
1932
+ output_format: openaiOptions2.outputFormat,
1933
+ output_compression: openaiOptions2.outputCompression,
1934
+ input_fidelity: openaiOptions2.inputFidelity,
1935
+ user: openaiOptions2.user
1861
1936
  }),
1862
1937
  failedResponseHandler: openaiFailedResponseHandler,
1863
1938
  successfulResponseHandler: createJsonResponseHandler4(
@@ -1901,6 +1976,11 @@ var OpenAIImageModel = class {
1901
1976
  }
1902
1977
  };
1903
1978
  }
1979
+ const openaiOptions = (_h = await parseProviderOptions4({
1980
+ provider: "openai",
1981
+ providerOptions,
1982
+ schema: openaiImageModelGenerationOptions
1983
+ })) != null ? _h : {};
1904
1984
  const { value: response, responseHeaders } = await postJsonToApi4({
1905
1985
  url: this.config.url({
1906
1986
  path: "/images/generations",
@@ -1912,7 +1992,13 @@ var OpenAIImageModel = class {
1912
1992
  prompt,
1913
1993
  n,
1914
1994
  size,
1915
- ...(_h = providerOptions.openai) != null ? _h : {},
1995
+ quality: openaiOptions.quality,
1996
+ style: openaiOptions.style,
1997
+ background: openaiOptions.background,
1998
+ moderation: openaiOptions.moderation,
1999
+ output_format: openaiOptions.outputFormat,
2000
+ output_compression: openaiOptions.outputCompression,
2001
+ user: openaiOptions.user,
1916
2002
  ...!hasDefaultResponseFormat(this.modelId) ? { response_format: "b64_json" } : {}
1917
2003
  },
1918
2004
  failedResponseHandler: openaiFailedResponseHandler,
@@ -1990,38 +2076,38 @@ import {
1990
2076
  convertBase64ToUint8Array as convertBase64ToUint8Array2,
1991
2077
  createJsonResponseHandler as createJsonResponseHandler5,
1992
2078
  mediaTypeToExtension,
1993
- parseProviderOptions as parseProviderOptions4,
2079
+ parseProviderOptions as parseProviderOptions5,
1994
2080
  postFormDataToApi as postFormDataToApi2
1995
2081
  } from "@ai-sdk/provider-utils";
1996
2082
 
1997
2083
  // src/transcription/openai-transcription-api.ts
1998
- import { lazySchema as lazySchema8, zodSchema as zodSchema8 } from "@ai-sdk/provider-utils";
1999
- import { z as z9 } from "zod/v4";
2000
- var openaiTranscriptionResponseSchema = lazySchema8(
2001
- () => zodSchema8(
2002
- z9.object({
2003
- text: z9.string(),
2004
- language: z9.string().nullish(),
2005
- duration: z9.number().nullish(),
2006
- words: z9.array(
2007
- z9.object({
2008
- word: z9.string(),
2009
- start: z9.number(),
2010
- end: z9.number()
2084
+ import { lazySchema as lazySchema9, zodSchema as zodSchema9 } from "@ai-sdk/provider-utils";
2085
+ import { z as z10 } from "zod/v4";
2086
+ var openaiTranscriptionResponseSchema = lazySchema9(
2087
+ () => zodSchema9(
2088
+ z10.object({
2089
+ text: z10.string(),
2090
+ language: z10.string().nullish(),
2091
+ duration: z10.number().nullish(),
2092
+ words: z10.array(
2093
+ z10.object({
2094
+ word: z10.string(),
2095
+ start: z10.number(),
2096
+ end: z10.number()
2011
2097
  })
2012
2098
  ).nullish(),
2013
- segments: z9.array(
2014
- z9.object({
2015
- id: z9.number(),
2016
- seek: z9.number(),
2017
- start: z9.number(),
2018
- end: z9.number(),
2019
- text: z9.string(),
2020
- tokens: z9.array(z9.number()),
2021
- temperature: z9.number(),
2022
- avg_logprob: z9.number(),
2023
- compression_ratio: z9.number(),
2024
- no_speech_prob: z9.number()
2099
+ segments: z10.array(
2100
+ z10.object({
2101
+ id: z10.number(),
2102
+ seek: z10.number(),
2103
+ start: z10.number(),
2104
+ end: z10.number(),
2105
+ text: z10.string(),
2106
+ tokens: z10.array(z10.number()),
2107
+ temperature: z10.number(),
2108
+ avg_logprob: z10.number(),
2109
+ compression_ratio: z10.number(),
2110
+ no_speech_prob: z10.number()
2025
2111
  })
2026
2112
  ).nullish()
2027
2113
  })
@@ -2030,35 +2116,35 @@ var openaiTranscriptionResponseSchema = lazySchema8(
2030
2116
 
2031
2117
  // src/transcription/openai-transcription-options.ts
2032
2118
  import {
2033
- lazySchema as lazySchema9,
2034
- zodSchema as zodSchema9
2119
+ lazySchema as lazySchema10,
2120
+ zodSchema as zodSchema10
2035
2121
  } from "@ai-sdk/provider-utils";
2036
- import { z as z10 } from "zod/v4";
2037
- var openAITranscriptionModelOptions = lazySchema9(
2038
- () => zodSchema9(
2039
- z10.object({
2122
+ import { z as z11 } from "zod/v4";
2123
+ var openAITranscriptionModelOptions = lazySchema10(
2124
+ () => zodSchema10(
2125
+ z11.object({
2040
2126
  /**
2041
2127
  * Additional information to include in the transcription response.
2042
2128
  */
2043
- include: z10.array(z10.string()).optional(),
2129
+ include: z11.array(z11.string()).optional(),
2044
2130
  /**
2045
2131
  * The language of the input audio in ISO-639-1 format.
2046
2132
  */
2047
- language: z10.string().optional(),
2133
+ language: z11.string().optional(),
2048
2134
  /**
2049
2135
  * An optional text to guide the model's style or continue a previous audio segment.
2050
2136
  */
2051
- prompt: z10.string().optional(),
2137
+ prompt: z11.string().optional(),
2052
2138
  /**
2053
2139
  * The sampling temperature, between 0 and 1.
2054
2140
  * @default 0
2055
2141
  */
2056
- temperature: z10.number().min(0).max(1).default(0).optional(),
2142
+ temperature: z11.number().min(0).max(1).default(0).optional(),
2057
2143
  /**
2058
2144
  * The timestamp granularities to populate for this transcription.
2059
2145
  * @default ['segment']
2060
2146
  */
2061
- timestampGranularities: z10.array(z10.enum(["word", "segment"])).default(["segment"]).optional()
2147
+ timestampGranularities: z11.array(z11.enum(["word", "segment"])).default(["segment"]).optional()
2062
2148
  })
2063
2149
  )
2064
2150
  );
@@ -2138,7 +2224,7 @@ var OpenAITranscriptionModel = class {
2138
2224
  providerOptions
2139
2225
  }) {
2140
2226
  const warnings = [];
2141
- const openAIOptions = await parseProviderOptions4({
2227
+ const openAIOptions = await parseProviderOptions5({
2142
2228
  provider: "openai",
2143
2229
  providerOptions,
2144
2230
  schema: openAITranscriptionModelOptions
@@ -2234,21 +2320,21 @@ var OpenAITranscriptionModel = class {
2234
2320
  import {
2235
2321
  combineHeaders as combineHeaders6,
2236
2322
  createBinaryResponseHandler,
2237
- parseProviderOptions as parseProviderOptions5,
2323
+ parseProviderOptions as parseProviderOptions6,
2238
2324
  postJsonToApi as postJsonToApi5
2239
2325
  } from "@ai-sdk/provider-utils";
2240
2326
 
2241
2327
  // src/speech/openai-speech-options.ts
2242
2328
  import {
2243
- lazySchema as lazySchema10,
2244
- zodSchema as zodSchema10
2329
+ lazySchema as lazySchema11,
2330
+ zodSchema as zodSchema11
2245
2331
  } from "@ai-sdk/provider-utils";
2246
- import { z as z11 } from "zod/v4";
2247
- var openaiSpeechModelOptionsSchema = lazySchema10(
2248
- () => zodSchema10(
2249
- z11.object({
2250
- instructions: z11.string().nullish(),
2251
- speed: z11.number().min(0.25).max(4).default(1).nullish()
2332
+ import { z as z12 } from "zod/v4";
2333
+ var openaiSpeechModelOptionsSchema = lazySchema11(
2334
+ () => zodSchema11(
2335
+ z12.object({
2336
+ instructions: z12.string().nullish(),
2337
+ speed: z12.number().min(0.25).max(4).default(1).nullish()
2252
2338
  })
2253
2339
  )
2254
2340
  );
@@ -2273,7 +2359,7 @@ var OpenAISpeechModel = class {
2273
2359
  providerOptions
2274
2360
  }) {
2275
2361
  const warnings = [];
2276
- const openAIOptions = await parseProviderOptions5({
2362
+ const openAIOptions = await parseProviderOptions6({
2277
2363
  provider: "openai",
2278
2364
  providerOptions,
2279
2365
  schema: openaiSpeechModelOptionsSchema
@@ -2364,7 +2450,7 @@ import {
2364
2450
  createJsonResponseHandler as createJsonResponseHandler6,
2365
2451
  createToolNameMapping,
2366
2452
  generateId as generateId2,
2367
- parseProviderOptions as parseProviderOptions7,
2453
+ parseProviderOptions as parseProviderOptions8,
2368
2454
  postJsonToApi as postJsonToApi6
2369
2455
  } from "@ai-sdk/provider-utils";
2370
2456
 
@@ -2415,50 +2501,50 @@ import {
2415
2501
  convertToBase64 as convertToBase642,
2416
2502
  isNonNullable,
2417
2503
  parseJSON,
2418
- parseProviderOptions as parseProviderOptions6,
2504
+ parseProviderOptions as parseProviderOptions7,
2419
2505
  validateTypes
2420
2506
  } from "@ai-sdk/provider-utils";
2421
- import { z as z16 } from "zod/v4";
2507
+ import { z as z17 } from "zod/v4";
2422
2508
 
2423
2509
  // src/tool/apply-patch.ts
2424
2510
  import {
2425
2511
  createProviderToolFactoryWithOutputSchema,
2426
- lazySchema as lazySchema11,
2427
- zodSchema as zodSchema11
2512
+ lazySchema as lazySchema12,
2513
+ zodSchema as zodSchema12
2428
2514
  } from "@ai-sdk/provider-utils";
2429
- import { z as z12 } from "zod/v4";
2430
- var applyPatchInputSchema = lazySchema11(
2431
- () => zodSchema11(
2432
- z12.object({
2433
- callId: z12.string(),
2434
- operation: z12.discriminatedUnion("type", [
2435
- z12.object({
2436
- type: z12.literal("create_file"),
2437
- path: z12.string(),
2438
- diff: z12.string()
2515
+ import { z as z13 } from "zod/v4";
2516
+ var applyPatchInputSchema = lazySchema12(
2517
+ () => zodSchema12(
2518
+ z13.object({
2519
+ callId: z13.string(),
2520
+ operation: z13.discriminatedUnion("type", [
2521
+ z13.object({
2522
+ type: z13.literal("create_file"),
2523
+ path: z13.string(),
2524
+ diff: z13.string()
2439
2525
  }),
2440
- z12.object({
2441
- type: z12.literal("delete_file"),
2442
- path: z12.string()
2526
+ z13.object({
2527
+ type: z13.literal("delete_file"),
2528
+ path: z13.string()
2443
2529
  }),
2444
- z12.object({
2445
- type: z12.literal("update_file"),
2446
- path: z12.string(),
2447
- diff: z12.string()
2530
+ z13.object({
2531
+ type: z13.literal("update_file"),
2532
+ path: z13.string(),
2533
+ diff: z13.string()
2448
2534
  })
2449
2535
  ])
2450
2536
  })
2451
2537
  )
2452
2538
  );
2453
- var applyPatchOutputSchema = lazySchema11(
2454
- () => zodSchema11(
2455
- z12.object({
2456
- status: z12.enum(["completed", "failed"]),
2457
- output: z12.string().optional()
2539
+ var applyPatchOutputSchema = lazySchema12(
2540
+ () => zodSchema12(
2541
+ z13.object({
2542
+ status: z13.enum(["completed", "failed"]),
2543
+ output: z13.string().optional()
2458
2544
  })
2459
2545
  )
2460
2546
  );
2461
- var applyPatchArgsSchema = lazySchema11(() => zodSchema11(z12.object({})));
2547
+ var applyPatchArgsSchema = lazySchema12(() => zodSchema12(z13.object({})));
2462
2548
  var applyPatchToolFactory = createProviderToolFactoryWithOutputSchema({
2463
2549
  id: "openai.apply_patch",
2464
2550
  inputSchema: applyPatchInputSchema,
@@ -2469,26 +2555,26 @@ var applyPatch = applyPatchToolFactory;
2469
2555
  // src/tool/local-shell.ts
2470
2556
  import {
2471
2557
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
2472
- lazySchema as lazySchema12,
2473
- zodSchema as zodSchema12
2558
+ lazySchema as lazySchema13,
2559
+ zodSchema as zodSchema13
2474
2560
  } from "@ai-sdk/provider-utils";
2475
- import { z as z13 } from "zod/v4";
2476
- var localShellInputSchema = lazySchema12(
2477
- () => zodSchema12(
2478
- z13.object({
2479
- action: z13.object({
2480
- type: z13.literal("exec"),
2481
- command: z13.array(z13.string()),
2482
- timeoutMs: z13.number().optional(),
2483
- user: z13.string().optional(),
2484
- workingDirectory: z13.string().optional(),
2485
- env: z13.record(z13.string(), z13.string()).optional()
2561
+ import { z as z14 } from "zod/v4";
2562
+ var localShellInputSchema = lazySchema13(
2563
+ () => zodSchema13(
2564
+ z14.object({
2565
+ action: z14.object({
2566
+ type: z14.literal("exec"),
2567
+ command: z14.array(z14.string()),
2568
+ timeoutMs: z14.number().optional(),
2569
+ user: z14.string().optional(),
2570
+ workingDirectory: z14.string().optional(),
2571
+ env: z14.record(z14.string(), z14.string()).optional()
2486
2572
  })
2487
2573
  })
2488
2574
  )
2489
2575
  );
2490
- var localShellOutputSchema = lazySchema12(
2491
- () => zodSchema12(z13.object({ output: z13.string() }))
2576
+ var localShellOutputSchema = lazySchema13(
2577
+ () => zodSchema13(z14.object({ output: z14.string() }))
2492
2578
  );
2493
2579
  var localShell = createProviderToolFactoryWithOutputSchema2({
2494
2580
  id: "openai.local_shell",
@@ -2499,91 +2585,91 @@ var localShell = createProviderToolFactoryWithOutputSchema2({
2499
2585
  // src/tool/shell.ts
2500
2586
  import {
2501
2587
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
2502
- lazySchema as lazySchema13,
2503
- zodSchema as zodSchema13
2588
+ lazySchema as lazySchema14,
2589
+ zodSchema as zodSchema14
2504
2590
  } from "@ai-sdk/provider-utils";
2505
- import { z as z14 } from "zod/v4";
2506
- var shellInputSchema = lazySchema13(
2507
- () => zodSchema13(
2508
- z14.object({
2509
- action: z14.object({
2510
- commands: z14.array(z14.string()),
2511
- timeoutMs: z14.number().optional(),
2512
- maxOutputLength: z14.number().optional()
2591
+ import { z as z15 } from "zod/v4";
2592
+ var shellInputSchema = lazySchema14(
2593
+ () => zodSchema14(
2594
+ z15.object({
2595
+ action: z15.object({
2596
+ commands: z15.array(z15.string()),
2597
+ timeoutMs: z15.number().optional(),
2598
+ maxOutputLength: z15.number().optional()
2513
2599
  })
2514
2600
  })
2515
2601
  )
2516
2602
  );
2517
- var shellOutputSchema = lazySchema13(
2518
- () => zodSchema13(
2519
- z14.object({
2520
- output: z14.array(
2521
- z14.object({
2522
- stdout: z14.string(),
2523
- stderr: z14.string(),
2524
- outcome: z14.discriminatedUnion("type", [
2525
- z14.object({ type: z14.literal("timeout") }),
2526
- z14.object({ type: z14.literal("exit"), exitCode: z14.number() })
2603
+ var shellOutputSchema = lazySchema14(
2604
+ () => zodSchema14(
2605
+ z15.object({
2606
+ output: z15.array(
2607
+ z15.object({
2608
+ stdout: z15.string(),
2609
+ stderr: z15.string(),
2610
+ outcome: z15.discriminatedUnion("type", [
2611
+ z15.object({ type: z15.literal("timeout") }),
2612
+ z15.object({ type: z15.literal("exit"), exitCode: z15.number() })
2527
2613
  ])
2528
2614
  })
2529
2615
  )
2530
2616
  })
2531
2617
  )
2532
2618
  );
2533
- var shellSkillsSchema = z14.array(
2534
- z14.discriminatedUnion("type", [
2535
- z14.object({
2536
- type: z14.literal("skillReference"),
2537
- skillId: z14.string(),
2538
- version: z14.string().optional()
2619
+ var shellSkillsSchema = z15.array(
2620
+ z15.discriminatedUnion("type", [
2621
+ z15.object({
2622
+ type: z15.literal("skillReference"),
2623
+ skillId: z15.string(),
2624
+ version: z15.string().optional()
2539
2625
  }),
2540
- z14.object({
2541
- type: z14.literal("inline"),
2542
- name: z14.string(),
2543
- description: z14.string(),
2544
- source: z14.object({
2545
- type: z14.literal("base64"),
2546
- mediaType: z14.literal("application/zip"),
2547
- data: z14.string()
2626
+ z15.object({
2627
+ type: z15.literal("inline"),
2628
+ name: z15.string(),
2629
+ description: z15.string(),
2630
+ source: z15.object({
2631
+ type: z15.literal("base64"),
2632
+ mediaType: z15.literal("application/zip"),
2633
+ data: z15.string()
2548
2634
  })
2549
2635
  })
2550
2636
  ])
2551
2637
  ).optional();
2552
- var shellArgsSchema = lazySchema13(
2553
- () => zodSchema13(
2554
- z14.object({
2555
- environment: z14.union([
2556
- z14.object({
2557
- type: z14.literal("containerAuto"),
2558
- fileIds: z14.array(z14.string()).optional(),
2559
- memoryLimit: z14.enum(["1g", "4g", "16g", "64g"]).optional(),
2560
- networkPolicy: z14.discriminatedUnion("type", [
2561
- z14.object({ type: z14.literal("disabled") }),
2562
- z14.object({
2563
- type: z14.literal("allowlist"),
2564
- allowedDomains: z14.array(z14.string()),
2565
- domainSecrets: z14.array(
2566
- z14.object({
2567
- domain: z14.string(),
2568
- name: z14.string(),
2569
- value: z14.string()
2638
+ var shellArgsSchema = lazySchema14(
2639
+ () => zodSchema14(
2640
+ z15.object({
2641
+ environment: z15.union([
2642
+ z15.object({
2643
+ type: z15.literal("containerAuto"),
2644
+ fileIds: z15.array(z15.string()).optional(),
2645
+ memoryLimit: z15.enum(["1g", "4g", "16g", "64g"]).optional(),
2646
+ networkPolicy: z15.discriminatedUnion("type", [
2647
+ z15.object({ type: z15.literal("disabled") }),
2648
+ z15.object({
2649
+ type: z15.literal("allowlist"),
2650
+ allowedDomains: z15.array(z15.string()),
2651
+ domainSecrets: z15.array(
2652
+ z15.object({
2653
+ domain: z15.string(),
2654
+ name: z15.string(),
2655
+ value: z15.string()
2570
2656
  })
2571
2657
  ).optional()
2572
2658
  })
2573
2659
  ]).optional(),
2574
2660
  skills: shellSkillsSchema
2575
2661
  }),
2576
- z14.object({
2577
- type: z14.literal("containerReference"),
2578
- containerId: z14.string()
2662
+ z15.object({
2663
+ type: z15.literal("containerReference"),
2664
+ containerId: z15.string()
2579
2665
  }),
2580
- z14.object({
2581
- type: z14.literal("local").optional(),
2582
- skills: z14.array(
2583
- z14.object({
2584
- name: z14.string(),
2585
- description: z14.string(),
2586
- path: z14.string()
2666
+ z15.object({
2667
+ type: z15.literal("local").optional(),
2668
+ skills: z15.array(
2669
+ z15.object({
2670
+ name: z15.string(),
2671
+ description: z15.string(),
2672
+ path: z15.string()
2587
2673
  })
2588
2674
  ).optional()
2589
2675
  })
@@ -2600,31 +2686,31 @@ var shell = createProviderToolFactoryWithOutputSchema3({
2600
2686
  // src/tool/tool-search.ts
2601
2687
  import {
2602
2688
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
2603
- lazySchema as lazySchema14,
2604
- zodSchema as zodSchema14
2689
+ lazySchema as lazySchema15,
2690
+ zodSchema as zodSchema15
2605
2691
  } from "@ai-sdk/provider-utils";
2606
- import { z as z15 } from "zod/v4";
2607
- var toolSearchArgsSchema = lazySchema14(
2608
- () => zodSchema14(
2609
- z15.object({
2610
- execution: z15.enum(["server", "client"]).optional(),
2611
- description: z15.string().optional(),
2612
- parameters: z15.record(z15.string(), z15.unknown()).optional()
2692
+ import { z as z16 } from "zod/v4";
2693
+ var toolSearchArgsSchema = lazySchema15(
2694
+ () => zodSchema15(
2695
+ z16.object({
2696
+ execution: z16.enum(["server", "client"]).optional(),
2697
+ description: z16.string().optional(),
2698
+ parameters: z16.record(z16.string(), z16.unknown()).optional()
2613
2699
  })
2614
2700
  )
2615
2701
  );
2616
- var toolSearchInputSchema = lazySchema14(
2617
- () => zodSchema14(
2618
- z15.object({
2619
- arguments: z15.unknown().optional(),
2620
- call_id: z15.string().nullish()
2702
+ var toolSearchInputSchema = lazySchema15(
2703
+ () => zodSchema15(
2704
+ z16.object({
2705
+ arguments: z16.unknown().optional(),
2706
+ call_id: z16.string().nullish()
2621
2707
  })
2622
2708
  )
2623
2709
  );
2624
- var toolSearchOutputSchema = lazySchema14(
2625
- () => zodSchema14(
2626
- z15.object({
2627
- tools: z15.array(z15.record(z15.string(), z15.unknown()))
2710
+ var toolSearchOutputSchema = lazySchema15(
2711
+ () => zodSchema15(
2712
+ z16.object({
2713
+ tools: z16.array(z16.record(z16.string(), z16.unknown()))
2628
2714
  })
2629
2715
  )
2630
2716
  );
@@ -2930,7 +3016,7 @@ async function convertToOpenAIResponsesInput({
2930
3016
  break;
2931
3017
  }
2932
3018
  case "reasoning": {
2933
- const providerOptions = await parseProviderOptions6({
3019
+ const providerOptions = await parseProviderOptions7({
2934
3020
  provider: providerOptionsName,
2935
3021
  providerOptions: part.providerOptions,
2936
3022
  schema: openaiResponsesReasoningProviderOptionsSchema
@@ -3238,9 +3324,9 @@ async function convertToOpenAIResponsesInput({
3238
3324
  }
3239
3325
  return { input, warnings };
3240
3326
  }
3241
- var openaiResponsesReasoningProviderOptionsSchema = z16.object({
3242
- itemId: z16.string().nullish(),
3243
- reasoningEncryptedContent: z16.string().nullish()
3327
+ var openaiResponsesReasoningProviderOptionsSchema = z17.object({
3328
+ itemId: z17.string().nullish(),
3329
+ reasoningEncryptedContent: z17.string().nullish()
3244
3330
  });
3245
3331
 
3246
3332
  // src/responses/map-openai-responses-finish-reason.ts
@@ -3263,544 +3349,544 @@ function mapOpenAIResponseFinishReason({
3263
3349
 
3264
3350
  // src/responses/openai-responses-api.ts
3265
3351
  import {
3266
- lazySchema as lazySchema15,
3267
- zodSchema as zodSchema15
3352
+ lazySchema as lazySchema16,
3353
+ zodSchema as zodSchema16
3268
3354
  } from "@ai-sdk/provider-utils";
3269
- import { z as z17 } from "zod/v4";
3270
- var jsonValueSchema = z17.lazy(
3271
- () => z17.union([
3272
- z17.string(),
3273
- z17.number(),
3274
- z17.boolean(),
3275
- z17.null(),
3276
- z17.array(jsonValueSchema),
3277
- z17.record(z17.string(), jsonValueSchema.optional())
3355
+ import { z as z18 } from "zod/v4";
3356
+ var jsonValueSchema = z18.lazy(
3357
+ () => z18.union([
3358
+ z18.string(),
3359
+ z18.number(),
3360
+ z18.boolean(),
3361
+ z18.null(),
3362
+ z18.array(jsonValueSchema),
3363
+ z18.record(z18.string(), jsonValueSchema.optional())
3278
3364
  ])
3279
3365
  );
3280
- var openaiResponsesChunkSchema = lazySchema15(
3281
- () => zodSchema15(
3282
- z17.union([
3283
- z17.object({
3284
- type: z17.literal("response.output_text.delta"),
3285
- item_id: z17.string(),
3286
- delta: z17.string(),
3287
- logprobs: z17.array(
3288
- z17.object({
3289
- token: z17.string(),
3290
- logprob: z17.number(),
3291
- top_logprobs: z17.array(
3292
- z17.object({
3293
- token: z17.string(),
3294
- logprob: z17.number()
3366
+ var openaiResponsesChunkSchema = lazySchema16(
3367
+ () => zodSchema16(
3368
+ z18.union([
3369
+ z18.object({
3370
+ type: z18.literal("response.output_text.delta"),
3371
+ item_id: z18.string(),
3372
+ delta: z18.string(),
3373
+ logprobs: z18.array(
3374
+ z18.object({
3375
+ token: z18.string(),
3376
+ logprob: z18.number(),
3377
+ top_logprobs: z18.array(
3378
+ z18.object({
3379
+ token: z18.string(),
3380
+ logprob: z18.number()
3295
3381
  })
3296
3382
  )
3297
3383
  })
3298
3384
  ).nullish()
3299
3385
  }),
3300
- z17.object({
3301
- type: z17.enum(["response.completed", "response.incomplete"]),
3302
- response: z17.object({
3303
- incomplete_details: z17.object({ reason: z17.string() }).nullish(),
3304
- usage: z17.object({
3305
- input_tokens: z17.number(),
3306
- input_tokens_details: z17.object({ cached_tokens: z17.number().nullish() }).nullish(),
3307
- output_tokens: z17.number(),
3308
- output_tokens_details: z17.object({ reasoning_tokens: z17.number().nullish() }).nullish()
3386
+ z18.object({
3387
+ type: z18.enum(["response.completed", "response.incomplete"]),
3388
+ response: z18.object({
3389
+ incomplete_details: z18.object({ reason: z18.string() }).nullish(),
3390
+ usage: z18.object({
3391
+ input_tokens: z18.number(),
3392
+ input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
3393
+ output_tokens: z18.number(),
3394
+ output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
3309
3395
  }),
3310
- service_tier: z17.string().nullish()
3396
+ service_tier: z18.string().nullish()
3311
3397
  })
3312
3398
  }),
3313
- z17.object({
3314
- type: z17.literal("response.failed"),
3315
- response: z17.object({
3316
- error: z17.object({
3317
- code: z17.string().nullish(),
3318
- message: z17.string()
3399
+ z18.object({
3400
+ type: z18.literal("response.failed"),
3401
+ response: z18.object({
3402
+ error: z18.object({
3403
+ code: z18.string().nullish(),
3404
+ message: z18.string()
3319
3405
  }).nullish(),
3320
- incomplete_details: z17.object({ reason: z17.string() }).nullish(),
3321
- usage: z17.object({
3322
- input_tokens: z17.number(),
3323
- input_tokens_details: z17.object({ cached_tokens: z17.number().nullish() }).nullish(),
3324
- output_tokens: z17.number(),
3325
- output_tokens_details: z17.object({ reasoning_tokens: z17.number().nullish() }).nullish()
3406
+ incomplete_details: z18.object({ reason: z18.string() }).nullish(),
3407
+ usage: z18.object({
3408
+ input_tokens: z18.number(),
3409
+ input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
3410
+ output_tokens: z18.number(),
3411
+ output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
3326
3412
  }).nullish(),
3327
- service_tier: z17.string().nullish()
3413
+ service_tier: z18.string().nullish()
3328
3414
  })
3329
3415
  }),
3330
- z17.object({
3331
- type: z17.literal("response.created"),
3332
- response: z17.object({
3333
- id: z17.string(),
3334
- created_at: z17.number(),
3335
- model: z17.string(),
3336
- service_tier: z17.string().nullish()
3416
+ z18.object({
3417
+ type: z18.literal("response.created"),
3418
+ response: z18.object({
3419
+ id: z18.string(),
3420
+ created_at: z18.number(),
3421
+ model: z18.string(),
3422
+ service_tier: z18.string().nullish()
3337
3423
  })
3338
3424
  }),
3339
- z17.object({
3340
- type: z17.literal("response.output_item.added"),
3341
- output_index: z17.number(),
3342
- item: z17.discriminatedUnion("type", [
3343
- z17.object({
3344
- type: z17.literal("message"),
3345
- id: z17.string(),
3346
- phase: z17.enum(["commentary", "final_answer"]).nullish()
3425
+ z18.object({
3426
+ type: z18.literal("response.output_item.added"),
3427
+ output_index: z18.number(),
3428
+ item: z18.discriminatedUnion("type", [
3429
+ z18.object({
3430
+ type: z18.literal("message"),
3431
+ id: z18.string(),
3432
+ phase: z18.enum(["commentary", "final_answer"]).nullish()
3347
3433
  }),
3348
- z17.object({
3349
- type: z17.literal("reasoning"),
3350
- id: z17.string(),
3351
- encrypted_content: z17.string().nullish()
3434
+ z18.object({
3435
+ type: z18.literal("reasoning"),
3436
+ id: z18.string(),
3437
+ encrypted_content: z18.string().nullish()
3352
3438
  }),
3353
- z17.object({
3354
- type: z17.literal("function_call"),
3355
- id: z17.string(),
3356
- call_id: z17.string(),
3357
- name: z17.string(),
3358
- arguments: z17.string()
3439
+ z18.object({
3440
+ type: z18.literal("function_call"),
3441
+ id: z18.string(),
3442
+ call_id: z18.string(),
3443
+ name: z18.string(),
3444
+ arguments: z18.string()
3359
3445
  }),
3360
- z17.object({
3361
- type: z17.literal("web_search_call"),
3362
- id: z17.string(),
3363
- status: z17.string()
3446
+ z18.object({
3447
+ type: z18.literal("web_search_call"),
3448
+ id: z18.string(),
3449
+ status: z18.string()
3364
3450
  }),
3365
- z17.object({
3366
- type: z17.literal("computer_call"),
3367
- id: z17.string(),
3368
- status: z17.string()
3451
+ z18.object({
3452
+ type: z18.literal("computer_call"),
3453
+ id: z18.string(),
3454
+ status: z18.string()
3369
3455
  }),
3370
- z17.object({
3371
- type: z17.literal("file_search_call"),
3372
- id: z17.string()
3456
+ z18.object({
3457
+ type: z18.literal("file_search_call"),
3458
+ id: z18.string()
3373
3459
  }),
3374
- z17.object({
3375
- type: z17.literal("image_generation_call"),
3376
- id: z17.string()
3460
+ z18.object({
3461
+ type: z18.literal("image_generation_call"),
3462
+ id: z18.string()
3377
3463
  }),
3378
- z17.object({
3379
- type: z17.literal("code_interpreter_call"),
3380
- id: z17.string(),
3381
- container_id: z17.string(),
3382
- code: z17.string().nullable(),
3383
- outputs: z17.array(
3384
- z17.discriminatedUnion("type", [
3385
- z17.object({ type: z17.literal("logs"), logs: z17.string() }),
3386
- z17.object({ type: z17.literal("image"), url: z17.string() })
3464
+ z18.object({
3465
+ type: z18.literal("code_interpreter_call"),
3466
+ id: z18.string(),
3467
+ container_id: z18.string(),
3468
+ code: z18.string().nullable(),
3469
+ outputs: z18.array(
3470
+ z18.discriminatedUnion("type", [
3471
+ z18.object({ type: z18.literal("logs"), logs: z18.string() }),
3472
+ z18.object({ type: z18.literal("image"), url: z18.string() })
3387
3473
  ])
3388
3474
  ).nullable(),
3389
- status: z17.string()
3475
+ status: z18.string()
3390
3476
  }),
3391
- z17.object({
3392
- type: z17.literal("mcp_call"),
3393
- id: z17.string(),
3394
- status: z17.string(),
3395
- approval_request_id: z17.string().nullish()
3477
+ z18.object({
3478
+ type: z18.literal("mcp_call"),
3479
+ id: z18.string(),
3480
+ status: z18.string(),
3481
+ approval_request_id: z18.string().nullish()
3396
3482
  }),
3397
- z17.object({
3398
- type: z17.literal("mcp_list_tools"),
3399
- id: z17.string()
3483
+ z18.object({
3484
+ type: z18.literal("mcp_list_tools"),
3485
+ id: z18.string()
3400
3486
  }),
3401
- z17.object({
3402
- type: z17.literal("mcp_approval_request"),
3403
- id: z17.string()
3487
+ z18.object({
3488
+ type: z18.literal("mcp_approval_request"),
3489
+ id: z18.string()
3404
3490
  }),
3405
- z17.object({
3406
- type: z17.literal("apply_patch_call"),
3407
- id: z17.string(),
3408
- call_id: z17.string(),
3409
- status: z17.enum(["in_progress", "completed"]),
3410
- operation: z17.discriminatedUnion("type", [
3411
- z17.object({
3412
- type: z17.literal("create_file"),
3413
- path: z17.string(),
3414
- diff: z17.string()
3491
+ z18.object({
3492
+ type: z18.literal("apply_patch_call"),
3493
+ id: z18.string(),
3494
+ call_id: z18.string(),
3495
+ status: z18.enum(["in_progress", "completed"]),
3496
+ operation: z18.discriminatedUnion("type", [
3497
+ z18.object({
3498
+ type: z18.literal("create_file"),
3499
+ path: z18.string(),
3500
+ diff: z18.string()
3415
3501
  }),
3416
- z17.object({
3417
- type: z17.literal("delete_file"),
3418
- path: z17.string()
3502
+ z18.object({
3503
+ type: z18.literal("delete_file"),
3504
+ path: z18.string()
3419
3505
  }),
3420
- z17.object({
3421
- type: z17.literal("update_file"),
3422
- path: z17.string(),
3423
- diff: z17.string()
3506
+ z18.object({
3507
+ type: z18.literal("update_file"),
3508
+ path: z18.string(),
3509
+ diff: z18.string()
3424
3510
  })
3425
3511
  ])
3426
3512
  }),
3427
- z17.object({
3428
- type: z17.literal("custom_tool_call"),
3429
- id: z17.string(),
3430
- call_id: z17.string(),
3431
- name: z17.string(),
3432
- input: z17.string()
3513
+ z18.object({
3514
+ type: z18.literal("custom_tool_call"),
3515
+ id: z18.string(),
3516
+ call_id: z18.string(),
3517
+ name: z18.string(),
3518
+ input: z18.string()
3433
3519
  }),
3434
- z17.object({
3435
- type: z17.literal("shell_call"),
3436
- id: z17.string(),
3437
- call_id: z17.string(),
3438
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3439
- action: z17.object({
3440
- commands: z17.array(z17.string())
3520
+ z18.object({
3521
+ type: z18.literal("shell_call"),
3522
+ id: z18.string(),
3523
+ call_id: z18.string(),
3524
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3525
+ action: z18.object({
3526
+ commands: z18.array(z18.string())
3441
3527
  })
3442
3528
  }),
3443
- z17.object({
3444
- type: z17.literal("shell_call_output"),
3445
- id: z17.string(),
3446
- call_id: z17.string(),
3447
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3448
- output: z17.array(
3449
- z17.object({
3450
- stdout: z17.string(),
3451
- stderr: z17.string(),
3452
- outcome: z17.discriminatedUnion("type", [
3453
- z17.object({ type: z17.literal("timeout") }),
3454
- z17.object({
3455
- type: z17.literal("exit"),
3456
- exit_code: z17.number()
3529
+ z18.object({
3530
+ type: z18.literal("shell_call_output"),
3531
+ id: z18.string(),
3532
+ call_id: z18.string(),
3533
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3534
+ output: z18.array(
3535
+ z18.object({
3536
+ stdout: z18.string(),
3537
+ stderr: z18.string(),
3538
+ outcome: z18.discriminatedUnion("type", [
3539
+ z18.object({ type: z18.literal("timeout") }),
3540
+ z18.object({
3541
+ type: z18.literal("exit"),
3542
+ exit_code: z18.number()
3457
3543
  })
3458
3544
  ])
3459
3545
  })
3460
3546
  )
3461
3547
  }),
3462
- z17.object({
3463
- type: z17.literal("tool_search_call"),
3464
- id: z17.string(),
3465
- execution: z17.enum(["server", "client"]),
3466
- call_id: z17.string().nullable(),
3467
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3468
- arguments: z17.unknown()
3548
+ z18.object({
3549
+ type: z18.literal("tool_search_call"),
3550
+ id: z18.string(),
3551
+ execution: z18.enum(["server", "client"]),
3552
+ call_id: z18.string().nullable(),
3553
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3554
+ arguments: z18.unknown()
3469
3555
  }),
3470
- z17.object({
3471
- type: z17.literal("tool_search_output"),
3472
- id: z17.string(),
3473
- execution: z17.enum(["server", "client"]),
3474
- call_id: z17.string().nullable(),
3475
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3476
- tools: z17.array(z17.record(z17.string(), jsonValueSchema.optional()))
3556
+ z18.object({
3557
+ type: z18.literal("tool_search_output"),
3558
+ id: z18.string(),
3559
+ execution: z18.enum(["server", "client"]),
3560
+ call_id: z18.string().nullable(),
3561
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3562
+ tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
3477
3563
  })
3478
3564
  ])
3479
3565
  }),
3480
- z17.object({
3481
- type: z17.literal("response.output_item.done"),
3482
- output_index: z17.number(),
3483
- item: z17.discriminatedUnion("type", [
3484
- z17.object({
3485
- type: z17.literal("message"),
3486
- id: z17.string(),
3487
- phase: z17.enum(["commentary", "final_answer"]).nullish()
3566
+ z18.object({
3567
+ type: z18.literal("response.output_item.done"),
3568
+ output_index: z18.number(),
3569
+ item: z18.discriminatedUnion("type", [
3570
+ z18.object({
3571
+ type: z18.literal("message"),
3572
+ id: z18.string(),
3573
+ phase: z18.enum(["commentary", "final_answer"]).nullish()
3488
3574
  }),
3489
- z17.object({
3490
- type: z17.literal("reasoning"),
3491
- id: z17.string(),
3492
- encrypted_content: z17.string().nullish()
3575
+ z18.object({
3576
+ type: z18.literal("reasoning"),
3577
+ id: z18.string(),
3578
+ encrypted_content: z18.string().nullish()
3493
3579
  }),
3494
- z17.object({
3495
- type: z17.literal("function_call"),
3496
- id: z17.string(),
3497
- call_id: z17.string(),
3498
- name: z17.string(),
3499
- arguments: z17.string(),
3500
- status: z17.literal("completed")
3580
+ z18.object({
3581
+ type: z18.literal("function_call"),
3582
+ id: z18.string(),
3583
+ call_id: z18.string(),
3584
+ name: z18.string(),
3585
+ arguments: z18.string(),
3586
+ status: z18.literal("completed")
3501
3587
  }),
3502
- z17.object({
3503
- type: z17.literal("custom_tool_call"),
3504
- id: z17.string(),
3505
- call_id: z17.string(),
3506
- name: z17.string(),
3507
- input: z17.string(),
3508
- status: z17.literal("completed")
3588
+ z18.object({
3589
+ type: z18.literal("custom_tool_call"),
3590
+ id: z18.string(),
3591
+ call_id: z18.string(),
3592
+ name: z18.string(),
3593
+ input: z18.string(),
3594
+ status: z18.literal("completed")
3509
3595
  }),
3510
- z17.object({
3511
- type: z17.literal("code_interpreter_call"),
3512
- id: z17.string(),
3513
- code: z17.string().nullable(),
3514
- container_id: z17.string(),
3515
- outputs: z17.array(
3516
- z17.discriminatedUnion("type", [
3517
- z17.object({ type: z17.literal("logs"), logs: z17.string() }),
3518
- z17.object({ type: z17.literal("image"), url: z17.string() })
3596
+ z18.object({
3597
+ type: z18.literal("code_interpreter_call"),
3598
+ id: z18.string(),
3599
+ code: z18.string().nullable(),
3600
+ container_id: z18.string(),
3601
+ outputs: z18.array(
3602
+ z18.discriminatedUnion("type", [
3603
+ z18.object({ type: z18.literal("logs"), logs: z18.string() }),
3604
+ z18.object({ type: z18.literal("image"), url: z18.string() })
3519
3605
  ])
3520
3606
  ).nullable()
3521
3607
  }),
3522
- z17.object({
3523
- type: z17.literal("image_generation_call"),
3524
- id: z17.string(),
3525
- result: z17.string()
3608
+ z18.object({
3609
+ type: z18.literal("image_generation_call"),
3610
+ id: z18.string(),
3611
+ result: z18.string()
3526
3612
  }),
3527
- z17.object({
3528
- type: z17.literal("web_search_call"),
3529
- id: z17.string(),
3530
- status: z17.string(),
3531
- action: z17.discriminatedUnion("type", [
3532
- z17.object({
3533
- type: z17.literal("search"),
3534
- query: z17.string().nullish(),
3535
- sources: z17.array(
3536
- z17.discriminatedUnion("type", [
3537
- z17.object({ type: z17.literal("url"), url: z17.string() }),
3538
- z17.object({ type: z17.literal("api"), name: z17.string() })
3613
+ z18.object({
3614
+ type: z18.literal("web_search_call"),
3615
+ id: z18.string(),
3616
+ status: z18.string(),
3617
+ action: z18.discriminatedUnion("type", [
3618
+ z18.object({
3619
+ type: z18.literal("search"),
3620
+ query: z18.string().nullish(),
3621
+ sources: z18.array(
3622
+ z18.discriminatedUnion("type", [
3623
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
3624
+ z18.object({ type: z18.literal("api"), name: z18.string() })
3539
3625
  ])
3540
3626
  ).nullish()
3541
3627
  }),
3542
- z17.object({
3543
- type: z17.literal("open_page"),
3544
- url: z17.string().nullish()
3628
+ z18.object({
3629
+ type: z18.literal("open_page"),
3630
+ url: z18.string().nullish()
3545
3631
  }),
3546
- z17.object({
3547
- type: z17.literal("find_in_page"),
3548
- url: z17.string().nullish(),
3549
- pattern: z17.string().nullish()
3632
+ z18.object({
3633
+ type: z18.literal("find_in_page"),
3634
+ url: z18.string().nullish(),
3635
+ pattern: z18.string().nullish()
3550
3636
  })
3551
3637
  ]).nullish()
3552
3638
  }),
3553
- z17.object({
3554
- type: z17.literal("file_search_call"),
3555
- id: z17.string(),
3556
- queries: z17.array(z17.string()),
3557
- results: z17.array(
3558
- z17.object({
3559
- attributes: z17.record(
3560
- z17.string(),
3561
- z17.union([z17.string(), z17.number(), z17.boolean()])
3639
+ z18.object({
3640
+ type: z18.literal("file_search_call"),
3641
+ id: z18.string(),
3642
+ queries: z18.array(z18.string()),
3643
+ results: z18.array(
3644
+ z18.object({
3645
+ attributes: z18.record(
3646
+ z18.string(),
3647
+ z18.union([z18.string(), z18.number(), z18.boolean()])
3562
3648
  ),
3563
- file_id: z17.string(),
3564
- filename: z17.string(),
3565
- score: z17.number(),
3566
- text: z17.string()
3649
+ file_id: z18.string(),
3650
+ filename: z18.string(),
3651
+ score: z18.number(),
3652
+ text: z18.string()
3567
3653
  })
3568
3654
  ).nullish()
3569
3655
  }),
3570
- z17.object({
3571
- type: z17.literal("local_shell_call"),
3572
- id: z17.string(),
3573
- call_id: z17.string(),
3574
- action: z17.object({
3575
- type: z17.literal("exec"),
3576
- command: z17.array(z17.string()),
3577
- timeout_ms: z17.number().optional(),
3578
- user: z17.string().optional(),
3579
- working_directory: z17.string().optional(),
3580
- env: z17.record(z17.string(), z17.string()).optional()
3656
+ z18.object({
3657
+ type: z18.literal("local_shell_call"),
3658
+ id: z18.string(),
3659
+ call_id: z18.string(),
3660
+ action: z18.object({
3661
+ type: z18.literal("exec"),
3662
+ command: z18.array(z18.string()),
3663
+ timeout_ms: z18.number().optional(),
3664
+ user: z18.string().optional(),
3665
+ working_directory: z18.string().optional(),
3666
+ env: z18.record(z18.string(), z18.string()).optional()
3581
3667
  })
3582
3668
  }),
3583
- z17.object({
3584
- type: z17.literal("computer_call"),
3585
- id: z17.string(),
3586
- status: z17.literal("completed")
3669
+ z18.object({
3670
+ type: z18.literal("computer_call"),
3671
+ id: z18.string(),
3672
+ status: z18.literal("completed")
3587
3673
  }),
3588
- z17.object({
3589
- type: z17.literal("mcp_call"),
3590
- id: z17.string(),
3591
- status: z17.string(),
3592
- arguments: z17.string(),
3593
- name: z17.string(),
3594
- server_label: z17.string(),
3595
- output: z17.string().nullish(),
3596
- error: z17.union([
3597
- z17.string(),
3598
- z17.object({
3599
- type: z17.string().optional(),
3600
- code: z17.union([z17.number(), z17.string()]).optional(),
3601
- message: z17.string().optional()
3674
+ z18.object({
3675
+ type: z18.literal("mcp_call"),
3676
+ id: z18.string(),
3677
+ status: z18.string(),
3678
+ arguments: z18.string(),
3679
+ name: z18.string(),
3680
+ server_label: z18.string(),
3681
+ output: z18.string().nullish(),
3682
+ error: z18.union([
3683
+ z18.string(),
3684
+ z18.object({
3685
+ type: z18.string().optional(),
3686
+ code: z18.union([z18.number(), z18.string()]).optional(),
3687
+ message: z18.string().optional()
3602
3688
  }).loose()
3603
3689
  ]).nullish(),
3604
- approval_request_id: z17.string().nullish()
3690
+ approval_request_id: z18.string().nullish()
3605
3691
  }),
3606
- z17.object({
3607
- type: z17.literal("mcp_list_tools"),
3608
- id: z17.string(),
3609
- server_label: z17.string(),
3610
- tools: z17.array(
3611
- z17.object({
3612
- name: z17.string(),
3613
- description: z17.string().optional(),
3614
- input_schema: z17.any(),
3615
- annotations: z17.record(z17.string(), z17.unknown()).optional()
3692
+ z18.object({
3693
+ type: z18.literal("mcp_list_tools"),
3694
+ id: z18.string(),
3695
+ server_label: z18.string(),
3696
+ tools: z18.array(
3697
+ z18.object({
3698
+ name: z18.string(),
3699
+ description: z18.string().optional(),
3700
+ input_schema: z18.any(),
3701
+ annotations: z18.record(z18.string(), z18.unknown()).optional()
3616
3702
  })
3617
3703
  ),
3618
- error: z17.union([
3619
- z17.string(),
3620
- z17.object({
3621
- type: z17.string().optional(),
3622
- code: z17.union([z17.number(), z17.string()]).optional(),
3623
- message: z17.string().optional()
3704
+ error: z18.union([
3705
+ z18.string(),
3706
+ z18.object({
3707
+ type: z18.string().optional(),
3708
+ code: z18.union([z18.number(), z18.string()]).optional(),
3709
+ message: z18.string().optional()
3624
3710
  }).loose()
3625
3711
  ]).optional()
3626
3712
  }),
3627
- z17.object({
3628
- type: z17.literal("mcp_approval_request"),
3629
- id: z17.string(),
3630
- server_label: z17.string(),
3631
- name: z17.string(),
3632
- arguments: z17.string(),
3633
- approval_request_id: z17.string().optional()
3713
+ z18.object({
3714
+ type: z18.literal("mcp_approval_request"),
3715
+ id: z18.string(),
3716
+ server_label: z18.string(),
3717
+ name: z18.string(),
3718
+ arguments: z18.string(),
3719
+ approval_request_id: z18.string().optional()
3634
3720
  }),
3635
- z17.object({
3636
- type: z17.literal("apply_patch_call"),
3637
- id: z17.string(),
3638
- call_id: z17.string(),
3639
- status: z17.enum(["in_progress", "completed"]),
3640
- operation: z17.discriminatedUnion("type", [
3641
- z17.object({
3642
- type: z17.literal("create_file"),
3643
- path: z17.string(),
3644
- diff: z17.string()
3721
+ z18.object({
3722
+ type: z18.literal("apply_patch_call"),
3723
+ id: z18.string(),
3724
+ call_id: z18.string(),
3725
+ status: z18.enum(["in_progress", "completed"]),
3726
+ operation: z18.discriminatedUnion("type", [
3727
+ z18.object({
3728
+ type: z18.literal("create_file"),
3729
+ path: z18.string(),
3730
+ diff: z18.string()
3645
3731
  }),
3646
- z17.object({
3647
- type: z17.literal("delete_file"),
3648
- path: z17.string()
3732
+ z18.object({
3733
+ type: z18.literal("delete_file"),
3734
+ path: z18.string()
3649
3735
  }),
3650
- z17.object({
3651
- type: z17.literal("update_file"),
3652
- path: z17.string(),
3653
- diff: z17.string()
3736
+ z18.object({
3737
+ type: z18.literal("update_file"),
3738
+ path: z18.string(),
3739
+ diff: z18.string()
3654
3740
  })
3655
3741
  ])
3656
3742
  }),
3657
- z17.object({
3658
- type: z17.literal("shell_call"),
3659
- id: z17.string(),
3660
- call_id: z17.string(),
3661
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3662
- action: z17.object({
3663
- commands: z17.array(z17.string())
3743
+ z18.object({
3744
+ type: z18.literal("shell_call"),
3745
+ id: z18.string(),
3746
+ call_id: z18.string(),
3747
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3748
+ action: z18.object({
3749
+ commands: z18.array(z18.string())
3664
3750
  })
3665
3751
  }),
3666
- z17.object({
3667
- type: z17.literal("shell_call_output"),
3668
- id: z17.string(),
3669
- call_id: z17.string(),
3670
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3671
- output: z17.array(
3672
- z17.object({
3673
- stdout: z17.string(),
3674
- stderr: z17.string(),
3675
- outcome: z17.discriminatedUnion("type", [
3676
- z17.object({ type: z17.literal("timeout") }),
3677
- z17.object({
3678
- type: z17.literal("exit"),
3679
- exit_code: z17.number()
3752
+ z18.object({
3753
+ type: z18.literal("shell_call_output"),
3754
+ id: z18.string(),
3755
+ call_id: z18.string(),
3756
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3757
+ output: z18.array(
3758
+ z18.object({
3759
+ stdout: z18.string(),
3760
+ stderr: z18.string(),
3761
+ outcome: z18.discriminatedUnion("type", [
3762
+ z18.object({ type: z18.literal("timeout") }),
3763
+ z18.object({
3764
+ type: z18.literal("exit"),
3765
+ exit_code: z18.number()
3680
3766
  })
3681
3767
  ])
3682
3768
  })
3683
3769
  )
3684
3770
  }),
3685
- z17.object({
3686
- type: z17.literal("tool_search_call"),
3687
- id: z17.string(),
3688
- execution: z17.enum(["server", "client"]),
3689
- call_id: z17.string().nullable(),
3690
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3691
- arguments: z17.unknown()
3771
+ z18.object({
3772
+ type: z18.literal("tool_search_call"),
3773
+ id: z18.string(),
3774
+ execution: z18.enum(["server", "client"]),
3775
+ call_id: z18.string().nullable(),
3776
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3777
+ arguments: z18.unknown()
3692
3778
  }),
3693
- z17.object({
3694
- type: z17.literal("tool_search_output"),
3695
- id: z17.string(),
3696
- execution: z17.enum(["server", "client"]),
3697
- call_id: z17.string().nullable(),
3698
- status: z17.enum(["in_progress", "completed", "incomplete"]),
3699
- tools: z17.array(z17.record(z17.string(), jsonValueSchema.optional()))
3779
+ z18.object({
3780
+ type: z18.literal("tool_search_output"),
3781
+ id: z18.string(),
3782
+ execution: z18.enum(["server", "client"]),
3783
+ call_id: z18.string().nullable(),
3784
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
3785
+ tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
3700
3786
  })
3701
3787
  ])
3702
3788
  }),
3703
- z17.object({
3704
- type: z17.literal("response.function_call_arguments.delta"),
3705
- item_id: z17.string(),
3706
- output_index: z17.number(),
3707
- delta: z17.string()
3789
+ z18.object({
3790
+ type: z18.literal("response.function_call_arguments.delta"),
3791
+ item_id: z18.string(),
3792
+ output_index: z18.number(),
3793
+ delta: z18.string()
3708
3794
  }),
3709
- z17.object({
3710
- type: z17.literal("response.custom_tool_call_input.delta"),
3711
- item_id: z17.string(),
3712
- output_index: z17.number(),
3713
- delta: z17.string()
3795
+ z18.object({
3796
+ type: z18.literal("response.custom_tool_call_input.delta"),
3797
+ item_id: z18.string(),
3798
+ output_index: z18.number(),
3799
+ delta: z18.string()
3714
3800
  }),
3715
- z17.object({
3716
- type: z17.literal("response.image_generation_call.partial_image"),
3717
- item_id: z17.string(),
3718
- output_index: z17.number(),
3719
- partial_image_b64: z17.string()
3801
+ z18.object({
3802
+ type: z18.literal("response.image_generation_call.partial_image"),
3803
+ item_id: z18.string(),
3804
+ output_index: z18.number(),
3805
+ partial_image_b64: z18.string()
3720
3806
  }),
3721
- z17.object({
3722
- type: z17.literal("response.code_interpreter_call_code.delta"),
3723
- item_id: z17.string(),
3724
- output_index: z17.number(),
3725
- delta: z17.string()
3807
+ z18.object({
3808
+ type: z18.literal("response.code_interpreter_call_code.delta"),
3809
+ item_id: z18.string(),
3810
+ output_index: z18.number(),
3811
+ delta: z18.string()
3726
3812
  }),
3727
- z17.object({
3728
- type: z17.literal("response.code_interpreter_call_code.done"),
3729
- item_id: z17.string(),
3730
- output_index: z17.number(),
3731
- code: z17.string()
3813
+ z18.object({
3814
+ type: z18.literal("response.code_interpreter_call_code.done"),
3815
+ item_id: z18.string(),
3816
+ output_index: z18.number(),
3817
+ code: z18.string()
3732
3818
  }),
3733
- z17.object({
3734
- type: z17.literal("response.output_text.annotation.added"),
3735
- annotation: z17.discriminatedUnion("type", [
3736
- z17.object({
3737
- type: z17.literal("url_citation"),
3738
- start_index: z17.number(),
3739
- end_index: z17.number(),
3740
- url: z17.string(),
3741
- title: z17.string()
3819
+ z18.object({
3820
+ type: z18.literal("response.output_text.annotation.added"),
3821
+ annotation: z18.discriminatedUnion("type", [
3822
+ z18.object({
3823
+ type: z18.literal("url_citation"),
3824
+ start_index: z18.number(),
3825
+ end_index: z18.number(),
3826
+ url: z18.string(),
3827
+ title: z18.string()
3742
3828
  }),
3743
- z17.object({
3744
- type: z17.literal("file_citation"),
3745
- file_id: z17.string(),
3746
- filename: z17.string(),
3747
- index: z17.number()
3829
+ z18.object({
3830
+ type: z18.literal("file_citation"),
3831
+ file_id: z18.string(),
3832
+ filename: z18.string(),
3833
+ index: z18.number()
3748
3834
  }),
3749
- z17.object({
3750
- type: z17.literal("container_file_citation"),
3751
- container_id: z17.string(),
3752
- file_id: z17.string(),
3753
- filename: z17.string(),
3754
- start_index: z17.number(),
3755
- end_index: z17.number()
3835
+ z18.object({
3836
+ type: z18.literal("container_file_citation"),
3837
+ container_id: z18.string(),
3838
+ file_id: z18.string(),
3839
+ filename: z18.string(),
3840
+ start_index: z18.number(),
3841
+ end_index: z18.number()
3756
3842
  }),
3757
- z17.object({
3758
- type: z17.literal("file_path"),
3759
- file_id: z17.string(),
3760
- index: z17.number()
3843
+ z18.object({
3844
+ type: z18.literal("file_path"),
3845
+ file_id: z18.string(),
3846
+ index: z18.number()
3761
3847
  })
3762
3848
  ])
3763
3849
  }),
3764
- z17.object({
3765
- type: z17.literal("response.reasoning_summary_part.added"),
3766
- item_id: z17.string(),
3767
- summary_index: z17.number()
3850
+ z18.object({
3851
+ type: z18.literal("response.reasoning_summary_part.added"),
3852
+ item_id: z18.string(),
3853
+ summary_index: z18.number()
3768
3854
  }),
3769
- z17.object({
3770
- type: z17.literal("response.reasoning_summary_text.delta"),
3771
- item_id: z17.string(),
3772
- summary_index: z17.number(),
3773
- delta: z17.string()
3855
+ z18.object({
3856
+ type: z18.literal("response.reasoning_summary_text.delta"),
3857
+ item_id: z18.string(),
3858
+ summary_index: z18.number(),
3859
+ delta: z18.string()
3774
3860
  }),
3775
- z17.object({
3776
- type: z17.literal("response.reasoning_summary_part.done"),
3777
- item_id: z17.string(),
3778
- summary_index: z17.number()
3861
+ z18.object({
3862
+ type: z18.literal("response.reasoning_summary_part.done"),
3863
+ item_id: z18.string(),
3864
+ summary_index: z18.number()
3779
3865
  }),
3780
- z17.object({
3781
- type: z17.literal("response.apply_patch_call_operation_diff.delta"),
3782
- item_id: z17.string(),
3783
- output_index: z17.number(),
3784
- delta: z17.string(),
3785
- obfuscation: z17.string().nullish()
3866
+ z18.object({
3867
+ type: z18.literal("response.apply_patch_call_operation_diff.delta"),
3868
+ item_id: z18.string(),
3869
+ output_index: z18.number(),
3870
+ delta: z18.string(),
3871
+ obfuscation: z18.string().nullish()
3786
3872
  }),
3787
- z17.object({
3788
- type: z17.literal("response.apply_patch_call_operation_diff.done"),
3789
- item_id: z17.string(),
3790
- output_index: z17.number(),
3791
- diff: z17.string()
3873
+ z18.object({
3874
+ type: z18.literal("response.apply_patch_call_operation_diff.done"),
3875
+ item_id: z18.string(),
3876
+ output_index: z18.number(),
3877
+ diff: z18.string()
3792
3878
  }),
3793
- z17.object({
3794
- type: z17.literal("error"),
3795
- sequence_number: z17.number(),
3796
- error: z17.object({
3797
- type: z17.string(),
3798
- code: z17.string(),
3799
- message: z17.string(),
3800
- param: z17.string().nullish()
3879
+ z18.object({
3880
+ type: z18.literal("error"),
3881
+ sequence_number: z18.number(),
3882
+ error: z18.object({
3883
+ type: z18.string(),
3884
+ code: z18.string(),
3885
+ message: z18.string(),
3886
+ param: z18.string().nullish()
3801
3887
  })
3802
3888
  }),
3803
- z17.object({ type: z17.string() }).loose().transform((value) => ({
3889
+ z18.object({ type: z18.string() }).loose().transform((value) => ({
3804
3890
  type: "unknown_chunk",
3805
3891
  message: value.type
3806
3892
  }))
@@ -3808,302 +3894,302 @@ var openaiResponsesChunkSchema = lazySchema15(
3808
3894
  ])
3809
3895
  )
3810
3896
  );
3811
- var openaiResponsesResponseSchema = lazySchema15(
3812
- () => zodSchema15(
3813
- z17.object({
3814
- id: z17.string().optional(),
3815
- created_at: z17.number().optional(),
3816
- error: z17.object({
3817
- message: z17.string(),
3818
- type: z17.string(),
3819
- param: z17.string().nullish(),
3820
- code: z17.string()
3897
+ var openaiResponsesResponseSchema = lazySchema16(
3898
+ () => zodSchema16(
3899
+ z18.object({
3900
+ id: z18.string().optional(),
3901
+ created_at: z18.number().optional(),
3902
+ error: z18.object({
3903
+ message: z18.string(),
3904
+ type: z18.string(),
3905
+ param: z18.string().nullish(),
3906
+ code: z18.string()
3821
3907
  }).nullish(),
3822
- model: z17.string().optional(),
3823
- output: z17.array(
3824
- z17.discriminatedUnion("type", [
3825
- z17.object({
3826
- type: z17.literal("message"),
3827
- role: z17.literal("assistant"),
3828
- id: z17.string(),
3829
- phase: z17.enum(["commentary", "final_answer"]).nullish(),
3830
- content: z17.array(
3831
- z17.object({
3832
- type: z17.literal("output_text"),
3833
- text: z17.string(),
3834
- logprobs: z17.array(
3835
- z17.object({
3836
- token: z17.string(),
3837
- logprob: z17.number(),
3838
- top_logprobs: z17.array(
3839
- z17.object({
3840
- token: z17.string(),
3841
- logprob: z17.number()
3908
+ model: z18.string().optional(),
3909
+ output: z18.array(
3910
+ z18.discriminatedUnion("type", [
3911
+ z18.object({
3912
+ type: z18.literal("message"),
3913
+ role: z18.literal("assistant"),
3914
+ id: z18.string(),
3915
+ phase: z18.enum(["commentary", "final_answer"]).nullish(),
3916
+ content: z18.array(
3917
+ z18.object({
3918
+ type: z18.literal("output_text"),
3919
+ text: z18.string(),
3920
+ logprobs: z18.array(
3921
+ z18.object({
3922
+ token: z18.string(),
3923
+ logprob: z18.number(),
3924
+ top_logprobs: z18.array(
3925
+ z18.object({
3926
+ token: z18.string(),
3927
+ logprob: z18.number()
3842
3928
  })
3843
3929
  )
3844
3930
  })
3845
3931
  ).nullish(),
3846
- annotations: z17.array(
3847
- z17.discriminatedUnion("type", [
3848
- z17.object({
3849
- type: z17.literal("url_citation"),
3850
- start_index: z17.number(),
3851
- end_index: z17.number(),
3852
- url: z17.string(),
3853
- title: z17.string()
3932
+ annotations: z18.array(
3933
+ z18.discriminatedUnion("type", [
3934
+ z18.object({
3935
+ type: z18.literal("url_citation"),
3936
+ start_index: z18.number(),
3937
+ end_index: z18.number(),
3938
+ url: z18.string(),
3939
+ title: z18.string()
3854
3940
  }),
3855
- z17.object({
3856
- type: z17.literal("file_citation"),
3857
- file_id: z17.string(),
3858
- filename: z17.string(),
3859
- index: z17.number()
3941
+ z18.object({
3942
+ type: z18.literal("file_citation"),
3943
+ file_id: z18.string(),
3944
+ filename: z18.string(),
3945
+ index: z18.number()
3860
3946
  }),
3861
- z17.object({
3862
- type: z17.literal("container_file_citation"),
3863
- container_id: z17.string(),
3864
- file_id: z17.string(),
3865
- filename: z17.string(),
3866
- start_index: z17.number(),
3867
- end_index: z17.number()
3947
+ z18.object({
3948
+ type: z18.literal("container_file_citation"),
3949
+ container_id: z18.string(),
3950
+ file_id: z18.string(),
3951
+ filename: z18.string(),
3952
+ start_index: z18.number(),
3953
+ end_index: z18.number()
3868
3954
  }),
3869
- z17.object({
3870
- type: z17.literal("file_path"),
3871
- file_id: z17.string(),
3872
- index: z17.number()
3955
+ z18.object({
3956
+ type: z18.literal("file_path"),
3957
+ file_id: z18.string(),
3958
+ index: z18.number()
3873
3959
  })
3874
3960
  ])
3875
3961
  )
3876
3962
  })
3877
3963
  )
3878
3964
  }),
3879
- z17.object({
3880
- type: z17.literal("web_search_call"),
3881
- id: z17.string(),
3882
- status: z17.string(),
3883
- action: z17.discriminatedUnion("type", [
3884
- z17.object({
3885
- type: z17.literal("search"),
3886
- query: z17.string().nullish(),
3887
- sources: z17.array(
3888
- z17.discriminatedUnion("type", [
3889
- z17.object({ type: z17.literal("url"), url: z17.string() }),
3890
- z17.object({
3891
- type: z17.literal("api"),
3892
- name: z17.string()
3965
+ z18.object({
3966
+ type: z18.literal("web_search_call"),
3967
+ id: z18.string(),
3968
+ status: z18.string(),
3969
+ action: z18.discriminatedUnion("type", [
3970
+ z18.object({
3971
+ type: z18.literal("search"),
3972
+ query: z18.string().nullish(),
3973
+ sources: z18.array(
3974
+ z18.discriminatedUnion("type", [
3975
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
3976
+ z18.object({
3977
+ type: z18.literal("api"),
3978
+ name: z18.string()
3893
3979
  })
3894
3980
  ])
3895
3981
  ).nullish()
3896
3982
  }),
3897
- z17.object({
3898
- type: z17.literal("open_page"),
3899
- url: z17.string().nullish()
3983
+ z18.object({
3984
+ type: z18.literal("open_page"),
3985
+ url: z18.string().nullish()
3900
3986
  }),
3901
- z17.object({
3902
- type: z17.literal("find_in_page"),
3903
- url: z17.string().nullish(),
3904
- pattern: z17.string().nullish()
3987
+ z18.object({
3988
+ type: z18.literal("find_in_page"),
3989
+ url: z18.string().nullish(),
3990
+ pattern: z18.string().nullish()
3905
3991
  })
3906
3992
  ]).nullish()
3907
3993
  }),
3908
- z17.object({
3909
- type: z17.literal("file_search_call"),
3910
- id: z17.string(),
3911
- queries: z17.array(z17.string()),
3912
- results: z17.array(
3913
- z17.object({
3914
- attributes: z17.record(
3915
- z17.string(),
3916
- z17.union([z17.string(), z17.number(), z17.boolean()])
3994
+ z18.object({
3995
+ type: z18.literal("file_search_call"),
3996
+ id: z18.string(),
3997
+ queries: z18.array(z18.string()),
3998
+ results: z18.array(
3999
+ z18.object({
4000
+ attributes: z18.record(
4001
+ z18.string(),
4002
+ z18.union([z18.string(), z18.number(), z18.boolean()])
3917
4003
  ),
3918
- file_id: z17.string(),
3919
- filename: z17.string(),
3920
- score: z17.number(),
3921
- text: z17.string()
4004
+ file_id: z18.string(),
4005
+ filename: z18.string(),
4006
+ score: z18.number(),
4007
+ text: z18.string()
3922
4008
  })
3923
4009
  ).nullish()
3924
4010
  }),
3925
- z17.object({
3926
- type: z17.literal("code_interpreter_call"),
3927
- id: z17.string(),
3928
- code: z17.string().nullable(),
3929
- container_id: z17.string(),
3930
- outputs: z17.array(
3931
- z17.discriminatedUnion("type", [
3932
- z17.object({ type: z17.literal("logs"), logs: z17.string() }),
3933
- z17.object({ type: z17.literal("image"), url: z17.string() })
4011
+ z18.object({
4012
+ type: z18.literal("code_interpreter_call"),
4013
+ id: z18.string(),
4014
+ code: z18.string().nullable(),
4015
+ container_id: z18.string(),
4016
+ outputs: z18.array(
4017
+ z18.discriminatedUnion("type", [
4018
+ z18.object({ type: z18.literal("logs"), logs: z18.string() }),
4019
+ z18.object({ type: z18.literal("image"), url: z18.string() })
3934
4020
  ])
3935
4021
  ).nullable()
3936
4022
  }),
3937
- z17.object({
3938
- type: z17.literal("image_generation_call"),
3939
- id: z17.string(),
3940
- result: z17.string()
4023
+ z18.object({
4024
+ type: z18.literal("image_generation_call"),
4025
+ id: z18.string(),
4026
+ result: z18.string()
3941
4027
  }),
3942
- z17.object({
3943
- type: z17.literal("local_shell_call"),
3944
- id: z17.string(),
3945
- call_id: z17.string(),
3946
- action: z17.object({
3947
- type: z17.literal("exec"),
3948
- command: z17.array(z17.string()),
3949
- timeout_ms: z17.number().optional(),
3950
- user: z17.string().optional(),
3951
- working_directory: z17.string().optional(),
3952
- env: z17.record(z17.string(), z17.string()).optional()
4028
+ z18.object({
4029
+ type: z18.literal("local_shell_call"),
4030
+ id: z18.string(),
4031
+ call_id: z18.string(),
4032
+ action: z18.object({
4033
+ type: z18.literal("exec"),
4034
+ command: z18.array(z18.string()),
4035
+ timeout_ms: z18.number().optional(),
4036
+ user: z18.string().optional(),
4037
+ working_directory: z18.string().optional(),
4038
+ env: z18.record(z18.string(), z18.string()).optional()
3953
4039
  })
3954
4040
  }),
3955
- z17.object({
3956
- type: z17.literal("function_call"),
3957
- call_id: z17.string(),
3958
- name: z17.string(),
3959
- arguments: z17.string(),
3960
- id: z17.string()
4041
+ z18.object({
4042
+ type: z18.literal("function_call"),
4043
+ call_id: z18.string(),
4044
+ name: z18.string(),
4045
+ arguments: z18.string(),
4046
+ id: z18.string()
3961
4047
  }),
3962
- z17.object({
3963
- type: z17.literal("custom_tool_call"),
3964
- call_id: z17.string(),
3965
- name: z17.string(),
3966
- input: z17.string(),
3967
- id: z17.string()
4048
+ z18.object({
4049
+ type: z18.literal("custom_tool_call"),
4050
+ call_id: z18.string(),
4051
+ name: z18.string(),
4052
+ input: z18.string(),
4053
+ id: z18.string()
3968
4054
  }),
3969
- z17.object({
3970
- type: z17.literal("computer_call"),
3971
- id: z17.string(),
3972
- status: z17.string().optional()
4055
+ z18.object({
4056
+ type: z18.literal("computer_call"),
4057
+ id: z18.string(),
4058
+ status: z18.string().optional()
3973
4059
  }),
3974
- z17.object({
3975
- type: z17.literal("reasoning"),
3976
- id: z17.string(),
3977
- encrypted_content: z17.string().nullish(),
3978
- summary: z17.array(
3979
- z17.object({
3980
- type: z17.literal("summary_text"),
3981
- text: z17.string()
4060
+ z18.object({
4061
+ type: z18.literal("reasoning"),
4062
+ id: z18.string(),
4063
+ encrypted_content: z18.string().nullish(),
4064
+ summary: z18.array(
4065
+ z18.object({
4066
+ type: z18.literal("summary_text"),
4067
+ text: z18.string()
3982
4068
  })
3983
4069
  )
3984
4070
  }),
3985
- z17.object({
3986
- type: z17.literal("mcp_call"),
3987
- id: z17.string(),
3988
- status: z17.string(),
3989
- arguments: z17.string(),
3990
- name: z17.string(),
3991
- server_label: z17.string(),
3992
- output: z17.string().nullish(),
3993
- error: z17.union([
3994
- z17.string(),
3995
- z17.object({
3996
- type: z17.string().optional(),
3997
- code: z17.union([z17.number(), z17.string()]).optional(),
3998
- message: z17.string().optional()
4071
+ z18.object({
4072
+ type: z18.literal("mcp_call"),
4073
+ id: z18.string(),
4074
+ status: z18.string(),
4075
+ arguments: z18.string(),
4076
+ name: z18.string(),
4077
+ server_label: z18.string(),
4078
+ output: z18.string().nullish(),
4079
+ error: z18.union([
4080
+ z18.string(),
4081
+ z18.object({
4082
+ type: z18.string().optional(),
4083
+ code: z18.union([z18.number(), z18.string()]).optional(),
4084
+ message: z18.string().optional()
3999
4085
  }).loose()
4000
4086
  ]).nullish(),
4001
- approval_request_id: z17.string().nullish()
4087
+ approval_request_id: z18.string().nullish()
4002
4088
  }),
4003
- z17.object({
4004
- type: z17.literal("mcp_list_tools"),
4005
- id: z17.string(),
4006
- server_label: z17.string(),
4007
- tools: z17.array(
4008
- z17.object({
4009
- name: z17.string(),
4010
- description: z17.string().optional(),
4011
- input_schema: z17.any(),
4012
- annotations: z17.record(z17.string(), z17.unknown()).optional()
4089
+ z18.object({
4090
+ type: z18.literal("mcp_list_tools"),
4091
+ id: z18.string(),
4092
+ server_label: z18.string(),
4093
+ tools: z18.array(
4094
+ z18.object({
4095
+ name: z18.string(),
4096
+ description: z18.string().optional(),
4097
+ input_schema: z18.any(),
4098
+ annotations: z18.record(z18.string(), z18.unknown()).optional()
4013
4099
  })
4014
4100
  ),
4015
- error: z17.union([
4016
- z17.string(),
4017
- z17.object({
4018
- type: z17.string().optional(),
4019
- code: z17.union([z17.number(), z17.string()]).optional(),
4020
- message: z17.string().optional()
4101
+ error: z18.union([
4102
+ z18.string(),
4103
+ z18.object({
4104
+ type: z18.string().optional(),
4105
+ code: z18.union([z18.number(), z18.string()]).optional(),
4106
+ message: z18.string().optional()
4021
4107
  }).loose()
4022
4108
  ]).optional()
4023
4109
  }),
4024
- z17.object({
4025
- type: z17.literal("mcp_approval_request"),
4026
- id: z17.string(),
4027
- server_label: z17.string(),
4028
- name: z17.string(),
4029
- arguments: z17.string(),
4030
- approval_request_id: z17.string().optional()
4110
+ z18.object({
4111
+ type: z18.literal("mcp_approval_request"),
4112
+ id: z18.string(),
4113
+ server_label: z18.string(),
4114
+ name: z18.string(),
4115
+ arguments: z18.string(),
4116
+ approval_request_id: z18.string().optional()
4031
4117
  }),
4032
- z17.object({
4033
- type: z17.literal("apply_patch_call"),
4034
- id: z17.string(),
4035
- call_id: z17.string(),
4036
- status: z17.enum(["in_progress", "completed"]),
4037
- operation: z17.discriminatedUnion("type", [
4038
- z17.object({
4039
- type: z17.literal("create_file"),
4040
- path: z17.string(),
4041
- diff: z17.string()
4118
+ z18.object({
4119
+ type: z18.literal("apply_patch_call"),
4120
+ id: z18.string(),
4121
+ call_id: z18.string(),
4122
+ status: z18.enum(["in_progress", "completed"]),
4123
+ operation: z18.discriminatedUnion("type", [
4124
+ z18.object({
4125
+ type: z18.literal("create_file"),
4126
+ path: z18.string(),
4127
+ diff: z18.string()
4042
4128
  }),
4043
- z17.object({
4044
- type: z17.literal("delete_file"),
4045
- path: z17.string()
4129
+ z18.object({
4130
+ type: z18.literal("delete_file"),
4131
+ path: z18.string()
4046
4132
  }),
4047
- z17.object({
4048
- type: z17.literal("update_file"),
4049
- path: z17.string(),
4050
- diff: z17.string()
4133
+ z18.object({
4134
+ type: z18.literal("update_file"),
4135
+ path: z18.string(),
4136
+ diff: z18.string()
4051
4137
  })
4052
4138
  ])
4053
4139
  }),
4054
- z17.object({
4055
- type: z17.literal("shell_call"),
4056
- id: z17.string(),
4057
- call_id: z17.string(),
4058
- status: z17.enum(["in_progress", "completed", "incomplete"]),
4059
- action: z17.object({
4060
- commands: z17.array(z17.string())
4140
+ z18.object({
4141
+ type: z18.literal("shell_call"),
4142
+ id: z18.string(),
4143
+ call_id: z18.string(),
4144
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
4145
+ action: z18.object({
4146
+ commands: z18.array(z18.string())
4061
4147
  })
4062
4148
  }),
4063
- z17.object({
4064
- type: z17.literal("shell_call_output"),
4065
- id: z17.string(),
4066
- call_id: z17.string(),
4067
- status: z17.enum(["in_progress", "completed", "incomplete"]),
4068
- output: z17.array(
4069
- z17.object({
4070
- stdout: z17.string(),
4071
- stderr: z17.string(),
4072
- outcome: z17.discriminatedUnion("type", [
4073
- z17.object({ type: z17.literal("timeout") }),
4074
- z17.object({
4075
- type: z17.literal("exit"),
4076
- exit_code: z17.number()
4149
+ z18.object({
4150
+ type: z18.literal("shell_call_output"),
4151
+ id: z18.string(),
4152
+ call_id: z18.string(),
4153
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
4154
+ output: z18.array(
4155
+ z18.object({
4156
+ stdout: z18.string(),
4157
+ stderr: z18.string(),
4158
+ outcome: z18.discriminatedUnion("type", [
4159
+ z18.object({ type: z18.literal("timeout") }),
4160
+ z18.object({
4161
+ type: z18.literal("exit"),
4162
+ exit_code: z18.number()
4077
4163
  })
4078
4164
  ])
4079
4165
  })
4080
4166
  )
4081
4167
  }),
4082
- z17.object({
4083
- type: z17.literal("tool_search_call"),
4084
- id: z17.string(),
4085
- execution: z17.enum(["server", "client"]),
4086
- call_id: z17.string().nullable(),
4087
- status: z17.enum(["in_progress", "completed", "incomplete"]),
4088
- arguments: z17.unknown()
4168
+ z18.object({
4169
+ type: z18.literal("tool_search_call"),
4170
+ id: z18.string(),
4171
+ execution: z18.enum(["server", "client"]),
4172
+ call_id: z18.string().nullable(),
4173
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
4174
+ arguments: z18.unknown()
4089
4175
  }),
4090
- z17.object({
4091
- type: z17.literal("tool_search_output"),
4092
- id: z17.string(),
4093
- execution: z17.enum(["server", "client"]),
4094
- call_id: z17.string().nullable(),
4095
- status: z17.enum(["in_progress", "completed", "incomplete"]),
4096
- tools: z17.array(z17.record(z17.string(), jsonValueSchema.optional()))
4176
+ z18.object({
4177
+ type: z18.literal("tool_search_output"),
4178
+ id: z18.string(),
4179
+ execution: z18.enum(["server", "client"]),
4180
+ call_id: z18.string().nullable(),
4181
+ status: z18.enum(["in_progress", "completed", "incomplete"]),
4182
+ tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
4097
4183
  })
4098
4184
  ])
4099
4185
  ).optional(),
4100
- service_tier: z17.string().nullish(),
4101
- incomplete_details: z17.object({ reason: z17.string() }).nullish(),
4102
- usage: z17.object({
4103
- input_tokens: z17.number(),
4104
- input_tokens_details: z17.object({ cached_tokens: z17.number().nullish() }).nullish(),
4105
- output_tokens: z17.number(),
4106
- output_tokens_details: z17.object({ reasoning_tokens: z17.number().nullish() }).nullish()
4186
+ service_tier: z18.string().nullish(),
4187
+ incomplete_details: z18.object({ reason: z18.string() }).nullish(),
4188
+ usage: z18.object({
4189
+ input_tokens: z18.number(),
4190
+ input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
4191
+ output_tokens: z18.number(),
4192
+ output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
4107
4193
  }).optional()
4108
4194
  })
4109
4195
  )
@@ -4111,10 +4197,10 @@ var openaiResponsesResponseSchema = lazySchema15(
4111
4197
 
4112
4198
  // src/responses/openai-responses-options.ts
4113
4199
  import {
4114
- lazySchema as lazySchema16,
4115
- zodSchema as zodSchema16
4200
+ lazySchema as lazySchema17,
4201
+ zodSchema as zodSchema17
4116
4202
  } from "@ai-sdk/provider-utils";
4117
- import { z as z18 } from "zod/v4";
4203
+ import { z as z19 } from "zod/v4";
4118
4204
  var TOP_LOGPROBS_MAX = 20;
4119
4205
  var openaiResponsesReasoningModelIds = [
4120
4206
  "o1",
@@ -4179,9 +4265,9 @@ var openaiResponsesModelIds = [
4179
4265
  "gpt-5-chat-latest",
4180
4266
  ...openaiResponsesReasoningModelIds
4181
4267
  ];
4182
- var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4183
- () => zodSchema16(
4184
- z18.object({
4268
+ var openaiLanguageModelResponsesOptionsSchema = lazySchema17(
4269
+ () => zodSchema17(
4270
+ z19.object({
4185
4271
  /**
4186
4272
  * The ID of the OpenAI Conversation to continue.
4187
4273
  * You must create a conversation first via the OpenAI API.
@@ -4189,13 +4275,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4189
4275
  * Defaults to `undefined`.
4190
4276
  * @see https://platform.openai.com/docs/api-reference/conversations/create
4191
4277
  */
4192
- conversation: z18.string().nullish(),
4278
+ conversation: z19.string().nullish(),
4193
4279
  /**
4194
4280
  * The set of extra fields to include in the response (advanced, usually not needed).
4195
4281
  * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
4196
4282
  */
4197
- include: z18.array(
4198
- z18.enum([
4283
+ include: z19.array(
4284
+ z19.enum([
4199
4285
  "reasoning.encrypted_content",
4200
4286
  // handled internally by default, only needed for unknown reasoning models
4201
4287
  "file_search_call.results",
@@ -4207,7 +4293,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4207
4293
  * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
4208
4294
  * Defaults to `undefined`.
4209
4295
  */
4210
- instructions: z18.string().nullish(),
4296
+ instructions: z19.string().nullish(),
4211
4297
  /**
4212
4298
  * Return the log probabilities of the tokens. Including logprobs will increase
4213
4299
  * the response size and can slow down response times. However, it can
@@ -4222,30 +4308,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4222
4308
  * @see https://platform.openai.com/docs/api-reference/responses/create
4223
4309
  * @see https://cookbook.openai.com/examples/using_logprobs
4224
4310
  */
4225
- logprobs: z18.union([z18.boolean(), z18.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4311
+ logprobs: z19.union([z19.boolean(), z19.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4226
4312
  /**
4227
4313
  * The maximum number of total calls to built-in tools that can be processed in a response.
4228
4314
  * This maximum number applies across all built-in tool calls, not per individual tool.
4229
4315
  * Any further attempts to call a tool by the model will be ignored.
4230
4316
  */
4231
- maxToolCalls: z18.number().nullish(),
4317
+ maxToolCalls: z19.number().nullish(),
4232
4318
  /**
4233
4319
  * Additional metadata to store with the generation.
4234
4320
  */
4235
- metadata: z18.any().nullish(),
4321
+ metadata: z19.any().nullish(),
4236
4322
  /**
4237
4323
  * Whether to use parallel tool calls. Defaults to `true`.
4238
4324
  */
4239
- parallelToolCalls: z18.boolean().nullish(),
4325
+ parallelToolCalls: z19.boolean().nullish(),
4240
4326
  /**
4241
4327
  * The ID of the previous response. You can use it to continue a conversation.
4242
4328
  * Defaults to `undefined`.
4243
4329
  */
4244
- previousResponseId: z18.string().nullish(),
4330
+ previousResponseId: z19.string().nullish(),
4245
4331
  /**
4246
4332
  * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
4247
4333
  */
4248
- promptCacheKey: z18.string().nullish(),
4334
+ promptCacheKey: z19.string().nullish(),
4249
4335
  /**
4250
4336
  * The retention policy for the prompt cache.
4251
4337
  * - 'in_memory': Default. Standard prompt caching behavior.
@@ -4254,7 +4340,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4254
4340
  *
4255
4341
  * @default 'in_memory'
4256
4342
  */
4257
- promptCacheRetention: z18.enum(["in_memory", "24h"]).nullish(),
4343
+ promptCacheRetention: z19.enum(["in_memory", "24h"]).nullish(),
4258
4344
  /**
4259
4345
  * Reasoning effort for reasoning models. Defaults to `medium`. If you use
4260
4346
  * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
@@ -4265,17 +4351,17 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4265
4351
  * OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in
4266
4352
  * an error.
4267
4353
  */
4268
- reasoningEffort: z18.string().nullish(),
4354
+ reasoningEffort: z19.string().nullish(),
4269
4355
  /**
4270
4356
  * Controls reasoning summary output from the model.
4271
4357
  * Set to "auto" to automatically receive the richest level available,
4272
4358
  * or "detailed" for comprehensive summaries.
4273
4359
  */
4274
- reasoningSummary: z18.string().nullish(),
4360
+ reasoningSummary: z19.string().nullish(),
4275
4361
  /**
4276
4362
  * The identifier for safety monitoring and tracking.
4277
4363
  */
4278
- safetyIdentifier: z18.string().nullish(),
4364
+ safetyIdentifier: z19.string().nullish(),
4279
4365
  /**
4280
4366
  * Service tier for the request.
4281
4367
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
@@ -4283,34 +4369,34 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4283
4369
  *
4284
4370
  * Defaults to 'auto'.
4285
4371
  */
4286
- serviceTier: z18.enum(["auto", "flex", "priority", "default"]).nullish(),
4372
+ serviceTier: z19.enum(["auto", "flex", "priority", "default"]).nullish(),
4287
4373
  /**
4288
4374
  * Whether to store the generation. Defaults to `true`.
4289
4375
  */
4290
- store: z18.boolean().nullish(),
4376
+ store: z19.boolean().nullish(),
4291
4377
  /**
4292
4378
  * Whether to use strict JSON schema validation.
4293
4379
  * Defaults to `true`.
4294
4380
  */
4295
- strictJsonSchema: z18.boolean().nullish(),
4381
+ strictJsonSchema: z19.boolean().nullish(),
4296
4382
  /**
4297
4383
  * Controls the verbosity of the model's responses. Lower values ('low') will result
4298
4384
  * in more concise responses, while higher values ('high') will result in more verbose responses.
4299
4385
  * Valid values: 'low', 'medium', 'high'.
4300
4386
  */
4301
- textVerbosity: z18.enum(["low", "medium", "high"]).nullish(),
4387
+ textVerbosity: z19.enum(["low", "medium", "high"]).nullish(),
4302
4388
  /**
4303
4389
  * Controls output truncation. 'auto' (default) performs truncation automatically;
4304
4390
  * 'disabled' turns truncation off.
4305
4391
  */
4306
- truncation: z18.enum(["auto", "disabled"]).nullish(),
4392
+ truncation: z19.enum(["auto", "disabled"]).nullish(),
4307
4393
  /**
4308
4394
  * A unique identifier representing your end-user, which can help OpenAI to
4309
4395
  * monitor and detect abuse.
4310
4396
  * Defaults to `undefined`.
4311
4397
  * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
4312
4398
  */
4313
- user: z18.string().nullish(),
4399
+ user: z19.string().nullish(),
4314
4400
  /**
4315
4401
  * Override the system message mode for this model.
4316
4402
  * - 'system': Use the 'system' role for system messages (default for most models)
@@ -4319,7 +4405,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4319
4405
  *
4320
4406
  * If not specified, the mode is automatically determined based on the model.
4321
4407
  */
4322
- systemMessageMode: z18.enum(["system", "developer", "remove"]).optional(),
4408
+ systemMessageMode: z19.enum(["system", "developer", "remove"]).optional(),
4323
4409
  /**
4324
4410
  * Force treating this model as a reasoning model.
4325
4411
  *
@@ -4329,7 +4415,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
4329
4415
  * When enabled, the SDK applies reasoning-model parameter compatibility rules
4330
4416
  * and defaults `systemMessageMode` to `developer` unless overridden.
4331
4417
  */
4332
- forceReasoning: z18.boolean().optional()
4418
+ forceReasoning: z19.boolean().optional()
4333
4419
  })
4334
4420
  )
4335
4421
  );
@@ -4343,37 +4429,37 @@ import { validateTypes as validateTypes2 } from "@ai-sdk/provider-utils";
4343
4429
  // src/tool/code-interpreter.ts
4344
4430
  import {
4345
4431
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,
4346
- lazySchema as lazySchema17,
4347
- zodSchema as zodSchema17
4432
+ lazySchema as lazySchema18,
4433
+ zodSchema as zodSchema18
4348
4434
  } from "@ai-sdk/provider-utils";
4349
- import { z as z19 } from "zod/v4";
4350
- var codeInterpreterInputSchema = lazySchema17(
4351
- () => zodSchema17(
4352
- z19.object({
4353
- code: z19.string().nullish(),
4354
- containerId: z19.string()
4435
+ import { z as z20 } from "zod/v4";
4436
+ var codeInterpreterInputSchema = lazySchema18(
4437
+ () => zodSchema18(
4438
+ z20.object({
4439
+ code: z20.string().nullish(),
4440
+ containerId: z20.string()
4355
4441
  })
4356
4442
  )
4357
4443
  );
4358
- var codeInterpreterOutputSchema = lazySchema17(
4359
- () => zodSchema17(
4360
- z19.object({
4361
- outputs: z19.array(
4362
- z19.discriminatedUnion("type", [
4363
- z19.object({ type: z19.literal("logs"), logs: z19.string() }),
4364
- z19.object({ type: z19.literal("image"), url: z19.string() })
4444
+ var codeInterpreterOutputSchema = lazySchema18(
4445
+ () => zodSchema18(
4446
+ z20.object({
4447
+ outputs: z20.array(
4448
+ z20.discriminatedUnion("type", [
4449
+ z20.object({ type: z20.literal("logs"), logs: z20.string() }),
4450
+ z20.object({ type: z20.literal("image"), url: z20.string() })
4365
4451
  ])
4366
4452
  ).nullish()
4367
4453
  })
4368
4454
  )
4369
4455
  );
4370
- var codeInterpreterArgsSchema = lazySchema17(
4371
- () => zodSchema17(
4372
- z19.object({
4373
- container: z19.union([
4374
- z19.string(),
4375
- z19.object({
4376
- fileIds: z19.array(z19.string()).optional()
4456
+ var codeInterpreterArgsSchema = lazySchema18(
4457
+ () => zodSchema18(
4458
+ z20.object({
4459
+ container: z20.union([
4460
+ z20.string(),
4461
+ z20.object({
4462
+ fileIds: z20.array(z20.string()).optional()
4377
4463
  })
4378
4464
  ]).optional()
4379
4465
  })
@@ -4391,45 +4477,45 @@ var codeInterpreter = (args = {}) => {
4391
4477
  // src/tool/file-search.ts
4392
4478
  import {
4393
4479
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
4394
- lazySchema as lazySchema18,
4395
- zodSchema as zodSchema18
4480
+ lazySchema as lazySchema19,
4481
+ zodSchema as zodSchema19
4396
4482
  } from "@ai-sdk/provider-utils";
4397
- import { z as z20 } from "zod/v4";
4398
- var comparisonFilterSchema = z20.object({
4399
- key: z20.string(),
4400
- type: z20.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
4401
- value: z20.union([z20.string(), z20.number(), z20.boolean(), z20.array(z20.string())])
4483
+ import { z as z21 } from "zod/v4";
4484
+ var comparisonFilterSchema = z21.object({
4485
+ key: z21.string(),
4486
+ type: z21.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
4487
+ value: z21.union([z21.string(), z21.number(), z21.boolean(), z21.array(z21.string())])
4402
4488
  });
4403
- var compoundFilterSchema = z20.object({
4404
- type: z20.enum(["and", "or"]),
4405
- filters: z20.array(
4406
- z20.union([comparisonFilterSchema, z20.lazy(() => compoundFilterSchema)])
4489
+ var compoundFilterSchema = z21.object({
4490
+ type: z21.enum(["and", "or"]),
4491
+ filters: z21.array(
4492
+ z21.union([comparisonFilterSchema, z21.lazy(() => compoundFilterSchema)])
4407
4493
  )
4408
4494
  });
4409
- var fileSearchArgsSchema = lazySchema18(
4410
- () => zodSchema18(
4411
- z20.object({
4412
- vectorStoreIds: z20.array(z20.string()),
4413
- maxNumResults: z20.number().optional(),
4414
- ranking: z20.object({
4415
- ranker: z20.string().optional(),
4416
- scoreThreshold: z20.number().optional()
4495
+ var fileSearchArgsSchema = lazySchema19(
4496
+ () => zodSchema19(
4497
+ z21.object({
4498
+ vectorStoreIds: z21.array(z21.string()),
4499
+ maxNumResults: z21.number().optional(),
4500
+ ranking: z21.object({
4501
+ ranker: z21.string().optional(),
4502
+ scoreThreshold: z21.number().optional()
4417
4503
  }).optional(),
4418
- filters: z20.union([comparisonFilterSchema, compoundFilterSchema]).optional()
4504
+ filters: z21.union([comparisonFilterSchema, compoundFilterSchema]).optional()
4419
4505
  })
4420
4506
  )
4421
4507
  );
4422
- var fileSearchOutputSchema = lazySchema18(
4423
- () => zodSchema18(
4424
- z20.object({
4425
- queries: z20.array(z20.string()),
4426
- results: z20.array(
4427
- z20.object({
4428
- attributes: z20.record(z20.string(), z20.unknown()),
4429
- fileId: z20.string(),
4430
- filename: z20.string(),
4431
- score: z20.number(),
4432
- text: z20.string()
4508
+ var fileSearchOutputSchema = lazySchema19(
4509
+ () => zodSchema19(
4510
+ z21.object({
4511
+ queries: z21.array(z21.string()),
4512
+ results: z21.array(
4513
+ z21.object({
4514
+ attributes: z21.record(z21.string(), z21.unknown()),
4515
+ fileId: z21.string(),
4516
+ filename: z21.string(),
4517
+ score: z21.number(),
4518
+ text: z21.string()
4433
4519
  })
4434
4520
  ).nullable()
4435
4521
  })
@@ -4437,39 +4523,39 @@ var fileSearchOutputSchema = lazySchema18(
4437
4523
  );
4438
4524
  var fileSearch = createProviderToolFactoryWithOutputSchema6({
4439
4525
  id: "openai.file_search",
4440
- inputSchema: z20.object({}),
4526
+ inputSchema: z21.object({}),
4441
4527
  outputSchema: fileSearchOutputSchema
4442
4528
  });
4443
4529
 
4444
4530
  // src/tool/image-generation.ts
4445
4531
  import {
4446
4532
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
4447
- lazySchema as lazySchema19,
4448
- zodSchema as zodSchema19
4533
+ lazySchema as lazySchema20,
4534
+ zodSchema as zodSchema20
4449
4535
  } from "@ai-sdk/provider-utils";
4450
- import { z as z21 } from "zod/v4";
4451
- var imageGenerationArgsSchema = lazySchema19(
4452
- () => zodSchema19(
4453
- z21.object({
4454
- background: z21.enum(["auto", "opaque", "transparent"]).optional(),
4455
- inputFidelity: z21.enum(["low", "high"]).optional(),
4456
- inputImageMask: z21.object({
4457
- fileId: z21.string().optional(),
4458
- imageUrl: z21.string().optional()
4536
+ import { z as z22 } from "zod/v4";
4537
+ var imageGenerationArgsSchema = lazySchema20(
4538
+ () => zodSchema20(
4539
+ z22.object({
4540
+ background: z22.enum(["auto", "opaque", "transparent"]).optional(),
4541
+ inputFidelity: z22.enum(["low", "high"]).optional(),
4542
+ inputImageMask: z22.object({
4543
+ fileId: z22.string().optional(),
4544
+ imageUrl: z22.string().optional()
4459
4545
  }).optional(),
4460
- model: z21.string().optional(),
4461
- moderation: z21.enum(["auto"]).optional(),
4462
- outputCompression: z21.number().int().min(0).max(100).optional(),
4463
- outputFormat: z21.enum(["png", "jpeg", "webp"]).optional(),
4464
- partialImages: z21.number().int().min(0).max(3).optional(),
4465
- quality: z21.enum(["auto", "low", "medium", "high"]).optional(),
4466
- size: z21.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
4546
+ model: z22.string().optional(),
4547
+ moderation: z22.enum(["auto"]).optional(),
4548
+ outputCompression: z22.number().int().min(0).max(100).optional(),
4549
+ outputFormat: z22.enum(["png", "jpeg", "webp"]).optional(),
4550
+ partialImages: z22.number().int().min(0).max(3).optional(),
4551
+ quality: z22.enum(["auto", "low", "medium", "high"]).optional(),
4552
+ size: z22.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
4467
4553
  }).strict()
4468
4554
  )
4469
4555
  );
4470
- var imageGenerationInputSchema = lazySchema19(() => zodSchema19(z21.object({})));
4471
- var imageGenerationOutputSchema = lazySchema19(
4472
- () => zodSchema19(z21.object({ result: z21.string() }))
4556
+ var imageGenerationInputSchema = lazySchema20(() => zodSchema20(z22.object({})));
4557
+ var imageGenerationOutputSchema = lazySchema20(
4558
+ () => zodSchema20(z22.object({ result: z22.string() }))
4473
4559
  );
4474
4560
  var imageGenerationToolFactory = createProviderToolFactoryWithOutputSchema7({
4475
4561
  id: "openai.image_generation",
@@ -4483,29 +4569,29 @@ var imageGeneration = (args = {}) => {
4483
4569
  // src/tool/custom.ts
4484
4570
  import {
4485
4571
  createProviderToolFactory,
4486
- lazySchema as lazySchema20,
4487
- zodSchema as zodSchema20
4572
+ lazySchema as lazySchema21,
4573
+ zodSchema as zodSchema21
4488
4574
  } from "@ai-sdk/provider-utils";
4489
- import { z as z22 } from "zod/v4";
4490
- var customArgsSchema = lazySchema20(
4491
- () => zodSchema20(
4492
- z22.object({
4493
- name: z22.string(),
4494
- description: z22.string().optional(),
4495
- format: z22.union([
4496
- z22.object({
4497
- type: z22.literal("grammar"),
4498
- syntax: z22.enum(["regex", "lark"]),
4499
- definition: z22.string()
4575
+ import { z as z23 } from "zod/v4";
4576
+ var customArgsSchema = lazySchema21(
4577
+ () => zodSchema21(
4578
+ z23.object({
4579
+ name: z23.string(),
4580
+ description: z23.string().optional(),
4581
+ format: z23.union([
4582
+ z23.object({
4583
+ type: z23.literal("grammar"),
4584
+ syntax: z23.enum(["regex", "lark"]),
4585
+ definition: z23.string()
4500
4586
  }),
4501
- z22.object({
4502
- type: z22.literal("text")
4587
+ z23.object({
4588
+ type: z23.literal("text")
4503
4589
  })
4504
4590
  ]).optional()
4505
4591
  })
4506
4592
  )
4507
4593
  );
4508
- var customInputSchema = lazySchema20(() => zodSchema20(z22.string()));
4594
+ var customInputSchema = lazySchema21(() => zodSchema21(z23.string()));
4509
4595
  var customToolFactory = createProviderToolFactory({
4510
4596
  id: "openai.custom",
4511
4597
  inputSchema: customInputSchema
@@ -4514,60 +4600,60 @@ var customToolFactory = createProviderToolFactory({
4514
4600
  // src/tool/mcp.ts
4515
4601
  import {
4516
4602
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,
4517
- lazySchema as lazySchema21,
4518
- zodSchema as zodSchema21
4603
+ lazySchema as lazySchema22,
4604
+ zodSchema as zodSchema22
4519
4605
  } from "@ai-sdk/provider-utils";
4520
- import { z as z23 } from "zod/v4";
4521
- var jsonValueSchema2 = z23.lazy(
4522
- () => z23.union([
4523
- z23.string(),
4524
- z23.number(),
4525
- z23.boolean(),
4526
- z23.null(),
4527
- z23.array(jsonValueSchema2),
4528
- z23.record(z23.string(), jsonValueSchema2)
4606
+ import { z as z24 } from "zod/v4";
4607
+ var jsonValueSchema2 = z24.lazy(
4608
+ () => z24.union([
4609
+ z24.string(),
4610
+ z24.number(),
4611
+ z24.boolean(),
4612
+ z24.null(),
4613
+ z24.array(jsonValueSchema2),
4614
+ z24.record(z24.string(), jsonValueSchema2)
4529
4615
  ])
4530
4616
  );
4531
- var mcpArgsSchema = lazySchema21(
4532
- () => zodSchema21(
4533
- z23.object({
4534
- serverLabel: z23.string(),
4535
- allowedTools: z23.union([
4536
- z23.array(z23.string()),
4537
- z23.object({
4538
- readOnly: z23.boolean().optional(),
4539
- toolNames: z23.array(z23.string()).optional()
4617
+ var mcpArgsSchema = lazySchema22(
4618
+ () => zodSchema22(
4619
+ z24.object({
4620
+ serverLabel: z24.string(),
4621
+ allowedTools: z24.union([
4622
+ z24.array(z24.string()),
4623
+ z24.object({
4624
+ readOnly: z24.boolean().optional(),
4625
+ toolNames: z24.array(z24.string()).optional()
4540
4626
  })
4541
4627
  ]).optional(),
4542
- authorization: z23.string().optional(),
4543
- connectorId: z23.string().optional(),
4544
- headers: z23.record(z23.string(), z23.string()).optional(),
4545
- requireApproval: z23.union([
4546
- z23.enum(["always", "never"]),
4547
- z23.object({
4548
- never: z23.object({
4549
- toolNames: z23.array(z23.string()).optional()
4628
+ authorization: z24.string().optional(),
4629
+ connectorId: z24.string().optional(),
4630
+ headers: z24.record(z24.string(), z24.string()).optional(),
4631
+ requireApproval: z24.union([
4632
+ z24.enum(["always", "never"]),
4633
+ z24.object({
4634
+ never: z24.object({
4635
+ toolNames: z24.array(z24.string()).optional()
4550
4636
  }).optional()
4551
4637
  })
4552
4638
  ]).optional(),
4553
- serverDescription: z23.string().optional(),
4554
- serverUrl: z23.string().optional()
4639
+ serverDescription: z24.string().optional(),
4640
+ serverUrl: z24.string().optional()
4555
4641
  }).refine(
4556
4642
  (v) => v.serverUrl != null || v.connectorId != null,
4557
4643
  "One of serverUrl or connectorId must be provided."
4558
4644
  )
4559
4645
  )
4560
4646
  );
4561
- var mcpInputSchema = lazySchema21(() => zodSchema21(z23.object({})));
4562
- var mcpOutputSchema = lazySchema21(
4563
- () => zodSchema21(
4564
- z23.object({
4565
- type: z23.literal("call"),
4566
- serverLabel: z23.string(),
4567
- name: z23.string(),
4568
- arguments: z23.string(),
4569
- output: z23.string().nullish(),
4570
- error: z23.union([z23.string(), jsonValueSchema2]).optional()
4647
+ var mcpInputSchema = lazySchema22(() => zodSchema22(z24.object({})));
4648
+ var mcpOutputSchema = lazySchema22(
4649
+ () => zodSchema22(
4650
+ z24.object({
4651
+ type: z24.literal("call"),
4652
+ serverLabel: z24.string(),
4653
+ name: z24.string(),
4654
+ arguments: z24.string(),
4655
+ output: z24.string().nullish(),
4656
+ error: z24.union([z24.string(), jsonValueSchema2]).optional()
4571
4657
  })
4572
4658
  )
4573
4659
  );
@@ -4580,70 +4666,15 @@ var mcpToolFactory = createProviderToolFactoryWithOutputSchema8({
4580
4666
  // src/tool/web-search.ts
4581
4667
  import {
4582
4668
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
4583
- lazySchema as lazySchema22,
4584
- zodSchema as zodSchema22
4585
- } from "@ai-sdk/provider-utils";
4586
- import { z as z24 } from "zod/v4";
4587
- var webSearchArgsSchema = lazySchema22(
4588
- () => zodSchema22(
4589
- z24.object({
4590
- externalWebAccess: z24.boolean().optional(),
4591
- filters: z24.object({ allowedDomains: z24.array(z24.string()).optional() }).optional(),
4592
- searchContextSize: z24.enum(["low", "medium", "high"]).optional(),
4593
- userLocation: z24.object({
4594
- type: z24.literal("approximate"),
4595
- country: z24.string().optional(),
4596
- city: z24.string().optional(),
4597
- region: z24.string().optional(),
4598
- timezone: z24.string().optional()
4599
- }).optional()
4600
- })
4601
- )
4602
- );
4603
- var webSearchInputSchema = lazySchema22(() => zodSchema22(z24.object({})));
4604
- var webSearchOutputSchema = lazySchema22(
4605
- () => zodSchema22(
4606
- z24.object({
4607
- action: z24.discriminatedUnion("type", [
4608
- z24.object({
4609
- type: z24.literal("search"),
4610
- query: z24.string().optional()
4611
- }),
4612
- z24.object({
4613
- type: z24.literal("openPage"),
4614
- url: z24.string().nullish()
4615
- }),
4616
- z24.object({
4617
- type: z24.literal("findInPage"),
4618
- url: z24.string().nullish(),
4619
- pattern: z24.string().nullish()
4620
- })
4621
- ]).optional(),
4622
- sources: z24.array(
4623
- z24.discriminatedUnion("type", [
4624
- z24.object({ type: z24.literal("url"), url: z24.string() }),
4625
- z24.object({ type: z24.literal("api"), name: z24.string() })
4626
- ])
4627
- ).optional()
4628
- })
4629
- )
4630
- );
4631
- var webSearchToolFactory = createProviderToolFactoryWithOutputSchema9({
4632
- id: "openai.web_search",
4633
- inputSchema: webSearchInputSchema,
4634
- outputSchema: webSearchOutputSchema
4635
- });
4636
-
4637
- // src/tool/web-search-preview.ts
4638
- import {
4639
- createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema10,
4640
4669
  lazySchema as lazySchema23,
4641
4670
  zodSchema as zodSchema23
4642
4671
  } from "@ai-sdk/provider-utils";
4643
4672
  import { z as z25 } from "zod/v4";
4644
- var webSearchPreviewArgsSchema = lazySchema23(
4673
+ var webSearchArgsSchema = lazySchema23(
4645
4674
  () => zodSchema23(
4646
4675
  z25.object({
4676
+ externalWebAccess: z25.boolean().optional(),
4677
+ filters: z25.object({ allowedDomains: z25.array(z25.string()).optional() }).optional(),
4647
4678
  searchContextSize: z25.enum(["low", "medium", "high"]).optional(),
4648
4679
  userLocation: z25.object({
4649
4680
  type: z25.literal("approximate"),
@@ -4655,10 +4686,8 @@ var webSearchPreviewArgsSchema = lazySchema23(
4655
4686
  })
4656
4687
  )
4657
4688
  );
4658
- var webSearchPreviewInputSchema = lazySchema23(
4659
- () => zodSchema23(z25.object({}))
4660
- );
4661
- var webSearchPreviewOutputSchema = lazySchema23(
4689
+ var webSearchInputSchema = lazySchema23(() => zodSchema23(z25.object({})));
4690
+ var webSearchOutputSchema = lazySchema23(
4662
4691
  () => zodSchema23(
4663
4692
  z25.object({
4664
4693
  action: z25.discriminatedUnion("type", [
@@ -4675,6 +4704,63 @@ var webSearchPreviewOutputSchema = lazySchema23(
4675
4704
  url: z25.string().nullish(),
4676
4705
  pattern: z25.string().nullish()
4677
4706
  })
4707
+ ]).optional(),
4708
+ sources: z25.array(
4709
+ z25.discriminatedUnion("type", [
4710
+ z25.object({ type: z25.literal("url"), url: z25.string() }),
4711
+ z25.object({ type: z25.literal("api"), name: z25.string() })
4712
+ ])
4713
+ ).optional()
4714
+ })
4715
+ )
4716
+ );
4717
+ var webSearchToolFactory = createProviderToolFactoryWithOutputSchema9({
4718
+ id: "openai.web_search",
4719
+ inputSchema: webSearchInputSchema,
4720
+ outputSchema: webSearchOutputSchema
4721
+ });
4722
+
4723
+ // src/tool/web-search-preview.ts
4724
+ import {
4725
+ createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema10,
4726
+ lazySchema as lazySchema24,
4727
+ zodSchema as zodSchema24
4728
+ } from "@ai-sdk/provider-utils";
4729
+ import { z as z26 } from "zod/v4";
4730
+ var webSearchPreviewArgsSchema = lazySchema24(
4731
+ () => zodSchema24(
4732
+ z26.object({
4733
+ searchContextSize: z26.enum(["low", "medium", "high"]).optional(),
4734
+ userLocation: z26.object({
4735
+ type: z26.literal("approximate"),
4736
+ country: z26.string().optional(),
4737
+ city: z26.string().optional(),
4738
+ region: z26.string().optional(),
4739
+ timezone: z26.string().optional()
4740
+ }).optional()
4741
+ })
4742
+ )
4743
+ );
4744
+ var webSearchPreviewInputSchema = lazySchema24(
4745
+ () => zodSchema24(z26.object({}))
4746
+ );
4747
+ var webSearchPreviewOutputSchema = lazySchema24(
4748
+ () => zodSchema24(
4749
+ z26.object({
4750
+ action: z26.discriminatedUnion("type", [
4751
+ z26.object({
4752
+ type: z26.literal("search"),
4753
+ query: z26.string().optional()
4754
+ }),
4755
+ z26.object({
4756
+ type: z26.literal("openPage"),
4757
+ url: z26.string().nullish()
4758
+ }),
4759
+ z26.object({
4760
+ type: z26.literal("findInPage"),
4761
+ url: z26.string().nullish(),
4762
+ pattern: z26.string().nullish()
4763
+ })
4678
4764
  ]).optional()
4679
4765
  })
4680
4766
  )
@@ -5018,13 +5104,13 @@ var OpenAIResponsesLanguageModel = class {
5018
5104
  warnings.push({ type: "unsupported", feature: "stopSequences" });
5019
5105
  }
5020
5106
  const providerOptionsName = this.config.provider.includes("azure") ? "azure" : "openai";
5021
- let openaiOptions = await parseProviderOptions7({
5107
+ let openaiOptions = await parseProviderOptions8({
5022
5108
  provider: providerOptionsName,
5023
5109
  providerOptions,
5024
5110
  schema: openaiLanguageModelResponsesOptionsSchema
5025
5111
  });
5026
5112
  if (openaiOptions == null && providerOptionsName !== "openai") {
5027
- openaiOptions = await parseProviderOptions7({
5113
+ openaiOptions = await parseProviderOptions8({
5028
5114
  provider: "openai",
5029
5115
  providerOptions,
5030
5116
  schema: openaiLanguageModelResponsesOptionsSchema
@@ -6673,6 +6759,9 @@ export {
6673
6759
  modelMaxImagesPerCall,
6674
6760
  openAITranscriptionModelOptions,
6675
6761
  openaiEmbeddingModelOptions,
6762
+ openaiImageModelEditOptions,
6763
+ openaiImageModelGenerationOptions,
6764
+ openaiImageModelOptions,
6676
6765
  openaiLanguageModelChatOptions,
6677
6766
  openaiLanguageModelCompletionOptions,
6678
6767
  openaiSpeechModelOptionsSchema,