@ai-sdk/openai 2.1.0-beta.7 → 2.1.0-beta.9
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 +14 -0
- package/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +561 -366
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +528 -332
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +560 -377
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +541 -358
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 2.1.0-beta.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9a51b92: support OPENAI_BASE_URL env
|
|
8
|
+
|
|
9
|
+
## 2.1.0-beta.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4122d2a: feat(provider/openai): add gpt-5-codex model id
|
|
14
|
+
- 3997a42: feat(provider/openai): local shell tool
|
|
15
|
+
- cb4d238: The built in Code Interpreter tool input code is streamed in `tool-input-<start/delta/end>` chunks.
|
|
16
|
+
|
|
3
17
|
## 2.1.0-beta.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -204,6 +204,26 @@ declare const openaiTools: {
|
|
|
204
204
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
205
205
|
result: string;
|
|
206
206
|
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Local shell is a tool that allows agents to run shell commands locally
|
|
209
|
+
* on a machine you or the user provides.
|
|
210
|
+
*
|
|
211
|
+
* Supported models: `gpt-5-codex` and `codex-mini-latest`
|
|
212
|
+
*
|
|
213
|
+
* Must have name `local_shell`.
|
|
214
|
+
*/
|
|
215
|
+
localShell: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
216
|
+
action: {
|
|
217
|
+
type: "exec";
|
|
218
|
+
command: string[];
|
|
219
|
+
timeoutMs?: number;
|
|
220
|
+
user?: string;
|
|
221
|
+
workingDirectory?: string;
|
|
222
|
+
env?: Record<string, string>;
|
|
223
|
+
};
|
|
224
|
+
}, {
|
|
225
|
+
output: string;
|
|
226
|
+
}, {}>;
|
|
207
227
|
/**
|
|
208
228
|
* Web search allows models to access up-to-date information from the internet
|
|
209
229
|
* and provide answers with sourced citations.
|
|
@@ -238,7 +258,7 @@ declare const openaiTools: {
|
|
|
238
258
|
webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, unknown>;
|
|
239
259
|
};
|
|
240
260
|
|
|
241
|
-
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-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 & {});
|
|
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 & {});
|
|
242
262
|
|
|
243
263
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|
|
244
264
|
|
package/dist/index.d.ts
CHANGED
|
@@ -204,6 +204,26 @@ declare const openaiTools: {
|
|
|
204
204
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
205
205
|
result: string;
|
|
206
206
|
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Local shell is a tool that allows agents to run shell commands locally
|
|
209
|
+
* on a machine you or the user provides.
|
|
210
|
+
*
|
|
211
|
+
* Supported models: `gpt-5-codex` and `codex-mini-latest`
|
|
212
|
+
*
|
|
213
|
+
* Must have name `local_shell`.
|
|
214
|
+
*/
|
|
215
|
+
localShell: _ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
216
|
+
action: {
|
|
217
|
+
type: "exec";
|
|
218
|
+
command: string[];
|
|
219
|
+
timeoutMs?: number;
|
|
220
|
+
user?: string;
|
|
221
|
+
workingDirectory?: string;
|
|
222
|
+
env?: Record<string, string>;
|
|
223
|
+
};
|
|
224
|
+
}, {
|
|
225
|
+
output: string;
|
|
226
|
+
}, {}>;
|
|
207
227
|
/**
|
|
208
228
|
* Web search allows models to access up-to-date information from the internet
|
|
209
229
|
* and provide answers with sourced citations.
|
|
@@ -238,7 +258,7 @@ declare const openaiTools: {
|
|
|
238
258
|
webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => _ai_sdk_provider_utils.Tool<{}, unknown>;
|
|
239
259
|
};
|
|
240
260
|
|
|
241
|
-
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-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 & {});
|
|
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 & {});
|
|
242
262
|
|
|
243
263
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|
|
244
264
|
|