@ai-sdk/openai 3.0.0-beta.99 → 3.0.0
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/CHANGELOG.md +292 -0
- package/dist/index.d.mts +18 -17
- package/dist/index.d.ts +18 -17
- package/dist/index.js +342 -200
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +350 -204
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +12 -10
- package/dist/internal/index.d.ts +12 -10
- package/dist/internal/index.js +339 -199
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +347 -203
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,297 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- dee8b05: ai SDK 6 beta
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 78928cb: release: start 5.1 beta
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 0c3b58b: fix(provider): add specificationVersion to ProviderV3
|
|
16
|
+
- 4920119: fix the "incomplete_details" key from nullable to nullish for openai compatibility
|
|
17
|
+
- 0adc679: feat(provider): shared spec v3
|
|
18
|
+
- 92c6241: feat(openai): additional settings for file search tool
|
|
19
|
+
- 88fc415: feat(openai): add the new provider 'apply_patch' tool
|
|
20
|
+
- 817e601: fix(openai); fix url_citation schema in chat api
|
|
21
|
+
- dae2185: fix(openai): extract meta data from first chunk that contains any
|
|
22
|
+
- 046aa3b: feat(provider): speech model v3 spec
|
|
23
|
+
- f1277fe: feat(provider/openai): send assistant text and tool call parts as reference ids when store: true
|
|
24
|
+
- 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
|
|
25
|
+
|
|
26
|
+
Before
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
model.textEmbeddingModel('my-model-id');
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
model.embeddingModel('my-model-id');
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- 60f4775: fix: remove code for unsuported o1-mini and o1-preview models
|
|
39
|
+
- 9a51b92: support OPENAI_BASE_URL env
|
|
40
|
+
- d64ece9: enables image_generation capabilities in the Azure provider through the Responses API.
|
|
41
|
+
- 2625a04: feat(openai); update spec for mcp approval
|
|
42
|
+
- 2e86082: feat(provider/openai): `OpenAIChatLanguageModelOptions` type
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { openai, type OpenAIChatLanguageModelOptions } from '@ai-sdk/openai';
|
|
46
|
+
import { generateText } from 'ai';
|
|
47
|
+
|
|
48
|
+
await generateText({
|
|
49
|
+
model: openai.chat('gpt-4o'),
|
|
50
|
+
prompt: 'Invent a new holiday and describe its traditions.',
|
|
51
|
+
providerOptions: {
|
|
52
|
+
openai: {
|
|
53
|
+
user: 'user-123',
|
|
54
|
+
} satisfies OpenAIChatLanguageModelOptions,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- 0877683: feat(provider/openai): support conversations api
|
|
60
|
+
- d0f1baf: feat(openai): Add support for 'promptCacheRetention: 24h' for gpt5.1 series
|
|
61
|
+
- 831b6cc: feat(openai): adding provider mcp tool for openai
|
|
62
|
+
- 95f65c2: chore: use import \* from zod/v4
|
|
63
|
+
- edc5548: feat(provider/openai): automatically add reasoning.encrypted_content include when store = false
|
|
64
|
+
- 954c356: feat(openai): allow custom names for provider-defined tools
|
|
65
|
+
- 544d4e8: chore(specification): rename v3 provider defined tool to provider tool
|
|
66
|
+
- 77f2b20: enables code_interpreter and file_search capabilities in the Azure provider through the Responses API
|
|
67
|
+
- 0c4822d: feat: `EmbeddingModelV3`
|
|
68
|
+
- 73d9883: chore(openai): enable strict json by default
|
|
69
|
+
- d2039d7: feat(provider/openai): add GPT 5.1 Codex Max to OpenAI Responses model IDs list
|
|
70
|
+
- 88edc28: feat (provider/openai): include more image generation response metadata
|
|
71
|
+
- e8109d3: feat: tool execution approval
|
|
72
|
+
- ed329cb: feat: `Provider-V3`
|
|
73
|
+
- 3bd2689: feat: extended token usage
|
|
74
|
+
- 1cad0ab: feat: add provider version to user-agent header
|
|
75
|
+
- e85fa2f: feat(openai): add sources in web-search actions
|
|
76
|
+
- 423ba08: Set the annotations from the Responses API to doStream
|
|
77
|
+
- 401f561: fix(provider/openai): fix web search tool input types
|
|
78
|
+
- 4122d2a: feat(provider/openai): add gpt-5-codex model id
|
|
79
|
+
- 0153bfa: fix(openai): fix parameter exclusion logic
|
|
80
|
+
- 8dac895: feat: `LanguageModelV3`
|
|
81
|
+
- 304222e: Add streaming support for apply_patch partial diffs.
|
|
82
|
+
- 23f132b: fix: error schema for Responses API
|
|
83
|
+
- 1d0de66: refactoring(provider/openai): simplify code
|
|
84
|
+
- 000e87b: fix(provider/openai): add providerExecuted flag to tool start chunks
|
|
85
|
+
- 2c0a758: chore(openai): add JSDoc to responses options
|
|
86
|
+
- 1b982e6: feat(openai): preserve file_id when converting file citations
|
|
87
|
+
- b82987c: feat(openai): support openai code-interpreter annotations
|
|
88
|
+
- 457318b: chore(provider,ai): switch to SharedV3Warning and unified warnings
|
|
89
|
+
- b681d7d: feat: expose usage tokens for 'generateImage' function
|
|
90
|
+
- 79b4e46: feat(openai): add 'gpt-5.1' modelID
|
|
91
|
+
- 3997a42: feat(provider/openai): local shell tool
|
|
92
|
+
- 348fd10: fix(openai): treat unknown models as reasoning
|
|
93
|
+
- 9061dc0: feat: image editing
|
|
94
|
+
- fe49278: feat(provider/openai): only send item references for reasoning when store: true
|
|
95
|
+
- cb4d238: The built in Code Interpreter tool input code is streamed in `tool-input-<start/delta/end>` chunks.
|
|
96
|
+
- 357cfd7: feat(provider/openai): add new model IDs `gpt-image-1-mini`, `gpt-5-pro`, `gpt-5-pro-2025-10-06`
|
|
97
|
+
- 38a4035: added support for external_web_access parameter on web_search tool
|
|
98
|
+
- 40d5419: feat(openai): add `o3-deep-research` and `o4-mini-deep-research` models
|
|
99
|
+
- 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
|
|
100
|
+
- 2b0caef: feat(provider/openai): preview image generation results
|
|
101
|
+
- b60d2e2: fix(openai): allow open_page action type url to be nullish
|
|
102
|
+
- fd47df5: fix(openai): revised_prompt sometimes returns null, causing errors
|
|
103
|
+
- 4616b86: chore: update zod peer depenedency version
|
|
104
|
+
- 7756857: fix(provider/openai): add truncation parameter support for Responses API
|
|
105
|
+
- cad6445: feat(openai); adding OpenAI's new shell tool
|
|
106
|
+
- 64aa48f: Azure OpenAI enabled web-search-preview
|
|
107
|
+
- 0b9fdd5: fix(provider/openai): end reasoning parts earlier
|
|
108
|
+
- 61c52dc: feat (provider/openai): add gpt-image-1.5 model support
|
|
109
|
+
- ef739fa: fix(openai): refactor apply-patch tool
|
|
110
|
+
- 3220329: fix openai responses input: process all provider tool outputs (shell/apply_patch) so parallel tool results aren’t dropped and apply_patch outputs are forwarded.
|
|
111
|
+
- d270a5d: chore(openai): update tests for apply-patch tool to use snapshots
|
|
112
|
+
- f18ef7f: feat(openai): add gpt-5.2 models
|
|
113
|
+
- 21e20c0: feat(provider): transcription model v3 spec
|
|
114
|
+
- 522f6b8: feat: `ImageModelV3`
|
|
115
|
+
- 484aa93: Add 'default' as service tier
|
|
116
|
+
- 88574c1: Change `isReasoningModel` detection from blocklist to allowlist and add override option
|
|
117
|
+
- 68c6187: feat(provider/openai): support file and image tool results
|
|
118
|
+
- 3794514: feat: flexible tool output content support
|
|
119
|
+
- cbf52cd: feat: expose raw finish reason
|
|
120
|
+
- 10c1322: fix: moved dependency `@ai-sdk/test-server` to devDependencies
|
|
121
|
+
- 5648ec0: Add GPT-5.2 support for non-reasoning parameters (temperature, topP, logProbs) when reasoningEffort is none.
|
|
122
|
+
- 78f813e: fix(openai): allow temperature etc setting when reasoning effort is none for gpt-5.1
|
|
123
|
+
- 40dc7fa: fix(openai): change find action type to find_in_page action type
|
|
124
|
+
- 0273b74: fix(openai): add support for sources type 'api'
|
|
125
|
+
- 5bf101a: feat(provider/openai): add support for OpenAI xhigh reasoning effort
|
|
126
|
+
- 1bd7d32: feat: tool-specific strict mode
|
|
127
|
+
- d86b52f: distinguish between OpenAI and Azure in Responses API providerMetadata
|
|
128
|
+
- 95f65c2: chore: load zod schemas lazily
|
|
129
|
+
- 59561f8: fix(openai); fix url_citation schema in chat api
|
|
130
|
+
- Updated dependencies [0c3b58b]
|
|
131
|
+
- Updated dependencies [0adc679]
|
|
132
|
+
- Updated dependencies [50b70d6]
|
|
133
|
+
- Updated dependencies [d1bdadb]
|
|
134
|
+
- Updated dependencies [dee8b05]
|
|
135
|
+
- Updated dependencies [046aa3b]
|
|
136
|
+
- Updated dependencies [8d9e8ad]
|
|
137
|
+
- Updated dependencies [78928cb]
|
|
138
|
+
- Updated dependencies [dce03c4]
|
|
139
|
+
- Updated dependencies [2625a04]
|
|
140
|
+
- Updated dependencies [37c58a0]
|
|
141
|
+
- Updated dependencies [3b1d015]
|
|
142
|
+
- Updated dependencies [2b0caef]
|
|
143
|
+
- Updated dependencies [95f65c2]
|
|
144
|
+
- Updated dependencies [016b111]
|
|
145
|
+
- Updated dependencies [58920e0]
|
|
146
|
+
- Updated dependencies [954c356]
|
|
147
|
+
- Updated dependencies [544d4e8]
|
|
148
|
+
- Updated dependencies [0c4822d]
|
|
149
|
+
- Updated dependencies [521c537]
|
|
150
|
+
- Updated dependencies [4c44a5b]
|
|
151
|
+
- Updated dependencies [e8109d3]
|
|
152
|
+
- Updated dependencies [03849b0]
|
|
153
|
+
- Updated dependencies [ed329cb]
|
|
154
|
+
- Updated dependencies [e06565c]
|
|
155
|
+
- Updated dependencies [32d8dbb]
|
|
156
|
+
- Updated dependencies [53f3368]
|
|
157
|
+
- Updated dependencies [d116b4b]
|
|
158
|
+
- Updated dependencies [3bd2689]
|
|
159
|
+
- Updated dependencies [293a6b7]
|
|
160
|
+
- Updated dependencies [703459a]
|
|
161
|
+
- Updated dependencies [bb36798]
|
|
162
|
+
- Updated dependencies [83e5744]
|
|
163
|
+
- Updated dependencies [7e32fea]
|
|
164
|
+
- Updated dependencies [3ed5519]
|
|
165
|
+
- Updated dependencies [8dac895]
|
|
166
|
+
- Updated dependencies [a755db5]
|
|
167
|
+
- Updated dependencies [cbb1d35]
|
|
168
|
+
- Updated dependencies [475189e]
|
|
169
|
+
- Updated dependencies [457318b]
|
|
170
|
+
- Updated dependencies [b681d7d]
|
|
171
|
+
- Updated dependencies [db913bd]
|
|
172
|
+
- Updated dependencies [9061dc0]
|
|
173
|
+
- Updated dependencies [32223c8]
|
|
174
|
+
- Updated dependencies [c1efac4]
|
|
175
|
+
- Updated dependencies [366f50b]
|
|
176
|
+
- Updated dependencies [4616b86]
|
|
177
|
+
- Updated dependencies [81d4308]
|
|
178
|
+
- Updated dependencies [9549c9e]
|
|
179
|
+
- Updated dependencies [af3780b]
|
|
180
|
+
- Updated dependencies [4f16c37]
|
|
181
|
+
- Updated dependencies [81e29ab]
|
|
182
|
+
- Updated dependencies [522f6b8]
|
|
183
|
+
- Updated dependencies [6306603]
|
|
184
|
+
- Updated dependencies [fca786b]
|
|
185
|
+
- Updated dependencies [763d04a]
|
|
186
|
+
- Updated dependencies [10d819b]
|
|
187
|
+
- Updated dependencies [3794514]
|
|
188
|
+
- Updated dependencies [cbf52cd]
|
|
189
|
+
- Updated dependencies [e9e157f]
|
|
190
|
+
- Updated dependencies [960ec8f]
|
|
191
|
+
- Updated dependencies [1bd7d32]
|
|
192
|
+
- Updated dependencies [f0b2157]
|
|
193
|
+
- Updated dependencies [95f65c2]
|
|
194
|
+
- @ai-sdk/provider@3.0.0
|
|
195
|
+
- @ai-sdk/provider-utils@4.0.0
|
|
196
|
+
|
|
197
|
+
## 3.0.0-beta.112
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [475189e]
|
|
202
|
+
- @ai-sdk/provider@3.0.0-beta.32
|
|
203
|
+
- @ai-sdk/provider-utils@4.0.0-beta.59
|
|
204
|
+
|
|
205
|
+
## 3.0.0-beta.111
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- 304222e: Add streaming support for apply_patch partial diffs.
|
|
210
|
+
|
|
211
|
+
## 3.0.0-beta.110
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- 2625a04: feat(openai); update spec for mcp approval
|
|
216
|
+
- Updated dependencies [2625a04]
|
|
217
|
+
- @ai-sdk/provider@3.0.0-beta.31
|
|
218
|
+
- @ai-sdk/provider-utils@4.0.0-beta.58
|
|
219
|
+
|
|
220
|
+
## 3.0.0-beta.109
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- cbf52cd: feat: expose raw finish reason
|
|
225
|
+
- Updated dependencies [cbf52cd]
|
|
226
|
+
- @ai-sdk/provider@3.0.0-beta.30
|
|
227
|
+
- @ai-sdk/provider-utils@4.0.0-beta.57
|
|
228
|
+
|
|
229
|
+
## 3.0.0-beta.108
|
|
230
|
+
|
|
231
|
+
### Patch Changes
|
|
232
|
+
|
|
233
|
+
- Updated dependencies [9549c9e]
|
|
234
|
+
- @ai-sdk/provider@3.0.0-beta.29
|
|
235
|
+
- @ai-sdk/provider-utils@4.0.0-beta.56
|
|
236
|
+
|
|
237
|
+
## 3.0.0-beta.107
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [50b70d6]
|
|
242
|
+
- @ai-sdk/provider-utils@4.0.0-beta.55
|
|
243
|
+
|
|
244
|
+
## 3.0.0-beta.106
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- 9061dc0: feat: image editing
|
|
249
|
+
- Updated dependencies [9061dc0]
|
|
250
|
+
- @ai-sdk/provider-utils@4.0.0-beta.54
|
|
251
|
+
- @ai-sdk/provider@3.0.0-beta.28
|
|
252
|
+
|
|
253
|
+
## 3.0.0-beta.105
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- 88574c1: Change `isReasoningModel` detection from blocklist to allowlist and add override option
|
|
258
|
+
|
|
259
|
+
## 3.0.0-beta.104
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- 61c52dc: feat (provider/openai): add gpt-image-1.5 model support
|
|
264
|
+
|
|
265
|
+
## 3.0.0-beta.103
|
|
266
|
+
|
|
267
|
+
### Patch Changes
|
|
268
|
+
|
|
269
|
+
- 366f50b: chore(provider): add deprecated textEmbeddingModel and textEmbedding aliases
|
|
270
|
+
- Updated dependencies [366f50b]
|
|
271
|
+
- @ai-sdk/provider@3.0.0-beta.27
|
|
272
|
+
- @ai-sdk/provider-utils@4.0.0-beta.53
|
|
273
|
+
|
|
274
|
+
## 3.0.0-beta.102
|
|
275
|
+
|
|
276
|
+
### Patch Changes
|
|
277
|
+
|
|
278
|
+
- Updated dependencies [763d04a]
|
|
279
|
+
- @ai-sdk/provider-utils@4.0.0-beta.52
|
|
280
|
+
|
|
281
|
+
## 3.0.0-beta.101
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- 3220329: fix openai responses input: process all provider tool outputs (shell/apply_patch) so parallel tool results aren’t dropped and apply_patch outputs are forwarded.
|
|
286
|
+
- 5648ec0: Add GPT-5.2 support for non-reasoning parameters (temperature, topP, logProbs) when reasoningEffort is none.
|
|
287
|
+
|
|
288
|
+
## 3.0.0-beta.100
|
|
289
|
+
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- Updated dependencies [c1efac4]
|
|
293
|
+
- @ai-sdk/provider-utils@4.0.0-beta.51
|
|
294
|
+
|
|
3
295
|
## 3.0.0-beta.99
|
|
4
296
|
|
|
5
297
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -20,6 +20,8 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
20
20
|
promptCacheKey?: string | undefined;
|
|
21
21
|
promptCacheRetention?: "in_memory" | "24h" | undefined;
|
|
22
22
|
safetyIdentifier?: string | undefined;
|
|
23
|
+
systemMessageMode?: "remove" | "system" | "developer" | undefined;
|
|
24
|
+
forceReasoning?: boolean | undefined;
|
|
23
25
|
}>;
|
|
24
26
|
type OpenAIChatLanguageModelOptions = InferSchema<typeof openaiChatLanguageModelOptions>;
|
|
25
27
|
|
|
@@ -27,7 +29,7 @@ type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
|
|
|
27
29
|
|
|
28
30
|
type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
29
31
|
|
|
30
|
-
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | (string & {});
|
|
32
|
+
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | (string & {});
|
|
31
33
|
|
|
32
34
|
declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
33
35
|
/**
|
|
@@ -415,6 +417,11 @@ declare const openaiTools: {
|
|
|
415
417
|
authorization?: string;
|
|
416
418
|
connectorId?: string;
|
|
417
419
|
headers?: Record<string, string>;
|
|
420
|
+
requireApproval?: "always" | "never" | {
|
|
421
|
+
never?: {
|
|
422
|
+
toolNames?: string[];
|
|
423
|
+
};
|
|
424
|
+
};
|
|
418
425
|
serverDescription?: string;
|
|
419
426
|
serverUrl?: string;
|
|
420
427
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
@@ -424,22 +431,6 @@ declare const openaiTools: {
|
|
|
424
431
|
arguments: string;
|
|
425
432
|
output?: string | null;
|
|
426
433
|
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
434
|
}>;
|
|
444
435
|
};
|
|
445
436
|
|
|
@@ -464,6 +455,8 @@ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyS
|
|
|
464
455
|
textVerbosity?: "low" | "medium" | "high" | null | undefined;
|
|
465
456
|
truncation?: "auto" | "disabled" | null | undefined;
|
|
466
457
|
user?: string | null | undefined;
|
|
458
|
+
systemMessageMode?: "remove" | "system" | "developer" | undefined;
|
|
459
|
+
forceReasoning?: boolean | undefined;
|
|
467
460
|
}>;
|
|
468
461
|
type OpenAIResponsesProviderOptions = InferSchema<typeof openaiResponsesProviderOptionsSchema>;
|
|
469
462
|
|
|
@@ -498,6 +491,14 @@ interface OpenAIProvider extends ProviderV3 {
|
|
|
498
491
|
*/
|
|
499
492
|
embeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
500
493
|
/**
|
|
494
|
+
* @deprecated Use `embedding` instead.
|
|
495
|
+
*/
|
|
496
|
+
textEmbedding(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
497
|
+
/**
|
|
498
|
+
* @deprecated Use `embeddingModel` instead.
|
|
499
|
+
*/
|
|
500
|
+
textEmbeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
501
|
+
/**
|
|
501
502
|
Creates a model for image generation.
|
|
502
503
|
*/
|
|
503
504
|
image(modelId: OpenAIImageModelId): ImageModelV3;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
20
20
|
promptCacheKey?: string | undefined;
|
|
21
21
|
promptCacheRetention?: "in_memory" | "24h" | undefined;
|
|
22
22
|
safetyIdentifier?: string | undefined;
|
|
23
|
+
systemMessageMode?: "remove" | "system" | "developer" | undefined;
|
|
24
|
+
forceReasoning?: boolean | undefined;
|
|
23
25
|
}>;
|
|
24
26
|
type OpenAIChatLanguageModelOptions = InferSchema<typeof openaiChatLanguageModelOptions>;
|
|
25
27
|
|
|
@@ -27,7 +29,7 @@ type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | (string & {});
|
|
|
27
29
|
|
|
28
30
|
type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
29
31
|
|
|
30
|
-
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | (string & {});
|
|
32
|
+
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | (string & {});
|
|
31
33
|
|
|
32
34
|
declare const webSearchToolFactory: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
33
35
|
/**
|
|
@@ -415,6 +417,11 @@ declare const openaiTools: {
|
|
|
415
417
|
authorization?: string;
|
|
416
418
|
connectorId?: string;
|
|
417
419
|
headers?: Record<string, string>;
|
|
420
|
+
requireApproval?: "always" | "never" | {
|
|
421
|
+
never?: {
|
|
422
|
+
toolNames?: string[];
|
|
423
|
+
};
|
|
424
|
+
};
|
|
418
425
|
serverDescription?: string;
|
|
419
426
|
serverUrl?: string;
|
|
420
427
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
@@ -424,22 +431,6 @@ declare const openaiTools: {
|
|
|
424
431
|
arguments: string;
|
|
425
432
|
output?: string | null;
|
|
426
433
|
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
434
|
}>;
|
|
444
435
|
};
|
|
445
436
|
|
|
@@ -464,6 +455,8 @@ declare const openaiResponsesProviderOptionsSchema: _ai_sdk_provider_utils.LazyS
|
|
|
464
455
|
textVerbosity?: "low" | "medium" | "high" | null | undefined;
|
|
465
456
|
truncation?: "auto" | "disabled" | null | undefined;
|
|
466
457
|
user?: string | null | undefined;
|
|
458
|
+
systemMessageMode?: "remove" | "system" | "developer" | undefined;
|
|
459
|
+
forceReasoning?: boolean | undefined;
|
|
467
460
|
}>;
|
|
468
461
|
type OpenAIResponsesProviderOptions = InferSchema<typeof openaiResponsesProviderOptionsSchema>;
|
|
469
462
|
|
|
@@ -498,6 +491,14 @@ interface OpenAIProvider extends ProviderV3 {
|
|
|
498
491
|
*/
|
|
499
492
|
embeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
500
493
|
/**
|
|
494
|
+
* @deprecated Use `embedding` instead.
|
|
495
|
+
*/
|
|
496
|
+
textEmbedding(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
497
|
+
/**
|
|
498
|
+
* @deprecated Use `embeddingModel` instead.
|
|
499
|
+
*/
|
|
500
|
+
textEmbeddingModel(modelId: OpenAIEmbeddingModelId): EmbeddingModelV3;
|
|
501
|
+
/**
|
|
501
502
|
Creates a model for image generation.
|
|
502
503
|
*/
|
|
503
504
|
image(modelId: OpenAIImageModelId): ImageModelV3;
|