@ai-sdk/openai 2.1.0-beta.9 → 3.0.0-beta.101

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.d.mts CHANGED
@@ -1,48 +1,88 @@
1
- import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV2, SpeechModelV2 } from '@ai-sdk/provider';
1
+ import * as _ai_sdk_provider from '@ai-sdk/provider';
2
+ import { ProviderV3, LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3, SpeechModelV3 } from '@ai-sdk/provider';
2
3
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
3
- import { FetchFunction } from '@ai-sdk/provider-utils';
4
- import { z } from 'zod/v4';
4
+ import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
5
5
 
6
- type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | (string & {});
7
- declare const openaiChatLanguageModelOptions: z.ZodObject<{
8
- logitBias: z.ZodOptional<z.ZodRecord<z.ZodCoercedNumber<string>, z.ZodNumber>>;
9
- logprobs: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>>;
10
- parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
11
- user: z.ZodOptional<z.ZodString>;
12
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
13
- minimal: "minimal";
14
- low: "low";
15
- medium: "medium";
16
- high: "high";
17
- }>>;
18
- maxCompletionTokens: z.ZodOptional<z.ZodNumber>;
19
- store: z.ZodOptional<z.ZodBoolean>;
20
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
21
- prediction: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
22
- structuredOutputs: z.ZodOptional<z.ZodBoolean>;
23
- serviceTier: z.ZodOptional<z.ZodEnum<{
24
- auto: "auto";
25
- flex: "flex";
26
- priority: "priority";
27
- }>>;
28
- strictJsonSchema: z.ZodOptional<z.ZodBoolean>;
29
- textVerbosity: z.ZodOptional<z.ZodEnum<{
30
- low: "low";
31
- medium: "medium";
32
- high: "high";
33
- }>>;
34
- promptCacheKey: z.ZodOptional<z.ZodString>;
35
- safetyIdentifier: z.ZodOptional<z.ZodString>;
36
- }, z.core.$strip>;
37
- type OpenAIChatLanguageModelOptions = z.infer<typeof openaiChatLanguageModelOptions>;
6
+ type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | (string & {});
7
+ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
8
+ logitBias?: Record<number, number> | undefined;
9
+ logprobs?: number | boolean | undefined;
10
+ parallelToolCalls?: boolean | undefined;
11
+ user?: string | undefined;
12
+ reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
13
+ maxCompletionTokens?: number | undefined;
14
+ store?: boolean | undefined;
15
+ metadata?: Record<string, string> | undefined;
16
+ prediction?: Record<string, any> | undefined;
17
+ serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
18
+ strictJsonSchema?: boolean | undefined;
19
+ textVerbosity?: "low" | "medium" | "high" | undefined;
20
+ promptCacheKey?: string | undefined;
21
+ promptCacheRetention?: "in_memory" | "24h" | undefined;
22
+ safetyIdentifier?: string | undefined;
23
+ }>;
24
+ type OpenAIChatLanguageModelOptions = InferSchema<typeof openaiChatLanguageModelOptions>;
38
25
 
39
26
  type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
40
27
 
41
28
  type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
42
29
 
43
- type OpenAIImageModelId = 'gpt-image-1' | 'dall-e-3' | 'dall-e-2' | (string & {});
30
+ type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | (string & {});
44
31
 
45
- declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
32
+ declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
33
+ /**
34
+ * An object describing the specific action taken in this web search call.
35
+ * Includes details on how the model used the web (search, open_page, find_in_page).
36
+ */
37
+ action: {
38
+ /**
39
+ * Action type "search" - Performs a web search query.
40
+ */
41
+ type: "search";
42
+ /**
43
+ * The search query.
44
+ */
45
+ query?: string;
46
+ } | {
47
+ /**
48
+ * Action type "openPage" - Opens a specific URL from search results.
49
+ */
50
+ type: "openPage";
51
+ /**
52
+ * The URL opened by the model.
53
+ */
54
+ url?: string | null;
55
+ } | {
56
+ /**
57
+ * Action type "findInPage": Searches for a pattern within a loaded page.
58
+ */
59
+ type: "findInPage";
60
+ /**
61
+ * The URL of the page searched for the pattern.
62
+ */
63
+ url?: string | null;
64
+ /**
65
+ * The pattern or text to search for within the page.
66
+ */
67
+ pattern?: string | null;
68
+ };
69
+ /**
70
+ * Optional sources cited by the model for the web search call.
71
+ */
72
+ sources?: Array<{
73
+ type: "url";
74
+ url: string;
75
+ } | {
76
+ type: "api";
77
+ name: string;
78
+ }>;
79
+ }, {
80
+ /**
81
+ * Whether to use external web access for fetching live content.
82
+ * - true: Fetch live web content (default)
83
+ * - false: Use cached/indexed results
84
+ */
85
+ externalWebAccess?: boolean;
46
86
  /**
47
87
  * Filters for the search.
48
88
  */
@@ -97,13 +137,13 @@ type OpenAIResponsesFileSearchToolComparisonFilter = {
97
137
  */
98
138
  key: string;
99
139
  /**
100
- * Specifies the comparison operator: eq, ne, gt, gte, lt, lte.
140
+ * Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
101
141
  */
102
- type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
142
+ type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin';
103
143
  /**
104
- * The value to compare against the attribute key; supports string, number, or boolean types.
144
+ * The value to compare against the attribute key; supports string, number, boolean, or array of string types.
105
145
  */
106
- value: string | number | boolean;
146
+ value: string | number | boolean | string[];
107
147
  };
108
148
  /**
109
149
  * Combine multiple filters using and or or.
@@ -119,15 +159,58 @@ type OpenAIResponsesFileSearchToolCompoundFilter = {
119
159
  filters: Array<OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter>;
120
160
  };
121
161
 
162
+ /**
163
+ * Type definitions for the apply_patch operations.
164
+ */
165
+ type ApplyPatchOperation = {
166
+ type: 'create_file';
167
+ /**
168
+ * Path of the file to create relative to the workspace root.
169
+ */
170
+ path: string;
171
+ /**
172
+ * Unified diff content to apply when creating the file.
173
+ */
174
+ diff: string;
175
+ } | {
176
+ type: 'delete_file';
177
+ /**
178
+ * Path of the file to delete relative to the workspace root.
179
+ */
180
+ path: string;
181
+ } | {
182
+ type: 'update_file';
183
+ /**
184
+ * Path of the file to update relative to the workspace root.
185
+ */
186
+ path: string;
187
+ /**
188
+ * Unified diff content to apply to the existing file.
189
+ */
190
+ diff: string;
191
+ };
192
+
122
193
  declare const openaiTools: {
194
+ /**
195
+ * The apply_patch tool lets GPT-5.1 create, update, and delete files in your
196
+ * codebase using structured diffs. Instead of just suggesting edits, the model
197
+ * emits patch operations that your application applies and then reports back on,
198
+ * enabling iterative, multi-step code editing workflows.
199
+ *
200
+ */
201
+ applyPatch: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
202
+ callId: string;
203
+ operation: ApplyPatchOperation;
204
+ }, {
205
+ status: "completed" | "failed";
206
+ output?: string;
207
+ }, {}>;
123
208
  /**
124
209
  * The Code Interpreter tool allows models to write and run Python code in a
125
210
  * sandboxed environment to solve complex problems in domains like data analysis,
126
211
  * coding, and math.
127
212
  *
128
213
  * @param container - The container to use for the code interpreter.
129
- *
130
- * Must have name `code_interpreter`.
131
214
  */
132
215
  codeInterpreter: (args?: {
133
216
  container?: string | {
@@ -150,14 +233,12 @@ declare const openaiTools: {
150
233
  * retrieve information in a knowledge base of previously uploaded files through
151
234
  * semantic and keyword search.
152
235
  *
153
- * Must have name `file_search`.
154
- *
155
236
  * @param vectorStoreIds - The vector store IDs to use for the file search.
156
237
  * @param maxNumResults - The maximum number of results to return.
157
238
  * @param ranking - The ranking options to use for the file search.
158
239
  * @param filters - The filters to use for the file search.
159
240
  */
160
- fileSearch: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{}, {
241
+ fileSearch: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
161
242
  queries: string[];
162
243
  results: null | {
163
244
  attributes: Record<string, unknown>;
@@ -180,13 +261,16 @@ declare const openaiTools: {
180
261
  * and optionally image inputs. It leverages the GPT Image model,
181
262
  * and automatically optimizes text inputs for improved performance.
182
263
  *
183
- * Must have name `image_generation`.
184
- *
185
- * @param size - Image dimensions (e.g., 1024x1024, 1024x1536)
186
- * @param quality - Rendering quality (e.g. low, medium, high)
187
- * @param format - File output format
188
- * @param compression - Compression level (0-100%) for JPEG and WebP formats
189
- * @param background - Transparent or opaque
264
+ * @param background - Background type for the generated image. One of 'auto', 'opaque', or 'transparent'.
265
+ * @param inputFidelity - Input fidelity for the generated image. One of 'low' or 'high'.
266
+ * @param inputImageMask - Optional mask for inpainting. Contains fileId and/or imageUrl.
267
+ * @param model - The image generation model to use. Default: gpt-image-1.
268
+ * @param moderation - Moderation level for the generated image. Default: 'auto'.
269
+ * @param outputCompression - Compression level for the output image (0-100).
270
+ * @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
271
+ * @param partialImages - Number of partial images to generate in streaming mode (0-3).
272
+ * @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or 'high'.
273
+ * @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
190
274
  */
191
275
  imageGeneration: (args?: {
192
276
  background?: "auto" | "opaque" | "transparent";
@@ -199,6 +283,7 @@ declare const openaiTools: {
199
283
  moderation?: "auto";
200
284
  outputCompression?: number;
201
285
  outputFormat?: "png" | "jpeg" | "webp";
286
+ partialImages?: number;
202
287
  quality?: "auto" | "low" | "medium" | "high";
203
288
  size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
204
289
  }) => _ai_sdk_provider_utils.Tool<{}, {
@@ -209,10 +294,8 @@ declare const openaiTools: {
209
294
  * on a machine you or the user provides.
210
295
  *
211
296
  * Supported models: `gpt-5-codex` and `codex-mini-latest`
212
- *
213
- * Must have name `local_shell`.
214
297
  */
215
- localShell: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
298
+ localShell: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
216
299
  action: {
217
300
  type: "exec";
218
301
  command: string[];
@@ -224,18 +307,55 @@ declare const openaiTools: {
224
307
  }, {
225
308
  output: string;
226
309
  }, {}>;
310
+ /**
311
+ * The shell tool allows the model to interact with your local computer through
312
+ * a controlled command-line interface. The model proposes shell commands; your
313
+ * integration executes them and returns the outputs.
314
+ *
315
+ * Available through the Responses API for use with GPT-5.1.
316
+ *
317
+ * WARNING: Running arbitrary shell commands can be dangerous. Always sandbox
318
+ * execution or add strict allow-/deny-lists before forwarding a command to
319
+ * the system shell.
320
+ */
321
+ shell: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
322
+ action: {
323
+ commands: string[];
324
+ timeoutMs?: number;
325
+ maxOutputLength?: number;
326
+ };
327
+ }, {
328
+ output: Array<{
329
+ stdout: string;
330
+ stderr: string;
331
+ outcome: {
332
+ type: "timeout";
333
+ } | {
334
+ type: "exit";
335
+ exitCode: number;
336
+ };
337
+ }>;
338
+ }, {}>;
227
339
  /**
228
340
  * Web search allows models to access up-to-date information from the internet
229
341
  * and provide answers with sourced citations.
230
342
  *
231
- * Must have name `web_search_preview`.
232
- *
233
343
  * @param searchContextSize - The search context size to use for the web search.
234
344
  * @param userLocation - The user location to use for the web search.
235
- *
236
- * @deprecated Use `webSearch` instead.
237
345
  */
238
- webSearchPreview: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{}, {
346
+ webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
347
+ action: {
348
+ type: "search";
349
+ query?: string;
350
+ } | {
351
+ type: "openPage";
352
+ url?: string | null;
353
+ } | {
354
+ type: "findInPage";
355
+ url?: string | null;
356
+ pattern?: string | null;
357
+ };
358
+ }, {
239
359
  searchContextSize?: "low" | "medium" | "high";
240
360
  userLocation?: {
241
361
  type: "approximate";
@@ -249,16 +369,103 @@ declare const openaiTools: {
249
369
  * Web search allows models to access up-to-date information from the internet
250
370
  * and provide answers with sourced citations.
251
371
  *
252
- * Must have name `web_search`.
253
- *
254
372
  * @param filters - The filters to use for the web search.
255
373
  * @param searchContextSize - The search context size to use for the web search.
256
374
  * @param userLocation - The user location to use for the web search.
257
375
  */
258
- webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, unknown>;
376
+ webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, {
377
+ action: {
378
+ type: "search";
379
+ query?: string;
380
+ } | {
381
+ type: "openPage";
382
+ url?: string | null;
383
+ } | {
384
+ type: "findInPage";
385
+ url?: string | null;
386
+ pattern?: string | null;
387
+ };
388
+ sources?: Array<{
389
+ type: "url";
390
+ url: string;
391
+ } | {
392
+ type: "api";
393
+ name: string;
394
+ }>;
395
+ }>;
396
+ /**
397
+ * MCP (Model Context Protocol) allows models to call tools exposed by
398
+ * remote MCP servers or service connectors.
399
+ *
400
+ * @param serverLabel - Label to identify the MCP server.
401
+ * @param allowedTools - Allowed tool names or filter object.
402
+ * @param authorization - OAuth access token for the MCP server/connector.
403
+ * @param connectorId - Identifier for a service connector.
404
+ * @param headers - Optional headers to include in MCP requests.
405
+ * // param requireApproval - Approval policy ('always'|'never'|filter object). (Removed - always 'never')
406
+ * @param serverDescription - Optional description of the server.
407
+ * @param serverUrl - URL for the MCP server.
408
+ */
409
+ mcp: (args: {
410
+ serverLabel: string;
411
+ allowedTools?: string[] | {
412
+ readOnly?: boolean;
413
+ toolNames?: string[];
414
+ };
415
+ authorization?: string;
416
+ connectorId?: string;
417
+ headers?: Record<string, string>;
418
+ serverDescription?: string;
419
+ serverUrl?: string;
420
+ }) => _ai_sdk_provider_utils.Tool<{}, {
421
+ type: "call";
422
+ serverLabel: string;
423
+ name: string;
424
+ arguments: string;
425
+ output?: string | null;
426
+ error?: _ai_sdk_provider.JSONValue;
427
+ } | {
428
+ type: "listTools";
429
+ serverLabel: string;
430
+ tools: Array<{
431
+ name: string;
432
+ description?: string;
433
+ inputSchema: unknown;
434
+ annotations?: unknown;
435
+ }>;
436
+ error?: _ai_sdk_provider.JSONValue;
437
+ } | {
438
+ type: "approvalRequest";
439
+ serverLabel: string;
440
+ name: string;
441
+ arguments: string;
442
+ approvalRequestId: string;
443
+ }>;
259
444
  };
260
445
 
261
- type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
446
+ type OpenAIResponsesModelId = 'chatgpt-4o-latest' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo' | 'gpt-4-0613' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1' | 'gpt-4' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-5.1' | 'gpt-5.1-chat-latest' | 'gpt-5.1-codex-mini' | 'gpt-5.1-codex' | 'gpt-5.1-codex-max' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5-codex' | 'gpt-5-mini-2025-08-07' | 'gpt-5-mini' | 'gpt-5-nano-2025-08-07' | 'gpt-5-nano' | 'gpt-5-pro-2025-10-06' | 'gpt-5-pro' | 'gpt-5' | 'o1-2024-12-17' | 'o1' | 'o3-2025-04-16' | 'o3-mini-2025-01-31' | 'o3-mini' | 'o3' | (string & {});
447
+ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
448
+ conversation?: string | null | undefined;
449
+ include?: ("file_search_call.results" | "message.output_text.logprobs" | "reasoning.encrypted_content")[] | null | undefined;
450
+ instructions?: string | null | undefined;
451
+ logprobs?: number | boolean | undefined;
452
+ maxToolCalls?: number | null | undefined;
453
+ metadata?: any;
454
+ parallelToolCalls?: boolean | null | undefined;
455
+ previousResponseId?: string | null | undefined;
456
+ promptCacheKey?: string | null | undefined;
457
+ promptCacheRetention?: "in_memory" | "24h" | null | undefined;
458
+ reasoningEffort?: string | null | undefined;
459
+ reasoningSummary?: string | null | undefined;
460
+ safetyIdentifier?: string | null | undefined;
461
+ serviceTier?: "default" | "auto" | "flex" | "priority" | null | undefined;
462
+ store?: boolean | null | undefined;
463
+ strictJsonSchema?: boolean | null | undefined;
464
+ textVerbosity?: "low" | "medium" | "high" | null | undefined;
465
+ truncation?: "auto" | "disabled" | null | undefined;
466
+ user?: string | null | undefined;
467
+ }>;
468
+ type OpenAIResponsesProviderOptions = InferSchema<typeof openaiResponsesProviderOptionsSchema>;
262
469
 
263
470
  type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
264
471
 
@@ -285,15 +492,11 @@ interface OpenAIProvider extends ProviderV3 {
285
492
  /**
286
493
  Creates a model for text embeddings.
287
494
  */
288
- embedding(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3<string>;
495
+ embedding(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
289
496
  /**
290
497
  Creates a model for text embeddings.
291
498
  */
292
- textEmbedding(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3<string>;
293
- /**
294
- Creates a model for text embeddings.
295
- */
296
- textEmbeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3<string>;
499
+ embeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
297
500
  /**
298
501
  Creates a model for image generation.
299
502
  */
@@ -305,11 +508,11 @@ interface OpenAIProvider extends ProviderV3 {
305
508
  /**
306
509
  Creates a model for transcription.
307
510
  */
308
- transcription(modelId: OpenAITranscriptionModelId): TranscriptionModelV2;
511
+ transcription(modelId: OpenAITranscriptionModelId): TranscriptionModelV3;
309
512
  /**
310
513
  Creates a model for speech generation.
311
514
  */
312
- speech(modelId: OpenAISpeechModelId): SpeechModelV2;
515
+ speech(modelId: OpenAISpeechModelId): SpeechModelV3;
313
516
  /**
314
517
  OpenAI-specific tools.
315
518
  */
@@ -355,38 +558,6 @@ Default OpenAI provider instance.
355
558
  */
356
559
  declare const openai: OpenAIProvider;
357
560
 
358
- declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
359
- include: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
360
- "file_search_call.results": "file_search_call.results";
361
- "message.output_text.logprobs": "message.output_text.logprobs";
362
- "reasoning.encrypted_content": "reasoning.encrypted_content";
363
- }>>>>;
364
- instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
- logprobs: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>>;
366
- maxToolCalls: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
367
- metadata: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
368
- parallelToolCalls: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
369
- previousResponseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
- promptCacheKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
- reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
- reasoningSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
- safetyIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
- serviceTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
375
- auto: "auto";
376
- flex: "flex";
377
- priority: "priority";
378
- }>>>;
379
- store: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
380
- strictJsonSchema: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
381
- textVerbosity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
382
- low: "low";
383
- medium: "medium";
384
- high: "high";
385
- }>>>;
386
- user: z.ZodOptional<z.ZodNullable<z.ZodString>>;
387
- }, z.core.$strip>;
388
- type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
389
-
390
561
  declare const VERSION: string;
391
562
 
392
563
  export { type OpenAIChatLanguageModelOptions, type OpenAIProvider, type OpenAIProviderSettings, type OpenAIResponsesProviderOptions, VERSION, createOpenAI, openai };