@ai-sdk/openai 4.0.0-beta.41 → 4.0.0-beta.44

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 (28) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/index.d.ts +30 -1
  3. package/dist/index.js +1207 -1107
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.d.ts +30 -1
  6. package/dist/internal/index.js +1189 -1086
  7. package/dist/internal/index.js.map +1 -1
  8. package/docs/03-openai.mdx +12 -3
  9. package/package.json +2 -2
  10. package/src/chat/openai-chat-language-model.ts +1 -1
  11. package/src/completion/openai-completion-language-model.ts +1 -1
  12. package/src/embedding/openai-embedding-model.ts +1 -1
  13. package/src/image/openai-image-model-options.ts +123 -0
  14. package/src/image/openai-image-model.ts +40 -77
  15. package/src/index.ts +11 -6
  16. package/src/internal/index.ts +6 -6
  17. package/src/openai-provider.ts +7 -7
  18. package/src/responses/openai-responses-api.ts +3 -0
  19. package/src/responses/openai-responses-language-model.ts +12 -1
  20. package/src/speech/openai-speech-model.ts +1 -1
  21. package/src/transcription/openai-transcription-model.ts +1 -1
  22. package/src/image/openai-image-options.ts +0 -34
  23. /package/src/chat/{openai-chat-options.ts → openai-chat-language-model-options.ts} +0 -0
  24. /package/src/completion/{openai-completion-options.ts → openai-completion-language-model-options.ts} +0 -0
  25. /package/src/embedding/{openai-embedding-options.ts → openai-embedding-model-options.ts} +0 -0
  26. /package/src/responses/{openai-responses-options.ts → openai-responses-language-model-options.ts} +0 -0
  27. /package/src/speech/{openai-speech-options.ts → openai-speech-model-options.ts} +0 -0
  28. /package/src/transcription/{openai-transcription-options.ts → openai-transcription-model-options.ts} +0 -0
package/dist/index.js CHANGED
@@ -489,7 +489,7 @@ var openaiChatChunkSchema = lazySchema(
489
489
  )
490
490
  );
491
491
 
492
- // src/chat/openai-chat-options.ts
492
+ // src/chat/openai-chat-language-model-options.ts
493
493
  import {
494
494
  lazySchema as lazySchema2,
495
495
  zodSchema as zodSchema2
@@ -1310,7 +1310,7 @@ var openaiCompletionChunkSchema = lazySchema3(
1310
1310
  )
1311
1311
  );
1312
1312
 
1313
- // src/completion/openai-completion-options.ts
1313
+ // src/completion/openai-completion-language-model-options.ts
1314
1314
  import {
1315
1315
  lazySchema as lazySchema4,
1316
1316
  zodSchema as zodSchema4
@@ -1614,7 +1614,7 @@ import {
1614
1614
  WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE3
1615
1615
  } from "@ai-sdk/provider-utils";
1616
1616
 
1617
- // src/embedding/openai-embedding-options.ts
1617
+ // src/embedding/openai-embedding-model-options.ts
1618
1618
  import {
1619
1619
  lazySchema as lazySchema5,
1620
1620
  zodSchema as zodSchema5
@@ -1841,6 +1841,7 @@ import {
1841
1841
  convertToFormData,
1842
1842
  createJsonResponseHandler as createJsonResponseHandler5,
1843
1843
  downloadBlob,
1844
+ parseProviderOptions as parseProviderOptions5,
1844
1845
  postFormDataToApi as postFormDataToApi2,
1845
1846
  postJsonToApi as postJsonToApi4,
1846
1847
  serializeModelOptions as serializeModelOptions4,
@@ -1878,7 +1879,12 @@ var openaiImageResponseSchema = lazySchema9(
1878
1879
  )
1879
1880
  );
1880
1881
 
1881
- // src/image/openai-image-options.ts
1882
+ // src/image/openai-image-model-options.ts
1883
+ import {
1884
+ lazySchema as lazySchema10,
1885
+ zodSchema as zodSchema10
1886
+ } from "@ai-sdk/provider-utils";
1887
+ import { z as z11 } from "zod/v4";
1882
1888
  var modelMaxImagesPerCall = {
1883
1889
  "dall-e-3": 1,
1884
1890
  "dall-e-2": 10,
@@ -1900,6 +1906,65 @@ function hasDefaultResponseFormat(modelId) {
1900
1906
  (prefix) => modelId.startsWith(prefix)
1901
1907
  );
1902
1908
  }
1909
+ var baseImageModelOptionsObject = z11.object({
1910
+ /**
1911
+ * Quality of the generated image(s).
1912
+ *
1913
+ * Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
1914
+ */
1915
+ quality: z11.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
1916
+ /**
1917
+ * Background behavior for the generated image(s).
1918
+ *
1919
+ * If `transparent`, the output format must support transparency
1920
+ * (i.e. `png` or `webp`).
1921
+ */
1922
+ background: z11.enum(["transparent", "opaque", "auto"]).optional(),
1923
+ /**
1924
+ * Format in which the generated image(s) are returned.
1925
+ */
1926
+ outputFormat: z11.enum(["png", "jpeg", "webp"]).optional(),
1927
+ /**
1928
+ * Compression level (0-100) for the generated image(s). Applies to the
1929
+ * `jpeg` and `webp` output formats.
1930
+ */
1931
+ outputCompression: z11.number().int().min(0).max(100).optional(),
1932
+ /**
1933
+ * A unique identifier representing your end-user, which can help OpenAI
1934
+ * to monitor and detect abuse.
1935
+ */
1936
+ user: z11.string().optional()
1937
+ });
1938
+ var openaiImageModelOptions = lazySchema10(
1939
+ () => zodSchema10(baseImageModelOptionsObject)
1940
+ );
1941
+ var openaiImageModelGenerationOptions = lazySchema10(
1942
+ () => zodSchema10(
1943
+ baseImageModelOptionsObject.extend({
1944
+ /**
1945
+ * Style of the generated image. `vivid` produces hyper-real and
1946
+ * dramatic images; `natural` produces more subdued, less hyper-real
1947
+ * looking images.
1948
+ */
1949
+ style: z11.enum(["vivid", "natural"]).optional(),
1950
+ /**
1951
+ * Content moderation level for the generated image(s). `low` applies
1952
+ * less restrictive filtering.
1953
+ */
1954
+ moderation: z11.enum(["auto", "low"]).optional()
1955
+ })
1956
+ )
1957
+ );
1958
+ var openaiImageModelEditOptions = lazySchema10(
1959
+ () => zodSchema10(
1960
+ baseImageModelOptionsObject.extend({
1961
+ /**
1962
+ * Fidelity of the output image(s) to the input image(s).
1963
+ */
1964
+ inputFidelity: z11.enum(["high", "low"]).optional()
1965
+ })
1966
+ )
1967
+ );
1903
1968
 
1904
1969
  // src/image/openai-image-model.ts
1905
1970
  var OpenAIImageModel = class _OpenAIImageModel {
@@ -1950,12 +2015,17 @@ var OpenAIImageModel = class _OpenAIImageModel {
1950
2015
  }
1951
2016
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
1952
2017
  if (files != null) {
2018
+ const openaiOptions2 = (_d = await parseProviderOptions5({
2019
+ provider: "openai",
2020
+ providerOptions,
2021
+ schema: openaiImageModelEditOptions
2022
+ })) != null ? _d : {};
1953
2023
  const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi2({
1954
2024
  url: this.config.url({
1955
2025
  path: "/images/edits",
1956
2026
  modelId: this.modelId
1957
2027
  }),
1958
- headers: combineHeaders5((_e = (_d = this.config).headers) == null ? void 0 : _e.call(_d), headers),
2028
+ headers: combineHeaders5((_f = (_e = this.config).headers) == null ? void 0 : _f.call(_e), headers),
1959
2029
  formData: convertToFormData({
1960
2030
  model: this.modelId,
1961
2031
  prompt,
@@ -1976,7 +2046,12 @@ var OpenAIImageModel = class _OpenAIImageModel {
1976
2046
  mask: mask != null ? await fileToBlob(mask) : void 0,
1977
2047
  n,
1978
2048
  size,
1979
- ...(_f = providerOptions.openai) != null ? _f : {}
2049
+ quality: openaiOptions2.quality,
2050
+ background: openaiOptions2.background,
2051
+ output_format: openaiOptions2.outputFormat,
2052
+ output_compression: openaiOptions2.outputCompression,
2053
+ input_fidelity: openaiOptions2.inputFidelity,
2054
+ user: openaiOptions2.user
1980
2055
  }),
1981
2056
  failedResponseHandler: openaiFailedResponseHandler,
1982
2057
  successfulResponseHandler: createJsonResponseHandler5(
@@ -2020,18 +2095,29 @@ var OpenAIImageModel = class _OpenAIImageModel {
2020
2095
  }
2021
2096
  };
2022
2097
  }
2098
+ const openaiOptions = (_j = await parseProviderOptions5({
2099
+ provider: "openai",
2100
+ providerOptions,
2101
+ schema: openaiImageModelGenerationOptions
2102
+ })) != null ? _j : {};
2023
2103
  const { value: response, responseHeaders } = await postJsonToApi4({
2024
2104
  url: this.config.url({
2025
2105
  path: "/images/generations",
2026
2106
  modelId: this.modelId
2027
2107
  }),
2028
- headers: combineHeaders5((_k = (_j = this.config).headers) == null ? void 0 : _k.call(_j), headers),
2108
+ headers: combineHeaders5((_l = (_k = this.config).headers) == null ? void 0 : _l.call(_k), headers),
2029
2109
  body: {
2030
2110
  model: this.modelId,
2031
2111
  prompt,
2032
2112
  n,
2033
2113
  size,
2034
- ...(_l = providerOptions.openai) != null ? _l : {},
2114
+ quality: openaiOptions.quality,
2115
+ style: openaiOptions.style,
2116
+ background: openaiOptions.background,
2117
+ moderation: openaiOptions.moderation,
2118
+ output_format: openaiOptions.outputFormat,
2119
+ output_compression: openaiOptions.outputCompression,
2120
+ user: openaiOptions.user,
2035
2121
  ...!hasDefaultResponseFormat(this.modelId) ? { response_format: "b64_json" } : {}
2036
2122
  },
2037
2123
  failedResponseHandler: openaiFailedResponseHandler,
@@ -2106,42 +2192,42 @@ async function fileToBlob(file) {
2106
2192
  // src/tool/apply-patch.ts
2107
2193
  import {
2108
2194
  createProviderDefinedToolFactoryWithOutputSchema,
2109
- lazySchema as lazySchema10,
2110
- zodSchema as zodSchema10
2195
+ lazySchema as lazySchema11,
2196
+ zodSchema as zodSchema11
2111
2197
  } from "@ai-sdk/provider-utils";
2112
- import { z as z11 } from "zod/v4";
2113
- var applyPatchInputSchema = lazySchema10(
2114
- () => zodSchema10(
2115
- z11.object({
2116
- callId: z11.string(),
2117
- operation: z11.discriminatedUnion("type", [
2118
- z11.object({
2119
- type: z11.literal("create_file"),
2120
- path: z11.string(),
2121
- diff: z11.string()
2198
+ import { z as z12 } from "zod/v4";
2199
+ var applyPatchInputSchema = lazySchema11(
2200
+ () => zodSchema11(
2201
+ z12.object({
2202
+ callId: z12.string(),
2203
+ operation: z12.discriminatedUnion("type", [
2204
+ z12.object({
2205
+ type: z12.literal("create_file"),
2206
+ path: z12.string(),
2207
+ diff: z12.string()
2122
2208
  }),
2123
- z11.object({
2124
- type: z11.literal("delete_file"),
2125
- path: z11.string()
2209
+ z12.object({
2210
+ type: z12.literal("delete_file"),
2211
+ path: z12.string()
2126
2212
  }),
2127
- z11.object({
2128
- type: z11.literal("update_file"),
2129
- path: z11.string(),
2130
- diff: z11.string()
2213
+ z12.object({
2214
+ type: z12.literal("update_file"),
2215
+ path: z12.string(),
2216
+ diff: z12.string()
2131
2217
  })
2132
2218
  ])
2133
2219
  })
2134
2220
  )
2135
2221
  );
2136
- var applyPatchOutputSchema = lazySchema10(
2137
- () => zodSchema10(
2138
- z11.object({
2139
- status: z11.enum(["completed", "failed"]),
2140
- output: z11.string().optional()
2222
+ var applyPatchOutputSchema = lazySchema11(
2223
+ () => zodSchema11(
2224
+ z12.object({
2225
+ status: z12.enum(["completed", "failed"]),
2226
+ output: z12.string().optional()
2141
2227
  })
2142
2228
  )
2143
2229
  );
2144
- var applyPatchArgsSchema = lazySchema10(() => zodSchema10(z11.object({})));
2230
+ var applyPatchArgsSchema = lazySchema11(() => zodSchema11(z12.object({})));
2145
2231
  var applyPatchToolFactory = createProviderDefinedToolFactoryWithOutputSchema({
2146
2232
  id: "openai.apply_patch",
2147
2233
  inputSchema: applyPatchInputSchema,
@@ -2152,37 +2238,37 @@ var applyPatch = applyPatchToolFactory;
2152
2238
  // src/tool/code-interpreter.ts
2153
2239
  import {
2154
2240
  createProviderExecutedToolFactory,
2155
- lazySchema as lazySchema11,
2156
- zodSchema as zodSchema11
2241
+ lazySchema as lazySchema12,
2242
+ zodSchema as zodSchema12
2157
2243
  } from "@ai-sdk/provider-utils";
2158
- import { z as z12 } from "zod/v4";
2159
- var codeInterpreterInputSchema = lazySchema11(
2160
- () => zodSchema11(
2161
- z12.object({
2162
- code: z12.string().nullish(),
2163
- containerId: z12.string()
2244
+ import { z as z13 } from "zod/v4";
2245
+ var codeInterpreterInputSchema = lazySchema12(
2246
+ () => zodSchema12(
2247
+ z13.object({
2248
+ code: z13.string().nullish(),
2249
+ containerId: z13.string()
2164
2250
  })
2165
2251
  )
2166
2252
  );
2167
- var codeInterpreterOutputSchema = lazySchema11(
2168
- () => zodSchema11(
2169
- z12.object({
2170
- outputs: z12.array(
2171
- z12.discriminatedUnion("type", [
2172
- z12.object({ type: z12.literal("logs"), logs: z12.string() }),
2173
- z12.object({ type: z12.literal("image"), url: z12.string() })
2253
+ var codeInterpreterOutputSchema = lazySchema12(
2254
+ () => zodSchema12(
2255
+ z13.object({
2256
+ outputs: z13.array(
2257
+ z13.discriminatedUnion("type", [
2258
+ z13.object({ type: z13.literal("logs"), logs: z13.string() }),
2259
+ z13.object({ type: z13.literal("image"), url: z13.string() })
2174
2260
  ])
2175
2261
  ).nullish()
2176
2262
  })
2177
2263
  )
2178
2264
  );
2179
- var codeInterpreterArgsSchema = lazySchema11(
2180
- () => zodSchema11(
2181
- z12.object({
2182
- container: z12.union([
2183
- z12.string(),
2184
- z12.object({
2185
- fileIds: z12.array(z12.string()).optional()
2265
+ var codeInterpreterArgsSchema = lazySchema12(
2266
+ () => zodSchema12(
2267
+ z13.object({
2268
+ container: z13.union([
2269
+ z13.string(),
2270
+ z13.object({
2271
+ fileIds: z13.array(z13.string()).optional()
2186
2272
  })
2187
2273
  ]).optional()
2188
2274
  })
@@ -2200,28 +2286,28 @@ var codeInterpreter = (args = {}) => {
2200
2286
  // src/tool/custom.ts
2201
2287
  import {
2202
2288
  createProviderDefinedToolFactory,
2203
- lazySchema as lazySchema12,
2204
- zodSchema as zodSchema12
2289
+ lazySchema as lazySchema13,
2290
+ zodSchema as zodSchema13
2205
2291
  } from "@ai-sdk/provider-utils";
2206
- import { z as z13 } from "zod/v4";
2207
- var customArgsSchema = lazySchema12(
2208
- () => zodSchema12(
2209
- z13.object({
2210
- description: z13.string().optional(),
2211
- format: z13.union([
2212
- z13.object({
2213
- type: z13.literal("grammar"),
2214
- syntax: z13.enum(["regex", "lark"]),
2215
- definition: z13.string()
2292
+ import { z as z14 } from "zod/v4";
2293
+ var customArgsSchema = lazySchema13(
2294
+ () => zodSchema13(
2295
+ z14.object({
2296
+ description: z14.string().optional(),
2297
+ format: z14.union([
2298
+ z14.object({
2299
+ type: z14.literal("grammar"),
2300
+ syntax: z14.enum(["regex", "lark"]),
2301
+ definition: z14.string()
2216
2302
  }),
2217
- z13.object({
2218
- type: z13.literal("text")
2303
+ z14.object({
2304
+ type: z14.literal("text")
2219
2305
  })
2220
2306
  ]).optional()
2221
2307
  })
2222
2308
  )
2223
2309
  );
2224
- var customInputSchema = lazySchema12(() => zodSchema12(z13.string()));
2310
+ var customInputSchema = lazySchema13(() => zodSchema13(z14.string()));
2225
2311
  var customToolFactory = createProviderDefinedToolFactory({
2226
2312
  id: "openai.custom",
2227
2313
  inputSchema: customInputSchema
@@ -2231,45 +2317,45 @@ var customTool = (args) => customToolFactory(args);
2231
2317
  // src/tool/file-search.ts
2232
2318
  import {
2233
2319
  createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
2234
- lazySchema as lazySchema13,
2235
- zodSchema as zodSchema13
2320
+ lazySchema as lazySchema14,
2321
+ zodSchema as zodSchema14
2236
2322
  } from "@ai-sdk/provider-utils";
2237
- import { z as z14 } from "zod/v4";
2238
- var comparisonFilterSchema = z14.object({
2239
- key: z14.string(),
2240
- type: z14.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
2241
- value: z14.union([z14.string(), z14.number(), z14.boolean(), z14.array(z14.string())])
2323
+ import { z as z15 } from "zod/v4";
2324
+ var comparisonFilterSchema = z15.object({
2325
+ key: z15.string(),
2326
+ type: z15.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
2327
+ value: z15.union([z15.string(), z15.number(), z15.boolean(), z15.array(z15.string())])
2242
2328
  });
2243
- var compoundFilterSchema = z14.object({
2244
- type: z14.enum(["and", "or"]),
2245
- filters: z14.array(
2246
- z14.union([comparisonFilterSchema, z14.lazy(() => compoundFilterSchema)])
2329
+ var compoundFilterSchema = z15.object({
2330
+ type: z15.enum(["and", "or"]),
2331
+ filters: z15.array(
2332
+ z15.union([comparisonFilterSchema, z15.lazy(() => compoundFilterSchema)])
2247
2333
  )
2248
2334
  });
2249
- var fileSearchArgsSchema = lazySchema13(
2250
- () => zodSchema13(
2251
- z14.object({
2252
- vectorStoreIds: z14.array(z14.string()),
2253
- maxNumResults: z14.number().optional(),
2254
- ranking: z14.object({
2255
- ranker: z14.string().optional(),
2256
- scoreThreshold: z14.number().optional()
2335
+ var fileSearchArgsSchema = lazySchema14(
2336
+ () => zodSchema14(
2337
+ z15.object({
2338
+ vectorStoreIds: z15.array(z15.string()),
2339
+ maxNumResults: z15.number().optional(),
2340
+ ranking: z15.object({
2341
+ ranker: z15.string().optional(),
2342
+ scoreThreshold: z15.number().optional()
2257
2343
  }).optional(),
2258
- filters: z14.union([comparisonFilterSchema, compoundFilterSchema]).optional()
2344
+ filters: z15.union([comparisonFilterSchema, compoundFilterSchema]).optional()
2259
2345
  })
2260
2346
  )
2261
2347
  );
2262
- var fileSearchOutputSchema = lazySchema13(
2263
- () => zodSchema13(
2264
- z14.object({
2265
- queries: z14.array(z14.string()),
2266
- results: z14.array(
2267
- z14.object({
2268
- attributes: z14.record(z14.string(), z14.unknown()),
2269
- fileId: z14.string(),
2270
- filename: z14.string(),
2271
- score: z14.number(),
2272
- text: z14.string()
2348
+ var fileSearchOutputSchema = lazySchema14(
2349
+ () => zodSchema14(
2350
+ z15.object({
2351
+ queries: z15.array(z15.string()),
2352
+ results: z15.array(
2353
+ z15.object({
2354
+ attributes: z15.record(z15.string(), z15.unknown()),
2355
+ fileId: z15.string(),
2356
+ filename: z15.string(),
2357
+ score: z15.number(),
2358
+ text: z15.string()
2273
2359
  })
2274
2360
  ).nullable()
2275
2361
  })
@@ -2277,39 +2363,39 @@ var fileSearchOutputSchema = lazySchema13(
2277
2363
  );
2278
2364
  var fileSearch = createProviderExecutedToolFactory2({
2279
2365
  id: "openai.file_search",
2280
- inputSchema: z14.object({}),
2366
+ inputSchema: z15.object({}),
2281
2367
  outputSchema: fileSearchOutputSchema
2282
2368
  });
2283
2369
 
2284
2370
  // src/tool/image-generation.ts
2285
2371
  import {
2286
2372
  createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
2287
- lazySchema as lazySchema14,
2288
- zodSchema as zodSchema14
2373
+ lazySchema as lazySchema15,
2374
+ zodSchema as zodSchema15
2289
2375
  } from "@ai-sdk/provider-utils";
2290
- import { z as z15 } from "zod/v4";
2291
- var imageGenerationArgsSchema = lazySchema14(
2292
- () => zodSchema14(
2293
- z15.object({
2294
- background: z15.enum(["auto", "opaque", "transparent"]).optional(),
2295
- inputFidelity: z15.enum(["low", "high"]).optional(),
2296
- inputImageMask: z15.object({
2297
- fileId: z15.string().optional(),
2298
- imageUrl: z15.string().optional()
2376
+ import { z as z16 } from "zod/v4";
2377
+ var imageGenerationArgsSchema = lazySchema15(
2378
+ () => zodSchema15(
2379
+ z16.object({
2380
+ background: z16.enum(["auto", "opaque", "transparent"]).optional(),
2381
+ inputFidelity: z16.enum(["low", "high"]).optional(),
2382
+ inputImageMask: z16.object({
2383
+ fileId: z16.string().optional(),
2384
+ imageUrl: z16.string().optional()
2299
2385
  }).optional(),
2300
- model: z15.string().optional(),
2301
- moderation: z15.enum(["auto"]).optional(),
2302
- outputCompression: z15.number().int().min(0).max(100).optional(),
2303
- outputFormat: z15.enum(["png", "jpeg", "webp"]).optional(),
2304
- partialImages: z15.number().int().min(0).max(3).optional(),
2305
- quality: z15.enum(["auto", "low", "medium", "high"]).optional(),
2306
- size: z15.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
2386
+ model: z16.string().optional(),
2387
+ moderation: z16.enum(["auto"]).optional(),
2388
+ outputCompression: z16.number().int().min(0).max(100).optional(),
2389
+ outputFormat: z16.enum(["png", "jpeg", "webp"]).optional(),
2390
+ partialImages: z16.number().int().min(0).max(3).optional(),
2391
+ quality: z16.enum(["auto", "low", "medium", "high"]).optional(),
2392
+ size: z16.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
2307
2393
  }).strict()
2308
2394
  )
2309
2395
  );
2310
- var imageGenerationInputSchema = lazySchema14(() => zodSchema14(z15.object({})));
2311
- var imageGenerationOutputSchema = lazySchema14(
2312
- () => zodSchema14(z15.object({ result: z15.string() }))
2396
+ var imageGenerationInputSchema = lazySchema15(() => zodSchema15(z16.object({})));
2397
+ var imageGenerationOutputSchema = lazySchema15(
2398
+ () => zodSchema15(z16.object({ result: z16.string() }))
2313
2399
  );
2314
2400
  var imageGenerationToolFactory = createProviderExecutedToolFactory3({
2315
2401
  id: "openai.image_generation",
@@ -2323,26 +2409,26 @@ var imageGeneration = (args = {}) => {
2323
2409
  // src/tool/local-shell.ts
2324
2410
  import {
2325
2411
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
2326
- lazySchema as lazySchema15,
2327
- zodSchema as zodSchema15
2412
+ lazySchema as lazySchema16,
2413
+ zodSchema as zodSchema16
2328
2414
  } from "@ai-sdk/provider-utils";
2329
- import { z as z16 } from "zod/v4";
2330
- var localShellInputSchema = lazySchema15(
2331
- () => zodSchema15(
2332
- z16.object({
2333
- action: z16.object({
2334
- type: z16.literal("exec"),
2335
- command: z16.array(z16.string()),
2336
- timeoutMs: z16.number().optional(),
2337
- user: z16.string().optional(),
2338
- workingDirectory: z16.string().optional(),
2339
- env: z16.record(z16.string(), z16.string()).optional()
2415
+ import { z as z17 } from "zod/v4";
2416
+ var localShellInputSchema = lazySchema16(
2417
+ () => zodSchema16(
2418
+ z17.object({
2419
+ action: z17.object({
2420
+ type: z17.literal("exec"),
2421
+ command: z17.array(z17.string()),
2422
+ timeoutMs: z17.number().optional(),
2423
+ user: z17.string().optional(),
2424
+ workingDirectory: z17.string().optional(),
2425
+ env: z17.record(z17.string(), z17.string()).optional()
2340
2426
  })
2341
2427
  })
2342
2428
  )
2343
2429
  );
2344
- var localShellOutputSchema = lazySchema15(
2345
- () => zodSchema15(z16.object({ output: z16.string() }))
2430
+ var localShellOutputSchema = lazySchema16(
2431
+ () => zodSchema16(z17.object({ output: z17.string() }))
2346
2432
  );
2347
2433
  var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
2348
2434
  id: "openai.local_shell",
@@ -2353,91 +2439,91 @@ var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
2353
2439
  // src/tool/shell.ts
2354
2440
  import {
2355
2441
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
2356
- lazySchema as lazySchema16,
2357
- zodSchema as zodSchema16
2442
+ lazySchema as lazySchema17,
2443
+ zodSchema as zodSchema17
2358
2444
  } from "@ai-sdk/provider-utils";
2359
- import { z as z17 } from "zod/v4";
2360
- var shellInputSchema = lazySchema16(
2361
- () => zodSchema16(
2362
- z17.object({
2363
- action: z17.object({
2364
- commands: z17.array(z17.string()),
2365
- timeoutMs: z17.number().optional(),
2366
- maxOutputLength: z17.number().optional()
2445
+ import { z as z18 } from "zod/v4";
2446
+ var shellInputSchema = lazySchema17(
2447
+ () => zodSchema17(
2448
+ z18.object({
2449
+ action: z18.object({
2450
+ commands: z18.array(z18.string()),
2451
+ timeoutMs: z18.number().optional(),
2452
+ maxOutputLength: z18.number().optional()
2367
2453
  })
2368
2454
  })
2369
2455
  )
2370
2456
  );
2371
- var shellOutputSchema = lazySchema16(
2372
- () => zodSchema16(
2373
- z17.object({
2374
- output: z17.array(
2375
- z17.object({
2376
- stdout: z17.string(),
2377
- stderr: z17.string(),
2378
- outcome: z17.discriminatedUnion("type", [
2379
- z17.object({ type: z17.literal("timeout") }),
2380
- z17.object({ type: z17.literal("exit"), exitCode: z17.number() })
2457
+ var shellOutputSchema = lazySchema17(
2458
+ () => zodSchema17(
2459
+ z18.object({
2460
+ output: z18.array(
2461
+ z18.object({
2462
+ stdout: z18.string(),
2463
+ stderr: z18.string(),
2464
+ outcome: z18.discriminatedUnion("type", [
2465
+ z18.object({ type: z18.literal("timeout") }),
2466
+ z18.object({ type: z18.literal("exit"), exitCode: z18.number() })
2381
2467
  ])
2382
2468
  })
2383
2469
  )
2384
2470
  })
2385
2471
  )
2386
2472
  );
2387
- var shellSkillsSchema = z17.array(
2388
- z17.discriminatedUnion("type", [
2389
- z17.object({
2390
- type: z17.literal("skillReference"),
2391
- providerReference: z17.record(z17.string(), z17.string()),
2392
- version: z17.string().optional()
2473
+ var shellSkillsSchema = z18.array(
2474
+ z18.discriminatedUnion("type", [
2475
+ z18.object({
2476
+ type: z18.literal("skillReference"),
2477
+ providerReference: z18.record(z18.string(), z18.string()),
2478
+ version: z18.string().optional()
2393
2479
  }),
2394
- z17.object({
2395
- type: z17.literal("inline"),
2396
- name: z17.string(),
2397
- description: z17.string(),
2398
- source: z17.object({
2399
- type: z17.literal("base64"),
2400
- mediaType: z17.literal("application/zip"),
2401
- data: z17.string()
2480
+ z18.object({
2481
+ type: z18.literal("inline"),
2482
+ name: z18.string(),
2483
+ description: z18.string(),
2484
+ source: z18.object({
2485
+ type: z18.literal("base64"),
2486
+ mediaType: z18.literal("application/zip"),
2487
+ data: z18.string()
2402
2488
  })
2403
2489
  })
2404
2490
  ])
2405
2491
  ).optional();
2406
- var shellArgsSchema = lazySchema16(
2407
- () => zodSchema16(
2408
- z17.object({
2409
- environment: z17.union([
2410
- z17.object({
2411
- type: z17.literal("containerAuto"),
2412
- fileIds: z17.array(z17.string()).optional(),
2413
- memoryLimit: z17.enum(["1g", "4g", "16g", "64g"]).optional(),
2414
- networkPolicy: z17.discriminatedUnion("type", [
2415
- z17.object({ type: z17.literal("disabled") }),
2416
- z17.object({
2417
- type: z17.literal("allowlist"),
2418
- allowedDomains: z17.array(z17.string()),
2419
- domainSecrets: z17.array(
2420
- z17.object({
2421
- domain: z17.string(),
2422
- name: z17.string(),
2423
- value: z17.string()
2492
+ var shellArgsSchema = lazySchema17(
2493
+ () => zodSchema17(
2494
+ z18.object({
2495
+ environment: z18.union([
2496
+ z18.object({
2497
+ type: z18.literal("containerAuto"),
2498
+ fileIds: z18.array(z18.string()).optional(),
2499
+ memoryLimit: z18.enum(["1g", "4g", "16g", "64g"]).optional(),
2500
+ networkPolicy: z18.discriminatedUnion("type", [
2501
+ z18.object({ type: z18.literal("disabled") }),
2502
+ z18.object({
2503
+ type: z18.literal("allowlist"),
2504
+ allowedDomains: z18.array(z18.string()),
2505
+ domainSecrets: z18.array(
2506
+ z18.object({
2507
+ domain: z18.string(),
2508
+ name: z18.string(),
2509
+ value: z18.string()
2424
2510
  })
2425
2511
  ).optional()
2426
2512
  })
2427
2513
  ]).optional(),
2428
2514
  skills: shellSkillsSchema
2429
2515
  }),
2430
- z17.object({
2431
- type: z17.literal("containerReference"),
2432
- containerId: z17.string()
2516
+ z18.object({
2517
+ type: z18.literal("containerReference"),
2518
+ containerId: z18.string()
2433
2519
  }),
2434
- z17.object({
2435
- type: z17.literal("local").optional(),
2436
- skills: z17.array(
2437
- z17.object({
2438
- name: z17.string(),
2439
- description: z17.string(),
2440
- path: z17.string()
2520
+ z18.object({
2521
+ type: z18.literal("local").optional(),
2522
+ skills: z18.array(
2523
+ z18.object({
2524
+ name: z18.string(),
2525
+ description: z18.string(),
2526
+ path: z18.string()
2441
2527
  })
2442
2528
  ).optional()
2443
2529
  })
@@ -2454,31 +2540,31 @@ var shell = createProviderDefinedToolFactoryWithOutputSchema3({
2454
2540
  // src/tool/tool-search.ts
2455
2541
  import {
2456
2542
  createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
2457
- lazySchema as lazySchema17,
2458
- zodSchema as zodSchema17
2543
+ lazySchema as lazySchema18,
2544
+ zodSchema as zodSchema18
2459
2545
  } from "@ai-sdk/provider-utils";
2460
- import { z as z18 } from "zod/v4";
2461
- var toolSearchArgsSchema = lazySchema17(
2462
- () => zodSchema17(
2463
- z18.object({
2464
- execution: z18.enum(["server", "client"]).optional(),
2465
- description: z18.string().optional(),
2466
- parameters: z18.record(z18.string(), z18.unknown()).optional()
2546
+ import { z as z19 } from "zod/v4";
2547
+ var toolSearchArgsSchema = lazySchema18(
2548
+ () => zodSchema18(
2549
+ z19.object({
2550
+ execution: z19.enum(["server", "client"]).optional(),
2551
+ description: z19.string().optional(),
2552
+ parameters: z19.record(z19.string(), z19.unknown()).optional()
2467
2553
  })
2468
2554
  )
2469
2555
  );
2470
- var toolSearchInputSchema = lazySchema17(
2471
- () => zodSchema17(
2472
- z18.object({
2473
- arguments: z18.unknown().optional(),
2474
- call_id: z18.string().nullish()
2556
+ var toolSearchInputSchema = lazySchema18(
2557
+ () => zodSchema18(
2558
+ z19.object({
2559
+ arguments: z19.unknown().optional(),
2560
+ call_id: z19.string().nullish()
2475
2561
  })
2476
2562
  )
2477
2563
  );
2478
- var toolSearchOutputSchema = lazySchema17(
2479
- () => zodSchema17(
2480
- z18.object({
2481
- tools: z18.array(z18.record(z18.string(), z18.unknown()))
2564
+ var toolSearchOutputSchema = lazySchema18(
2565
+ () => zodSchema18(
2566
+ z19.object({
2567
+ tools: z19.array(z19.record(z19.string(), z19.unknown()))
2482
2568
  })
2483
2569
  )
2484
2570
  );
@@ -2492,71 +2578,15 @@ var toolSearch = (args = {}) => toolSearchToolFactory(args);
2492
2578
  // src/tool/web-search.ts
2493
2579
  import {
2494
2580
  createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
2495
- lazySchema as lazySchema18,
2496
- zodSchema as zodSchema18
2497
- } from "@ai-sdk/provider-utils";
2498
- import { z as z19 } from "zod/v4";
2499
- var webSearchArgsSchema = lazySchema18(
2500
- () => zodSchema18(
2501
- z19.object({
2502
- externalWebAccess: z19.boolean().optional(),
2503
- filters: z19.object({ allowedDomains: z19.array(z19.string()).optional() }).optional(),
2504
- searchContextSize: z19.enum(["low", "medium", "high"]).optional(),
2505
- userLocation: z19.object({
2506
- type: z19.literal("approximate"),
2507
- country: z19.string().optional(),
2508
- city: z19.string().optional(),
2509
- region: z19.string().optional(),
2510
- timezone: z19.string().optional()
2511
- }).optional()
2512
- })
2513
- )
2514
- );
2515
- var webSearchInputSchema = lazySchema18(() => zodSchema18(z19.object({})));
2516
- var webSearchOutputSchema = lazySchema18(
2517
- () => zodSchema18(
2518
- z19.object({
2519
- action: z19.discriminatedUnion("type", [
2520
- z19.object({
2521
- type: z19.literal("search"),
2522
- query: z19.string().optional()
2523
- }),
2524
- z19.object({
2525
- type: z19.literal("openPage"),
2526
- url: z19.string().nullish()
2527
- }),
2528
- z19.object({
2529
- type: z19.literal("findInPage"),
2530
- url: z19.string().nullish(),
2531
- pattern: z19.string().nullish()
2532
- })
2533
- ]).optional(),
2534
- sources: z19.array(
2535
- z19.discriminatedUnion("type", [
2536
- z19.object({ type: z19.literal("url"), url: z19.string() }),
2537
- z19.object({ type: z19.literal("api"), name: z19.string() })
2538
- ])
2539
- ).optional()
2540
- })
2541
- )
2542
- );
2543
- var webSearchToolFactory = createProviderExecutedToolFactory4({
2544
- id: "openai.web_search",
2545
- inputSchema: webSearchInputSchema,
2546
- outputSchema: webSearchOutputSchema
2547
- });
2548
- var webSearch = (args = {}) => webSearchToolFactory(args);
2549
-
2550
- // src/tool/web-search-preview.ts
2551
- import {
2552
- createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
2553
2581
  lazySchema as lazySchema19,
2554
2582
  zodSchema as zodSchema19
2555
2583
  } from "@ai-sdk/provider-utils";
2556
2584
  import { z as z20 } from "zod/v4";
2557
- var webSearchPreviewArgsSchema = lazySchema19(
2585
+ var webSearchArgsSchema = lazySchema19(
2558
2586
  () => zodSchema19(
2559
2587
  z20.object({
2588
+ externalWebAccess: z20.boolean().optional(),
2589
+ filters: z20.object({ allowedDomains: z20.array(z20.string()).optional() }).optional(),
2560
2590
  searchContextSize: z20.enum(["low", "medium", "high"]).optional(),
2561
2591
  userLocation: z20.object({
2562
2592
  type: z20.literal("approximate"),
@@ -2568,10 +2598,8 @@ var webSearchPreviewArgsSchema = lazySchema19(
2568
2598
  })
2569
2599
  )
2570
2600
  );
2571
- var webSearchPreviewInputSchema = lazySchema19(
2572
- () => zodSchema19(z20.object({}))
2573
- );
2574
- var webSearchPreviewOutputSchema = lazySchema19(
2601
+ var webSearchInputSchema = lazySchema19(() => zodSchema19(z20.object({})));
2602
+ var webSearchOutputSchema = lazySchema19(
2575
2603
  () => zodSchema19(
2576
2604
  z20.object({
2577
2605
  action: z20.discriminatedUnion("type", [
@@ -2588,6 +2616,64 @@ var webSearchPreviewOutputSchema = lazySchema19(
2588
2616
  url: z20.string().nullish(),
2589
2617
  pattern: z20.string().nullish()
2590
2618
  })
2619
+ ]).optional(),
2620
+ sources: z20.array(
2621
+ z20.discriminatedUnion("type", [
2622
+ z20.object({ type: z20.literal("url"), url: z20.string() }),
2623
+ z20.object({ type: z20.literal("api"), name: z20.string() })
2624
+ ])
2625
+ ).optional()
2626
+ })
2627
+ )
2628
+ );
2629
+ var webSearchToolFactory = createProviderExecutedToolFactory4({
2630
+ id: "openai.web_search",
2631
+ inputSchema: webSearchInputSchema,
2632
+ outputSchema: webSearchOutputSchema
2633
+ });
2634
+ var webSearch = (args = {}) => webSearchToolFactory(args);
2635
+
2636
+ // src/tool/web-search-preview.ts
2637
+ import {
2638
+ createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
2639
+ lazySchema as lazySchema20,
2640
+ zodSchema as zodSchema20
2641
+ } from "@ai-sdk/provider-utils";
2642
+ import { z as z21 } from "zod/v4";
2643
+ var webSearchPreviewArgsSchema = lazySchema20(
2644
+ () => zodSchema20(
2645
+ z21.object({
2646
+ searchContextSize: z21.enum(["low", "medium", "high"]).optional(),
2647
+ userLocation: z21.object({
2648
+ type: z21.literal("approximate"),
2649
+ country: z21.string().optional(),
2650
+ city: z21.string().optional(),
2651
+ region: z21.string().optional(),
2652
+ timezone: z21.string().optional()
2653
+ }).optional()
2654
+ })
2655
+ )
2656
+ );
2657
+ var webSearchPreviewInputSchema = lazySchema20(
2658
+ () => zodSchema20(z21.object({}))
2659
+ );
2660
+ var webSearchPreviewOutputSchema = lazySchema20(
2661
+ () => zodSchema20(
2662
+ z21.object({
2663
+ action: z21.discriminatedUnion("type", [
2664
+ z21.object({
2665
+ type: z21.literal("search"),
2666
+ query: z21.string().optional()
2667
+ }),
2668
+ z21.object({
2669
+ type: z21.literal("openPage"),
2670
+ url: z21.string().nullish()
2671
+ }),
2672
+ z21.object({
2673
+ type: z21.literal("findInPage"),
2674
+ url: z21.string().nullish(),
2675
+ pattern: z21.string().nullish()
2676
+ })
2591
2677
  ]).optional()
2592
2678
  })
2593
2679
  )
@@ -2601,60 +2687,60 @@ var webSearchPreview = createProviderExecutedToolFactory5({
2601
2687
  // src/tool/mcp.ts
2602
2688
  import {
2603
2689
  createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
2604
- lazySchema as lazySchema20,
2605
- zodSchema as zodSchema20
2690
+ lazySchema as lazySchema21,
2691
+ zodSchema as zodSchema21
2606
2692
  } from "@ai-sdk/provider-utils";
2607
- import { z as z21 } from "zod/v4";
2608
- var jsonValueSchema = z21.lazy(
2609
- () => z21.union([
2610
- z21.string(),
2611
- z21.number(),
2612
- z21.boolean(),
2613
- z21.null(),
2614
- z21.array(jsonValueSchema),
2615
- z21.record(z21.string(), jsonValueSchema)
2693
+ import { z as z22 } from "zod/v4";
2694
+ var jsonValueSchema = z22.lazy(
2695
+ () => z22.union([
2696
+ z22.string(),
2697
+ z22.number(),
2698
+ z22.boolean(),
2699
+ z22.null(),
2700
+ z22.array(jsonValueSchema),
2701
+ z22.record(z22.string(), jsonValueSchema)
2616
2702
  ])
2617
2703
  );
2618
- var mcpArgsSchema = lazySchema20(
2619
- () => zodSchema20(
2620
- z21.object({
2621
- serverLabel: z21.string(),
2622
- allowedTools: z21.union([
2623
- z21.array(z21.string()),
2624
- z21.object({
2625
- readOnly: z21.boolean().optional(),
2626
- toolNames: z21.array(z21.string()).optional()
2704
+ var mcpArgsSchema = lazySchema21(
2705
+ () => zodSchema21(
2706
+ z22.object({
2707
+ serverLabel: z22.string(),
2708
+ allowedTools: z22.union([
2709
+ z22.array(z22.string()),
2710
+ z22.object({
2711
+ readOnly: z22.boolean().optional(),
2712
+ toolNames: z22.array(z22.string()).optional()
2627
2713
  })
2628
2714
  ]).optional(),
2629
- authorization: z21.string().optional(),
2630
- connectorId: z21.string().optional(),
2631
- headers: z21.record(z21.string(), z21.string()).optional(),
2632
- requireApproval: z21.union([
2633
- z21.enum(["always", "never"]),
2634
- z21.object({
2635
- never: z21.object({
2636
- toolNames: z21.array(z21.string()).optional()
2715
+ authorization: z22.string().optional(),
2716
+ connectorId: z22.string().optional(),
2717
+ headers: z22.record(z22.string(), z22.string()).optional(),
2718
+ requireApproval: z22.union([
2719
+ z22.enum(["always", "never"]),
2720
+ z22.object({
2721
+ never: z22.object({
2722
+ toolNames: z22.array(z22.string()).optional()
2637
2723
  }).optional()
2638
2724
  })
2639
2725
  ]).optional(),
2640
- serverDescription: z21.string().optional(),
2641
- serverUrl: z21.string().optional()
2726
+ serverDescription: z22.string().optional(),
2727
+ serverUrl: z22.string().optional()
2642
2728
  }).refine(
2643
2729
  (v) => v.serverUrl != null || v.connectorId != null,
2644
2730
  "One of serverUrl or connectorId must be provided."
2645
2731
  )
2646
2732
  )
2647
2733
  );
2648
- var mcpInputSchema = lazySchema20(() => zodSchema20(z21.object({})));
2649
- var mcpOutputSchema = lazySchema20(
2650
- () => zodSchema20(
2651
- z21.object({
2652
- type: z21.literal("call"),
2653
- serverLabel: z21.string(),
2654
- name: z21.string(),
2655
- arguments: z21.string(),
2656
- output: z21.string().nullish(),
2657
- error: z21.union([z21.string(), jsonValueSchema]).optional()
2734
+ var mcpInputSchema = lazySchema21(() => zodSchema21(z22.object({})));
2735
+ var mcpOutputSchema = lazySchema21(
2736
+ () => zodSchema21(
2737
+ z22.object({
2738
+ type: z22.literal("call"),
2739
+ serverLabel: z22.string(),
2740
+ name: z22.string(),
2741
+ arguments: z22.string(),
2742
+ output: z22.string().nullish(),
2743
+ error: z22.union([z22.string(), jsonValueSchema]).optional()
2658
2744
  })
2659
2745
  )
2660
2746
  );
@@ -2793,7 +2879,7 @@ import {
2793
2879
  createToolNameMapping,
2794
2880
  generateId as generateId2,
2795
2881
  isCustomReasoning as isCustomReasoning2,
2796
- parseProviderOptions as parseProviderOptions6,
2882
+ parseProviderOptions as parseProviderOptions7,
2797
2883
  postJsonToApi as postJsonToApi5,
2798
2884
  serializeModelOptions as serializeModelOptions5,
2799
2885
  WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE5,
@@ -2848,12 +2934,12 @@ import {
2848
2934
  getTopLevelMediaType as getTopLevelMediaType2,
2849
2935
  isNonNullable,
2850
2936
  parseJSON,
2851
- parseProviderOptions as parseProviderOptions5,
2937
+ parseProviderOptions as parseProviderOptions6,
2852
2938
  resolveFullMediaType as resolveFullMediaType2,
2853
2939
  resolveProviderReference as resolveProviderReference2,
2854
2940
  validateTypes
2855
2941
  } from "@ai-sdk/provider-utils";
2856
- import { z as z22 } from "zod/v4";
2942
+ import { z as z23 } from "zod/v4";
2857
2943
  function serializeToolCallArguments2(input) {
2858
2944
  return JSON.stringify(input === void 0 ? {} : input);
2859
2945
  }
@@ -3178,7 +3264,7 @@ async function convertToOpenAIResponsesInput({
3178
3264
  break;
3179
3265
  }
3180
3266
  case "reasoning": {
3181
- const providerOptions = await parseProviderOptions5({
3267
+ const providerOptions = await parseProviderOptions6({
3182
3268
  provider: providerOptionsName,
3183
3269
  providerOptions: part.providerOptions,
3184
3270
  schema: openaiResponsesReasoningProviderOptionsSchema
@@ -3510,9 +3596,9 @@ async function convertToOpenAIResponsesInput({
3510
3596
  }
3511
3597
  return { input, warnings };
3512
3598
  }
3513
- var openaiResponsesReasoningProviderOptionsSchema = z22.object({
3514
- itemId: z22.string().nullish(),
3515
- reasoningEncryptedContent: z22.string().nullish()
3599
+ var openaiResponsesReasoningProviderOptionsSchema = z23.object({
3600
+ itemId: z23.string().nullish(),
3601
+ reasoningEncryptedContent: z23.string().nullish()
3516
3602
  });
3517
3603
 
3518
3604
  // src/responses/map-openai-responses-finish-reason.ts
@@ -3535,554 +3621,556 @@ function mapOpenAIResponseFinishReason({
3535
3621
 
3536
3622
  // src/responses/openai-responses-api.ts
3537
3623
  import {
3538
- lazySchema as lazySchema21,
3539
- zodSchema as zodSchema21
3624
+ lazySchema as lazySchema22,
3625
+ zodSchema as zodSchema22
3540
3626
  } from "@ai-sdk/provider-utils";
3541
- import { z as z23 } from "zod/v4";
3542
- var jsonValueSchema2 = z23.lazy(
3543
- () => z23.union([
3544
- z23.string(),
3545
- z23.number(),
3546
- z23.boolean(),
3547
- z23.null(),
3548
- z23.array(jsonValueSchema2),
3549
- z23.record(z23.string(), jsonValueSchema2.optional())
3627
+ import { z as z24 } from "zod/v4";
3628
+ var jsonValueSchema2 = z24.lazy(
3629
+ () => z24.union([
3630
+ z24.string(),
3631
+ z24.number(),
3632
+ z24.boolean(),
3633
+ z24.null(),
3634
+ z24.array(jsonValueSchema2),
3635
+ z24.record(z24.string(), jsonValueSchema2.optional())
3550
3636
  ])
3551
3637
  );
3552
- var openaiResponsesChunkSchema = lazySchema21(
3553
- () => zodSchema21(
3554
- z23.union([
3555
- z23.object({
3556
- type: z23.literal("response.output_text.delta"),
3557
- item_id: z23.string(),
3558
- delta: z23.string(),
3559
- logprobs: z23.array(
3560
- z23.object({
3561
- token: z23.string(),
3562
- logprob: z23.number(),
3563
- top_logprobs: z23.array(
3564
- z23.object({
3565
- token: z23.string(),
3566
- logprob: z23.number()
3638
+ var openaiResponsesChunkSchema = lazySchema22(
3639
+ () => zodSchema22(
3640
+ z24.union([
3641
+ z24.object({
3642
+ type: z24.literal("response.output_text.delta"),
3643
+ item_id: z24.string(),
3644
+ delta: z24.string(),
3645
+ logprobs: z24.array(
3646
+ z24.object({
3647
+ token: z24.string(),
3648
+ logprob: z24.number(),
3649
+ top_logprobs: z24.array(
3650
+ z24.object({
3651
+ token: z24.string(),
3652
+ logprob: z24.number()
3567
3653
  })
3568
3654
  )
3569
3655
  })
3570
3656
  ).nullish()
3571
3657
  }),
3572
- z23.object({
3573
- type: z23.enum(["response.completed", "response.incomplete"]),
3574
- response: z23.object({
3575
- incomplete_details: z23.object({ reason: z23.string() }).nullish(),
3576
- usage: z23.object({
3577
- input_tokens: z23.number(),
3578
- input_tokens_details: z23.object({ cached_tokens: z23.number().nullish() }).nullish(),
3579
- output_tokens: z23.number(),
3580
- output_tokens_details: z23.object({ reasoning_tokens: z23.number().nullish() }).nullish()
3658
+ z24.object({
3659
+ type: z24.enum(["response.completed", "response.incomplete"]),
3660
+ response: z24.object({
3661
+ incomplete_details: z24.object({ reason: z24.string() }).nullish(),
3662
+ usage: z24.object({
3663
+ input_tokens: z24.number(),
3664
+ input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
3665
+ output_tokens: z24.number(),
3666
+ output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
3581
3667
  }),
3582
- service_tier: z23.string().nullish()
3668
+ service_tier: z24.string().nullish()
3583
3669
  })
3584
3670
  }),
3585
- z23.object({
3586
- type: z23.literal("response.failed"),
3587
- response: z23.object({
3588
- error: z23.object({
3589
- code: z23.string().nullish(),
3590
- message: z23.string()
3671
+ z24.object({
3672
+ type: z24.literal("response.failed"),
3673
+ response: z24.object({
3674
+ error: z24.object({
3675
+ code: z24.string().nullish(),
3676
+ message: z24.string()
3591
3677
  }).nullish(),
3592
- incomplete_details: z23.object({ reason: z23.string() }).nullish(),
3593
- usage: z23.object({
3594
- input_tokens: z23.number(),
3595
- input_tokens_details: z23.object({ cached_tokens: z23.number().nullish() }).nullish(),
3596
- output_tokens: z23.number(),
3597
- output_tokens_details: z23.object({ reasoning_tokens: z23.number().nullish() }).nullish()
3678
+ incomplete_details: z24.object({ reason: z24.string() }).nullish(),
3679
+ usage: z24.object({
3680
+ input_tokens: z24.number(),
3681
+ input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
3682
+ output_tokens: z24.number(),
3683
+ output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
3598
3684
  }).nullish(),
3599
- service_tier: z23.string().nullish()
3685
+ service_tier: z24.string().nullish()
3600
3686
  })
3601
3687
  }),
3602
- z23.object({
3603
- type: z23.literal("response.created"),
3604
- response: z23.object({
3605
- id: z23.string(),
3606
- created_at: z23.number(),
3607
- model: z23.string(),
3608
- service_tier: z23.string().nullish()
3688
+ z24.object({
3689
+ type: z24.literal("response.created"),
3690
+ response: z24.object({
3691
+ id: z24.string(),
3692
+ created_at: z24.number(),
3693
+ model: z24.string(),
3694
+ service_tier: z24.string().nullish()
3609
3695
  })
3610
3696
  }),
3611
- z23.object({
3612
- type: z23.literal("response.output_item.added"),
3613
- output_index: z23.number(),
3614
- item: z23.discriminatedUnion("type", [
3615
- z23.object({
3616
- type: z23.literal("message"),
3617
- id: z23.string(),
3618
- phase: z23.enum(["commentary", "final_answer"]).nullish()
3697
+ z24.object({
3698
+ type: z24.literal("response.output_item.added"),
3699
+ output_index: z24.number(),
3700
+ item: z24.discriminatedUnion("type", [
3701
+ z24.object({
3702
+ type: z24.literal("message"),
3703
+ id: z24.string(),
3704
+ phase: z24.enum(["commentary", "final_answer"]).nullish()
3619
3705
  }),
3620
- z23.object({
3621
- type: z23.literal("reasoning"),
3622
- id: z23.string(),
3623
- encrypted_content: z23.string().nullish()
3706
+ z24.object({
3707
+ type: z24.literal("reasoning"),
3708
+ id: z24.string(),
3709
+ encrypted_content: z24.string().nullish()
3624
3710
  }),
3625
- z23.object({
3626
- type: z23.literal("function_call"),
3627
- id: z23.string(),
3628
- call_id: z23.string(),
3629
- name: z23.string(),
3630
- arguments: z23.string()
3711
+ z24.object({
3712
+ type: z24.literal("function_call"),
3713
+ id: z24.string(),
3714
+ call_id: z24.string(),
3715
+ name: z24.string(),
3716
+ arguments: z24.string(),
3717
+ namespace: z24.string().nullish()
3631
3718
  }),
3632
- z23.object({
3633
- type: z23.literal("web_search_call"),
3634
- id: z23.string(),
3635
- status: z23.string()
3719
+ z24.object({
3720
+ type: z24.literal("web_search_call"),
3721
+ id: z24.string(),
3722
+ status: z24.string()
3636
3723
  }),
3637
- z23.object({
3638
- type: z23.literal("computer_call"),
3639
- id: z23.string(),
3640
- status: z23.string()
3724
+ z24.object({
3725
+ type: z24.literal("computer_call"),
3726
+ id: z24.string(),
3727
+ status: z24.string()
3641
3728
  }),
3642
- z23.object({
3643
- type: z23.literal("file_search_call"),
3644
- id: z23.string()
3729
+ z24.object({
3730
+ type: z24.literal("file_search_call"),
3731
+ id: z24.string()
3645
3732
  }),
3646
- z23.object({
3647
- type: z23.literal("image_generation_call"),
3648
- id: z23.string()
3733
+ z24.object({
3734
+ type: z24.literal("image_generation_call"),
3735
+ id: z24.string()
3649
3736
  }),
3650
- z23.object({
3651
- type: z23.literal("code_interpreter_call"),
3652
- id: z23.string(),
3653
- container_id: z23.string(),
3654
- code: z23.string().nullable(),
3655
- outputs: z23.array(
3656
- z23.discriminatedUnion("type", [
3657
- z23.object({ type: z23.literal("logs"), logs: z23.string() }),
3658
- z23.object({ type: z23.literal("image"), url: z23.string() })
3737
+ z24.object({
3738
+ type: z24.literal("code_interpreter_call"),
3739
+ id: z24.string(),
3740
+ container_id: z24.string(),
3741
+ code: z24.string().nullable(),
3742
+ outputs: z24.array(
3743
+ z24.discriminatedUnion("type", [
3744
+ z24.object({ type: z24.literal("logs"), logs: z24.string() }),
3745
+ z24.object({ type: z24.literal("image"), url: z24.string() })
3659
3746
  ])
3660
3747
  ).nullable(),
3661
- status: z23.string()
3748
+ status: z24.string()
3662
3749
  }),
3663
- z23.object({
3664
- type: z23.literal("mcp_call"),
3665
- id: z23.string(),
3666
- status: z23.string(),
3667
- approval_request_id: z23.string().nullish()
3750
+ z24.object({
3751
+ type: z24.literal("mcp_call"),
3752
+ id: z24.string(),
3753
+ status: z24.string(),
3754
+ approval_request_id: z24.string().nullish()
3668
3755
  }),
3669
- z23.object({
3670
- type: z23.literal("mcp_list_tools"),
3671
- id: z23.string()
3756
+ z24.object({
3757
+ type: z24.literal("mcp_list_tools"),
3758
+ id: z24.string()
3672
3759
  }),
3673
- z23.object({
3674
- type: z23.literal("mcp_approval_request"),
3675
- id: z23.string()
3760
+ z24.object({
3761
+ type: z24.literal("mcp_approval_request"),
3762
+ id: z24.string()
3676
3763
  }),
3677
- z23.object({
3678
- type: z23.literal("apply_patch_call"),
3679
- id: z23.string(),
3680
- call_id: z23.string(),
3681
- status: z23.enum(["in_progress", "completed"]),
3682
- operation: z23.discriminatedUnion("type", [
3683
- z23.object({
3684
- type: z23.literal("create_file"),
3685
- path: z23.string(),
3686
- diff: z23.string()
3764
+ z24.object({
3765
+ type: z24.literal("apply_patch_call"),
3766
+ id: z24.string(),
3767
+ call_id: z24.string(),
3768
+ status: z24.enum(["in_progress", "completed"]),
3769
+ operation: z24.discriminatedUnion("type", [
3770
+ z24.object({
3771
+ type: z24.literal("create_file"),
3772
+ path: z24.string(),
3773
+ diff: z24.string()
3687
3774
  }),
3688
- z23.object({
3689
- type: z23.literal("delete_file"),
3690
- path: z23.string()
3775
+ z24.object({
3776
+ type: z24.literal("delete_file"),
3777
+ path: z24.string()
3691
3778
  }),
3692
- z23.object({
3693
- type: z23.literal("update_file"),
3694
- path: z23.string(),
3695
- diff: z23.string()
3779
+ z24.object({
3780
+ type: z24.literal("update_file"),
3781
+ path: z24.string(),
3782
+ diff: z24.string()
3696
3783
  })
3697
3784
  ])
3698
3785
  }),
3699
- z23.object({
3700
- type: z23.literal("custom_tool_call"),
3701
- id: z23.string(),
3702
- call_id: z23.string(),
3703
- name: z23.string(),
3704
- input: z23.string()
3786
+ z24.object({
3787
+ type: z24.literal("custom_tool_call"),
3788
+ id: z24.string(),
3789
+ call_id: z24.string(),
3790
+ name: z24.string(),
3791
+ input: z24.string()
3705
3792
  }),
3706
- z23.object({
3707
- type: z23.literal("shell_call"),
3708
- id: z23.string(),
3709
- call_id: z23.string(),
3710
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3711
- action: z23.object({
3712
- commands: z23.array(z23.string())
3793
+ z24.object({
3794
+ type: z24.literal("shell_call"),
3795
+ id: z24.string(),
3796
+ call_id: z24.string(),
3797
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
3798
+ action: z24.object({
3799
+ commands: z24.array(z24.string())
3713
3800
  })
3714
3801
  }),
3715
- z23.object({
3716
- type: z23.literal("compaction"),
3717
- id: z23.string(),
3718
- encrypted_content: z23.string().nullish()
3802
+ z24.object({
3803
+ type: z24.literal("compaction"),
3804
+ id: z24.string(),
3805
+ encrypted_content: z24.string().nullish()
3719
3806
  }),
3720
- z23.object({
3721
- type: z23.literal("shell_call_output"),
3722
- id: z23.string(),
3723
- call_id: z23.string(),
3724
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3725
- output: z23.array(
3726
- z23.object({
3727
- stdout: z23.string(),
3728
- stderr: z23.string(),
3729
- outcome: z23.discriminatedUnion("type", [
3730
- z23.object({ type: z23.literal("timeout") }),
3731
- z23.object({
3732
- type: z23.literal("exit"),
3733
- exit_code: z23.number()
3807
+ z24.object({
3808
+ type: z24.literal("shell_call_output"),
3809
+ id: z24.string(),
3810
+ call_id: z24.string(),
3811
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
3812
+ output: z24.array(
3813
+ z24.object({
3814
+ stdout: z24.string(),
3815
+ stderr: z24.string(),
3816
+ outcome: z24.discriminatedUnion("type", [
3817
+ z24.object({ type: z24.literal("timeout") }),
3818
+ z24.object({
3819
+ type: z24.literal("exit"),
3820
+ exit_code: z24.number()
3734
3821
  })
3735
3822
  ])
3736
3823
  })
3737
3824
  )
3738
3825
  }),
3739
- z23.object({
3740
- type: z23.literal("tool_search_call"),
3741
- id: z23.string(),
3742
- execution: z23.enum(["server", "client"]),
3743
- call_id: z23.string().nullable(),
3744
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3745
- arguments: z23.unknown()
3826
+ z24.object({
3827
+ type: z24.literal("tool_search_call"),
3828
+ id: z24.string(),
3829
+ execution: z24.enum(["server", "client"]),
3830
+ call_id: z24.string().nullable(),
3831
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
3832
+ arguments: z24.unknown()
3746
3833
  }),
3747
- z23.object({
3748
- type: z23.literal("tool_search_output"),
3749
- id: z23.string(),
3750
- execution: z23.enum(["server", "client"]),
3751
- call_id: z23.string().nullable(),
3752
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3753
- tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
3834
+ z24.object({
3835
+ type: z24.literal("tool_search_output"),
3836
+ id: z24.string(),
3837
+ execution: z24.enum(["server", "client"]),
3838
+ call_id: z24.string().nullable(),
3839
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
3840
+ tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
3754
3841
  })
3755
3842
  ])
3756
3843
  }),
3757
- z23.object({
3758
- type: z23.literal("response.output_item.done"),
3759
- output_index: z23.number(),
3760
- item: z23.discriminatedUnion("type", [
3761
- z23.object({
3762
- type: z23.literal("message"),
3763
- id: z23.string(),
3764
- phase: z23.enum(["commentary", "final_answer"]).nullish()
3844
+ z24.object({
3845
+ type: z24.literal("response.output_item.done"),
3846
+ output_index: z24.number(),
3847
+ item: z24.discriminatedUnion("type", [
3848
+ z24.object({
3849
+ type: z24.literal("message"),
3850
+ id: z24.string(),
3851
+ phase: z24.enum(["commentary", "final_answer"]).nullish()
3765
3852
  }),
3766
- z23.object({
3767
- type: z23.literal("reasoning"),
3768
- id: z23.string(),
3769
- encrypted_content: z23.string().nullish()
3853
+ z24.object({
3854
+ type: z24.literal("reasoning"),
3855
+ id: z24.string(),
3856
+ encrypted_content: z24.string().nullish()
3770
3857
  }),
3771
- z23.object({
3772
- type: z23.literal("function_call"),
3773
- id: z23.string(),
3774
- call_id: z23.string(),
3775
- name: z23.string(),
3776
- arguments: z23.string(),
3777
- status: z23.literal("completed")
3858
+ z24.object({
3859
+ type: z24.literal("function_call"),
3860
+ id: z24.string(),
3861
+ call_id: z24.string(),
3862
+ name: z24.string(),
3863
+ arguments: z24.string(),
3864
+ status: z24.literal("completed"),
3865
+ namespace: z24.string().nullish()
3778
3866
  }),
3779
- z23.object({
3780
- type: z23.literal("custom_tool_call"),
3781
- id: z23.string(),
3782
- call_id: z23.string(),
3783
- name: z23.string(),
3784
- input: z23.string(),
3785
- status: z23.literal("completed")
3867
+ z24.object({
3868
+ type: z24.literal("custom_tool_call"),
3869
+ id: z24.string(),
3870
+ call_id: z24.string(),
3871
+ name: z24.string(),
3872
+ input: z24.string(),
3873
+ status: z24.literal("completed")
3786
3874
  }),
3787
- z23.object({
3788
- type: z23.literal("code_interpreter_call"),
3789
- id: z23.string(),
3790
- code: z23.string().nullable(),
3791
- container_id: z23.string(),
3792
- outputs: z23.array(
3793
- z23.discriminatedUnion("type", [
3794
- z23.object({ type: z23.literal("logs"), logs: z23.string() }),
3795
- z23.object({ type: z23.literal("image"), url: z23.string() })
3875
+ z24.object({
3876
+ type: z24.literal("code_interpreter_call"),
3877
+ id: z24.string(),
3878
+ code: z24.string().nullable(),
3879
+ container_id: z24.string(),
3880
+ outputs: z24.array(
3881
+ z24.discriminatedUnion("type", [
3882
+ z24.object({ type: z24.literal("logs"), logs: z24.string() }),
3883
+ z24.object({ type: z24.literal("image"), url: z24.string() })
3796
3884
  ])
3797
3885
  ).nullable()
3798
3886
  }),
3799
- z23.object({
3800
- type: z23.literal("image_generation_call"),
3801
- id: z23.string(),
3802
- result: z23.string()
3887
+ z24.object({
3888
+ type: z24.literal("image_generation_call"),
3889
+ id: z24.string(),
3890
+ result: z24.string()
3803
3891
  }),
3804
- z23.object({
3805
- type: z23.literal("web_search_call"),
3806
- id: z23.string(),
3807
- status: z23.string(),
3808
- action: z23.discriminatedUnion("type", [
3809
- z23.object({
3810
- type: z23.literal("search"),
3811
- query: z23.string().nullish(),
3812
- sources: z23.array(
3813
- z23.discriminatedUnion("type", [
3814
- z23.object({ type: z23.literal("url"), url: z23.string() }),
3815
- z23.object({ type: z23.literal("api"), name: z23.string() })
3892
+ z24.object({
3893
+ type: z24.literal("web_search_call"),
3894
+ id: z24.string(),
3895
+ status: z24.string(),
3896
+ action: z24.discriminatedUnion("type", [
3897
+ z24.object({
3898
+ type: z24.literal("search"),
3899
+ query: z24.string().nullish(),
3900
+ sources: z24.array(
3901
+ z24.discriminatedUnion("type", [
3902
+ z24.object({ type: z24.literal("url"), url: z24.string() }),
3903
+ z24.object({ type: z24.literal("api"), name: z24.string() })
3816
3904
  ])
3817
3905
  ).nullish()
3818
3906
  }),
3819
- z23.object({
3820
- type: z23.literal("open_page"),
3821
- url: z23.string().nullish()
3907
+ z24.object({
3908
+ type: z24.literal("open_page"),
3909
+ url: z24.string().nullish()
3822
3910
  }),
3823
- z23.object({
3824
- type: z23.literal("find_in_page"),
3825
- url: z23.string().nullish(),
3826
- pattern: z23.string().nullish()
3911
+ z24.object({
3912
+ type: z24.literal("find_in_page"),
3913
+ url: z24.string().nullish(),
3914
+ pattern: z24.string().nullish()
3827
3915
  })
3828
3916
  ]).nullish()
3829
3917
  }),
3830
- z23.object({
3831
- type: z23.literal("file_search_call"),
3832
- id: z23.string(),
3833
- queries: z23.array(z23.string()),
3834
- results: z23.array(
3835
- z23.object({
3836
- attributes: z23.record(
3837
- z23.string(),
3838
- z23.union([z23.string(), z23.number(), z23.boolean()])
3918
+ z24.object({
3919
+ type: z24.literal("file_search_call"),
3920
+ id: z24.string(),
3921
+ queries: z24.array(z24.string()),
3922
+ results: z24.array(
3923
+ z24.object({
3924
+ attributes: z24.record(
3925
+ z24.string(),
3926
+ z24.union([z24.string(), z24.number(), z24.boolean()])
3839
3927
  ),
3840
- file_id: z23.string(),
3841
- filename: z23.string(),
3842
- score: z23.number(),
3843
- text: z23.string()
3928
+ file_id: z24.string(),
3929
+ filename: z24.string(),
3930
+ score: z24.number(),
3931
+ text: z24.string()
3844
3932
  })
3845
3933
  ).nullish()
3846
3934
  }),
3847
- z23.object({
3848
- type: z23.literal("local_shell_call"),
3849
- id: z23.string(),
3850
- call_id: z23.string(),
3851
- action: z23.object({
3852
- type: z23.literal("exec"),
3853
- command: z23.array(z23.string()),
3854
- timeout_ms: z23.number().optional(),
3855
- user: z23.string().optional(),
3856
- working_directory: z23.string().optional(),
3857
- env: z23.record(z23.string(), z23.string()).optional()
3935
+ z24.object({
3936
+ type: z24.literal("local_shell_call"),
3937
+ id: z24.string(),
3938
+ call_id: z24.string(),
3939
+ action: z24.object({
3940
+ type: z24.literal("exec"),
3941
+ command: z24.array(z24.string()),
3942
+ timeout_ms: z24.number().optional(),
3943
+ user: z24.string().optional(),
3944
+ working_directory: z24.string().optional(),
3945
+ env: z24.record(z24.string(), z24.string()).optional()
3858
3946
  })
3859
3947
  }),
3860
- z23.object({
3861
- type: z23.literal("computer_call"),
3862
- id: z23.string(),
3863
- status: z23.literal("completed")
3948
+ z24.object({
3949
+ type: z24.literal("computer_call"),
3950
+ id: z24.string(),
3951
+ status: z24.literal("completed")
3864
3952
  }),
3865
- z23.object({
3866
- type: z23.literal("mcp_call"),
3867
- id: z23.string(),
3868
- status: z23.string(),
3869
- arguments: z23.string(),
3870
- name: z23.string(),
3871
- server_label: z23.string(),
3872
- output: z23.string().nullish(),
3873
- error: z23.union([
3874
- z23.string(),
3875
- z23.object({
3876
- type: z23.string().optional(),
3877
- code: z23.union([z23.number(), z23.string()]).optional(),
3878
- message: z23.string().optional()
3953
+ z24.object({
3954
+ type: z24.literal("mcp_call"),
3955
+ id: z24.string(),
3956
+ status: z24.string(),
3957
+ arguments: z24.string(),
3958
+ name: z24.string(),
3959
+ server_label: z24.string(),
3960
+ output: z24.string().nullish(),
3961
+ error: z24.union([
3962
+ z24.string(),
3963
+ z24.object({
3964
+ type: z24.string().optional(),
3965
+ code: z24.union([z24.number(), z24.string()]).optional(),
3966
+ message: z24.string().optional()
3879
3967
  }).loose()
3880
3968
  ]).nullish(),
3881
- approval_request_id: z23.string().nullish()
3969
+ approval_request_id: z24.string().nullish()
3882
3970
  }),
3883
- z23.object({
3884
- type: z23.literal("mcp_list_tools"),
3885
- id: z23.string(),
3886
- server_label: z23.string(),
3887
- tools: z23.array(
3888
- z23.object({
3889
- name: z23.string(),
3890
- description: z23.string().optional(),
3891
- input_schema: z23.any(),
3892
- annotations: z23.record(z23.string(), z23.unknown()).optional()
3971
+ z24.object({
3972
+ type: z24.literal("mcp_list_tools"),
3973
+ id: z24.string(),
3974
+ server_label: z24.string(),
3975
+ tools: z24.array(
3976
+ z24.object({
3977
+ name: z24.string(),
3978
+ description: z24.string().optional(),
3979
+ input_schema: z24.any(),
3980
+ annotations: z24.record(z24.string(), z24.unknown()).optional()
3893
3981
  })
3894
3982
  ),
3895
- error: z23.union([
3896
- z23.string(),
3897
- z23.object({
3898
- type: z23.string().optional(),
3899
- code: z23.union([z23.number(), z23.string()]).optional(),
3900
- message: z23.string().optional()
3983
+ error: z24.union([
3984
+ z24.string(),
3985
+ z24.object({
3986
+ type: z24.string().optional(),
3987
+ code: z24.union([z24.number(), z24.string()]).optional(),
3988
+ message: z24.string().optional()
3901
3989
  }).loose()
3902
3990
  ]).optional()
3903
3991
  }),
3904
- z23.object({
3905
- type: z23.literal("mcp_approval_request"),
3906
- id: z23.string(),
3907
- server_label: z23.string(),
3908
- name: z23.string(),
3909
- arguments: z23.string(),
3910
- approval_request_id: z23.string().optional()
3992
+ z24.object({
3993
+ type: z24.literal("mcp_approval_request"),
3994
+ id: z24.string(),
3995
+ server_label: z24.string(),
3996
+ name: z24.string(),
3997
+ arguments: z24.string(),
3998
+ approval_request_id: z24.string().optional()
3911
3999
  }),
3912
- z23.object({
3913
- type: z23.literal("apply_patch_call"),
3914
- id: z23.string(),
3915
- call_id: z23.string(),
3916
- status: z23.enum(["in_progress", "completed"]),
3917
- operation: z23.discriminatedUnion("type", [
3918
- z23.object({
3919
- type: z23.literal("create_file"),
3920
- path: z23.string(),
3921
- diff: z23.string()
4000
+ z24.object({
4001
+ type: z24.literal("apply_patch_call"),
4002
+ id: z24.string(),
4003
+ call_id: z24.string(),
4004
+ status: z24.enum(["in_progress", "completed"]),
4005
+ operation: z24.discriminatedUnion("type", [
4006
+ z24.object({
4007
+ type: z24.literal("create_file"),
4008
+ path: z24.string(),
4009
+ diff: z24.string()
3922
4010
  }),
3923
- z23.object({
3924
- type: z23.literal("delete_file"),
3925
- path: z23.string()
4011
+ z24.object({
4012
+ type: z24.literal("delete_file"),
4013
+ path: z24.string()
3926
4014
  }),
3927
- z23.object({
3928
- type: z23.literal("update_file"),
3929
- path: z23.string(),
3930
- diff: z23.string()
4015
+ z24.object({
4016
+ type: z24.literal("update_file"),
4017
+ path: z24.string(),
4018
+ diff: z24.string()
3931
4019
  })
3932
4020
  ])
3933
4021
  }),
3934
- z23.object({
3935
- type: z23.literal("shell_call"),
3936
- id: z23.string(),
3937
- call_id: z23.string(),
3938
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3939
- action: z23.object({
3940
- commands: z23.array(z23.string())
4022
+ z24.object({
4023
+ type: z24.literal("shell_call"),
4024
+ id: z24.string(),
4025
+ call_id: z24.string(),
4026
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4027
+ action: z24.object({
4028
+ commands: z24.array(z24.string())
3941
4029
  })
3942
4030
  }),
3943
- z23.object({
3944
- type: z23.literal("compaction"),
3945
- id: z23.string(),
3946
- encrypted_content: z23.string()
4031
+ z24.object({
4032
+ type: z24.literal("compaction"),
4033
+ id: z24.string(),
4034
+ encrypted_content: z24.string()
3947
4035
  }),
3948
- z23.object({
3949
- type: z23.literal("shell_call_output"),
3950
- id: z23.string(),
3951
- call_id: z23.string(),
3952
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3953
- output: z23.array(
3954
- z23.object({
3955
- stdout: z23.string(),
3956
- stderr: z23.string(),
3957
- outcome: z23.discriminatedUnion("type", [
3958
- z23.object({ type: z23.literal("timeout") }),
3959
- z23.object({
3960
- type: z23.literal("exit"),
3961
- exit_code: z23.number()
4036
+ z24.object({
4037
+ type: z24.literal("shell_call_output"),
4038
+ id: z24.string(),
4039
+ call_id: z24.string(),
4040
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4041
+ output: z24.array(
4042
+ z24.object({
4043
+ stdout: z24.string(),
4044
+ stderr: z24.string(),
4045
+ outcome: z24.discriminatedUnion("type", [
4046
+ z24.object({ type: z24.literal("timeout") }),
4047
+ z24.object({
4048
+ type: z24.literal("exit"),
4049
+ exit_code: z24.number()
3962
4050
  })
3963
4051
  ])
3964
4052
  })
3965
4053
  )
3966
4054
  }),
3967
- z23.object({
3968
- type: z23.literal("tool_search_call"),
3969
- id: z23.string(),
3970
- execution: z23.enum(["server", "client"]),
3971
- call_id: z23.string().nullable(),
3972
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3973
- arguments: z23.unknown()
4055
+ z24.object({
4056
+ type: z24.literal("tool_search_call"),
4057
+ id: z24.string(),
4058
+ execution: z24.enum(["server", "client"]),
4059
+ call_id: z24.string().nullable(),
4060
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4061
+ arguments: z24.unknown()
3974
4062
  }),
3975
- z23.object({
3976
- type: z23.literal("tool_search_output"),
3977
- id: z23.string(),
3978
- execution: z23.enum(["server", "client"]),
3979
- call_id: z23.string().nullable(),
3980
- status: z23.enum(["in_progress", "completed", "incomplete"]),
3981
- tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
4063
+ z24.object({
4064
+ type: z24.literal("tool_search_output"),
4065
+ id: z24.string(),
4066
+ execution: z24.enum(["server", "client"]),
4067
+ call_id: z24.string().nullable(),
4068
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4069
+ tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
3982
4070
  })
3983
4071
  ])
3984
4072
  }),
3985
- z23.object({
3986
- type: z23.literal("response.function_call_arguments.delta"),
3987
- item_id: z23.string(),
3988
- output_index: z23.number(),
3989
- delta: z23.string()
4073
+ z24.object({
4074
+ type: z24.literal("response.function_call_arguments.delta"),
4075
+ item_id: z24.string(),
4076
+ output_index: z24.number(),
4077
+ delta: z24.string()
3990
4078
  }),
3991
- z23.object({
3992
- type: z23.literal("response.custom_tool_call_input.delta"),
3993
- item_id: z23.string(),
3994
- output_index: z23.number(),
3995
- delta: z23.string()
4079
+ z24.object({
4080
+ type: z24.literal("response.custom_tool_call_input.delta"),
4081
+ item_id: z24.string(),
4082
+ output_index: z24.number(),
4083
+ delta: z24.string()
3996
4084
  }),
3997
- z23.object({
3998
- type: z23.literal("response.image_generation_call.partial_image"),
3999
- item_id: z23.string(),
4000
- output_index: z23.number(),
4001
- partial_image_b64: z23.string()
4085
+ z24.object({
4086
+ type: z24.literal("response.image_generation_call.partial_image"),
4087
+ item_id: z24.string(),
4088
+ output_index: z24.number(),
4089
+ partial_image_b64: z24.string()
4002
4090
  }),
4003
- z23.object({
4004
- type: z23.literal("response.code_interpreter_call_code.delta"),
4005
- item_id: z23.string(),
4006
- output_index: z23.number(),
4007
- delta: z23.string()
4091
+ z24.object({
4092
+ type: z24.literal("response.code_interpreter_call_code.delta"),
4093
+ item_id: z24.string(),
4094
+ output_index: z24.number(),
4095
+ delta: z24.string()
4008
4096
  }),
4009
- z23.object({
4010
- type: z23.literal("response.code_interpreter_call_code.done"),
4011
- item_id: z23.string(),
4012
- output_index: z23.number(),
4013
- code: z23.string()
4097
+ z24.object({
4098
+ type: z24.literal("response.code_interpreter_call_code.done"),
4099
+ item_id: z24.string(),
4100
+ output_index: z24.number(),
4101
+ code: z24.string()
4014
4102
  }),
4015
- z23.object({
4016
- type: z23.literal("response.output_text.annotation.added"),
4017
- annotation: z23.discriminatedUnion("type", [
4018
- z23.object({
4019
- type: z23.literal("url_citation"),
4020
- start_index: z23.number(),
4021
- end_index: z23.number(),
4022
- url: z23.string(),
4023
- title: z23.string()
4103
+ z24.object({
4104
+ type: z24.literal("response.output_text.annotation.added"),
4105
+ annotation: z24.discriminatedUnion("type", [
4106
+ z24.object({
4107
+ type: z24.literal("url_citation"),
4108
+ start_index: z24.number(),
4109
+ end_index: z24.number(),
4110
+ url: z24.string(),
4111
+ title: z24.string()
4024
4112
  }),
4025
- z23.object({
4026
- type: z23.literal("file_citation"),
4027
- file_id: z23.string(),
4028
- filename: z23.string(),
4029
- index: z23.number()
4113
+ z24.object({
4114
+ type: z24.literal("file_citation"),
4115
+ file_id: z24.string(),
4116
+ filename: z24.string(),
4117
+ index: z24.number()
4030
4118
  }),
4031
- z23.object({
4032
- type: z23.literal("container_file_citation"),
4033
- container_id: z23.string(),
4034
- file_id: z23.string(),
4035
- filename: z23.string(),
4036
- start_index: z23.number(),
4037
- end_index: z23.number()
4119
+ z24.object({
4120
+ type: z24.literal("container_file_citation"),
4121
+ container_id: z24.string(),
4122
+ file_id: z24.string(),
4123
+ filename: z24.string(),
4124
+ start_index: z24.number(),
4125
+ end_index: z24.number()
4038
4126
  }),
4039
- z23.object({
4040
- type: z23.literal("file_path"),
4041
- file_id: z23.string(),
4042
- index: z23.number()
4127
+ z24.object({
4128
+ type: z24.literal("file_path"),
4129
+ file_id: z24.string(),
4130
+ index: z24.number()
4043
4131
  })
4044
4132
  ])
4045
4133
  }),
4046
- z23.object({
4047
- type: z23.literal("response.reasoning_summary_part.added"),
4048
- item_id: z23.string(),
4049
- summary_index: z23.number()
4134
+ z24.object({
4135
+ type: z24.literal("response.reasoning_summary_part.added"),
4136
+ item_id: z24.string(),
4137
+ summary_index: z24.number()
4050
4138
  }),
4051
- z23.object({
4052
- type: z23.literal("response.reasoning_summary_text.delta"),
4053
- item_id: z23.string(),
4054
- summary_index: z23.number(),
4055
- delta: z23.string()
4139
+ z24.object({
4140
+ type: z24.literal("response.reasoning_summary_text.delta"),
4141
+ item_id: z24.string(),
4142
+ summary_index: z24.number(),
4143
+ delta: z24.string()
4056
4144
  }),
4057
- z23.object({
4058
- type: z23.literal("response.reasoning_summary_part.done"),
4059
- item_id: z23.string(),
4060
- summary_index: z23.number()
4145
+ z24.object({
4146
+ type: z24.literal("response.reasoning_summary_part.done"),
4147
+ item_id: z24.string(),
4148
+ summary_index: z24.number()
4061
4149
  }),
4062
- z23.object({
4063
- type: z23.literal("response.apply_patch_call_operation_diff.delta"),
4064
- item_id: z23.string(),
4065
- output_index: z23.number(),
4066
- delta: z23.string(),
4067
- obfuscation: z23.string().nullish()
4150
+ z24.object({
4151
+ type: z24.literal("response.apply_patch_call_operation_diff.delta"),
4152
+ item_id: z24.string(),
4153
+ output_index: z24.number(),
4154
+ delta: z24.string(),
4155
+ obfuscation: z24.string().nullish()
4068
4156
  }),
4069
- z23.object({
4070
- type: z23.literal("response.apply_patch_call_operation_diff.done"),
4071
- item_id: z23.string(),
4072
- output_index: z23.number(),
4073
- diff: z23.string()
4157
+ z24.object({
4158
+ type: z24.literal("response.apply_patch_call_operation_diff.done"),
4159
+ item_id: z24.string(),
4160
+ output_index: z24.number(),
4161
+ diff: z24.string()
4074
4162
  }),
4075
- z23.object({
4076
- type: z23.literal("error"),
4077
- sequence_number: z23.number(),
4078
- error: z23.object({
4079
- type: z23.string(),
4080
- code: z23.string(),
4081
- message: z23.string(),
4082
- param: z23.string().nullish()
4163
+ z24.object({
4164
+ type: z24.literal("error"),
4165
+ sequence_number: z24.number(),
4166
+ error: z24.object({
4167
+ type: z24.string(),
4168
+ code: z24.string(),
4169
+ message: z24.string(),
4170
+ param: z24.string().nullish()
4083
4171
  })
4084
4172
  }),
4085
- z23.object({ type: z23.string() }).loose().transform((value) => ({
4173
+ z24.object({ type: z24.string() }).loose().transform((value) => ({
4086
4174
  type: "unknown_chunk",
4087
4175
  message: value.type
4088
4176
  }))
@@ -4090,318 +4178,319 @@ var openaiResponsesChunkSchema = lazySchema21(
4090
4178
  ])
4091
4179
  )
4092
4180
  );
4093
- var openaiResponsesResponseSchema = lazySchema21(
4094
- () => zodSchema21(
4095
- z23.object({
4096
- id: z23.string().optional(),
4097
- created_at: z23.number().optional(),
4098
- error: z23.object({
4099
- message: z23.string(),
4100
- type: z23.string(),
4101
- param: z23.string().nullish(),
4102
- code: z23.string()
4181
+ var openaiResponsesResponseSchema = lazySchema22(
4182
+ () => zodSchema22(
4183
+ z24.object({
4184
+ id: z24.string().optional(),
4185
+ created_at: z24.number().optional(),
4186
+ error: z24.object({
4187
+ message: z24.string(),
4188
+ type: z24.string(),
4189
+ param: z24.string().nullish(),
4190
+ code: z24.string()
4103
4191
  }).nullish(),
4104
- model: z23.string().optional(),
4105
- output: z23.array(
4106
- z23.discriminatedUnion("type", [
4107
- z23.object({
4108
- type: z23.literal("message"),
4109
- role: z23.literal("assistant"),
4110
- id: z23.string(),
4111
- phase: z23.enum(["commentary", "final_answer"]).nullish(),
4112
- content: z23.array(
4113
- z23.object({
4114
- type: z23.literal("output_text"),
4115
- text: z23.string(),
4116
- logprobs: z23.array(
4117
- z23.object({
4118
- token: z23.string(),
4119
- logprob: z23.number(),
4120
- top_logprobs: z23.array(
4121
- z23.object({
4122
- token: z23.string(),
4123
- logprob: z23.number()
4192
+ model: z24.string().optional(),
4193
+ output: z24.array(
4194
+ z24.discriminatedUnion("type", [
4195
+ z24.object({
4196
+ type: z24.literal("message"),
4197
+ role: z24.literal("assistant"),
4198
+ id: z24.string(),
4199
+ phase: z24.enum(["commentary", "final_answer"]).nullish(),
4200
+ content: z24.array(
4201
+ z24.object({
4202
+ type: z24.literal("output_text"),
4203
+ text: z24.string(),
4204
+ logprobs: z24.array(
4205
+ z24.object({
4206
+ token: z24.string(),
4207
+ logprob: z24.number(),
4208
+ top_logprobs: z24.array(
4209
+ z24.object({
4210
+ token: z24.string(),
4211
+ logprob: z24.number()
4124
4212
  })
4125
4213
  )
4126
4214
  })
4127
4215
  ).nullish(),
4128
- annotations: z23.array(
4129
- z23.discriminatedUnion("type", [
4130
- z23.object({
4131
- type: z23.literal("url_citation"),
4132
- start_index: z23.number(),
4133
- end_index: z23.number(),
4134
- url: z23.string(),
4135
- title: z23.string()
4216
+ annotations: z24.array(
4217
+ z24.discriminatedUnion("type", [
4218
+ z24.object({
4219
+ type: z24.literal("url_citation"),
4220
+ start_index: z24.number(),
4221
+ end_index: z24.number(),
4222
+ url: z24.string(),
4223
+ title: z24.string()
4136
4224
  }),
4137
- z23.object({
4138
- type: z23.literal("file_citation"),
4139
- file_id: z23.string(),
4140
- filename: z23.string(),
4141
- index: z23.number()
4225
+ z24.object({
4226
+ type: z24.literal("file_citation"),
4227
+ file_id: z24.string(),
4228
+ filename: z24.string(),
4229
+ index: z24.number()
4142
4230
  }),
4143
- z23.object({
4144
- type: z23.literal("container_file_citation"),
4145
- container_id: z23.string(),
4146
- file_id: z23.string(),
4147
- filename: z23.string(),
4148
- start_index: z23.number(),
4149
- end_index: z23.number()
4231
+ z24.object({
4232
+ type: z24.literal("container_file_citation"),
4233
+ container_id: z24.string(),
4234
+ file_id: z24.string(),
4235
+ filename: z24.string(),
4236
+ start_index: z24.number(),
4237
+ end_index: z24.number()
4150
4238
  }),
4151
- z23.object({
4152
- type: z23.literal("file_path"),
4153
- file_id: z23.string(),
4154
- index: z23.number()
4239
+ z24.object({
4240
+ type: z24.literal("file_path"),
4241
+ file_id: z24.string(),
4242
+ index: z24.number()
4155
4243
  })
4156
4244
  ])
4157
4245
  )
4158
4246
  })
4159
4247
  )
4160
4248
  }),
4161
- z23.object({
4162
- type: z23.literal("web_search_call"),
4163
- id: z23.string(),
4164
- status: z23.string(),
4165
- action: z23.discriminatedUnion("type", [
4166
- z23.object({
4167
- type: z23.literal("search"),
4168
- query: z23.string().nullish(),
4169
- sources: z23.array(
4170
- z23.discriminatedUnion("type", [
4171
- z23.object({ type: z23.literal("url"), url: z23.string() }),
4172
- z23.object({
4173
- type: z23.literal("api"),
4174
- name: z23.string()
4249
+ z24.object({
4250
+ type: z24.literal("web_search_call"),
4251
+ id: z24.string(),
4252
+ status: z24.string(),
4253
+ action: z24.discriminatedUnion("type", [
4254
+ z24.object({
4255
+ type: z24.literal("search"),
4256
+ query: z24.string().nullish(),
4257
+ sources: z24.array(
4258
+ z24.discriminatedUnion("type", [
4259
+ z24.object({ type: z24.literal("url"), url: z24.string() }),
4260
+ z24.object({
4261
+ type: z24.literal("api"),
4262
+ name: z24.string()
4175
4263
  })
4176
4264
  ])
4177
4265
  ).nullish()
4178
4266
  }),
4179
- z23.object({
4180
- type: z23.literal("open_page"),
4181
- url: z23.string().nullish()
4267
+ z24.object({
4268
+ type: z24.literal("open_page"),
4269
+ url: z24.string().nullish()
4182
4270
  }),
4183
- z23.object({
4184
- type: z23.literal("find_in_page"),
4185
- url: z23.string().nullish(),
4186
- pattern: z23.string().nullish()
4271
+ z24.object({
4272
+ type: z24.literal("find_in_page"),
4273
+ url: z24.string().nullish(),
4274
+ pattern: z24.string().nullish()
4187
4275
  })
4188
4276
  ]).nullish()
4189
4277
  }),
4190
- z23.object({
4191
- type: z23.literal("file_search_call"),
4192
- id: z23.string(),
4193
- queries: z23.array(z23.string()),
4194
- results: z23.array(
4195
- z23.object({
4196
- attributes: z23.record(
4197
- z23.string(),
4198
- z23.union([z23.string(), z23.number(), z23.boolean()])
4278
+ z24.object({
4279
+ type: z24.literal("file_search_call"),
4280
+ id: z24.string(),
4281
+ queries: z24.array(z24.string()),
4282
+ results: z24.array(
4283
+ z24.object({
4284
+ attributes: z24.record(
4285
+ z24.string(),
4286
+ z24.union([z24.string(), z24.number(), z24.boolean()])
4199
4287
  ),
4200
- file_id: z23.string(),
4201
- filename: z23.string(),
4202
- score: z23.number(),
4203
- text: z23.string()
4288
+ file_id: z24.string(),
4289
+ filename: z24.string(),
4290
+ score: z24.number(),
4291
+ text: z24.string()
4204
4292
  })
4205
4293
  ).nullish()
4206
4294
  }),
4207
- z23.object({
4208
- type: z23.literal("code_interpreter_call"),
4209
- id: z23.string(),
4210
- code: z23.string().nullable(),
4211
- container_id: z23.string(),
4212
- outputs: z23.array(
4213
- z23.discriminatedUnion("type", [
4214
- z23.object({ type: z23.literal("logs"), logs: z23.string() }),
4215
- z23.object({ type: z23.literal("image"), url: z23.string() })
4295
+ z24.object({
4296
+ type: z24.literal("code_interpreter_call"),
4297
+ id: z24.string(),
4298
+ code: z24.string().nullable(),
4299
+ container_id: z24.string(),
4300
+ outputs: z24.array(
4301
+ z24.discriminatedUnion("type", [
4302
+ z24.object({ type: z24.literal("logs"), logs: z24.string() }),
4303
+ z24.object({ type: z24.literal("image"), url: z24.string() })
4216
4304
  ])
4217
4305
  ).nullable()
4218
4306
  }),
4219
- z23.object({
4220
- type: z23.literal("image_generation_call"),
4221
- id: z23.string(),
4222
- result: z23.string()
4307
+ z24.object({
4308
+ type: z24.literal("image_generation_call"),
4309
+ id: z24.string(),
4310
+ result: z24.string()
4223
4311
  }),
4224
- z23.object({
4225
- type: z23.literal("local_shell_call"),
4226
- id: z23.string(),
4227
- call_id: z23.string(),
4228
- action: z23.object({
4229
- type: z23.literal("exec"),
4230
- command: z23.array(z23.string()),
4231
- timeout_ms: z23.number().optional(),
4232
- user: z23.string().optional(),
4233
- working_directory: z23.string().optional(),
4234
- env: z23.record(z23.string(), z23.string()).optional()
4312
+ z24.object({
4313
+ type: z24.literal("local_shell_call"),
4314
+ id: z24.string(),
4315
+ call_id: z24.string(),
4316
+ action: z24.object({
4317
+ type: z24.literal("exec"),
4318
+ command: z24.array(z24.string()),
4319
+ timeout_ms: z24.number().optional(),
4320
+ user: z24.string().optional(),
4321
+ working_directory: z24.string().optional(),
4322
+ env: z24.record(z24.string(), z24.string()).optional()
4235
4323
  })
4236
4324
  }),
4237
- z23.object({
4238
- type: z23.literal("function_call"),
4239
- call_id: z23.string(),
4240
- name: z23.string(),
4241
- arguments: z23.string(),
4242
- id: z23.string()
4325
+ z24.object({
4326
+ type: z24.literal("function_call"),
4327
+ call_id: z24.string(),
4328
+ name: z24.string(),
4329
+ arguments: z24.string(),
4330
+ id: z24.string(),
4331
+ namespace: z24.string().nullish()
4243
4332
  }),
4244
- z23.object({
4245
- type: z23.literal("custom_tool_call"),
4246
- call_id: z23.string(),
4247
- name: z23.string(),
4248
- input: z23.string(),
4249
- id: z23.string()
4333
+ z24.object({
4334
+ type: z24.literal("custom_tool_call"),
4335
+ call_id: z24.string(),
4336
+ name: z24.string(),
4337
+ input: z24.string(),
4338
+ id: z24.string()
4250
4339
  }),
4251
- z23.object({
4252
- type: z23.literal("computer_call"),
4253
- id: z23.string(),
4254
- status: z23.string().optional()
4340
+ z24.object({
4341
+ type: z24.literal("computer_call"),
4342
+ id: z24.string(),
4343
+ status: z24.string().optional()
4255
4344
  }),
4256
- z23.object({
4257
- type: z23.literal("reasoning"),
4258
- id: z23.string(),
4259
- encrypted_content: z23.string().nullish(),
4260
- summary: z23.array(
4261
- z23.object({
4262
- type: z23.literal("summary_text"),
4263
- text: z23.string()
4345
+ z24.object({
4346
+ type: z24.literal("reasoning"),
4347
+ id: z24.string(),
4348
+ encrypted_content: z24.string().nullish(),
4349
+ summary: z24.array(
4350
+ z24.object({
4351
+ type: z24.literal("summary_text"),
4352
+ text: z24.string()
4264
4353
  })
4265
4354
  )
4266
4355
  }),
4267
- z23.object({
4268
- type: z23.literal("mcp_call"),
4269
- id: z23.string(),
4270
- status: z23.string(),
4271
- arguments: z23.string(),
4272
- name: z23.string(),
4273
- server_label: z23.string(),
4274
- output: z23.string().nullish(),
4275
- error: z23.union([
4276
- z23.string(),
4277
- z23.object({
4278
- type: z23.string().optional(),
4279
- code: z23.union([z23.number(), z23.string()]).optional(),
4280
- message: z23.string().optional()
4356
+ z24.object({
4357
+ type: z24.literal("mcp_call"),
4358
+ id: z24.string(),
4359
+ status: z24.string(),
4360
+ arguments: z24.string(),
4361
+ name: z24.string(),
4362
+ server_label: z24.string(),
4363
+ output: z24.string().nullish(),
4364
+ error: z24.union([
4365
+ z24.string(),
4366
+ z24.object({
4367
+ type: z24.string().optional(),
4368
+ code: z24.union([z24.number(), z24.string()]).optional(),
4369
+ message: z24.string().optional()
4281
4370
  }).loose()
4282
4371
  ]).nullish(),
4283
- approval_request_id: z23.string().nullish()
4372
+ approval_request_id: z24.string().nullish()
4284
4373
  }),
4285
- z23.object({
4286
- type: z23.literal("mcp_list_tools"),
4287
- id: z23.string(),
4288
- server_label: z23.string(),
4289
- tools: z23.array(
4290
- z23.object({
4291
- name: z23.string(),
4292
- description: z23.string().optional(),
4293
- input_schema: z23.any(),
4294
- annotations: z23.record(z23.string(), z23.unknown()).optional()
4374
+ z24.object({
4375
+ type: z24.literal("mcp_list_tools"),
4376
+ id: z24.string(),
4377
+ server_label: z24.string(),
4378
+ tools: z24.array(
4379
+ z24.object({
4380
+ name: z24.string(),
4381
+ description: z24.string().optional(),
4382
+ input_schema: z24.any(),
4383
+ annotations: z24.record(z24.string(), z24.unknown()).optional()
4295
4384
  })
4296
4385
  ),
4297
- error: z23.union([
4298
- z23.string(),
4299
- z23.object({
4300
- type: z23.string().optional(),
4301
- code: z23.union([z23.number(), z23.string()]).optional(),
4302
- message: z23.string().optional()
4386
+ error: z24.union([
4387
+ z24.string(),
4388
+ z24.object({
4389
+ type: z24.string().optional(),
4390
+ code: z24.union([z24.number(), z24.string()]).optional(),
4391
+ message: z24.string().optional()
4303
4392
  }).loose()
4304
4393
  ]).optional()
4305
4394
  }),
4306
- z23.object({
4307
- type: z23.literal("mcp_approval_request"),
4308
- id: z23.string(),
4309
- server_label: z23.string(),
4310
- name: z23.string(),
4311
- arguments: z23.string(),
4312
- approval_request_id: z23.string().optional()
4395
+ z24.object({
4396
+ type: z24.literal("mcp_approval_request"),
4397
+ id: z24.string(),
4398
+ server_label: z24.string(),
4399
+ name: z24.string(),
4400
+ arguments: z24.string(),
4401
+ approval_request_id: z24.string().optional()
4313
4402
  }),
4314
- z23.object({
4315
- type: z23.literal("apply_patch_call"),
4316
- id: z23.string(),
4317
- call_id: z23.string(),
4318
- status: z23.enum(["in_progress", "completed"]),
4319
- operation: z23.discriminatedUnion("type", [
4320
- z23.object({
4321
- type: z23.literal("create_file"),
4322
- path: z23.string(),
4323
- diff: z23.string()
4403
+ z24.object({
4404
+ type: z24.literal("apply_patch_call"),
4405
+ id: z24.string(),
4406
+ call_id: z24.string(),
4407
+ status: z24.enum(["in_progress", "completed"]),
4408
+ operation: z24.discriminatedUnion("type", [
4409
+ z24.object({
4410
+ type: z24.literal("create_file"),
4411
+ path: z24.string(),
4412
+ diff: z24.string()
4324
4413
  }),
4325
- z23.object({
4326
- type: z23.literal("delete_file"),
4327
- path: z23.string()
4414
+ z24.object({
4415
+ type: z24.literal("delete_file"),
4416
+ path: z24.string()
4328
4417
  }),
4329
- z23.object({
4330
- type: z23.literal("update_file"),
4331
- path: z23.string(),
4332
- diff: z23.string()
4418
+ z24.object({
4419
+ type: z24.literal("update_file"),
4420
+ path: z24.string(),
4421
+ diff: z24.string()
4333
4422
  })
4334
4423
  ])
4335
4424
  }),
4336
- z23.object({
4337
- type: z23.literal("shell_call"),
4338
- id: z23.string(),
4339
- call_id: z23.string(),
4340
- status: z23.enum(["in_progress", "completed", "incomplete"]),
4341
- action: z23.object({
4342
- commands: z23.array(z23.string())
4425
+ z24.object({
4426
+ type: z24.literal("shell_call"),
4427
+ id: z24.string(),
4428
+ call_id: z24.string(),
4429
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4430
+ action: z24.object({
4431
+ commands: z24.array(z24.string())
4343
4432
  })
4344
4433
  }),
4345
- z23.object({
4346
- type: z23.literal("compaction"),
4347
- id: z23.string(),
4348
- encrypted_content: z23.string()
4434
+ z24.object({
4435
+ type: z24.literal("compaction"),
4436
+ id: z24.string(),
4437
+ encrypted_content: z24.string()
4349
4438
  }),
4350
- z23.object({
4351
- type: z23.literal("shell_call_output"),
4352
- id: z23.string(),
4353
- call_id: z23.string(),
4354
- status: z23.enum(["in_progress", "completed", "incomplete"]),
4355
- output: z23.array(
4356
- z23.object({
4357
- stdout: z23.string(),
4358
- stderr: z23.string(),
4359
- outcome: z23.discriminatedUnion("type", [
4360
- z23.object({ type: z23.literal("timeout") }),
4361
- z23.object({
4362
- type: z23.literal("exit"),
4363
- exit_code: z23.number()
4439
+ z24.object({
4440
+ type: z24.literal("shell_call_output"),
4441
+ id: z24.string(),
4442
+ call_id: z24.string(),
4443
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4444
+ output: z24.array(
4445
+ z24.object({
4446
+ stdout: z24.string(),
4447
+ stderr: z24.string(),
4448
+ outcome: z24.discriminatedUnion("type", [
4449
+ z24.object({ type: z24.literal("timeout") }),
4450
+ z24.object({
4451
+ type: z24.literal("exit"),
4452
+ exit_code: z24.number()
4364
4453
  })
4365
4454
  ])
4366
4455
  })
4367
4456
  )
4368
4457
  }),
4369
- z23.object({
4370
- type: z23.literal("tool_search_call"),
4371
- id: z23.string(),
4372
- execution: z23.enum(["server", "client"]),
4373
- call_id: z23.string().nullable(),
4374
- status: z23.enum(["in_progress", "completed", "incomplete"]),
4375
- arguments: z23.unknown()
4458
+ z24.object({
4459
+ type: z24.literal("tool_search_call"),
4460
+ id: z24.string(),
4461
+ execution: z24.enum(["server", "client"]),
4462
+ call_id: z24.string().nullable(),
4463
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4464
+ arguments: z24.unknown()
4376
4465
  }),
4377
- z23.object({
4378
- type: z23.literal("tool_search_output"),
4379
- id: z23.string(),
4380
- execution: z23.enum(["server", "client"]),
4381
- call_id: z23.string().nullable(),
4382
- status: z23.enum(["in_progress", "completed", "incomplete"]),
4383
- tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
4466
+ z24.object({
4467
+ type: z24.literal("tool_search_output"),
4468
+ id: z24.string(),
4469
+ execution: z24.enum(["server", "client"]),
4470
+ call_id: z24.string().nullable(),
4471
+ status: z24.enum(["in_progress", "completed", "incomplete"]),
4472
+ tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
4384
4473
  })
4385
4474
  ])
4386
4475
  ).optional(),
4387
- service_tier: z23.string().nullish(),
4388
- incomplete_details: z23.object({ reason: z23.string() }).nullish(),
4389
- usage: z23.object({
4390
- input_tokens: z23.number(),
4391
- input_tokens_details: z23.object({ cached_tokens: z23.number().nullish() }).nullish(),
4392
- output_tokens: z23.number(),
4393
- output_tokens_details: z23.object({ reasoning_tokens: z23.number().nullish() }).nullish()
4476
+ service_tier: z24.string().nullish(),
4477
+ incomplete_details: z24.object({ reason: z24.string() }).nullish(),
4478
+ usage: z24.object({
4479
+ input_tokens: z24.number(),
4480
+ input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
4481
+ output_tokens: z24.number(),
4482
+ output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
4394
4483
  }).optional()
4395
4484
  })
4396
4485
  )
4397
4486
  );
4398
4487
 
4399
- // src/responses/openai-responses-options.ts
4488
+ // src/responses/openai-responses-language-model-options.ts
4400
4489
  import {
4401
- lazySchema as lazySchema22,
4402
- zodSchema as zodSchema22
4490
+ lazySchema as lazySchema23,
4491
+ zodSchema as zodSchema23
4403
4492
  } from "@ai-sdk/provider-utils";
4404
- import { z as z24 } from "zod/v4";
4493
+ import { z as z25 } from "zod/v4";
4405
4494
  var TOP_LOGPROBS_MAX = 20;
4406
4495
  var openaiResponsesReasoningModelIds = [
4407
4496
  "o1",
@@ -4466,9 +4555,9 @@ var openaiResponsesModelIds = [
4466
4555
  "gpt-5-chat-latest",
4467
4556
  ...openaiResponsesReasoningModelIds
4468
4557
  ];
4469
- var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4470
- () => zodSchema22(
4471
- z24.object({
4558
+ var openaiLanguageModelResponsesOptionsSchema = lazySchema23(
4559
+ () => zodSchema23(
4560
+ z25.object({
4472
4561
  /**
4473
4562
  * The ID of the OpenAI Conversation to continue.
4474
4563
  * You must create a conversation first via the OpenAI API.
@@ -4476,13 +4565,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4476
4565
  * Defaults to `undefined`.
4477
4566
  * @see https://platform.openai.com/docs/api-reference/conversations/create
4478
4567
  */
4479
- conversation: z24.string().nullish(),
4568
+ conversation: z25.string().nullish(),
4480
4569
  /**
4481
4570
  * The set of extra fields to include in the response (advanced, usually not needed).
4482
4571
  * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
4483
4572
  */
4484
- include: z24.array(
4485
- z24.enum([
4573
+ include: z25.array(
4574
+ z25.enum([
4486
4575
  "reasoning.encrypted_content",
4487
4576
  // handled internally by default, only needed for unknown reasoning models
4488
4577
  "file_search_call.results",
@@ -4494,7 +4583,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4494
4583
  * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
4495
4584
  * Defaults to `undefined`.
4496
4585
  */
4497
- instructions: z24.string().nullish(),
4586
+ instructions: z25.string().nullish(),
4498
4587
  /**
4499
4588
  * Return the log probabilities of the tokens. Including logprobs will increase
4500
4589
  * the response size and can slow down response times. However, it can
@@ -4509,30 +4598,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4509
4598
  * @see https://platform.openai.com/docs/api-reference/responses/create
4510
4599
  * @see https://cookbook.openai.com/examples/using_logprobs
4511
4600
  */
4512
- logprobs: z24.union([z24.boolean(), z24.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4601
+ logprobs: z25.union([z25.boolean(), z25.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
4513
4602
  /**
4514
4603
  * The maximum number of total calls to built-in tools that can be processed in a response.
4515
4604
  * This maximum number applies across all built-in tool calls, not per individual tool.
4516
4605
  * Any further attempts to call a tool by the model will be ignored.
4517
4606
  */
4518
- maxToolCalls: z24.number().nullish(),
4607
+ maxToolCalls: z25.number().nullish(),
4519
4608
  /**
4520
4609
  * Additional metadata to store with the generation.
4521
4610
  */
4522
- metadata: z24.any().nullish(),
4611
+ metadata: z25.any().nullish(),
4523
4612
  /**
4524
4613
  * Whether to use parallel tool calls. Defaults to `true`.
4525
4614
  */
4526
- parallelToolCalls: z24.boolean().nullish(),
4615
+ parallelToolCalls: z25.boolean().nullish(),
4527
4616
  /**
4528
4617
  * The ID of the previous response. You can use it to continue a conversation.
4529
4618
  * Defaults to `undefined`.
4530
4619
  */
4531
- previousResponseId: z24.string().nullish(),
4620
+ previousResponseId: z25.string().nullish(),
4532
4621
  /**
4533
4622
  * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
4534
4623
  */
4535
- promptCacheKey: z24.string().nullish(),
4624
+ promptCacheKey: z25.string().nullish(),
4536
4625
  /**
4537
4626
  * The retention policy for the prompt cache.
4538
4627
  * - 'in_memory': Default. Standard prompt caching behavior.
@@ -4541,7 +4630,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4541
4630
  *
4542
4631
  * @default 'in_memory'
4543
4632
  */
4544
- promptCacheRetention: z24.enum(["in_memory", "24h"]).nullish(),
4633
+ promptCacheRetention: z25.enum(["in_memory", "24h"]).nullish(),
4545
4634
  /**
4546
4635
  * Reasoning effort for reasoning models. Defaults to `medium`. If you use
4547
4636
  * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
@@ -4552,17 +4641,17 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4552
4641
  * OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in
4553
4642
  * an error.
4554
4643
  */
4555
- reasoningEffort: z24.string().nullish(),
4644
+ reasoningEffort: z25.string().nullish(),
4556
4645
  /**
4557
4646
  * Controls reasoning summary output from the model.
4558
4647
  * Set to "auto" to automatically receive the richest level available,
4559
4648
  * or "detailed" for comprehensive summaries.
4560
4649
  */
4561
- reasoningSummary: z24.string().nullish(),
4650
+ reasoningSummary: z25.string().nullish(),
4562
4651
  /**
4563
4652
  * The identifier for safety monitoring and tracking.
4564
4653
  */
4565
- safetyIdentifier: z24.string().nullish(),
4654
+ safetyIdentifier: z25.string().nullish(),
4566
4655
  /**
4567
4656
  * Service tier for the request.
4568
4657
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
@@ -4570,34 +4659,34 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4570
4659
  *
4571
4660
  * Defaults to 'auto'.
4572
4661
  */
4573
- serviceTier: z24.enum(["auto", "flex", "priority", "default"]).nullish(),
4662
+ serviceTier: z25.enum(["auto", "flex", "priority", "default"]).nullish(),
4574
4663
  /**
4575
4664
  * Whether to store the generation. Defaults to `true`.
4576
4665
  */
4577
- store: z24.boolean().nullish(),
4666
+ store: z25.boolean().nullish(),
4578
4667
  /**
4579
4668
  * Whether to use strict JSON schema validation.
4580
4669
  * Defaults to `true`.
4581
4670
  */
4582
- strictJsonSchema: z24.boolean().nullish(),
4671
+ strictJsonSchema: z25.boolean().nullish(),
4583
4672
  /**
4584
4673
  * Controls the verbosity of the model's responses. Lower values ('low') will result
4585
4674
  * in more concise responses, while higher values ('high') will result in more verbose responses.
4586
4675
  * Valid values: 'low', 'medium', 'high'.
4587
4676
  */
4588
- textVerbosity: z24.enum(["low", "medium", "high"]).nullish(),
4677
+ textVerbosity: z25.enum(["low", "medium", "high"]).nullish(),
4589
4678
  /**
4590
4679
  * Controls output truncation. 'auto' (default) performs truncation automatically;
4591
4680
  * 'disabled' turns truncation off.
4592
4681
  */
4593
- truncation: z24.enum(["auto", "disabled"]).nullish(),
4682
+ truncation: z25.enum(["auto", "disabled"]).nullish(),
4594
4683
  /**
4595
4684
  * A unique identifier representing your end-user, which can help OpenAI to
4596
4685
  * monitor and detect abuse.
4597
4686
  * Defaults to `undefined`.
4598
4687
  * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
4599
4688
  */
4600
- user: z24.string().nullish(),
4689
+ user: z25.string().nullish(),
4601
4690
  /**
4602
4691
  * Override the system message mode for this model.
4603
4692
  * - 'system': Use the 'system' role for system messages (default for most models)
@@ -4606,7 +4695,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4606
4695
  *
4607
4696
  * If not specified, the mode is automatically determined based on the model.
4608
4697
  */
4609
- systemMessageMode: z24.enum(["system", "developer", "remove"]).optional(),
4698
+ systemMessageMode: z25.enum(["system", "developer", "remove"]).optional(),
4610
4699
  /**
4611
4700
  * Force treating this model as a reasoning model.
4612
4701
  *
@@ -4616,14 +4705,14 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
4616
4705
  * When enabled, the SDK applies reasoning-model parameter compatibility rules
4617
4706
  * and defaults `systemMessageMode` to `developer` unless overridden.
4618
4707
  */
4619
- forceReasoning: z24.boolean().optional(),
4708
+ forceReasoning: z25.boolean().optional(),
4620
4709
  /**
4621
4710
  * Enable server-side context management (compaction).
4622
4711
  */
4623
- contextManagement: z24.array(
4624
- z24.object({
4625
- type: z24.literal("compaction"),
4626
- compactThreshold: z24.number()
4712
+ contextManagement: z25.array(
4713
+ z25.object({
4714
+ type: z25.literal("compaction"),
4715
+ compactThreshold: z25.number()
4627
4716
  })
4628
4717
  ).nullish()
4629
4718
  })
@@ -4986,13 +5075,13 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
4986
5075
  warnings.push({ type: "unsupported", feature: "stopSequences" });
4987
5076
  }
4988
5077
  const providerOptionsName = this.config.provider.includes("azure") ? "azure" : "openai";
4989
- let openaiOptions = await parseProviderOptions6({
5078
+ let openaiOptions = await parseProviderOptions7({
4990
5079
  provider: providerOptionsName,
4991
5080
  providerOptions,
4992
5081
  schema: openaiLanguageModelResponsesOptionsSchema
4993
5082
  });
4994
5083
  if (openaiOptions == null && providerOptionsName !== "openai") {
4995
- openaiOptions = await parseProviderOptions6({
5084
+ openaiOptions = await parseProviderOptions7({
4996
5085
  provider: "openai",
4997
5086
  providerOptions,
4998
5087
  schema: openaiLanguageModelResponsesOptionsSchema
@@ -5468,7 +5557,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
5468
5557
  input: part.arguments,
5469
5558
  providerMetadata: {
5470
5559
  [providerOptionsName]: {
5471
- itemId: part.id
5560
+ itemId: part.id,
5561
+ ...part.namespace != null && { namespace: part.namespace }
5472
5562
  }
5473
5563
  }
5474
5564
  });
@@ -5966,7 +6056,14 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
5966
6056
  hasFunctionCall = true;
5967
6057
  controller.enqueue({
5968
6058
  type: "tool-input-end",
5969
- id: value.item.call_id
6059
+ id: value.item.call_id,
6060
+ ...value.item.namespace != null && {
6061
+ providerMetadata: {
6062
+ [providerOptionsName]: {
6063
+ namespace: value.item.namespace
6064
+ }
6065
+ }
6066
+ }
5970
6067
  });
5971
6068
  controller.enqueue({
5972
6069
  type: "tool-call",
@@ -5975,7 +6072,10 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
5975
6072
  input: value.item.arguments,
5976
6073
  providerMetadata: {
5977
6074
  [providerOptionsName]: {
5978
- itemId: value.item.id
6075
+ itemId: value.item.id,
6076
+ ...value.item.namespace != null && {
6077
+ namespace: value.item.namespace
6078
+ }
5979
6079
  }
5980
6080
  }
5981
6081
  });
@@ -6652,24 +6752,24 @@ function escapeJSONDelta(delta) {
6652
6752
  import {
6653
6753
  combineHeaders as combineHeaders7,
6654
6754
  createBinaryResponseHandler,
6655
- parseProviderOptions as parseProviderOptions7,
6755
+ parseProviderOptions as parseProviderOptions8,
6656
6756
  postJsonToApi as postJsonToApi6,
6657
6757
  serializeModelOptions as serializeModelOptions6,
6658
6758
  WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE6,
6659
6759
  WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE6
6660
6760
  } from "@ai-sdk/provider-utils";
6661
6761
 
6662
- // src/speech/openai-speech-options.ts
6762
+ // src/speech/openai-speech-model-options.ts
6663
6763
  import {
6664
- lazySchema as lazySchema23,
6665
- zodSchema as zodSchema23
6764
+ lazySchema as lazySchema24,
6765
+ zodSchema as zodSchema24
6666
6766
  } from "@ai-sdk/provider-utils";
6667
- import { z as z25 } from "zod/v4";
6668
- var openaiSpeechModelOptionsSchema = lazySchema23(
6669
- () => zodSchema23(
6670
- z25.object({
6671
- instructions: z25.string().nullish(),
6672
- speed: z25.number().min(0.25).max(4).default(1).nullish()
6767
+ import { z as z26 } from "zod/v4";
6768
+ var openaiSpeechModelOptionsSchema = lazySchema24(
6769
+ () => zodSchema24(
6770
+ z26.object({
6771
+ instructions: z26.string().nullish(),
6772
+ speed: z26.number().min(0.25).max(4).default(1).nullish()
6673
6773
  })
6674
6774
  )
6675
6775
  );
@@ -6703,7 +6803,7 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
6703
6803
  providerOptions
6704
6804
  }) {
6705
6805
  const warnings = [];
6706
- const openAIOptions = await parseProviderOptions7({
6806
+ const openAIOptions = await parseProviderOptions8({
6707
6807
  provider: "openai",
6708
6808
  providerOptions,
6709
6809
  schema: openaiSpeechModelOptionsSchema
@@ -6790,7 +6890,7 @@ import {
6790
6890
  convertBase64ToUint8Array as convertBase64ToUint8Array2,
6791
6891
  createJsonResponseHandler as createJsonResponseHandler7,
6792
6892
  mediaTypeToExtension,
6793
- parseProviderOptions as parseProviderOptions8,
6893
+ parseProviderOptions as parseProviderOptions9,
6794
6894
  postFormDataToApi as postFormDataToApi3,
6795
6895
  serializeModelOptions as serializeModelOptions7,
6796
6896
  WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE7,
@@ -6798,70 +6898,70 @@ import {
6798
6898
  } from "@ai-sdk/provider-utils";
6799
6899
 
6800
6900
  // src/transcription/openai-transcription-api.ts
6801
- import { lazySchema as lazySchema24, zodSchema as zodSchema24 } from "@ai-sdk/provider-utils";
6802
- import { z as z26 } from "zod/v4";
6803
- var openaiTranscriptionResponseSchema = lazySchema24(
6804
- () => zodSchema24(
6805
- z26.object({
6806
- text: z26.string(),
6807
- language: z26.string().nullish(),
6808
- duration: z26.number().nullish(),
6809
- words: z26.array(
6810
- z26.object({
6811
- word: z26.string(),
6812
- start: z26.number(),
6813
- end: z26.number()
6901
+ import { lazySchema as lazySchema25, zodSchema as zodSchema25 } from "@ai-sdk/provider-utils";
6902
+ import { z as z27 } from "zod/v4";
6903
+ var openaiTranscriptionResponseSchema = lazySchema25(
6904
+ () => zodSchema25(
6905
+ z27.object({
6906
+ text: z27.string(),
6907
+ language: z27.string().nullish(),
6908
+ duration: z27.number().nullish(),
6909
+ words: z27.array(
6910
+ z27.object({
6911
+ word: z27.string(),
6912
+ start: z27.number(),
6913
+ end: z27.number()
6814
6914
  })
6815
6915
  ).nullish(),
6816
- segments: z26.array(
6817
- z26.object({
6818
- id: z26.number(),
6819
- seek: z26.number(),
6820
- start: z26.number(),
6821
- end: z26.number(),
6822
- text: z26.string(),
6823
- tokens: z26.array(z26.number()),
6824
- temperature: z26.number(),
6825
- avg_logprob: z26.number(),
6826
- compression_ratio: z26.number(),
6827
- no_speech_prob: z26.number()
6916
+ segments: z27.array(
6917
+ z27.object({
6918
+ id: z27.number(),
6919
+ seek: z27.number(),
6920
+ start: z27.number(),
6921
+ end: z27.number(),
6922
+ text: z27.string(),
6923
+ tokens: z27.array(z27.number()),
6924
+ temperature: z27.number(),
6925
+ avg_logprob: z27.number(),
6926
+ compression_ratio: z27.number(),
6927
+ no_speech_prob: z27.number()
6828
6928
  })
6829
6929
  ).nullish()
6830
6930
  })
6831
6931
  )
6832
6932
  );
6833
6933
 
6834
- // src/transcription/openai-transcription-options.ts
6934
+ // src/transcription/openai-transcription-model-options.ts
6835
6935
  import {
6836
- lazySchema as lazySchema25,
6837
- zodSchema as zodSchema25
6936
+ lazySchema as lazySchema26,
6937
+ zodSchema as zodSchema26
6838
6938
  } from "@ai-sdk/provider-utils";
6839
- import { z as z27 } from "zod/v4";
6840
- var openAITranscriptionModelOptions = lazySchema25(
6841
- () => zodSchema25(
6842
- z27.object({
6939
+ import { z as z28 } from "zod/v4";
6940
+ var openAITranscriptionModelOptions = lazySchema26(
6941
+ () => zodSchema26(
6942
+ z28.object({
6843
6943
  /**
6844
6944
  * Additional information to include in the transcription response.
6845
6945
  */
6846
- include: z27.array(z27.string()).optional(),
6946
+ include: z28.array(z28.string()).optional(),
6847
6947
  /**
6848
6948
  * The language of the input audio in ISO-639-1 format.
6849
6949
  */
6850
- language: z27.string().optional(),
6950
+ language: z28.string().optional(),
6851
6951
  /**
6852
6952
  * An optional text to guide the model's style or continue a previous audio segment.
6853
6953
  */
6854
- prompt: z27.string().optional(),
6954
+ prompt: z28.string().optional(),
6855
6955
  /**
6856
6956
  * The sampling temperature, between 0 and 1.
6857
6957
  * @default 0
6858
6958
  */
6859
- temperature: z27.number().min(0).max(1).default(0).optional(),
6959
+ temperature: z28.number().min(0).max(1).default(0).optional(),
6860
6960
  /**
6861
6961
  * The timestamp granularities to populate for this transcription.
6862
6962
  * @default ['segment']
6863
6963
  */
6864
- timestampGranularities: z27.array(z27.enum(["word", "segment"])).default(["segment"]).optional()
6964
+ timestampGranularities: z28.array(z28.enum(["word", "segment"])).default(["segment"]).optional()
6865
6965
  })
6866
6966
  )
6867
6967
  );
@@ -6950,7 +7050,7 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
6950
7050
  providerOptions
6951
7051
  }) {
6952
7052
  const warnings = [];
6953
- const openAIOptions = await parseProviderOptions8({
7053
+ const openAIOptions = await parseProviderOptions9({
6954
7054
  provider: "openai",
6955
7055
  providerOptions,
6956
7056
  schema: openAITranscriptionModelOptions
@@ -7051,28 +7151,28 @@ import {
7051
7151
  } from "@ai-sdk/provider-utils";
7052
7152
 
7053
7153
  // src/skills/openai-skills-api.ts
7054
- import { lazySchema as lazySchema26, zodSchema as zodSchema26 } from "@ai-sdk/provider-utils";
7055
- import { z as z28 } from "zod/v4";
7056
- var openaiSkillResponseSchema = lazySchema26(
7057
- () => zodSchema26(
7058
- z28.object({
7059
- id: z28.string(),
7060
- name: z28.string().nullish(),
7061
- description: z28.string().nullish(),
7062
- default_version: z28.string().nullish(),
7063
- latest_version: z28.string().nullish(),
7064
- created_at: z28.number(),
7065
- updated_at: z28.number().nullish()
7154
+ import { lazySchema as lazySchema27, zodSchema as zodSchema27 } from "@ai-sdk/provider-utils";
7155
+ import { z as z29 } from "zod/v4";
7156
+ var openaiSkillResponseSchema = lazySchema27(
7157
+ () => zodSchema27(
7158
+ z29.object({
7159
+ id: z29.string(),
7160
+ name: z29.string().nullish(),
7161
+ description: z29.string().nullish(),
7162
+ default_version: z29.string().nullish(),
7163
+ latest_version: z29.string().nullish(),
7164
+ created_at: z29.number(),
7165
+ updated_at: z29.number().nullish()
7066
7166
  })
7067
7167
  )
7068
7168
  );
7069
- var openaiSkillVersionResponseSchema = lazySchema26(
7070
- () => zodSchema26(
7071
- z28.object({
7072
- id: z28.string(),
7073
- version: z28.string().nullish(),
7074
- name: z28.string().nullish(),
7075
- description: z28.string().nullish()
7169
+ var openaiSkillVersionResponseSchema = lazySchema27(
7170
+ () => zodSchema27(
7171
+ z29.object({
7172
+ id: z29.string(),
7173
+ version: z29.string().nullish(),
7174
+ name: z29.string().nullish(),
7175
+ description: z29.string().nullish()
7076
7176
  })
7077
7177
  )
7078
7178
  );
@@ -7127,7 +7227,7 @@ var OpenAISkills = class {
7127
7227
  };
7128
7228
 
7129
7229
  // src/version.ts
7130
- var VERSION = true ? "4.0.0-beta.41" : "0.0.0-test";
7230
+ var VERSION = true ? "4.0.0-beta.44" : "0.0.0-test";
7131
7231
 
7132
7232
  // src/openai-provider.ts
7133
7233
  function createOpenAI(options = {}) {