@ai-sdk/openai 3.0.0-beta.80 → 3.0.0-beta.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1973,74 +1973,58 @@ var localShell = createProviderToolFactoryWithOutputSchema5({
1973
1973
  outputSchema: localShellOutputSchema
1974
1974
  });
1975
1975
 
1976
- // src/tool/web-search.ts
1976
+ // src/tool/shell.ts
1977
1977
  import {
1978
1978
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema6,
1979
1979
  lazySchema as lazySchema13,
1980
1980
  zodSchema as zodSchema13
1981
1981
  } from "@ai-sdk/provider-utils";
1982
1982
  import { z as z14 } from "zod/v4";
1983
- var webSearchArgsSchema = lazySchema13(
1983
+ var shellInputSchema = lazySchema13(
1984
1984
  () => zodSchema13(
1985
1985
  z14.object({
1986
- externalWebAccess: z14.boolean().optional(),
1987
- filters: z14.object({ allowedDomains: z14.array(z14.string()).optional() }).optional(),
1988
- searchContextSize: z14.enum(["low", "medium", "high"]).optional(),
1989
- userLocation: z14.object({
1990
- type: z14.literal("approximate"),
1991
- country: z14.string().optional(),
1992
- city: z14.string().optional(),
1993
- region: z14.string().optional(),
1994
- timezone: z14.string().optional()
1995
- }).optional()
1986
+ action: z14.object({
1987
+ commands: z14.array(z14.string()),
1988
+ timeoutMs: z14.number().optional(),
1989
+ maxOutputLength: z14.number().optional()
1990
+ })
1996
1991
  })
1997
1992
  )
1998
1993
  );
1999
- var webSearchInputSchema = lazySchema13(() => zodSchema13(z14.object({})));
2000
- var webSearchOutputSchema = lazySchema13(
1994
+ var shellOutputSchema = lazySchema13(
2001
1995
  () => zodSchema13(
2002
1996
  z14.object({
2003
- action: z14.discriminatedUnion("type", [
1997
+ output: z14.array(
2004
1998
  z14.object({
2005
- type: z14.literal("search"),
2006
- query: z14.string().optional()
2007
- }),
2008
- z14.object({
2009
- type: z14.literal("openPage"),
2010
- url: z14.string().nullish()
2011
- }),
2012
- z14.object({
2013
- type: z14.literal("find"),
2014
- url: z14.string().nullish(),
2015
- pattern: z14.string().nullish()
1999
+ stdout: z14.string(),
2000
+ stderr: z14.string(),
2001
+ outcome: z14.discriminatedUnion("type", [
2002
+ z14.object({ type: z14.literal("timeout") }),
2003
+ z14.object({ type: z14.literal("exit"), exitCode: z14.number() })
2004
+ ])
2016
2005
  })
2017
- ]),
2018
- sources: z14.array(
2019
- z14.discriminatedUnion("type", [
2020
- z14.object({ type: z14.literal("url"), url: z14.string() }),
2021
- z14.object({ type: z14.literal("api"), name: z14.string() })
2022
- ])
2023
- ).optional()
2006
+ )
2024
2007
  })
2025
2008
  )
2026
2009
  );
2027
- var webSearchToolFactory = createProviderToolFactoryWithOutputSchema6({
2028
- id: "openai.web_search",
2029
- inputSchema: webSearchInputSchema,
2030
- outputSchema: webSearchOutputSchema
2010
+ var shell = createProviderToolFactoryWithOutputSchema6({
2011
+ id: "openai.shell",
2012
+ inputSchema: shellInputSchema,
2013
+ outputSchema: shellOutputSchema
2031
2014
  });
2032
- var webSearch = (args = {}) => webSearchToolFactory(args);
2033
2015
 
2034
- // src/tool/web-search-preview.ts
2016
+ // src/tool/web-search.ts
2035
2017
  import {
2036
2018
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema7,
2037
2019
  lazySchema as lazySchema14,
2038
2020
  zodSchema as zodSchema14
2039
2021
  } from "@ai-sdk/provider-utils";
2040
2022
  import { z as z15 } from "zod/v4";
2041
- var webSearchPreviewArgsSchema = lazySchema14(
2023
+ var webSearchArgsSchema = lazySchema14(
2042
2024
  () => zodSchema14(
2043
2025
  z15.object({
2026
+ externalWebAccess: z15.boolean().optional(),
2027
+ filters: z15.object({ allowedDomains: z15.array(z15.string()).optional() }).optional(),
2044
2028
  searchContextSize: z15.enum(["low", "medium", "high"]).optional(),
2045
2029
  userLocation: z15.object({
2046
2030
  type: z15.literal("approximate"),
@@ -2052,10 +2036,8 @@ var webSearchPreviewArgsSchema = lazySchema14(
2052
2036
  })
2053
2037
  )
2054
2038
  );
2055
- var webSearchPreviewInputSchema = lazySchema14(
2056
- () => zodSchema14(z15.object({}))
2057
- );
2058
- var webSearchPreviewOutputSchema = lazySchema14(
2039
+ var webSearchInputSchema = lazySchema14(() => zodSchema14(z15.object({})));
2040
+ var webSearchOutputSchema = lazySchema14(
2059
2041
  () => zodSchema14(
2060
2042
  z15.object({
2061
2043
  action: z15.discriminatedUnion("type", [
@@ -2072,47 +2054,105 @@ var webSearchPreviewOutputSchema = lazySchema14(
2072
2054
  url: z15.string().nullish(),
2073
2055
  pattern: z15.string().nullish()
2074
2056
  })
2075
- ])
2057
+ ]),
2058
+ sources: z15.array(
2059
+ z15.discriminatedUnion("type", [
2060
+ z15.object({ type: z15.literal("url"), url: z15.string() }),
2061
+ z15.object({ type: z15.literal("api"), name: z15.string() })
2062
+ ])
2063
+ ).optional()
2076
2064
  })
2077
2065
  )
2078
2066
  );
2079
- var webSearchPreview = createProviderToolFactoryWithOutputSchema7({
2080
- id: "openai.web_search_preview",
2081
- inputSchema: webSearchPreviewInputSchema,
2082
- outputSchema: webSearchPreviewOutputSchema
2067
+ var webSearchToolFactory = createProviderToolFactoryWithOutputSchema7({
2068
+ id: "openai.web_search",
2069
+ inputSchema: webSearchInputSchema,
2070
+ outputSchema: webSearchOutputSchema
2083
2071
  });
2072
+ var webSearch = (args = {}) => webSearchToolFactory(args);
2084
2073
 
2085
- // src/tool/mcp.ts
2074
+ // src/tool/web-search-preview.ts
2086
2075
  import {
2087
2076
  createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema8,
2088
2077
  lazySchema as lazySchema15,
2089
2078
  zodSchema as zodSchema15
2090
2079
  } from "@ai-sdk/provider-utils";
2091
2080
  import { z as z16 } from "zod/v4";
2092
- var jsonValueSchema = z16.lazy(
2093
- () => z16.union([
2094
- z16.string(),
2095
- z16.number(),
2096
- z16.boolean(),
2097
- z16.null(),
2098
- z16.array(jsonValueSchema),
2099
- z16.record(z16.string(), jsonValueSchema)
2100
- ])
2081
+ var webSearchPreviewArgsSchema = lazySchema15(
2082
+ () => zodSchema15(
2083
+ z16.object({
2084
+ searchContextSize: z16.enum(["low", "medium", "high"]).optional(),
2085
+ userLocation: z16.object({
2086
+ type: z16.literal("approximate"),
2087
+ country: z16.string().optional(),
2088
+ city: z16.string().optional(),
2089
+ region: z16.string().optional(),
2090
+ timezone: z16.string().optional()
2091
+ }).optional()
2092
+ })
2093
+ )
2101
2094
  );
2102
- var mcpArgsSchema = lazySchema15(
2095
+ var webSearchPreviewInputSchema = lazySchema15(
2096
+ () => zodSchema15(z16.object({}))
2097
+ );
2098
+ var webSearchPreviewOutputSchema = lazySchema15(
2103
2099
  () => zodSchema15(
2104
2100
  z16.object({
2105
- serverLabel: z16.string(),
2106
- allowedTools: z16.union([
2107
- z16.array(z16.string()),
2101
+ action: z16.discriminatedUnion("type", [
2102
+ z16.object({
2103
+ type: z16.literal("search"),
2104
+ query: z16.string().optional()
2105
+ }),
2106
+ z16.object({
2107
+ type: z16.literal("openPage"),
2108
+ url: z16.string().nullish()
2109
+ }),
2108
2110
  z16.object({
2109
- readOnly: z16.boolean().optional(),
2110
- toolNames: z16.array(z16.string()).optional()
2111
+ type: z16.literal("find"),
2112
+ url: z16.string().nullish(),
2113
+ pattern: z16.string().nullish()
2114
+ })
2115
+ ])
2116
+ })
2117
+ )
2118
+ );
2119
+ var webSearchPreview = createProviderToolFactoryWithOutputSchema8({
2120
+ id: "openai.web_search_preview",
2121
+ inputSchema: webSearchPreviewInputSchema,
2122
+ outputSchema: webSearchPreviewOutputSchema
2123
+ });
2124
+
2125
+ // src/tool/mcp.ts
2126
+ import {
2127
+ createProviderToolFactoryWithOutputSchema as createProviderToolFactoryWithOutputSchema9,
2128
+ lazySchema as lazySchema16,
2129
+ zodSchema as zodSchema16
2130
+ } from "@ai-sdk/provider-utils";
2131
+ import { z as z17 } from "zod/v4";
2132
+ var jsonValueSchema = z17.lazy(
2133
+ () => z17.union([
2134
+ z17.string(),
2135
+ z17.number(),
2136
+ z17.boolean(),
2137
+ z17.null(),
2138
+ z17.array(jsonValueSchema),
2139
+ z17.record(z17.string(), jsonValueSchema)
2140
+ ])
2141
+ );
2142
+ var mcpArgsSchema = lazySchema16(
2143
+ () => zodSchema16(
2144
+ z17.object({
2145
+ serverLabel: z17.string(),
2146
+ allowedTools: z17.union([
2147
+ z17.array(z17.string()),
2148
+ z17.object({
2149
+ readOnly: z17.boolean().optional(),
2150
+ toolNames: z17.array(z17.string()).optional()
2111
2151
  })
2112
2152
  ]).optional(),
2113
- authorization: z16.string().optional(),
2114
- connectorId: z16.string().optional(),
2115
- headers: z16.record(z16.string(), z16.string()).optional(),
2153
+ authorization: z17.string().optional(),
2154
+ connectorId: z17.string().optional(),
2155
+ headers: z17.record(z17.string(), z17.string()).optional(),
2116
2156
  // TODO: Integrate this MCP tool approval with our SDK's existing tool approval architecture
2117
2157
  // requireApproval: z
2118
2158
  // .union([
@@ -2123,50 +2163,50 @@ var mcpArgsSchema = lazySchema15(
2123
2163
  // }),
2124
2164
  // ])
2125
2165
  // .optional(),
2126
- serverDescription: z16.string().optional(),
2127
- serverUrl: z16.string().optional()
2166
+ serverDescription: z17.string().optional(),
2167
+ serverUrl: z17.string().optional()
2128
2168
  }).refine(
2129
2169
  (v) => v.serverUrl != null || v.connectorId != null,
2130
2170
  "One of serverUrl or connectorId must be provided."
2131
2171
  )
2132
2172
  )
2133
2173
  );
2134
- var mcpInputSchema = lazySchema15(() => zodSchema15(z16.object({})));
2135
- var mcpOutputSchema = lazySchema15(
2136
- () => zodSchema15(
2137
- z16.discriminatedUnion("type", [
2138
- z16.object({
2139
- type: z16.literal("call"),
2140
- serverLabel: z16.string(),
2141
- name: z16.string(),
2142
- arguments: z16.string(),
2143
- output: z16.string().nullable().optional(),
2144
- error: z16.union([z16.string(), jsonValueSchema]).optional()
2174
+ var mcpInputSchema = lazySchema16(() => zodSchema16(z17.object({})));
2175
+ var mcpOutputSchema = lazySchema16(
2176
+ () => zodSchema16(
2177
+ z17.discriminatedUnion("type", [
2178
+ z17.object({
2179
+ type: z17.literal("call"),
2180
+ serverLabel: z17.string(),
2181
+ name: z17.string(),
2182
+ arguments: z17.string(),
2183
+ output: z17.string().nullable().optional(),
2184
+ error: z17.union([z17.string(), jsonValueSchema]).optional()
2145
2185
  }),
2146
- z16.object({
2147
- type: z16.literal("listTools"),
2148
- serverLabel: z16.string(),
2149
- tools: z16.array(
2150
- z16.object({
2151
- name: z16.string(),
2152
- description: z16.string().optional(),
2186
+ z17.object({
2187
+ type: z17.literal("listTools"),
2188
+ serverLabel: z17.string(),
2189
+ tools: z17.array(
2190
+ z17.object({
2191
+ name: z17.string(),
2192
+ description: z17.string().optional(),
2153
2193
  inputSchema: jsonValueSchema,
2154
- annotations: z16.record(z16.string(), jsonValueSchema).optional()
2194
+ annotations: z17.record(z17.string(), jsonValueSchema).optional()
2155
2195
  })
2156
2196
  ),
2157
- error: z16.union([z16.string(), jsonValueSchema]).optional()
2197
+ error: z17.union([z17.string(), jsonValueSchema]).optional()
2158
2198
  }),
2159
- z16.object({
2160
- type: z16.literal("approvalRequest"),
2161
- serverLabel: z16.string(),
2162
- name: z16.string(),
2163
- arguments: z16.string(),
2164
- approvalRequestId: z16.string()
2199
+ z17.object({
2200
+ type: z17.literal("approvalRequest"),
2201
+ serverLabel: z17.string(),
2202
+ name: z17.string(),
2203
+ arguments: z17.string(),
2204
+ approvalRequestId: z17.string()
2165
2205
  })
2166
2206
  ])
2167
2207
  )
2168
2208
  );
2169
- var mcpToolFactory = createProviderToolFactoryWithOutputSchema8({
2209
+ var mcpToolFactory = createProviderToolFactoryWithOutputSchema9({
2170
2210
  id: "openai.mcp",
2171
2211
  inputSchema: mcpInputSchema,
2172
2212
  outputSchema: mcpOutputSchema
@@ -2226,6 +2266,18 @@ var openaiTools = {
2226
2266
  * Supported models: `gpt-5-codex` and `codex-mini-latest`
2227
2267
  */
2228
2268
  localShell,
2269
+ /**
2270
+ * The shell tool allows the model to interact with your local computer through
2271
+ * a controlled command-line interface. The model proposes shell commands; your
2272
+ * integration executes them and returns the outputs.
2273
+ *
2274
+ * Available through the Responses API for use with GPT-5.1.
2275
+ *
2276
+ * WARNING: Running arbitrary shell commands can be dangerous. Always sandbox
2277
+ * execution or add strict allow-/deny-lists before forwarding a command to
2278
+ * the system shell.
2279
+ */
2280
+ shell,
2229
2281
  /**
2230
2282
  * Web search allows models to access up-to-date information from the internet
2231
2283
  * and provide answers with sourced citations.
@@ -2283,7 +2335,7 @@ import {
2283
2335
  parseProviderOptions as parseProviderOptions4,
2284
2336
  validateTypes
2285
2337
  } from "@ai-sdk/provider-utils";
2286
- import { z as z17 } from "zod/v4";
2338
+ import { z as z18 } from "zod/v4";
2287
2339
  function isFileId(data, prefixes) {
2288
2340
  if (!prefixes) return false;
2289
2341
  return prefixes.some((prefix) => data.startsWith(prefix));
@@ -2295,6 +2347,7 @@ async function convertToOpenAIResponsesInput({
2295
2347
  fileIdPrefixes,
2296
2348
  store,
2297
2349
  hasLocalShellTool = false,
2350
+ hasShellTool = false,
2298
2351
  hasApplyPatchTool = false
2299
2352
  }) {
2300
2353
  var _a, _b, _c, _d, _e;
@@ -2421,6 +2474,24 @@ async function convertToOpenAIResponsesInput({
2421
2474
  });
2422
2475
  break;
2423
2476
  }
2477
+ if (hasShellTool && resolvedToolName === "shell") {
2478
+ const parsedInput = await validateTypes({
2479
+ value: part.input,
2480
+ schema: shellInputSchema
2481
+ });
2482
+ input.push({
2483
+ type: "shell_call",
2484
+ call_id: part.toolCallId,
2485
+ id,
2486
+ status: "completed",
2487
+ action: {
2488
+ commands: parsedInput.action.commands,
2489
+ timeout_ms: parsedInput.action.timeoutMs,
2490
+ max_output_length: parsedInput.action.maxOutputLength
2491
+ }
2492
+ });
2493
+ break;
2494
+ }
2424
2495
  input.push({
2425
2496
  type: "function_call",
2426
2497
  call_id: part.toolCallId,
@@ -2518,6 +2589,25 @@ async function convertToOpenAIResponsesInput({
2518
2589
  });
2519
2590
  break;
2520
2591
  }
2592
+ if (hasShellTool && resolvedToolName === "shell" && output.type === "json") {
2593
+ const parsedOutput = await validateTypes({
2594
+ value: output.value,
2595
+ schema: shellOutputSchema
2596
+ });
2597
+ input.push({
2598
+ type: "shell_call_output",
2599
+ call_id: part.toolCallId,
2600
+ output: parsedOutput.output.map((item) => ({
2601
+ stdout: item.stdout,
2602
+ stderr: item.stderr,
2603
+ outcome: item.outcome.type === "timeout" ? { type: "timeout" } : {
2604
+ type: "exit",
2605
+ exit_code: item.outcome.exitCode
2606
+ }
2607
+ }))
2608
+ });
2609
+ break;
2610
+ }
2521
2611
  if (hasApplyPatchTool && part.toolName === "apply_patch" && output.type === "json") {
2522
2612
  const parsedOutput = await validateTypes({
2523
2613
  value: output.value,
@@ -2591,9 +2681,9 @@ async function convertToOpenAIResponsesInput({
2591
2681
  }
2592
2682
  return { input, warnings };
2593
2683
  }
2594
- var openaiResponsesReasoningProviderOptionsSchema = z17.object({
2595
- itemId: z17.string().nullish(),
2596
- reasoningEncryptedContent: z17.string().nullish()
2684
+ var openaiResponsesReasoningProviderOptionsSchema = z18.object({
2685
+ itemId: z18.string().nullish(),
2686
+ reasoningEncryptedContent: z18.string().nullish()
2597
2687
  });
2598
2688
 
2599
2689
  // src/responses/map-openai-responses-finish-reason.ts
@@ -2615,393 +2705,411 @@ function mapOpenAIResponseFinishReason({
2615
2705
  }
2616
2706
 
2617
2707
  // src/responses/openai-responses-api.ts
2618
- import { lazySchema as lazySchema16, zodSchema as zodSchema16 } from "@ai-sdk/provider-utils";
2619
- import { z as z18 } from "zod/v4";
2620
- var openaiResponsesChunkSchema = lazySchema16(
2621
- () => zodSchema16(
2622
- z18.union([
2623
- z18.object({
2624
- type: z18.literal("response.output_text.delta"),
2625
- item_id: z18.string(),
2626
- delta: z18.string(),
2627
- logprobs: z18.array(
2628
- z18.object({
2629
- token: z18.string(),
2630
- logprob: z18.number(),
2631
- top_logprobs: z18.array(
2632
- z18.object({
2633
- token: z18.string(),
2634
- logprob: z18.number()
2708
+ import { lazySchema as lazySchema17, zodSchema as zodSchema17 } from "@ai-sdk/provider-utils";
2709
+ import { z as z19 } from "zod/v4";
2710
+ var openaiResponsesChunkSchema = lazySchema17(
2711
+ () => zodSchema17(
2712
+ z19.union([
2713
+ z19.object({
2714
+ type: z19.literal("response.output_text.delta"),
2715
+ item_id: z19.string(),
2716
+ delta: z19.string(),
2717
+ logprobs: z19.array(
2718
+ z19.object({
2719
+ token: z19.string(),
2720
+ logprob: z19.number(),
2721
+ top_logprobs: z19.array(
2722
+ z19.object({
2723
+ token: z19.string(),
2724
+ logprob: z19.number()
2635
2725
  })
2636
2726
  )
2637
2727
  })
2638
2728
  ).nullish()
2639
2729
  }),
2640
- z18.object({
2641
- type: z18.enum(["response.completed", "response.incomplete"]),
2642
- response: z18.object({
2643
- incomplete_details: z18.object({ reason: z18.string() }).nullish(),
2644
- usage: z18.object({
2645
- input_tokens: z18.number(),
2646
- input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
2647
- output_tokens: z18.number(),
2648
- output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
2730
+ z19.object({
2731
+ type: z19.enum(["response.completed", "response.incomplete"]),
2732
+ response: z19.object({
2733
+ incomplete_details: z19.object({ reason: z19.string() }).nullish(),
2734
+ usage: z19.object({
2735
+ input_tokens: z19.number(),
2736
+ input_tokens_details: z19.object({ cached_tokens: z19.number().nullish() }).nullish(),
2737
+ output_tokens: z19.number(),
2738
+ output_tokens_details: z19.object({ reasoning_tokens: z19.number().nullish() }).nullish()
2649
2739
  }),
2650
- service_tier: z18.string().nullish()
2740
+ service_tier: z19.string().nullish()
2651
2741
  })
2652
2742
  }),
2653
- z18.object({
2654
- type: z18.literal("response.created"),
2655
- response: z18.object({
2656
- id: z18.string(),
2657
- created_at: z18.number(),
2658
- model: z18.string(),
2659
- service_tier: z18.string().nullish()
2743
+ z19.object({
2744
+ type: z19.literal("response.created"),
2745
+ response: z19.object({
2746
+ id: z19.string(),
2747
+ created_at: z19.number(),
2748
+ model: z19.string(),
2749
+ service_tier: z19.string().nullish()
2660
2750
  })
2661
2751
  }),
2662
- z18.object({
2663
- type: z18.literal("response.output_item.added"),
2664
- output_index: z18.number(),
2665
- item: z18.discriminatedUnion("type", [
2666
- z18.object({
2667
- type: z18.literal("message"),
2668
- id: z18.string()
2752
+ z19.object({
2753
+ type: z19.literal("response.output_item.added"),
2754
+ output_index: z19.number(),
2755
+ item: z19.discriminatedUnion("type", [
2756
+ z19.object({
2757
+ type: z19.literal("message"),
2758
+ id: z19.string()
2669
2759
  }),
2670
- z18.object({
2671
- type: z18.literal("reasoning"),
2672
- id: z18.string(),
2673
- encrypted_content: z18.string().nullish()
2760
+ z19.object({
2761
+ type: z19.literal("reasoning"),
2762
+ id: z19.string(),
2763
+ encrypted_content: z19.string().nullish()
2674
2764
  }),
2675
- z18.object({
2676
- type: z18.literal("function_call"),
2677
- id: z18.string(),
2678
- call_id: z18.string(),
2679
- name: z18.string(),
2680
- arguments: z18.string()
2765
+ z19.object({
2766
+ type: z19.literal("function_call"),
2767
+ id: z19.string(),
2768
+ call_id: z19.string(),
2769
+ name: z19.string(),
2770
+ arguments: z19.string()
2681
2771
  }),
2682
- z18.object({
2683
- type: z18.literal("web_search_call"),
2684
- id: z18.string(),
2685
- status: z18.string()
2772
+ z19.object({
2773
+ type: z19.literal("web_search_call"),
2774
+ id: z19.string(),
2775
+ status: z19.string()
2686
2776
  }),
2687
- z18.object({
2688
- type: z18.literal("computer_call"),
2689
- id: z18.string(),
2690
- status: z18.string()
2777
+ z19.object({
2778
+ type: z19.literal("computer_call"),
2779
+ id: z19.string(),
2780
+ status: z19.string()
2691
2781
  }),
2692
- z18.object({
2693
- type: z18.literal("file_search_call"),
2694
- id: z18.string()
2782
+ z19.object({
2783
+ type: z19.literal("file_search_call"),
2784
+ id: z19.string()
2695
2785
  }),
2696
- z18.object({
2697
- type: z18.literal("image_generation_call"),
2698
- id: z18.string()
2786
+ z19.object({
2787
+ type: z19.literal("image_generation_call"),
2788
+ id: z19.string()
2699
2789
  }),
2700
- z18.object({
2701
- type: z18.literal("code_interpreter_call"),
2702
- id: z18.string(),
2703
- container_id: z18.string(),
2704
- code: z18.string().nullable(),
2705
- outputs: z18.array(
2706
- z18.discriminatedUnion("type", [
2707
- z18.object({ type: z18.literal("logs"), logs: z18.string() }),
2708
- z18.object({ type: z18.literal("image"), url: z18.string() })
2790
+ z19.object({
2791
+ type: z19.literal("code_interpreter_call"),
2792
+ id: z19.string(),
2793
+ container_id: z19.string(),
2794
+ code: z19.string().nullable(),
2795
+ outputs: z19.array(
2796
+ z19.discriminatedUnion("type", [
2797
+ z19.object({ type: z19.literal("logs"), logs: z19.string() }),
2798
+ z19.object({ type: z19.literal("image"), url: z19.string() })
2709
2799
  ])
2710
2800
  ).nullable(),
2711
- status: z18.string()
2801
+ status: z19.string()
2712
2802
  }),
2713
- z18.object({
2714
- type: z18.literal("mcp_call"),
2715
- id: z18.string(),
2716
- status: z18.string()
2803
+ z19.object({
2804
+ type: z19.literal("mcp_call"),
2805
+ id: z19.string(),
2806
+ status: z19.string()
2717
2807
  }),
2718
- z18.object({
2719
- type: z18.literal("mcp_list_tools"),
2720
- id: z18.string()
2808
+ z19.object({
2809
+ type: z19.literal("mcp_list_tools"),
2810
+ id: z19.string()
2721
2811
  }),
2722
- z18.object({
2723
- type: z18.literal("mcp_approval_request"),
2724
- id: z18.string()
2812
+ z19.object({
2813
+ type: z19.literal("mcp_approval_request"),
2814
+ id: z19.string()
2725
2815
  }),
2726
- z18.object({
2727
- type: z18.literal("apply_patch_call"),
2728
- id: z18.string(),
2729
- call_id: z18.string(),
2730
- status: z18.enum(["in_progress", "completed"]),
2731
- operation: z18.discriminatedUnion("type", [
2732
- z18.object({
2733
- type: z18.literal("create_file"),
2734
- path: z18.string(),
2735
- diff: z18.string()
2816
+ z19.object({
2817
+ type: z19.literal("apply_patch_call"),
2818
+ id: z19.string(),
2819
+ call_id: z19.string(),
2820
+ status: z19.enum(["in_progress", "completed"]),
2821
+ operation: z19.discriminatedUnion("type", [
2822
+ z19.object({
2823
+ type: z19.literal("create_file"),
2824
+ path: z19.string(),
2825
+ diff: z19.string()
2736
2826
  }),
2737
- z18.object({
2738
- type: z18.literal("delete_file"),
2739
- path: z18.string()
2827
+ z19.object({
2828
+ type: z19.literal("delete_file"),
2829
+ path: z19.string()
2740
2830
  }),
2741
- z18.object({
2742
- type: z18.literal("update_file"),
2743
- path: z18.string(),
2744
- diff: z18.string()
2831
+ z19.object({
2832
+ type: z19.literal("update_file"),
2833
+ path: z19.string(),
2834
+ diff: z19.string()
2745
2835
  })
2746
2836
  ])
2837
+ }),
2838
+ z19.object({
2839
+ type: z19.literal("shell_call"),
2840
+ id: z19.string(),
2841
+ call_id: z19.string(),
2842
+ status: z19.enum(["in_progress", "completed", "incomplete"]),
2843
+ action: z19.object({
2844
+ commands: z19.array(z19.string())
2845
+ })
2747
2846
  })
2748
2847
  ])
2749
2848
  }),
2750
- z18.object({
2751
- type: z18.literal("response.output_item.done"),
2752
- output_index: z18.number(),
2753
- item: z18.discriminatedUnion("type", [
2754
- z18.object({
2755
- type: z18.literal("message"),
2756
- id: z18.string()
2849
+ z19.object({
2850
+ type: z19.literal("response.output_item.done"),
2851
+ output_index: z19.number(),
2852
+ item: z19.discriminatedUnion("type", [
2853
+ z19.object({
2854
+ type: z19.literal("message"),
2855
+ id: z19.string()
2757
2856
  }),
2758
- z18.object({
2759
- type: z18.literal("reasoning"),
2760
- id: z18.string(),
2761
- encrypted_content: z18.string().nullish()
2857
+ z19.object({
2858
+ type: z19.literal("reasoning"),
2859
+ id: z19.string(),
2860
+ encrypted_content: z19.string().nullish()
2762
2861
  }),
2763
- z18.object({
2764
- type: z18.literal("function_call"),
2765
- id: z18.string(),
2766
- call_id: z18.string(),
2767
- name: z18.string(),
2768
- arguments: z18.string(),
2769
- status: z18.literal("completed")
2862
+ z19.object({
2863
+ type: z19.literal("function_call"),
2864
+ id: z19.string(),
2865
+ call_id: z19.string(),
2866
+ name: z19.string(),
2867
+ arguments: z19.string(),
2868
+ status: z19.literal("completed")
2770
2869
  }),
2771
- z18.object({
2772
- type: z18.literal("code_interpreter_call"),
2773
- id: z18.string(),
2774
- code: z18.string().nullable(),
2775
- container_id: z18.string(),
2776
- outputs: z18.array(
2777
- z18.discriminatedUnion("type", [
2778
- z18.object({ type: z18.literal("logs"), logs: z18.string() }),
2779
- z18.object({ type: z18.literal("image"), url: z18.string() })
2870
+ z19.object({
2871
+ type: z19.literal("code_interpreter_call"),
2872
+ id: z19.string(),
2873
+ code: z19.string().nullable(),
2874
+ container_id: z19.string(),
2875
+ outputs: z19.array(
2876
+ z19.discriminatedUnion("type", [
2877
+ z19.object({ type: z19.literal("logs"), logs: z19.string() }),
2878
+ z19.object({ type: z19.literal("image"), url: z19.string() })
2780
2879
  ])
2781
2880
  ).nullable()
2782
2881
  }),
2783
- z18.object({
2784
- type: z18.literal("image_generation_call"),
2785
- id: z18.string(),
2786
- result: z18.string()
2882
+ z19.object({
2883
+ type: z19.literal("image_generation_call"),
2884
+ id: z19.string(),
2885
+ result: z19.string()
2787
2886
  }),
2788
- z18.object({
2789
- type: z18.literal("web_search_call"),
2790
- id: z18.string(),
2791
- status: z18.string(),
2792
- action: z18.discriminatedUnion("type", [
2793
- z18.object({
2794
- type: z18.literal("search"),
2795
- query: z18.string().nullish(),
2796
- sources: z18.array(
2797
- z18.discriminatedUnion("type", [
2798
- z18.object({ type: z18.literal("url"), url: z18.string() }),
2799
- z18.object({ type: z18.literal("api"), name: z18.string() })
2887
+ z19.object({
2888
+ type: z19.literal("web_search_call"),
2889
+ id: z19.string(),
2890
+ status: z19.string(),
2891
+ action: z19.discriminatedUnion("type", [
2892
+ z19.object({
2893
+ type: z19.literal("search"),
2894
+ query: z19.string().nullish(),
2895
+ sources: z19.array(
2896
+ z19.discriminatedUnion("type", [
2897
+ z19.object({ type: z19.literal("url"), url: z19.string() }),
2898
+ z19.object({ type: z19.literal("api"), name: z19.string() })
2800
2899
  ])
2801
2900
  ).nullish()
2802
2901
  }),
2803
- z18.object({
2804
- type: z18.literal("open_page"),
2805
- url: z18.string().nullish()
2902
+ z19.object({
2903
+ type: z19.literal("open_page"),
2904
+ url: z19.string().nullish()
2806
2905
  }),
2807
- z18.object({
2808
- type: z18.literal("find"),
2809
- url: z18.string().nullish(),
2810
- pattern: z18.string().nullish()
2906
+ z19.object({
2907
+ type: z19.literal("find"),
2908
+ url: z19.string().nullish(),
2909
+ pattern: z19.string().nullish()
2811
2910
  })
2812
2911
  ])
2813
2912
  }),
2814
- z18.object({
2815
- type: z18.literal("file_search_call"),
2816
- id: z18.string(),
2817
- queries: z18.array(z18.string()),
2818
- results: z18.array(
2819
- z18.object({
2820
- attributes: z18.record(
2821
- z18.string(),
2822
- z18.union([z18.string(), z18.number(), z18.boolean()])
2913
+ z19.object({
2914
+ type: z19.literal("file_search_call"),
2915
+ id: z19.string(),
2916
+ queries: z19.array(z19.string()),
2917
+ results: z19.array(
2918
+ z19.object({
2919
+ attributes: z19.record(
2920
+ z19.string(),
2921
+ z19.union([z19.string(), z19.number(), z19.boolean()])
2823
2922
  ),
2824
- file_id: z18.string(),
2825
- filename: z18.string(),
2826
- score: z18.number(),
2827
- text: z18.string()
2923
+ file_id: z19.string(),
2924
+ filename: z19.string(),
2925
+ score: z19.number(),
2926
+ text: z19.string()
2828
2927
  })
2829
2928
  ).nullish()
2830
2929
  }),
2831
- z18.object({
2832
- type: z18.literal("local_shell_call"),
2833
- id: z18.string(),
2834
- call_id: z18.string(),
2835
- action: z18.object({
2836
- type: z18.literal("exec"),
2837
- command: z18.array(z18.string()),
2838
- timeout_ms: z18.number().optional(),
2839
- user: z18.string().optional(),
2840
- working_directory: z18.string().optional(),
2841
- env: z18.record(z18.string(), z18.string()).optional()
2930
+ z19.object({
2931
+ type: z19.literal("local_shell_call"),
2932
+ id: z19.string(),
2933
+ call_id: z19.string(),
2934
+ action: z19.object({
2935
+ type: z19.literal("exec"),
2936
+ command: z19.array(z19.string()),
2937
+ timeout_ms: z19.number().optional(),
2938
+ user: z19.string().optional(),
2939
+ working_directory: z19.string().optional(),
2940
+ env: z19.record(z19.string(), z19.string()).optional()
2842
2941
  })
2843
2942
  }),
2844
- z18.object({
2845
- type: z18.literal("computer_call"),
2846
- id: z18.string(),
2847
- status: z18.literal("completed")
2943
+ z19.object({
2944
+ type: z19.literal("computer_call"),
2945
+ id: z19.string(),
2946
+ status: z19.literal("completed")
2848
2947
  }),
2849
- z18.object({
2850
- type: z18.literal("mcp_call"),
2851
- id: z18.string(),
2852
- status: z18.string(),
2853
- arguments: z18.string(),
2854
- name: z18.string(),
2855
- server_label: z18.string(),
2856
- output: z18.string().nullish(),
2857
- error: z18.union([
2858
- z18.string(),
2859
- z18.object({
2860
- type: z18.string().optional(),
2861
- code: z18.union([z18.number(), z18.string()]).optional(),
2862
- message: z18.string().optional()
2948
+ z19.object({
2949
+ type: z19.literal("mcp_call"),
2950
+ id: z19.string(),
2951
+ status: z19.string(),
2952
+ arguments: z19.string(),
2953
+ name: z19.string(),
2954
+ server_label: z19.string(),
2955
+ output: z19.string().nullish(),
2956
+ error: z19.union([
2957
+ z19.string(),
2958
+ z19.object({
2959
+ type: z19.string().optional(),
2960
+ code: z19.union([z19.number(), z19.string()]).optional(),
2961
+ message: z19.string().optional()
2863
2962
  }).loose()
2864
2963
  ]).nullish()
2865
2964
  }),
2866
- z18.object({
2867
- type: z18.literal("mcp_list_tools"),
2868
- id: z18.string(),
2869
- server_label: z18.string(),
2870
- tools: z18.array(
2871
- z18.object({
2872
- name: z18.string(),
2873
- description: z18.string().optional(),
2874
- input_schema: z18.any(),
2875
- annotations: z18.record(z18.string(), z18.unknown()).optional()
2965
+ z19.object({
2966
+ type: z19.literal("mcp_list_tools"),
2967
+ id: z19.string(),
2968
+ server_label: z19.string(),
2969
+ tools: z19.array(
2970
+ z19.object({
2971
+ name: z19.string(),
2972
+ description: z19.string().optional(),
2973
+ input_schema: z19.any(),
2974
+ annotations: z19.record(z19.string(), z19.unknown()).optional()
2876
2975
  })
2877
2976
  ),
2878
- error: z18.union([
2879
- z18.string(),
2880
- z18.object({
2881
- type: z18.string().optional(),
2882
- code: z18.union([z18.number(), z18.string()]).optional(),
2883
- message: z18.string().optional()
2977
+ error: z19.union([
2978
+ z19.string(),
2979
+ z19.object({
2980
+ type: z19.string().optional(),
2981
+ code: z19.union([z19.number(), z19.string()]).optional(),
2982
+ message: z19.string().optional()
2884
2983
  }).loose()
2885
2984
  ]).optional()
2886
2985
  }),
2887
- z18.object({
2888
- type: z18.literal("mcp_approval_request"),
2889
- id: z18.string(),
2890
- server_label: z18.string(),
2891
- name: z18.string(),
2892
- arguments: z18.string(),
2893
- approval_request_id: z18.string()
2986
+ z19.object({
2987
+ type: z19.literal("mcp_approval_request"),
2988
+ id: z19.string(),
2989
+ server_label: z19.string(),
2990
+ name: z19.string(),
2991
+ arguments: z19.string(),
2992
+ approval_request_id: z19.string()
2894
2993
  }),
2895
- z18.object({
2896
- type: z18.literal("apply_patch_call"),
2897
- id: z18.string(),
2898
- call_id: z18.string(),
2899
- status: z18.enum(["in_progress", "completed"]),
2900
- operation: z18.discriminatedUnion("type", [
2901
- z18.object({
2902
- type: z18.literal("create_file"),
2903
- path: z18.string(),
2904
- diff: z18.string()
2994
+ z19.object({
2995
+ type: z19.literal("apply_patch_call"),
2996
+ id: z19.string(),
2997
+ call_id: z19.string(),
2998
+ status: z19.enum(["in_progress", "completed"]),
2999
+ operation: z19.discriminatedUnion("type", [
3000
+ z19.object({
3001
+ type: z19.literal("create_file"),
3002
+ path: z19.string(),
3003
+ diff: z19.string()
2905
3004
  }),
2906
- z18.object({
2907
- type: z18.literal("delete_file"),
2908
- path: z18.string()
3005
+ z19.object({
3006
+ type: z19.literal("delete_file"),
3007
+ path: z19.string()
2909
3008
  }),
2910
- z18.object({
2911
- type: z18.literal("update_file"),
2912
- path: z18.string(),
2913
- diff: z18.string()
3009
+ z19.object({
3010
+ type: z19.literal("update_file"),
3011
+ path: z19.string(),
3012
+ diff: z19.string()
2914
3013
  })
2915
3014
  ])
3015
+ }),
3016
+ z19.object({
3017
+ type: z19.literal("shell_call"),
3018
+ id: z19.string(),
3019
+ call_id: z19.string(),
3020
+ status: z19.enum(["in_progress", "completed", "incomplete"]),
3021
+ action: z19.object({
3022
+ commands: z19.array(z19.string())
3023
+ })
2916
3024
  })
2917
3025
  ])
2918
3026
  }),
2919
- z18.object({
2920
- type: z18.literal("response.function_call_arguments.delta"),
2921
- item_id: z18.string(),
2922
- output_index: z18.number(),
2923
- delta: z18.string()
3027
+ z19.object({
3028
+ type: z19.literal("response.function_call_arguments.delta"),
3029
+ item_id: z19.string(),
3030
+ output_index: z19.number(),
3031
+ delta: z19.string()
2924
3032
  }),
2925
- z18.object({
2926
- type: z18.literal("response.image_generation_call.partial_image"),
2927
- item_id: z18.string(),
2928
- output_index: z18.number(),
2929
- partial_image_b64: z18.string()
3033
+ z19.object({
3034
+ type: z19.literal("response.image_generation_call.partial_image"),
3035
+ item_id: z19.string(),
3036
+ output_index: z19.number(),
3037
+ partial_image_b64: z19.string()
2930
3038
  }),
2931
- z18.object({
2932
- type: z18.literal("response.code_interpreter_call_code.delta"),
2933
- item_id: z18.string(),
2934
- output_index: z18.number(),
2935
- delta: z18.string()
3039
+ z19.object({
3040
+ type: z19.literal("response.code_interpreter_call_code.delta"),
3041
+ item_id: z19.string(),
3042
+ output_index: z19.number(),
3043
+ delta: z19.string()
2936
3044
  }),
2937
- z18.object({
2938
- type: z18.literal("response.code_interpreter_call_code.done"),
2939
- item_id: z18.string(),
2940
- output_index: z18.number(),
2941
- code: z18.string()
3045
+ z19.object({
3046
+ type: z19.literal("response.code_interpreter_call_code.done"),
3047
+ item_id: z19.string(),
3048
+ output_index: z19.number(),
3049
+ code: z19.string()
2942
3050
  }),
2943
- z18.object({
2944
- type: z18.literal("response.output_text.annotation.added"),
2945
- annotation: z18.discriminatedUnion("type", [
2946
- z18.object({
2947
- type: z18.literal("url_citation"),
2948
- start_index: z18.number(),
2949
- end_index: z18.number(),
2950
- url: z18.string(),
2951
- title: z18.string()
3051
+ z19.object({
3052
+ type: z19.literal("response.output_text.annotation.added"),
3053
+ annotation: z19.discriminatedUnion("type", [
3054
+ z19.object({
3055
+ type: z19.literal("url_citation"),
3056
+ start_index: z19.number(),
3057
+ end_index: z19.number(),
3058
+ url: z19.string(),
3059
+ title: z19.string()
2952
3060
  }),
2953
- z18.object({
2954
- type: z18.literal("file_citation"),
2955
- file_id: z18.string(),
2956
- filename: z18.string().nullish(),
2957
- index: z18.number().nullish(),
2958
- start_index: z18.number().nullish(),
2959
- end_index: z18.number().nullish(),
2960
- quote: z18.string().nullish()
3061
+ z19.object({
3062
+ type: z19.literal("file_citation"),
3063
+ file_id: z19.string(),
3064
+ filename: z19.string().nullish(),
3065
+ index: z19.number().nullish(),
3066
+ start_index: z19.number().nullish(),
3067
+ end_index: z19.number().nullish(),
3068
+ quote: z19.string().nullish()
2961
3069
  }),
2962
- z18.object({
2963
- type: z18.literal("container_file_citation"),
2964
- container_id: z18.string(),
2965
- file_id: z18.string(),
2966
- filename: z18.string().nullish(),
2967
- start_index: z18.number().nullish(),
2968
- end_index: z18.number().nullish(),
2969
- index: z18.number().nullish()
3070
+ z19.object({
3071
+ type: z19.literal("container_file_citation"),
3072
+ container_id: z19.string(),
3073
+ file_id: z19.string(),
3074
+ filename: z19.string().nullish(),
3075
+ start_index: z19.number().nullish(),
3076
+ end_index: z19.number().nullish(),
3077
+ index: z19.number().nullish()
2970
3078
  }),
2971
- z18.object({
2972
- type: z18.literal("file_path"),
2973
- file_id: z18.string(),
2974
- index: z18.number().nullish()
3079
+ z19.object({
3080
+ type: z19.literal("file_path"),
3081
+ file_id: z19.string(),
3082
+ index: z19.number().nullish()
2975
3083
  })
2976
3084
  ])
2977
3085
  }),
2978
- z18.object({
2979
- type: z18.literal("response.reasoning_summary_part.added"),
2980
- item_id: z18.string(),
2981
- summary_index: z18.number()
3086
+ z19.object({
3087
+ type: z19.literal("response.reasoning_summary_part.added"),
3088
+ item_id: z19.string(),
3089
+ summary_index: z19.number()
2982
3090
  }),
2983
- z18.object({
2984
- type: z18.literal("response.reasoning_summary_text.delta"),
2985
- item_id: z18.string(),
2986
- summary_index: z18.number(),
2987
- delta: z18.string()
3091
+ z19.object({
3092
+ type: z19.literal("response.reasoning_summary_text.delta"),
3093
+ item_id: z19.string(),
3094
+ summary_index: z19.number(),
3095
+ delta: z19.string()
2988
3096
  }),
2989
- z18.object({
2990
- type: z18.literal("response.reasoning_summary_part.done"),
2991
- item_id: z18.string(),
2992
- summary_index: z18.number()
3097
+ z19.object({
3098
+ type: z19.literal("response.reasoning_summary_part.done"),
3099
+ item_id: z19.string(),
3100
+ summary_index: z19.number()
2993
3101
  }),
2994
- z18.object({
2995
- type: z18.literal("error"),
2996
- sequence_number: z18.number(),
2997
- error: z18.object({
2998
- type: z18.string(),
2999
- code: z18.string(),
3000
- message: z18.string(),
3001
- param: z18.string().nullish()
3102
+ z19.object({
3103
+ type: z19.literal("error"),
3104
+ sequence_number: z19.number(),
3105
+ error: z19.object({
3106
+ type: z19.string(),
3107
+ code: z19.string(),
3108
+ message: z19.string(),
3109
+ param: z19.string().nullish()
3002
3110
  })
3003
3111
  }),
3004
- z18.object({ type: z18.string() }).loose().transform((value) => ({
3112
+ z19.object({ type: z19.string() }).loose().transform((value) => ({
3005
3113
  type: "unknown_chunk",
3006
3114
  message: value.type
3007
3115
  }))
@@ -3009,258 +3117,267 @@ var openaiResponsesChunkSchema = lazySchema16(
3009
3117
  ])
3010
3118
  )
3011
3119
  );
3012
- var openaiResponsesResponseSchema = lazySchema16(
3013
- () => zodSchema16(
3014
- z18.object({
3015
- id: z18.string().optional(),
3016
- created_at: z18.number().optional(),
3017
- error: z18.object({
3018
- message: z18.string(),
3019
- type: z18.string(),
3020
- param: z18.string().nullish(),
3021
- code: z18.string()
3120
+ var openaiResponsesResponseSchema = lazySchema17(
3121
+ () => zodSchema17(
3122
+ z19.object({
3123
+ id: z19.string().optional(),
3124
+ created_at: z19.number().optional(),
3125
+ error: z19.object({
3126
+ message: z19.string(),
3127
+ type: z19.string(),
3128
+ param: z19.string().nullish(),
3129
+ code: z19.string()
3022
3130
  }).nullish(),
3023
- model: z18.string().optional(),
3024
- output: z18.array(
3025
- z18.discriminatedUnion("type", [
3026
- z18.object({
3027
- type: z18.literal("message"),
3028
- role: z18.literal("assistant"),
3029
- id: z18.string(),
3030
- content: z18.array(
3031
- z18.object({
3032
- type: z18.literal("output_text"),
3033
- text: z18.string(),
3034
- logprobs: z18.array(
3035
- z18.object({
3036
- token: z18.string(),
3037
- logprob: z18.number(),
3038
- top_logprobs: z18.array(
3039
- z18.object({
3040
- token: z18.string(),
3041
- logprob: z18.number()
3131
+ model: z19.string().optional(),
3132
+ output: z19.array(
3133
+ z19.discriminatedUnion("type", [
3134
+ z19.object({
3135
+ type: z19.literal("message"),
3136
+ role: z19.literal("assistant"),
3137
+ id: z19.string(),
3138
+ content: z19.array(
3139
+ z19.object({
3140
+ type: z19.literal("output_text"),
3141
+ text: z19.string(),
3142
+ logprobs: z19.array(
3143
+ z19.object({
3144
+ token: z19.string(),
3145
+ logprob: z19.number(),
3146
+ top_logprobs: z19.array(
3147
+ z19.object({
3148
+ token: z19.string(),
3149
+ logprob: z19.number()
3042
3150
  })
3043
3151
  )
3044
3152
  })
3045
3153
  ).nullish(),
3046
- annotations: z18.array(
3047
- z18.discriminatedUnion("type", [
3048
- z18.object({
3049
- type: z18.literal("url_citation"),
3050
- start_index: z18.number(),
3051
- end_index: z18.number(),
3052
- url: z18.string(),
3053
- title: z18.string()
3154
+ annotations: z19.array(
3155
+ z19.discriminatedUnion("type", [
3156
+ z19.object({
3157
+ type: z19.literal("url_citation"),
3158
+ start_index: z19.number(),
3159
+ end_index: z19.number(),
3160
+ url: z19.string(),
3161
+ title: z19.string()
3054
3162
  }),
3055
- z18.object({
3056
- type: z18.literal("file_citation"),
3057
- file_id: z18.string(),
3058
- filename: z18.string().nullish(),
3059
- index: z18.number().nullish(),
3060
- start_index: z18.number().nullish(),
3061
- end_index: z18.number().nullish(),
3062
- quote: z18.string().nullish()
3163
+ z19.object({
3164
+ type: z19.literal("file_citation"),
3165
+ file_id: z19.string(),
3166
+ filename: z19.string().nullish(),
3167
+ index: z19.number().nullish(),
3168
+ start_index: z19.number().nullish(),
3169
+ end_index: z19.number().nullish(),
3170
+ quote: z19.string().nullish()
3063
3171
  }),
3064
- z18.object({
3065
- type: z18.literal("container_file_citation"),
3066
- container_id: z18.string(),
3067
- file_id: z18.string(),
3068
- filename: z18.string().nullish(),
3069
- start_index: z18.number().nullish(),
3070
- end_index: z18.number().nullish(),
3071
- index: z18.number().nullish()
3172
+ z19.object({
3173
+ type: z19.literal("container_file_citation"),
3174
+ container_id: z19.string(),
3175
+ file_id: z19.string(),
3176
+ filename: z19.string().nullish(),
3177
+ start_index: z19.number().nullish(),
3178
+ end_index: z19.number().nullish(),
3179
+ index: z19.number().nullish()
3072
3180
  }),
3073
- z18.object({
3074
- type: z18.literal("file_path"),
3075
- file_id: z18.string(),
3076
- index: z18.number().nullish()
3181
+ z19.object({
3182
+ type: z19.literal("file_path"),
3183
+ file_id: z19.string(),
3184
+ index: z19.number().nullish()
3077
3185
  })
3078
3186
  ])
3079
3187
  )
3080
3188
  })
3081
3189
  )
3082
3190
  }),
3083
- z18.object({
3084
- type: z18.literal("web_search_call"),
3085
- id: z18.string(),
3086
- status: z18.string(),
3087
- action: z18.discriminatedUnion("type", [
3088
- z18.object({
3089
- type: z18.literal("search"),
3090
- query: z18.string().nullish(),
3091
- sources: z18.array(
3092
- z18.discriminatedUnion("type", [
3093
- z18.object({ type: z18.literal("url"), url: z18.string() }),
3094
- z18.object({ type: z18.literal("api"), name: z18.string() })
3191
+ z19.object({
3192
+ type: z19.literal("web_search_call"),
3193
+ id: z19.string(),
3194
+ status: z19.string(),
3195
+ action: z19.discriminatedUnion("type", [
3196
+ z19.object({
3197
+ type: z19.literal("search"),
3198
+ query: z19.string().nullish(),
3199
+ sources: z19.array(
3200
+ z19.discriminatedUnion("type", [
3201
+ z19.object({ type: z19.literal("url"), url: z19.string() }),
3202
+ z19.object({ type: z19.literal("api"), name: z19.string() })
3095
3203
  ])
3096
3204
  ).nullish()
3097
3205
  }),
3098
- z18.object({
3099
- type: z18.literal("open_page"),
3100
- url: z18.string().nullish()
3206
+ z19.object({
3207
+ type: z19.literal("open_page"),
3208
+ url: z19.string().nullish()
3101
3209
  }),
3102
- z18.object({
3103
- type: z18.literal("find"),
3104
- url: z18.string().nullish(),
3105
- pattern: z18.string().nullish()
3210
+ z19.object({
3211
+ type: z19.literal("find"),
3212
+ url: z19.string().nullish(),
3213
+ pattern: z19.string().nullish()
3106
3214
  })
3107
3215
  ])
3108
3216
  }),
3109
- z18.object({
3110
- type: z18.literal("file_search_call"),
3111
- id: z18.string(),
3112
- queries: z18.array(z18.string()),
3113
- results: z18.array(
3114
- z18.object({
3115
- attributes: z18.record(
3116
- z18.string(),
3117
- z18.union([z18.string(), z18.number(), z18.boolean()])
3217
+ z19.object({
3218
+ type: z19.literal("file_search_call"),
3219
+ id: z19.string(),
3220
+ queries: z19.array(z19.string()),
3221
+ results: z19.array(
3222
+ z19.object({
3223
+ attributes: z19.record(
3224
+ z19.string(),
3225
+ z19.union([z19.string(), z19.number(), z19.boolean()])
3118
3226
  ),
3119
- file_id: z18.string(),
3120
- filename: z18.string(),
3121
- score: z18.number(),
3122
- text: z18.string()
3227
+ file_id: z19.string(),
3228
+ filename: z19.string(),
3229
+ score: z19.number(),
3230
+ text: z19.string()
3123
3231
  })
3124
3232
  ).nullish()
3125
3233
  }),
3126
- z18.object({
3127
- type: z18.literal("code_interpreter_call"),
3128
- id: z18.string(),
3129
- code: z18.string().nullable(),
3130
- container_id: z18.string(),
3131
- outputs: z18.array(
3132
- z18.discriminatedUnion("type", [
3133
- z18.object({ type: z18.literal("logs"), logs: z18.string() }),
3134
- z18.object({ type: z18.literal("image"), url: z18.string() })
3234
+ z19.object({
3235
+ type: z19.literal("code_interpreter_call"),
3236
+ id: z19.string(),
3237
+ code: z19.string().nullable(),
3238
+ container_id: z19.string(),
3239
+ outputs: z19.array(
3240
+ z19.discriminatedUnion("type", [
3241
+ z19.object({ type: z19.literal("logs"), logs: z19.string() }),
3242
+ z19.object({ type: z19.literal("image"), url: z19.string() })
3135
3243
  ])
3136
3244
  ).nullable()
3137
3245
  }),
3138
- z18.object({
3139
- type: z18.literal("image_generation_call"),
3140
- id: z18.string(),
3141
- result: z18.string()
3246
+ z19.object({
3247
+ type: z19.literal("image_generation_call"),
3248
+ id: z19.string(),
3249
+ result: z19.string()
3142
3250
  }),
3143
- z18.object({
3144
- type: z18.literal("local_shell_call"),
3145
- id: z18.string(),
3146
- call_id: z18.string(),
3147
- action: z18.object({
3148
- type: z18.literal("exec"),
3149
- command: z18.array(z18.string()),
3150
- timeout_ms: z18.number().optional(),
3151
- user: z18.string().optional(),
3152
- working_directory: z18.string().optional(),
3153
- env: z18.record(z18.string(), z18.string()).optional()
3251
+ z19.object({
3252
+ type: z19.literal("local_shell_call"),
3253
+ id: z19.string(),
3254
+ call_id: z19.string(),
3255
+ action: z19.object({
3256
+ type: z19.literal("exec"),
3257
+ command: z19.array(z19.string()),
3258
+ timeout_ms: z19.number().optional(),
3259
+ user: z19.string().optional(),
3260
+ working_directory: z19.string().optional(),
3261
+ env: z19.record(z19.string(), z19.string()).optional()
3154
3262
  })
3155
3263
  }),
3156
- z18.object({
3157
- type: z18.literal("function_call"),
3158
- call_id: z18.string(),
3159
- name: z18.string(),
3160
- arguments: z18.string(),
3161
- id: z18.string()
3264
+ z19.object({
3265
+ type: z19.literal("function_call"),
3266
+ call_id: z19.string(),
3267
+ name: z19.string(),
3268
+ arguments: z19.string(),
3269
+ id: z19.string()
3162
3270
  }),
3163
- z18.object({
3164
- type: z18.literal("computer_call"),
3165
- id: z18.string(),
3166
- status: z18.string().optional()
3271
+ z19.object({
3272
+ type: z19.literal("computer_call"),
3273
+ id: z19.string(),
3274
+ status: z19.string().optional()
3167
3275
  }),
3168
- z18.object({
3169
- type: z18.literal("reasoning"),
3170
- id: z18.string(),
3171
- encrypted_content: z18.string().nullish(),
3172
- summary: z18.array(
3173
- z18.object({
3174
- type: z18.literal("summary_text"),
3175
- text: z18.string()
3276
+ z19.object({
3277
+ type: z19.literal("reasoning"),
3278
+ id: z19.string(),
3279
+ encrypted_content: z19.string().nullish(),
3280
+ summary: z19.array(
3281
+ z19.object({
3282
+ type: z19.literal("summary_text"),
3283
+ text: z19.string()
3176
3284
  })
3177
3285
  )
3178
3286
  }),
3179
- z18.object({
3180
- type: z18.literal("mcp_call"),
3181
- id: z18.string(),
3182
- status: z18.string(),
3183
- arguments: z18.string(),
3184
- name: z18.string(),
3185
- server_label: z18.string(),
3186
- output: z18.string().nullish(),
3187
- error: z18.union([
3188
- z18.string(),
3189
- z18.object({
3190
- type: z18.string().optional(),
3191
- code: z18.union([z18.number(), z18.string()]).optional(),
3192
- message: z18.string().optional()
3287
+ z19.object({
3288
+ type: z19.literal("mcp_call"),
3289
+ id: z19.string(),
3290
+ status: z19.string(),
3291
+ arguments: z19.string(),
3292
+ name: z19.string(),
3293
+ server_label: z19.string(),
3294
+ output: z19.string().nullish(),
3295
+ error: z19.union([
3296
+ z19.string(),
3297
+ z19.object({
3298
+ type: z19.string().optional(),
3299
+ code: z19.union([z19.number(), z19.string()]).optional(),
3300
+ message: z19.string().optional()
3193
3301
  }).loose()
3194
3302
  ]).nullish()
3195
3303
  }),
3196
- z18.object({
3197
- type: z18.literal("mcp_list_tools"),
3198
- id: z18.string(),
3199
- server_label: z18.string(),
3200
- tools: z18.array(
3201
- z18.object({
3202
- name: z18.string(),
3203
- description: z18.string().optional(),
3204
- input_schema: z18.any(),
3205
- annotations: z18.record(z18.string(), z18.unknown()).optional()
3304
+ z19.object({
3305
+ type: z19.literal("mcp_list_tools"),
3306
+ id: z19.string(),
3307
+ server_label: z19.string(),
3308
+ tools: z19.array(
3309
+ z19.object({
3310
+ name: z19.string(),
3311
+ description: z19.string().optional(),
3312
+ input_schema: z19.any(),
3313
+ annotations: z19.record(z19.string(), z19.unknown()).optional()
3206
3314
  })
3207
3315
  ),
3208
- error: z18.union([
3209
- z18.string(),
3210
- z18.object({
3211
- type: z18.string().optional(),
3212
- code: z18.union([z18.number(), z18.string()]).optional(),
3213
- message: z18.string().optional()
3316
+ error: z19.union([
3317
+ z19.string(),
3318
+ z19.object({
3319
+ type: z19.string().optional(),
3320
+ code: z19.union([z19.number(), z19.string()]).optional(),
3321
+ message: z19.string().optional()
3214
3322
  }).loose()
3215
3323
  ]).optional()
3216
3324
  }),
3217
- z18.object({
3218
- type: z18.literal("mcp_approval_request"),
3219
- id: z18.string(),
3220
- server_label: z18.string(),
3221
- name: z18.string(),
3222
- arguments: z18.string(),
3223
- approval_request_id: z18.string()
3325
+ z19.object({
3326
+ type: z19.literal("mcp_approval_request"),
3327
+ id: z19.string(),
3328
+ server_label: z19.string(),
3329
+ name: z19.string(),
3330
+ arguments: z19.string(),
3331
+ approval_request_id: z19.string()
3224
3332
  }),
3225
- z18.object({
3226
- type: z18.literal("apply_patch_call"),
3227
- id: z18.string(),
3228
- call_id: z18.string(),
3229
- status: z18.enum(["in_progress", "completed"]),
3230
- operation: z18.discriminatedUnion("type", [
3231
- z18.object({
3232
- type: z18.literal("create_file"),
3233
- path: z18.string(),
3234
- diff: z18.string()
3333
+ z19.object({
3334
+ type: z19.literal("apply_patch_call"),
3335
+ id: z19.string(),
3336
+ call_id: z19.string(),
3337
+ status: z19.enum(["in_progress", "completed"]),
3338
+ operation: z19.discriminatedUnion("type", [
3339
+ z19.object({
3340
+ type: z19.literal("create_file"),
3341
+ path: z19.string(),
3342
+ diff: z19.string()
3235
3343
  }),
3236
- z18.object({
3237
- type: z18.literal("delete_file"),
3238
- path: z18.string()
3344
+ z19.object({
3345
+ type: z19.literal("delete_file"),
3346
+ path: z19.string()
3239
3347
  }),
3240
- z18.object({
3241
- type: z18.literal("update_file"),
3242
- path: z18.string(),
3243
- diff: z18.string()
3348
+ z19.object({
3349
+ type: z19.literal("update_file"),
3350
+ path: z19.string(),
3351
+ diff: z19.string()
3244
3352
  })
3245
3353
  ])
3354
+ }),
3355
+ z19.object({
3356
+ type: z19.literal("shell_call"),
3357
+ id: z19.string(),
3358
+ call_id: z19.string(),
3359
+ status: z19.enum(["in_progress", "completed", "incomplete"]),
3360
+ action: z19.object({
3361
+ commands: z19.array(z19.string())
3362
+ })
3246
3363
  })
3247
3364
  ])
3248
3365
  ).optional(),
3249
- service_tier: z18.string().nullish(),
3250
- incomplete_details: z18.object({ reason: z18.string() }).nullish(),
3251
- usage: z18.object({
3252
- input_tokens: z18.number(),
3253
- input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
3254
- output_tokens: z18.number(),
3255
- output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
3366
+ service_tier: z19.string().nullish(),
3367
+ incomplete_details: z19.object({ reason: z19.string() }).nullish(),
3368
+ usage: z19.object({
3369
+ input_tokens: z19.number(),
3370
+ input_tokens_details: z19.object({ cached_tokens: z19.number().nullish() }).nullish(),
3371
+ output_tokens: z19.number(),
3372
+ output_tokens_details: z19.object({ reasoning_tokens: z19.number().nullish() }).nullish()
3256
3373
  }).optional()
3257
3374
  })
3258
3375
  )
3259
3376
  );
3260
3377
 
3261
3378
  // src/responses/openai-responses-options.ts
3262
- import { lazySchema as lazySchema17, zodSchema as zodSchema17 } from "@ai-sdk/provider-utils";
3263
- import { z as z19 } from "zod/v4";
3379
+ import { lazySchema as lazySchema18, zodSchema as zodSchema18 } from "@ai-sdk/provider-utils";
3380
+ import { z as z20 } from "zod/v4";
3264
3381
  var TOP_LOGPROBS_MAX = 20;
3265
3382
  var openaiResponsesReasoningModelIds = [
3266
3383
  "o1",
@@ -3327,9 +3444,9 @@ var openaiResponsesModelIds = [
3327
3444
  "gpt-5-chat-latest",
3328
3445
  ...openaiResponsesReasoningModelIds
3329
3446
  ];
3330
- var openaiResponsesProviderOptionsSchema = lazySchema17(
3331
- () => zodSchema17(
3332
- z19.object({
3447
+ var openaiResponsesProviderOptionsSchema = lazySchema18(
3448
+ () => zodSchema18(
3449
+ z20.object({
3333
3450
  /**
3334
3451
  * The ID of the OpenAI Conversation to continue.
3335
3452
  * You must create a conversation first via the OpenAI API.
@@ -3337,13 +3454,13 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3337
3454
  * Defaults to `undefined`.
3338
3455
  * @see https://platform.openai.com/docs/api-reference/conversations/create
3339
3456
  */
3340
- conversation: z19.string().nullish(),
3457
+ conversation: z20.string().nullish(),
3341
3458
  /**
3342
3459
  * The set of extra fields to include in the response (advanced, usually not needed).
3343
3460
  * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
3344
3461
  */
3345
- include: z19.array(
3346
- z19.enum([
3462
+ include: z20.array(
3463
+ z20.enum([
3347
3464
  "reasoning.encrypted_content",
3348
3465
  // handled internally by default, only needed for unknown reasoning models
3349
3466
  "file_search_call.results",
@@ -3355,7 +3472,7 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3355
3472
  * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
3356
3473
  * Defaults to `undefined`.
3357
3474
  */
3358
- instructions: z19.string().nullish(),
3475
+ instructions: z20.string().nullish(),
3359
3476
  /**
3360
3477
  * Return the log probabilities of the tokens. Including logprobs will increase
3361
3478
  * the response size and can slow down response times. However, it can
@@ -3370,30 +3487,30 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3370
3487
  * @see https://platform.openai.com/docs/api-reference/responses/create
3371
3488
  * @see https://cookbook.openai.com/examples/using_logprobs
3372
3489
  */
3373
- logprobs: z19.union([z19.boolean(), z19.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
3490
+ logprobs: z20.union([z20.boolean(), z20.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
3374
3491
  /**
3375
3492
  * The maximum number of total calls to built-in tools that can be processed in a response.
3376
3493
  * This maximum number applies across all built-in tool calls, not per individual tool.
3377
3494
  * Any further attempts to call a tool by the model will be ignored.
3378
3495
  */
3379
- maxToolCalls: z19.number().nullish(),
3496
+ maxToolCalls: z20.number().nullish(),
3380
3497
  /**
3381
3498
  * Additional metadata to store with the generation.
3382
3499
  */
3383
- metadata: z19.any().nullish(),
3500
+ metadata: z20.any().nullish(),
3384
3501
  /**
3385
3502
  * Whether to use parallel tool calls. Defaults to `true`.
3386
3503
  */
3387
- parallelToolCalls: z19.boolean().nullish(),
3504
+ parallelToolCalls: z20.boolean().nullish(),
3388
3505
  /**
3389
3506
  * The ID of the previous response. You can use it to continue a conversation.
3390
3507
  * Defaults to `undefined`.
3391
3508
  */
3392
- previousResponseId: z19.string().nullish(),
3509
+ previousResponseId: z20.string().nullish(),
3393
3510
  /**
3394
3511
  * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
3395
3512
  */
3396
- promptCacheKey: z19.string().nullish(),
3513
+ promptCacheKey: z20.string().nullish(),
3397
3514
  /**
3398
3515
  * The retention policy for the prompt cache.
3399
3516
  * - 'in_memory': Default. Standard prompt caching behavior.
@@ -3402,7 +3519,7 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3402
3519
  *
3403
3520
  * @default 'in_memory'
3404
3521
  */
3405
- promptCacheRetention: z19.enum(["in_memory", "24h"]).nullish(),
3522
+ promptCacheRetention: z20.enum(["in_memory", "24h"]).nullish(),
3406
3523
  /**
3407
3524
  * Reasoning effort for reasoning models. Defaults to `medium`. If you use
3408
3525
  * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
@@ -3412,17 +3529,17 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3412
3529
  * models. Setting `reasoningEffort` to 'none' with other models will result in
3413
3530
  * an error.
3414
3531
  */
3415
- reasoningEffort: z19.string().nullish(),
3532
+ reasoningEffort: z20.string().nullish(),
3416
3533
  /**
3417
3534
  * Controls reasoning summary output from the model.
3418
3535
  * Set to "auto" to automatically receive the richest level available,
3419
3536
  * or "detailed" for comprehensive summaries.
3420
3537
  */
3421
- reasoningSummary: z19.string().nullish(),
3538
+ reasoningSummary: z20.string().nullish(),
3422
3539
  /**
3423
3540
  * The identifier for safety monitoring and tracking.
3424
3541
  */
3425
- safetyIdentifier: z19.string().nullish(),
3542
+ safetyIdentifier: z20.string().nullish(),
3426
3543
  /**
3427
3544
  * Service tier for the request.
3428
3545
  * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
@@ -3430,34 +3547,34 @@ var openaiResponsesProviderOptionsSchema = lazySchema17(
3430
3547
  *
3431
3548
  * Defaults to 'auto'.
3432
3549
  */
3433
- serviceTier: z19.enum(["auto", "flex", "priority", "default"]).nullish(),
3550
+ serviceTier: z20.enum(["auto", "flex", "priority", "default"]).nullish(),
3434
3551
  /**
3435
3552
  * Whether to store the generation. Defaults to `true`.
3436
3553
  */
3437
- store: z19.boolean().nullish(),
3554
+ store: z20.boolean().nullish(),
3438
3555
  /**
3439
3556
  * Whether to use strict JSON schema validation.
3440
3557
  * Defaults to `true`.
3441
3558
  */
3442
- strictJsonSchema: z19.boolean().nullish(),
3559
+ strictJsonSchema: z20.boolean().nullish(),
3443
3560
  /**
3444
3561
  * Controls the verbosity of the model's responses. Lower values ('low') will result
3445
3562
  * in more concise responses, while higher values ('high') will result in more verbose responses.
3446
3563
  * Valid values: 'low', 'medium', 'high'.
3447
3564
  */
3448
- textVerbosity: z19.enum(["low", "medium", "high"]).nullish(),
3565
+ textVerbosity: z20.enum(["low", "medium", "high"]).nullish(),
3449
3566
  /**
3450
3567
  * Controls output truncation. 'auto' (default) performs truncation automatically;
3451
3568
  * 'disabled' turns truncation off.
3452
3569
  */
3453
- truncation: z19.enum(["auto", "disabled"]).nullish(),
3570
+ truncation: z20.enum(["auto", "disabled"]).nullish(),
3454
3571
  /**
3455
3572
  * A unique identifier representing your end-user, which can help OpenAI to
3456
3573
  * monitor and detect abuse.
3457
3574
  * Defaults to `undefined`.
3458
3575
  * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
3459
3576
  */
3460
- user: z19.string().nullish()
3577
+ user: z20.string().nullish()
3461
3578
  })
3462
3579
  )
3463
3580
  );
@@ -3513,6 +3630,12 @@ async function prepareResponsesTools({
3513
3630
  });
3514
3631
  break;
3515
3632
  }
3633
+ case "openai.shell": {
3634
+ openaiTools2.push({
3635
+ type: "shell"
3636
+ });
3637
+ break;
3638
+ }
3516
3639
  case "openai.apply_patch": {
3517
3640
  openaiTools2.push({
3518
3641
  type: "apply_patch"
@@ -3701,6 +3824,7 @@ var OpenAIResponsesLanguageModel = class {
3701
3824
  "openai.file_search": "file_search",
3702
3825
  "openai.image_generation": "image_generation",
3703
3826
  "openai.local_shell": "local_shell",
3827
+ "openai.shell": "shell",
3704
3828
  "openai.web_search": "web_search",
3705
3829
  "openai.web_search_preview": "web_search_preview",
3706
3830
  "openai.mcp": "mcp",
@@ -3714,6 +3838,7 @@ var OpenAIResponsesLanguageModel = class {
3714
3838
  fileIdPrefixes: this.config.fileIdPrefixes,
3715
3839
  store: (_a = openaiOptions == null ? void 0 : openaiOptions.store) != null ? _a : true,
3716
3840
  hasLocalShellTool: hasOpenAITool("openai.local_shell"),
3841
+ hasShellTool: hasOpenAITool("openai.shell"),
3717
3842
  hasApplyPatchTool: hasOpenAITool("openai.apply_patch")
3718
3843
  });
3719
3844
  warnings.push(...inputWarnings);
@@ -3961,6 +4086,24 @@ var OpenAIResponsesLanguageModel = class {
3961
4086
  });
3962
4087
  break;
3963
4088
  }
4089
+ case "shell_call": {
4090
+ content.push({
4091
+ type: "tool-call",
4092
+ toolCallId: part.call_id,
4093
+ toolName: toolNameMapping.toCustomToolName("shell"),
4094
+ input: JSON.stringify({
4095
+ action: {
4096
+ commands: part.action.commands
4097
+ }
4098
+ }),
4099
+ providerMetadata: {
4100
+ [providerKey]: {
4101
+ itemId: part.id
4102
+ }
4103
+ }
4104
+ });
4105
+ break;
4106
+ }
3964
4107
  case "message": {
3965
4108
  for (const contentPart of part.content) {
3966
4109
  if (((_c = (_b = options.providerOptions) == null ? void 0 : _b.openai) == null ? void 0 : _c.logprobs) && contentPart.logprobs) {
@@ -4439,6 +4582,11 @@ var OpenAIResponsesLanguageModel = class {
4439
4582
  }
4440
4583
  });
4441
4584
  }
4585
+ } else if (value.item.type === "shell_call") {
4586
+ ongoingToolCalls[value.output_index] = {
4587
+ toolName: toolNameMapping.toCustomToolName("shell"),
4588
+ toolCallId: value.item.call_id
4589
+ };
4442
4590
  } else if (value.item.type === "message") {
4443
4591
  ongoingAnnotations.splice(0, ongoingAnnotations.length);
4444
4592
  controller.enqueue({
@@ -4654,6 +4802,21 @@ var OpenAIResponsesLanguageModel = class {
4654
4802
  [providerKey]: { itemId: value.item.id }
4655
4803
  }
4656
4804
  });
4805
+ } else if (value.item.type === "shell_call") {
4806
+ ongoingToolCalls[value.output_index] = void 0;
4807
+ controller.enqueue({
4808
+ type: "tool-call",
4809
+ toolCallId: value.item.call_id,
4810
+ toolName: toolNameMapping.toCustomToolName("shell"),
4811
+ input: JSON.stringify({
4812
+ action: {
4813
+ commands: value.item.action.commands
4814
+ }
4815
+ }),
4816
+ providerMetadata: {
4817
+ [providerKey]: { itemId: value.item.id }
4818
+ }
4819
+ });
4657
4820
  } else if (value.item.type === "reasoning") {
4658
4821
  const activeReasoningPart = activeReasoning[value.item.id];
4659
4822
  const summaryPartIndices = Object.entries(
@@ -4971,13 +5134,13 @@ import {
4971
5134
  } from "@ai-sdk/provider-utils";
4972
5135
 
4973
5136
  // src/speech/openai-speech-options.ts
4974
- import { lazySchema as lazySchema18, zodSchema as zodSchema18 } from "@ai-sdk/provider-utils";
4975
- import { z as z20 } from "zod/v4";
4976
- var openaiSpeechProviderOptionsSchema = lazySchema18(
4977
- () => zodSchema18(
4978
- z20.object({
4979
- instructions: z20.string().nullish(),
4980
- speed: z20.number().min(0.25).max(4).default(1).nullish()
5137
+ import { lazySchema as lazySchema19, zodSchema as zodSchema19 } from "@ai-sdk/provider-utils";
5138
+ import { z as z21 } from "zod/v4";
5139
+ var openaiSpeechProviderOptionsSchema = lazySchema19(
5140
+ () => zodSchema19(
5141
+ z21.object({
5142
+ instructions: z21.string().nullish(),
5143
+ speed: z21.number().min(0.25).max(4).default(1).nullish()
4981
5144
  })
4982
5145
  )
4983
5146
  );
@@ -5094,33 +5257,33 @@ import {
5094
5257
  } from "@ai-sdk/provider-utils";
5095
5258
 
5096
5259
  // src/transcription/openai-transcription-api.ts
5097
- import { lazySchema as lazySchema19, zodSchema as zodSchema19 } from "@ai-sdk/provider-utils";
5098
- import { z as z21 } from "zod/v4";
5099
- var openaiTranscriptionResponseSchema = lazySchema19(
5100
- () => zodSchema19(
5101
- z21.object({
5102
- text: z21.string(),
5103
- language: z21.string().nullish(),
5104
- duration: z21.number().nullish(),
5105
- words: z21.array(
5106
- z21.object({
5107
- word: z21.string(),
5108
- start: z21.number(),
5109
- end: z21.number()
5260
+ import { lazySchema as lazySchema20, zodSchema as zodSchema20 } from "@ai-sdk/provider-utils";
5261
+ import { z as z22 } from "zod/v4";
5262
+ var openaiTranscriptionResponseSchema = lazySchema20(
5263
+ () => zodSchema20(
5264
+ z22.object({
5265
+ text: z22.string(),
5266
+ language: z22.string().nullish(),
5267
+ duration: z22.number().nullish(),
5268
+ words: z22.array(
5269
+ z22.object({
5270
+ word: z22.string(),
5271
+ start: z22.number(),
5272
+ end: z22.number()
5110
5273
  })
5111
5274
  ).nullish(),
5112
- segments: z21.array(
5113
- z21.object({
5114
- id: z21.number(),
5115
- seek: z21.number(),
5116
- start: z21.number(),
5117
- end: z21.number(),
5118
- text: z21.string(),
5119
- tokens: z21.array(z21.number()),
5120
- temperature: z21.number(),
5121
- avg_logprob: z21.number(),
5122
- compression_ratio: z21.number(),
5123
- no_speech_prob: z21.number()
5275
+ segments: z22.array(
5276
+ z22.object({
5277
+ id: z22.number(),
5278
+ seek: z22.number(),
5279
+ start: z22.number(),
5280
+ end: z22.number(),
5281
+ text: z22.string(),
5282
+ tokens: z22.array(z22.number()),
5283
+ temperature: z22.number(),
5284
+ avg_logprob: z22.number(),
5285
+ compression_ratio: z22.number(),
5286
+ no_speech_prob: z22.number()
5124
5287
  })
5125
5288
  ).nullish()
5126
5289
  })
@@ -5128,33 +5291,33 @@ var openaiTranscriptionResponseSchema = lazySchema19(
5128
5291
  );
5129
5292
 
5130
5293
  // src/transcription/openai-transcription-options.ts
5131
- import { lazySchema as lazySchema20, zodSchema as zodSchema20 } from "@ai-sdk/provider-utils";
5132
- import { z as z22 } from "zod/v4";
5133
- var openAITranscriptionProviderOptions = lazySchema20(
5134
- () => zodSchema20(
5135
- z22.object({
5294
+ import { lazySchema as lazySchema21, zodSchema as zodSchema21 } from "@ai-sdk/provider-utils";
5295
+ import { z as z23 } from "zod/v4";
5296
+ var openAITranscriptionProviderOptions = lazySchema21(
5297
+ () => zodSchema21(
5298
+ z23.object({
5136
5299
  /**
5137
5300
  * Additional information to include in the transcription response.
5138
5301
  */
5139
- include: z22.array(z22.string()).optional(),
5302
+ include: z23.array(z23.string()).optional(),
5140
5303
  /**
5141
5304
  * The language of the input audio in ISO-639-1 format.
5142
5305
  */
5143
- language: z22.string().optional(),
5306
+ language: z23.string().optional(),
5144
5307
  /**
5145
5308
  * An optional text to guide the model's style or continue a previous audio segment.
5146
5309
  */
5147
- prompt: z22.string().optional(),
5310
+ prompt: z23.string().optional(),
5148
5311
  /**
5149
5312
  * The sampling temperature, between 0 and 1.
5150
5313
  * @default 0
5151
5314
  */
5152
- temperature: z22.number().min(0).max(1).default(0).optional(),
5315
+ temperature: z23.number().min(0).max(1).default(0).optional(),
5153
5316
  /**
5154
5317
  * The timestamp granularities to populate for this transcription.
5155
5318
  * @default ['segment']
5156
5319
  */
5157
- timestampGranularities: z22.array(z22.enum(["word", "segment"])).default(["segment"]).optional()
5320
+ timestampGranularities: z23.array(z23.enum(["word", "segment"])).default(["segment"]).optional()
5158
5321
  })
5159
5322
  )
5160
5323
  );
@@ -5327,7 +5490,7 @@ var OpenAITranscriptionModel = class {
5327
5490
  };
5328
5491
 
5329
5492
  // src/version.ts
5330
- var VERSION = true ? "3.0.0-beta.80" : "0.0.0-test";
5493
+ var VERSION = true ? "3.0.0-beta.82" : "0.0.0-test";
5331
5494
 
5332
5495
  // src/openai-provider.ts
5333
5496
  function createOpenAI(options = {}) {