@ai-sdk/openai 3.0.108 → 3.0.110
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 +13 -0
- package/dist/index.d.mts +41 -21
- package/dist/index.d.ts +41 -21
- package/dist/index.js +160 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -30
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +22 -9
- package/dist/internal/index.d.ts +22 -9
- package/dist/internal/index.js +157 -28
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +157 -28
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +140 -2
- package/package.json +1 -1
- package/src/chat/openai-chat-language-model.ts +31 -1
- package/src/chat/openai-chat-options.ts +1 -0
- package/src/image/openai-image-model-options.ts +3 -2
- package/src/index.ts +2 -0
- package/src/openai-language-model-capabilities.ts +10 -0
- package/src/openai-tools.ts +2 -1
- package/src/responses/convert-to-openai-responses-input.ts +14 -0
- package/src/responses/openai-responses-api.ts +20 -2
- package/src/responses/openai-responses-language-model.ts +97 -7
- package/src/responses/openai-responses-options.ts +13 -0
- package/src/responses/openai-responses-prepare-tools.ts +48 -1
- package/src/responses/openai-responses-provider-metadata.ts +10 -0
- package/src/tool/custom.ts +7 -0
- package/src/tool/image-generation.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.110
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 447ba18: feat(openai): add async tool calling
|
|
8
|
+
- 46c6820: Add `xhigh` and `max` quality support for GPT Image 2.5 Flare and Sunburst in image generation, image editing, and the Responses API image generation tool.
|
|
9
|
+
|
|
10
|
+
## 3.0.109
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7f3b8f0: feat(openai): add GPT-6 reasoning configuration updates
|
|
15
|
+
|
|
3
16
|
## 3.0.108
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
9
9
|
logprobs?: number | boolean | undefined;
|
|
10
10
|
parallelToolCalls?: boolean | undefined;
|
|
11
11
|
user?: string | undefined;
|
|
12
|
-
reasoningEffort?: "
|
|
12
|
+
reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "none" | "minimal" | undefined;
|
|
13
13
|
maxCompletionTokens?: number | undefined;
|
|
14
14
|
store?: boolean | undefined;
|
|
15
15
|
metadata?: Record<string, string> | undefined;
|
|
@@ -48,7 +48,7 @@ type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOption
|
|
|
48
48
|
|
|
49
49
|
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | 'gpt-image-2' | 'chatgpt-image-latest' | (string & {});
|
|
50
50
|
declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
51
|
-
quality?: "
|
|
51
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
52
52
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
53
53
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
54
54
|
outputCompression?: number | undefined;
|
|
@@ -56,17 +56,17 @@ declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
56
56
|
}>;
|
|
57
57
|
type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
|
|
58
58
|
declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
59
|
-
quality?: "
|
|
59
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
60
60
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
61
61
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
62
62
|
outputCompression?: number | undefined;
|
|
63
63
|
user?: string | undefined;
|
|
64
64
|
style?: "vivid" | "natural" | undefined;
|
|
65
|
-
moderation?: "
|
|
65
|
+
moderation?: "low" | "auto" | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
68
68
|
declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
69
|
-
quality?: "
|
|
69
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
70
70
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
71
71
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
72
72
|
outputCompression?: number | undefined;
|
|
@@ -341,6 +341,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
341
341
|
call_id: string;
|
|
342
342
|
name: string;
|
|
343
343
|
arguments: string;
|
|
344
|
+
async?: boolean | null | undefined;
|
|
344
345
|
namespace?: string | null | undefined;
|
|
345
346
|
} | {
|
|
346
347
|
type: "web_search_call";
|
|
@@ -403,6 +404,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
403
404
|
call_id: string;
|
|
404
405
|
name: string;
|
|
405
406
|
input: string;
|
|
407
|
+
async?: boolean | null | undefined;
|
|
406
408
|
} | {
|
|
407
409
|
type: "shell_call";
|
|
408
410
|
id: string;
|
|
@@ -471,6 +473,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
471
473
|
name: string;
|
|
472
474
|
arguments: string;
|
|
473
475
|
status: "completed";
|
|
476
|
+
async?: boolean | null | undefined;
|
|
474
477
|
namespace?: string | null | undefined;
|
|
475
478
|
} | {
|
|
476
479
|
type: "custom_tool_call";
|
|
@@ -479,6 +482,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
479
482
|
name: string;
|
|
480
483
|
input: string;
|
|
481
484
|
status: "completed";
|
|
485
|
+
async?: boolean | null | undefined;
|
|
482
486
|
} | {
|
|
483
487
|
type: "code_interpreter_call";
|
|
484
488
|
id: string;
|
|
@@ -720,6 +724,11 @@ declare const customToolFactory: _ai_sdk_provider_utils.ProviderToolFactory<stri
|
|
|
720
724
|
* An optional description of what the tool does.
|
|
721
725
|
*/
|
|
722
726
|
description?: string;
|
|
727
|
+
/**
|
|
728
|
+
* Whether the model can continue generating after calling this tool
|
|
729
|
+
* without waiting for its result.
|
|
730
|
+
*/
|
|
731
|
+
async?: boolean;
|
|
723
732
|
/**
|
|
724
733
|
* The output format specification for the tool.
|
|
725
734
|
* Omit for unconstrained text output.
|
|
@@ -786,6 +795,7 @@ declare const openaiTools: {
|
|
|
786
795
|
*
|
|
787
796
|
* @param name - The name of the custom tool.
|
|
788
797
|
* @param description - An optional description of the tool.
|
|
798
|
+
* @param async - Whether the model can continue without waiting for the tool result.
|
|
789
799
|
* @param format - The output format constraint (grammar type, syntax, and definition).
|
|
790
800
|
*/
|
|
791
801
|
customTool: (args: Parameters<typeof customToolFactory>[0]) => _ai_sdk_provider_utils.Tool<string, unknown>;
|
|
@@ -853,7 +863,7 @@ declare const openaiTools: {
|
|
|
853
863
|
* @param outputCompression - Compression level for the output image (0-100).
|
|
854
864
|
* @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
|
|
855
865
|
* @param partialImages - Number of partial images to generate in streaming mode (0-3).
|
|
856
|
-
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or '
|
|
866
|
+
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', 'high', 'xhigh', or 'max'. 'xhigh' and 'max' require a GPT Image 2.5 model.
|
|
857
867
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
858
868
|
*/
|
|
859
869
|
imageGeneration: (args?: {
|
|
@@ -868,7 +878,7 @@ declare const openaiTools: {
|
|
|
868
878
|
outputCompression?: number;
|
|
869
879
|
outputFormat?: "png" | "jpeg" | "webp";
|
|
870
880
|
partialImages?: number;
|
|
871
|
-
quality?: "auto" | "low" | "medium" | "high";
|
|
881
|
+
quality?: "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
872
882
|
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
|
|
873
883
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
874
884
|
result: string;
|
|
@@ -986,19 +996,7 @@ declare const openaiTools: {
|
|
|
986
996
|
type: "approximate";
|
|
987
997
|
country?: string;
|
|
988
998
|
city?: string;
|
|
989
|
-
region
|
|
990
|
-
/**
|
|
991
|
-
* Local shell is a tool that allows agents to run shell commands locally
|
|
992
|
-
* on a machine you or the user provides.
|
|
993
|
-
*
|
|
994
|
-
* Supported models: `gpt-5-codex`
|
|
995
|
-
*/
|
|
996
|
-
? /**
|
|
997
|
-
* Local shell is a tool that allows agents to run shell commands locally
|
|
998
|
-
* on a machine you or the user provides.
|
|
999
|
-
*
|
|
1000
|
-
* Supported models: `gpt-5-codex`
|
|
1001
|
-
*/: string;
|
|
999
|
+
region?: string;
|
|
1002
1000
|
timezone?: string;
|
|
1003
1001
|
};
|
|
1004
1002
|
}>;
|
|
@@ -1111,6 +1109,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
|
|
|
1111
1109
|
} | undefined;
|
|
1112
1110
|
promptCacheRetention?: "in_memory" | "24h" | null | undefined;
|
|
1113
1111
|
reasoningEffort?: string | null | undefined;
|
|
1112
|
+
reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1114
1113
|
reasoningMode?: "standard" | "pro" | undefined;
|
|
1115
1114
|
reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
|
|
1116
1115
|
reasoningSummary?: string | null | undefined;
|
|
@@ -1243,6 +1242,19 @@ declare function createOpenAI(options?: OpenAIProviderSettings): OpenAIProvider;
|
|
|
1243
1242
|
*/
|
|
1244
1243
|
declare const openai: OpenAIProvider;
|
|
1245
1244
|
|
|
1245
|
+
type OpenAIToolOptions = {
|
|
1246
|
+
/**
|
|
1247
|
+
* Whether the model can continue generating after calling this tool without
|
|
1248
|
+
* waiting for its result.
|
|
1249
|
+
*/
|
|
1250
|
+
async?: boolean;
|
|
1251
|
+
deferLoading?: boolean;
|
|
1252
|
+
namespace?: {
|
|
1253
|
+
name: string;
|
|
1254
|
+
description: string;
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1246
1258
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1247
1259
|
type ResponsesOutputTextAnnotationProviderMetadata = Extract<OpenaiResponsesChunk, {
|
|
1248
1260
|
type: 'response.output_text.annotation.added';
|
|
@@ -1263,6 +1275,14 @@ type OpenaiResponsesReasoningProviderMetadata = {
|
|
|
1263
1275
|
type OpenaiResponsesProviderMetadata = {
|
|
1264
1276
|
openai: ResponsesProviderMetadata;
|
|
1265
1277
|
};
|
|
1278
|
+
type ResponsesToolCallProviderMetadata = {
|
|
1279
|
+
itemId: string;
|
|
1280
|
+
async?: boolean;
|
|
1281
|
+
namespace?: string;
|
|
1282
|
+
};
|
|
1283
|
+
type OpenaiResponsesToolCallProviderMetadata = {
|
|
1284
|
+
openai: ResponsesToolCallProviderMetadata;
|
|
1285
|
+
};
|
|
1266
1286
|
type ResponsesTextProviderMetadata = {
|
|
1267
1287
|
itemId: string;
|
|
1268
1288
|
phase?: 'commentary' | 'final_answer' | null;
|
|
@@ -1290,4 +1310,4 @@ type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
|
1290
1310
|
|
|
1291
1311
|
declare const VERSION: string;
|
|
1292
1312
|
|
|
1293
|
-
export { type OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, type OpenAIEmbeddingModelOptions, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, type OpenAILanguageModelResponsesOptions, type OpenAIProvider, type OpenAIProviderSettings, type OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions, type OpenAISpeechModelOptions, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, VERSION, createOpenAI, openai };
|
|
1313
|
+
export { type OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, type OpenAIEmbeddingModelOptions, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, type OpenAILanguageModelResponsesOptions, type OpenAIProvider, type OpenAIProviderSettings, type OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions, type OpenAISpeechModelOptions, type OpenAIToolOptions, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type OpenaiResponsesToolCallProviderMetadata, VERSION, createOpenAI, openai };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare const openaiLanguageModelChatOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
9
9
|
logprobs?: number | boolean | undefined;
|
|
10
10
|
parallelToolCalls?: boolean | undefined;
|
|
11
11
|
user?: string | undefined;
|
|
12
|
-
reasoningEffort?: "
|
|
12
|
+
reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max" | "none" | "minimal" | undefined;
|
|
13
13
|
maxCompletionTokens?: number | undefined;
|
|
14
14
|
store?: boolean | undefined;
|
|
15
15
|
metadata?: Record<string, string> | undefined;
|
|
@@ -48,7 +48,7 @@ type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOption
|
|
|
48
48
|
|
|
49
49
|
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | 'gpt-image-2' | 'chatgpt-image-latest' | (string & {});
|
|
50
50
|
declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
51
|
-
quality?: "
|
|
51
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
52
52
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
53
53
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
54
54
|
outputCompression?: number | undefined;
|
|
@@ -56,17 +56,17 @@ declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
56
56
|
}>;
|
|
57
57
|
type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
|
|
58
58
|
declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
59
|
-
quality?: "
|
|
59
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
60
60
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
61
61
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
62
62
|
outputCompression?: number | undefined;
|
|
63
63
|
user?: string | undefined;
|
|
64
64
|
style?: "vivid" | "natural" | undefined;
|
|
65
|
-
moderation?: "
|
|
65
|
+
moderation?: "low" | "auto" | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
68
68
|
declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
69
|
-
quality?: "
|
|
69
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
70
70
|
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
71
71
|
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
72
72
|
outputCompression?: number | undefined;
|
|
@@ -341,6 +341,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
341
341
|
call_id: string;
|
|
342
342
|
name: string;
|
|
343
343
|
arguments: string;
|
|
344
|
+
async?: boolean | null | undefined;
|
|
344
345
|
namespace?: string | null | undefined;
|
|
345
346
|
} | {
|
|
346
347
|
type: "web_search_call";
|
|
@@ -403,6 +404,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
403
404
|
call_id: string;
|
|
404
405
|
name: string;
|
|
405
406
|
input: string;
|
|
407
|
+
async?: boolean | null | undefined;
|
|
406
408
|
} | {
|
|
407
409
|
type: "shell_call";
|
|
408
410
|
id: string;
|
|
@@ -471,6 +473,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
471
473
|
name: string;
|
|
472
474
|
arguments: string;
|
|
473
475
|
status: "completed";
|
|
476
|
+
async?: boolean | null | undefined;
|
|
474
477
|
namespace?: string | null | undefined;
|
|
475
478
|
} | {
|
|
476
479
|
type: "custom_tool_call";
|
|
@@ -479,6 +482,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
479
482
|
name: string;
|
|
480
483
|
input: string;
|
|
481
484
|
status: "completed";
|
|
485
|
+
async?: boolean | null | undefined;
|
|
482
486
|
} | {
|
|
483
487
|
type: "code_interpreter_call";
|
|
484
488
|
id: string;
|
|
@@ -720,6 +724,11 @@ declare const customToolFactory: _ai_sdk_provider_utils.ProviderToolFactory<stri
|
|
|
720
724
|
* An optional description of what the tool does.
|
|
721
725
|
*/
|
|
722
726
|
description?: string;
|
|
727
|
+
/**
|
|
728
|
+
* Whether the model can continue generating after calling this tool
|
|
729
|
+
* without waiting for its result.
|
|
730
|
+
*/
|
|
731
|
+
async?: boolean;
|
|
723
732
|
/**
|
|
724
733
|
* The output format specification for the tool.
|
|
725
734
|
* Omit for unconstrained text output.
|
|
@@ -786,6 +795,7 @@ declare const openaiTools: {
|
|
|
786
795
|
*
|
|
787
796
|
* @param name - The name of the custom tool.
|
|
788
797
|
* @param description - An optional description of the tool.
|
|
798
|
+
* @param async - Whether the model can continue without waiting for the tool result.
|
|
789
799
|
* @param format - The output format constraint (grammar type, syntax, and definition).
|
|
790
800
|
*/
|
|
791
801
|
customTool: (args: Parameters<typeof customToolFactory>[0]) => _ai_sdk_provider_utils.Tool<string, unknown>;
|
|
@@ -853,7 +863,7 @@ declare const openaiTools: {
|
|
|
853
863
|
* @param outputCompression - Compression level for the output image (0-100).
|
|
854
864
|
* @param outputFormat - The output format of the generated image. One of 'png', 'jpeg', or 'webp'.
|
|
855
865
|
* @param partialImages - Number of partial images to generate in streaming mode (0-3).
|
|
856
|
-
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or '
|
|
866
|
+
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', 'high', 'xhigh', or 'max'. 'xhigh' and 'max' require a GPT Image 2.5 model.
|
|
857
867
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
858
868
|
*/
|
|
859
869
|
imageGeneration: (args?: {
|
|
@@ -868,7 +878,7 @@ declare const openaiTools: {
|
|
|
868
878
|
outputCompression?: number;
|
|
869
879
|
outputFormat?: "png" | "jpeg" | "webp";
|
|
870
880
|
partialImages?: number;
|
|
871
|
-
quality?: "auto" | "low" | "medium" | "high";
|
|
881
|
+
quality?: "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
872
882
|
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
|
|
873
883
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
874
884
|
result: string;
|
|
@@ -986,19 +996,7 @@ declare const openaiTools: {
|
|
|
986
996
|
type: "approximate";
|
|
987
997
|
country?: string;
|
|
988
998
|
city?: string;
|
|
989
|
-
region
|
|
990
|
-
/**
|
|
991
|
-
* Local shell is a tool that allows agents to run shell commands locally
|
|
992
|
-
* on a machine you or the user provides.
|
|
993
|
-
*
|
|
994
|
-
* Supported models: `gpt-5-codex`
|
|
995
|
-
*/
|
|
996
|
-
? /**
|
|
997
|
-
* Local shell is a tool that allows agents to run shell commands locally
|
|
998
|
-
* on a machine you or the user provides.
|
|
999
|
-
*
|
|
1000
|
-
* Supported models: `gpt-5-codex`
|
|
1001
|
-
*/: string;
|
|
999
|
+
region?: string;
|
|
1002
1000
|
timezone?: string;
|
|
1003
1001
|
};
|
|
1004
1002
|
}>;
|
|
@@ -1111,6 +1109,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
|
|
|
1111
1109
|
} | undefined;
|
|
1112
1110
|
promptCacheRetention?: "in_memory" | "24h" | null | undefined;
|
|
1113
1111
|
reasoningEffort?: string | null | undefined;
|
|
1112
|
+
reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1114
1113
|
reasoningMode?: "standard" | "pro" | undefined;
|
|
1115
1114
|
reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
|
|
1116
1115
|
reasoningSummary?: string | null | undefined;
|
|
@@ -1243,6 +1242,19 @@ declare function createOpenAI(options?: OpenAIProviderSettings): OpenAIProvider;
|
|
|
1243
1242
|
*/
|
|
1244
1243
|
declare const openai: OpenAIProvider;
|
|
1245
1244
|
|
|
1245
|
+
type OpenAIToolOptions = {
|
|
1246
|
+
/**
|
|
1247
|
+
* Whether the model can continue generating after calling this tool without
|
|
1248
|
+
* waiting for its result.
|
|
1249
|
+
*/
|
|
1250
|
+
async?: boolean;
|
|
1251
|
+
deferLoading?: boolean;
|
|
1252
|
+
namespace?: {
|
|
1253
|
+
name: string;
|
|
1254
|
+
description: string;
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1246
1258
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1247
1259
|
type ResponsesOutputTextAnnotationProviderMetadata = Extract<OpenaiResponsesChunk, {
|
|
1248
1260
|
type: 'response.output_text.annotation.added';
|
|
@@ -1263,6 +1275,14 @@ type OpenaiResponsesReasoningProviderMetadata = {
|
|
|
1263
1275
|
type OpenaiResponsesProviderMetadata = {
|
|
1264
1276
|
openai: ResponsesProviderMetadata;
|
|
1265
1277
|
};
|
|
1278
|
+
type ResponsesToolCallProviderMetadata = {
|
|
1279
|
+
itemId: string;
|
|
1280
|
+
async?: boolean;
|
|
1281
|
+
namespace?: string;
|
|
1282
|
+
};
|
|
1283
|
+
type OpenaiResponsesToolCallProviderMetadata = {
|
|
1284
|
+
openai: ResponsesToolCallProviderMetadata;
|
|
1285
|
+
};
|
|
1266
1286
|
type ResponsesTextProviderMetadata = {
|
|
1267
1287
|
itemId: string;
|
|
1268
1288
|
phase?: 'commentary' | 'final_answer' | null;
|
|
@@ -1290,4 +1310,4 @@ type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
|
1290
1310
|
|
|
1291
1311
|
declare const VERSION: string;
|
|
1292
1312
|
|
|
1293
|
-
export { type OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, type OpenAIEmbeddingModelOptions, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, type OpenAILanguageModelResponsesOptions, type OpenAIProvider, type OpenAIProviderSettings, type OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions, type OpenAISpeechModelOptions, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, VERSION, createOpenAI, openai };
|
|
1313
|
+
export { type OpenAILanguageModelChatOptions as OpenAIChatLanguageModelOptions, type OpenAIEmbeddingModelOptions, type OpenAIImageModelEditOptions, type OpenAIImageModelGenerationOptions, type OpenAIImageModelOptions, type OpenAILanguageModelChatOptions, type OpenAILanguageModelCompletionOptions, type OpenAILanguageModelResponsesOptions, type OpenAIProvider, type OpenAIProviderSettings, type OpenAILanguageModelResponsesOptions as OpenAIResponsesProviderOptions, type OpenAISpeechModelOptions, type OpenAIToolOptions, type OpenAITranscriptionModelOptions, type OpenaiResponsesProviderMetadata, type OpenaiResponsesReasoningProviderMetadata, type OpenaiResponsesSourceDocumentProviderMetadata, type OpenaiResponsesTextProviderMetadata, type OpenaiResponsesToolCallProviderMetadata, VERSION, createOpenAI, openai };
|