@ai-sdk/openai 4.0.81 → 4.0.82
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 +10 -0
- package/dist/index.d.ts +1716 -1693
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9734 -12001
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +2240 -2219
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/index.js +7712 -9540
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +11 -9
- package/package.json +8 -8
- package/src/chat/openai-chat-language-model-options.ts +1 -0
- package/src/responses/openai-responses-language-model-options.ts +2 -0
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,2107 +1,2123 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
systemMessageMode?: "remove" | "system" | "developer" | undefined;
|
|
29
|
-
forceReasoning?: boolean | undefined;
|
|
1
|
+
import { EmbeddingModelV4, Experimental_TranscriptionModelV4StreamOptions, ImageModelV4, JSONObject, JSONSchema7, JSONValue, LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamResult, SharedV4Warning, SpeechModelV4, TranscriptionModelV4, TranscriptionModelV4CallOptions } from "@ai-sdk/provider";
|
|
2
|
+
import { EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL, FetchFunction, InferSchema, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, WebSocketConstructor } from "@ai-sdk/provider-utils";
|
|
3
|
+
import { z } from "zod/v4";
|
|
4
|
+
//#region src/chat/openai-chat-language-model-options.d.ts
|
|
5
|
+
export type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-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-audio-preview' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | '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-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'gpt-6-sol' | (string & {});
|
|
6
|
+
export declare const openaiLanguageModelChatOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
7
|
+
logitBias?: Record<number, number> | undefined;
|
|
8
|
+
logprobs?: number | boolean | undefined;
|
|
9
|
+
parallelToolCalls?: boolean | undefined;
|
|
10
|
+
user?: string | undefined;
|
|
11
|
+
reasoningEffort?: "low" | "medium" | "high" | "none" | "minimal" | "xhigh" | "max" | undefined;
|
|
12
|
+
maxCompletionTokens?: number | undefined;
|
|
13
|
+
store?: boolean | undefined;
|
|
14
|
+
metadata?: Record<string, string> | undefined;
|
|
15
|
+
prediction?: Record<string, any> | undefined;
|
|
16
|
+
serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
|
|
17
|
+
strictJsonSchema?: boolean | undefined;
|
|
18
|
+
textVerbosity?: "low" | "medium" | "high" | undefined;
|
|
19
|
+
promptCacheKey?: string | undefined;
|
|
20
|
+
promptCacheOptions?: {
|
|
21
|
+
mode?: "implicit" | "explicit" | undefined;
|
|
22
|
+
ttl?: "30m" | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
promptCacheRetention?: "in_memory" | "24h" | undefined;
|
|
25
|
+
safetyIdentifier?: string | undefined;
|
|
26
|
+
systemMessageMode?: "system" | "developer" | "remove" | undefined;
|
|
27
|
+
forceReasoning?: boolean | undefined;
|
|
30
28
|
}>;
|
|
31
|
-
type OpenAILanguageModelChatOptions = InferSchema<typeof openaiLanguageModelChatOptions>;
|
|
32
|
-
|
|
29
|
+
export type OpenAILanguageModelChatOptions = InferSchema<typeof openaiLanguageModelChatOptions>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/chat/openai-chat-language-model.d.ts
|
|
33
32
|
type OpenAIChatConfig = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
provider: string;
|
|
34
|
+
headers?: () => Record<string, string | undefined>;
|
|
35
|
+
url: (options: {
|
|
36
|
+
modelId: string;
|
|
37
|
+
path: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
fetch?: FetchFunction;
|
|
41
40
|
};
|
|
42
|
-
declare class OpenAIChatLanguageModel implements LanguageModelV4 {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
export declare class OpenAIChatLanguageModel implements LanguageModelV4 {
|
|
42
|
+
readonly specificationVersion = "v4";
|
|
43
|
+
readonly modelId: OpenAIChatModelId;
|
|
44
|
+
readonly supportedUrls: {
|
|
45
|
+
'image/*': RegExp[];
|
|
46
|
+
};
|
|
47
|
+
private readonly config;
|
|
48
|
+
static [WORKFLOW_SERIALIZE](model: OpenAIChatLanguageModel): {
|
|
49
|
+
modelId: string;
|
|
50
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
51
|
+
};
|
|
52
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
53
|
+
modelId: OpenAIChatModelId;
|
|
54
|
+
config: OpenAIChatConfig;
|
|
55
|
+
}): OpenAIChatLanguageModel;
|
|
56
|
+
constructor(modelId: OpenAIChatModelId, config: OpenAIChatConfig);
|
|
57
|
+
get provider(): string;
|
|
58
|
+
private getArgs;
|
|
59
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
60
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/completion/openai-completion-language-model-options.d.ts
|
|
64
|
+
export type OpenAICompletionModelId = 'gpt-3.5-turbo-instruct' | 'gpt-3.5-turbo-instruct-0914' | (string & {});
|
|
65
|
+
export declare const openaiLanguageModelCompletionOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
66
|
+
echo?: boolean | undefined;
|
|
67
|
+
logitBias?: Record<string, number> | undefined;
|
|
68
|
+
suffix?: string | undefined;
|
|
69
|
+
user?: string | undefined;
|
|
70
|
+
logprobs?: number | boolean | undefined;
|
|
71
71
|
}>;
|
|
72
|
-
type OpenAILanguageModelCompletionOptions = InferSchema<typeof openaiLanguageModelCompletionOptions>;
|
|
73
|
-
|
|
72
|
+
export type OpenAILanguageModelCompletionOptions = InferSchema<typeof openaiLanguageModelCompletionOptions>;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/completion/openai-completion-language-model.d.ts
|
|
74
75
|
type OpenAICompletionConfig = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
provider: string;
|
|
77
|
+
headers?: () => Record<string, string | undefined>;
|
|
78
|
+
url: (options: {
|
|
79
|
+
modelId: string;
|
|
80
|
+
path: string;
|
|
81
|
+
}) => string;
|
|
82
|
+
fetch?: FetchFunction;
|
|
82
83
|
};
|
|
83
|
-
declare class OpenAICompletionLanguageModel implements LanguageModelV4 {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
84
|
+
export declare class OpenAICompletionLanguageModel implements LanguageModelV4 {
|
|
85
|
+
readonly specificationVersion = "v4";
|
|
86
|
+
readonly modelId: OpenAICompletionModelId;
|
|
87
|
+
private readonly config;
|
|
88
|
+
private get providerOptionsName();
|
|
89
|
+
static [WORKFLOW_SERIALIZE](model: OpenAICompletionLanguageModel): {
|
|
90
|
+
modelId: string;
|
|
91
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
92
|
+
};
|
|
93
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
94
|
+
modelId: OpenAICompletionModelId;
|
|
95
|
+
config: OpenAICompletionConfig;
|
|
96
|
+
}): OpenAICompletionLanguageModel;
|
|
97
|
+
constructor(modelId: OpenAICompletionModelId, config: OpenAICompletionConfig);
|
|
98
|
+
get provider(): string;
|
|
99
|
+
readonly supportedUrls: Record<string, RegExp[]>;
|
|
100
|
+
private getArgs;
|
|
101
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
102
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/openai-config.d.ts
|
|
104
106
|
type OpenAIHeaders = Record<string, string | undefined>;
|
|
105
107
|
type SerializedOpenAIConfig = Omit<Partial<OpenAIConfig>, 'headers'> & {
|
|
106
|
-
|
|
108
|
+
headers?: (() => OpenAIHeaders) | OpenAIHeaders;
|
|
107
109
|
};
|
|
108
110
|
type OpenAIConfig = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
111
|
+
provider: string;
|
|
112
|
+
baseURL?: string;
|
|
113
|
+
url: (options: {
|
|
114
|
+
modelId: string;
|
|
115
|
+
path: string;
|
|
116
|
+
}) => string;
|
|
117
|
+
headers?: () => OpenAIHeaders;
|
|
118
|
+
fetch?: FetchFunction;
|
|
119
|
+
webSocket?: WebSocketConstructor;
|
|
120
|
+
generateId?: () => string;
|
|
121
|
+
/**
|
|
122
|
+
* Whether Responses API message input items must include an explicit
|
|
123
|
+
* `type: 'message'` discriminator.
|
|
124
|
+
*
|
|
125
|
+
* @see https://github.com/vercel/ai/issues/20180
|
|
126
|
+
*/
|
|
127
|
+
explicitMessageItemType?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Whether the provider supports the
|
|
130
|
+
* `web_search_call.action.sources` Responses API include value.
|
|
131
|
+
*
|
|
132
|
+
* Defaults to `true`.
|
|
133
|
+
*/
|
|
134
|
+
supportsWebSearchSourcesInclude?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* This is soft-deprecated. Use provider references (e.g. `{ openai: 'file-abc123' }`)
|
|
137
|
+
* in file part data instead. File ID prefixes used to identify file IDs
|
|
138
|
+
* in Responses API. When undefined, all string file data is treated as
|
|
139
|
+
* base64 content.
|
|
140
|
+
*
|
|
141
|
+
* TODO: remove in v8
|
|
142
|
+
*/
|
|
143
|
+
fileIdPrefixes?: readonly string[];
|
|
142
144
|
};
|
|
143
145
|
declare function prepareOpenAIConfigForWorkflowDeserialize(config: SerializedOpenAIConfig): OpenAIConfig;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/embedding/openai-embedding-model-options.d.ts
|
|
148
|
+
export type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
149
|
+
export declare const openaiEmbeddingModelOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
150
|
+
dimensions?: number | undefined;
|
|
151
|
+
user?: string | undefined;
|
|
149
152
|
}>;
|
|
150
|
-
type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOptions>;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
153
|
+
export type OpenAIEmbeddingModelOptions = InferSchema<typeof openaiEmbeddingModelOptions>;
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/embedding/openai-embedding-model.d.ts
|
|
156
|
+
export declare class OpenAIEmbeddingModel implements EmbeddingModelV4 {
|
|
157
|
+
readonly specificationVersion = "v4";
|
|
158
|
+
readonly modelId: OpenAIEmbeddingModelId;
|
|
159
|
+
readonly maxEmbeddingsPerCall = 2048;
|
|
160
|
+
readonly [EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL] = 300000;
|
|
161
|
+
readonly supportsParallelCalls = true;
|
|
162
|
+
private readonly config;
|
|
163
|
+
static [WORKFLOW_SERIALIZE](model: OpenAIEmbeddingModel): {
|
|
164
|
+
modelId: string;
|
|
165
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
166
|
+
};
|
|
167
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
168
|
+
modelId: OpenAIEmbeddingModelId;
|
|
169
|
+
config: OpenAIConfig;
|
|
170
|
+
}): OpenAIEmbeddingModel;
|
|
171
|
+
get provider(): string;
|
|
172
|
+
constructor(modelId: OpenAIEmbeddingModelId, config: OpenAIConfig);
|
|
173
|
+
doEmbed({ values, headers, abortSignal, providerOptions }: Parameters<EmbeddingModelV4['doEmbed']>[0]): Promise<Awaited<ReturnType<EmbeddingModelV4['doEmbed']>>>;
|
|
170
174
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
declare
|
|
175
|
-
declare function
|
|
176
|
-
declare
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/image/openai-image-model-options.d.ts
|
|
177
|
+
export 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 & {});
|
|
178
|
+
export declare const modelMaxImagesPerCall: Record<OpenAIImageModelId, number>;
|
|
179
|
+
export declare function hasDefaultResponseFormat(modelId: string): boolean;
|
|
180
|
+
export declare function getMaxImagesPerCall(modelId: OpenAIImageModelId): number;
|
|
181
|
+
export declare const openaiImageModelOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
182
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
183
|
+
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
184
|
+
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
185
|
+
outputCompression?: number | undefined;
|
|
186
|
+
user?: string | undefined;
|
|
182
187
|
}>;
|
|
183
|
-
type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
|
|
184
|
-
declare const openaiImageModelGenerationOptions:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
export type OpenAIImageModelOptions = InferSchema<typeof openaiImageModelOptions>;
|
|
189
|
+
export declare const openaiImageModelGenerationOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
190
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
191
|
+
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
192
|
+
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
193
|
+
outputCompression?: number | undefined;
|
|
194
|
+
user?: string | undefined;
|
|
195
|
+
style?: "vivid" | "natural" | undefined;
|
|
196
|
+
moderation?: "low" | "auto" | undefined;
|
|
192
197
|
}>;
|
|
193
|
-
type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
194
|
-
declare const openaiImageModelEditOptions:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
export type OpenAIImageModelGenerationOptions = InferSchema<typeof openaiImageModelGenerationOptions>;
|
|
199
|
+
export declare const openaiImageModelEditOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
200
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | "standard" | "hd" | undefined;
|
|
201
|
+
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
202
|
+
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
203
|
+
outputCompression?: number | undefined;
|
|
204
|
+
user?: string | undefined;
|
|
205
|
+
inputFidelity?: "low" | "high" | undefined;
|
|
201
206
|
}>;
|
|
202
|
-
type OpenAIImageModelEditOptions = InferSchema<typeof openaiImageModelEditOptions>;
|
|
203
|
-
|
|
207
|
+
export type OpenAIImageModelEditOptions = InferSchema<typeof openaiImageModelEditOptions>;
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/image/openai-image-model.d.ts
|
|
204
210
|
interface OpenAIImageModelConfig extends OpenAIConfig {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
imageInputCapabilities?: {
|
|
212
|
+
supportsFileInputs: boolean | undefined;
|
|
213
|
+
supportsMaskInputs: boolean | undefined;
|
|
214
|
+
};
|
|
215
|
+
_internal?: {
|
|
216
|
+
currentDate?: () => Date;
|
|
217
|
+
};
|
|
212
218
|
}
|
|
213
|
-
declare class OpenAIImageModel implements ImageModelV4 {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
export declare class OpenAIImageModel implements ImageModelV4 {
|
|
220
|
+
readonly modelId: OpenAIImageModelId;
|
|
221
|
+
private readonly config;
|
|
222
|
+
readonly specificationVersion = "v4";
|
|
223
|
+
static [WORKFLOW_SERIALIZE](model: OpenAIImageModel): {
|
|
224
|
+
modelId: string;
|
|
225
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
226
|
+
};
|
|
227
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
228
|
+
modelId: OpenAIImageModelId;
|
|
229
|
+
config: OpenAIImageModelConfig;
|
|
230
|
+
}): OpenAIImageModel;
|
|
231
|
+
get maxImagesPerCall(): number;
|
|
232
|
+
get supportsFileInputs(): boolean | undefined;
|
|
233
|
+
get supportsMaskInputs(): boolean | undefined;
|
|
234
|
+
get provider(): string;
|
|
235
|
+
constructor(modelId: OpenAIImageModelId, config: OpenAIImageModelConfig);
|
|
236
|
+
doGenerate({ prompt, files, mask, n, size, aspectRatio, seed, providerOptions, headers, abortSignal }: Parameters<ImageModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>>;
|
|
231
237
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/transcription/openai-transcription-model-options.d.ts
|
|
240
|
+
export type OpenAITranscriptionModelId = 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-4o-mini-transcribe-2025-03-20' | 'gpt-4o-mini-transcribe-2025-12-15' | 'gpt-4o-transcribe' | 'gpt-4o-transcribe-diarize' | 'gpt-realtime-whisper' | (string & {});
|
|
241
|
+
export declare const openAITranscriptionModelOptions: import("@ai-sdk/provider-utils").LazySchema<{
|
|
242
|
+
include?: string[] | undefined;
|
|
243
|
+
language?: string | undefined;
|
|
244
|
+
prompt?: string | undefined;
|
|
245
|
+
temperature?: number | undefined;
|
|
246
|
+
timestampGranularities?: ("word" | "segment")[] | undefined;
|
|
247
|
+
responseFormat?: "json" | "verbose_json" | "diarized_json" | undefined;
|
|
248
|
+
chunkingStrategy?: "auto" | {
|
|
249
|
+
type: "server_vad";
|
|
250
|
+
threshold?: number | undefined;
|
|
251
|
+
prefixPaddingMs?: number | undefined;
|
|
252
|
+
silenceDurationMs?: number | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
streaming?: {
|
|
255
|
+
delay?: "low" | "medium" | "high" | "minimal" | "xhigh" | undefined;
|
|
235
256
|
include?: string[] | undefined;
|
|
236
|
-
|
|
237
|
-
prompt?: string | undefined;
|
|
238
|
-
temperature?: number | undefined;
|
|
239
|
-
timestampGranularities?: ("word" | "segment")[] | undefined;
|
|
240
|
-
responseFormat?: "json" | "verbose_json" | "diarized_json" | undefined;
|
|
241
|
-
chunkingStrategy?: "auto" | {
|
|
242
|
-
type: "server_vad";
|
|
243
|
-
threshold?: number | undefined;
|
|
244
|
-
prefixPaddingMs?: number | undefined;
|
|
245
|
-
silenceDurationMs?: number | undefined;
|
|
246
|
-
} | undefined;
|
|
247
|
-
streaming?: {
|
|
248
|
-
delay?: "low" | "medium" | "high" | "xhigh" | "minimal" | undefined;
|
|
249
|
-
include?: string[] | undefined;
|
|
250
|
-
} | undefined;
|
|
257
|
+
} | undefined;
|
|
251
258
|
}>;
|
|
252
|
-
type OpenAITranscriptionModelOptions = InferSchema<typeof openAITranscriptionModelOptions>;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
259
|
+
export type OpenAITranscriptionModelOptions = InferSchema<typeof openAITranscriptionModelOptions>;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/transcription/openai-transcription-model.d.ts
|
|
262
|
+
export type OpenAITranscriptionCallOptions = Omit<TranscriptionModelV4CallOptions, 'providerOptions'> & {
|
|
263
|
+
providerOptions?: {
|
|
264
|
+
openai?: OpenAITranscriptionModelOptions;
|
|
265
|
+
};
|
|
258
266
|
};
|
|
259
|
-
type OpenAITranscriptionStreamOptions = Omit<Experimental_TranscriptionModelV4StreamOptions, 'providerOptions'> & {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
267
|
+
export type OpenAITranscriptionStreamOptions = Omit<Experimental_TranscriptionModelV4StreamOptions, 'providerOptions'> & {
|
|
268
|
+
providerOptions?: {
|
|
269
|
+
openai?: OpenAITranscriptionModelOptions;
|
|
270
|
+
};
|
|
263
271
|
};
|
|
264
272
|
interface OpenAITranscriptionModelConfig extends OpenAIConfig {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
273
|
+
_internal?: {
|
|
274
|
+
currentDate?: () => Date;
|
|
275
|
+
};
|
|
268
276
|
}
|
|
269
|
-
declare class OpenAITranscriptionModel implements TranscriptionModelV4 {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
277
|
+
export declare class OpenAITranscriptionModel implements TranscriptionModelV4 {
|
|
278
|
+
readonly modelId: OpenAITranscriptionModelId;
|
|
279
|
+
private readonly config;
|
|
280
|
+
readonly specificationVersion = "v4";
|
|
281
|
+
static [WORKFLOW_SERIALIZE](model: OpenAITranscriptionModel): {
|
|
282
|
+
modelId: string;
|
|
283
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
284
|
+
};
|
|
285
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
286
|
+
modelId: OpenAITranscriptionModelId;
|
|
287
|
+
config: OpenAITranscriptionModelConfig;
|
|
288
|
+
}): OpenAITranscriptionModel;
|
|
289
|
+
get provider(): string;
|
|
290
|
+
constructor(modelId: OpenAITranscriptionModelId, config: OpenAITranscriptionModelConfig);
|
|
291
|
+
private getArgs;
|
|
292
|
+
doGenerate(options: OpenAITranscriptionCallOptions): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
|
|
293
|
+
doStream(options: OpenAITranscriptionStreamOptions): Promise<Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>>;
|
|
286
294
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/speech/openai-speech-model-options.d.ts
|
|
297
|
+
export type OpenAISpeechModelId = 'tts-1' | 'tts-1-1106' | 'tts-1-hd' | 'tts-1-hd-1106' | 'gpt-4o-mini-tts' | 'gpt-4o-mini-tts-2025-03-20' | 'gpt-4o-mini-tts-2025-12-15' | (string & {});
|
|
298
|
+
export declare const openaiSpeechModelOptionsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
299
|
+
instructions?: string | null | undefined;
|
|
300
|
+
speed?: number | null | undefined;
|
|
292
301
|
}>;
|
|
293
|
-
type OpenAISpeechModelOptions = InferSchema<typeof openaiSpeechModelOptionsSchema>;
|
|
294
|
-
|
|
302
|
+
export type OpenAISpeechModelOptions = InferSchema<typeof openaiSpeechModelOptionsSchema>;
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/speech/openai-speech-model.d.ts
|
|
295
305
|
interface OpenAISpeechModelConfig extends OpenAIConfig {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
306
|
+
_internal?: {
|
|
307
|
+
currentDate?: () => Date;
|
|
308
|
+
};
|
|
299
309
|
}
|
|
300
|
-
declare class OpenAISpeechModel implements SpeechModelV4 {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
export declare class OpenAISpeechModel implements SpeechModelV4 {
|
|
311
|
+
readonly modelId: OpenAISpeechModelId;
|
|
312
|
+
private readonly config;
|
|
313
|
+
readonly specificationVersion = "v4";
|
|
314
|
+
static [WORKFLOW_SERIALIZE](model: OpenAISpeechModel): {
|
|
315
|
+
modelId: string;
|
|
316
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
317
|
+
};
|
|
318
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
319
|
+
modelId: OpenAISpeechModelId;
|
|
320
|
+
config: OpenAISpeechModelConfig;
|
|
321
|
+
}): OpenAISpeechModel;
|
|
322
|
+
get provider(): string;
|
|
323
|
+
constructor(modelId: OpenAISpeechModelId, config: OpenAISpeechModelConfig);
|
|
324
|
+
private getArgs;
|
|
325
|
+
doGenerate(options: Parameters<SpeechModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV4['doGenerate']>>>;
|
|
316
326
|
}
|
|
317
|
-
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/responses/openai-responses-api.d.ts
|
|
318
329
|
declare const openaiResponsesComputerCallSchema: z.ZodObject<{
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
330
|
+
type: z.ZodLiteral<"computer_call">;
|
|
331
|
+
id: z.ZodString;
|
|
332
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
status: z.ZodEnum<{
|
|
334
|
+
completed: "completed";
|
|
335
|
+
incomplete: "incomplete";
|
|
336
|
+
in_progress: "in_progress";
|
|
337
|
+
}>;
|
|
338
|
+
action: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
339
|
+
type: z.ZodLiteral<"click">;
|
|
340
|
+
button: z.ZodEnum<{
|
|
341
|
+
left: "left";
|
|
342
|
+
right: "right";
|
|
343
|
+
wheel: "wheel";
|
|
344
|
+
back: "back";
|
|
345
|
+
forward: "forward";
|
|
346
|
+
}>;
|
|
347
|
+
x: z.ZodNumber;
|
|
348
|
+
y: z.ZodNumber;
|
|
349
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"double_click">;
|
|
352
|
+
x: z.ZodNumber;
|
|
353
|
+
y: z.ZodNumber;
|
|
354
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
355
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"drag">;
|
|
357
|
+
path: z.ZodArray<z.ZodObject<{
|
|
358
|
+
x: z.ZodNumber;
|
|
359
|
+
y: z.ZodNumber;
|
|
360
|
+
}, z.core.$strip>>;
|
|
361
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"keypress">;
|
|
364
|
+
keys: z.ZodArray<z.ZodString>;
|
|
365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
366
|
+
type: z.ZodLiteral<"move">;
|
|
367
|
+
x: z.ZodNumber;
|
|
368
|
+
y: z.ZodNumber;
|
|
369
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
type: z.ZodLiteral<"screenshot">;
|
|
372
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
373
|
+
type: z.ZodLiteral<"scroll">;
|
|
374
|
+
x: z.ZodNumber;
|
|
375
|
+
y: z.ZodNumber;
|
|
376
|
+
scroll_x: z.ZodNumber;
|
|
377
|
+
scroll_y: z.ZodNumber;
|
|
378
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
379
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
380
|
+
type: z.ZodLiteral<"type">;
|
|
381
|
+
text: z.ZodString;
|
|
382
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
383
|
+
type: z.ZodLiteral<"wait">;
|
|
384
|
+
}, z.core.$strip>]>>>;
|
|
385
|
+
actions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
386
|
+
type: z.ZodLiteral<"click">;
|
|
387
|
+
button: z.ZodEnum<{
|
|
388
|
+
left: "left";
|
|
389
|
+
right: "right";
|
|
390
|
+
wheel: "wheel";
|
|
391
|
+
back: "back";
|
|
392
|
+
forward: "forward";
|
|
326
393
|
}>;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
text: z.ZodString;
|
|
371
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
372
|
-
type: z.ZodLiteral<"wait">;
|
|
373
|
-
}, z.core.$strip>]>>>;
|
|
374
|
-
actions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
375
|
-
type: z.ZodLiteral<"click">;
|
|
376
|
-
button: z.ZodEnum<{
|
|
377
|
-
left: "left";
|
|
378
|
-
right: "right";
|
|
379
|
-
wheel: "wheel";
|
|
380
|
-
back: "back";
|
|
381
|
-
forward: "forward";
|
|
382
|
-
}>;
|
|
383
|
-
x: z.ZodNumber;
|
|
384
|
-
y: z.ZodNumber;
|
|
385
|
-
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
386
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
387
|
-
type: z.ZodLiteral<"double_click">;
|
|
388
|
-
x: z.ZodNumber;
|
|
389
|
-
y: z.ZodNumber;
|
|
390
|
-
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
391
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
392
|
-
type: z.ZodLiteral<"drag">;
|
|
393
|
-
path: z.ZodArray<z.ZodObject<{
|
|
394
|
-
x: z.ZodNumber;
|
|
395
|
-
y: z.ZodNumber;
|
|
396
|
-
}, z.core.$strip>>;
|
|
397
|
-
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
398
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
399
|
-
type: z.ZodLiteral<"keypress">;
|
|
400
|
-
keys: z.ZodArray<z.ZodString>;
|
|
401
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
402
|
-
type: z.ZodLiteral<"move">;
|
|
403
|
-
x: z.ZodNumber;
|
|
404
|
-
y: z.ZodNumber;
|
|
405
|
-
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
406
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
-
type: z.ZodLiteral<"screenshot">;
|
|
408
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
409
|
-
type: z.ZodLiteral<"scroll">;
|
|
410
|
-
x: z.ZodNumber;
|
|
411
|
-
y: z.ZodNumber;
|
|
412
|
-
scroll_x: z.ZodNumber;
|
|
413
|
-
scroll_y: z.ZodNumber;
|
|
414
|
-
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
415
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
416
|
-
type: z.ZodLiteral<"type">;
|
|
417
|
-
text: z.ZodString;
|
|
418
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
419
|
-
type: z.ZodLiteral<"wait">;
|
|
420
|
-
}, z.core.$strip>]>>>>;
|
|
421
|
-
pending_safety_checks: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
422
|
-
id: z.ZodString;
|
|
423
|
-
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
|
-
}, z.core.$strip>>>>;
|
|
394
|
+
x: z.ZodNumber;
|
|
395
|
+
y: z.ZodNumber;
|
|
396
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
397
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
398
|
+
type: z.ZodLiteral<"double_click">;
|
|
399
|
+
x: z.ZodNumber;
|
|
400
|
+
y: z.ZodNumber;
|
|
401
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
402
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
403
|
+
type: z.ZodLiteral<"drag">;
|
|
404
|
+
path: z.ZodArray<z.ZodObject<{
|
|
405
|
+
x: z.ZodNumber;
|
|
406
|
+
y: z.ZodNumber;
|
|
407
|
+
}, z.core.$strip>>;
|
|
408
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
409
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
410
|
+
type: z.ZodLiteral<"keypress">;
|
|
411
|
+
keys: z.ZodArray<z.ZodString>;
|
|
412
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
413
|
+
type: z.ZodLiteral<"move">;
|
|
414
|
+
x: z.ZodNumber;
|
|
415
|
+
y: z.ZodNumber;
|
|
416
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
417
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
418
|
+
type: z.ZodLiteral<"screenshot">;
|
|
419
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
420
|
+
type: z.ZodLiteral<"scroll">;
|
|
421
|
+
x: z.ZodNumber;
|
|
422
|
+
y: z.ZodNumber;
|
|
423
|
+
scroll_x: z.ZodNumber;
|
|
424
|
+
scroll_y: z.ZodNumber;
|
|
425
|
+
keys: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
426
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
427
|
+
type: z.ZodLiteral<"type">;
|
|
428
|
+
text: z.ZodString;
|
|
429
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
430
|
+
type: z.ZodLiteral<"wait">;
|
|
431
|
+
}, z.core.$strip>]>>>>;
|
|
432
|
+
pending_safety_checks: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
433
|
+
id: z.ZodString;
|
|
434
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
435
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
436
|
+
}, z.core.$strip>>>>;
|
|
426
437
|
}, z.core.$strip>;
|
|
427
438
|
declare const openaiResponsesLocalShellCallSchema: z.ZodObject<{
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
+
type: z.ZodLiteral<"local_shell_call">;
|
|
440
|
+
id: z.ZodString;
|
|
441
|
+
call_id: z.ZodString;
|
|
442
|
+
action: z.ZodObject<{
|
|
443
|
+
type: z.ZodLiteral<"exec">;
|
|
444
|
+
command: z.ZodArray<z.ZodString>;
|
|
445
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
446
|
+
user: z.ZodOptional<z.ZodString>;
|
|
447
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
448
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
449
|
+
}, z.core.$strip>;
|
|
439
450
|
}, z.core.$strip>;
|
|
440
451
|
type OpenAIResponsesInput = Array<OpenAIResponsesInputItem>;
|
|
441
452
|
type OpenAIResponsesInputItem = OpenAIResponsesSystemMessage | OpenAIResponsesUserMessage | OpenAIResponsesAssistantMessage | OpenAIResponsesFunctionCall | OpenAIResponsesFunctionCallOutput | OpenAIResponsesProgram | OpenAIResponsesProgramOutput | OpenAIResponsesCustomToolCall | OpenAIResponsesCustomToolCallOutput | OpenAIResponsesMcpApprovalResponse | OpenAIResponsesComputerCall | OpenAIResponsesComputerCallOutput | OpenAIResponsesLocalShellCall | OpenAIResponsesLocalShellCallOutput | OpenAIResponsesShellCall | OpenAIResponsesShellCallOutput | OpenAIResponsesApplyPatchCall | OpenAIResponsesApplyPatchCallOutput | OpenAIResponsesToolSearchCall | OpenAIResponsesToolSearchOutput | OpenAIResponsesReasoning | OpenAIResponsesItemReference | OpenAIResponsesCompactionItem | OpenAIResponsesConfigurationUpdate | OpenAIResponsesCompactionTrigger;
|
|
442
453
|
type OpenAIResponsesIncludeValue = 'web_search_call.action.sources' | 'web_search_call.results' | 'code_interpreter_call.outputs' | 'computer_call_output.output.image_url' | 'file_search_call.results' | 'message.input_image.image_url' | 'message.output_text.logprobs' | 'reasoning.encrypted_content';
|
|
443
454
|
type OpenAIResponsesIncludeOptions = Array<OpenAIResponsesIncludeValue> | undefined | null;
|
|
444
455
|
type OpenAIResponsesSystemMessage = {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
456
|
+
type?: 'message';
|
|
457
|
+
role: 'system' | 'developer';
|
|
458
|
+
content: string | Array<{
|
|
459
|
+
type: 'input_text';
|
|
460
|
+
text: string;
|
|
461
|
+
prompt_cache_breakpoint?: {
|
|
462
|
+
mode: 'explicit';
|
|
463
|
+
};
|
|
464
|
+
}>;
|
|
454
465
|
};
|
|
455
466
|
type OpenAIResponsesUserMessage = {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
467
|
+
type?: 'message';
|
|
468
|
+
role: 'user';
|
|
469
|
+
content: Array<{
|
|
470
|
+
type: 'input_text';
|
|
471
|
+
text: string;
|
|
472
|
+
prompt_cache_breakpoint?: {
|
|
473
|
+
mode: 'explicit';
|
|
474
|
+
};
|
|
475
|
+
} | {
|
|
476
|
+
type: 'input_image';
|
|
477
|
+
image_url: string;
|
|
478
|
+
prompt_cache_breakpoint?: {
|
|
479
|
+
mode: 'explicit';
|
|
480
|
+
};
|
|
481
|
+
} | {
|
|
482
|
+
type: 'input_image';
|
|
483
|
+
file_id: string;
|
|
484
|
+
prompt_cache_breakpoint?: {
|
|
485
|
+
mode: 'explicit';
|
|
486
|
+
};
|
|
487
|
+
} | {
|
|
488
|
+
type: 'input_file';
|
|
489
|
+
file_url: string;
|
|
490
|
+
prompt_cache_breakpoint?: {
|
|
491
|
+
mode: 'explicit';
|
|
492
|
+
};
|
|
493
|
+
} | {
|
|
494
|
+
type: 'input_file';
|
|
495
|
+
filename: string;
|
|
496
|
+
file_data: string;
|
|
497
|
+
prompt_cache_breakpoint?: {
|
|
498
|
+
mode: 'explicit';
|
|
499
|
+
};
|
|
500
|
+
} | {
|
|
501
|
+
type: 'input_file';
|
|
502
|
+
file_id: string;
|
|
503
|
+
prompt_cache_breakpoint?: {
|
|
504
|
+
mode: 'explicit';
|
|
505
|
+
};
|
|
506
|
+
}>;
|
|
496
507
|
};
|
|
497
508
|
type OpenAIResponsesAssistantMessage = {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
509
|
+
type?: 'message';
|
|
510
|
+
role: 'assistant';
|
|
511
|
+
content: string;
|
|
512
|
+
phase?: 'commentary' | 'final_answer' | null;
|
|
502
513
|
};
|
|
503
514
|
type OpenAIResponsesFunctionCall = {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
515
|
+
type: 'function_call';
|
|
516
|
+
call_id: string;
|
|
517
|
+
name: string;
|
|
518
|
+
arguments: string;
|
|
519
|
+
async?: boolean;
|
|
520
|
+
id?: string;
|
|
521
|
+
namespace?: string;
|
|
522
|
+
caller?: OpenAIResponsesToolCaller;
|
|
512
523
|
};
|
|
513
524
|
type OpenAIResponsesFunctionCallOutput = {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
525
|
+
type: 'function_call_output';
|
|
526
|
+
call_id: string;
|
|
527
|
+
output: string | Array<{
|
|
528
|
+
type: 'input_text';
|
|
529
|
+
text: string;
|
|
530
|
+
prompt_cache_breakpoint?: {
|
|
531
|
+
mode: 'explicit';
|
|
532
|
+
};
|
|
533
|
+
} | {
|
|
534
|
+
type: 'input_image';
|
|
535
|
+
image_url: string;
|
|
536
|
+
prompt_cache_breakpoint?: {
|
|
537
|
+
mode: 'explicit';
|
|
538
|
+
};
|
|
539
|
+
} | {
|
|
540
|
+
type: 'input_image';
|
|
541
|
+
file_id: string;
|
|
542
|
+
prompt_cache_breakpoint?: {
|
|
543
|
+
mode: 'explicit';
|
|
544
|
+
};
|
|
545
|
+
} | {
|
|
546
|
+
type: 'input_file';
|
|
547
|
+
filename: string;
|
|
548
|
+
file_data: string;
|
|
549
|
+
prompt_cache_breakpoint?: {
|
|
550
|
+
mode: 'explicit';
|
|
551
|
+
};
|
|
552
|
+
} | {
|
|
553
|
+
type: 'input_file';
|
|
554
|
+
file_url: string;
|
|
555
|
+
prompt_cache_breakpoint?: {
|
|
556
|
+
mode: 'explicit';
|
|
557
|
+
};
|
|
558
|
+
} | {
|
|
559
|
+
type: 'input_file';
|
|
560
|
+
file_id: string;
|
|
561
|
+
prompt_cache_breakpoint?: {
|
|
562
|
+
mode: 'explicit';
|
|
563
|
+
};
|
|
564
|
+
}>;
|
|
565
|
+
caller?: OpenAIResponsesToolCaller;
|
|
555
566
|
};
|
|
556
567
|
type OpenAIResponsesToolCaller = {
|
|
557
|
-
|
|
568
|
+
type: 'direct';
|
|
558
569
|
} | {
|
|
559
|
-
|
|
560
|
-
|
|
570
|
+
type: 'program';
|
|
571
|
+
caller_id: string;
|
|
561
572
|
};
|
|
562
573
|
type OpenAIResponsesProgram = {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
574
|
+
type: 'program';
|
|
575
|
+
id: string;
|
|
576
|
+
call_id: string;
|
|
577
|
+
code: string;
|
|
578
|
+
fingerprint: string;
|
|
568
579
|
};
|
|
569
580
|
type OpenAIResponsesProgramOutput = {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
581
|
+
type: 'program_output';
|
|
582
|
+
id: string;
|
|
583
|
+
call_id: string;
|
|
584
|
+
result: string;
|
|
585
|
+
status: 'completed' | 'incomplete';
|
|
575
586
|
};
|
|
576
587
|
type OpenAIResponsesCustomToolCall = {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
588
|
+
type: 'custom_tool_call';
|
|
589
|
+
id?: string;
|
|
590
|
+
call_id: string;
|
|
591
|
+
name: string;
|
|
592
|
+
input: string;
|
|
593
|
+
async?: boolean;
|
|
583
594
|
};
|
|
584
595
|
type OpenAIResponsesCustomToolCallOutput = {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
596
|
+
type: 'custom_tool_call_output';
|
|
597
|
+
call_id: string;
|
|
598
|
+
output: OpenAIResponsesFunctionCallOutput['output'];
|
|
588
599
|
};
|
|
589
600
|
type OpenAIResponsesMcpApprovalResponse = {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
601
|
+
type: 'mcp_approval_response';
|
|
602
|
+
approval_request_id: string;
|
|
603
|
+
approve: boolean;
|
|
593
604
|
};
|
|
594
605
|
type OpenAIResponsesComputerCall = InferSchema<typeof openaiResponsesComputerCallSchema>;
|
|
595
606
|
type OpenAIResponsesComputerCallOutput = {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
type: 'computer_call_output';
|
|
608
|
+
call_id: string;
|
|
609
|
+
output: {
|
|
610
|
+
type: 'computer_screenshot';
|
|
611
|
+
image_url?: string;
|
|
612
|
+
file_id?: string;
|
|
613
|
+
detail?: 'auto' | 'low' | 'high' | 'original';
|
|
614
|
+
};
|
|
615
|
+
acknowledged_safety_checks?: Array<{
|
|
616
|
+
id: string;
|
|
617
|
+
code?: string;
|
|
618
|
+
message?: string;
|
|
619
|
+
}>;
|
|
609
620
|
};
|
|
610
621
|
type OpenAIResponsesLocalShellCall = InferSchema<typeof openaiResponsesLocalShellCallSchema>;
|
|
611
622
|
type OpenAIResponsesLocalShellCallOutput = {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
623
|
+
type: 'local_shell_call_output';
|
|
624
|
+
call_id: string;
|
|
625
|
+
output: string;
|
|
615
626
|
};
|
|
616
627
|
/**
|
|
617
628
|
* Official OpenAI API Specifications: https://platform.openai.com/docs/api-reference/responses/object#responses-object-output-shell_tool_call
|
|
618
629
|
*/
|
|
619
630
|
type OpenAIResponsesShellCall = {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
631
|
+
type: 'shell_call';
|
|
632
|
+
id: string;
|
|
633
|
+
call_id: string;
|
|
634
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
635
|
+
action: {
|
|
636
|
+
commands: string[];
|
|
637
|
+
timeout_ms?: number;
|
|
638
|
+
max_output_length?: number;
|
|
639
|
+
};
|
|
629
640
|
};
|
|
630
641
|
type OpenAIResponsesShellCallOutput = {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
642
|
+
type: 'shell_call_output';
|
|
643
|
+
id?: string;
|
|
644
|
+
call_id: string;
|
|
645
|
+
status?: 'in_progress' | 'completed' | 'incomplete';
|
|
646
|
+
max_output_length?: number | null;
|
|
647
|
+
output: Array<{
|
|
648
|
+
stdout: string;
|
|
649
|
+
stderr: string;
|
|
650
|
+
outcome: {
|
|
651
|
+
type: 'timeout';
|
|
652
|
+
} | {
|
|
653
|
+
type: 'exit';
|
|
654
|
+
exit_code: number;
|
|
655
|
+
};
|
|
656
|
+
}>;
|
|
646
657
|
};
|
|
647
658
|
type OpenAIResponsesApplyPatchCall = {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
659
|
+
type: 'apply_patch_call';
|
|
660
|
+
id?: string;
|
|
661
|
+
call_id: string;
|
|
662
|
+
status: 'in_progress' | 'completed';
|
|
663
|
+
operation: {
|
|
664
|
+
type: 'create_file';
|
|
665
|
+
path: string;
|
|
666
|
+
diff: string;
|
|
667
|
+
} | {
|
|
668
|
+
type: 'delete_file';
|
|
669
|
+
path: string;
|
|
670
|
+
} | {
|
|
671
|
+
type: 'update_file';
|
|
672
|
+
path: string;
|
|
673
|
+
diff: string;
|
|
674
|
+
};
|
|
664
675
|
};
|
|
665
676
|
type OpenAIResponsesApplyPatchCallOutput = {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
677
|
+
type: 'apply_patch_call_output';
|
|
678
|
+
call_id: string;
|
|
679
|
+
status: 'completed' | 'failed';
|
|
680
|
+
output?: string;
|
|
670
681
|
};
|
|
671
682
|
type OpenAIResponsesToolSearchCall = {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
683
|
+
type: 'tool_search_call';
|
|
684
|
+
id: string;
|
|
685
|
+
execution: 'server' | 'client';
|
|
686
|
+
call_id: string | null;
|
|
687
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
688
|
+
arguments: unknown;
|
|
678
689
|
};
|
|
679
690
|
type OpenAIResponsesToolSearchOutput = {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
691
|
+
type: 'tool_search_output';
|
|
692
|
+
id?: string;
|
|
693
|
+
execution: 'server' | 'client';
|
|
694
|
+
call_id: string | null;
|
|
695
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
696
|
+
tools: Array<JSONObject>;
|
|
686
697
|
};
|
|
687
698
|
type OpenAIResponsesItemReference = {
|
|
688
|
-
|
|
689
|
-
|
|
699
|
+
type: 'item_reference';
|
|
700
|
+
id: string;
|
|
690
701
|
};
|
|
691
702
|
type OpenAIResponsesCompactionItem = {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
703
|
+
type: 'compaction';
|
|
704
|
+
id: string;
|
|
705
|
+
encrypted_content: string;
|
|
695
706
|
};
|
|
696
707
|
type OpenAIResponsesConfigurationUpdate = {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
708
|
+
type: 'configuration_update';
|
|
709
|
+
reasoning: {
|
|
710
|
+
effort: 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
711
|
+
};
|
|
701
712
|
};
|
|
702
713
|
type OpenAIResponsesCompactionTrigger = {
|
|
703
|
-
|
|
714
|
+
type: 'compaction_trigger';
|
|
704
715
|
};
|
|
705
716
|
/**
|
|
706
717
|
* A filter used to compare a specified attribute key to a given value using a defined comparison operation.
|
|
707
718
|
*/
|
|
708
719
|
type OpenAIResponsesFileSearchToolComparisonFilter = {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
720
|
+
/**
|
|
721
|
+
* The key to compare against the value.
|
|
722
|
+
*/
|
|
723
|
+
key: string;
|
|
724
|
+
/**
|
|
725
|
+
* Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.
|
|
726
|
+
*/
|
|
727
|
+
type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin';
|
|
728
|
+
/**
|
|
729
|
+
* The value to compare against the attribute key; supports string, number, boolean, or array of string types.
|
|
730
|
+
*/
|
|
731
|
+
value: string | number | boolean | string[];
|
|
721
732
|
};
|
|
722
733
|
/**
|
|
723
734
|
* Combine multiple filters using and or or.
|
|
724
735
|
*/
|
|
725
736
|
type OpenAIResponsesFileSearchToolCompoundFilter = {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
737
|
+
/**
|
|
738
|
+
* Type of operation: and or or.
|
|
739
|
+
*/
|
|
740
|
+
type: 'and' | 'or';
|
|
741
|
+
/**
|
|
742
|
+
* Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.
|
|
743
|
+
*/
|
|
744
|
+
filters: Array<OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter>;
|
|
734
745
|
};
|
|
735
746
|
type OpenAIResponsesFunctionTool = {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
747
|
+
type: 'function';
|
|
748
|
+
name: string;
|
|
749
|
+
description: string | undefined;
|
|
750
|
+
parameters: JSONSchema7;
|
|
751
|
+
async?: boolean;
|
|
752
|
+
strict?: boolean;
|
|
753
|
+
defer_loading?: boolean;
|
|
754
|
+
allowed_callers?: Array<'direct' | 'programmatic'>;
|
|
755
|
+
output_schema?: JSONSchema7;
|
|
745
756
|
};
|
|
746
757
|
/**
|
|
747
758
|
* Entry in `tool_choice.allowed_tools.tools`. OpenAI identifies most built-in
|
|
748
759
|
* tools by type alone; only `function`, `custom` and `mcp` carry an identifier.
|
|
749
760
|
*/
|
|
750
761
|
type OpenAIResponsesAllowedTool = {
|
|
751
|
-
|
|
752
|
-
|
|
762
|
+
type: 'function';
|
|
763
|
+
name: string;
|
|
753
764
|
} | {
|
|
754
|
-
|
|
755
|
-
|
|
765
|
+
type: 'custom';
|
|
766
|
+
name: string;
|
|
756
767
|
} | {
|
|
757
|
-
|
|
758
|
-
|
|
768
|
+
type: 'mcp';
|
|
769
|
+
server_label: string;
|
|
759
770
|
} | {
|
|
760
|
-
|
|
771
|
+
type: Exclude<OpenAIResponsesTool['type'], 'function' | 'custom' | 'mcp' | 'namespace' | 'tool_search'>;
|
|
761
772
|
};
|
|
762
773
|
type OpenAIResponsesTool = OpenAIResponsesFunctionTool | {
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
774
|
+
type: 'namespace';
|
|
775
|
+
name: string;
|
|
776
|
+
description: string;
|
|
777
|
+
tools: Array<OpenAIResponsesFunctionTool>;
|
|
767
778
|
} | {
|
|
768
|
-
|
|
779
|
+
type: 'apply_patch';
|
|
769
780
|
} | {
|
|
770
|
-
|
|
781
|
+
type: 'computer';
|
|
771
782
|
} | {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
783
|
+
type: 'web_search';
|
|
784
|
+
external_web_access: boolean | undefined;
|
|
785
|
+
filters: {
|
|
786
|
+
allowed_domains: string[] | undefined;
|
|
787
|
+
blocked_domains: string[] | undefined;
|
|
788
|
+
} | undefined;
|
|
789
|
+
search_context_size: 'low' | 'medium' | 'high' | undefined;
|
|
790
|
+
user_location: {
|
|
791
|
+
type: 'approximate';
|
|
792
|
+
city?: string;
|
|
793
|
+
country?: string;
|
|
794
|
+
region?: string;
|
|
795
|
+
timezone?: string;
|
|
796
|
+
} | undefined;
|
|
786
797
|
} | {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
798
|
+
type: 'web_search_preview';
|
|
799
|
+
search_context_size: 'low' | 'medium' | 'high' | undefined;
|
|
800
|
+
user_location: {
|
|
801
|
+
type: 'approximate';
|
|
802
|
+
city?: string;
|
|
803
|
+
country?: string;
|
|
804
|
+
region?: string;
|
|
805
|
+
timezone?: string;
|
|
806
|
+
} | undefined;
|
|
796
807
|
} | {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
808
|
+
type: 'code_interpreter';
|
|
809
|
+
container: string | {
|
|
810
|
+
type: 'auto';
|
|
811
|
+
file_ids: string[] | undefined;
|
|
812
|
+
};
|
|
802
813
|
} | {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
814
|
+
type: 'file_search';
|
|
815
|
+
vector_store_ids: string[];
|
|
816
|
+
max_num_results: number | undefined;
|
|
817
|
+
ranking_options: {
|
|
818
|
+
ranker?: string;
|
|
819
|
+
score_threshold?: number;
|
|
820
|
+
} | undefined;
|
|
821
|
+
filters: OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter | undefined;
|
|
811
822
|
} | {
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
}
|
|
823
|
+
type: 'image_generation';
|
|
824
|
+
action: 'generate' | 'edit' | 'auto' | undefined;
|
|
825
|
+
background: 'auto' | 'opaque' | 'transparent' | undefined;
|
|
826
|
+
input_fidelity: 'low' | 'high' | undefined;
|
|
827
|
+
input_image_mask: {
|
|
828
|
+
file_id: string | undefined;
|
|
829
|
+
image_url: string | undefined;
|
|
830
|
+
} | undefined;
|
|
831
|
+
model: string | undefined;
|
|
832
|
+
moderation: 'auto' | 'low' | undefined;
|
|
833
|
+
output_compression: number | undefined;
|
|
834
|
+
output_format: 'png' | 'jpeg' | 'webp' | undefined;
|
|
835
|
+
partial_images: number | undefined;
|
|
836
|
+
quality: 'auto' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | undefined;
|
|
837
|
+
size: 'auto' | '1024x1024' | '1024x1536' | '1536x1024' | (string & {}) | undefined;
|
|
838
|
+
} |
|
|
828
839
|
/**
|
|
829
840
|
* Official OpenAI API Specifications: https://platform.openai.com/docs/api-reference/responses/create#responses_create-tools-mcp_tool
|
|
830
841
|
*/
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
};
|
|
845
|
-
} | undefined;
|
|
846
|
-
server_description: string | undefined;
|
|
847
|
-
server_url: string | undefined;
|
|
848
|
-
} | {
|
|
849
|
-
type: 'custom';
|
|
850
|
-
name: string;
|
|
851
|
-
description?: string;
|
|
852
|
-
async?: boolean;
|
|
853
|
-
format?: {
|
|
854
|
-
type: 'grammar';
|
|
855
|
-
syntax: 'regex' | 'lark';
|
|
856
|
-
definition: string;
|
|
857
|
-
} | {
|
|
858
|
-
type: 'text';
|
|
842
|
+
{
|
|
843
|
+
type: 'mcp';
|
|
844
|
+
server_label: string;
|
|
845
|
+
allowed_tools: string[] | {
|
|
846
|
+
read_only?: boolean;
|
|
847
|
+
tool_names?: string[];
|
|
848
|
+
} | undefined;
|
|
849
|
+
authorization: string | undefined;
|
|
850
|
+
connector_id: string | undefined;
|
|
851
|
+
headers: Record<string, string> | undefined;
|
|
852
|
+
require_approval: 'always' | 'never' | {
|
|
853
|
+
never?: {
|
|
854
|
+
tool_names?: string[];
|
|
859
855
|
};
|
|
856
|
+
} | undefined;
|
|
857
|
+
server_description: string | undefined;
|
|
858
|
+
server_url: string | undefined;
|
|
860
859
|
} | {
|
|
861
|
-
|
|
860
|
+
type: 'custom';
|
|
861
|
+
name: string;
|
|
862
|
+
description?: string;
|
|
863
|
+
async?: boolean;
|
|
864
|
+
format?: {
|
|
865
|
+
type: 'grammar';
|
|
866
|
+
syntax: 'regex' | 'lark';
|
|
867
|
+
definition: string;
|
|
868
|
+
} | {
|
|
869
|
+
type: 'text';
|
|
870
|
+
};
|
|
862
871
|
} | {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
type: 'skill_reference';
|
|
881
|
-
skill_id: string;
|
|
882
|
-
version?: string;
|
|
883
|
-
} | {
|
|
884
|
-
type: 'inline';
|
|
885
|
-
name: string;
|
|
886
|
-
description: string;
|
|
887
|
-
source: {
|
|
888
|
-
type: 'base64';
|
|
889
|
-
media_type: 'application/zip';
|
|
890
|
-
data: string;
|
|
891
|
-
};
|
|
892
|
-
}>;
|
|
893
|
-
} | {
|
|
894
|
-
type: 'container_reference';
|
|
895
|
-
container_id: string;
|
|
896
|
-
} | {
|
|
897
|
-
type: 'local';
|
|
898
|
-
skills?: Array<{
|
|
899
|
-
name: string;
|
|
900
|
-
description: string;
|
|
901
|
-
path: string;
|
|
902
|
-
}>;
|
|
872
|
+
type: 'local_shell';
|
|
873
|
+
} | {
|
|
874
|
+
type: 'shell';
|
|
875
|
+
environment?: {
|
|
876
|
+
type: 'container_auto';
|
|
877
|
+
file_ids?: string[];
|
|
878
|
+
memory_limit?: '1g' | '4g' | '16g' | '64g';
|
|
879
|
+
network_policy?: {
|
|
880
|
+
type: 'disabled';
|
|
881
|
+
} | {
|
|
882
|
+
type: 'allowlist';
|
|
883
|
+
allowed_domains: string[];
|
|
884
|
+
domain_secrets?: Array<{
|
|
885
|
+
domain: string;
|
|
886
|
+
name: string;
|
|
887
|
+
value: string;
|
|
888
|
+
}>;
|
|
903
889
|
};
|
|
890
|
+
skills?: Array<{
|
|
891
|
+
type: 'skill_reference';
|
|
892
|
+
skill_id: string;
|
|
893
|
+
version?: string;
|
|
894
|
+
} | {
|
|
895
|
+
type: 'inline';
|
|
896
|
+
name: string;
|
|
897
|
+
description: string;
|
|
898
|
+
source: {
|
|
899
|
+
type: 'base64';
|
|
900
|
+
media_type: 'application/zip';
|
|
901
|
+
data: string;
|
|
902
|
+
};
|
|
903
|
+
}>;
|
|
904
|
+
} | {
|
|
905
|
+
type: 'container_reference';
|
|
906
|
+
container_id: string;
|
|
907
|
+
} | {
|
|
908
|
+
type: 'local';
|
|
909
|
+
skills?: Array<{
|
|
910
|
+
name: string;
|
|
911
|
+
description: string;
|
|
912
|
+
path: string;
|
|
913
|
+
}>;
|
|
914
|
+
};
|
|
904
915
|
} | {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
916
|
+
type: 'tool_search';
|
|
917
|
+
execution?: 'server' | 'client';
|
|
918
|
+
description?: string;
|
|
919
|
+
parameters?: Record<string, unknown>;
|
|
909
920
|
} | {
|
|
910
|
-
|
|
921
|
+
type: 'programmatic_tool_calling';
|
|
911
922
|
};
|
|
912
923
|
type OpenAIResponsesReasoning = {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
924
|
+
type: 'reasoning';
|
|
925
|
+
id?: string;
|
|
926
|
+
encrypted_content?: string | null;
|
|
927
|
+
summary: Array<{
|
|
928
|
+
type: 'summary_text';
|
|
929
|
+
text: string;
|
|
930
|
+
}>;
|
|
920
931
|
};
|
|
921
|
-
declare const openaiResponsesChunkSchema:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
} | {
|
|
925
|
-
type: "error";
|
|
926
|
-
sequence_number: number;
|
|
927
|
-
error: {
|
|
928
|
-
type: string;
|
|
929
|
-
message: string;
|
|
930
|
-
code?: string | null | undefined;
|
|
931
|
-
param?: string | null | undefined;
|
|
932
|
-
};
|
|
932
|
+
declare const openaiResponsesChunkSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
933
|
+
type: "unknown_chunk";
|
|
934
|
+
message: string;
|
|
933
935
|
} | {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
logprob: number;
|
|
947
|
-
top_logprobs: {
|
|
948
|
-
token: string;
|
|
949
|
-
logprob: number;
|
|
950
|
-
}[];
|
|
951
|
-
}[] | null | undefined;
|
|
936
|
+
type: "response.output_text.delta";
|
|
937
|
+
item_id: string;
|
|
938
|
+
delta: string;
|
|
939
|
+
output_index?: number | null | undefined;
|
|
940
|
+
logprobs?: {
|
|
941
|
+
token: string;
|
|
942
|
+
logprob: number;
|
|
943
|
+
top_logprobs: {
|
|
944
|
+
token: string;
|
|
945
|
+
logprob: number;
|
|
946
|
+
}[];
|
|
947
|
+
}[] | null | undefined;
|
|
952
948
|
} | {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
949
|
+
type: "response.completed" | "response.incomplete";
|
|
950
|
+
response: {
|
|
951
|
+
incomplete_details?: {
|
|
952
|
+
reason: string;
|
|
953
|
+
} | null | undefined;
|
|
954
|
+
usage?: (Record<string, JSONValue | undefined> & {
|
|
955
|
+
input_tokens: number;
|
|
956
|
+
output_tokens: number;
|
|
957
|
+
input_tokens_details?: (Record<string, JSONValue | undefined> & {
|
|
958
|
+
cached_tokens?: number | null | undefined;
|
|
959
|
+
cache_write_tokens?: number | null | undefined;
|
|
960
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
961
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
962
|
+
}) | null | undefined;
|
|
963
|
+
output_tokens_details?: (Record<string, JSONValue | undefined> & {
|
|
964
|
+
reasoning_tokens?: number | null | undefined;
|
|
965
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
966
|
+
}) | null | undefined;
|
|
967
|
+
total_tokens?: number | undefined;
|
|
968
|
+
}) | null | undefined;
|
|
969
|
+
reasoning?: {
|
|
970
|
+
context?: string | null | undefined;
|
|
971
|
+
} | null | undefined;
|
|
972
|
+
service_tier?: string | null | undefined;
|
|
973
|
+
};
|
|
978
974
|
} | {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
975
|
+
type: "response.failed";
|
|
976
|
+
sequence_number: number;
|
|
977
|
+
response: {
|
|
978
|
+
error?: {
|
|
979
|
+
message: string;
|
|
980
|
+
code?: string | null | undefined;
|
|
981
|
+
} | null | undefined;
|
|
982
|
+
incomplete_details?: {
|
|
983
|
+
reason: string;
|
|
984
|
+
} | null | undefined;
|
|
985
|
+
usage?: (Record<string, JSONValue | undefined> & {
|
|
986
|
+
input_tokens: number;
|
|
987
|
+
output_tokens: number;
|
|
988
|
+
input_tokens_details?: (Record<string, JSONValue | undefined> & {
|
|
989
|
+
cached_tokens?: number | null | undefined;
|
|
990
|
+
cache_write_tokens?: number | null | undefined;
|
|
991
|
+
orchestration_input_tokens?: number | null | undefined;
|
|
992
|
+
orchestration_input_cached_tokens?: number | null | undefined;
|
|
993
|
+
}) | null | undefined;
|
|
994
|
+
output_tokens_details?: (Record<string, JSONValue | undefined> & {
|
|
995
|
+
reasoning_tokens?: number | null | undefined;
|
|
996
|
+
orchestration_output_tokens?: number | null | undefined;
|
|
997
|
+
}) | null | undefined;
|
|
998
|
+
total_tokens?: number | undefined;
|
|
999
|
+
}) | null | undefined;
|
|
1000
|
+
reasoning?: {
|
|
1001
|
+
context?: string | null | undefined;
|
|
1002
|
+
} | null | undefined;
|
|
1003
|
+
service_tier?: string | null | undefined;
|
|
1004
|
+
};
|
|
1009
1005
|
} | {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1006
|
+
type: "response.created";
|
|
1007
|
+
response: {
|
|
1008
|
+
id: string;
|
|
1009
|
+
created_at: number;
|
|
1010
|
+
model: string;
|
|
1011
|
+
service_tier?: string | null | undefined;
|
|
1012
|
+
};
|
|
1017
1013
|
} | {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1014
|
+
type: "response.in_progress";
|
|
1015
|
+
response: {
|
|
1016
|
+
id: string;
|
|
1017
|
+
created_at: number;
|
|
1018
|
+
model: string;
|
|
1019
|
+
service_tier?: string | null | undefined;
|
|
1020
|
+
};
|
|
1025
1021
|
} | {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
path: {
|
|
1047
|
-
x: number;
|
|
1048
|
-
y: number;
|
|
1049
|
-
}[];
|
|
1050
|
-
keys?: string[] | null | undefined;
|
|
1051
|
-
} | {
|
|
1052
|
-
type: "keypress";
|
|
1053
|
-
keys: string[];
|
|
1054
|
-
} | {
|
|
1055
|
-
type: "move";
|
|
1056
|
-
x: number;
|
|
1057
|
-
y: number;
|
|
1058
|
-
keys?: string[] | null | undefined;
|
|
1059
|
-
} | {
|
|
1060
|
-
type: "screenshot";
|
|
1061
|
-
} | {
|
|
1062
|
-
type: "scroll";
|
|
1063
|
-
x: number;
|
|
1064
|
-
y: number;
|
|
1065
|
-
scroll_x: number;
|
|
1066
|
-
scroll_y: number;
|
|
1067
|
-
keys?: string[] | null | undefined;
|
|
1068
|
-
} | {
|
|
1069
|
-
type: "type";
|
|
1070
|
-
text: string;
|
|
1071
|
-
} | {
|
|
1072
|
-
type: "wait";
|
|
1073
|
-
} | null | undefined;
|
|
1074
|
-
actions?: ({
|
|
1075
|
-
type: "click";
|
|
1076
|
-
button: "left" | "right" | "wheel" | "back" | "forward";
|
|
1077
|
-
x: number;
|
|
1078
|
-
y: number;
|
|
1079
|
-
keys?: string[] | null | undefined;
|
|
1080
|
-
} | {
|
|
1081
|
-
type: "double_click";
|
|
1082
|
-
x: number;
|
|
1083
|
-
y: number;
|
|
1084
|
-
keys?: string[] | null | undefined;
|
|
1085
|
-
} | {
|
|
1086
|
-
type: "drag";
|
|
1087
|
-
path: {
|
|
1088
|
-
x: number;
|
|
1089
|
-
y: number;
|
|
1090
|
-
}[];
|
|
1091
|
-
keys?: string[] | null | undefined;
|
|
1092
|
-
} | {
|
|
1093
|
-
type: "keypress";
|
|
1094
|
-
keys: string[];
|
|
1095
|
-
} | {
|
|
1096
|
-
type: "move";
|
|
1097
|
-
x: number;
|
|
1098
|
-
y: number;
|
|
1099
|
-
keys?: string[] | null | undefined;
|
|
1100
|
-
} | {
|
|
1101
|
-
type: "screenshot";
|
|
1102
|
-
} | {
|
|
1103
|
-
type: "scroll";
|
|
1104
|
-
x: number;
|
|
1105
|
-
y: number;
|
|
1106
|
-
scroll_x: number;
|
|
1107
|
-
scroll_y: number;
|
|
1108
|
-
keys?: string[] | null | undefined;
|
|
1109
|
-
} | {
|
|
1110
|
-
type: "type";
|
|
1111
|
-
text: string;
|
|
1112
|
-
} | {
|
|
1113
|
-
type: "wait";
|
|
1114
|
-
})[] | null | undefined;
|
|
1115
|
-
pending_safety_checks?: {
|
|
1116
|
-
id: string;
|
|
1117
|
-
code?: string | null | undefined;
|
|
1118
|
-
message?: string | null | undefined;
|
|
1119
|
-
}[] | null | undefined;
|
|
1120
|
-
} | {
|
|
1121
|
-
type: "local_shell_call";
|
|
1122
|
-
id: string;
|
|
1123
|
-
call_id: string;
|
|
1124
|
-
action: {
|
|
1125
|
-
type: "exec";
|
|
1126
|
-
command: string[];
|
|
1127
|
-
timeout_ms?: number | undefined;
|
|
1128
|
-
user?: string | undefined;
|
|
1129
|
-
working_directory?: string | undefined;
|
|
1130
|
-
env?: Record<string, string> | undefined;
|
|
1131
|
-
};
|
|
1132
|
-
} | {
|
|
1133
|
-
type: "message";
|
|
1134
|
-
id: string;
|
|
1135
|
-
phase?: "commentary" | "final_answer" | null | undefined;
|
|
1136
|
-
} | {
|
|
1137
|
-
type: "reasoning";
|
|
1138
|
-
id: string;
|
|
1139
|
-
encrypted_content?: string | null | undefined;
|
|
1140
|
-
} | {
|
|
1141
|
-
type: "function_call";
|
|
1142
|
-
id: string;
|
|
1143
|
-
call_id: string;
|
|
1144
|
-
name: string;
|
|
1145
|
-
arguments: string;
|
|
1146
|
-
async?: boolean | null | undefined;
|
|
1147
|
-
namespace?: string | null | undefined;
|
|
1148
|
-
caller?: {
|
|
1149
|
-
type: "direct";
|
|
1150
|
-
} | {
|
|
1151
|
-
type: "program";
|
|
1152
|
-
caller_id: string;
|
|
1153
|
-
} | null | undefined;
|
|
1154
|
-
} | {
|
|
1155
|
-
type: "program";
|
|
1156
|
-
id: string;
|
|
1157
|
-
call_id: string;
|
|
1158
|
-
code: string;
|
|
1159
|
-
fingerprint: string;
|
|
1160
|
-
} | {
|
|
1161
|
-
type: "program_output";
|
|
1162
|
-
id: string;
|
|
1163
|
-
call_id: string;
|
|
1164
|
-
result: string;
|
|
1165
|
-
status: "completed" | "incomplete";
|
|
1166
|
-
} | {
|
|
1167
|
-
type: "web_search_call";
|
|
1168
|
-
id: string;
|
|
1169
|
-
status: string;
|
|
1170
|
-
} | {
|
|
1171
|
-
type: "file_search_call";
|
|
1172
|
-
id: string;
|
|
1173
|
-
} | {
|
|
1174
|
-
type: "image_generation_call";
|
|
1175
|
-
id: string;
|
|
1176
|
-
} | {
|
|
1177
|
-
type: "code_interpreter_call";
|
|
1178
|
-
id: string;
|
|
1179
|
-
container_id: string;
|
|
1180
|
-
code: string | null;
|
|
1181
|
-
outputs: ({
|
|
1182
|
-
type: "logs";
|
|
1183
|
-
logs: string;
|
|
1184
|
-
} | {
|
|
1185
|
-
type: "image";
|
|
1186
|
-
url: string;
|
|
1187
|
-
})[] | null;
|
|
1188
|
-
status: string;
|
|
1189
|
-
} | {
|
|
1190
|
-
type: "mcp_call";
|
|
1191
|
-
id: string;
|
|
1192
|
-
status: string;
|
|
1193
|
-
approval_request_id?: string | null | undefined;
|
|
1194
|
-
} | {
|
|
1195
|
-
type: "mcp_list_tools";
|
|
1196
|
-
id: string;
|
|
1197
|
-
} | {
|
|
1198
|
-
type: "mcp_approval_request";
|
|
1199
|
-
id: string;
|
|
1200
|
-
} | {
|
|
1201
|
-
type: "apply_patch_call";
|
|
1202
|
-
id: string;
|
|
1203
|
-
call_id: string;
|
|
1204
|
-
status: "completed" | "in_progress";
|
|
1205
|
-
operation: {
|
|
1206
|
-
type: "create_file";
|
|
1207
|
-
path: string;
|
|
1208
|
-
diff: string;
|
|
1209
|
-
} | {
|
|
1210
|
-
type: "delete_file";
|
|
1211
|
-
path: string;
|
|
1212
|
-
} | {
|
|
1213
|
-
type: "update_file";
|
|
1214
|
-
path: string;
|
|
1215
|
-
diff: string;
|
|
1216
|
-
};
|
|
1217
|
-
} | {
|
|
1218
|
-
type: "custom_tool_call";
|
|
1219
|
-
id: string;
|
|
1220
|
-
call_id: string;
|
|
1221
|
-
name: string;
|
|
1222
|
-
input: string;
|
|
1223
|
-
async?: boolean | null | undefined;
|
|
1224
|
-
} | {
|
|
1225
|
-
type: "shell_call";
|
|
1226
|
-
id: string;
|
|
1227
|
-
call_id: string;
|
|
1228
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
1229
|
-
action: {
|
|
1230
|
-
commands: string[];
|
|
1231
|
-
};
|
|
1232
|
-
} | {
|
|
1233
|
-
type: "compaction";
|
|
1234
|
-
id: string;
|
|
1235
|
-
encrypted_content?: string | null | undefined;
|
|
1022
|
+
type: "response.output_item.added";
|
|
1023
|
+
output_index: number;
|
|
1024
|
+
item: {
|
|
1025
|
+
type: "message";
|
|
1026
|
+
id: string;
|
|
1027
|
+
phase?: "commentary" | "final_answer" | null | undefined;
|
|
1028
|
+
} | {
|
|
1029
|
+
type: "reasoning";
|
|
1030
|
+
id: string;
|
|
1031
|
+
encrypted_content?: string | null | undefined;
|
|
1032
|
+
} | {
|
|
1033
|
+
type: "function_call";
|
|
1034
|
+
id: string;
|
|
1035
|
+
call_id: string;
|
|
1036
|
+
name: string;
|
|
1037
|
+
arguments: string;
|
|
1038
|
+
async?: boolean | null | undefined;
|
|
1039
|
+
namespace?: string | null | undefined;
|
|
1040
|
+
caller?: {
|
|
1041
|
+
type: "direct";
|
|
1236
1042
|
} | {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1043
|
+
type: "program";
|
|
1044
|
+
caller_id: string;
|
|
1045
|
+
} | null | undefined;
|
|
1046
|
+
} | {
|
|
1047
|
+
type: "program";
|
|
1048
|
+
id: string;
|
|
1049
|
+
call_id: string;
|
|
1050
|
+
code: string;
|
|
1051
|
+
fingerprint: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: "program_output";
|
|
1054
|
+
id: string;
|
|
1055
|
+
call_id: string;
|
|
1056
|
+
result: string;
|
|
1057
|
+
status: "completed" | "incomplete";
|
|
1058
|
+
} | {
|
|
1059
|
+
type: "web_search_call";
|
|
1060
|
+
id: string;
|
|
1061
|
+
status: string;
|
|
1062
|
+
} | {
|
|
1063
|
+
type: "computer_call";
|
|
1064
|
+
id: string;
|
|
1065
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1066
|
+
call_id?: string | null | undefined;
|
|
1067
|
+
action?: {
|
|
1068
|
+
type: "click";
|
|
1069
|
+
button: "left" | "right" | "wheel" | "back" | "forward";
|
|
1070
|
+
x: number;
|
|
1071
|
+
y: number;
|
|
1072
|
+
keys?: string[] | null | undefined;
|
|
1073
|
+
} | {
|
|
1074
|
+
type: "double_click";
|
|
1075
|
+
x: number;
|
|
1076
|
+
y: number;
|
|
1077
|
+
keys?: string[] | null | undefined;
|
|
1078
|
+
} | {
|
|
1079
|
+
type: "drag";
|
|
1080
|
+
path: {
|
|
1081
|
+
x: number;
|
|
1082
|
+
y: number;
|
|
1083
|
+
}[];
|
|
1084
|
+
keys?: string[] | null | undefined;
|
|
1085
|
+
} | {
|
|
1086
|
+
type: "keypress";
|
|
1087
|
+
keys: string[];
|
|
1088
|
+
} | {
|
|
1089
|
+
type: "move";
|
|
1090
|
+
x: number;
|
|
1091
|
+
y: number;
|
|
1092
|
+
keys?: string[] | null | undefined;
|
|
1093
|
+
} | {
|
|
1094
|
+
type: "screenshot";
|
|
1095
|
+
} | {
|
|
1096
|
+
type: "scroll";
|
|
1097
|
+
x: number;
|
|
1098
|
+
y: number;
|
|
1099
|
+
scroll_x: number;
|
|
1100
|
+
scroll_y: number;
|
|
1101
|
+
keys?: string[] | null | undefined;
|
|
1102
|
+
} | {
|
|
1103
|
+
type: "type";
|
|
1104
|
+
text: string;
|
|
1105
|
+
} | {
|
|
1106
|
+
type: "wait";
|
|
1107
|
+
} | null | undefined;
|
|
1108
|
+
actions?: ({
|
|
1109
|
+
type: "click";
|
|
1110
|
+
button: "left" | "right" | "wheel" | "back" | "forward";
|
|
1111
|
+
x: number;
|
|
1112
|
+
y: number;
|
|
1113
|
+
keys?: string[] | null | undefined;
|
|
1114
|
+
} | {
|
|
1115
|
+
type: "double_click";
|
|
1116
|
+
x: number;
|
|
1117
|
+
y: number;
|
|
1118
|
+
keys?: string[] | null | undefined;
|
|
1119
|
+
} | {
|
|
1120
|
+
type: "drag";
|
|
1121
|
+
path: {
|
|
1122
|
+
x: number;
|
|
1123
|
+
y: number;
|
|
1124
|
+
}[];
|
|
1125
|
+
keys?: string[] | null | undefined;
|
|
1126
|
+
} | {
|
|
1127
|
+
type: "keypress";
|
|
1128
|
+
keys: string[];
|
|
1129
|
+
} | {
|
|
1130
|
+
type: "move";
|
|
1131
|
+
x: number;
|
|
1132
|
+
y: number;
|
|
1133
|
+
keys?: string[] | null | undefined;
|
|
1134
|
+
} | {
|
|
1135
|
+
type: "screenshot";
|
|
1136
|
+
} | {
|
|
1137
|
+
type: "scroll";
|
|
1138
|
+
x: number;
|
|
1139
|
+
y: number;
|
|
1140
|
+
scroll_x: number;
|
|
1141
|
+
scroll_y: number;
|
|
1142
|
+
keys?: string[] | null | undefined;
|
|
1143
|
+
} | {
|
|
1144
|
+
type: "type";
|
|
1145
|
+
text: string;
|
|
1146
|
+
} | {
|
|
1147
|
+
type: "wait";
|
|
1148
|
+
})[] | null | undefined;
|
|
1149
|
+
pending_safety_checks?: {
|
|
1150
|
+
id: string;
|
|
1151
|
+
code?: string | null | undefined;
|
|
1152
|
+
message?: string | null | undefined;
|
|
1153
|
+
}[] | null | undefined;
|
|
1154
|
+
} | {
|
|
1155
|
+
type: "file_search_call";
|
|
1156
|
+
id: string;
|
|
1157
|
+
} | {
|
|
1158
|
+
type: "local_shell_call";
|
|
1159
|
+
id: string;
|
|
1160
|
+
call_id: string;
|
|
1161
|
+
action: {
|
|
1162
|
+
type: "exec";
|
|
1163
|
+
command: string[];
|
|
1164
|
+
timeout_ms?: number | undefined;
|
|
1165
|
+
user?: string | undefined;
|
|
1166
|
+
working_directory?: string | undefined;
|
|
1167
|
+
env?: Record<string, string> | undefined;
|
|
1168
|
+
};
|
|
1169
|
+
} | {
|
|
1170
|
+
type: "image_generation_call";
|
|
1171
|
+
id: string;
|
|
1172
|
+
} | {
|
|
1173
|
+
type: "code_interpreter_call";
|
|
1174
|
+
id: string;
|
|
1175
|
+
container_id: string;
|
|
1176
|
+
code: string | null;
|
|
1177
|
+
outputs: ({
|
|
1178
|
+
type: "logs";
|
|
1179
|
+
logs: string;
|
|
1180
|
+
} | {
|
|
1181
|
+
type: "image";
|
|
1182
|
+
url: string;
|
|
1183
|
+
})[] | null;
|
|
1184
|
+
status: string;
|
|
1185
|
+
} | {
|
|
1186
|
+
type: "mcp_call";
|
|
1187
|
+
id: string;
|
|
1188
|
+
status: string;
|
|
1189
|
+
approval_request_id?: string | null | undefined;
|
|
1190
|
+
} | {
|
|
1191
|
+
type: "mcp_list_tools";
|
|
1192
|
+
id: string;
|
|
1193
|
+
} | {
|
|
1194
|
+
type: "mcp_approval_request";
|
|
1195
|
+
id: string;
|
|
1196
|
+
} | {
|
|
1197
|
+
type: "apply_patch_call";
|
|
1198
|
+
id: string;
|
|
1199
|
+
call_id: string;
|
|
1200
|
+
status: "completed" | "in_progress";
|
|
1201
|
+
operation: {
|
|
1202
|
+
type: "create_file";
|
|
1203
|
+
path: string;
|
|
1204
|
+
diff: string;
|
|
1251
1205
|
} | {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
execution: "server" | "client";
|
|
1255
|
-
call_id: string | null;
|
|
1256
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
1257
|
-
arguments: unknown;
|
|
1206
|
+
type: "delete_file";
|
|
1207
|
+
path: string;
|
|
1258
1208
|
} | {
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
call_id: string | null;
|
|
1263
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
1264
|
-
tools: Record<string, JSONValue | undefined>[];
|
|
1209
|
+
type: "update_file";
|
|
1210
|
+
path: string;
|
|
1211
|
+
diff: string;
|
|
1265
1212
|
};
|
|
1213
|
+
} | {
|
|
1214
|
+
type: "custom_tool_call";
|
|
1215
|
+
id: string;
|
|
1216
|
+
call_id: string;
|
|
1217
|
+
name: string;
|
|
1218
|
+
input: string;
|
|
1219
|
+
async?: boolean | null | undefined;
|
|
1220
|
+
} | {
|
|
1221
|
+
type: "shell_call";
|
|
1222
|
+
id: string;
|
|
1223
|
+
call_id: string;
|
|
1224
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1225
|
+
action: {
|
|
1226
|
+
commands: string[];
|
|
1227
|
+
};
|
|
1228
|
+
} | {
|
|
1229
|
+
type: "compaction";
|
|
1230
|
+
id: string;
|
|
1231
|
+
encrypted_content?: string | null | undefined;
|
|
1232
|
+
} | {
|
|
1233
|
+
type: "shell_call_output";
|
|
1234
|
+
id: string;
|
|
1235
|
+
call_id: string;
|
|
1236
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1237
|
+
output: {
|
|
1238
|
+
stdout: string;
|
|
1239
|
+
stderr: string;
|
|
1240
|
+
outcome: {
|
|
1241
|
+
type: "timeout";
|
|
1242
|
+
} | {
|
|
1243
|
+
type: "exit";
|
|
1244
|
+
exit_code: number;
|
|
1245
|
+
};
|
|
1246
|
+
}[];
|
|
1247
|
+
} | {
|
|
1248
|
+
type: "tool_search_call";
|
|
1249
|
+
id: string;
|
|
1250
|
+
execution: "server" | "client";
|
|
1251
|
+
call_id: string | null;
|
|
1252
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1253
|
+
arguments: unknown;
|
|
1254
|
+
} | {
|
|
1255
|
+
type: "tool_search_output";
|
|
1256
|
+
id: string;
|
|
1257
|
+
execution: "server" | "client";
|
|
1258
|
+
call_id: string | null;
|
|
1259
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1260
|
+
tools: Record<string, JSONValue | undefined>[];
|
|
1261
|
+
};
|
|
1266
1262
|
} | {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
} | {
|
|
1405
|
-
type: "program";
|
|
1406
|
-
caller_id: string;
|
|
1407
|
-
} | null | undefined;
|
|
1408
|
-
} | {
|
|
1409
|
-
type: "custom_tool_call";
|
|
1410
|
-
id: string;
|
|
1411
|
-
call_id: string;
|
|
1412
|
-
name: string;
|
|
1413
|
-
input: string;
|
|
1414
|
-
status: "completed";
|
|
1415
|
-
async?: boolean | null | undefined;
|
|
1416
|
-
} | {
|
|
1417
|
-
type: "code_interpreter_call";
|
|
1418
|
-
id: string;
|
|
1419
|
-
code: string | null;
|
|
1420
|
-
container_id: string;
|
|
1421
|
-
outputs: ({
|
|
1422
|
-
type: "logs";
|
|
1423
|
-
logs: string;
|
|
1424
|
-
} | {
|
|
1425
|
-
type: "image";
|
|
1426
|
-
url: string;
|
|
1427
|
-
})[] | null;
|
|
1428
|
-
} | {
|
|
1429
|
-
type: "image_generation_call";
|
|
1430
|
-
id: string;
|
|
1431
|
-
result: string;
|
|
1432
|
-
} | {
|
|
1433
|
-
type: "web_search_call";
|
|
1434
|
-
id: string;
|
|
1435
|
-
status: string;
|
|
1436
|
-
action?: {
|
|
1437
|
-
type: "search";
|
|
1438
|
-
query?: string | null | undefined;
|
|
1439
|
-
queries?: string[] | null | undefined;
|
|
1440
|
-
sources?: ({
|
|
1441
|
-
type: "url";
|
|
1442
|
-
url: string;
|
|
1443
|
-
} | {
|
|
1444
|
-
type: "api";
|
|
1445
|
-
name: string;
|
|
1446
|
-
})[] | null | undefined;
|
|
1447
|
-
} | {
|
|
1448
|
-
type: "open_page";
|
|
1449
|
-
url?: string | null | undefined;
|
|
1450
|
-
} | {
|
|
1451
|
-
type: "find_in_page";
|
|
1452
|
-
url?: string | null | undefined;
|
|
1453
|
-
pattern?: string | null | undefined;
|
|
1454
|
-
} | null | undefined;
|
|
1455
|
-
} | {
|
|
1456
|
-
type: "file_search_call";
|
|
1457
|
-
id: string;
|
|
1458
|
-
queries: string[];
|
|
1459
|
-
results?: {
|
|
1460
|
-
attributes: Record<string, string | number | boolean>;
|
|
1461
|
-
file_id: string;
|
|
1462
|
-
filename: string;
|
|
1463
|
-
score: number;
|
|
1464
|
-
text: string;
|
|
1465
|
-
}[] | null | undefined;
|
|
1466
|
-
} | {
|
|
1467
|
-
type: "mcp_call";
|
|
1468
|
-
id: string;
|
|
1469
|
-
status: string;
|
|
1470
|
-
arguments: string;
|
|
1471
|
-
name: string;
|
|
1472
|
-
server_label: string;
|
|
1473
|
-
output?: string | null | undefined;
|
|
1474
|
-
error?: string | {
|
|
1475
|
-
[x: string]: unknown;
|
|
1476
|
-
type?: string | undefined;
|
|
1477
|
-
code?: string | number | undefined;
|
|
1478
|
-
message?: string | undefined;
|
|
1479
|
-
} | null | undefined;
|
|
1480
|
-
approval_request_id?: string | null | undefined;
|
|
1481
|
-
} | {
|
|
1482
|
-
type: "mcp_list_tools";
|
|
1483
|
-
id: string;
|
|
1484
|
-
server_label: string;
|
|
1485
|
-
tools: {
|
|
1486
|
-
name: string;
|
|
1487
|
-
input_schema: any;
|
|
1488
|
-
description?: string | undefined;
|
|
1489
|
-
annotations?: Record<string, unknown> | undefined;
|
|
1490
|
-
}[];
|
|
1491
|
-
error?: string | {
|
|
1492
|
-
[x: string]: unknown;
|
|
1493
|
-
type?: string | undefined;
|
|
1494
|
-
code?: string | number | undefined;
|
|
1495
|
-
message?: string | undefined;
|
|
1496
|
-
} | undefined;
|
|
1263
|
+
type: "response.output_item.done";
|
|
1264
|
+
output_index: number;
|
|
1265
|
+
item: {
|
|
1266
|
+
type: "program";
|
|
1267
|
+
id: string;
|
|
1268
|
+
call_id: string;
|
|
1269
|
+
code: string;
|
|
1270
|
+
fingerprint: string;
|
|
1271
|
+
} | {
|
|
1272
|
+
type: "program_output";
|
|
1273
|
+
id: string;
|
|
1274
|
+
call_id: string;
|
|
1275
|
+
result: string;
|
|
1276
|
+
status: "completed" | "incomplete";
|
|
1277
|
+
} | {
|
|
1278
|
+
type: "computer_call";
|
|
1279
|
+
id: string;
|
|
1280
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1281
|
+
call_id?: string | null | undefined;
|
|
1282
|
+
action?: {
|
|
1283
|
+
type: "click";
|
|
1284
|
+
button: "left" | "right" | "wheel" | "back" | "forward";
|
|
1285
|
+
x: number;
|
|
1286
|
+
y: number;
|
|
1287
|
+
keys?: string[] | null | undefined;
|
|
1288
|
+
} | {
|
|
1289
|
+
type: "double_click";
|
|
1290
|
+
x: number;
|
|
1291
|
+
y: number;
|
|
1292
|
+
keys?: string[] | null | undefined;
|
|
1293
|
+
} | {
|
|
1294
|
+
type: "drag";
|
|
1295
|
+
path: {
|
|
1296
|
+
x: number;
|
|
1297
|
+
y: number;
|
|
1298
|
+
}[];
|
|
1299
|
+
keys?: string[] | null | undefined;
|
|
1300
|
+
} | {
|
|
1301
|
+
type: "keypress";
|
|
1302
|
+
keys: string[];
|
|
1303
|
+
} | {
|
|
1304
|
+
type: "move";
|
|
1305
|
+
x: number;
|
|
1306
|
+
y: number;
|
|
1307
|
+
keys?: string[] | null | undefined;
|
|
1308
|
+
} | {
|
|
1309
|
+
type: "screenshot";
|
|
1310
|
+
} | {
|
|
1311
|
+
type: "scroll";
|
|
1312
|
+
x: number;
|
|
1313
|
+
y: number;
|
|
1314
|
+
scroll_x: number;
|
|
1315
|
+
scroll_y: number;
|
|
1316
|
+
keys?: string[] | null | undefined;
|
|
1317
|
+
} | {
|
|
1318
|
+
type: "type";
|
|
1319
|
+
text: string;
|
|
1320
|
+
} | {
|
|
1321
|
+
type: "wait";
|
|
1322
|
+
} | null | undefined;
|
|
1323
|
+
actions?: ({
|
|
1324
|
+
type: "click";
|
|
1325
|
+
button: "left" | "right" | "wheel" | "back" | "forward";
|
|
1326
|
+
x: number;
|
|
1327
|
+
y: number;
|
|
1328
|
+
keys?: string[] | null | undefined;
|
|
1329
|
+
} | {
|
|
1330
|
+
type: "double_click";
|
|
1331
|
+
x: number;
|
|
1332
|
+
y: number;
|
|
1333
|
+
keys?: string[] | null | undefined;
|
|
1334
|
+
} | {
|
|
1335
|
+
type: "drag";
|
|
1336
|
+
path: {
|
|
1337
|
+
x: number;
|
|
1338
|
+
y: number;
|
|
1339
|
+
}[];
|
|
1340
|
+
keys?: string[] | null | undefined;
|
|
1341
|
+
} | {
|
|
1342
|
+
type: "keypress";
|
|
1343
|
+
keys: string[];
|
|
1344
|
+
} | {
|
|
1345
|
+
type: "move";
|
|
1346
|
+
x: number;
|
|
1347
|
+
y: number;
|
|
1348
|
+
keys?: string[] | null | undefined;
|
|
1349
|
+
} | {
|
|
1350
|
+
type: "screenshot";
|
|
1351
|
+
} | {
|
|
1352
|
+
type: "scroll";
|
|
1353
|
+
x: number;
|
|
1354
|
+
y: number;
|
|
1355
|
+
scroll_x: number;
|
|
1356
|
+
scroll_y: number;
|
|
1357
|
+
keys?: string[] | null | undefined;
|
|
1358
|
+
} | {
|
|
1359
|
+
type: "type";
|
|
1360
|
+
text: string;
|
|
1361
|
+
} | {
|
|
1362
|
+
type: "wait";
|
|
1363
|
+
})[] | null | undefined;
|
|
1364
|
+
pending_safety_checks?: {
|
|
1365
|
+
id: string;
|
|
1366
|
+
code?: string | null | undefined;
|
|
1367
|
+
message?: string | null | undefined;
|
|
1368
|
+
}[] | null | undefined;
|
|
1369
|
+
} | {
|
|
1370
|
+
type: "local_shell_call";
|
|
1371
|
+
id: string;
|
|
1372
|
+
call_id: string;
|
|
1373
|
+
action: {
|
|
1374
|
+
type: "exec";
|
|
1375
|
+
command: string[];
|
|
1376
|
+
timeout_ms?: number | undefined;
|
|
1377
|
+
user?: string | undefined;
|
|
1378
|
+
working_directory?: string | undefined;
|
|
1379
|
+
env?: Record<string, string> | undefined;
|
|
1380
|
+
};
|
|
1381
|
+
} | {
|
|
1382
|
+
type: "message";
|
|
1383
|
+
id: string;
|
|
1384
|
+
phase?: "commentary" | "final_answer" | null | undefined;
|
|
1385
|
+
} | {
|
|
1386
|
+
type: "reasoning";
|
|
1387
|
+
id: string;
|
|
1388
|
+
encrypted_content?: string | null | undefined;
|
|
1389
|
+
} | {
|
|
1390
|
+
type: "function_call";
|
|
1391
|
+
id: string;
|
|
1392
|
+
call_id: string;
|
|
1393
|
+
name: string;
|
|
1394
|
+
arguments: string;
|
|
1395
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1396
|
+
async?: boolean | null | undefined;
|
|
1397
|
+
namespace?: string | null | undefined;
|
|
1398
|
+
caller?: {
|
|
1399
|
+
type: "direct";
|
|
1497
1400
|
} | {
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1401
|
+
type: "program";
|
|
1402
|
+
caller_id: string;
|
|
1403
|
+
} | null | undefined;
|
|
1404
|
+
} | {
|
|
1405
|
+
type: "custom_tool_call";
|
|
1406
|
+
id: string;
|
|
1407
|
+
call_id: string;
|
|
1408
|
+
name: string;
|
|
1409
|
+
input: string;
|
|
1410
|
+
status: "completed";
|
|
1411
|
+
async?: boolean | null | undefined;
|
|
1412
|
+
} | {
|
|
1413
|
+
type: "code_interpreter_call";
|
|
1414
|
+
id: string;
|
|
1415
|
+
code: string | null;
|
|
1416
|
+
container_id: string;
|
|
1417
|
+
outputs: ({
|
|
1418
|
+
type: "logs";
|
|
1419
|
+
logs: string;
|
|
1420
|
+
} | {
|
|
1421
|
+
type: "image";
|
|
1422
|
+
url: string;
|
|
1423
|
+
})[] | null;
|
|
1424
|
+
} | {
|
|
1425
|
+
type: "image_generation_call";
|
|
1426
|
+
id: string;
|
|
1427
|
+
result: string;
|
|
1428
|
+
} | {
|
|
1429
|
+
type: "web_search_call";
|
|
1430
|
+
id: string;
|
|
1431
|
+
status: string;
|
|
1432
|
+
action?: {
|
|
1433
|
+
type: "search";
|
|
1434
|
+
query?: string | null | undefined;
|
|
1435
|
+
queries?: string[] | null | undefined;
|
|
1436
|
+
sources?: ({
|
|
1437
|
+
type: "url";
|
|
1438
|
+
url: string;
|
|
1439
|
+
} | {
|
|
1440
|
+
type: "api";
|
|
1501
1441
|
name: string;
|
|
1502
|
-
|
|
1503
|
-
approval_request_id?: string | undefined;
|
|
1504
|
-
} | {
|
|
1505
|
-
type: "apply_patch_call";
|
|
1506
|
-
id: string;
|
|
1507
|
-
call_id: string;
|
|
1508
|
-
status: "completed" | "in_progress";
|
|
1509
|
-
operation: {
|
|
1510
|
-
type: "create_file";
|
|
1511
|
-
path: string;
|
|
1512
|
-
diff: string;
|
|
1513
|
-
} | {
|
|
1514
|
-
type: "delete_file";
|
|
1515
|
-
path: string;
|
|
1516
|
-
} | {
|
|
1517
|
-
type: "update_file";
|
|
1518
|
-
path: string;
|
|
1519
|
-
diff: string;
|
|
1520
|
-
};
|
|
1521
|
-
} | {
|
|
1522
|
-
type: "shell_call";
|
|
1523
|
-
id: string;
|
|
1524
|
-
call_id: string;
|
|
1525
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
1526
|
-
action: {
|
|
1527
|
-
commands: string[];
|
|
1528
|
-
};
|
|
1442
|
+
})[] | null | undefined;
|
|
1529
1443
|
} | {
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
encrypted_content: string;
|
|
1444
|
+
type: "open_page";
|
|
1445
|
+
url?: string | null | undefined;
|
|
1533
1446
|
} | {
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1447
|
+
type: "find_in_page";
|
|
1448
|
+
url?: string | null | undefined;
|
|
1449
|
+
pattern?: string | null | undefined;
|
|
1450
|
+
} | null | undefined;
|
|
1451
|
+
} | {
|
|
1452
|
+
type: "file_search_call";
|
|
1453
|
+
id: string;
|
|
1454
|
+
queries: string[];
|
|
1455
|
+
results?: {
|
|
1456
|
+
attributes: Record<string, string | number | boolean>;
|
|
1457
|
+
file_id: string;
|
|
1458
|
+
filename: string;
|
|
1459
|
+
score: number;
|
|
1460
|
+
text: string;
|
|
1461
|
+
}[] | null | undefined;
|
|
1462
|
+
} | {
|
|
1463
|
+
type: "mcp_call";
|
|
1464
|
+
id: string;
|
|
1465
|
+
status: string;
|
|
1466
|
+
arguments: string;
|
|
1467
|
+
name: string;
|
|
1468
|
+
server_label: string;
|
|
1469
|
+
output?: string | null | undefined;
|
|
1470
|
+
error?: string | {
|
|
1471
|
+
[x: string]: unknown;
|
|
1472
|
+
type?: string | undefined;
|
|
1473
|
+
code?: string | number | undefined;
|
|
1474
|
+
message?: string | undefined;
|
|
1475
|
+
} | null | undefined;
|
|
1476
|
+
approval_request_id?: string | null | undefined;
|
|
1477
|
+
} | {
|
|
1478
|
+
type: "mcp_list_tools";
|
|
1479
|
+
id: string;
|
|
1480
|
+
server_label: string;
|
|
1481
|
+
tools: {
|
|
1482
|
+
name: string;
|
|
1483
|
+
input_schema: any;
|
|
1484
|
+
description?: string | undefined;
|
|
1485
|
+
annotations?: Record<string, unknown> | undefined;
|
|
1486
|
+
}[];
|
|
1487
|
+
error?: string | {
|
|
1488
|
+
[x: string]: unknown;
|
|
1489
|
+
type?: string | undefined;
|
|
1490
|
+
code?: string | number | undefined;
|
|
1491
|
+
message?: string | undefined;
|
|
1492
|
+
} | undefined;
|
|
1493
|
+
} | {
|
|
1494
|
+
type: "mcp_approval_request";
|
|
1495
|
+
id: string;
|
|
1496
|
+
server_label: string;
|
|
1497
|
+
name: string;
|
|
1498
|
+
arguments: string;
|
|
1499
|
+
approval_request_id?: string | undefined;
|
|
1500
|
+
} | {
|
|
1501
|
+
type: "apply_patch_call";
|
|
1502
|
+
id: string;
|
|
1503
|
+
call_id: string;
|
|
1504
|
+
status: "completed" | "in_progress";
|
|
1505
|
+
operation: {
|
|
1506
|
+
type: "create_file";
|
|
1507
|
+
path: string;
|
|
1508
|
+
diff: string;
|
|
1548
1509
|
} | {
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
execution: "server" | "client";
|
|
1552
|
-
call_id: string | null;
|
|
1553
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
1554
|
-
arguments: unknown;
|
|
1510
|
+
type: "delete_file";
|
|
1511
|
+
path: string;
|
|
1555
1512
|
} | {
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1513
|
+
type: "update_file";
|
|
1514
|
+
path: string;
|
|
1515
|
+
diff: string;
|
|
1516
|
+
};
|
|
1517
|
+
} | {
|
|
1518
|
+
type: "shell_call";
|
|
1519
|
+
id: string;
|
|
1520
|
+
call_id: string;
|
|
1521
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1522
|
+
action: {
|
|
1523
|
+
commands: string[];
|
|
1562
1524
|
};
|
|
1525
|
+
} | {
|
|
1526
|
+
type: "compaction";
|
|
1527
|
+
id: string;
|
|
1528
|
+
encrypted_content: string;
|
|
1529
|
+
} | {
|
|
1530
|
+
type: "shell_call_output";
|
|
1531
|
+
id: string;
|
|
1532
|
+
call_id: string;
|
|
1533
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1534
|
+
output: {
|
|
1535
|
+
stdout: string;
|
|
1536
|
+
stderr: string;
|
|
1537
|
+
outcome: {
|
|
1538
|
+
type: "timeout";
|
|
1539
|
+
} | {
|
|
1540
|
+
type: "exit";
|
|
1541
|
+
exit_code: number;
|
|
1542
|
+
};
|
|
1543
|
+
}[];
|
|
1544
|
+
} | {
|
|
1545
|
+
type: "tool_search_call";
|
|
1546
|
+
id: string;
|
|
1547
|
+
execution: "server" | "client";
|
|
1548
|
+
call_id: string | null;
|
|
1549
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1550
|
+
arguments: unknown;
|
|
1551
|
+
} | {
|
|
1552
|
+
type: "tool_search_output";
|
|
1553
|
+
id: string;
|
|
1554
|
+
execution: "server" | "client";
|
|
1555
|
+
call_id: string | null;
|
|
1556
|
+
status: "completed" | "incomplete" | "in_progress";
|
|
1557
|
+
tools: Record<string, JSONValue | undefined>[];
|
|
1558
|
+
};
|
|
1563
1559
|
} | {
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1560
|
+
type: "response.function_call_arguments.delta";
|
|
1561
|
+
item_id: string;
|
|
1562
|
+
output_index: number;
|
|
1563
|
+
delta: string;
|
|
1568
1564
|
} | {
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1565
|
+
type: "response.function_call_arguments.done";
|
|
1566
|
+
item_id: string;
|
|
1567
|
+
output_index: number;
|
|
1568
|
+
arguments: string;
|
|
1573
1569
|
} | {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1570
|
+
type: "response.custom_tool_call_input.delta";
|
|
1571
|
+
item_id: string;
|
|
1572
|
+
output_index: number;
|
|
1573
|
+
delta: string;
|
|
1578
1574
|
} | {
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1575
|
+
type: "response.image_generation_call.partial_image";
|
|
1576
|
+
item_id: string;
|
|
1577
|
+
output_index: number;
|
|
1578
|
+
partial_image_b64: string;
|
|
1583
1579
|
} | {
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1580
|
+
type: "response.code_interpreter_call_code.delta";
|
|
1581
|
+
item_id: string;
|
|
1582
|
+
output_index: number;
|
|
1583
|
+
delta: string;
|
|
1588
1584
|
} | {
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1585
|
+
type: "response.code_interpreter_call_code.done";
|
|
1586
|
+
item_id: string;
|
|
1587
|
+
output_index: number;
|
|
1588
|
+
code: string;
|
|
1593
1589
|
} | {
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1590
|
+
type: "response.output_text.annotation.added";
|
|
1591
|
+
annotation: {
|
|
1592
|
+
type: "url_citation";
|
|
1593
|
+
start_index: number;
|
|
1594
|
+
end_index: number;
|
|
1595
|
+
url: string;
|
|
1596
|
+
title: string;
|
|
1597
|
+
} | {
|
|
1598
|
+
type: "file_citation";
|
|
1599
|
+
file_id: string;
|
|
1600
|
+
filename: string;
|
|
1601
|
+
index: number;
|
|
1602
|
+
} | {
|
|
1603
|
+
type: "container_file_citation";
|
|
1604
|
+
container_id: string;
|
|
1605
|
+
file_id: string;
|
|
1606
|
+
filename: string;
|
|
1607
|
+
start_index: number;
|
|
1608
|
+
end_index: number;
|
|
1609
|
+
} | {
|
|
1610
|
+
type: "file_path";
|
|
1611
|
+
file_id: string;
|
|
1612
|
+
index: number;
|
|
1613
|
+
};
|
|
1618
1614
|
} | {
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1615
|
+
type: "response.reasoning_summary_part.added";
|
|
1616
|
+
item_id: string;
|
|
1617
|
+
summary_index: number;
|
|
1618
|
+
output_index?: number | null | undefined;
|
|
1623
1619
|
} | {
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1620
|
+
type: "response.reasoning_summary_text.delta";
|
|
1621
|
+
item_id: string;
|
|
1622
|
+
summary_index: number;
|
|
1623
|
+
delta: string;
|
|
1624
|
+
output_index?: number | null | undefined;
|
|
1629
1625
|
} | {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1626
|
+
type: "response.reasoning_summary_part.done";
|
|
1627
|
+
item_id: string;
|
|
1628
|
+
summary_index: number;
|
|
1629
|
+
output_index?: number | null | undefined;
|
|
1634
1630
|
} | {
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1631
|
+
type: "response.apply_patch_call_operation_diff.delta";
|
|
1632
|
+
item_id: string;
|
|
1633
|
+
output_index: number;
|
|
1634
|
+
delta: string;
|
|
1635
|
+
obfuscation?: string | null | undefined;
|
|
1640
1636
|
} | {
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1637
|
+
type: "response.apply_patch_call_operation_diff.done";
|
|
1638
|
+
item_id: string;
|
|
1639
|
+
output_index: number;
|
|
1640
|
+
diff: string;
|
|
1641
|
+
} | {
|
|
1642
|
+
type: "error";
|
|
1643
|
+
sequence_number: number;
|
|
1644
|
+
error: {
|
|
1645
|
+
type: string;
|
|
1646
|
+
message: string;
|
|
1647
|
+
code?: string | null | undefined;
|
|
1648
|
+
param?: string | null | undefined;
|
|
1649
|
+
};
|
|
1650
|
+
} | {
|
|
1651
|
+
type: "error";
|
|
1652
|
+
sequence_number: number;
|
|
1653
|
+
message: string;
|
|
1654
|
+
code?: string | null | undefined;
|
|
1655
|
+
param?: string | null | undefined;
|
|
1645
1656
|
}>;
|
|
1646
1657
|
type OpenAIResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1647
1658
|
type OpenAIResponsesLogprobs = NonNullable<(OpenAIResponsesChunk & {
|
|
1648
|
-
|
|
1659
|
+
type: 'response.output_text.delta';
|
|
1649
1660
|
})['logprobs']> | null;
|
|
1650
1661
|
type OpenAIResponsesWebSearchAction = NonNullable<((OpenAIResponsesChunk & {
|
|
1651
|
-
|
|
1662
|
+
type: 'response.output_item.done';
|
|
1652
1663
|
})['item'] & {
|
|
1653
|
-
|
|
1664
|
+
type: 'web_search_call';
|
|
1654
1665
|
})['action']>;
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1666
|
+
//#endregion
|
|
1667
|
+
//#region src/tool/web-search.d.ts
|
|
1668
|
+
export declare const webSearchArgsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
1669
|
+
externalWebAccess?: boolean | undefined;
|
|
1670
|
+
filters?: {
|
|
1671
|
+
allowedDomains?: string[] | undefined;
|
|
1672
|
+
blockedDomains?: string[] | undefined;
|
|
1673
|
+
} | undefined;
|
|
1674
|
+
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
1675
|
+
userLocation?: {
|
|
1676
|
+
type: "approximate";
|
|
1677
|
+
country?: string | undefined;
|
|
1678
|
+
city?: string | undefined;
|
|
1679
|
+
region?: string | undefined;
|
|
1680
|
+
timezone?: string | undefined;
|
|
1681
|
+
} | undefined;
|
|
1670
1682
|
}>;
|
|
1671
|
-
declare const webSearchOutputSchema:
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1683
|
+
export declare const webSearchOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
1684
|
+
action?: {
|
|
1685
|
+
type: "search";
|
|
1686
|
+
query?: string | undefined;
|
|
1687
|
+
queries?: string[] | undefined;
|
|
1688
|
+
} | {
|
|
1689
|
+
type: "openPage";
|
|
1690
|
+
url?: string | null | undefined;
|
|
1691
|
+
} | {
|
|
1692
|
+
type: "findInPage";
|
|
1693
|
+
url?: string | null | undefined;
|
|
1694
|
+
pattern?: string | null | undefined;
|
|
1695
|
+
} | undefined;
|
|
1696
|
+
sources?: ({
|
|
1697
|
+
type: "url";
|
|
1698
|
+
url: string;
|
|
1699
|
+
} | {
|
|
1700
|
+
type: "api";
|
|
1701
|
+
name: string;
|
|
1702
|
+
})[] | undefined;
|
|
1691
1703
|
}>;
|
|
1692
|
-
declare const webSearchToolFactory:
|
|
1704
|
+
export declare const webSearchToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
|
|
1705
|
+
/**
|
|
1706
|
+
* An object describing the specific action taken in this web search call.
|
|
1707
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1708
|
+
*/
|
|
1709
|
+
action?: {
|
|
1693
1710
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1711
|
+
* Action type "search" - Performs a web search query.
|
|
1696
1712
|
*/
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
*
|
|
1705
|
-
* @deprecated Use `queries` instead.
|
|
1706
|
-
*/
|
|
1707
|
-
query?: string;
|
|
1708
|
-
/**
|
|
1709
|
-
* The search queries the model used.
|
|
1710
|
-
*/
|
|
1711
|
-
queries?: string[];
|
|
1712
|
-
} | {
|
|
1713
|
-
/**
|
|
1714
|
-
* Action type "openPage" - Opens a specific URL from search results.
|
|
1715
|
-
*/
|
|
1716
|
-
type: "openPage";
|
|
1717
|
-
/**
|
|
1718
|
-
* The URL opened by the model.
|
|
1719
|
-
*/
|
|
1720
|
-
url?: string | null;
|
|
1721
|
-
} | {
|
|
1722
|
-
/**
|
|
1723
|
-
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1724
|
-
*/
|
|
1725
|
-
type: "findInPage";
|
|
1726
|
-
/**
|
|
1727
|
-
* The URL of the page searched for the pattern.
|
|
1728
|
-
*/
|
|
1729
|
-
url?: string | null;
|
|
1730
|
-
/**
|
|
1731
|
-
* The pattern or text to search for within the page.
|
|
1732
|
-
*/
|
|
1733
|
-
pattern?: string | null;
|
|
1734
|
-
};
|
|
1713
|
+
type: "search";
|
|
1714
|
+
/**
|
|
1715
|
+
* The search query.
|
|
1716
|
+
*
|
|
1717
|
+
* @deprecated Use `queries` instead.
|
|
1718
|
+
*/
|
|
1719
|
+
query?: string;
|
|
1735
1720
|
/**
|
|
1736
|
-
*
|
|
1721
|
+
* The search queries the model used.
|
|
1737
1722
|
*/
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1723
|
+
queries?: string[];
|
|
1724
|
+
} | {
|
|
1725
|
+
/**
|
|
1726
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1727
|
+
*/
|
|
1728
|
+
type: "openPage";
|
|
1729
|
+
/**
|
|
1730
|
+
* The URL opened by the model.
|
|
1731
|
+
*/
|
|
1732
|
+
url?: string | null;
|
|
1733
|
+
} | {
|
|
1734
|
+
/**
|
|
1735
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1736
|
+
*/
|
|
1737
|
+
type: "findInPage";
|
|
1738
|
+
/**
|
|
1739
|
+
* The URL of the page searched for the pattern.
|
|
1740
|
+
*/
|
|
1741
|
+
url?: string | null;
|
|
1742
|
+
/**
|
|
1743
|
+
* The pattern or text to search for within the page.
|
|
1744
|
+
*/
|
|
1745
|
+
pattern?: string | null;
|
|
1746
|
+
};
|
|
1747
|
+
/**
|
|
1748
|
+
* Optional sources cited by the model for the web search call.
|
|
1749
|
+
*/
|
|
1750
|
+
sources?: Array<{
|
|
1751
|
+
type: "url";
|
|
1752
|
+
url: string;
|
|
1753
|
+
} | {
|
|
1754
|
+
type: "api";
|
|
1755
|
+
name: string;
|
|
1756
|
+
}>;
|
|
1745
1757
|
}, {
|
|
1758
|
+
/**
|
|
1759
|
+
* Whether to use external web access for fetching live content.
|
|
1760
|
+
* - true: Fetch live web content (default)
|
|
1761
|
+
* - false: Use cached/indexed results
|
|
1762
|
+
*/
|
|
1763
|
+
externalWebAccess?: boolean;
|
|
1764
|
+
/**
|
|
1765
|
+
* Filters for the search.
|
|
1766
|
+
*/
|
|
1767
|
+
filters?: {
|
|
1746
1768
|
/**
|
|
1747
|
-
*
|
|
1748
|
-
*
|
|
1749
|
-
*
|
|
1769
|
+
* Allowed domains for the search.
|
|
1770
|
+
* If not provided, all domains are allowed.
|
|
1771
|
+
* Subdomains of the provided domains are allowed as well.
|
|
1772
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1750
1773
|
*/
|
|
1751
|
-
|
|
1774
|
+
allowedDomains?: string[];
|
|
1752
1775
|
/**
|
|
1753
|
-
*
|
|
1776
|
+
* Blocked domains for the search.
|
|
1777
|
+
* Subdomains of the provided domains are blocked as well.
|
|
1778
|
+
* Omit the HTTP or HTTPS prefix. Maximum 100 domains.
|
|
1754
1779
|
*/
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
blockedDomains?: string[];
|
|
1769
|
-
};
|
|
1780
|
+
blockedDomains?: string[];
|
|
1781
|
+
};
|
|
1782
|
+
/**
|
|
1783
|
+
* Search context size to use for the web search.
|
|
1784
|
+
* - high: Most comprehensive context, highest cost, slower response
|
|
1785
|
+
* - medium: Balanced context, cost, and latency (default)
|
|
1786
|
+
* - low: Least context, lowest cost, fastest response
|
|
1787
|
+
*/
|
|
1788
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
1789
|
+
/**
|
|
1790
|
+
* User location information to provide geographically relevant search results.
|
|
1791
|
+
*/
|
|
1792
|
+
userLocation?: {
|
|
1770
1793
|
/**
|
|
1771
|
-
*
|
|
1772
|
-
* - high: Most comprehensive context, highest cost, slower response
|
|
1773
|
-
* - medium: Balanced context, cost, and latency (default)
|
|
1774
|
-
* - low: Least context, lowest cost, fastest response
|
|
1794
|
+
* Type of location (always 'approximate')
|
|
1775
1795
|
*/
|
|
1776
|
-
|
|
1796
|
+
type: "approximate";
|
|
1777
1797
|
/**
|
|
1778
|
-
*
|
|
1798
|
+
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
1779
1799
|
*/
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
* Region name (free text, e.g., 'Minnesota')
|
|
1795
|
-
*/
|
|
1796
|
-
region?: string;
|
|
1797
|
-
/**
|
|
1798
|
-
* IANA timezone (e.g., 'America/Chicago')
|
|
1799
|
-
*/
|
|
1800
|
-
timezone?: string;
|
|
1801
|
-
};
|
|
1800
|
+
country?: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* City name (free text, e.g., 'Minneapolis')
|
|
1803
|
+
*/
|
|
1804
|
+
city?: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* Region name (free text, e.g., 'Minnesota')
|
|
1807
|
+
*/
|
|
1808
|
+
region?: string;
|
|
1809
|
+
/**
|
|
1810
|
+
* IANA timezone (e.g., 'America/Chicago')
|
|
1811
|
+
*/
|
|
1812
|
+
timezone?: string;
|
|
1813
|
+
};
|
|
1802
1814
|
}, {}>;
|
|
1803
|
-
declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) =>
|
|
1815
|
+
export declare const webSearch: (args?: Parameters<typeof webSearchToolFactory>[0]) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
|
|
1816
|
+
/**
|
|
1817
|
+
* An object describing the specific action taken in this web search call.
|
|
1818
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1819
|
+
*/
|
|
1820
|
+
action?: {
|
|
1804
1821
|
/**
|
|
1805
|
-
*
|
|
1806
|
-
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
1822
|
+
* Action type "search" - Performs a web search query.
|
|
1807
1823
|
*/
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
*
|
|
1816
|
-
* @deprecated Use `queries` instead.
|
|
1817
|
-
*/
|
|
1818
|
-
query?: string;
|
|
1819
|
-
/**
|
|
1820
|
-
* The search queries the model used.
|
|
1821
|
-
*/
|
|
1822
|
-
queries?: string[];
|
|
1823
|
-
} | {
|
|
1824
|
-
/**
|
|
1825
|
-
* Action type "openPage" - Opens a specific URL from search results.
|
|
1826
|
-
*/
|
|
1827
|
-
type: "openPage";
|
|
1828
|
-
/**
|
|
1829
|
-
* The URL opened by the model.
|
|
1830
|
-
*/
|
|
1831
|
-
url?: string | null;
|
|
1832
|
-
} | {
|
|
1833
|
-
/**
|
|
1834
|
-
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1835
|
-
*/
|
|
1836
|
-
type: "findInPage";
|
|
1837
|
-
/**
|
|
1838
|
-
* The URL of the page searched for the pattern.
|
|
1839
|
-
*/
|
|
1840
|
-
url?: string | null;
|
|
1841
|
-
/**
|
|
1842
|
-
* The pattern or text to search for within the page.
|
|
1843
|
-
*/
|
|
1844
|
-
pattern?: string | null;
|
|
1845
|
-
};
|
|
1824
|
+
type: "search";
|
|
1825
|
+
/**
|
|
1826
|
+
* The search query.
|
|
1827
|
+
*
|
|
1828
|
+
* @deprecated Use `queries` instead.
|
|
1829
|
+
*/
|
|
1830
|
+
query?: string;
|
|
1846
1831
|
/**
|
|
1847
|
-
*
|
|
1832
|
+
* The search queries the model used.
|
|
1848
1833
|
*/
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1834
|
+
queries?: string[];
|
|
1835
|
+
} | {
|
|
1836
|
+
/**
|
|
1837
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
1838
|
+
*/
|
|
1839
|
+
type: "openPage";
|
|
1840
|
+
/**
|
|
1841
|
+
* The URL opened by the model.
|
|
1842
|
+
*/
|
|
1843
|
+
url?: string | null;
|
|
1844
|
+
} | {
|
|
1845
|
+
/**
|
|
1846
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
1847
|
+
*/
|
|
1848
|
+
type: "findInPage";
|
|
1849
|
+
/**
|
|
1850
|
+
* The URL of the page searched for the pattern.
|
|
1851
|
+
*/
|
|
1852
|
+
url?: string | null;
|
|
1853
|
+
/**
|
|
1854
|
+
* The pattern or text to search for within the page.
|
|
1855
|
+
*/
|
|
1856
|
+
pattern?: string | null;
|
|
1857
|
+
};
|
|
1858
|
+
/**
|
|
1859
|
+
* Optional sources cited by the model for the web search call.
|
|
1860
|
+
*/
|
|
1861
|
+
sources?: Array<{
|
|
1862
|
+
type: "url";
|
|
1863
|
+
url: string;
|
|
1864
|
+
} | {
|
|
1865
|
+
type: "api";
|
|
1866
|
+
name: string;
|
|
1867
|
+
}>;
|
|
1856
1868
|
}, {}>;
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1869
|
+
//#endregion
|
|
1870
|
+
//#region src/responses/openai-responses-language-model-options.d.ts
|
|
1871
|
+
type OpenAIResponsesModelId = 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-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-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-2025-11-13' | '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-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.2-codex' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.6' | 'gpt-5.6-luna' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-6-astra' | 'gpt-6.1-sol' | 'gpt-6-luna' | 'gpt-6-sol' | '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' | 'o4-mini' | 'o4-mini-2025-04-16' | (string & {});
|
|
1872
|
+
//#endregion
|
|
1873
|
+
//#region src/responses/openai-responses-language-model.d.ts
|
|
1874
|
+
export declare const openaiResponsesSupportedUrls: Record<string, RegExp[]>;
|
|
1875
|
+
export declare class OpenAIResponsesLanguageModel implements LanguageModelV4 {
|
|
1876
|
+
readonly specificationVersion = "v4";
|
|
1877
|
+
readonly modelId: OpenAIResponsesModelId;
|
|
1878
|
+
private readonly config;
|
|
1879
|
+
static [WORKFLOW_SERIALIZE](model: OpenAIResponsesLanguageModel): {
|
|
1880
|
+
modelId: string;
|
|
1881
|
+
config: import("@ai-sdk/provider").JSONObject;
|
|
1882
|
+
};
|
|
1883
|
+
static [WORKFLOW_DESERIALIZE](options: {
|
|
1884
|
+
modelId: string;
|
|
1885
|
+
config: Parameters<typeof prepareOpenAIConfigForWorkflowDeserialize>[0];
|
|
1886
|
+
}): OpenAIResponsesLanguageModel;
|
|
1887
|
+
constructor(modelId: OpenAIResponsesModelId, config: OpenAIConfig);
|
|
1888
|
+
readonly supportedUrls: Record<string, RegExp[]>;
|
|
1889
|
+
get provider(): string;
|
|
1890
|
+
static prepareRequest({ modelId, config, options: { maxOutputTokens, temperature, stopSequences, topP, topK, presencePenalty, frequencyPenalty, seed, prompt, reasoning, providerOptions, tools, toolChoice, responseFormat } }: {
|
|
1891
|
+
modelId: OpenAIResponsesModelId;
|
|
1892
|
+
config: OpenAIConfig;
|
|
1893
|
+
options: LanguageModelV4CallOptions;
|
|
1894
|
+
}): Promise<{
|
|
1895
|
+
webSearchToolName: string | undefined;
|
|
1896
|
+
args: {
|
|
1897
|
+
tools: OpenAIResponsesTool[] | undefined;
|
|
1898
|
+
tool_choice: "none" | "auto" | "required" | {
|
|
1899
|
+
type: "file_search";
|
|
1900
|
+
} | {
|
|
1901
|
+
type: "web_search_preview";
|
|
1902
|
+
} | {
|
|
1903
|
+
type: "web_search";
|
|
1904
|
+
} | {
|
|
1905
|
+
type: "function";
|
|
1906
|
+
name: string;
|
|
1907
|
+
} | {
|
|
1908
|
+
type: "custom";
|
|
1909
|
+
name: string;
|
|
1910
|
+
} | {
|
|
1911
|
+
type: "code_interpreter";
|
|
1912
|
+
} | {
|
|
1913
|
+
type: "mcp";
|
|
1914
|
+
} | {
|
|
1915
|
+
type: "image_generation";
|
|
1916
|
+
} | {
|
|
1917
|
+
type: "apply_patch";
|
|
1918
|
+
} | {
|
|
1919
|
+
type: "computer";
|
|
1920
|
+
} | {
|
|
1921
|
+
type: "programmatic_tool_calling";
|
|
1922
|
+
} | {
|
|
1923
|
+
type: "allowed_tools";
|
|
1924
|
+
mode: "auto" | "required";
|
|
1925
|
+
tools: Array<OpenAIResponsesAllowedTool>;
|
|
1926
|
+
} | undefined;
|
|
1927
|
+
reasoning?: {
|
|
1928
|
+
context?: "auto" | "current_turn" | "all_turns" | undefined;
|
|
1929
|
+
mode?: "standard" | "pro" | undefined;
|
|
1930
|
+
summary?: string | undefined;
|
|
1931
|
+
effort?: string | undefined;
|
|
1932
|
+
} | undefined;
|
|
1933
|
+
context_management?: {
|
|
1934
|
+
type: "compaction";
|
|
1935
|
+
compact_threshold: number;
|
|
1936
|
+
}[] | undefined;
|
|
1937
|
+
conversation: string | null | undefined;
|
|
1938
|
+
max_tool_calls: number | null | undefined;
|
|
1939
|
+
metadata: any;
|
|
1940
|
+
parallel_tool_calls: boolean | null | undefined;
|
|
1941
|
+
previous_response_id: string | null | undefined;
|
|
1942
|
+
store: boolean | null | undefined;
|
|
1943
|
+
user: string | null | undefined;
|
|
1944
|
+
instructions: string | null | undefined;
|
|
1945
|
+
service_tier: "default" | "auto" | "flex" | "priority" | "fast" | "ultrafast" | null | undefined;
|
|
1946
|
+
include: OpenAIResponsesIncludeOptions;
|
|
1947
|
+
prompt_cache_key: string | null | undefined;
|
|
1948
|
+
prompt_cache_options: {
|
|
1949
|
+
mode?: "implicit" | "explicit" | undefined;
|
|
1950
|
+
ttl?: "30m" | undefined;
|
|
1951
|
+
} | undefined;
|
|
1952
|
+
prompt_cache_retention: "in_memory" | "24h" | null | undefined;
|
|
1953
|
+
safety_identifier: string | null | undefined;
|
|
1954
|
+
top_logprobs: number | undefined;
|
|
1955
|
+
truncation: "auto" | "disabled" | null | undefined;
|
|
1956
|
+
text?: {
|
|
1957
|
+
verbosity?: "low" | "medium" | "high" | undefined;
|
|
1958
|
+
format?: {
|
|
1959
|
+
type: string;
|
|
1960
|
+
strict: boolean;
|
|
1961
|
+
name: string;
|
|
1962
|
+
description: string | undefined;
|
|
1963
|
+
schema: import("@ai-sdk/provider").JSONSchema7;
|
|
1964
|
+
} | {
|
|
1965
|
+
type: string;
|
|
1966
|
+
strict?: undefined;
|
|
1967
|
+
name?: undefined;
|
|
1968
|
+
description?: undefined;
|
|
1969
|
+
schema?: undefined;
|
|
1970
|
+
} | undefined;
|
|
1971
|
+
} | undefined;
|
|
1972
|
+
model: OpenAIResponsesModelId;
|
|
1973
|
+
input: OpenAIResponsesInput;
|
|
1974
|
+
temperature: number | undefined;
|
|
1975
|
+
top_p: number | undefined;
|
|
1976
|
+
max_output_tokens: number | undefined;
|
|
1868
1977
|
};
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
config: OpenAIConfig;
|
|
1879
|
-
options: LanguageModelV4CallOptions;
|
|
1880
|
-
}): Promise<{
|
|
1881
|
-
webSearchToolName: string | undefined;
|
|
1882
|
-
args: {
|
|
1883
|
-
tools: OpenAIResponsesTool[] | undefined;
|
|
1884
|
-
tool_choice: "none" | "auto" | "required" | {
|
|
1885
|
-
type: "file_search";
|
|
1886
|
-
} | {
|
|
1887
|
-
type: "web_search_preview";
|
|
1888
|
-
} | {
|
|
1889
|
-
type: "web_search";
|
|
1890
|
-
} | {
|
|
1891
|
-
type: "function";
|
|
1892
|
-
name: string;
|
|
1893
|
-
} | {
|
|
1894
|
-
type: "custom";
|
|
1895
|
-
name: string;
|
|
1896
|
-
} | {
|
|
1897
|
-
type: "code_interpreter";
|
|
1898
|
-
} | {
|
|
1899
|
-
type: "mcp";
|
|
1900
|
-
} | {
|
|
1901
|
-
type: "image_generation";
|
|
1902
|
-
} | {
|
|
1903
|
-
type: "apply_patch";
|
|
1904
|
-
} | {
|
|
1905
|
-
type: "computer";
|
|
1906
|
-
} | {
|
|
1907
|
-
type: "programmatic_tool_calling";
|
|
1908
|
-
} | {
|
|
1909
|
-
type: "allowed_tools";
|
|
1910
|
-
mode: "auto" | "required";
|
|
1911
|
-
tools: Array<OpenAIResponsesAllowedTool>;
|
|
1912
|
-
} | undefined;
|
|
1913
|
-
reasoning?: {
|
|
1914
|
-
context?: "auto" | "current_turn" | "all_turns" | undefined;
|
|
1915
|
-
mode?: "standard" | "pro" | undefined;
|
|
1916
|
-
summary?: string | undefined;
|
|
1917
|
-
effort?: string | undefined;
|
|
1918
|
-
} | undefined;
|
|
1919
|
-
context_management?: {
|
|
1920
|
-
type: "compaction";
|
|
1921
|
-
compact_threshold: number;
|
|
1922
|
-
}[] | undefined;
|
|
1923
|
-
conversation: string | null | undefined;
|
|
1924
|
-
max_tool_calls: number | null | undefined;
|
|
1925
|
-
metadata: any;
|
|
1926
|
-
parallel_tool_calls: boolean | null | undefined;
|
|
1927
|
-
previous_response_id: string | null | undefined;
|
|
1928
|
-
store: boolean | null | undefined;
|
|
1929
|
-
user: string | null | undefined;
|
|
1930
|
-
instructions: string | null | undefined;
|
|
1931
|
-
service_tier: "default" | "auto" | "flex" | "priority" | "fast" | "ultrafast" | null | undefined;
|
|
1932
|
-
include: OpenAIResponsesIncludeOptions;
|
|
1933
|
-
prompt_cache_key: string | null | undefined;
|
|
1934
|
-
prompt_cache_options: {
|
|
1935
|
-
mode?: "explicit" | "implicit" | undefined;
|
|
1936
|
-
ttl?: "30m" | undefined;
|
|
1937
|
-
} | undefined;
|
|
1938
|
-
prompt_cache_retention: "in_memory" | "24h" | null | undefined;
|
|
1939
|
-
safety_identifier: string | null | undefined;
|
|
1940
|
-
top_logprobs: number | undefined;
|
|
1941
|
-
truncation: "auto" | "disabled" | null | undefined;
|
|
1942
|
-
text?: {
|
|
1943
|
-
verbosity?: "low" | "medium" | "high" | undefined;
|
|
1944
|
-
format?: {
|
|
1945
|
-
type: string;
|
|
1946
|
-
strict: boolean;
|
|
1947
|
-
name: string;
|
|
1948
|
-
description: string | undefined;
|
|
1949
|
-
schema: _ai_sdk_provider.JSONSchema7;
|
|
1950
|
-
} | {
|
|
1951
|
-
type: string;
|
|
1952
|
-
strict?: undefined;
|
|
1953
|
-
name?: undefined;
|
|
1954
|
-
description?: undefined;
|
|
1955
|
-
schema?: undefined;
|
|
1956
|
-
} | undefined;
|
|
1957
|
-
} | undefined;
|
|
1958
|
-
model: OpenAIResponsesModelId;
|
|
1959
|
-
input: OpenAIResponsesInput;
|
|
1960
|
-
temperature: number | undefined;
|
|
1961
|
-
top_p: number | undefined;
|
|
1962
|
-
max_output_tokens: number | undefined;
|
|
1963
|
-
};
|
|
1964
|
-
warnings: SharedV4Warning[];
|
|
1965
|
-
store: boolean | null | undefined;
|
|
1966
|
-
toolNameMapping: _ai_sdk_provider_utils.ToolNameMapping;
|
|
1967
|
-
providerOptionsName: string;
|
|
1968
|
-
isShellProviderExecuted: boolean;
|
|
1969
|
-
}>;
|
|
1970
|
-
private getArgs;
|
|
1971
|
-
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
1972
|
-
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
1978
|
+
warnings: SharedV4Warning[];
|
|
1979
|
+
store: boolean | null | undefined;
|
|
1980
|
+
toolNameMapping: import("@ai-sdk/provider-utils").ToolNameMapping;
|
|
1981
|
+
providerOptionsName: string;
|
|
1982
|
+
isShellProviderExecuted: boolean;
|
|
1983
|
+
}>;
|
|
1984
|
+
private getArgs;
|
|
1985
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
1986
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
1973
1987
|
}
|
|
1974
|
-
declare function mapWebSearchOutput(action: OpenAIResponsesWebSearchAction | null | undefined): InferSchema<typeof webSearchOutputSchema>;
|
|
1975
|
-
|
|
1988
|
+
export declare function mapWebSearchOutput(action: OpenAIResponsesWebSearchAction | null | undefined): InferSchema<typeof webSearchOutputSchema>;
|
|
1989
|
+
//#endregion
|
|
1990
|
+
//#region src/responses/openai-responses-provider-metadata.d.ts
|
|
1976
1991
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
1977
1992
|
type ResponsesOutputTextAnnotationProviderMetadata = Extract<OpenaiResponsesChunk, {
|
|
1978
|
-
|
|
1993
|
+
type: 'response.output_text.annotation.added';
|
|
1979
1994
|
}>['annotation'];
|
|
1980
|
-
type ResponsesProviderMetadata = {
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1995
|
+
export type ResponsesProviderMetadata = {
|
|
1996
|
+
responseId: string | null | undefined;
|
|
1997
|
+
logprobs?: Array<OpenAIResponsesLogprobs>;
|
|
1998
|
+
serviceTier?: string;
|
|
1999
|
+
reasoningContext?: string;
|
|
1985
2000
|
};
|
|
1986
|
-
type ResponsesReasoningProviderMetadata = {
|
|
1987
|
-
|
|
1988
|
-
|
|
2001
|
+
export type ResponsesReasoningProviderMetadata = {
|
|
2002
|
+
itemId: string;
|
|
2003
|
+
reasoningEncryptedContent?: string | null;
|
|
1989
2004
|
};
|
|
1990
|
-
type OpenaiResponsesReasoningProviderMetadata = {
|
|
1991
|
-
|
|
2005
|
+
export type OpenaiResponsesReasoningProviderMetadata = {
|
|
2006
|
+
openai: ResponsesReasoningProviderMetadata;
|
|
1992
2007
|
};
|
|
1993
|
-
type OpenaiResponsesProviderMetadata = {
|
|
1994
|
-
|
|
2008
|
+
export type OpenaiResponsesProviderMetadata = {
|
|
2009
|
+
openai: ResponsesProviderMetadata;
|
|
1995
2010
|
};
|
|
1996
|
-
type ResponsesToolCallProviderMetadata = {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2011
|
+
export type ResponsesToolCallProviderMetadata = {
|
|
2012
|
+
itemId: string;
|
|
2013
|
+
async?: boolean;
|
|
2014
|
+
namespace?: string;
|
|
2015
|
+
caller?: {
|
|
2016
|
+
type: 'direct';
|
|
2017
|
+
} | {
|
|
2018
|
+
type: 'program';
|
|
2019
|
+
callerId: string;
|
|
2020
|
+
};
|
|
2006
2021
|
};
|
|
2007
|
-
type OpenaiResponsesToolCallProviderMetadata = {
|
|
2008
|
-
|
|
2022
|
+
export type OpenaiResponsesToolCallProviderMetadata = {
|
|
2023
|
+
openai: ResponsesToolCallProviderMetadata;
|
|
2009
2024
|
};
|
|
2010
|
-
type ResponsesCompactionProviderMetadata = {
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2025
|
+
export type ResponsesCompactionProviderMetadata = {
|
|
2026
|
+
type: 'compaction';
|
|
2027
|
+
itemId: string;
|
|
2028
|
+
encryptedContent?: string;
|
|
2014
2029
|
};
|
|
2015
|
-
type OpenaiResponsesCompactionProviderMetadata = {
|
|
2016
|
-
|
|
2030
|
+
export type OpenaiResponsesCompactionProviderMetadata = {
|
|
2031
|
+
openai: ResponsesCompactionProviderMetadata;
|
|
2017
2032
|
};
|
|
2018
|
-
type ResponsesTextProviderMetadata = {
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2033
|
+
export type ResponsesTextProviderMetadata = {
|
|
2034
|
+
itemId: string;
|
|
2035
|
+
phase?: 'commentary' | 'final_answer' | null;
|
|
2036
|
+
annotations?: Array<ResponsesOutputTextAnnotationProviderMetadata>;
|
|
2022
2037
|
};
|
|
2023
|
-
type OpenaiResponsesTextProviderMetadata = {
|
|
2024
|
-
|
|
2038
|
+
export type OpenaiResponsesTextProviderMetadata = {
|
|
2039
|
+
openai: ResponsesTextProviderMetadata;
|
|
2025
2040
|
};
|
|
2026
|
-
type ResponsesSourceDocumentProviderMetadata = {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2041
|
+
export type ResponsesSourceDocumentProviderMetadata = {
|
|
2042
|
+
type: 'file_citation';
|
|
2043
|
+
fileId: string;
|
|
2044
|
+
index: number;
|
|
2030
2045
|
} | {
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2046
|
+
type: 'container_file_citation';
|
|
2047
|
+
fileId: string;
|
|
2048
|
+
containerId: string;
|
|
2034
2049
|
} | {
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2050
|
+
type: 'file_path';
|
|
2051
|
+
fileId: string;
|
|
2052
|
+
index: number;
|
|
2038
2053
|
};
|
|
2039
|
-
type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
2040
|
-
|
|
2054
|
+
export type OpenaiResponsesSourceDocumentProviderMetadata = {
|
|
2055
|
+
openai: ResponsesSourceDocumentProviderMetadata;
|
|
2041
2056
|
};
|
|
2042
|
-
|
|
2057
|
+
//#endregion
|
|
2058
|
+
//#region src/tool/apply-patch.d.ts
|
|
2043
2059
|
/**
|
|
2044
2060
|
* Schema for the apply_patch input - what the model sends.
|
|
2045
2061
|
*
|
|
2046
2062
|
* Refer the official spec here: https://platform.openai.com/docs/api-reference/responses/create#responses_create-input-input_item_list-item-apply_patch_tool_call
|
|
2047
2063
|
*
|
|
2048
2064
|
*/
|
|
2049
|
-
declare const applyPatchInputSchema:
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2065
|
+
export declare const applyPatchInputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2066
|
+
callId: string;
|
|
2067
|
+
operation: {
|
|
2068
|
+
type: "create_file";
|
|
2069
|
+
path: string;
|
|
2070
|
+
diff: string;
|
|
2071
|
+
} | {
|
|
2072
|
+
type: "delete_file";
|
|
2073
|
+
path: string;
|
|
2074
|
+
} | {
|
|
2075
|
+
type: "update_file";
|
|
2076
|
+
path: string;
|
|
2077
|
+
diff: string;
|
|
2078
|
+
};
|
|
2063
2079
|
}>;
|
|
2064
2080
|
/**
|
|
2065
2081
|
* Schema for the apply_patch output - what we send back.
|
|
2066
2082
|
*/
|
|
2067
|
-
declare const applyPatchOutputSchema:
|
|
2068
|
-
|
|
2069
|
-
|
|
2083
|
+
export declare const applyPatchOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2084
|
+
status: "completed" | "failed";
|
|
2085
|
+
output?: string | undefined;
|
|
2070
2086
|
}>;
|
|
2071
2087
|
/**
|
|
2072
2088
|
* Schema for tool arguments (configuration options).
|
|
2073
2089
|
* The apply_patch tool doesn't require any configuration options.
|
|
2074
2090
|
*/
|
|
2075
|
-
declare const applyPatchArgsSchema:
|
|
2091
|
+
export declare const applyPatchArgsSchema: import("@ai-sdk/provider-utils").LazySchema<Record<string, never>>;
|
|
2076
2092
|
/**
|
|
2077
2093
|
* Type definitions for the apply_patch operations.
|
|
2078
2094
|
*/
|
|
2079
|
-
type ApplyPatchOperation = {
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2095
|
+
export type ApplyPatchOperation = {
|
|
2096
|
+
type: 'create_file';
|
|
2097
|
+
/**
|
|
2098
|
+
* Path of the file to create relative to the workspace root.
|
|
2099
|
+
*/
|
|
2100
|
+
path: string;
|
|
2101
|
+
/**
|
|
2102
|
+
* Unified diff content to apply when creating the file.
|
|
2103
|
+
*/
|
|
2104
|
+
diff: string;
|
|
2089
2105
|
} | {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2106
|
+
type: 'delete_file';
|
|
2107
|
+
/**
|
|
2108
|
+
* Path of the file to delete relative to the workspace root.
|
|
2109
|
+
*/
|
|
2110
|
+
path: string;
|
|
2095
2111
|
} | {
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2112
|
+
type: 'update_file';
|
|
2113
|
+
/**
|
|
2114
|
+
* Path of the file to update relative to the workspace root.
|
|
2115
|
+
*/
|
|
2116
|
+
path: string;
|
|
2117
|
+
/**
|
|
2118
|
+
* Unified diff content to apply to the existing file.
|
|
2119
|
+
*/
|
|
2120
|
+
diff: string;
|
|
2105
2121
|
};
|
|
2106
2122
|
/**
|
|
2107
2123
|
* The apply_patch tool lets GPT-5.1 create, update, and delete files in your
|
|
@@ -2114,27 +2130,27 @@ type ApplyPatchOperation = {
|
|
|
2114
2130
|
* - Returns the status of applying those patches (completed or failed)
|
|
2115
2131
|
*
|
|
2116
2132
|
*/
|
|
2117
|
-
declare const applyPatchToolFactory:
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2133
|
+
export declare const applyPatchToolFactory: import("@ai-sdk/provider-utils").ProviderDefinedToolFactoryWithOutputSchema<{
|
|
2134
|
+
/**
|
|
2135
|
+
* The unique ID of the apply patch tool call generated by the model.
|
|
2136
|
+
*/
|
|
2137
|
+
callId: string;
|
|
2138
|
+
/**
|
|
2139
|
+
* The specific create, delete, or update instruction for the apply_patch tool call.
|
|
2140
|
+
*/
|
|
2141
|
+
operation: ApplyPatchOperation;
|
|
2126
2142
|
}, {
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* The status of the apply patch tool call output.
|
|
2145
|
+
* - 'completed': The patch was applied successfully.
|
|
2146
|
+
* - 'failed': The patch failed to apply.
|
|
2147
|
+
*/
|
|
2148
|
+
status: "completed" | "failed";
|
|
2149
|
+
/**
|
|
2150
|
+
* Optional human-readable log text from the apply patch tool
|
|
2151
|
+
* (e.g., patch results or errors).
|
|
2152
|
+
*/
|
|
2153
|
+
output?: string;
|
|
2138
2154
|
}, {}, {}>;
|
|
2139
2155
|
/**
|
|
2140
2156
|
* The apply_patch tool lets GPT-5.1 create, update, and delete files in your
|
|
@@ -2142,395 +2158,400 @@ declare const applyPatchToolFactory: _ai_sdk_provider_utils.ProviderDefinedToolF
|
|
|
2142
2158
|
* emits patch operations that your application applies and then reports back on,
|
|
2143
2159
|
* enabling iterative, multi-step code editing workflows.
|
|
2144
2160
|
*/
|
|
2145
|
-
declare const applyPatch:
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2161
|
+
export declare const applyPatch: import("@ai-sdk/provider-utils").ProviderDefinedToolFactoryWithOutputSchema<{
|
|
2162
|
+
/**
|
|
2163
|
+
* The unique ID of the apply patch tool call generated by the model.
|
|
2164
|
+
*/
|
|
2165
|
+
callId: string;
|
|
2166
|
+
/**
|
|
2167
|
+
* The specific create, delete, or update instruction for the apply_patch tool call.
|
|
2168
|
+
*/
|
|
2169
|
+
operation: ApplyPatchOperation;
|
|
2154
2170
|
}, {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2171
|
+
/**
|
|
2172
|
+
* The status of the apply patch tool call output.
|
|
2173
|
+
* - 'completed': The patch was applied successfully.
|
|
2174
|
+
* - 'failed': The patch failed to apply.
|
|
2175
|
+
*/
|
|
2176
|
+
status: "completed" | "failed";
|
|
2177
|
+
/**
|
|
2178
|
+
* Optional human-readable log text from the apply patch tool
|
|
2179
|
+
* (e.g., patch results or errors).
|
|
2180
|
+
*/
|
|
2181
|
+
output?: string;
|
|
2166
2182
|
}, {}, {}>;
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2183
|
+
//#endregion
|
|
2184
|
+
//#region src/tool/code-interpreter.d.ts
|
|
2185
|
+
export declare const codeInterpreterInputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2186
|
+
containerId: string;
|
|
2187
|
+
code?: string | null | undefined;
|
|
2171
2188
|
}>;
|
|
2172
|
-
declare const codeInterpreterOutputSchema:
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2189
|
+
export declare const codeInterpreterOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2190
|
+
outputs?: ({
|
|
2191
|
+
type: "logs";
|
|
2192
|
+
logs: string;
|
|
2193
|
+
} | {
|
|
2194
|
+
type: "image";
|
|
2195
|
+
url: string;
|
|
2196
|
+
})[] | null | undefined;
|
|
2180
2197
|
}>;
|
|
2181
|
-
declare const codeInterpreterArgsSchema:
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2198
|
+
export declare const codeInterpreterArgsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2199
|
+
container?: string | {
|
|
2200
|
+
fileIds?: string[] | undefined;
|
|
2201
|
+
} | undefined;
|
|
2185
2202
|
}>;
|
|
2186
2203
|
type CodeInterpreterArgs = {
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2204
|
+
/**
|
|
2205
|
+
* The code interpreter container.
|
|
2206
|
+
* Can be a container ID
|
|
2207
|
+
* or an object that specifies uploaded file IDs to make available to your code.
|
|
2208
|
+
*/
|
|
2209
|
+
container?: string | {
|
|
2210
|
+
fileIds?: string[];
|
|
2211
|
+
};
|
|
2195
2212
|
};
|
|
2196
|
-
declare const codeInterpreterToolFactory:
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2213
|
+
export declare const codeInterpreterToolFactory: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{
|
|
2214
|
+
/**
|
|
2215
|
+
* The code to run, or null if not available.
|
|
2216
|
+
*/
|
|
2217
|
+
code?: string | null;
|
|
2218
|
+
/**
|
|
2219
|
+
* The ID of the container used to run the code.
|
|
2220
|
+
*/
|
|
2221
|
+
containerId: string;
|
|
2205
2222
|
}, {
|
|
2223
|
+
/**
|
|
2224
|
+
* The outputs generated by the code interpreter, such as logs or images.
|
|
2225
|
+
* Can be null if no outputs are available.
|
|
2226
|
+
*/
|
|
2227
|
+
outputs?: Array<{
|
|
2228
|
+
type: "logs";
|
|
2206
2229
|
/**
|
|
2207
|
-
* The
|
|
2208
|
-
* Can be null if no outputs are available.
|
|
2230
|
+
* The logs output from the code interpreter.
|
|
2209
2231
|
*/
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
* The logs output from the code interpreter.
|
|
2214
|
-
*/
|
|
2215
|
-
logs: string;
|
|
2216
|
-
} | {
|
|
2217
|
-
type: "image";
|
|
2218
|
-
/**
|
|
2219
|
-
* The URL of the image output from the code interpreter.
|
|
2220
|
-
*/
|
|
2221
|
-
url: string;
|
|
2222
|
-
}> | null;
|
|
2223
|
-
}, CodeInterpreterArgs, {}>;
|
|
2224
|
-
declare const codeInterpreter: (args?: CodeInterpreterArgs) => _ai_sdk_provider_utils.ProviderExecutedTool<{
|
|
2232
|
+
logs: string;
|
|
2233
|
+
} | {
|
|
2234
|
+
type: "image";
|
|
2225
2235
|
/**
|
|
2226
|
-
* The
|
|
2236
|
+
* The URL of the image output from the code interpreter.
|
|
2227
2237
|
*/
|
|
2228
|
-
|
|
2238
|
+
url: string;
|
|
2239
|
+
}> | null;
|
|
2240
|
+
}, CodeInterpreterArgs, {}>;
|
|
2241
|
+
export declare const codeInterpreter: (args?: CodeInterpreterArgs) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{
|
|
2242
|
+
/**
|
|
2243
|
+
* The code to run, or null if not available.
|
|
2244
|
+
*/
|
|
2245
|
+
code?: string | null;
|
|
2246
|
+
/**
|
|
2247
|
+
* The ID of the container used to run the code.
|
|
2248
|
+
*/
|
|
2249
|
+
containerId: string;
|
|
2250
|
+
}, {
|
|
2251
|
+
/**
|
|
2252
|
+
* The outputs generated by the code interpreter, such as logs or images.
|
|
2253
|
+
* Can be null if no outputs are available.
|
|
2254
|
+
*/
|
|
2255
|
+
outputs?: Array<{
|
|
2256
|
+
type: "logs";
|
|
2229
2257
|
/**
|
|
2230
|
-
* The
|
|
2258
|
+
* The logs output from the code interpreter.
|
|
2231
2259
|
*/
|
|
2232
|
-
|
|
2233
|
-
}
|
|
2260
|
+
logs: string;
|
|
2261
|
+
} | {
|
|
2262
|
+
type: "image";
|
|
2234
2263
|
/**
|
|
2235
|
-
* The
|
|
2236
|
-
* Can be null if no outputs are available.
|
|
2264
|
+
* The URL of the image output from the code interpreter.
|
|
2237
2265
|
*/
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* The logs output from the code interpreter.
|
|
2242
|
-
*/
|
|
2243
|
-
logs: string;
|
|
2244
|
-
} | {
|
|
2245
|
-
type: "image";
|
|
2246
|
-
/**
|
|
2247
|
-
* The URL of the image output from the code interpreter.
|
|
2248
|
-
*/
|
|
2249
|
-
url: string;
|
|
2250
|
-
}> | null;
|
|
2266
|
+
url: string;
|
|
2267
|
+
}> | null;
|
|
2251
2268
|
}, {}>;
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2269
|
+
//#endregion
|
|
2270
|
+
//#region src/tool/file-search.d.ts
|
|
2271
|
+
export declare const fileSearchArgsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2272
|
+
vectorStoreIds: string[];
|
|
2273
|
+
maxNumResults?: number | undefined;
|
|
2274
|
+
ranking?: {
|
|
2275
|
+
ranker?: string | undefined;
|
|
2276
|
+
scoreThreshold?: number | undefined;
|
|
2277
|
+
} | undefined;
|
|
2278
|
+
filters?: any;
|
|
2261
2279
|
}>;
|
|
2262
|
-
declare const fileSearchOutputSchema:
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2280
|
+
export declare const fileSearchOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2281
|
+
queries: string[];
|
|
2282
|
+
results: {
|
|
2283
|
+
attributes: Record<string, unknown>;
|
|
2284
|
+
fileId: string;
|
|
2285
|
+
filename: string;
|
|
2286
|
+
score: number;
|
|
2287
|
+
text: string;
|
|
2288
|
+
}[] | null;
|
|
2271
2289
|
}>;
|
|
2272
|
-
declare const fileSearch:
|
|
2290
|
+
export declare const fileSearch: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
|
|
2291
|
+
/**
|
|
2292
|
+
* The search query to execute.
|
|
2293
|
+
*/
|
|
2294
|
+
queries: string[];
|
|
2295
|
+
/**
|
|
2296
|
+
* The results of the file search tool call.
|
|
2297
|
+
*/
|
|
2298
|
+
results: null | {
|
|
2273
2299
|
/**
|
|
2274
|
-
*
|
|
2300
|
+
* Set of 16 key-value pairs that can be attached to an object.
|
|
2301
|
+
* This can be useful for storing additional information about the object
|
|
2302
|
+
* in a structured format, and querying for objects via API or the dashboard.
|
|
2303
|
+
* Keys are strings with a maximum length of 64 characters.
|
|
2304
|
+
* Values are strings with a maximum length of 512 characters, booleans, or numbers.
|
|
2275
2305
|
*/
|
|
2276
|
-
|
|
2306
|
+
attributes: Record<string, unknown>;
|
|
2277
2307
|
/**
|
|
2278
|
-
* The
|
|
2308
|
+
* The unique ID of the file.
|
|
2279
2309
|
*/
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
* Set of 16 key-value pairs that can be attached to an object.
|
|
2283
|
-
* This can be useful for storing additional information about the object
|
|
2284
|
-
* in a structured format, and querying for objects via API or the dashboard.
|
|
2285
|
-
* Keys are strings with a maximum length of 64 characters.
|
|
2286
|
-
* Values are strings with a maximum length of 512 characters, booleans, or numbers.
|
|
2287
|
-
*/
|
|
2288
|
-
attributes: Record<string, unknown>;
|
|
2289
|
-
/**
|
|
2290
|
-
* The unique ID of the file.
|
|
2291
|
-
*/
|
|
2292
|
-
fileId: string;
|
|
2293
|
-
/**
|
|
2294
|
-
* The name of the file.
|
|
2295
|
-
*/
|
|
2296
|
-
filename: string;
|
|
2297
|
-
/**
|
|
2298
|
-
* The relevance score of the file - a value between 0 and 1.
|
|
2299
|
-
*/
|
|
2300
|
-
score: number;
|
|
2301
|
-
/**
|
|
2302
|
-
* The text that was retrieved from the file.
|
|
2303
|
-
*/
|
|
2304
|
-
text: string;
|
|
2305
|
-
}[];
|
|
2306
|
-
}, {
|
|
2310
|
+
fileId: string;
|
|
2307
2311
|
/**
|
|
2308
|
-
*
|
|
2312
|
+
* The name of the file.
|
|
2309
2313
|
*/
|
|
2310
|
-
|
|
2314
|
+
filename: string;
|
|
2311
2315
|
/**
|
|
2312
|
-
*
|
|
2316
|
+
* The relevance score of the file - a value between 0 and 1.
|
|
2313
2317
|
*/
|
|
2314
|
-
|
|
2318
|
+
score: number;
|
|
2315
2319
|
/**
|
|
2316
|
-
*
|
|
2320
|
+
* The text that was retrieved from the file.
|
|
2317
2321
|
*/
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2322
|
+
text: string;
|
|
2323
|
+
}[];
|
|
2324
|
+
}, {
|
|
2325
|
+
/**
|
|
2326
|
+
* List of vector store IDs to search through.
|
|
2327
|
+
*/
|
|
2328
|
+
vectorStoreIds: string[];
|
|
2329
|
+
/**
|
|
2330
|
+
* Maximum number of search results to return. Defaults to 10.
|
|
2331
|
+
*/
|
|
2332
|
+
maxNumResults?: number;
|
|
2333
|
+
/**
|
|
2334
|
+
* Ranking options for the search.
|
|
2335
|
+
*/
|
|
2336
|
+
ranking?: {
|
|
2330
2337
|
/**
|
|
2331
|
-
*
|
|
2338
|
+
* The ranker to use for the file search.
|
|
2332
2339
|
*/
|
|
2333
|
-
|
|
2340
|
+
ranker?: string;
|
|
2341
|
+
/**
|
|
2342
|
+
* The score threshold for the file search, a number between 0 and 1.
|
|
2343
|
+
* Numbers closer to 1 will attempt to return only the most relevant results,
|
|
2344
|
+
* but may return fewer results.
|
|
2345
|
+
*/
|
|
2346
|
+
scoreThreshold?: number;
|
|
2347
|
+
};
|
|
2348
|
+
/**
|
|
2349
|
+
* A filter to apply.
|
|
2350
|
+
*/
|
|
2351
|
+
filters?: OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter;
|
|
2334
2352
|
}, {}>;
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2353
|
+
//#endregion
|
|
2354
|
+
//#region src/tool/image-generation.d.ts
|
|
2355
|
+
export declare const imageGenerationArgsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2356
|
+
action?: "auto" | "generate" | "edit" | undefined;
|
|
2357
|
+
background?: "auto" | "transparent" | "opaque" | undefined;
|
|
2358
|
+
inputFidelity?: "low" | "high" | undefined;
|
|
2359
|
+
inputImageMask?: {
|
|
2360
|
+
fileId?: string | undefined;
|
|
2361
|
+
imageUrl?: string | undefined;
|
|
2362
|
+
} | undefined;
|
|
2363
|
+
model?: string | undefined;
|
|
2364
|
+
moderation?: "low" | "auto" | undefined;
|
|
2365
|
+
outputCompression?: number | undefined;
|
|
2366
|
+
outputFormat?: "png" | "jpeg" | "webp" | undefined;
|
|
2367
|
+
partialImages?: number | undefined;
|
|
2368
|
+
quality?: "low" | "medium" | "high" | "xhigh" | "max" | "auto" | undefined;
|
|
2369
|
+
size?: string | undefined;
|
|
2351
2370
|
}>;
|
|
2352
|
-
declare const imageGenerationOutputSchema:
|
|
2353
|
-
|
|
2371
|
+
export declare const imageGenerationOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2372
|
+
result: string;
|
|
2354
2373
|
}>;
|
|
2355
2374
|
type ImageGenerationArgs = {
|
|
2375
|
+
/**
|
|
2376
|
+
* Whether to generate a new image or edit an existing image. Default: auto.
|
|
2377
|
+
*/
|
|
2378
|
+
action?: 'generate' | 'edit' | 'auto';
|
|
2379
|
+
/**
|
|
2380
|
+
* Background type for the generated image. Default is 'auto'.
|
|
2381
|
+
*/
|
|
2382
|
+
background?: 'auto' | 'opaque' | 'transparent';
|
|
2383
|
+
/**
|
|
2384
|
+
* Input fidelity for the generated image. Default is 'low'.
|
|
2385
|
+
*/
|
|
2386
|
+
inputFidelity?: 'low' | 'high';
|
|
2387
|
+
/**
|
|
2388
|
+
* Optional mask for inpainting.
|
|
2389
|
+
* Contains image_url (string, optional) and file_id (string, optional).
|
|
2390
|
+
*/
|
|
2391
|
+
inputImageMask?: {
|
|
2356
2392
|
/**
|
|
2357
|
-
*
|
|
2358
|
-
*/
|
|
2359
|
-
action?: 'generate' | 'edit' | 'auto';
|
|
2360
|
-
/**
|
|
2361
|
-
* Background type for the generated image. Default is 'auto'.
|
|
2362
|
-
*/
|
|
2363
|
-
background?: 'auto' | 'opaque' | 'transparent';
|
|
2364
|
-
/**
|
|
2365
|
-
* Input fidelity for the generated image. Default is 'low'.
|
|
2366
|
-
*/
|
|
2367
|
-
inputFidelity?: 'low' | 'high';
|
|
2368
|
-
/**
|
|
2369
|
-
* Optional mask for inpainting.
|
|
2370
|
-
* Contains image_url (string, optional) and file_id (string, optional).
|
|
2371
|
-
*/
|
|
2372
|
-
inputImageMask?: {
|
|
2373
|
-
/**
|
|
2374
|
-
* File ID for the mask image.
|
|
2375
|
-
*/
|
|
2376
|
-
fileId?: string;
|
|
2377
|
-
/**
|
|
2378
|
-
* Base64-encoded mask image.
|
|
2379
|
-
*/
|
|
2380
|
-
imageUrl?: string;
|
|
2381
|
-
};
|
|
2382
|
-
/**
|
|
2383
|
-
* The image generation model to use. Default: gpt-image-1.
|
|
2384
|
-
*/
|
|
2385
|
-
model?: string;
|
|
2386
|
-
/**
|
|
2387
|
-
* Moderation level for the generated image. One of auto or low. Default: auto.
|
|
2393
|
+
* File ID for the mask image.
|
|
2388
2394
|
*/
|
|
2389
|
-
|
|
2395
|
+
fileId?: string;
|
|
2390
2396
|
/**
|
|
2391
|
-
*
|
|
2397
|
+
* Base64-encoded mask image.
|
|
2392
2398
|
*/
|
|
2393
|
-
|
|
2399
|
+
imageUrl?: string;
|
|
2400
|
+
};
|
|
2401
|
+
/**
|
|
2402
|
+
* The image generation model to use. Default: gpt-image-1.
|
|
2403
|
+
*/
|
|
2404
|
+
model?: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* Moderation level for the generated image. One of auto or low. Default: auto.
|
|
2407
|
+
*/
|
|
2408
|
+
moderation?: 'auto' | 'low';
|
|
2409
|
+
/**
|
|
2410
|
+
* Compression level for the output image. Default: 100.
|
|
2411
|
+
*/
|
|
2412
|
+
outputCompression?: number;
|
|
2413
|
+
/**
|
|
2414
|
+
* The output format of the generated image. One of png, webp, or jpeg.
|
|
2415
|
+
* Default: png
|
|
2416
|
+
*/
|
|
2417
|
+
outputFormat?: 'png' | 'jpeg' | 'webp';
|
|
2418
|
+
/**
|
|
2419
|
+
* Number of partial images to generate in streaming mode, from 0 (default value) to 3.
|
|
2420
|
+
*/
|
|
2421
|
+
partialImages?: number;
|
|
2422
|
+
/**
|
|
2423
|
+
* The quality of the generated image.
|
|
2424
|
+
* One of low, medium, high, xhigh, max, or auto. Default: auto.
|
|
2425
|
+
* xhigh and max are supported by GPT Image 2.5 models.
|
|
2426
|
+
*/
|
|
2427
|
+
quality?: 'auto' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
2428
|
+
/**
|
|
2429
|
+
* The size of the generated image.
|
|
2430
|
+
* One of 1024x1024, 1024x1536, 1536x1024, or auto. GPT Image 2 and 2.5
|
|
2431
|
+
* models also accept arbitrary WIDTHxHEIGHT sizes where both are divisible
|
|
2432
|
+
* by 16, e.g. 1536x864.
|
|
2433
|
+
* Default: auto.
|
|
2434
|
+
*/
|
|
2435
|
+
size?: 'auto' | '1024x1024' | '1024x1536' | '1536x1024' | (string & {});
|
|
2436
|
+
};
|
|
2437
|
+
export declare const imageGeneration: (args?: ImageGenerationArgs) => import("@ai-sdk/provider-utils").ProviderExecutedTool<{}, {
|
|
2438
|
+
/**
|
|
2439
|
+
* The generated image encoded in base64.
|
|
2440
|
+
*/
|
|
2441
|
+
result: string;
|
|
2442
|
+
}, {}>;
|
|
2443
|
+
//#endregion
|
|
2444
|
+
//#region src/tool/programmatic-tool-calling.d.ts
|
|
2445
|
+
export declare const programmaticToolCallingInputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2446
|
+
code: string;
|
|
2447
|
+
fingerprint: string;
|
|
2448
|
+
}>;
|
|
2449
|
+
export declare const programmaticToolCallingOutputSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2450
|
+
result: string;
|
|
2451
|
+
status: "completed" | "incomplete";
|
|
2452
|
+
}>;
|
|
2453
|
+
export declare const programmaticToolCalling: () => import("@ai-sdk/provider-utils").Experimental_ToolCallerTool<import("@ai-sdk/provider-utils").ProviderExecutedTool<{
|
|
2454
|
+
/**
|
|
2455
|
+
* JavaScript source generated and executed by OpenAI.
|
|
2456
|
+
*/
|
|
2457
|
+
code: string;
|
|
2458
|
+
/**
|
|
2459
|
+
* Opaque replay fingerprint that must be preserved across requests.
|
|
2460
|
+
*/
|
|
2461
|
+
fingerprint: string;
|
|
2462
|
+
}, {
|
|
2463
|
+
/**
|
|
2464
|
+
* The result emitted by the hosted JavaScript program.
|
|
2465
|
+
*/
|
|
2466
|
+
result: string;
|
|
2467
|
+
/**
|
|
2468
|
+
* Whether the program completed or stopped before producing a final result.
|
|
2469
|
+
*/
|
|
2470
|
+
status: "completed" | "incomplete";
|
|
2471
|
+
}, {}>>;
|
|
2472
|
+
//#endregion
|
|
2473
|
+
//#region src/tool/web-search-preview.d.ts
|
|
2474
|
+
export declare const webSearchPreviewArgsSchema: import("@ai-sdk/provider-utils").LazySchema<{
|
|
2475
|
+
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
2476
|
+
userLocation?: {
|
|
2477
|
+
type: "approximate";
|
|
2478
|
+
country?: string | undefined;
|
|
2479
|
+
city?: string | undefined;
|
|
2480
|
+
region?: string | undefined;
|
|
2481
|
+
timezone?: string | undefined;
|
|
2482
|
+
} | undefined;
|
|
2483
|
+
}>;
|
|
2484
|
+
export declare const webSearchPreviewInputSchema: import("@ai-sdk/provider-utils").LazySchema<Record<string, never>>;
|
|
2485
|
+
export declare const webSearchPreview: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {
|
|
2486
|
+
/**
|
|
2487
|
+
* An object describing the specific action taken in this web search call.
|
|
2488
|
+
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
2489
|
+
*/
|
|
2490
|
+
action?: {
|
|
2394
2491
|
/**
|
|
2395
|
-
*
|
|
2396
|
-
* Default: png
|
|
2492
|
+
* Action type "search" - Performs a web search query.
|
|
2397
2493
|
*/
|
|
2398
|
-
|
|
2494
|
+
type: "search";
|
|
2399
2495
|
/**
|
|
2400
|
-
*
|
|
2496
|
+
* The search query.
|
|
2401
2497
|
*/
|
|
2402
|
-
|
|
2498
|
+
query?: string;
|
|
2499
|
+
} | {
|
|
2403
2500
|
/**
|
|
2404
|
-
*
|
|
2405
|
-
* One of low, medium, high, xhigh, max, or auto. Default: auto.
|
|
2406
|
-
* xhigh and max are supported by GPT Image 2.5 models.
|
|
2501
|
+
* Action type "openPage" - Opens a specific URL from search results.
|
|
2407
2502
|
*/
|
|
2408
|
-
|
|
2503
|
+
type: "openPage";
|
|
2409
2504
|
/**
|
|
2410
|
-
* The
|
|
2411
|
-
* One of 1024x1024, 1024x1536, 1536x1024, or auto. GPT Image 2 and 2.5
|
|
2412
|
-
* models also accept arbitrary WIDTHxHEIGHT sizes where both are divisible
|
|
2413
|
-
* by 16, e.g. 1536x864.
|
|
2414
|
-
* Default: auto.
|
|
2505
|
+
* The URL opened by the model.
|
|
2415
2506
|
*/
|
|
2416
|
-
|
|
2417
|
-
}
|
|
2418
|
-
declare const imageGeneration: (args?: ImageGenerationArgs) => _ai_sdk_provider_utils.ProviderExecutedTool<{}, {
|
|
2507
|
+
url?: string | null;
|
|
2508
|
+
} | {
|
|
2419
2509
|
/**
|
|
2420
|
-
*
|
|
2510
|
+
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
2421
2511
|
*/
|
|
2422
|
-
|
|
2423
|
-
}, {}>;
|
|
2424
|
-
|
|
2425
|
-
declare const programmaticToolCallingInputSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
2426
|
-
code: string;
|
|
2427
|
-
fingerprint: string;
|
|
2428
|
-
}>;
|
|
2429
|
-
declare const programmaticToolCallingOutputSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
2430
|
-
result: string;
|
|
2431
|
-
status: "completed" | "incomplete";
|
|
2432
|
-
}>;
|
|
2433
|
-
declare const programmaticToolCalling: () => _ai_sdk_provider_utils.Experimental_ToolCallerTool<_ai_sdk_provider_utils.ProviderExecutedTool<{
|
|
2512
|
+
type: "findInPage";
|
|
2434
2513
|
/**
|
|
2435
|
-
*
|
|
2514
|
+
* The URL of the page searched for the pattern.
|
|
2436
2515
|
*/
|
|
2437
|
-
|
|
2516
|
+
url?: string | null;
|
|
2438
2517
|
/**
|
|
2439
|
-
*
|
|
2518
|
+
* The pattern or text to search for within the page.
|
|
2440
2519
|
*/
|
|
2441
|
-
|
|
2520
|
+
pattern?: string | null;
|
|
2521
|
+
};
|
|
2442
2522
|
}, {
|
|
2523
|
+
/**
|
|
2524
|
+
* Search context size to use for the web search.
|
|
2525
|
+
* - high: Most comprehensive context, highest cost, slower response
|
|
2526
|
+
* - medium: Balanced context, cost, and latency (default)
|
|
2527
|
+
* - low: Least context, lowest cost, fastest response
|
|
2528
|
+
*/
|
|
2529
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
2530
|
+
/**
|
|
2531
|
+
* User location information to provide geographically relevant search results.
|
|
2532
|
+
*/
|
|
2533
|
+
userLocation?: {
|
|
2443
2534
|
/**
|
|
2444
|
-
*
|
|
2535
|
+
* Type of location (always 'approximate')
|
|
2445
2536
|
*/
|
|
2446
|
-
|
|
2537
|
+
type: "approximate";
|
|
2447
2538
|
/**
|
|
2448
|
-
*
|
|
2539
|
+
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
2449
2540
|
*/
|
|
2450
|
-
|
|
2451
|
-
}, {}>>;
|
|
2452
|
-
|
|
2453
|
-
declare const webSearchPreviewArgsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
2454
|
-
searchContextSize?: "low" | "medium" | "high" | undefined;
|
|
2455
|
-
userLocation?: {
|
|
2456
|
-
type: "approximate";
|
|
2457
|
-
country?: string | undefined;
|
|
2458
|
-
city?: string | undefined;
|
|
2459
|
-
region?: string | undefined;
|
|
2460
|
-
timezone?: string | undefined;
|
|
2461
|
-
} | undefined;
|
|
2462
|
-
}>;
|
|
2463
|
-
declare const webSearchPreviewInputSchema: _ai_sdk_provider_utils.LazySchema<Record<string, never>>;
|
|
2464
|
-
declare const webSearchPreview: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {
|
|
2541
|
+
country?: string;
|
|
2465
2542
|
/**
|
|
2466
|
-
*
|
|
2467
|
-
* Includes details on how the model used the web (search, open_page, find_in_page).
|
|
2543
|
+
* City name (free text, e.g., 'Minneapolis')
|
|
2468
2544
|
*/
|
|
2469
|
-
|
|
2470
|
-
/**
|
|
2471
|
-
* Action type "search" - Performs a web search query.
|
|
2472
|
-
*/
|
|
2473
|
-
type: "search";
|
|
2474
|
-
/**
|
|
2475
|
-
* The search query.
|
|
2476
|
-
*/
|
|
2477
|
-
query?: string;
|
|
2478
|
-
} | {
|
|
2479
|
-
/**
|
|
2480
|
-
* Action type "openPage" - Opens a specific URL from search results.
|
|
2481
|
-
*/
|
|
2482
|
-
type: "openPage";
|
|
2483
|
-
/**
|
|
2484
|
-
* The URL opened by the model.
|
|
2485
|
-
*/
|
|
2486
|
-
url?: string | null;
|
|
2487
|
-
} | {
|
|
2488
|
-
/**
|
|
2489
|
-
* Action type "findInPage": Searches for a pattern within a loaded page.
|
|
2490
|
-
*/
|
|
2491
|
-
type: "findInPage";
|
|
2492
|
-
/**
|
|
2493
|
-
* The URL of the page searched for the pattern.
|
|
2494
|
-
*/
|
|
2495
|
-
url?: string | null;
|
|
2496
|
-
/**
|
|
2497
|
-
* The pattern or text to search for within the page.
|
|
2498
|
-
*/
|
|
2499
|
-
pattern?: string | null;
|
|
2500
|
-
};
|
|
2501
|
-
}, {
|
|
2545
|
+
city?: string;
|
|
2502
2546
|
/**
|
|
2503
|
-
*
|
|
2504
|
-
* - high: Most comprehensive context, highest cost, slower response
|
|
2505
|
-
* - medium: Balanced context, cost, and latency (default)
|
|
2506
|
-
* - low: Least context, lowest cost, fastest response
|
|
2547
|
+
* Region name (free text, e.g., 'Minnesota')
|
|
2507
2548
|
*/
|
|
2508
|
-
|
|
2549
|
+
region?: string;
|
|
2509
2550
|
/**
|
|
2510
|
-
*
|
|
2551
|
+
* IANA timezone (e.g., 'America/Chicago')
|
|
2511
2552
|
*/
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
* Type of location (always 'approximate')
|
|
2515
|
-
*/
|
|
2516
|
-
type: "approximate";
|
|
2517
|
-
/**
|
|
2518
|
-
* Two-letter ISO country code (e.g., 'US', 'GB')
|
|
2519
|
-
*/
|
|
2520
|
-
country?: string;
|
|
2521
|
-
/**
|
|
2522
|
-
* City name (free text, e.g., 'Minneapolis')
|
|
2523
|
-
*/
|
|
2524
|
-
city?: string;
|
|
2525
|
-
/**
|
|
2526
|
-
* Region name (free text, e.g., 'Minnesota')
|
|
2527
|
-
*/
|
|
2528
|
-
region?: string;
|
|
2529
|
-
/**
|
|
2530
|
-
* IANA timezone (e.g., 'America/Chicago')
|
|
2531
|
-
*/
|
|
2532
|
-
timezone?: string;
|
|
2533
|
-
};
|
|
2553
|
+
timezone?: string;
|
|
2554
|
+
};
|
|
2534
2555
|
}, {}>;
|
|
2535
|
-
|
|
2536
|
-
|
|
2556
|
+
//#endregion
|
|
2557
|
+
//# sourceMappingURL=index.d.ts.map
|