@ai-sdk/openai 3.0.109 → 3.0.111
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 +40 -21
- package/dist/index.d.ts +40 -21
- package/dist/index.js +84 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -22
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +30 -10
- package/dist/internal/index.d.ts +30 -10
- package/dist/internal/index.js +81 -20
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +81 -20
- package/dist/internal/index.mjs.map +1 -1
- package/docs/03-openai.mdx +94 -13
- package/package.json +1 -1
- package/src/image/openai-image-model-options.ts +11 -2
- package/src/index.ts +2 -0
- package/src/openai-config.ts +5 -0
- package/src/openai-language-model-capabilities.ts +2 -0
- package/src/openai-tools.ts +2 -1
- package/src/responses/convert-to-openai-responses-input.ts +20 -0
- package/src/responses/openai-responses-api.ts +14 -1
- package/src/responses/openai-responses-language-model.ts +23 -4
- 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 +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.111
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1f75808: Include explicit message item types in Azure AI Foundry Responses requests.
|
|
8
|
+
- 65150c2: feat(openai): add GPT Image 2.5 Flare and Sunburst model IDs
|
|
9
|
+
|
|
10
|
+
## 3.0.110
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 447ba18: feat(openai): add async tool calling
|
|
15
|
+
- 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.
|
|
16
|
+
|
|
3
17
|
## 3.0.109
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -46,9 +46,9 @@ declare const openaiEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
46
46
|
}>;
|
|
47
47
|
type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOptions>;
|
|
48
48
|
|
|
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 & {});
|
|
49
|
+
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | 'gpt-image-2' | 'gpt-image-2.5-flare' | 'gpt-image-2.5-flare-2026-09-08' | 'gpt-image-2.5-sunburst' | 'gpt-image-2.5-sunburst-2026-09-08' | 'chatgpt-image-latest' | (string & {});
|
|
50
50
|
declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
51
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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,7 +56,7 @@ 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?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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;
|
|
@@ -66,7 +66,7 @@ declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySche
|
|
|
66
66
|
}>;
|
|
67
67
|
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
68
68
|
declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
69
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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,8 +878,8 @@ declare const openaiTools: {
|
|
|
868
878
|
outputCompression?: number;
|
|
869
879
|
outputFormat?: "png" | "jpeg" | "webp";
|
|
870
880
|
partialImages?: number;
|
|
871
|
-
quality?: "auto" | "low" | "medium" | "high";
|
|
872
|
-
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
|
|
881
|
+
quality?: "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
882
|
+
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024" | (string & {});
|
|
873
883
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
874
884
|
result: string;
|
|
875
885
|
}>;
|
|
@@ -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
|
}>;
|
|
@@ -1244,6 +1242,19 @@ declare function createOpenAI(options?: OpenAIProviderSettings): OpenAIProvider;
|
|
|
1244
1242
|
*/
|
|
1245
1243
|
declare const openai: OpenAIProvider;
|
|
1246
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
|
+
|
|
1247
1258
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1248
1259
|
type ResponsesOutputTextAnnotationProviderMetadata = Extract<OpenaiResponsesChunk, {
|
|
1249
1260
|
type: 'response.output_text.annotation.added';
|
|
@@ -1264,6 +1275,14 @@ type OpenaiResponsesReasoningProviderMetadata = {
|
|
|
1264
1275
|
type OpenaiResponsesProviderMetadata = {
|
|
1265
1276
|
openai: ResponsesProviderMetadata;
|
|
1266
1277
|
};
|
|
1278
|
+
type ResponsesToolCallProviderMetadata = {
|
|
1279
|
+
itemId: string;
|
|
1280
|
+
async?: boolean;
|
|
1281
|
+
namespace?: string;
|
|
1282
|
+
};
|
|
1283
|
+
type OpenaiResponsesToolCallProviderMetadata = {
|
|
1284
|
+
openai: ResponsesToolCallProviderMetadata;
|
|
1285
|
+
};
|
|
1267
1286
|
type ResponsesTextProviderMetadata = {
|
|
1268
1287
|
itemId: string;
|
|
1269
1288
|
phase?: 'commentary' | 'final_answer' | null;
|
|
@@ -1291,4 +1310,4 @@ type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
|
1291
1310
|
|
|
1292
1311
|
declare const VERSION: string;
|
|
1293
1312
|
|
|
1294
|
-
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
|
@@ -46,9 +46,9 @@ declare const openaiEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
|
46
46
|
}>;
|
|
47
47
|
type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOptions>;
|
|
48
48
|
|
|
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 & {});
|
|
49
|
+
type OpenAIImageModelId = 'dall-e-3' | 'dall-e-2' | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-1.5' | 'gpt-image-2' | 'gpt-image-2.5-flare' | 'gpt-image-2.5-flare-2026-09-08' | 'gpt-image-2.5-sunburst' | 'gpt-image-2.5-sunburst-2026-09-08' | 'chatgpt-image-latest' | (string & {});
|
|
50
50
|
declare const openaiImageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
51
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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,7 +56,7 @@ 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?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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;
|
|
@@ -66,7 +66,7 @@ declare const openaiImageModelGenerationOptions: _ai_sdk_provider_utils.LazySche
|
|
|
66
66
|
}>;
|
|
67
67
|
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
68
68
|
declare const openaiImageModelEditOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
69
|
-
quality?: "low" | "medium" | "high" | "auto" | "standard" | "hd" | undefined;
|
|
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,8 +878,8 @@ declare const openaiTools: {
|
|
|
868
878
|
outputCompression?: number;
|
|
869
879
|
outputFormat?: "png" | "jpeg" | "webp";
|
|
870
880
|
partialImages?: number;
|
|
871
|
-
quality?: "auto" | "low" | "medium" | "high";
|
|
872
|
-
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
|
|
881
|
+
quality?: "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
882
|
+
size?: "auto" | "1024x1024" | "1024x1536" | "1536x1024" | (string & {});
|
|
873
883
|
}) => _ai_sdk_provider_utils.Tool<{}, {
|
|
874
884
|
result: string;
|
|
875
885
|
}>;
|
|
@@ -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
|
}>;
|
|
@@ -1244,6 +1242,19 @@ declare function createOpenAI(options?: OpenAIProviderSettings): OpenAIProvider;
|
|
|
1244
1242
|
*/
|
|
1245
1243
|
declare const openai: OpenAIProvider;
|
|
1246
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
|
+
|
|
1247
1258
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1248
1259
|
type ResponsesOutputTextAnnotationProviderMetadata = Extract<OpenaiResponsesChunk, {
|
|
1249
1260
|
type: 'response.output_text.annotation.added';
|
|
@@ -1264,6 +1275,14 @@ type OpenaiResponsesReasoningProviderMetadata = {
|
|
|
1264
1275
|
type OpenaiResponsesProviderMetadata = {
|
|
1265
1276
|
openai: ResponsesProviderMetadata;
|
|
1266
1277
|
};
|
|
1278
|
+
type ResponsesToolCallProviderMetadata = {
|
|
1279
|
+
itemId: string;
|
|
1280
|
+
async?: boolean;
|
|
1281
|
+
namespace?: string;
|
|
1282
|
+
};
|
|
1283
|
+
type OpenaiResponsesToolCallProviderMetadata = {
|
|
1284
|
+
openai: ResponsesToolCallProviderMetadata;
|
|
1285
|
+
};
|
|
1267
1286
|
type ResponsesTextProviderMetadata = {
|
|
1268
1287
|
itemId: string;
|
|
1269
1288
|
phase?: 'commentary' | 'final_answer' | null;
|
|
@@ -1291,4 +1310,4 @@ type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
|
1291
1310
|
|
|
1292
1311
|
declare const VERSION: string;
|
|
1293
1312
|
|
|
1294
|
-
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 };
|