@ai-sdk/openai 3.0.54 → 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/index.d.mts +28 -1
  3. package/dist/index.d.ts +28 -1
  4. package/dist/index.js +1204 -1122
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +1176 -1063
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/internal/index.d.mts +28 -1
  9. package/dist/internal/index.d.ts +28 -1
  10. package/dist/internal/index.js +1203 -1115
  11. package/dist/internal/index.js.map +1 -1
  12. package/dist/internal/index.mjs +1177 -1061
  13. package/dist/internal/index.mjs.map +1 -1
  14. package/docs/03-openai.mdx +12 -3
  15. package/package.json +4 -4
  16. package/src/chat/convert-openai-chat-usage.ts +1 -1
  17. package/src/chat/convert-to-openai-chat-messages.ts +3 -3
  18. package/src/chat/map-openai-finish-reason.ts +1 -1
  19. package/src/chat/openai-chat-api.ts +6 -2
  20. package/src/chat/openai-chat-language-model.ts +14 -14
  21. package/src/chat/openai-chat-options.ts +5 -1
  22. package/src/chat/openai-chat-prepare-tools.ts +3 -3
  23. package/src/completion/convert-openai-completion-usage.ts +1 -1
  24. package/src/completion/convert-to-openai-completion-prompt.ts +1 -1
  25. package/src/completion/map-openai-finish-reason.ts +1 -1
  26. package/src/completion/openai-completion-api.ts +5 -1
  27. package/src/completion/openai-completion-language-model.ts +6 -6
  28. package/src/completion/openai-completion-options.ts +5 -1
  29. package/src/embedding/openai-embedding-model.ts +3 -3
  30. package/src/embedding/openai-embedding-options.ts +5 -1
  31. package/src/image/openai-image-model-options.ts +123 -0
  32. package/src/image/openai-image-model.ts +43 -80
  33. package/src/index.ts +5 -0
  34. package/src/internal/index.ts +1 -1
  35. package/src/openai-config.ts +1 -1
  36. package/src/openai-provider.ts +9 -9
  37. package/src/responses/convert-openai-responses-usage.ts +1 -1
  38. package/src/responses/convert-to-openai-responses-input.ts +5 -5
  39. package/src/responses/map-openai-responses-finish-reason.ts +1 -1
  40. package/src/responses/openai-responses-api.ts +6 -2
  41. package/src/responses/openai-responses-language-model.ts +35 -35
  42. package/src/responses/openai-responses-options.ts +5 -1
  43. package/src/responses/openai-responses-prepare-tools.ts +4 -4
  44. package/src/responses/openai-responses-provider-metadata.ts +2 -2
  45. package/src/speech/openai-speech-model.ts +4 -4
  46. package/src/speech/openai-speech-options.ts +5 -1
  47. package/src/tool/file-search.ts +1 -1
  48. package/src/tool/mcp.ts +1 -1
  49. package/src/tool/tool-search.ts +2 -2
  50. package/src/transcription/openai-transcription-model.ts +4 -4
  51. package/src/transcription/openai-transcription-options.ts +5 -1
  52. package/src/image/openai-image-options.ts +0 -34
package/dist/index.mjs CHANGED
@@ -315,7 +315,10 @@ function mapOpenAIFinishReason(finishReason) {
315
315
  }
316
316
 
317
317
  // src/chat/openai-chat-api.ts
318
- import { lazySchema, zodSchema } from "@ai-sdk/provider-utils";
318
+ import {
319
+ lazySchema,
320
+ zodSchema
321
+ } from "@ai-sdk/provider-utils";
319
322
  import { z as z2 } from "zod/v4";
320
323
  var openaiChatResponseSchema = lazySchema(
321
324
  () => zodSchema(
@@ -457,7 +460,10 @@ var openaiChatChunkSchema = lazySchema(
457
460
  );
458
461
 
459
462
  // src/chat/openai-chat-options.ts
460
- import { lazySchema as lazySchema2, zodSchema as zodSchema2 } from "@ai-sdk/provider-utils";
463
+ import {
464
+ lazySchema as lazySchema2,
465
+ zodSchema as zodSchema2
466
+ } from "@ai-sdk/provider-utils";
461
467
  import { z as z3 } from "zod/v4";
462
468
  var openaiLanguageModelChatOptions = lazySchema2(
463
469
  () => zodSchema2(
@@ -1279,7 +1285,10 @@ function mapOpenAIFinishReason2(finishReason) {
1279
1285
 
1280
1286
  // src/completion/openai-completion-api.ts
1281
1287
  import { z as z4 } from "zod/v4";
1282
- import { lazySchema as lazySchema3, zodSchema as zodSchema3 } from "@ai-sdk/provider-utils";
1288
+ import {
1289
+ lazySchema as lazySchema3,
1290
+ zodSchema as zodSchema3
1291
+ } from "@ai-sdk/provider-utils";
1283
1292
  var openaiCompletionResponseSchema = lazySchema3(
1284
1293
  () => zodSchema3(
1285
1294
  z4.object({
@@ -1336,7 +1345,10 @@ var openaiCompletionChunkSchema = lazySchema3(
1336
1345
  );
1337
1346
 
1338
1347
  // src/completion/openai-completion-options.ts
1339
- import { lazySchema as lazySchema4, zodSchema as zodSchema4 } from "@ai-sdk/provider-utils";
1348
+ import {
1349
+ lazySchema as lazySchema4,
1350
+ zodSchema as zodSchema4
1351
+ } from "@ai-sdk/provider-utils";
1340
1352
  import { z as z5 } from "zod/v4";
1341
1353
  var openaiLanguageModelCompletionOptions = lazySchema4(
1342
1354
  () => zodSchema4(
@@ -1624,7 +1636,10 @@ import {
1624
1636
  } from "@ai-sdk/provider-utils";
1625
1637
 
1626
1638
  // src/embedding/openai-embedding-options.ts
1627
- import { lazySchema as lazySchema5, zodSchema as zodSchema5 } from "@ai-sdk/provider-utils";
1639
+ import {
1640
+ lazySchema as lazySchema5,
1641
+ zodSchema as zodSchema5
1642
+ } from "@ai-sdk/provider-utils";
1628
1643
  import { z as z6 } from "zod/v4";
1629
1644
  var openaiEmbeddingModelOptions = lazySchema5(
1630
1645
  () => zodSchema5(
@@ -1727,6 +1742,7 @@ import {
1727
1742
  convertToFormData,
1728
1743
  createJsonResponseHandler as createJsonResponseHandler4,
1729
1744
  downloadBlob,
1745
+ parseProviderOptions as parseProviderOptions4,
1730
1746
  postFormDataToApi,
1731
1747
  postJsonToApi as postJsonToApi4
1732
1748
  } from "@ai-sdk/provider-utils";
@@ -1761,7 +1777,12 @@ var openaiImageResponseSchema = lazySchema7(
1761
1777
  )
1762
1778
  );
1763
1779
 
1764
- // src/image/openai-image-options.ts
1780
+ // src/image/openai-image-model-options.ts
1781
+ import {
1782
+ lazySchema as lazySchema8,
1783
+ zodSchema as zodSchema8
1784
+ } from "@ai-sdk/provider-utils";
1785
+ import { z as z9 } from "zod/v4";
1765
1786
  var modelMaxImagesPerCall = {
1766
1787
  "dall-e-3": 1,
1767
1788
  "dall-e-2": 10,
@@ -1783,6 +1804,65 @@ function hasDefaultResponseFormat(modelId) {
1783
1804
  (prefix) => modelId.startsWith(prefix)
1784
1805
  );
1785
1806
  }
1807
+ var baseImageModelOptionsObject = z9.object({
1808
+ /**
1809
+ * Quality of the generated image(s).
1810
+ *
1811
+ * Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
1812
+ */
1813
+ quality: z9.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
1814
+ /**
1815
+ * Background behavior for the generated image(s).
1816
+ *
1817
+ * If `transparent`, the output format must support transparency
1818
+ * (i.e. `png` or `webp`).
1819
+ */
1820
+ background: z9.enum(["transparent", "opaque", "auto"]).optional(),
1821
+ /**
1822
+ * Format in which the generated image(s) are returned.
1823
+ */
1824
+ outputFormat: z9.enum(["png", "jpeg", "webp"]).optional(),
1825
+ /**
1826
+ * Compression level (0-100) for the generated image(s). Applies to the
1827
+ * `jpeg` and `webp` output formats.
1828
+ */
1829
+ outputCompression: z9.number().int().min(0).max(100).optional(),
1830
+ /**
1831
+ * A unique identifier representing your end-user, which can help OpenAI
1832
+ * to monitor and detect abuse.
1833
+ */
1834
+ user: z9.string().optional()
1835
+ });
1836
+ var openaiImageModelOptions = lazySchema8(
1837
+ () => zodSchema8(baseImageModelOptionsObject)
1838
+ );
1839
+ var openaiImageModelGenerationOptions = lazySchema8(
1840
+ () => zodSchema8(
1841
+ baseImageModelOptionsObject.extend({
1842
+ /**
1843
+ * Style of the generated image. `vivid` produces hyper-real and
1844
+ * dramatic images; `natural` produces more subdued, less hyper-real
1845
+ * looking images.
1846
+ */
1847
+ style: z9.enum(["vivid", "natural"]).optional(),
1848
+ /**
1849
+ * Content moderation level for the generated image(s). `low` applies
1850
+ * less restrictive filtering.
1851
+ */
1852
+ moderation: z9.enum(["auto", "low"]).optional()
1853
+ })
1854
+ )
1855
+ );
1856
+ var openaiImageModelEditOptions = lazySchema8(
1857
+ () => zodSchema8(
1858
+ baseImageModelOptionsObject.extend({
1859
+ /**
1860
+ * Fidelity of the output image(s) to the input image(s).
1861
+ */
1862
+ inputFidelity: z9.enum(["high", "low"]).optional()
1863
+ })
1864
+ )
1865
+ );
1786
1866
 
1787
1867
  // src/image/openai-image-model.ts
1788
1868
  var OpenAIImageModel = class {
@@ -1824,6 +1904,11 @@ var OpenAIImageModel = class {
1824
1904
  }
1825
1905
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
1826
1906
  if (files != null) {
1907
+ const openaiOptions2 = (_d = await parseProviderOptions4({
1908
+ provider: "openai",
1909
+ providerOptions,
1910
+ schema: openaiImageModelEditOptions
1911
+ })) != null ? _d : {};
1827
1912
  const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
1828
1913
  url: this.config.url({
1829
1914
  path: "/images/edits",
@@ -1850,7 +1935,12 @@ var OpenAIImageModel = class {
1850
1935
  mask: mask != null ? await fileToBlob(mask) : void 0,
1851
1936
  n,
1852
1937
  size,
1853
- ...(_d = providerOptions.openai) != null ? _d : {}
1938
+ quality: openaiOptions2.quality,
1939
+ background: openaiOptions2.background,
1940
+ output_format: openaiOptions2.outputFormat,
1941
+ output_compression: openaiOptions2.outputCompression,
1942
+ input_fidelity: openaiOptions2.inputFidelity,
1943
+ user: openaiOptions2.user
1854
1944
  }),
1855
1945
  failedResponseHandler: openaiFailedResponseHandler,
1856
1946
  successfulResponseHandler: createJsonResponseHandler4(
@@ -1894,6 +1984,11 @@ var OpenAIImageModel = class {
1894
1984
  }
1895
1985
  };
1896
1986
  }
1987
+ const openaiOptions = (_h = await parseProviderOptions4({
1988
+ provider: "openai",
1989
+ providerOptions,
1990
+ schema: openaiImageModelGenerationOptions
1991
+ })) != null ? _h : {};
1897
1992
  const { value: response, responseHeaders } = await postJsonToApi4({
1898
1993
  url: this.config.url({
1899
1994
  path: "/images/generations",
@@ -1905,7 +2000,13 @@ var OpenAIImageModel = class {
1905
2000
  prompt,
1906
2001
  n,
1907
2002
  size,
1908
- ...(_h = providerOptions.openai) != null ? _h : {},
2003
+ quality: openaiOptions.quality,
2004
+ style: openaiOptions.style,
2005
+ background: openaiOptions.background,
2006
+ moderation: openaiOptions.moderation,
2007
+ output_format: openaiOptions.outputFormat,
2008
+ output_compression: openaiOptions.outputCompression,
2009
+ user: openaiOptions.user,
1909
2010
  ...!hasDefaultResponseFormat(this.modelId) ? { response_format: "b64_json" } : {}
1910
2011
  },
1911
2012
  failedResponseHandler: openaiFailedResponseHandler,
@@ -1980,42 +2081,42 @@ async function fileToBlob(file) {
1980
2081
  // src/tool/apply-patch.ts
1981
2082
  import {
1982
2083
  createProviderToolFactoryWithOutputSchema,
1983
- lazySchema as lazySchema8,
1984
- zodSchema as zodSchema8
2084
+ lazySchema as lazySchema9,
2085
+ zodSchema as zodSchema9
1985
2086
  } from "@ai-sdk/provider-utils";
1986
- import { z as z9 } from "zod/v4";
1987
- var applyPatchInputSchema = lazySchema8(
1988
- () => zodSchema8(
1989
- z9.object({
1990
- callId: z9.string(),
1991
- operation: z9.discriminatedUnion("type", [
1992
- z9.object({
1993
- type: z9.literal("create_file"),
1994
- path: z9.string(),
1995
- diff: z9.string()
2087
+ import { z as z10 } from "zod/v4";
2088
+ var applyPatchInputSchema = lazySchema9(
2089
+ () => zodSchema9(
2090
+ z10.object({
2091
+ callId: z10.string(),
2092
+ operation: z10.discriminatedUnion("type", [
2093
+ z10.object({
2094
+ type: z10.literal("create_file"),
2095
+ path: z10.string(),
2096
+ diff: z10.string()
1996
2097
  }),
1997
- z9.object({
1998
- type: z9.literal("delete_file"),
1999
- path: z9.string()
2098
+ z10.object({
2099
+ type: z10.literal("delete_file"),
2100
+ path: z10.string()
2000
2101
  }),
2001
- z9.object({
2002
- type: z9.literal("update_file"),
2003
- path: z9.string(),
2004
- diff: z9.string()
2102
+ z10.object({
2103
+ type: z10.literal("update_file"),
2104
+ path: z10.string(),
2105
+ diff: z10.string()
2005
2106
  })
2006
2107
  ])
2007
2108
  })
2008
2109
  )
2009
2110
  );
2010
- var applyPatchOutputSchema = lazySchema8(
2011
- () => zodSchema8(
2012
- z9.object({
2013
- status: z9.enum(["completed", "failed"]),
2014
- output: z9.string().optional()
2111
+ var applyPatchOutputSchema = lazySchema9(
2112
+ () => zodSchema9(
2113
+ z10.object({
2114
+ status: z10.enum(["completed", "failed"]),
2115
+ output: z10.string().optional()
2015
2116
  })
2016
2117
  )
2017
2118
  );
2018
- var applyPatchArgsSchema = lazySchema8(() => zodSchema8(z9.object({})));
2119
+ var applyPatchArgsSchema = lazySchema9(() => zodSchema9(z10.object({})));
2019
2120
  var applyPatchToolFactory = createProviderToolFactoryWithOutputSchema({
2020
2121
  id: "openai.apply_patch",
2021
2122
  inputSchema: applyPatchInputSchema,
@@ -2026,37 +2127,37 @@ var applyPatch = applyPatchToolFactory;
2026
2127
  // src/tool/code-interpreter.ts
2027
2128
  import {
2028
2129
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema2,
2029
- lazySchema as lazySchema9,
2030
- zodSchema as zodSchema9
2130
+ lazySchema as lazySchema10,
2131
+ zodSchema as zodSchema10
2031
2132
  } from "@ai-sdk/provider-utils";
2032
- import { z as z10 } from "zod/v4";
2033
- var codeInterpreterInputSchema = lazySchema9(
2034
- () => zodSchema9(
2035
- z10.object({
2036
- code: z10.string().nullish(),
2037
- containerId: z10.string()
2133
+ import { z as z11 } from "zod/v4";
2134
+ var codeInterpreterInputSchema = lazySchema10(
2135
+ () => zodSchema10(
2136
+ z11.object({
2137
+ code: z11.string().nullish(),
2138
+ containerId: z11.string()
2038
2139
  })
2039
2140
  )
2040
2141
  );
2041
- var codeInterpreterOutputSchema = lazySchema9(
2042
- () => zodSchema9(
2043
- z10.object({
2044
- outputs: z10.array(
2045
- z10.discriminatedUnion("type", [
2046
- z10.object({ type: z10.literal("logs"), logs: z10.string() }),
2047
- z10.object({ type: z10.literal("image"), url: z10.string() })
2142
+ var codeInterpreterOutputSchema = lazySchema10(
2143
+ () => zodSchema10(
2144
+ z11.object({
2145
+ outputs: z11.array(
2146
+ z11.discriminatedUnion("type", [
2147
+ z11.object({ type: z11.literal("logs"), logs: z11.string() }),
2148
+ z11.object({ type: z11.literal("image"), url: z11.string() })
2048
2149
  ])
2049
2150
  ).nullish()
2050
2151
  })
2051
2152
  )
2052
2153
  );
2053
- var codeInterpreterArgsSchema = lazySchema9(
2054
- () => zodSchema9(
2055
- z10.object({
2056
- container: z10.union([
2057
- z10.string(),
2058
- z10.object({
2059
- fileIds: z10.array(z10.string()).optional()
2154
+ var codeInterpreterArgsSchema = lazySchema10(
2155
+ () => zodSchema10(
2156
+ z11.object({
2157
+ container: z11.union([
2158
+ z11.string(),
2159
+ z11.object({
2160
+ fileIds: z11.array(z11.string()).optional()
2060
2161
  })
2061
2162
  ]).optional()
2062
2163
  })
@@ -2074,29 +2175,29 @@ var codeInterpreter = (args = {}) => {
2074
2175
  // src/tool/custom.ts
2075
2176
  import {
2076
2177
  createProviderToolFactory,
2077
- lazySchema as lazySchema10,
2078
- zodSchema as zodSchema10
2178
+ lazySchema as lazySchema11,
2179
+ zodSchema as zodSchema11
2079
2180
  } from "@ai-sdk/provider-utils";
2080
- import { z as z11 } from "zod/v4";
2081
- var customArgsSchema = lazySchema10(
2082
- () => zodSchema10(
2083
- z11.object({
2084
- name: z11.string(),
2085
- description: z11.string().optional(),
2086
- format: z11.union([
2087
- z11.object({
2088
- type: z11.literal("grammar"),
2089
- syntax: z11.enum(["regex", "lark"]),
2090
- definition: z11.string()
2181
+ import { z as z12 } from "zod/v4";
2182
+ var customArgsSchema = lazySchema11(
2183
+ () => zodSchema11(
2184
+ z12.object({
2185
+ name: z12.string(),
2186
+ description: z12.string().optional(),
2187
+ format: z12.union([
2188
+ z12.object({
2189
+ type: z12.literal("grammar"),
2190
+ syntax: z12.enum(["regex", "lark"]),
2191
+ definition: z12.string()
2091
2192
  }),
2092
- z11.object({
2093
- type: z11.literal("text")
2193
+ z12.object({
2194
+ type: z12.literal("text")
2094
2195
  })
2095
2196
  ]).optional()
2096
2197
  })
2097
2198
  )
2098
2199
  );
2099
- var customInputSchema = lazySchema10(() => zodSchema10(z11.string()));
2200
+ var customInputSchema = lazySchema11(() => zodSchema11(z12.string()));
2100
2201
  var customToolFactory = createProviderToolFactory({
2101
2202
  id: "openai.custom",
2102
2203
  inputSchema: customInputSchema
@@ -2106,45 +2207,45 @@ var customTool = (args) => customToolFactory(args);
2106
2207
  // src/tool/file-search.ts
2107
2208
  import {
2108
2209
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema3,
2109
- lazySchema as lazySchema11,
2110
- zodSchema as zodSchema11
2210
+ lazySchema as lazySchema12,
2211
+ zodSchema as zodSchema12
2111
2212
  } from "@ai-sdk/provider-utils";
2112
- import { z as z12 } from "zod/v4";
2113
- var comparisonFilterSchema = z12.object({
2114
- key: z12.string(),
2115
- type: z12.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
2116
- value: z12.union([z12.string(), z12.number(), z12.boolean(), z12.array(z12.string())])
2213
+ import { z as z13 } from "zod/v4";
2214
+ var comparisonFilterSchema = z13.object({
2215
+ key: z13.string(),
2216
+ type: z13.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
2217
+ value: z13.union([z13.string(), z13.number(), z13.boolean(), z13.array(z13.string())])
2117
2218
  });
2118
- var compoundFilterSchema = z12.object({
2119
- type: z12.enum(["and", "or"]),
2120
- filters: z12.array(
2121
- z12.union([comparisonFilterSchema, z12.lazy(() => compoundFilterSchema)])
2219
+ var compoundFilterSchema = z13.object({
2220
+ type: z13.enum(["and", "or"]),
2221
+ filters: z13.array(
2222
+ z13.union([comparisonFilterSchema, z13.lazy(() => compoundFilterSchema)])
2122
2223
  )
2123
2224
  });
2124
- var fileSearchArgsSchema = lazySchema11(
2125
- () => zodSchema11(
2126
- z12.object({
2127
- vectorStoreIds: z12.array(z12.string()),
2128
- maxNumResults: z12.number().optional(),
2129
- ranking: z12.object({
2130
- ranker: z12.string().optional(),
2131
- scoreThreshold: z12.number().optional()
2225
+ var fileSearchArgsSchema = lazySchema12(
2226
+ () => zodSchema12(
2227
+ z13.object({
2228
+ vectorStoreIds: z13.array(z13.string()),
2229
+ maxNumResults: z13.number().optional(),
2230
+ ranking: z13.object({
2231
+ ranker: z13.string().optional(),
2232
+ scoreThreshold: z13.number().optional()
2132
2233
  }).optional(),
2133
- filters: z12.union([comparisonFilterSchema, compoundFilterSchema]).optional()
2234
+ filters: z13.union([comparisonFilterSchema, compoundFilterSchema]).optional()
2134
2235
  })
2135
2236
  )
2136
2237
  );
2137
- var fileSearchOutputSchema = lazySchema11(
2138
- () => zodSchema11(
2139
- z12.object({
2140
- queries: z12.array(z12.string()),
2141
- results: z12.array(
2142
- z12.object({
2143
- attributes: z12.record(z12.string(), z12.unknown()),
2144
- fileId: z12.string(),
2145
- filename: z12.string(),
2146
- score: z12.number(),
2147
- text: z12.string()
2238
+ var fileSearchOutputSchema = lazySchema12(
2239
+ () => zodSchema12(
2240
+ z13.object({
2241
+ queries: z13.array(z13.string()),
2242
+ results: z13.array(
2243
+ z13.object({
2244
+ attributes: z13.record(z13.string(), z13.unknown()),
2245
+ fileId: z13.string(),
2246
+ filename: z13.string(),
2247
+ score: z13.number(),
2248
+ text: z13.string()
2148
2249
  })
2149
2250
  ).nullable()
2150
2251
  })
@@ -2152,39 +2253,39 @@ var fileSearchOutputSchema = lazySchema11(
2152
2253
  );
2153
2254
  var fileSearch = createProviderToolFactoryWithOutputSchema3({
2154
2255
  id: "openai.file_search",
2155
- inputSchema: z12.object({}),
2256
+ inputSchema: z13.object({}),
2156
2257
  outputSchema: fileSearchOutputSchema
2157
2258
  });
2158
2259
 
2159
2260
  // src/tool/image-generation.ts
2160
2261
  import {
2161
2262
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema4,
2162
- lazySchema as lazySchema12,
2163
- zodSchema as zodSchema12
2263
+ lazySchema as lazySchema13,
2264
+ zodSchema as zodSchema13
2164
2265
  } from "@ai-sdk/provider-utils";
2165
- import { z as z13 } from "zod/v4";
2166
- var imageGenerationArgsSchema = lazySchema12(
2167
- () => zodSchema12(
2168
- z13.object({
2169
- background: z13.enum(["auto", "opaque", "transparent"]).optional(),
2170
- inputFidelity: z13.enum(["low", "high"]).optional(),
2171
- inputImageMask: z13.object({
2172
- fileId: z13.string().optional(),
2173
- imageUrl: z13.string().optional()
2266
+ import { z as z14 } from "zod/v4";
2267
+ var imageGenerationArgsSchema = lazySchema13(
2268
+ () => zodSchema13(
2269
+ z14.object({
2270
+ background: z14.enum(["auto", "opaque", "transparent"]).optional(),
2271
+ inputFidelity: z14.enum(["low", "high"]).optional(),
2272
+ inputImageMask: z14.object({
2273
+ fileId: z14.string().optional(),
2274
+ imageUrl: z14.string().optional()
2174
2275
  }).optional(),
2175
- model: z13.string().optional(),
2176
- moderation: z13.enum(["auto"]).optional(),
2177
- outputCompression: z13.number().int().min(0).max(100).optional(),
2178
- outputFormat: z13.enum(["png", "jpeg", "webp"]).optional(),
2179
- partialImages: z13.number().int().min(0).max(3).optional(),
2180
- quality: z13.enum(["auto", "low", "medium", "high"]).optional(),
2181
- size: z13.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
2276
+ model: z14.string().optional(),
2277
+ moderation: z14.enum(["auto"]).optional(),
2278
+ outputCompression: z14.number().int().min(0).max(100).optional(),
2279
+ outputFormat: z14.enum(["png", "jpeg", "webp"]).optional(),
2280
+ partialImages: z14.number().int().min(0).max(3).optional(),
2281
+ quality: z14.enum(["auto", "low", "medium", "high"]).optional(),
2282
+ size: z14.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
2182
2283
  }).strict()
2183
2284
  )
2184
2285
  );
2185
- var imageGenerationInputSchema = lazySchema12(() => zodSchema12(z13.object({})));
2186
- var imageGenerationOutputSchema = lazySchema12(
2187
- () => zodSchema12(z13.object({ result: z13.string() }))
2286
+ var imageGenerationInputSchema = lazySchema13(() => zodSchema13(z14.object({})));
2287
+ var imageGenerationOutputSchema = lazySchema13(
2288
+ () => zodSchema13(z14.object({ result: z14.string() }))
2188
2289
  );
2189
2290
  var imageGenerationToolFactory = createProviderToolFactoryWithOutputSchema4({
2190
2291
  id: "openai.image_generation",
@@ -2198,26 +2299,26 @@ var imageGeneration = (args = {}) => {
2198
2299
  // src/tool/local-shell.ts
2199
2300
  import {
2200
2301
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema5,
2201
- lazySchema as lazySchema13,
2202
- zodSchema as zodSchema13
2302
+ lazySchema as lazySchema14,
2303
+ zodSchema as zodSchema14
2203
2304
  } from "@ai-sdk/provider-utils";
2204
- import { z as z14 } from "zod/v4";
2205
- var localShellInputSchema = lazySchema13(
2206
- () => zodSchema13(
2207
- z14.object({
2208
- action: z14.object({
2209
- type: z14.literal("exec"),
2210
- command: z14.array(z14.string()),
2211
- timeoutMs: z14.number().optional(),
2212
- user: z14.string().optional(),
2213
- workingDirectory: z14.string().optional(),
2214
- env: z14.record(z14.string(), z14.string()).optional()
2305
+ import { z as z15 } from "zod/v4";
2306
+ var localShellInputSchema = lazySchema14(
2307
+ () => zodSchema14(
2308
+ z15.object({
2309
+ action: z15.object({
2310
+ type: z15.literal("exec"),
2311
+ command: z15.array(z15.string()),
2312
+ timeoutMs: z15.number().optional(),
2313
+ user: z15.string().optional(),
2314
+ workingDirectory: z15.string().optional(),
2315
+ env: z15.record(z15.string(), z15.string()).optional()
2215
2316
  })
2216
2317
  })
2217
2318
  )
2218
2319
  );
2219
- var localShellOutputSchema = lazySchema13(
2220
- () => zodSchema13(z14.object({ output: z14.string() }))
2320
+ var localShellOutputSchema = lazySchema14(
2321
+ () => zodSchema14(z15.object({ output: z15.string() }))
2221
2322
  );
2222
2323
  var localShell = createProviderToolFactoryWithOutputSchema5({
2223
2324
  id: "openai.local_shell",
@@ -2228,91 +2329,91 @@ var localShell = createProviderToolFactoryWithOutputSchema5({
2228
2329
  // src/tool/shell.ts
2229
2330
  import {
2230
2331
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
2231
- lazySchema as lazySchema14,
2232
- zodSchema as zodSchema14
2332
+ lazySchema as lazySchema15,
2333
+ zodSchema as zodSchema15
2233
2334
  } from "@ai-sdk/provider-utils";
2234
- import { z as z15 } from "zod/v4";
2235
- var shellInputSchema = lazySchema14(
2236
- () => zodSchema14(
2237
- z15.object({
2238
- action: z15.object({
2239
- commands: z15.array(z15.string()),
2240
- timeoutMs: z15.number().optional(),
2241
- maxOutputLength: z15.number().optional()
2335
+ import { z as z16 } from "zod/v4";
2336
+ var shellInputSchema = lazySchema15(
2337
+ () => zodSchema15(
2338
+ z16.object({
2339
+ action: z16.object({
2340
+ commands: z16.array(z16.string()),
2341
+ timeoutMs: z16.number().optional(),
2342
+ maxOutputLength: z16.number().optional()
2242
2343
  })
2243
2344
  })
2244
2345
  )
2245
2346
  );
2246
- var shellOutputSchema = lazySchema14(
2247
- () => zodSchema14(
2248
- z15.object({
2249
- output: z15.array(
2250
- z15.object({
2251
- stdout: z15.string(),
2252
- stderr: z15.string(),
2253
- outcome: z15.discriminatedUnion("type", [
2254
- z15.object({ type: z15.literal("timeout") }),
2255
- z15.object({ type: z15.literal("exit"), exitCode: z15.number() })
2347
+ var shellOutputSchema = lazySchema15(
2348
+ () => zodSchema15(
2349
+ z16.object({
2350
+ output: z16.array(
2351
+ z16.object({
2352
+ stdout: z16.string(),
2353
+ stderr: z16.string(),
2354
+ outcome: z16.discriminatedUnion("type", [
2355
+ z16.object({ type: z16.literal("timeout") }),
2356
+ z16.object({ type: z16.literal("exit"), exitCode: z16.number() })
2256
2357
  ])
2257
2358
  })
2258
2359
  )
2259
2360
  })
2260
2361
  )
2261
2362
  );
2262
- var shellSkillsSchema = z15.array(
2263
- z15.discriminatedUnion("type", [
2264
- z15.object({
2265
- type: z15.literal("skillReference"),
2266
- skillId: z15.string(),
2267
- version: z15.string().optional()
2363
+ var shellSkillsSchema = z16.array(
2364
+ z16.discriminatedUnion("type", [
2365
+ z16.object({
2366
+ type: z16.literal("skillReference"),
2367
+ skillId: z16.string(),
2368
+ version: z16.string().optional()
2268
2369
  }),
2269
- z15.object({
2270
- type: z15.literal("inline"),
2271
- name: z15.string(),
2272
- description: z15.string(),
2273
- source: z15.object({
2274
- type: z15.literal("base64"),
2275
- mediaType: z15.literal("application/zip"),
2276
- data: z15.string()
2370
+ z16.object({
2371
+ type: z16.literal("inline"),
2372
+ name: z16.string(),
2373
+ description: z16.string(),
2374
+ source: z16.object({
2375
+ type: z16.literal("base64"),
2376
+ mediaType: z16.literal("application/zip"),
2377
+ data: z16.string()
2277
2378
  })
2278
2379
  })
2279
2380
  ])
2280
2381
  ).optional();
2281
- var shellArgsSchema = lazySchema14(
2282
- () => zodSchema14(
2283
- z15.object({
2284
- environment: z15.union([
2285
- z15.object({
2286
- type: z15.literal("containerAuto"),
2287
- fileIds: z15.array(z15.string()).optional(),
2288
- memoryLimit: z15.enum(["1g", "4g", "16g", "64g"]).optional(),
2289
- networkPolicy: z15.discriminatedUnion("type", [
2290
- z15.object({ type: z15.literal("disabled") }),
2291
- z15.object({
2292
- type: z15.literal("allowlist"),
2293
- allowedDomains: z15.array(z15.string()),
2294
- domainSecrets: z15.array(
2295
- z15.object({
2296
- domain: z15.string(),
2297
- name: z15.string(),
2298
- value: z15.string()
2382
+ var shellArgsSchema = lazySchema15(
2383
+ () => zodSchema15(
2384
+ z16.object({
2385
+ environment: z16.union([
2386
+ z16.object({
2387
+ type: z16.literal("containerAuto"),
2388
+ fileIds: z16.array(z16.string()).optional(),
2389
+ memoryLimit: z16.enum(["1g", "4g", "16g", "64g"]).optional(),
2390
+ networkPolicy: z16.discriminatedUnion("type", [
2391
+ z16.object({ type: z16.literal("disabled") }),
2392
+ z16.object({
2393
+ type: z16.literal("allowlist"),
2394
+ allowedDomains: z16.array(z16.string()),
2395
+ domainSecrets: z16.array(
2396
+ z16.object({
2397
+ domain: z16.string(),
2398
+ name: z16.string(),
2399
+ value: z16.string()
2299
2400
  })
2300
2401
  ).optional()
2301
2402
  })
2302
2403
  ]).optional(),
2303
2404
  skills: shellSkillsSchema
2304
2405
  }),
2305
- z15.object({
2306
- type: z15.literal("containerReference"),
2307
- containerId: z15.string()
2406
+ z16.object({
2407
+ type: z16.literal("containerReference"),
2408
+ containerId: z16.string()
2308
2409
  }),
2309
- z15.object({
2310
- type: z15.literal("local").optional(),
2311
- skills: z15.array(
2312
- z15.object({
2313
- name: z15.string(),
2314
- description: z15.string(),
2315
- path: z15.string()
2410
+ z16.object({
2411
+ type: z16.literal("local").optional(),
2412
+ skills: z16.array(
2413
+ z16.object({
2414
+ name: z16.string(),
2415
+ description: z16.string(),
2416
+ path: z16.string()
2316
2417
  })
2317
2418
  ).optional()
2318
2419
  })
@@ -2329,31 +2430,31 @@ var shell = createProviderToolFactoryWithOutputSchema6({
2329
2430
  // src/tool/tool-search.ts
2330
2431
  import {
2331
2432
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
2332
- lazySchema as lazySchema15,
2333
- zodSchema as zodSchema15
2433
+ lazySchema as lazySchema16,
2434
+ zodSchema as zodSchema16
2334
2435
  } from "@ai-sdk/provider-utils";
2335
- import { z as z16 } from "zod/v4";
2336
- var toolSearchArgsSchema = lazySchema15(
2337
- () => zodSchema15(
2338
- z16.object({
2339
- execution: z16.enum(["server", "client"]).optional(),
2340
- description: z16.string().optional(),
2341
- parameters: z16.record(z16.string(), z16.unknown()).optional()
2436
+ import { z as z17 } from "zod/v4";
2437
+ var toolSearchArgsSchema = lazySchema16(
2438
+ () => zodSchema16(
2439
+ z17.object({
2440
+ execution: z17.enum(["server", "client"]).optional(),
2441
+ description: z17.string().optional(),
2442
+ parameters: z17.record(z17.string(), z17.unknown()).optional()
2342
2443
  })
2343
2444
  )
2344
2445
  );
2345
- var toolSearchInputSchema = lazySchema15(
2346
- () => zodSchema15(
2347
- z16.object({
2348
- arguments: z16.unknown().optional(),
2349
- call_id: z16.string().nullish()
2446
+ var toolSearchInputSchema = lazySchema16(
2447
+ () => zodSchema16(
2448
+ z17.object({
2449
+ arguments: z17.unknown().optional(),
2450
+ call_id: z17.string().nullish()
2350
2451
  })
2351
2452
  )
2352
2453
  );
2353
- var toolSearchOutputSchema = lazySchema15(
2354
- () => zodSchema15(
2355
- z16.object({
2356
- tools: z16.array(z16.record(z16.string(), z16.unknown()))
2454
+ var toolSearchOutputSchema = lazySchema16(
2455
+ () => zodSchema16(
2456
+ z17.object({
2457
+ tools: z17.array(z17.record(z17.string(), z17.unknown()))
2357
2458
  })
2358
2459
  )
2359
2460
  );
@@ -2367,71 +2468,15 @@ var toolSearch = (args = {}) => toolSearchToolFactory(args);
2367
2468
  // src/tool/web-search.ts
2368
2469
  import {
2369
2470
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,
2370
- lazySchema as lazySchema16,
2371
- zodSchema as zodSchema16
2372
- } from "@ai-sdk/provider-utils";
2373
- import { z as z17 } from "zod/v4";
2374
- var webSearchArgsSchema = lazySchema16(
2375
- () => zodSchema16(
2376
- z17.object({
2377
- externalWebAccess: z17.boolean().optional(),
2378
- filters: z17.object({ allowedDomains: z17.array(z17.string()).optional() }).optional(),
2379
- searchContextSize: z17.enum(["low", "medium", "high"]).optional(),
2380
- userLocation: z17.object({
2381
- type: z17.literal("approximate"),
2382
- country: z17.string().optional(),
2383
- city: z17.string().optional(),
2384
- region: z17.string().optional(),
2385
- timezone: z17.string().optional()
2386
- }).optional()
2387
- })
2388
- )
2389
- );
2390
- var webSearchInputSchema = lazySchema16(() => zodSchema16(z17.object({})));
2391
- var webSearchOutputSchema = lazySchema16(
2392
- () => zodSchema16(
2393
- z17.object({
2394
- action: z17.discriminatedUnion("type", [
2395
- z17.object({
2396
- type: z17.literal("search"),
2397
- query: z17.string().optional()
2398
- }),
2399
- z17.object({
2400
- type: z17.literal("openPage"),
2401
- url: z17.string().nullish()
2402
- }),
2403
- z17.object({
2404
- type: z17.literal("findInPage"),
2405
- url: z17.string().nullish(),
2406
- pattern: z17.string().nullish()
2407
- })
2408
- ]).optional(),
2409
- sources: z17.array(
2410
- z17.discriminatedUnion("type", [
2411
- z17.object({ type: z17.literal("url"), url: z17.string() }),
2412
- z17.object({ type: z17.literal("api"), name: z17.string() })
2413
- ])
2414
- ).optional()
2415
- })
2416
- )
2417
- );
2418
- var webSearchToolFactory = createProviderToolFactoryWithOutputSchema8({
2419
- id: "openai.web_search",
2420
- inputSchema: webSearchInputSchema,
2421
- outputSchema: webSearchOutputSchema
2422
- });
2423
- var webSearch = (args = {}) => webSearchToolFactory(args);
2424
-
2425
- // src/tool/web-search-preview.ts
2426
- import {
2427
- createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
2428
2471
  lazySchema as lazySchema17,
2429
2472
  zodSchema as zodSchema17
2430
2473
  } from "@ai-sdk/provider-utils";
2431
2474
  import { z as z18 } from "zod/v4";
2432
- var webSearchPreviewArgsSchema = lazySchema17(
2475
+ var webSearchArgsSchema = lazySchema17(
2433
2476
  () => zodSchema17(
2434
2477
  z18.object({
2478
+ externalWebAccess: z18.boolean().optional(),
2479
+ filters: z18.object({ allowedDomains: z18.array(z18.string()).optional() }).optional(),
2435
2480
  searchContextSize: z18.enum(["low", "medium", "high"]).optional(),
2436
2481
  userLocation: z18.object({
2437
2482
  type: z18.literal("approximate"),
@@ -2443,10 +2488,8 @@ var webSearchPreviewArgsSchema = lazySchema17(
2443
2488
  })
2444
2489
  )
2445
2490
  );
2446
- var webSearchPreviewInputSchema = lazySchema17(
2447
- () => zodSchema17(z18.object({}))
2448
- );
2449
- var webSearchPreviewOutputSchema = lazySchema17(
2491
+ var webSearchInputSchema = lazySchema17(() => zodSchema17(z18.object({})));
2492
+ var webSearchOutputSchema = lazySchema17(
2450
2493
  () => zodSchema17(
2451
2494
  z18.object({
2452
2495
  action: z18.discriminatedUnion("type", [
@@ -2463,6 +2506,64 @@ var webSearchPreviewOutputSchema = lazySchema17(
2463
2506
  url: z18.string().nullish(),
2464
2507
  pattern: z18.string().nullish()
2465
2508
  })
2509
+ ]).optional(),
2510
+ sources: z18.array(
2511
+ z18.discriminatedUnion("type", [
2512
+ z18.object({ type: z18.literal("url"), url: z18.string() }),
2513
+ z18.object({ type: z18.literal("api"), name: z18.string() })
2514
+ ])
2515
+ ).optional()
2516
+ })
2517
+ )
2518
+ );
2519
+ var webSearchToolFactory = createProviderToolFactoryWithOutputSchema8({
2520
+ id: "openai.web_search",
2521
+ inputSchema: webSearchInputSchema,
2522
+ outputSchema: webSearchOutputSchema
2523
+ });
2524
+ var webSearch = (args = {}) => webSearchToolFactory(args);
2525
+
2526
+ // src/tool/web-search-preview.ts
2527
+ import {
2528
+ createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
2529
+ lazySchema as lazySchema18,
2530
+ zodSchema as zodSchema18
2531
+ } from "@ai-sdk/provider-utils";
2532
+ import { z as z19 } from "zod/v4";
2533
+ var webSearchPreviewArgsSchema = lazySchema18(
2534
+ () => zodSchema18(
2535
+ z19.object({
2536
+ searchContextSize: z19.enum(["low", "medium", "high"]).optional(),
2537
+ userLocation: z19.object({
2538
+ type: z19.literal("approximate"),
2539
+ country: z19.string().optional(),
2540
+ city: z19.string().optional(),
2541
+ region: z19.string().optional(),
2542
+ timezone: z19.string().optional()
2543
+ }).optional()
2544
+ })
2545
+ )
2546
+ );
2547
+ var webSearchPreviewInputSchema = lazySchema18(
2548
+ () => zodSchema18(z19.object({}))
2549
+ );
2550
+ var webSearchPreviewOutputSchema = lazySchema18(
2551
+ () => zodSchema18(
2552
+ z19.object({
2553
+ action: z19.discriminatedUnion("type", [
2554
+ z19.object({
2555
+ type: z19.literal("search"),
2556
+ query: z19.string().optional()
2557
+ }),
2558
+ z19.object({
2559
+ type: z19.literal("openPage"),
2560
+ url: z19.string().nullish()
2561
+ }),
2562
+ z19.object({
2563
+ type: z19.literal("findInPage"),
2564
+ url: z19.string().nullish(),
2565
+ pattern: z19.string().nullish()
2566
+ })
2466
2567
  ]).optional()
2467
2568
  })
2468
2569
  )
@@ -2476,60 +2577,60 @@ var webSearchPreview = createProviderToolFactoryWithOutputSchema9({
2476
2577
  // src/tool/mcp.ts
2477
2578
  import {
2478
2579
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema10,
2479
- lazySchema as lazySchema18,
2480
- zodSchema as zodSchema18
2580
+ lazySchema as lazySchema19,
2581
+ zodSchema as zodSchema19
2481
2582
  } from "@ai-sdk/provider-utils";
2482
- import { z as z19 } from "zod/v4";
2483
- var jsonValueSchema = z19.lazy(
2484
- () => z19.union([
2485
- z19.string(),
2486
- z19.number(),
2487
- z19.boolean(),
2488
- z19.null(),
2489
- z19.array(jsonValueSchema),
2490
- z19.record(z19.string(), jsonValueSchema)
2583
+ import { z as z20 } from "zod/v4";
2584
+ var jsonValueSchema = z20.lazy(
2585
+ () => z20.union([
2586
+ z20.string(),
2587
+ z20.number(),
2588
+ z20.boolean(),
2589
+ z20.null(),
2590
+ z20.array(jsonValueSchema),
2591
+ z20.record(z20.string(), jsonValueSchema)
2491
2592
  ])
2492
2593
  );
2493
- var mcpArgsSchema = lazySchema18(
2494
- () => zodSchema18(
2495
- z19.object({
2496
- serverLabel: z19.string(),
2497
- allowedTools: z19.union([
2498
- z19.array(z19.string()),
2499
- z19.object({
2500
- readOnly: z19.boolean().optional(),
2501
- toolNames: z19.array(z19.string()).optional()
2594
+ var mcpArgsSchema = lazySchema19(
2595
+ () => zodSchema19(
2596
+ z20.object({
2597
+ serverLabel: z20.string(),
2598
+ allowedTools: z20.union([
2599
+ z20.array(z20.string()),
2600
+ z20.object({
2601
+ readOnly: z20.boolean().optional(),
2602
+ toolNames: z20.array(z20.string()).optional()
2502
2603
  })
2503
2604
  ]).optional(),
2504
- authorization: z19.string().optional(),
2505
- connectorId: z19.string().optional(),
2506
- headers: z19.record(z19.string(), z19.string()).optional(),
2507
- requireApproval: z19.union([
2508
- z19.enum(["always", "never"]),
2509
- z19.object({
2510
- never: z19.object({
2511
- toolNames: z19.array(z19.string()).optional()
2605
+ authorization: z20.string().optional(),
2606
+ connectorId: z20.string().optional(),
2607
+ headers: z20.record(z20.string(), z20.string()).optional(),
2608
+ requireApproval: z20.union([
2609
+ z20.enum(["always", "never"]),
2610
+ z20.object({
2611
+ never: z20.object({
2612
+ toolNames: z20.array(z20.string()).optional()
2512
2613
  }).optional()
2513
2614
  })
2514
2615
  ]).optional(),
2515
- serverDescription: z19.string().optional(),
2516
- serverUrl: z19.string().optional()
2616
+ serverDescription: z20.string().optional(),
2617
+ serverUrl: z20.string().optional()
2517
2618
  }).refine(
2518
2619
  (v) => v.serverUrl != null || v.connectorId != null,
2519
2620
  "One of serverUrl or connectorId must be provided."
2520
2621
  )
2521
2622
  )
2522
2623
  );
2523
- var mcpInputSchema = lazySchema18(() => zodSchema18(z19.object({})));
2524
- var mcpOutputSchema = lazySchema18(
2525
- () => zodSchema18(
2526
- z19.object({
2527
- type: z19.literal("call"),
2528
- serverLabel: z19.string(),
2529
- name: z19.string(),
2530
- arguments: z19.string(),
2531
- output: z19.string().nullish(),
2532
- error: z19.union([z19.string(), jsonValueSchema]).optional()
2624
+ var mcpInputSchema = lazySchema19(() => zodSchema19(z20.object({})));
2625
+ var mcpOutputSchema = lazySchema19(
2626
+ () => zodSchema19(
2627
+ z20.object({
2628
+ type: z20.literal("call"),
2629
+ serverLabel: z20.string(),
2630
+ name: z20.string(),
2631
+ arguments: z20.string(),
2632
+ output: z20.string().nullish(),
2633
+ error: z20.union([z20.string(), jsonValueSchema]).optional()
2533
2634
  })
2534
2635
  )
2535
2636
  );
@@ -2668,7 +2769,7 @@ import {
2668
2769
  createJsonResponseHandler as createJsonResponseHandler5,
2669
2770
  createToolNameMapping,
2670
2771
  generateId as generateId2,
2671
- parseProviderOptions as parseProviderOptions5,
2772
+ parseProviderOptions as parseProviderOptions6,
2672
2773
  postJsonToApi as postJsonToApi5
2673
2774
  } from "@ai-sdk/provider-utils";
2674
2775
 
@@ -2719,10 +2820,10 @@ import {
2719
2820
  convertToBase64 as convertToBase642,
2720
2821
  isNonNullable,
2721
2822
  parseJSON,
2722
- parseProviderOptions as parseProviderOptions4,
2823
+ parseProviderOptions as parseProviderOptions5,
2723
2824
  validateTypes
2724
2825
  } from "@ai-sdk/provider-utils";
2725
- import { z as z20 } from "zod/v4";
2826
+ import { z as z21 } from "zod/v4";
2726
2827
  function serializeToolCallArguments2(input) {
2727
2828
  return JSON.stringify(input === void 0 ? {} : input);
2728
2829
  }
@@ -3018,7 +3119,7 @@ async function convertToOpenAIResponsesInput({
3018
3119
  break;
3019
3120
  }
3020
3121
  case "reasoning": {
3021
- const providerOptions = await parseProviderOptions4({
3122
+ const providerOptions = await parseProviderOptions5({
3022
3123
  provider: providerOptionsName,
3023
3124
  providerOptions: part.providerOptions,
3024
3125
  schema: openaiResponsesReasoningProviderOptionsSchema
@@ -3326,9 +3427,9 @@ async function convertToOpenAIResponsesInput({
3326
3427
  }
3327
3428
  return { input, warnings };
3328
3429
  }
3329
- var openaiResponsesReasoningProviderOptionsSchema = z20.object({
3330
- itemId: z20.string().nullish(),
3331
- reasoningEncryptedContent: z20.string().nullish()
3430
+ var openaiResponsesReasoningProviderOptionsSchema = z21.object({
3431
+ itemId: z21.string().nullish(),
3432
+ reasoningEncryptedContent: z21.string().nullish()
3332
3433
  });
3333
3434
 
3334
3435
  // src/responses/map-openai-responses-finish-reason.ts
@@ -3350,542 +3451,545 @@ function mapOpenAIResponseFinishReason({
3350
3451
  }
3351
3452
 
3352
3453
  // src/responses/openai-responses-api.ts
3353
- import { lazySchema as lazySchema19, zodSchema as zodSchema19 } from "@ai-sdk/provider-utils";
3354
- import { z as z21 } from "zod/v4";
3355
- var jsonValueSchema2 = z21.lazy(
3356
- () => z21.union([
3357
- z21.string(),
3358
- z21.number(),
3359
- z21.boolean(),
3360
- z21.null(),
3361
- z21.array(jsonValueSchema2),
3362
- z21.record(z21.string(), jsonValueSchema2.optional())
3454
+ import {
3455
+ lazySchema as lazySchema20,
3456
+ zodSchema as zodSchema20
3457
+ } from "@ai-sdk/provider-utils";
3458
+ import { z as z22 } from "zod/v4";
3459
+ var jsonValueSchema2 = z22.lazy(
3460
+ () => z22.union([
3461
+ z22.string(),
3462
+ z22.number(),
3463
+ z22.boolean(),
3464
+ z22.null(),
3465
+ z22.array(jsonValueSchema2),
3466
+ z22.record(z22.string(), jsonValueSchema2.optional())
3363
3467
  ])
3364
3468
  );
3365
- var openaiResponsesChunkSchema = lazySchema19(
3366
- () => zodSchema19(
3367
- z21.union([
3368
- z21.object({
3369
- type: z21.literal("response.output_text.delta"),
3370
- item_id: z21.string(),
3371
- delta: z21.string(),
3372
- logprobs: z21.array(
3373
- z21.object({
3374
- token: z21.string(),
3375
- logprob: z21.number(),
3376
- top_logprobs: z21.array(
3377
- z21.object({
3378
- token: z21.string(),
3379
- logprob: z21.number()
3469
+ var openaiResponsesChunkSchema = lazySchema20(
3470
+ () => zodSchema20(
3471
+ z22.union([
3472
+ z22.object({
3473
+ type: z22.literal("response.output_text.delta"),
3474
+ item_id: z22.string(),
3475
+ delta: z22.string(),
3476
+ logprobs: z22.array(
3477
+ z22.object({
3478
+ token: z22.string(),
3479
+ logprob: z22.number(),
3480
+ top_logprobs: z22.array(
3481
+ z22.object({
3482
+ token: z22.string(),
3483
+ logprob: z22.number()
3380
3484
  })
3381
3485
  )
3382
3486
  })
3383
3487
  ).nullish()
3384
3488
  }),
3385
- z21.object({
3386
- type: z21.enum(["response.completed", "response.incomplete"]),
3387
- response: z21.object({
3388
- incomplete_details: z21.object({ reason: z21.string() }).nullish(),
3389
- usage: z21.object({
3390
- input_tokens: z21.number(),
3391
- input_tokens_details: z21.object({ cached_tokens: z21.number().nullish() }).nullish(),
3392
- output_tokens: z21.number(),
3393
- output_tokens_details: z21.object({ reasoning_tokens: z21.number().nullish() }).nullish()
3489
+ z22.object({
3490
+ type: z22.enum(["response.completed", "response.incomplete"]),
3491
+ response: z22.object({
3492
+ incomplete_details: z22.object({ reason: z22.string() }).nullish(),
3493
+ usage: z22.object({
3494
+ input_tokens: z22.number(),
3495
+ input_tokens_details: z22.object({ cached_tokens: z22.number().nullish() }).nullish(),
3496
+ output_tokens: z22.number(),
3497
+ output_tokens_details: z22.object({ reasoning_tokens: z22.number().nullish() }).nullish()
3394
3498
  }),
3395
- service_tier: z21.string().nullish()
3499
+ service_tier: z22.string().nullish()
3396
3500
  })
3397
3501
  }),
3398
- z21.object({
3399
- type: z21.literal("response.failed"),
3400
- response: z21.object({
3401
- error: z21.object({
3402
- code: z21.string().nullish(),
3403
- message: z21.string()
3502
+ z22.object({
3503
+ type: z22.literal("response.failed"),
3504
+ response: z22.object({
3505
+ error: z22.object({
3506
+ code: z22.string().nullish(),
3507
+ message: z22.string()
3404
3508
  }).nullish(),
3405
- incomplete_details: z21.object({ reason: z21.string() }).nullish(),
3406
- usage: z21.object({
3407
- input_tokens: z21.number(),
3408
- input_tokens_details: z21.object({ cached_tokens: z21.number().nullish() }).nullish(),
3409
- output_tokens: z21.number(),
3410
- output_tokens_details: z21.object({ reasoning_tokens: z21.number().nullish() }).nullish()
3509
+ incomplete_details: z22.object({ reason: z22.string() }).nullish(),
3510
+ usage: z22.object({
3511
+ input_tokens: z22.number(),
3512
+ input_tokens_details: z22.object({ cached_tokens: z22.number().nullish() }).nullish(),
3513
+ output_tokens: z22.number(),
3514
+ output_tokens_details: z22.object({ reasoning_tokens: z22.number().nullish() }).nullish()
3411
3515
  }).nullish(),
3412
- service_tier: z21.string().nullish()
3516
+ service_tier: z22.string().nullish()
3413
3517
  })
3414
3518
  }),
3415
- z21.object({
3416
- type: z21.literal("response.created"),
3417
- response: z21.object({
3418
- id: z21.string(),
3419
- created_at: z21.number(),
3420
- model: z21.string(),
3421
- service_tier: z21.string().nullish()
3519
+ z22.object({
3520
+ type: z22.literal("response.created"),
3521
+ response: z22.object({
3522
+ id: z22.string(),
3523
+ created_at: z22.number(),
3524
+ model: z22.string(),
3525
+ service_tier: z22.string().nullish()
3422
3526
  })
3423
3527
  }),
3424
- z21.object({
3425
- type: z21.literal("response.output_item.added"),
3426
- output_index: z21.number(),
3427
- item: z21.discriminatedUnion("type", [
3428
- z21.object({
3429
- type: z21.literal("message"),
3430
- id: z21.string(),
3431
- phase: z21.enum(["commentary", "final_answer"]).nullish()
3528
+ z22.object({
3529
+ type: z22.literal("response.output_item.added"),
3530
+ output_index: z22.number(),
3531
+ item: z22.discriminatedUnion("type", [
3532
+ z22.object({
3533
+ type: z22.literal("message"),
3534
+ id: z22.string(),
3535
+ phase: z22.enum(["commentary", "final_answer"]).nullish()
3432
3536
  }),
3433
- z21.object({
3434
- type: z21.literal("reasoning"),
3435
- id: z21.string(),
3436
- encrypted_content: z21.string().nullish()
3537
+ z22.object({
3538
+ type: z22.literal("reasoning"),
3539
+ id: z22.string(),
3540
+ encrypted_content: z22.string().nullish()
3437
3541
  }),
3438
- z21.object({
3439
- type: z21.literal("function_call"),
3440
- id: z21.string(),
3441
- call_id: z21.string(),
3442
- name: z21.string(),
3443
- arguments: z21.string()
3542
+ z22.object({
3543
+ type: z22.literal("function_call"),
3544
+ id: z22.string(),
3545
+ call_id: z22.string(),
3546
+ name: z22.string(),
3547
+ arguments: z22.string()
3444
3548
  }),
3445
- z21.object({
3446
- type: z21.literal("web_search_call"),
3447
- id: z21.string(),
3448
- status: z21.string()
3549
+ z22.object({
3550
+ type: z22.literal("web_search_call"),
3551
+ id: z22.string(),
3552
+ status: z22.string()
3449
3553
  }),
3450
- z21.object({
3451
- type: z21.literal("computer_call"),
3452
- id: z21.string(),
3453
- status: z21.string()
3554
+ z22.object({
3555
+ type: z22.literal("computer_call"),
3556
+ id: z22.string(),
3557
+ status: z22.string()
3454
3558
  }),
3455
- z21.object({
3456
- type: z21.literal("file_search_call"),
3457
- id: z21.string()
3559
+ z22.object({
3560
+ type: z22.literal("file_search_call"),
3561
+ id: z22.string()
3458
3562
  }),
3459
- z21.object({
3460
- type: z21.literal("image_generation_call"),
3461
- id: z21.string()
3563
+ z22.object({
3564
+ type: z22.literal("image_generation_call"),
3565
+ id: z22.string()
3462
3566
  }),
3463
- z21.object({
3464
- type: z21.literal("code_interpreter_call"),
3465
- id: z21.string(),
3466
- container_id: z21.string(),
3467
- code: z21.string().nullable(),
3468
- outputs: z21.array(
3469
- z21.discriminatedUnion("type", [
3470
- z21.object({ type: z21.literal("logs"), logs: z21.string() }),
3471
- z21.object({ type: z21.literal("image"), url: z21.string() })
3567
+ z22.object({
3568
+ type: z22.literal("code_interpreter_call"),
3569
+ id: z22.string(),
3570
+ container_id: z22.string(),
3571
+ code: z22.string().nullable(),
3572
+ outputs: z22.array(
3573
+ z22.discriminatedUnion("type", [
3574
+ z22.object({ type: z22.literal("logs"), logs: z22.string() }),
3575
+ z22.object({ type: z22.literal("image"), url: z22.string() })
3472
3576
  ])
3473
3577
  ).nullable(),
3474
- status: z21.string()
3578
+ status: z22.string()
3475
3579
  }),
3476
- z21.object({
3477
- type: z21.literal("mcp_call"),
3478
- id: z21.string(),
3479
- status: z21.string(),
3480
- approval_request_id: z21.string().nullish()
3580
+ z22.object({
3581
+ type: z22.literal("mcp_call"),
3582
+ id: z22.string(),
3583
+ status: z22.string(),
3584
+ approval_request_id: z22.string().nullish()
3481
3585
  }),
3482
- z21.object({
3483
- type: z21.literal("mcp_list_tools"),
3484
- id: z21.string()
3586
+ z22.object({
3587
+ type: z22.literal("mcp_list_tools"),
3588
+ id: z22.string()
3485
3589
  }),
3486
- z21.object({
3487
- type: z21.literal("mcp_approval_request"),
3488
- id: z21.string()
3590
+ z22.object({
3591
+ type: z22.literal("mcp_approval_request"),
3592
+ id: z22.string()
3489
3593
  }),
3490
- z21.object({
3491
- type: z21.literal("apply_patch_call"),
3492
- id: z21.string(),
3493
- call_id: z21.string(),
3494
- status: z21.enum(["in_progress", "completed"]),
3495
- operation: z21.discriminatedUnion("type", [
3496
- z21.object({
3497
- type: z21.literal("create_file"),
3498
- path: z21.string(),
3499
- diff: z21.string()
3594
+ z22.object({
3595
+ type: z22.literal("apply_patch_call"),
3596
+ id: z22.string(),
3597
+ call_id: z22.string(),
3598
+ status: z22.enum(["in_progress", "completed"]),
3599
+ operation: z22.discriminatedUnion("type", [
3600
+ z22.object({
3601
+ type: z22.literal("create_file"),
3602
+ path: z22.string(),
3603
+ diff: z22.string()
3500
3604
  }),
3501
- z21.object({
3502
- type: z21.literal("delete_file"),
3503
- path: z21.string()
3605
+ z22.object({
3606
+ type: z22.literal("delete_file"),
3607
+ path: z22.string()
3504
3608
  }),
3505
- z21.object({
3506
- type: z21.literal("update_file"),
3507
- path: z21.string(),
3508
- diff: z21.string()
3609
+ z22.object({
3610
+ type: z22.literal("update_file"),
3611
+ path: z22.string(),
3612
+ diff: z22.string()
3509
3613
  })
3510
3614
  ])
3511
3615
  }),
3512
- z21.object({
3513
- type: z21.literal("custom_tool_call"),
3514
- id: z21.string(),
3515
- call_id: z21.string(),
3516
- name: z21.string(),
3517
- input: z21.string()
3616
+ z22.object({
3617
+ type: z22.literal("custom_tool_call"),
3618
+ id: z22.string(),
3619
+ call_id: z22.string(),
3620
+ name: z22.string(),
3621
+ input: z22.string()
3518
3622
  }),
3519
- z21.object({
3520
- type: z21.literal("shell_call"),
3521
- id: z21.string(),
3522
- call_id: z21.string(),
3523
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3524
- action: z21.object({
3525
- commands: z21.array(z21.string())
3623
+ z22.object({
3624
+ type: z22.literal("shell_call"),
3625
+ id: z22.string(),
3626
+ call_id: z22.string(),
3627
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3628
+ action: z22.object({
3629
+ commands: z22.array(z22.string())
3526
3630
  })
3527
3631
  }),
3528
- z21.object({
3529
- type: z21.literal("shell_call_output"),
3530
- id: z21.string(),
3531
- call_id: z21.string(),
3532
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3533
- output: z21.array(
3534
- z21.object({
3535
- stdout: z21.string(),
3536
- stderr: z21.string(),
3537
- outcome: z21.discriminatedUnion("type", [
3538
- z21.object({ type: z21.literal("timeout") }),
3539
- z21.object({
3540
- type: z21.literal("exit"),
3541
- exit_code: z21.number()
3632
+ z22.object({
3633
+ type: z22.literal("shell_call_output"),
3634
+ id: z22.string(),
3635
+ call_id: z22.string(),
3636
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3637
+ output: z22.array(
3638
+ z22.object({
3639
+ stdout: z22.string(),
3640
+ stderr: z22.string(),
3641
+ outcome: z22.discriminatedUnion("type", [
3642
+ z22.object({ type: z22.literal("timeout") }),
3643
+ z22.object({
3644
+ type: z22.literal("exit"),
3645
+ exit_code: z22.number()
3542
3646
  })
3543
3647
  ])
3544
3648
  })
3545
3649
  )
3546
3650
  }),
3547
- z21.object({
3548
- type: z21.literal("tool_search_call"),
3549
- id: z21.string(),
3550
- execution: z21.enum(["server", "client"]),
3551
- call_id: z21.string().nullable(),
3552
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3553
- arguments: z21.unknown()
3651
+ z22.object({
3652
+ type: z22.literal("tool_search_call"),
3653
+ id: z22.string(),
3654
+ execution: z22.enum(["server", "client"]),
3655
+ call_id: z22.string().nullable(),
3656
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3657
+ arguments: z22.unknown()
3554
3658
  }),
3555
- z21.object({
3556
- type: z21.literal("tool_search_output"),
3557
- id: z21.string(),
3558
- execution: z21.enum(["server", "client"]),
3559
- call_id: z21.string().nullable(),
3560
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3561
- tools: z21.array(z21.record(z21.string(), jsonValueSchema2.optional()))
3659
+ z22.object({
3660
+ type: z22.literal("tool_search_output"),
3661
+ id: z22.string(),
3662
+ execution: z22.enum(["server", "client"]),
3663
+ call_id: z22.string().nullable(),
3664
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3665
+ tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
3562
3666
  })
3563
3667
  ])
3564
3668
  }),
3565
- z21.object({
3566
- type: z21.literal("response.output_item.done"),
3567
- output_index: z21.number(),
3568
- item: z21.discriminatedUnion("type", [
3569
- z21.object({
3570
- type: z21.literal("message"),
3571
- id: z21.string(),
3572
- phase: z21.enum(["commentary", "final_answer"]).nullish()
3669
+ z22.object({
3670
+ type: z22.literal("response.output_item.done"),
3671
+ output_index: z22.number(),
3672
+ item: z22.discriminatedUnion("type", [
3673
+ z22.object({
3674
+ type: z22.literal("message"),
3675
+ id: z22.string(),
3676
+ phase: z22.enum(["commentary", "final_answer"]).nullish()
3573
3677
  }),
3574
- z21.object({
3575
- type: z21.literal("reasoning"),
3576
- id: z21.string(),
3577
- encrypted_content: z21.string().nullish()
3678
+ z22.object({
3679
+ type: z22.literal("reasoning"),
3680
+ id: z22.string(),
3681
+ encrypted_content: z22.string().nullish()
3578
3682
  }),
3579
- z21.object({
3580
- type: z21.literal("function_call"),
3581
- id: z21.string(),
3582
- call_id: z21.string(),
3583
- name: z21.string(),
3584
- arguments: z21.string(),
3585
- status: z21.literal("completed")
3683
+ z22.object({
3684
+ type: z22.literal("function_call"),
3685
+ id: z22.string(),
3686
+ call_id: z22.string(),
3687
+ name: z22.string(),
3688
+ arguments: z22.string(),
3689
+ status: z22.literal("completed")
3586
3690
  }),
3587
- z21.object({
3588
- type: z21.literal("custom_tool_call"),
3589
- id: z21.string(),
3590
- call_id: z21.string(),
3591
- name: z21.string(),
3592
- input: z21.string(),
3593
- status: z21.literal("completed")
3691
+ z22.object({
3692
+ type: z22.literal("custom_tool_call"),
3693
+ id: z22.string(),
3694
+ call_id: z22.string(),
3695
+ name: z22.string(),
3696
+ input: z22.string(),
3697
+ status: z22.literal("completed")
3594
3698
  }),
3595
- z21.object({
3596
- type: z21.literal("code_interpreter_call"),
3597
- id: z21.string(),
3598
- code: z21.string().nullable(),
3599
- container_id: z21.string(),
3600
- outputs: z21.array(
3601
- z21.discriminatedUnion("type", [
3602
- z21.object({ type: z21.literal("logs"), logs: z21.string() }),
3603
- z21.object({ type: z21.literal("image"), url: z21.string() })
3699
+ z22.object({
3700
+ type: z22.literal("code_interpreter_call"),
3701
+ id: z22.string(),
3702
+ code: z22.string().nullable(),
3703
+ container_id: z22.string(),
3704
+ outputs: z22.array(
3705
+ z22.discriminatedUnion("type", [
3706
+ z22.object({ type: z22.literal("logs"), logs: z22.string() }),
3707
+ z22.object({ type: z22.literal("image"), url: z22.string() })
3604
3708
  ])
3605
3709
  ).nullable()
3606
3710
  }),
3607
- z21.object({
3608
- type: z21.literal("image_generation_call"),
3609
- id: z21.string(),
3610
- result: z21.string()
3711
+ z22.object({
3712
+ type: z22.literal("image_generation_call"),
3713
+ id: z22.string(),
3714
+ result: z22.string()
3611
3715
  }),
3612
- z21.object({
3613
- type: z21.literal("web_search_call"),
3614
- id: z21.string(),
3615
- status: z21.string(),
3616
- action: z21.discriminatedUnion("type", [
3617
- z21.object({
3618
- type: z21.literal("search"),
3619
- query: z21.string().nullish(),
3620
- sources: z21.array(
3621
- z21.discriminatedUnion("type", [
3622
- z21.object({ type: z21.literal("url"), url: z21.string() }),
3623
- z21.object({ type: z21.literal("api"), name: z21.string() })
3716
+ z22.object({
3717
+ type: z22.literal("web_search_call"),
3718
+ id: z22.string(),
3719
+ status: z22.string(),
3720
+ action: z22.discriminatedUnion("type", [
3721
+ z22.object({
3722
+ type: z22.literal("search"),
3723
+ query: z22.string().nullish(),
3724
+ sources: z22.array(
3725
+ z22.discriminatedUnion("type", [
3726
+ z22.object({ type: z22.literal("url"), url: z22.string() }),
3727
+ z22.object({ type: z22.literal("api"), name: z22.string() })
3624
3728
  ])
3625
3729
  ).nullish()
3626
3730
  }),
3627
- z21.object({
3628
- type: z21.literal("open_page"),
3629
- url: z21.string().nullish()
3731
+ z22.object({
3732
+ type: z22.literal("open_page"),
3733
+ url: z22.string().nullish()
3630
3734
  }),
3631
- z21.object({
3632
- type: z21.literal("find_in_page"),
3633
- url: z21.string().nullish(),
3634
- pattern: z21.string().nullish()
3735
+ z22.object({
3736
+ type: z22.literal("find_in_page"),
3737
+ url: z22.string().nullish(),
3738
+ pattern: z22.string().nullish()
3635
3739
  })
3636
3740
  ]).nullish()
3637
3741
  }),
3638
- z21.object({
3639
- type: z21.literal("file_search_call"),
3640
- id: z21.string(),
3641
- queries: z21.array(z21.string()),
3642
- results: z21.array(
3643
- z21.object({
3644
- attributes: z21.record(
3645
- z21.string(),
3646
- z21.union([z21.string(), z21.number(), z21.boolean()])
3742
+ z22.object({
3743
+ type: z22.literal("file_search_call"),
3744
+ id: z22.string(),
3745
+ queries: z22.array(z22.string()),
3746
+ results: z22.array(
3747
+ z22.object({
3748
+ attributes: z22.record(
3749
+ z22.string(),
3750
+ z22.union([z22.string(), z22.number(), z22.boolean()])
3647
3751
  ),
3648
- file_id: z21.string(),
3649
- filename: z21.string(),
3650
- score: z21.number(),
3651
- text: z21.string()
3752
+ file_id: z22.string(),
3753
+ filename: z22.string(),
3754
+ score: z22.number(),
3755
+ text: z22.string()
3652
3756
  })
3653
3757
  ).nullish()
3654
3758
  }),
3655
- z21.object({
3656
- type: z21.literal("local_shell_call"),
3657
- id: z21.string(),
3658
- call_id: z21.string(),
3659
- action: z21.object({
3660
- type: z21.literal("exec"),
3661
- command: z21.array(z21.string()),
3662
- timeout_ms: z21.number().optional(),
3663
- user: z21.string().optional(),
3664
- working_directory: z21.string().optional(),
3665
- env: z21.record(z21.string(), z21.string()).optional()
3759
+ z22.object({
3760
+ type: z22.literal("local_shell_call"),
3761
+ id: z22.string(),
3762
+ call_id: z22.string(),
3763
+ action: z22.object({
3764
+ type: z22.literal("exec"),
3765
+ command: z22.array(z22.string()),
3766
+ timeout_ms: z22.number().optional(),
3767
+ user: z22.string().optional(),
3768
+ working_directory: z22.string().optional(),
3769
+ env: z22.record(z22.string(), z22.string()).optional()
3666
3770
  })
3667
3771
  }),
3668
- z21.object({
3669
- type: z21.literal("computer_call"),
3670
- id: z21.string(),
3671
- status: z21.literal("completed")
3772
+ z22.object({
3773
+ type: z22.literal("computer_call"),
3774
+ id: z22.string(),
3775
+ status: z22.literal("completed")
3672
3776
  }),
3673
- z21.object({
3674
- type: z21.literal("mcp_call"),
3675
- id: z21.string(),
3676
- status: z21.string(),
3677
- arguments: z21.string(),
3678
- name: z21.string(),
3679
- server_label: z21.string(),
3680
- output: z21.string().nullish(),
3681
- error: z21.union([
3682
- z21.string(),
3683
- z21.object({
3684
- type: z21.string().optional(),
3685
- code: z21.union([z21.number(), z21.string()]).optional(),
3686
- message: z21.string().optional()
3777
+ z22.object({
3778
+ type: z22.literal("mcp_call"),
3779
+ id: z22.string(),
3780
+ status: z22.string(),
3781
+ arguments: z22.string(),
3782
+ name: z22.string(),
3783
+ server_label: z22.string(),
3784
+ output: z22.string().nullish(),
3785
+ error: z22.union([
3786
+ z22.string(),
3787
+ z22.object({
3788
+ type: z22.string().optional(),
3789
+ code: z22.union([z22.number(), z22.string()]).optional(),
3790
+ message: z22.string().optional()
3687
3791
  }).loose()
3688
3792
  ]).nullish(),
3689
- approval_request_id: z21.string().nullish()
3793
+ approval_request_id: z22.string().nullish()
3690
3794
  }),
3691
- z21.object({
3692
- type: z21.literal("mcp_list_tools"),
3693
- id: z21.string(),
3694
- server_label: z21.string(),
3695
- tools: z21.array(
3696
- z21.object({
3697
- name: z21.string(),
3698
- description: z21.string().optional(),
3699
- input_schema: z21.any(),
3700
- annotations: z21.record(z21.string(), z21.unknown()).optional()
3795
+ z22.object({
3796
+ type: z22.literal("mcp_list_tools"),
3797
+ id: z22.string(),
3798
+ server_label: z22.string(),
3799
+ tools: z22.array(
3800
+ z22.object({
3801
+ name: z22.string(),
3802
+ description: z22.string().optional(),
3803
+ input_schema: z22.any(),
3804
+ annotations: z22.record(z22.string(), z22.unknown()).optional()
3701
3805
  })
3702
3806
  ),
3703
- error: z21.union([
3704
- z21.string(),
3705
- z21.object({
3706
- type: z21.string().optional(),
3707
- code: z21.union([z21.number(), z21.string()]).optional(),
3708
- message: z21.string().optional()
3807
+ error: z22.union([
3808
+ z22.string(),
3809
+ z22.object({
3810
+ type: z22.string().optional(),
3811
+ code: z22.union([z22.number(), z22.string()]).optional(),
3812
+ message: z22.string().optional()
3709
3813
  }).loose()
3710
3814
  ]).optional()
3711
3815
  }),
3712
- z21.object({
3713
- type: z21.literal("mcp_approval_request"),
3714
- id: z21.string(),
3715
- server_label: z21.string(),
3716
- name: z21.string(),
3717
- arguments: z21.string(),
3718
- approval_request_id: z21.string().optional()
3816
+ z22.object({
3817
+ type: z22.literal("mcp_approval_request"),
3818
+ id: z22.string(),
3819
+ server_label: z22.string(),
3820
+ name: z22.string(),
3821
+ arguments: z22.string(),
3822
+ approval_request_id: z22.string().optional()
3719
3823
  }),
3720
- z21.object({
3721
- type: z21.literal("apply_patch_call"),
3722
- id: z21.string(),
3723
- call_id: z21.string(),
3724
- status: z21.enum(["in_progress", "completed"]),
3725
- operation: z21.discriminatedUnion("type", [
3726
- z21.object({
3727
- type: z21.literal("create_file"),
3728
- path: z21.string(),
3729
- diff: z21.string()
3824
+ z22.object({
3825
+ type: z22.literal("apply_patch_call"),
3826
+ id: z22.string(),
3827
+ call_id: z22.string(),
3828
+ status: z22.enum(["in_progress", "completed"]),
3829
+ operation: z22.discriminatedUnion("type", [
3830
+ z22.object({
3831
+ type: z22.literal("create_file"),
3832
+ path: z22.string(),
3833
+ diff: z22.string()
3730
3834
  }),
3731
- z21.object({
3732
- type: z21.literal("delete_file"),
3733
- path: z21.string()
3835
+ z22.object({
3836
+ type: z22.literal("delete_file"),
3837
+ path: z22.string()
3734
3838
  }),
3735
- z21.object({
3736
- type: z21.literal("update_file"),
3737
- path: z21.string(),
3738
- diff: z21.string()
3839
+ z22.object({
3840
+ type: z22.literal("update_file"),
3841
+ path: z22.string(),
3842
+ diff: z22.string()
3739
3843
  })
3740
3844
  ])
3741
3845
  }),
3742
- z21.object({
3743
- type: z21.literal("shell_call"),
3744
- id: z21.string(),
3745
- call_id: z21.string(),
3746
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3747
- action: z21.object({
3748
- commands: z21.array(z21.string())
3846
+ z22.object({
3847
+ type: z22.literal("shell_call"),
3848
+ id: z22.string(),
3849
+ call_id: z22.string(),
3850
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3851
+ action: z22.object({
3852
+ commands: z22.array(z22.string())
3749
3853
  })
3750
3854
  }),
3751
- z21.object({
3752
- type: z21.literal("shell_call_output"),
3753
- id: z21.string(),
3754
- call_id: z21.string(),
3755
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3756
- output: z21.array(
3757
- z21.object({
3758
- stdout: z21.string(),
3759
- stderr: z21.string(),
3760
- outcome: z21.discriminatedUnion("type", [
3761
- z21.object({ type: z21.literal("timeout") }),
3762
- z21.object({
3763
- type: z21.literal("exit"),
3764
- exit_code: z21.number()
3855
+ z22.object({
3856
+ type: z22.literal("shell_call_output"),
3857
+ id: z22.string(),
3858
+ call_id: z22.string(),
3859
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3860
+ output: z22.array(
3861
+ z22.object({
3862
+ stdout: z22.string(),
3863
+ stderr: z22.string(),
3864
+ outcome: z22.discriminatedUnion("type", [
3865
+ z22.object({ type: z22.literal("timeout") }),
3866
+ z22.object({
3867
+ type: z22.literal("exit"),
3868
+ exit_code: z22.number()
3765
3869
  })
3766
3870
  ])
3767
3871
  })
3768
3872
  )
3769
3873
  }),
3770
- z21.object({
3771
- type: z21.literal("tool_search_call"),
3772
- id: z21.string(),
3773
- execution: z21.enum(["server", "client"]),
3774
- call_id: z21.string().nullable(),
3775
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3776
- arguments: z21.unknown()
3874
+ z22.object({
3875
+ type: z22.literal("tool_search_call"),
3876
+ id: z22.string(),
3877
+ execution: z22.enum(["server", "client"]),
3878
+ call_id: z22.string().nullable(),
3879
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3880
+ arguments: z22.unknown()
3777
3881
  }),
3778
- z21.object({
3779
- type: z21.literal("tool_search_output"),
3780
- id: z21.string(),
3781
- execution: z21.enum(["server", "client"]),
3782
- call_id: z21.string().nullable(),
3783
- status: z21.enum(["in_progress", "completed", "incomplete"]),
3784
- tools: z21.array(z21.record(z21.string(), jsonValueSchema2.optional()))
3882
+ z22.object({
3883
+ type: z22.literal("tool_search_output"),
3884
+ id: z22.string(),
3885
+ execution: z22.enum(["server", "client"]),
3886
+ call_id: z22.string().nullable(),
3887
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
3888
+ tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
3785
3889
  })
3786
3890
  ])
3787
3891
  }),
3788
- z21.object({
3789
- type: z21.literal("response.function_call_arguments.delta"),
3790
- item_id: z21.string(),
3791
- output_index: z21.number(),
3792
- delta: z21.string()
3892
+ z22.object({
3893
+ type: z22.literal("response.function_call_arguments.delta"),
3894
+ item_id: z22.string(),
3895
+ output_index: z22.number(),
3896
+ delta: z22.string()
3793
3897
  }),
3794
- z21.object({
3795
- type: z21.literal("response.custom_tool_call_input.delta"),
3796
- item_id: z21.string(),
3797
- output_index: z21.number(),
3798
- delta: z21.string()
3898
+ z22.object({
3899
+ type: z22.literal("response.custom_tool_call_input.delta"),
3900
+ item_id: z22.string(),
3901
+ output_index: z22.number(),
3902
+ delta: z22.string()
3799
3903
  }),
3800
- z21.object({
3801
- type: z21.literal("response.image_generation_call.partial_image"),
3802
- item_id: z21.string(),
3803
- output_index: z21.number(),
3804
- partial_image_b64: z21.string()
3904
+ z22.object({
3905
+ type: z22.literal("response.image_generation_call.partial_image"),
3906
+ item_id: z22.string(),
3907
+ output_index: z22.number(),
3908
+ partial_image_b64: z22.string()
3805
3909
  }),
3806
- z21.object({
3807
- type: z21.literal("response.code_interpreter_call_code.delta"),
3808
- item_id: z21.string(),
3809
- output_index: z21.number(),
3810
- delta: z21.string()
3910
+ z22.object({
3911
+ type: z22.literal("response.code_interpreter_call_code.delta"),
3912
+ item_id: z22.string(),
3913
+ output_index: z22.number(),
3914
+ delta: z22.string()
3811
3915
  }),
3812
- z21.object({
3813
- type: z21.literal("response.code_interpreter_call_code.done"),
3814
- item_id: z21.string(),
3815
- output_index: z21.number(),
3816
- code: z21.string()
3916
+ z22.object({
3917
+ type: z22.literal("response.code_interpreter_call_code.done"),
3918
+ item_id: z22.string(),
3919
+ output_index: z22.number(),
3920
+ code: z22.string()
3817
3921
  }),
3818
- z21.object({
3819
- type: z21.literal("response.output_text.annotation.added"),
3820
- annotation: z21.discriminatedUnion("type", [
3821
- z21.object({
3822
- type: z21.literal("url_citation"),
3823
- start_index: z21.number(),
3824
- end_index: z21.number(),
3825
- url: z21.string(),
3826
- title: z21.string()
3922
+ z22.object({
3923
+ type: z22.literal("response.output_text.annotation.added"),
3924
+ annotation: z22.discriminatedUnion("type", [
3925
+ z22.object({
3926
+ type: z22.literal("url_citation"),
3927
+ start_index: z22.number(),
3928
+ end_index: z22.number(),
3929
+ url: z22.string(),
3930
+ title: z22.string()
3827
3931
  }),
3828
- z21.object({
3829
- type: z21.literal("file_citation"),
3830
- file_id: z21.string(),
3831
- filename: z21.string(),
3832
- index: z21.number()
3932
+ z22.object({
3933
+ type: z22.literal("file_citation"),
3934
+ file_id: z22.string(),
3935
+ filename: z22.string(),
3936
+ index: z22.number()
3833
3937
  }),
3834
- z21.object({
3835
- type: z21.literal("container_file_citation"),
3836
- container_id: z21.string(),
3837
- file_id: z21.string(),
3838
- filename: z21.string(),
3839
- start_index: z21.number(),
3840
- end_index: z21.number()
3938
+ z22.object({
3939
+ type: z22.literal("container_file_citation"),
3940
+ container_id: z22.string(),
3941
+ file_id: z22.string(),
3942
+ filename: z22.string(),
3943
+ start_index: z22.number(),
3944
+ end_index: z22.number()
3841
3945
  }),
3842
- z21.object({
3843
- type: z21.literal("file_path"),
3844
- file_id: z21.string(),
3845
- index: z21.number()
3946
+ z22.object({
3947
+ type: z22.literal("file_path"),
3948
+ file_id: z22.string(),
3949
+ index: z22.number()
3846
3950
  })
3847
3951
  ])
3848
3952
  }),
3849
- z21.object({
3850
- type: z21.literal("response.reasoning_summary_part.added"),
3851
- item_id: z21.string(),
3852
- summary_index: z21.number()
3953
+ z22.object({
3954
+ type: z22.literal("response.reasoning_summary_part.added"),
3955
+ item_id: z22.string(),
3956
+ summary_index: z22.number()
3853
3957
  }),
3854
- z21.object({
3855
- type: z21.literal("response.reasoning_summary_text.delta"),
3856
- item_id: z21.string(),
3857
- summary_index: z21.number(),
3858
- delta: z21.string()
3958
+ z22.object({
3959
+ type: z22.literal("response.reasoning_summary_text.delta"),
3960
+ item_id: z22.string(),
3961
+ summary_index: z22.number(),
3962
+ delta: z22.string()
3859
3963
  }),
3860
- z21.object({
3861
- type: z21.literal("response.reasoning_summary_part.done"),
3862
- item_id: z21.string(),
3863
- summary_index: z21.number()
3964
+ z22.object({
3965
+ type: z22.literal("response.reasoning_summary_part.done"),
3966
+ item_id: z22.string(),
3967
+ summary_index: z22.number()
3864
3968
  }),
3865
- z21.object({
3866
- type: z21.literal("response.apply_patch_call_operation_diff.delta"),
3867
- item_id: z21.string(),
3868
- output_index: z21.number(),
3869
- delta: z21.string(),
3870
- obfuscation: z21.string().nullish()
3969
+ z22.object({
3970
+ type: z22.literal("response.apply_patch_call_operation_diff.delta"),
3971
+ item_id: z22.string(),
3972
+ output_index: z22.number(),
3973
+ delta: z22.string(),
3974
+ obfuscation: z22.string().nullish()
3871
3975
  }),
3872
- z21.object({
3873
- type: z21.literal("response.apply_patch_call_operation_diff.done"),
3874
- item_id: z21.string(),
3875
- output_index: z21.number(),
3876
- diff: z21.string()
3976
+ z22.object({
3977
+ type: z22.literal("response.apply_patch_call_operation_diff.done"),
3978
+ item_id: z22.string(),
3979
+ output_index: z22.number(),
3980
+ diff: z22.string()
3877
3981
  }),
3878
- z21.object({
3879
- type: z21.literal("error"),
3880
- sequence_number: z21.number(),
3881
- error: z21.object({
3882
- type: z21.string(),
3883
- code: z21.string(),
3884
- message: z21.string(),
3885
- param: z21.string().nullish()
3982
+ z22.object({
3983
+ type: z22.literal("error"),
3984
+ sequence_number: z22.number(),
3985
+ error: z22.object({
3986
+ type: z22.string(),
3987
+ code: z22.string(),
3988
+ message: z22.string(),
3989
+ param: z22.string().nullish()
3886
3990
  })
3887
3991
  }),
3888
- z21.object({ type: z21.string() }).loose().transform((value) => ({
3992
+ z22.object({ type: z22.string() }).loose().transform((value) => ({
3889
3993
  type: "unknown_chunk",
3890
3994
  message: value.type
3891
3995
  }))
@@ -3893,310 +3997,313 @@ var openaiResponsesChunkSchema = lazySchema19(
3893
3997
  ])
3894
3998
  )
3895
3999
  );
3896
- var openaiResponsesResponseSchema = lazySchema19(
3897
- () => zodSchema19(
3898
- z21.object({
3899
- id: z21.string().optional(),
3900
- created_at: z21.number().optional(),
3901
- error: z21.object({
3902
- message: z21.string(),
3903
- type: z21.string(),
3904
- param: z21.string().nullish(),
3905
- code: z21.string()
4000
+ var openaiResponsesResponseSchema = lazySchema20(
4001
+ () => zodSchema20(
4002
+ z22.object({
4003
+ id: z22.string().optional(),
4004
+ created_at: z22.number().optional(),
4005
+ error: z22.object({
4006
+ message: z22.string(),
4007
+ type: z22.string(),
4008
+ param: z22.string().nullish(),
4009
+ code: z22.string()
3906
4010
  }).nullish(),
3907
- model: z21.string().optional(),
3908
- output: z21.array(
3909
- z21.discriminatedUnion("type", [
3910
- z21.object({
3911
- type: z21.literal("message"),
3912
- role: z21.literal("assistant"),
3913
- id: z21.string(),
3914
- phase: z21.enum(["commentary", "final_answer"]).nullish(),
3915
- content: z21.array(
3916
- z21.object({
3917
- type: z21.literal("output_text"),
3918
- text: z21.string(),
3919
- logprobs: z21.array(
3920
- z21.object({
3921
- token: z21.string(),
3922
- logprob: z21.number(),
3923
- top_logprobs: z21.array(
3924
- z21.object({
3925
- token: z21.string(),
3926
- logprob: z21.number()
4011
+ model: z22.string().optional(),
4012
+ output: z22.array(
4013
+ z22.discriminatedUnion("type", [
4014
+ z22.object({
4015
+ type: z22.literal("message"),
4016
+ role: z22.literal("assistant"),
4017
+ id: z22.string(),
4018
+ phase: z22.enum(["commentary", "final_answer"]).nullish(),
4019
+ content: z22.array(
4020
+ z22.object({
4021
+ type: z22.literal("output_text"),
4022
+ text: z22.string(),
4023
+ logprobs: z22.array(
4024
+ z22.object({
4025
+ token: z22.string(),
4026
+ logprob: z22.number(),
4027
+ top_logprobs: z22.array(
4028
+ z22.object({
4029
+ token: z22.string(),
4030
+ logprob: z22.number()
3927
4031
  })
3928
4032
  )
3929
4033
  })
3930
4034
  ).nullish(),
3931
- annotations: z21.array(
3932
- z21.discriminatedUnion("type", [
3933
- z21.object({
3934
- type: z21.literal("url_citation"),
3935
- start_index: z21.number(),
3936
- end_index: z21.number(),
3937
- url: z21.string(),
3938
- title: z21.string()
4035
+ annotations: z22.array(
4036
+ z22.discriminatedUnion("type", [
4037
+ z22.object({
4038
+ type: z22.literal("url_citation"),
4039
+ start_index: z22.number(),
4040
+ end_index: z22.number(),
4041
+ url: z22.string(),
4042
+ title: z22.string()
3939
4043
  }),
3940
- z21.object({
3941
- type: z21.literal("file_citation"),
3942
- file_id: z21.string(),
3943
- filename: z21.string(),
3944
- index: z21.number()
4044
+ z22.object({
4045
+ type: z22.literal("file_citation"),
4046
+ file_id: z22.string(),
4047
+ filename: z22.string(),
4048
+ index: z22.number()
3945
4049
  }),
3946
- z21.object({
3947
- type: z21.literal("container_file_citation"),
3948
- container_id: z21.string(),
3949
- file_id: z21.string(),
3950
- filename: z21.string(),
3951
- start_index: z21.number(),
3952
- end_index: z21.number()
4050
+ z22.object({
4051
+ type: z22.literal("container_file_citation"),
4052
+ container_id: z22.string(),
4053
+ file_id: z22.string(),
4054
+ filename: z22.string(),
4055
+ start_index: z22.number(),
4056
+ end_index: z22.number()
3953
4057
  }),
3954
- z21.object({
3955
- type: z21.literal("file_path"),
3956
- file_id: z21.string(),
3957
- index: z21.number()
4058
+ z22.object({
4059
+ type: z22.literal("file_path"),
4060
+ file_id: z22.string(),
4061
+ index: z22.number()
3958
4062
  })
3959
4063
  ])
3960
4064
  )
3961
4065
  })
3962
4066
  )
3963
4067
  }),
3964
- z21.object({
3965
- type: z21.literal("web_search_call"),
3966
- id: z21.string(),
3967
- status: z21.string(),
3968
- action: z21.discriminatedUnion("type", [
3969
- z21.object({
3970
- type: z21.literal("search"),
3971
- query: z21.string().nullish(),
3972
- sources: z21.array(
3973
- z21.discriminatedUnion("type", [
3974
- z21.object({ type: z21.literal("url"), url: z21.string() }),
3975
- z21.object({
3976
- type: z21.literal("api"),
3977
- name: z21.string()
4068
+ z22.object({
4069
+ type: z22.literal("web_search_call"),
4070
+ id: z22.string(),
4071
+ status: z22.string(),
4072
+ action: z22.discriminatedUnion("type", [
4073
+ z22.object({
4074
+ type: z22.literal("search"),
4075
+ query: z22.string().nullish(),
4076
+ sources: z22.array(
4077
+ z22.discriminatedUnion("type", [
4078
+ z22.object({ type: z22.literal("url"), url: z22.string() }),
4079
+ z22.object({
4080
+ type: z22.literal("api"),
4081
+ name: z22.string()
3978
4082
  })
3979
4083
  ])
3980
4084
  ).nullish()
3981
4085
  }),
3982
- z21.object({
3983
- type: z21.literal("open_page"),
3984
- url: z21.string().nullish()
4086
+ z22.object({
4087
+ type: z22.literal("open_page"),
4088
+ url: z22.string().nullish()
3985
4089
  }),
3986
- z21.object({
3987
- type: z21.literal("find_in_page"),
3988
- url: z21.string().nullish(),
3989
- pattern: z21.string().nullish()
4090
+ z22.object({
4091
+ type: z22.literal("find_in_page"),
4092
+ url: z22.string().nullish(),
4093
+ pattern: z22.string().nullish()
3990
4094
  })
3991
4095
  ]).nullish()
3992
4096
  }),
3993
- z21.object({
3994
- type: z21.literal("file_search_call"),
3995
- id: z21.string(),
3996
- queries: z21.array(z21.string()),
3997
- results: z21.array(
3998
- z21.object({
3999
- attributes: z21.record(
4000
- z21.string(),
4001
- z21.union([z21.string(), z21.number(), z21.boolean()])
4097
+ z22.object({
4098
+ type: z22.literal("file_search_call"),
4099
+ id: z22.string(),
4100
+ queries: z22.array(z22.string()),
4101
+ results: z22.array(
4102
+ z22.object({
4103
+ attributes: z22.record(
4104
+ z22.string(),
4105
+ z22.union([z22.string(), z22.number(), z22.boolean()])
4002
4106
  ),
4003
- file_id: z21.string(),
4004
- filename: z21.string(),
4005
- score: z21.number(),
4006
- text: z21.string()
4107
+ file_id: z22.string(),
4108
+ filename: z22.string(),
4109
+ score: z22.number(),
4110
+ text: z22.string()
4007
4111
  })
4008
4112
  ).nullish()
4009
4113
  }),
4010
- z21.object({
4011
- type: z21.literal("code_interpreter_call"),
4012
- id: z21.string(),
4013
- code: z21.string().nullable(),
4014
- container_id: z21.string(),
4015
- outputs: z21.array(
4016
- z21.discriminatedUnion("type", [
4017
- z21.object({ type: z21.literal("logs"), logs: z21.string() }),
4018
- z21.object({ type: z21.literal("image"), url: z21.string() })
4114
+ z22.object({
4115
+ type: z22.literal("code_interpreter_call"),
4116
+ id: z22.string(),
4117
+ code: z22.string().nullable(),
4118
+ container_id: z22.string(),
4119
+ outputs: z22.array(
4120
+ z22.discriminatedUnion("type", [
4121
+ z22.object({ type: z22.literal("logs"), logs: z22.string() }),
4122
+ z22.object({ type: z22.literal("image"), url: z22.string() })
4019
4123
  ])
4020
4124
  ).nullable()
4021
4125
  }),
4022
- z21.object({
4023
- type: z21.literal("image_generation_call"),
4024
- id: z21.string(),
4025
- result: z21.string()
4126
+ z22.object({
4127
+ type: z22.literal("image_generation_call"),
4128
+ id: z22.string(),
4129
+ result: z22.string()
4026
4130
  }),
4027
- z21.object({
4028
- type: z21.literal("local_shell_call"),
4029
- id: z21.string(),
4030
- call_id: z21.string(),
4031
- action: z21.object({
4032
- type: z21.literal("exec"),
4033
- command: z21.array(z21.string()),
4034
- timeout_ms: z21.number().optional(),
4035
- user: z21.string().optional(),
4036
- working_directory: z21.string().optional(),
4037
- env: z21.record(z21.string(), z21.string()).optional()
4131
+ z22.object({
4132
+ type: z22.literal("local_shell_call"),
4133
+ id: z22.string(),
4134
+ call_id: z22.string(),
4135
+ action: z22.object({
4136
+ type: z22.literal("exec"),
4137
+ command: z22.array(z22.string()),
4138
+ timeout_ms: z22.number().optional(),
4139
+ user: z22.string().optional(),
4140
+ working_directory: z22.string().optional(),
4141
+ env: z22.record(z22.string(), z22.string()).optional()
4038
4142
  })
4039
4143
  }),
4040
- z21.object({
4041
- type: z21.literal("function_call"),
4042
- call_id: z21.string(),
4043
- name: z21.string(),
4044
- arguments: z21.string(),
4045
- id: z21.string()
4144
+ z22.object({
4145
+ type: z22.literal("function_call"),
4146
+ call_id: z22.string(),
4147
+ name: z22.string(),
4148
+ arguments: z22.string(),
4149
+ id: z22.string()
4046
4150
  }),
4047
- z21.object({
4048
- type: z21.literal("custom_tool_call"),
4049
- call_id: z21.string(),
4050
- name: z21.string(),
4051
- input: z21.string(),
4052
- id: z21.string()
4151
+ z22.object({
4152
+ type: z22.literal("custom_tool_call"),
4153
+ call_id: z22.string(),
4154
+ name: z22.string(),
4155
+ input: z22.string(),
4156
+ id: z22.string()
4053
4157
  }),
4054
- z21.object({
4055
- type: z21.literal("computer_call"),
4056
- id: z21.string(),
4057
- status: z21.string().optional()
4158
+ z22.object({
4159
+ type: z22.literal("computer_call"),
4160
+ id: z22.string(),
4161
+ status: z22.string().optional()
4058
4162
  }),
4059
- z21.object({
4060
- type: z21.literal("reasoning"),
4061
- id: z21.string(),
4062
- encrypted_content: z21.string().nullish(),
4063
- summary: z21.array(
4064
- z21.object({
4065
- type: z21.literal("summary_text"),
4066
- text: z21.string()
4163
+ z22.object({
4164
+ type: z22.literal("reasoning"),
4165
+ id: z22.string(),
4166
+ encrypted_content: z22.string().nullish(),
4167
+ summary: z22.array(
4168
+ z22.object({
4169
+ type: z22.literal("summary_text"),
4170
+ text: z22.string()
4067
4171
  })
4068
4172
  )
4069
4173
  }),
4070
- z21.object({
4071
- type: z21.literal("mcp_call"),
4072
- id: z21.string(),
4073
- status: z21.string(),
4074
- arguments: z21.string(),
4075
- name: z21.string(),
4076
- server_label: z21.string(),
4077
- output: z21.string().nullish(),
4078
- error: z21.union([
4079
- z21.string(),
4080
- z21.object({
4081
- type: z21.string().optional(),
4082
- code: z21.union([z21.number(), z21.string()]).optional(),
4083
- message: z21.string().optional()
4174
+ z22.object({
4175
+ type: z22.literal("mcp_call"),
4176
+ id: z22.string(),
4177
+ status: z22.string(),
4178
+ arguments: z22.string(),
4179
+ name: z22.string(),
4180
+ server_label: z22.string(),
4181
+ output: z22.string().nullish(),
4182
+ error: z22.union([
4183
+ z22.string(),
4184
+ z22.object({
4185
+ type: z22.string().optional(),
4186
+ code: z22.union([z22.number(), z22.string()]).optional(),
4187
+ message: z22.string().optional()
4084
4188
  }).loose()
4085
4189
  ]).nullish(),
4086
- approval_request_id: z21.string().nullish()
4190
+ approval_request_id: z22.string().nullish()
4087
4191
  }),
4088
- z21.object({
4089
- type: z21.literal("mcp_list_tools"),
4090
- id: z21.string(),
4091
- server_label: z21.string(),
4092
- tools: z21.array(
4093
- z21.object({
4094
- name: z21.string(),
4095
- description: z21.string().optional(),
4096
- input_schema: z21.any(),
4097
- annotations: z21.record(z21.string(), z21.unknown()).optional()
4192
+ z22.object({
4193
+ type: z22.literal("mcp_list_tools"),
4194
+ id: z22.string(),
4195
+ server_label: z22.string(),
4196
+ tools: z22.array(
4197
+ z22.object({
4198
+ name: z22.string(),
4199
+ description: z22.string().optional(),
4200
+ input_schema: z22.any(),
4201
+ annotations: z22.record(z22.string(), z22.unknown()).optional()
4098
4202
  })
4099
4203
  ),
4100
- error: z21.union([
4101
- z21.string(),
4102
- z21.object({
4103
- type: z21.string().optional(),
4104
- code: z21.union([z21.number(), z21.string()]).optional(),
4105
- message: z21.string().optional()
4204
+ error: z22.union([
4205
+ z22.string(),
4206
+ z22.object({
4207
+ type: z22.string().optional(),
4208
+ code: z22.union([z22.number(), z22.string()]).optional(),
4209
+ message: z22.string().optional()
4106
4210
  }).loose()
4107
4211
  ]).optional()
4108
4212
  }),
4109
- z21.object({
4110
- type: z21.literal("mcp_approval_request"),
4111
- id: z21.string(),
4112
- server_label: z21.string(),
4113
- name: z21.string(),
4114
- arguments: z21.string(),
4115
- approval_request_id: z21.string().optional()
4213
+ z22.object({
4214
+ type: z22.literal("mcp_approval_request"),
4215
+ id: z22.string(),
4216
+ server_label: z22.string(),
4217
+ name: z22.string(),
4218
+ arguments: z22.string(),
4219
+ approval_request_id: z22.string().optional()
4116
4220
  }),
4117
- z21.object({
4118
- type: z21.literal("apply_patch_call"),
4119
- id: z21.string(),
4120
- call_id: z21.string(),
4121
- status: z21.enum(["in_progress", "completed"]),
4122
- operation: z21.discriminatedUnion("type", [
4123
- z21.object({
4124
- type: z21.literal("create_file"),
4125
- path: z21.string(),
4126
- diff: z21.string()
4221
+ z22.object({
4222
+ type: z22.literal("apply_patch_call"),
4223
+ id: z22.string(),
4224
+ call_id: z22.string(),
4225
+ status: z22.enum(["in_progress", "completed"]),
4226
+ operation: z22.discriminatedUnion("type", [
4227
+ z22.object({
4228
+ type: z22.literal("create_file"),
4229
+ path: z22.string(),
4230
+ diff: z22.string()
4127
4231
  }),
4128
- z21.object({
4129
- type: z21.literal("delete_file"),
4130
- path: z21.string()
4232
+ z22.object({
4233
+ type: z22.literal("delete_file"),
4234
+ path: z22.string()
4131
4235
  }),
4132
- z21.object({
4133
- type: z21.literal("update_file"),
4134
- path: z21.string(),
4135
- diff: z21.string()
4236
+ z22.object({
4237
+ type: z22.literal("update_file"),
4238
+ path: z22.string(),
4239
+ diff: z22.string()
4136
4240
  })
4137
4241
  ])
4138
4242
  }),
4139
- z21.object({
4140
- type: z21.literal("shell_call"),
4141
- id: z21.string(),
4142
- call_id: z21.string(),
4143
- status: z21.enum(["in_progress", "completed", "incomplete"]),
4144
- action: z21.object({
4145
- commands: z21.array(z21.string())
4243
+ z22.object({
4244
+ type: z22.literal("shell_call"),
4245
+ id: z22.string(),
4246
+ call_id: z22.string(),
4247
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
4248
+ action: z22.object({
4249
+ commands: z22.array(z22.string())
4146
4250
  })
4147
4251
  }),
4148
- z21.object({
4149
- type: z21.literal("shell_call_output"),
4150
- id: z21.string(),
4151
- call_id: z21.string(),
4152
- status: z21.enum(["in_progress", "completed", "incomplete"]),
4153
- output: z21.array(
4154
- z21.object({
4155
- stdout: z21.string(),
4156
- stderr: z21.string(),
4157
- outcome: z21.discriminatedUnion("type", [
4158
- z21.object({ type: z21.literal("timeout") }),
4159
- z21.object({
4160
- type: z21.literal("exit"),
4161
- exit_code: z21.number()
4252
+ z22.object({
4253
+ type: z22.literal("shell_call_output"),
4254
+ id: z22.string(),
4255
+ call_id: z22.string(),
4256
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
4257
+ output: z22.array(
4258
+ z22.object({
4259
+ stdout: z22.string(),
4260
+ stderr: z22.string(),
4261
+ outcome: z22.discriminatedUnion("type", [
4262
+ z22.object({ type: z22.literal("timeout") }),
4263
+ z22.object({
4264
+ type: z22.literal("exit"),
4265
+ exit_code: z22.number()
4162
4266
  })
4163
4267
  ])
4164
4268
  })
4165
4269
  )
4166
4270
  }),
4167
- z21.object({
4168
- type: z21.literal("tool_search_call"),
4169
- id: z21.string(),
4170
- execution: z21.enum(["server", "client"]),
4171
- call_id: z21.string().nullable(),
4172
- status: z21.enum(["in_progress", "completed", "incomplete"]),
4173
- arguments: z21.unknown()
4271
+ z22.object({
4272
+ type: z22.literal("tool_search_call"),
4273
+ id: z22.string(),
4274
+ execution: z22.enum(["server", "client"]),
4275
+ call_id: z22.string().nullable(),
4276
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
4277
+ arguments: z22.unknown()
4174
4278
  }),
4175
- z21.object({
4176
- type: z21.literal("tool_search_output"),
4177
- id: z21.string(),
4178
- execution: z21.enum(["server", "client"]),
4179
- call_id: z21.string().nullable(),
4180
- status: z21.enum(["in_progress", "completed", "incomplete"]),
4181
- tools: z21.array(z21.record(z21.string(), jsonValueSchema2.optional()))
4279
+ z22.object({
4280
+ type: z22.literal("tool_search_output"),
4281
+ id: z22.string(),
4282
+ execution: z22.enum(["server", "client"]),
4283
+ call_id: z22.string().nullable(),
4284
+ status: z22.enum(["in_progress", "completed", "incomplete"]),
4285
+ tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
4182
4286
  })
4183
4287
  ])
4184
4288
  ).optional(),
4185
- service_tier: z21.string().nullish(),
4186
- incomplete_details: z21.object({ reason: z21.string() }).nullish(),
4187
- usage: z21.object({
4188
- input_tokens: z21.number(),
4189
- input_tokens_details: z21.object({ cached_tokens: z21.number().nullish() }).nullish(),
4190
- output_tokens: z21.number(),
4191
- output_tokens_details: z21.object({ reasoning_tokens: z21.number().nullish() }).nullish()
4289
+ service_tier: z22.string().nullish(),
4290
+ incomplete_details: z22.object({ reason: z22.string() }).nullish(),
4291
+ usage: z22.object({
4292
+ input_tokens: z22.number(),
4293
+ input_tokens_details: z22.object({ cached_tokens: z22.number().nullish() }).nullish(),
4294
+ output_tokens: z22.number(),
4295
+ output_tokens_details: z22.object({ reasoning_tokens: z22.number().nullish() }).nullish()
4192
4296
  }).optional()
4193
4297
  })
4194
4298
  )
4195
4299
  );
4196
4300
 
4197
4301
  // src/responses/openai-responses-options.ts
4198
- import { lazySchema as lazySchema20, zodSchema as zodSchema20 } from "@ai-sdk/provider-utils";
4199
- import { z as z22 } from "zod/v4";
4302
+ import {
4303
+ lazySchema as lazySchema21,
4304
+ zodSchema as zodSchema21
4305
+ } from "@ai-sdk/provider-utils";
4306
+ import { z as z23 } from "zod/v4";
4200
4307
  var TOP_LOGPROBS_MAX = 20;
4201
4308
  var openaiResponsesReasoningModelIds = [
4202
4309
  "o1",
@@ -4261,9 +4368,9 @@ var openaiResponsesModelIds = [
4261
4368
  "gpt-5-chat-latest",
4262
4369
  ...openaiResponsesReasoningModelIds
4263
4370
  ];
4264
- var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4265
- () => zodSchema20(
4266
- z22.object({
4371
+ var openaiLanguageModelResponsesOptionsSchema = lazySchema21(
4372
+ () => zodSchema21(
4373
+ z23.object({
4267
4374
  /**
4268
4375
  * The ID of the OpenAI Conversation to continue.
4269
4376
  * You must create a conversation first via the OpenAI API.
@@ -4271,13 +4378,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4271
4378
  * Defaults to `undefined`.
4272
4379
  * @see https://platform.openai.com/docs/api-reference/conversations/create
4273
4380
  */
4274
- conversation: z22.string().nullish(),
4381
+ conversation: z23.string().nullish(),
4275
4382
  /**
4276
4383
  * The set of extra fields to include in the response (advanced, usually not needed).
4277
4384
  * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
4278
4385
  */
4279
- include: z22.array(
4280
- z22.enum([
4386
+ include: z23.array(
4387
+ z23.enum([
4281
4388
  "reasoning.encrypted_content",
4282
4389
  // handled internally by default, only needed for unknown reasoning models
4283
4390
  "file_search_call.results",
@@ -4289,7 +4396,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4289
4396
  * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
4290
4397
  * Defaults to `undefined`.
4291
4398
  */
4292
- instructions: z22.string().nullish(),
4399
+ instructions: z23.string().nullish(),
4293
4400
  /**
4294
4401
  * Return the log probabilities of the tokens. Including logprobs will increase
4295
4402
  * the response size and can slow down response times. However, it can
@@ -4304,30 +4411,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4304
4411
  * @see https://platform.openai.com/docs/api-reference/responses/create
4305
4412
  * @see https://cookbook.openai.com/examples/using_logprobs
4306
4413
  */
4307
- logprobs: z22.union([z22.boolean(), z22.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4414
+ logprobs: z23.union([z23.boolean(), z23.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4308
4415
  /**
4309
4416
  * The maximum number of total calls to built-in tools that can be processed in a response.
4310
4417
  * This maximum number applies across all built-in tool calls, not per individual tool.
4311
4418
  * Any further attempts to call a tool by the model will be ignored.
4312
4419
  */
4313
- maxToolCalls: z22.number().nullish(),
4420
+ maxToolCalls: z23.number().nullish(),
4314
4421
  /**
4315
4422
  * Additional metadata to store with the generation.
4316
4423
  */
4317
- metadata: z22.any().nullish(),
4424
+ metadata: z23.any().nullish(),
4318
4425
  /**
4319
4426
  * Whether to use parallel tool calls. Defaults to `true`.
4320
4427
  */
4321
- parallelToolCalls: z22.boolean().nullish(),
4428
+ parallelToolCalls: z23.boolean().nullish(),
4322
4429
  /**
4323
4430
  * The ID of the previous response. You can use it to continue a conversation.
4324
4431
  * Defaults to `undefined`.
4325
4432
  */
4326
- previousResponseId: z22.string().nullish(),
4433
+ previousResponseId: z23.string().nullish(),
4327
4434
  /**
4328
4435
  * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
4329
4436
  */
4330
- promptCacheKey: z22.string().nullish(),
4437
+ promptCacheKey: z23.string().nullish(),
4331
4438
  /**
4332
4439
  * The retention policy for the prompt cache.
4333
4440
  * - 'in_memory': Default. Standard prompt caching behavior.
@@ -4336,7 +4443,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4336
4443
  *
4337
4444
  * @default 'in_memory'
4338
4445
  */
4339
- promptCacheRetention: z22.enum(["in_memory", "24h"]).nullish(),
4446
+ promptCacheRetention: z23.enum(["in_memory", "24h"]).nullish(),
4340
4447
  /**
4341
4448
  * Reasoning effort for reasoning models. Defaults to `medium`. If you use
4342
4449
  * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
@@ -4347,17 +4454,17 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4347
4454
  * OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in
4348
4455
  * an error.
4349
4456
  */
4350
- reasoningEffort: z22.string().nullish(),
4457
+ reasoningEffort: z23.string().nullish(),
4351
4458
  /**
4352
4459
  * Controls reasoning summary output from the model.
4353
4460
  * Set to "auto" to automatically receive the richest level available,
4354
4461
  * or "detailed" for comprehensive summaries.
4355
4462
  */
4356
- reasoningSummary: z22.string().nullish(),
4463
+ reasoningSummary: z23.string().nullish(),
4357
4464
  /**
4358
4465
  * The identifier for safety monitoring and tracking.
4359
4466
  */
4360
- safetyIdentifier: z22.string().nullish(),
4467
+ safetyIdentifier: z23.string().nullish(),
4361
4468
  /**
4362
4469
  * Service tier for the request.
4363
4470
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
@@ -4365,34 +4472,34 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4365
4472
  *
4366
4473
  * Defaults to 'auto'.
4367
4474
  */
4368
- serviceTier: z22.enum(["auto", "flex", "priority", "default"]).nullish(),
4475
+ serviceTier: z23.enum(["auto", "flex", "priority", "default"]).nullish(),
4369
4476
  /**
4370
4477
  * Whether to store the generation. Defaults to `true`.
4371
4478
  */
4372
- store: z22.boolean().nullish(),
4479
+ store: z23.boolean().nullish(),
4373
4480
  /**
4374
4481
  * Whether to use strict JSON schema validation.
4375
4482
  * Defaults to `true`.
4376
4483
  */
4377
- strictJsonSchema: z22.boolean().nullish(),
4484
+ strictJsonSchema: z23.boolean().nullish(),
4378
4485
  /**
4379
4486
  * Controls the verbosity of the model's responses. Lower values ('low') will result
4380
4487
  * in more concise responses, while higher values ('high') will result in more verbose responses.
4381
4488
  * Valid values: 'low', 'medium', 'high'.
4382
4489
  */
4383
- textVerbosity: z22.enum(["low", "medium", "high"]).nullish(),
4490
+ textVerbosity: z23.enum(["low", "medium", "high"]).nullish(),
4384
4491
  /**
4385
4492
  * Controls output truncation. 'auto' (default) performs truncation automatically;
4386
4493
  * 'disabled' turns truncation off.
4387
4494
  */
4388
- truncation: z22.enum(["auto", "disabled"]).nullish(),
4495
+ truncation: z23.enum(["auto", "disabled"]).nullish(),
4389
4496
  /**
4390
4497
  * A unique identifier representing your end-user, which can help OpenAI to
4391
4498
  * monitor and detect abuse.
4392
4499
  * Defaults to `undefined`.
4393
4500
  * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
4394
4501
  */
4395
- user: z22.string().nullish(),
4502
+ user: z23.string().nullish(),
4396
4503
  /**
4397
4504
  * Override the system message mode for this model.
4398
4505
  * - 'system': Use the 'system' role for system messages (default for most models)
@@ -4401,7 +4508,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4401
4508
  *
4402
4509
  * If not specified, the mode is automatically determined based on the model.
4403
4510
  */
4404
- systemMessageMode: z22.enum(["system", "developer", "remove"]).optional(),
4511
+ systemMessageMode: z23.enum(["system", "developer", "remove"]).optional(),
4405
4512
  /**
4406
4513
  * Force treating this model as a reasoning model.
4407
4514
  *
@@ -4411,7 +4518,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
4411
4518
  * When enabled, the SDK applies reasoning-model parameter compatibility rules
4412
4519
  * and defaults `systemMessageMode` to `developer` unless overridden.
4413
4520
  */
4414
- forceReasoning: z22.boolean().optional()
4521
+ forceReasoning: z23.boolean().optional()
4415
4522
  })
4416
4523
  )
4417
4524
  );
@@ -4753,13 +4860,13 @@ var OpenAIResponsesLanguageModel = class {
4753
4860
  warnings.push({ type: "unsupported", feature: "stopSequences" });
4754
4861
  }
4755
4862
  const providerOptionsName = this.config.provider.includes("azure") ? "azure" : "openai";
4756
- let openaiOptions = await parseProviderOptions5({
4863
+ let openaiOptions = await parseProviderOptions6({
4757
4864
  provider: providerOptionsName,
4758
4865
  providerOptions,
4759
4866
  schema: openaiLanguageModelResponsesOptionsSchema
4760
4867
  });
4761
4868
  if (openaiOptions == null && providerOptionsName !== "openai") {
4762
- openaiOptions = await parseProviderOptions5({
4869
+ openaiOptions = await parseProviderOptions6({
4763
4870
  provider: "openai",
4764
4871
  providerOptions,
4765
4872
  schema: openaiLanguageModelResponsesOptionsSchema
@@ -6385,18 +6492,21 @@ function escapeJSONDelta(delta) {
6385
6492
  import {
6386
6493
  combineHeaders as combineHeaders6,
6387
6494
  createBinaryResponseHandler,
6388
- parseProviderOptions as parseProviderOptions6,
6495
+ parseProviderOptions as parseProviderOptions7,
6389
6496
  postJsonToApi as postJsonToApi6
6390
6497
  } from "@ai-sdk/provider-utils";
6391
6498
 
6392
6499
  // src/speech/openai-speech-options.ts
6393
- import { lazySchema as lazySchema21, zodSchema as zodSchema21 } from "@ai-sdk/provider-utils";
6394
- import { z as z23 } from "zod/v4";
6395
- var openaiSpeechModelOptionsSchema = lazySchema21(
6396
- () => zodSchema21(
6397
- z23.object({
6398
- instructions: z23.string().nullish(),
6399
- speed: z23.number().min(0.25).max(4).default(1).nullish()
6500
+ import {
6501
+ lazySchema as lazySchema22,
6502
+ zodSchema as zodSchema22
6503
+ } from "@ai-sdk/provider-utils";
6504
+ import { z as z24 } from "zod/v4";
6505
+ var openaiSpeechModelOptionsSchema = lazySchema22(
6506
+ () => zodSchema22(
6507
+ z24.object({
6508
+ instructions: z24.string().nullish(),
6509
+ speed: z24.number().min(0.25).max(4).default(1).nullish()
6400
6510
  })
6401
6511
  )
6402
6512
  );
@@ -6421,7 +6531,7 @@ var OpenAISpeechModel = class {
6421
6531
  providerOptions
6422
6532
  }) {
6423
6533
  const warnings = [];
6424
- const openAIOptions = await parseProviderOptions6({
6534
+ const openAIOptions = await parseProviderOptions7({
6425
6535
  provider: "openai",
6426
6536
  providerOptions,
6427
6537
  schema: openaiSpeechModelOptionsSchema
@@ -6508,38 +6618,38 @@ import {
6508
6618
  convertBase64ToUint8Array as convertBase64ToUint8Array2,
6509
6619
  createJsonResponseHandler as createJsonResponseHandler6,
6510
6620
  mediaTypeToExtension,
6511
- parseProviderOptions as parseProviderOptions7,
6621
+ parseProviderOptions as parseProviderOptions8,
6512
6622
  postFormDataToApi as postFormDataToApi2
6513
6623
  } from "@ai-sdk/provider-utils";
6514
6624
 
6515
6625
  // src/transcription/openai-transcription-api.ts
6516
- import { lazySchema as lazySchema22, zodSchema as zodSchema22 } from "@ai-sdk/provider-utils";
6517
- import { z as z24 } from "zod/v4";
6518
- var openaiTranscriptionResponseSchema = lazySchema22(
6519
- () => zodSchema22(
6520
- z24.object({
6521
- text: z24.string(),
6522
- language: z24.string().nullish(),
6523
- duration: z24.number().nullish(),
6524
- words: z24.array(
6525
- z24.object({
6526
- word: z24.string(),
6527
- start: z24.number(),
6528
- end: z24.number()
6626
+ import { lazySchema as lazySchema23, zodSchema as zodSchema23 } from "@ai-sdk/provider-utils";
6627
+ import { z as z25 } from "zod/v4";
6628
+ var openaiTranscriptionResponseSchema = lazySchema23(
6629
+ () => zodSchema23(
6630
+ z25.object({
6631
+ text: z25.string(),
6632
+ language: z25.string().nullish(),
6633
+ duration: z25.number().nullish(),
6634
+ words: z25.array(
6635
+ z25.object({
6636
+ word: z25.string(),
6637
+ start: z25.number(),
6638
+ end: z25.number()
6529
6639
  })
6530
6640
  ).nullish(),
6531
- segments: z24.array(
6532
- z24.object({
6533
- id: z24.number(),
6534
- seek: z24.number(),
6535
- start: z24.number(),
6536
- end: z24.number(),
6537
- text: z24.string(),
6538
- tokens: z24.array(z24.number()),
6539
- temperature: z24.number(),
6540
- avg_logprob: z24.number(),
6541
- compression_ratio: z24.number(),
6542
- no_speech_prob: z24.number()
6641
+ segments: z25.array(
6642
+ z25.object({
6643
+ id: z25.number(),
6644
+ seek: z25.number(),
6645
+ start: z25.number(),
6646
+ end: z25.number(),
6647
+ text: z25.string(),
6648
+ tokens: z25.array(z25.number()),
6649
+ temperature: z25.number(),
6650
+ avg_logprob: z25.number(),
6651
+ compression_ratio: z25.number(),
6652
+ no_speech_prob: z25.number()
6543
6653
  })
6544
6654
  ).nullish()
6545
6655
  })
@@ -6547,33 +6657,36 @@ var openaiTranscriptionResponseSchema = lazySchema22(
6547
6657
  );
6548
6658
 
6549
6659
  // src/transcription/openai-transcription-options.ts
6550
- import { lazySchema as lazySchema23, zodSchema as zodSchema23 } from "@ai-sdk/provider-utils";
6551
- import { z as z25 } from "zod/v4";
6552
- var openAITranscriptionModelOptions = lazySchema23(
6553
- () => zodSchema23(
6554
- z25.object({
6660
+ import {
6661
+ lazySchema as lazySchema24,
6662
+ zodSchema as zodSchema24
6663
+ } from "@ai-sdk/provider-utils";
6664
+ import { z as z26 } from "zod/v4";
6665
+ var openAITranscriptionModelOptions = lazySchema24(
6666
+ () => zodSchema24(
6667
+ z26.object({
6555
6668
  /**
6556
6669
  * Additional information to include in the transcription response.
6557
6670
  */
6558
- include: z25.array(z25.string()).optional(),
6671
+ include: z26.array(z26.string()).optional(),
6559
6672
  /**
6560
6673
  * The language of the input audio in ISO-639-1 format.
6561
6674
  */
6562
- language: z25.string().optional(),
6675
+ language: z26.string().optional(),
6563
6676
  /**
6564
6677
  * An optional text to guide the model's style or continue a previous audio segment.
6565
6678
  */
6566
- prompt: z25.string().optional(),
6679
+ prompt: z26.string().optional(),
6567
6680
  /**
6568
6681
  * The sampling temperature, between 0 and 1.
6569
6682
  * @default 0
6570
6683
  */
6571
- temperature: z25.number().min(0).max(1).default(0).optional(),
6684
+ temperature: z26.number().min(0).max(1).default(0).optional(),
6572
6685
  /**
6573
6686
  * The timestamp granularities to populate for this transcription.
6574
6687
  * @default ['segment']
6575
6688
  */
6576
- timestampGranularities: z25.array(z25.enum(["word", "segment"])).default(["segment"]).optional()
6689
+ timestampGranularities: z26.array(z26.enum(["word", "segment"])).default(["segment"]).optional()
6577
6690
  })
6578
6691
  )
6579
6692
  );
@@ -6653,7 +6766,7 @@ var OpenAITranscriptionModel = class {
6653
6766
  providerOptions
6654
6767
  }) {
6655
6768
  const warnings = [];
6656
- const openAIOptions = await parseProviderOptions7({
6769
+ const openAIOptions = await parseProviderOptions8({
6657
6770
  provider: "openai",
6658
6771
  providerOptions,
6659
6772
  schema: openAITranscriptionModelOptions
@@ -6746,7 +6859,7 @@ var OpenAITranscriptionModel = class {
6746
6859
  };
6747
6860
 
6748
6861
  // src/version.ts
6749
- var VERSION = true ? "3.0.54" : "0.0.0-test";
6862
+ var VERSION = true ? "3.0.57" : "0.0.0-test";
6750
6863
 
6751
6864
  // src/openai-provider.ts
6752
6865
  function createOpenAI(options = {}) {