@ai-sdk/openai 3.0.0-beta.93 → 3.0.0-beta.95
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 +12 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +5 -5
- package/dist/internal/index.d.ts +5 -5
- package/dist/internal/index.js +14 -7
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -7
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3Ca
|
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
|
|
5
|
-
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' | (string & {});
|
|
5
|
+
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 & {});
|
|
6
6
|
declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
7
7
|
logitBias?: Record<number, number> | undefined;
|
|
8
8
|
logprobs?: number | boolean | undefined;
|
|
@@ -186,7 +186,7 @@ declare class OpenAISpeechModel implements SpeechModelV3 {
|
|
|
186
186
|
doGenerate(options: Parameters<SpeechModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV3['doGenerate']>>>;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
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-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 & {});
|
|
189
|
+
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 & {});
|
|
190
190
|
|
|
191
191
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV3 {
|
|
192
192
|
readonly specificationVersion = "v3";
|
|
@@ -619,7 +619,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
|
|
|
619
619
|
declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
620
620
|
/**
|
|
621
621
|
* An object describing the specific action taken in this web search call.
|
|
622
|
-
* Includes details on how the model used the web (search, open_page,
|
|
622
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
623
623
|
*/
|
|
624
624
|
action: {
|
|
625
625
|
/**
|
|
@@ -641,9 +641,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
|
|
|
641
641
|
url?: string | null;
|
|
642
642
|
} | {
|
|
643
643
|
/**
|
|
644
|
-
* Action type "
|
|
644
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
645
645
|
*/
|
|
646
|
-
type: "
|
|
646
|
+
type: "findInPage";
|
|
647
647
|
/**
|
|
648
648
|
* The URL of the page searched for the pattern.
|
|
649
649
|
*/
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LanguageModelV3, EmbeddingModelV3, ImageModelV3, TranscriptionModelV3Ca
|
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
3
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
|
|
5
|
-
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' | (string & {});
|
|
5
|
+
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 & {});
|
|
6
6
|
declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
7
7
|
logitBias?: Record<number, number> | undefined;
|
|
8
8
|
logprobs?: number | boolean | undefined;
|
|
@@ -186,7 +186,7 @@ declare class OpenAISpeechModel implements SpeechModelV3 {
|
|
|
186
186
|
doGenerate(options: Parameters<SpeechModelV3['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV3['doGenerate']>>>;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
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-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 & {});
|
|
189
|
+
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 & {});
|
|
190
190
|
|
|
191
191
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV3 {
|
|
192
192
|
readonly specificationVersion = "v3";
|
|
@@ -619,7 +619,7 @@ declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Rec
|
|
|
619
619
|
declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{}, {
|
|
620
620
|
/**
|
|
621
621
|
* An object describing the specific action taken in this web search call.
|
|
622
|
-
* Includes details on how the model used the web (search, open_page,
|
|
622
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
623
623
|
*/
|
|
624
624
|
action: {
|
|
625
625
|
/**
|
|
@@ -641,9 +641,9 @@ declare const webSearchPreview: _ai_sdk_provider_utils.ProviderToolFactoryWithOu
|
|
|
641
641
|
url?: string | null;
|
|
642
642
|
} | {
|
|
643
643
|
/**
|
|
644
|
-
* Action type "
|
|
644
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
645
645
|
*/
|
|
646
|
-
type: "
|
|
646
|
+
type: "findInPage";
|
|
647
647
|
/**
|
|
648
648
|
* The URL of the page searched for the pattern.
|
|
649
649
|
*/
|
package/dist/internal/index.js
CHANGED
|
@@ -2899,7 +2899,7 @@ var openaiResponsesChunkSchema = (0, import_provider_utils23.lazySchema)(
|
|
|
2899
2899
|
url: import_v416.z.string().nullish()
|
|
2900
2900
|
}),
|
|
2901
2901
|
import_v416.z.object({
|
|
2902
|
-
type: import_v416.z.literal("
|
|
2902
|
+
type: import_v416.z.literal("find_in_page"),
|
|
2903
2903
|
url: import_v416.z.string().nullish(),
|
|
2904
2904
|
pattern: import_v416.z.string().nullish()
|
|
2905
2905
|
})
|
|
@@ -3203,7 +3203,7 @@ var openaiResponsesResponseSchema = (0, import_provider_utils23.lazySchema)(
|
|
|
3203
3203
|
url: import_v416.z.string().nullish()
|
|
3204
3204
|
}),
|
|
3205
3205
|
import_v416.z.object({
|
|
3206
|
-
type: import_v416.z.literal("
|
|
3206
|
+
type: import_v416.z.literal("find_in_page"),
|
|
3207
3207
|
url: import_v416.z.string().nullish(),
|
|
3208
3208
|
pattern: import_v416.z.string().nullish()
|
|
3209
3209
|
})
|
|
@@ -3402,7 +3402,10 @@ var openaiResponsesReasoningModelIds = [
|
|
|
3402
3402
|
"gpt-5.1-chat-latest",
|
|
3403
3403
|
"gpt-5.1-codex-mini",
|
|
3404
3404
|
"gpt-5.1-codex",
|
|
3405
|
-
"gpt-5.1-codex-max"
|
|
3405
|
+
"gpt-5.1-codex-max",
|
|
3406
|
+
"gpt-5.2",
|
|
3407
|
+
"gpt-5.2-chat-latest",
|
|
3408
|
+
"gpt-5.2-pro"
|
|
3406
3409
|
];
|
|
3407
3410
|
var openaiResponsesModelIds = [
|
|
3408
3411
|
"gpt-4.1",
|
|
@@ -3827,7 +3830,7 @@ var webSearchOutputSchema = (0, import_provider_utils29.lazySchema)(
|
|
|
3827
3830
|
url: import_v422.z.string().nullish()
|
|
3828
3831
|
}),
|
|
3829
3832
|
import_v422.z.object({
|
|
3830
|
-
type: import_v422.z.literal("
|
|
3833
|
+
type: import_v422.z.literal("findInPage"),
|
|
3831
3834
|
url: import_v422.z.string().nullish(),
|
|
3832
3835
|
pattern: import_v422.z.string().nullish()
|
|
3833
3836
|
})
|
|
@@ -3880,7 +3883,7 @@ var webSearchPreviewOutputSchema = (0, import_provider_utils30.lazySchema)(
|
|
|
3880
3883
|
url: import_v423.z.string().nullish()
|
|
3881
3884
|
}),
|
|
3882
3885
|
import_v423.z.object({
|
|
3883
|
-
type: import_v423.z.literal("
|
|
3886
|
+
type: import_v423.z.literal("findInPage"),
|
|
3884
3887
|
url: import_v423.z.string().nullish(),
|
|
3885
3888
|
pattern: import_v423.z.string().nullish()
|
|
3886
3889
|
})
|
|
@@ -5405,9 +5408,13 @@ function mapWebSearchOutput(action) {
|
|
|
5405
5408
|
};
|
|
5406
5409
|
case "open_page":
|
|
5407
5410
|
return { action: { type: "openPage", url: action.url } };
|
|
5408
|
-
case "
|
|
5411
|
+
case "find_in_page":
|
|
5409
5412
|
return {
|
|
5410
|
-
action: {
|
|
5413
|
+
action: {
|
|
5414
|
+
type: "findInPage",
|
|
5415
|
+
url: action.url,
|
|
5416
|
+
pattern: action.pattern
|
|
5417
|
+
}
|
|
5411
5418
|
};
|
|
5412
5419
|
}
|
|
5413
5420
|
}
|