@zenning/openai 2.2.0 → 3.0.5

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