@ai-sdk/openai 3.0.31 → 3.0.33

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.31",
3
+ "version": "3.0.33",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -21,17 +21,25 @@ export type OpenAIChatModelId =
21
21
  | 'gpt-4o-2024-05-13'
22
22
  | 'gpt-4o-2024-08-06'
23
23
  | 'gpt-4o-2024-11-20'
24
+ | 'gpt-4o-audio-preview'
25
+ | 'gpt-4o-audio-preview-2024-12-17'
26
+ | 'gpt-4o-audio-preview-2025-06-03'
24
27
  | 'gpt-4o-mini'
25
28
  | 'gpt-4o-mini-2024-07-18'
29
+ | 'gpt-4o-mini-audio-preview'
30
+ | 'gpt-4o-mini-audio-preview-2024-12-17'
31
+ | 'gpt-4o-search-preview'
32
+ | 'gpt-4o-search-preview-2025-03-11'
33
+ | 'gpt-4o-mini-search-preview'
34
+ | 'gpt-4o-mini-search-preview-2025-03-11'
26
35
  | 'gpt-4-turbo'
27
36
  | 'gpt-4-turbo-2024-04-09'
28
37
  | 'gpt-4'
29
38
  | 'gpt-4-0613'
30
- | 'gpt-4.5-preview'
31
- | 'gpt-4.5-preview-2025-02-27'
32
39
  | 'gpt-3.5-turbo-0125'
33
40
  | 'gpt-3.5-turbo'
34
41
  | 'gpt-3.5-turbo-1106'
42
+ | 'gpt-3.5-turbo-16k'
35
43
  | 'chatgpt-4o-latest'
36
44
  | 'gpt-5'
37
45
  | 'gpt-5-2025-08-07'
@@ -41,10 +49,13 @@ export type OpenAIChatModelId =
41
49
  | 'gpt-5-nano-2025-08-07'
42
50
  | 'gpt-5-chat-latest'
43
51
  | 'gpt-5.1'
52
+ | 'gpt-5.1-2025-11-13'
44
53
  | 'gpt-5.1-chat-latest'
45
54
  | 'gpt-5.2'
55
+ | 'gpt-5.2-2025-12-11'
46
56
  | 'gpt-5.2-chat-latest'
47
57
  | 'gpt-5.2-pro'
58
+ | 'gpt-5.2-pro-2025-12-11'
48
59
  | (string & {});
49
60
 
50
61
  export const openaiLanguageModelChatOptions = lazySchema(() =>
@@ -2,7 +2,10 @@ import { InferSchema, lazySchema, zodSchema } from '@ai-sdk/provider-utils';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  // https://platform.openai.com/docs/models
5
- export type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
5
+ export type OpenAICompletionModelId =
6
+ | 'gpt-3.5-turbo-instruct'
7
+ | 'gpt-3.5-turbo-instruct-0914'
8
+ | (string & {});
6
9
 
7
10
  export const openaiLanguageModelCompletionOptions = lazySchema(() =>
8
11
  zodSchema(
@@ -4,6 +4,7 @@ export type OpenAIImageModelId =
4
4
  | 'gpt-image-1'
5
5
  | 'gpt-image-1-mini'
6
6
  | 'gpt-image-1.5'
7
+ | 'chatgpt-image-latest'
7
8
  | (string & {});
8
9
 
9
10
  // https://platform.openai.com/docs/guides/images
@@ -13,6 +14,7 @@ export const modelMaxImagesPerCall: Record<OpenAIImageModelId, number> = {
13
14
  'gpt-image-1': 10,
14
15
  'gpt-image-1-mini': 10,
15
16
  'gpt-image-1.5': 10,
17
+ 'chatgpt-image-latest': 10,
16
18
  };
17
19
 
18
20
  const defaultResponseFormatPrefixes = [
@@ -42,6 +42,8 @@ export const openaiResponsesReasoningModelIds = [
42
42
  'gpt-5.2',
43
43
  'gpt-5.2-chat-latest',
44
44
  'gpt-5.2-pro',
45
+ 'gpt-5.2-codex',
46
+ 'gpt-5.3-codex',
45
47
  ] as const;
46
48
 
47
49
  export const openaiResponsesModelIds = [
@@ -103,13 +105,18 @@ export type OpenAIResponsesModelId =
103
105
  | 'gpt-4o-mini'
104
106
  | 'gpt-4o'
105
107
  | 'gpt-5.1'
108
+ | 'gpt-5.1-2025-11-13'
106
109
  | 'gpt-5.1-chat-latest'
107
110
  | 'gpt-5.1-codex-mini'
108
111
  | 'gpt-5.1-codex'
109
112
  | 'gpt-5.1-codex-max'
110
113
  | 'gpt-5.2'
114
+ | 'gpt-5.2-2025-12-11'
111
115
  | 'gpt-5.2-chat-latest'
112
116
  | 'gpt-5.2-pro'
117
+ | 'gpt-5.2-pro-2025-12-11'
118
+ | 'gpt-5.2-codex'
119
+ | 'gpt-5.3-codex'
113
120
  | 'gpt-5-2025-08-07'
114
121
  | 'gpt-5-chat-latest'
115
122
  | 'gpt-5-codex'
@@ -126,6 +133,8 @@ export type OpenAIResponsesModelId =
126
133
  | 'o3-mini-2025-01-31'
127
134
  | 'o3-mini'
128
135
  | 'o3'
136
+ | 'o4-mini'
137
+ | 'o4-mini-2025-04-16'
129
138
  | (string & {});
130
139
 
131
140
  // TODO AI SDK 6: use optional here instead of nullish
@@ -3,8 +3,12 @@ import { z } from 'zod/v4';
3
3
 
4
4
  export type OpenAISpeechModelId =
5
5
  | 'tts-1'
6
+ | 'tts-1-1106'
6
7
  | 'tts-1-hd'
8
+ | 'tts-1-hd-1106'
7
9
  | 'gpt-4o-mini-tts'
10
+ | 'gpt-4o-mini-tts-2025-03-20'
11
+ | 'gpt-4o-mini-tts-2025-12-15'
8
12
  | (string & {});
9
13
 
10
14
  // https://platform.openai.com/docs/api-reference/audio/createSpeech
@@ -4,7 +4,10 @@ import { z } from 'zod/v4';
4
4
  export type OpenAITranscriptionModelId =
5
5
  | 'whisper-1'
6
6
  | 'gpt-4o-mini-transcribe'
7
+ | 'gpt-4o-mini-transcribe-2025-03-20'
8
+ | 'gpt-4o-mini-transcribe-2025-12-15'
7
9
  | 'gpt-4o-transcribe'
10
+ | 'gpt-4o-transcribe-diarize'
8
11
  | (string & {});
9
12
 
10
13
  // https://platform.openai.com/docs/api-reference/audio/createTranscription