@ai-sdk/openai 3.0.65 → 3.0.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "3.0.65",
3
+ "version": "3.0.67",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -16,4 +16,5 @@ export * from '../tool/apply-patch';
16
16
  export * from '../tool/code-interpreter';
17
17
  export * from '../tool/file-search';
18
18
  export * from '../tool/image-generation';
19
+ export * from '../tool/web-search';
19
20
  export * from '../tool/web-search-preview';
@@ -738,6 +738,7 @@ export const openaiResponsesChunkSchema = lazySchema(() =>
738
738
  z.object({
739
739
  type: z.literal('search'),
740
740
  query: z.string().nullish(),
741
+ queries: z.array(z.string()).nullish(),
741
742
  sources: z
742
743
  .array(
743
744
  z.discriminatedUnion('type', [
@@ -1130,6 +1131,7 @@ export const openaiResponsesResponseSchema = lazySchema(() =>
1130
1131
  z.object({
1131
1132
  type: z.literal('search'),
1132
1133
  query: z.string().nullish(),
1134
+ queries: z.array(z.string()).nullish(),
1133
1135
  sources: z
1134
1136
  .array(
1135
1137
  z.discriminatedUnion('type', [
@@ -2247,7 +2247,11 @@ function mapWebSearchOutput(
2247
2247
  switch (action.type) {
2248
2248
  case 'search':
2249
2249
  return {
2250
- action: { type: 'search', query: action.query ?? undefined },
2250
+ action: {
2251
+ type: 'search',
2252
+ query: action.query ?? undefined,
2253
+ ...(action.queries != null && { queries: action.queries }),
2254
+ },
2251
2255
  // include sources when provided by the Responses API (behind include flag)
2252
2256
  ...(action.sources != null && { sources: action.sources }),
2253
2257
  };
@@ -36,6 +36,7 @@ export const webSearchOutputSchema = lazySchema(() =>
36
36
  z.object({
37
37
  type: z.literal('search'),
38
38
  query: z.string().optional(),
39
+ queries: z.array(z.string()).optional(),
39
40
  }),
40
41
  z.object({
41
42
  type: z.literal('openPage'),
@@ -78,8 +79,15 @@ export const webSearchToolFactory = createProviderToolFactoryWithOutputSchema<
78
79
 
79
80
  /**
80
81
  * The search query.
82
+ *
83
+ * @deprecated Use `queries` instead.
81
84
  */
82
85
  query?: string;
86
+
87
+ /**
88
+ * The search queries the model used.
89
+ */
90
+ queries?: string[];
83
91
  }
84
92
  | {
85
93
  /**