@ai-sdk/openai 4.0.0-beta.41 → 4.0.0-beta.44
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 +25 -0
- package/dist/index.d.ts +30 -1
- package/dist/index.js +1207 -1107
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +30 -1
- package/dist/internal/index.js +1189 -1086
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +12 -3
- package/package.json +2 -2
- package/src/chat/openai-chat-language-model.ts +1 -1
- package/src/completion/openai-completion-language-model.ts +1 -1
- package/src/embedding/openai-embedding-model.ts +1 -1
- package/src/image/openai-image-model-options.ts +123 -0
- package/src/image/openai-image-model.ts +40 -77
- package/src/index.ts +11 -6
- package/src/internal/index.ts +6 -6
- package/src/openai-provider.ts +7 -7
- package/src/responses/openai-responses-api.ts +3 -0
- package/src/responses/openai-responses-language-model.ts +12 -1
- package/src/speech/openai-speech-model.ts +1 -1
- package/src/transcription/openai-transcription-model.ts +1 -1
- package/src/image/openai-image-options.ts +0 -34
- /package/src/chat/{openai-chat-options.ts → openai-chat-language-model-options.ts} +0 -0
- /package/src/completion/{openai-completion-options.ts → openai-completion-language-model-options.ts} +0 -0
- /package/src/embedding/{openai-embedding-options.ts → openai-embedding-model-options.ts} +0 -0
- /package/src/responses/{openai-responses-options.ts → openai-responses-language-model-options.ts} +0 -0
- /package/src/speech/{openai-speech-options.ts → openai-speech-model-options.ts} +0 -0
- /package/src/transcription/{openai-transcription-options.ts → openai-transcription-model-options.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -489,7 +489,7 @@ var openaiChatChunkSchema = lazySchema(
|
|
|
489
489
|
)
|
|
490
490
|
);
|
|
491
491
|
|
|
492
|
-
// src/chat/openai-chat-options.ts
|
|
492
|
+
// src/chat/openai-chat-language-model-options.ts
|
|
493
493
|
import {
|
|
494
494
|
lazySchema as lazySchema2,
|
|
495
495
|
zodSchema as zodSchema2
|
|
@@ -1310,7 +1310,7 @@ var openaiCompletionChunkSchema = lazySchema3(
|
|
|
1310
1310
|
)
|
|
1311
1311
|
);
|
|
1312
1312
|
|
|
1313
|
-
// src/completion/openai-completion-options.ts
|
|
1313
|
+
// src/completion/openai-completion-language-model-options.ts
|
|
1314
1314
|
import {
|
|
1315
1315
|
lazySchema as lazySchema4,
|
|
1316
1316
|
zodSchema as zodSchema4
|
|
@@ -1614,7 +1614,7 @@ import {
|
|
|
1614
1614
|
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE3
|
|
1615
1615
|
} from "@ai-sdk/provider-utils";
|
|
1616
1616
|
|
|
1617
|
-
// src/embedding/openai-embedding-options.ts
|
|
1617
|
+
// src/embedding/openai-embedding-model-options.ts
|
|
1618
1618
|
import {
|
|
1619
1619
|
lazySchema as lazySchema5,
|
|
1620
1620
|
zodSchema as zodSchema5
|
|
@@ -1841,6 +1841,7 @@ import {
|
|
|
1841
1841
|
convertToFormData,
|
|
1842
1842
|
createJsonResponseHandler as createJsonResponseHandler5,
|
|
1843
1843
|
downloadBlob,
|
|
1844
|
+
parseProviderOptions as parseProviderOptions5,
|
|
1844
1845
|
postFormDataToApi as postFormDataToApi2,
|
|
1845
1846
|
postJsonToApi as postJsonToApi4,
|
|
1846
1847
|
serializeModelOptions as serializeModelOptions4,
|
|
@@ -1878,7 +1879,12 @@ var openaiImageResponseSchema = lazySchema9(
|
|
|
1878
1879
|
)
|
|
1879
1880
|
);
|
|
1880
1881
|
|
|
1881
|
-
// src/image/openai-image-options.ts
|
|
1882
|
+
// src/image/openai-image-model-options.ts
|
|
1883
|
+
import {
|
|
1884
|
+
lazySchema as lazySchema10,
|
|
1885
|
+
zodSchema as zodSchema10
|
|
1886
|
+
} from "@ai-sdk/provider-utils";
|
|
1887
|
+
import { z as z11 } from "zod/v4";
|
|
1882
1888
|
var modelMaxImagesPerCall = {
|
|
1883
1889
|
"dall-e-3": 1,
|
|
1884
1890
|
"dall-e-2": 10,
|
|
@@ -1900,6 +1906,65 @@ function hasDefaultResponseFormat(modelId) {
|
|
|
1900
1906
|
(prefix) => modelId.startsWith(prefix)
|
|
1901
1907
|
);
|
|
1902
1908
|
}
|
|
1909
|
+
var baseImageModelOptionsObject = z11.object({
|
|
1910
|
+
/**
|
|
1911
|
+
* Quality of the generated image(s).
|
|
1912
|
+
*
|
|
1913
|
+
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
|
|
1914
|
+
*/
|
|
1915
|
+
quality: z11.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
|
|
1916
|
+
/**
|
|
1917
|
+
* Background behavior for the generated image(s).
|
|
1918
|
+
*
|
|
1919
|
+
* If `transparent`, the output format must support transparency
|
|
1920
|
+
* (i.e. `png` or `webp`).
|
|
1921
|
+
*/
|
|
1922
|
+
background: z11.enum(["transparent", "opaque", "auto"]).optional(),
|
|
1923
|
+
/**
|
|
1924
|
+
* Format in which the generated image(s) are returned.
|
|
1925
|
+
*/
|
|
1926
|
+
outputFormat: z11.enum(["png", "jpeg", "webp"]).optional(),
|
|
1927
|
+
/**
|
|
1928
|
+
* Compression level (0-100) for the generated image(s). Applies to the
|
|
1929
|
+
* `jpeg` and `webp` output formats.
|
|
1930
|
+
*/
|
|
1931
|
+
outputCompression: z11.number().int().min(0).max(100).optional(),
|
|
1932
|
+
/**
|
|
1933
|
+
* A unique identifier representing your end-user, which can help OpenAI
|
|
1934
|
+
* to monitor and detect abuse.
|
|
1935
|
+
*/
|
|
1936
|
+
user: z11.string().optional()
|
|
1937
|
+
});
|
|
1938
|
+
var openaiImageModelOptions = lazySchema10(
|
|
1939
|
+
() => zodSchema10(baseImageModelOptionsObject)
|
|
1940
|
+
);
|
|
1941
|
+
var openaiImageModelGenerationOptions = lazySchema10(
|
|
1942
|
+
() => zodSchema10(
|
|
1943
|
+
baseImageModelOptionsObject.extend({
|
|
1944
|
+
/**
|
|
1945
|
+
* Style of the generated image. `vivid` produces hyper-real and
|
|
1946
|
+
* dramatic images; `natural` produces more subdued, less hyper-real
|
|
1947
|
+
* looking images.
|
|
1948
|
+
*/
|
|
1949
|
+
style: z11.enum(["vivid", "natural"]).optional(),
|
|
1950
|
+
/**
|
|
1951
|
+
* Content moderation level for the generated image(s). `low` applies
|
|
1952
|
+
* less restrictive filtering.
|
|
1953
|
+
*/
|
|
1954
|
+
moderation: z11.enum(["auto", "low"]).optional()
|
|
1955
|
+
})
|
|
1956
|
+
)
|
|
1957
|
+
);
|
|
1958
|
+
var openaiImageModelEditOptions = lazySchema10(
|
|
1959
|
+
() => zodSchema10(
|
|
1960
|
+
baseImageModelOptionsObject.extend({
|
|
1961
|
+
/**
|
|
1962
|
+
* Fidelity of the output image(s) to the input image(s).
|
|
1963
|
+
*/
|
|
1964
|
+
inputFidelity: z11.enum(["high", "low"]).optional()
|
|
1965
|
+
})
|
|
1966
|
+
)
|
|
1967
|
+
);
|
|
1903
1968
|
|
|
1904
1969
|
// src/image/openai-image-model.ts
|
|
1905
1970
|
var OpenAIImageModel = class _OpenAIImageModel {
|
|
@@ -1950,12 +2015,17 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
1950
2015
|
}
|
|
1951
2016
|
const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
|
|
1952
2017
|
if (files != null) {
|
|
2018
|
+
const openaiOptions2 = (_d = await parseProviderOptions5({
|
|
2019
|
+
provider: "openai",
|
|
2020
|
+
providerOptions,
|
|
2021
|
+
schema: openaiImageModelEditOptions
|
|
2022
|
+
})) != null ? _d : {};
|
|
1953
2023
|
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi2({
|
|
1954
2024
|
url: this.config.url({
|
|
1955
2025
|
path: "/images/edits",
|
|
1956
2026
|
modelId: this.modelId
|
|
1957
2027
|
}),
|
|
1958
|
-
headers: combineHeaders5((
|
|
2028
|
+
headers: combineHeaders5((_f = (_e = this.config).headers) == null ? void 0 : _f.call(_e), headers),
|
|
1959
2029
|
formData: convertToFormData({
|
|
1960
2030
|
model: this.modelId,
|
|
1961
2031
|
prompt,
|
|
@@ -1976,7 +2046,12 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
1976
2046
|
mask: mask != null ? await fileToBlob(mask) : void 0,
|
|
1977
2047
|
n,
|
|
1978
2048
|
size,
|
|
1979
|
-
|
|
2049
|
+
quality: openaiOptions2.quality,
|
|
2050
|
+
background: openaiOptions2.background,
|
|
2051
|
+
output_format: openaiOptions2.outputFormat,
|
|
2052
|
+
output_compression: openaiOptions2.outputCompression,
|
|
2053
|
+
input_fidelity: openaiOptions2.inputFidelity,
|
|
2054
|
+
user: openaiOptions2.user
|
|
1980
2055
|
}),
|
|
1981
2056
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1982
2057
|
successfulResponseHandler: createJsonResponseHandler5(
|
|
@@ -2020,18 +2095,29 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
2020
2095
|
}
|
|
2021
2096
|
};
|
|
2022
2097
|
}
|
|
2098
|
+
const openaiOptions = (_j = await parseProviderOptions5({
|
|
2099
|
+
provider: "openai",
|
|
2100
|
+
providerOptions,
|
|
2101
|
+
schema: openaiImageModelGenerationOptions
|
|
2102
|
+
})) != null ? _j : {};
|
|
2023
2103
|
const { value: response, responseHeaders } = await postJsonToApi4({
|
|
2024
2104
|
url: this.config.url({
|
|
2025
2105
|
path: "/images/generations",
|
|
2026
2106
|
modelId: this.modelId
|
|
2027
2107
|
}),
|
|
2028
|
-
headers: combineHeaders5((
|
|
2108
|
+
headers: combineHeaders5((_l = (_k = this.config).headers) == null ? void 0 : _l.call(_k), headers),
|
|
2029
2109
|
body: {
|
|
2030
2110
|
model: this.modelId,
|
|
2031
2111
|
prompt,
|
|
2032
2112
|
n,
|
|
2033
2113
|
size,
|
|
2034
|
-
|
|
2114
|
+
quality: openaiOptions.quality,
|
|
2115
|
+
style: openaiOptions.style,
|
|
2116
|
+
background: openaiOptions.background,
|
|
2117
|
+
moderation: openaiOptions.moderation,
|
|
2118
|
+
output_format: openaiOptions.outputFormat,
|
|
2119
|
+
output_compression: openaiOptions.outputCompression,
|
|
2120
|
+
user: openaiOptions.user,
|
|
2035
2121
|
...!hasDefaultResponseFormat(this.modelId) ? { response_format: "b64_json" } : {}
|
|
2036
2122
|
},
|
|
2037
2123
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
@@ -2106,42 +2192,42 @@ async function fileToBlob(file) {
|
|
|
2106
2192
|
// src/tool/apply-patch.ts
|
|
2107
2193
|
import {
|
|
2108
2194
|
createProviderDefinedToolFactoryWithOutputSchema,
|
|
2109
|
-
lazySchema as
|
|
2110
|
-
zodSchema as
|
|
2195
|
+
lazySchema as lazySchema11,
|
|
2196
|
+
zodSchema as zodSchema11
|
|
2111
2197
|
} from "@ai-sdk/provider-utils";
|
|
2112
|
-
import { z as
|
|
2113
|
-
var applyPatchInputSchema =
|
|
2114
|
-
() =>
|
|
2115
|
-
|
|
2116
|
-
callId:
|
|
2117
|
-
operation:
|
|
2118
|
-
|
|
2119
|
-
type:
|
|
2120
|
-
path:
|
|
2121
|
-
diff:
|
|
2198
|
+
import { z as z12 } from "zod/v4";
|
|
2199
|
+
var applyPatchInputSchema = lazySchema11(
|
|
2200
|
+
() => zodSchema11(
|
|
2201
|
+
z12.object({
|
|
2202
|
+
callId: z12.string(),
|
|
2203
|
+
operation: z12.discriminatedUnion("type", [
|
|
2204
|
+
z12.object({
|
|
2205
|
+
type: z12.literal("create_file"),
|
|
2206
|
+
path: z12.string(),
|
|
2207
|
+
diff: z12.string()
|
|
2122
2208
|
}),
|
|
2123
|
-
|
|
2124
|
-
type:
|
|
2125
|
-
path:
|
|
2209
|
+
z12.object({
|
|
2210
|
+
type: z12.literal("delete_file"),
|
|
2211
|
+
path: z12.string()
|
|
2126
2212
|
}),
|
|
2127
|
-
|
|
2128
|
-
type:
|
|
2129
|
-
path:
|
|
2130
|
-
diff:
|
|
2213
|
+
z12.object({
|
|
2214
|
+
type: z12.literal("update_file"),
|
|
2215
|
+
path: z12.string(),
|
|
2216
|
+
diff: z12.string()
|
|
2131
2217
|
})
|
|
2132
2218
|
])
|
|
2133
2219
|
})
|
|
2134
2220
|
)
|
|
2135
2221
|
);
|
|
2136
|
-
var applyPatchOutputSchema =
|
|
2137
|
-
() =>
|
|
2138
|
-
|
|
2139
|
-
status:
|
|
2140
|
-
output:
|
|
2222
|
+
var applyPatchOutputSchema = lazySchema11(
|
|
2223
|
+
() => zodSchema11(
|
|
2224
|
+
z12.object({
|
|
2225
|
+
status: z12.enum(["completed", "failed"]),
|
|
2226
|
+
output: z12.string().optional()
|
|
2141
2227
|
})
|
|
2142
2228
|
)
|
|
2143
2229
|
);
|
|
2144
|
-
var applyPatchArgsSchema =
|
|
2230
|
+
var applyPatchArgsSchema = lazySchema11(() => zodSchema11(z12.object({})));
|
|
2145
2231
|
var applyPatchToolFactory = createProviderDefinedToolFactoryWithOutputSchema({
|
|
2146
2232
|
id: "openai.apply_patch",
|
|
2147
2233
|
inputSchema: applyPatchInputSchema,
|
|
@@ -2152,37 +2238,37 @@ var applyPatch = applyPatchToolFactory;
|
|
|
2152
2238
|
// src/tool/code-interpreter.ts
|
|
2153
2239
|
import {
|
|
2154
2240
|
createProviderExecutedToolFactory,
|
|
2155
|
-
lazySchema as
|
|
2156
|
-
zodSchema as
|
|
2241
|
+
lazySchema as lazySchema12,
|
|
2242
|
+
zodSchema as zodSchema12
|
|
2157
2243
|
} from "@ai-sdk/provider-utils";
|
|
2158
|
-
import { z as
|
|
2159
|
-
var codeInterpreterInputSchema =
|
|
2160
|
-
() =>
|
|
2161
|
-
|
|
2162
|
-
code:
|
|
2163
|
-
containerId:
|
|
2244
|
+
import { z as z13 } from "zod/v4";
|
|
2245
|
+
var codeInterpreterInputSchema = lazySchema12(
|
|
2246
|
+
() => zodSchema12(
|
|
2247
|
+
z13.object({
|
|
2248
|
+
code: z13.string().nullish(),
|
|
2249
|
+
containerId: z13.string()
|
|
2164
2250
|
})
|
|
2165
2251
|
)
|
|
2166
2252
|
);
|
|
2167
|
-
var codeInterpreterOutputSchema =
|
|
2168
|
-
() =>
|
|
2169
|
-
|
|
2170
|
-
outputs:
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2253
|
+
var codeInterpreterOutputSchema = lazySchema12(
|
|
2254
|
+
() => zodSchema12(
|
|
2255
|
+
z13.object({
|
|
2256
|
+
outputs: z13.array(
|
|
2257
|
+
z13.discriminatedUnion("type", [
|
|
2258
|
+
z13.object({ type: z13.literal("logs"), logs: z13.string() }),
|
|
2259
|
+
z13.object({ type: z13.literal("image"), url: z13.string() })
|
|
2174
2260
|
])
|
|
2175
2261
|
).nullish()
|
|
2176
2262
|
})
|
|
2177
2263
|
)
|
|
2178
2264
|
);
|
|
2179
|
-
var codeInterpreterArgsSchema =
|
|
2180
|
-
() =>
|
|
2181
|
-
|
|
2182
|
-
container:
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
fileIds:
|
|
2265
|
+
var codeInterpreterArgsSchema = lazySchema12(
|
|
2266
|
+
() => zodSchema12(
|
|
2267
|
+
z13.object({
|
|
2268
|
+
container: z13.union([
|
|
2269
|
+
z13.string(),
|
|
2270
|
+
z13.object({
|
|
2271
|
+
fileIds: z13.array(z13.string()).optional()
|
|
2186
2272
|
})
|
|
2187
2273
|
]).optional()
|
|
2188
2274
|
})
|
|
@@ -2200,28 +2286,28 @@ var codeInterpreter = (args = {}) => {
|
|
|
2200
2286
|
// src/tool/custom.ts
|
|
2201
2287
|
import {
|
|
2202
2288
|
createProviderDefinedToolFactory,
|
|
2203
|
-
lazySchema as
|
|
2204
|
-
zodSchema as
|
|
2289
|
+
lazySchema as lazySchema13,
|
|
2290
|
+
zodSchema as zodSchema13
|
|
2205
2291
|
} from "@ai-sdk/provider-utils";
|
|
2206
|
-
import { z as
|
|
2207
|
-
var customArgsSchema =
|
|
2208
|
-
() =>
|
|
2209
|
-
|
|
2210
|
-
description:
|
|
2211
|
-
format:
|
|
2212
|
-
|
|
2213
|
-
type:
|
|
2214
|
-
syntax:
|
|
2215
|
-
definition:
|
|
2292
|
+
import { z as z14 } from "zod/v4";
|
|
2293
|
+
var customArgsSchema = lazySchema13(
|
|
2294
|
+
() => zodSchema13(
|
|
2295
|
+
z14.object({
|
|
2296
|
+
description: z14.string().optional(),
|
|
2297
|
+
format: z14.union([
|
|
2298
|
+
z14.object({
|
|
2299
|
+
type: z14.literal("grammar"),
|
|
2300
|
+
syntax: z14.enum(["regex", "lark"]),
|
|
2301
|
+
definition: z14.string()
|
|
2216
2302
|
}),
|
|
2217
|
-
|
|
2218
|
-
type:
|
|
2303
|
+
z14.object({
|
|
2304
|
+
type: z14.literal("text")
|
|
2219
2305
|
})
|
|
2220
2306
|
]).optional()
|
|
2221
2307
|
})
|
|
2222
2308
|
)
|
|
2223
2309
|
);
|
|
2224
|
-
var customInputSchema =
|
|
2310
|
+
var customInputSchema = lazySchema13(() => zodSchema13(z14.string()));
|
|
2225
2311
|
var customToolFactory = createProviderDefinedToolFactory({
|
|
2226
2312
|
id: "openai.custom",
|
|
2227
2313
|
inputSchema: customInputSchema
|
|
@@ -2231,45 +2317,45 @@ var customTool = (args) => customToolFactory(args);
|
|
|
2231
2317
|
// src/tool/file-search.ts
|
|
2232
2318
|
import {
|
|
2233
2319
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
2234
|
-
lazySchema as
|
|
2235
|
-
zodSchema as
|
|
2320
|
+
lazySchema as lazySchema14,
|
|
2321
|
+
zodSchema as zodSchema14
|
|
2236
2322
|
} from "@ai-sdk/provider-utils";
|
|
2237
|
-
import { z as
|
|
2238
|
-
var comparisonFilterSchema =
|
|
2239
|
-
key:
|
|
2240
|
-
type:
|
|
2241
|
-
value:
|
|
2323
|
+
import { z as z15 } from "zod/v4";
|
|
2324
|
+
var comparisonFilterSchema = z15.object({
|
|
2325
|
+
key: z15.string(),
|
|
2326
|
+
type: z15.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
|
|
2327
|
+
value: z15.union([z15.string(), z15.number(), z15.boolean(), z15.array(z15.string())])
|
|
2242
2328
|
});
|
|
2243
|
-
var compoundFilterSchema =
|
|
2244
|
-
type:
|
|
2245
|
-
filters:
|
|
2246
|
-
|
|
2329
|
+
var compoundFilterSchema = z15.object({
|
|
2330
|
+
type: z15.enum(["and", "or"]),
|
|
2331
|
+
filters: z15.array(
|
|
2332
|
+
z15.union([comparisonFilterSchema, z15.lazy(() => compoundFilterSchema)])
|
|
2247
2333
|
)
|
|
2248
2334
|
});
|
|
2249
|
-
var fileSearchArgsSchema =
|
|
2250
|
-
() =>
|
|
2251
|
-
|
|
2252
|
-
vectorStoreIds:
|
|
2253
|
-
maxNumResults:
|
|
2254
|
-
ranking:
|
|
2255
|
-
ranker:
|
|
2256
|
-
scoreThreshold:
|
|
2335
|
+
var fileSearchArgsSchema = lazySchema14(
|
|
2336
|
+
() => zodSchema14(
|
|
2337
|
+
z15.object({
|
|
2338
|
+
vectorStoreIds: z15.array(z15.string()),
|
|
2339
|
+
maxNumResults: z15.number().optional(),
|
|
2340
|
+
ranking: z15.object({
|
|
2341
|
+
ranker: z15.string().optional(),
|
|
2342
|
+
scoreThreshold: z15.number().optional()
|
|
2257
2343
|
}).optional(),
|
|
2258
|
-
filters:
|
|
2344
|
+
filters: z15.union([comparisonFilterSchema, compoundFilterSchema]).optional()
|
|
2259
2345
|
})
|
|
2260
2346
|
)
|
|
2261
2347
|
);
|
|
2262
|
-
var fileSearchOutputSchema =
|
|
2263
|
-
() =>
|
|
2264
|
-
|
|
2265
|
-
queries:
|
|
2266
|
-
results:
|
|
2267
|
-
|
|
2268
|
-
attributes:
|
|
2269
|
-
fileId:
|
|
2270
|
-
filename:
|
|
2271
|
-
score:
|
|
2272
|
-
text:
|
|
2348
|
+
var fileSearchOutputSchema = lazySchema14(
|
|
2349
|
+
() => zodSchema14(
|
|
2350
|
+
z15.object({
|
|
2351
|
+
queries: z15.array(z15.string()),
|
|
2352
|
+
results: z15.array(
|
|
2353
|
+
z15.object({
|
|
2354
|
+
attributes: z15.record(z15.string(), z15.unknown()),
|
|
2355
|
+
fileId: z15.string(),
|
|
2356
|
+
filename: z15.string(),
|
|
2357
|
+
score: z15.number(),
|
|
2358
|
+
text: z15.string()
|
|
2273
2359
|
})
|
|
2274
2360
|
).nullable()
|
|
2275
2361
|
})
|
|
@@ -2277,39 +2363,39 @@ var fileSearchOutputSchema = lazySchema13(
|
|
|
2277
2363
|
);
|
|
2278
2364
|
var fileSearch = createProviderExecutedToolFactory2({
|
|
2279
2365
|
id: "openai.file_search",
|
|
2280
|
-
inputSchema:
|
|
2366
|
+
inputSchema: z15.object({}),
|
|
2281
2367
|
outputSchema: fileSearchOutputSchema
|
|
2282
2368
|
});
|
|
2283
2369
|
|
|
2284
2370
|
// src/tool/image-generation.ts
|
|
2285
2371
|
import {
|
|
2286
2372
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
2287
|
-
lazySchema as
|
|
2288
|
-
zodSchema as
|
|
2373
|
+
lazySchema as lazySchema15,
|
|
2374
|
+
zodSchema as zodSchema15
|
|
2289
2375
|
} from "@ai-sdk/provider-utils";
|
|
2290
|
-
import { z as
|
|
2291
|
-
var imageGenerationArgsSchema =
|
|
2292
|
-
() =>
|
|
2293
|
-
|
|
2294
|
-
background:
|
|
2295
|
-
inputFidelity:
|
|
2296
|
-
inputImageMask:
|
|
2297
|
-
fileId:
|
|
2298
|
-
imageUrl:
|
|
2376
|
+
import { z as z16 } from "zod/v4";
|
|
2377
|
+
var imageGenerationArgsSchema = lazySchema15(
|
|
2378
|
+
() => zodSchema15(
|
|
2379
|
+
z16.object({
|
|
2380
|
+
background: z16.enum(["auto", "opaque", "transparent"]).optional(),
|
|
2381
|
+
inputFidelity: z16.enum(["low", "high"]).optional(),
|
|
2382
|
+
inputImageMask: z16.object({
|
|
2383
|
+
fileId: z16.string().optional(),
|
|
2384
|
+
imageUrl: z16.string().optional()
|
|
2299
2385
|
}).optional(),
|
|
2300
|
-
model:
|
|
2301
|
-
moderation:
|
|
2302
|
-
outputCompression:
|
|
2303
|
-
outputFormat:
|
|
2304
|
-
partialImages:
|
|
2305
|
-
quality:
|
|
2306
|
-
size:
|
|
2386
|
+
model: z16.string().optional(),
|
|
2387
|
+
moderation: z16.enum(["auto"]).optional(),
|
|
2388
|
+
outputCompression: z16.number().int().min(0).max(100).optional(),
|
|
2389
|
+
outputFormat: z16.enum(["png", "jpeg", "webp"]).optional(),
|
|
2390
|
+
partialImages: z16.number().int().min(0).max(3).optional(),
|
|
2391
|
+
quality: z16.enum(["auto", "low", "medium", "high"]).optional(),
|
|
2392
|
+
size: z16.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
|
|
2307
2393
|
}).strict()
|
|
2308
2394
|
)
|
|
2309
2395
|
);
|
|
2310
|
-
var imageGenerationInputSchema =
|
|
2311
|
-
var imageGenerationOutputSchema =
|
|
2312
|
-
() =>
|
|
2396
|
+
var imageGenerationInputSchema = lazySchema15(() => zodSchema15(z16.object({})));
|
|
2397
|
+
var imageGenerationOutputSchema = lazySchema15(
|
|
2398
|
+
() => zodSchema15(z16.object({ result: z16.string() }))
|
|
2313
2399
|
);
|
|
2314
2400
|
var imageGenerationToolFactory = createProviderExecutedToolFactory3({
|
|
2315
2401
|
id: "openai.image_generation",
|
|
@@ -2323,26 +2409,26 @@ var imageGeneration = (args = {}) => {
|
|
|
2323
2409
|
// src/tool/local-shell.ts
|
|
2324
2410
|
import {
|
|
2325
2411
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
|
|
2326
|
-
lazySchema as
|
|
2327
|
-
zodSchema as
|
|
2412
|
+
lazySchema as lazySchema16,
|
|
2413
|
+
zodSchema as zodSchema16
|
|
2328
2414
|
} from "@ai-sdk/provider-utils";
|
|
2329
|
-
import { z as
|
|
2330
|
-
var localShellInputSchema =
|
|
2331
|
-
() =>
|
|
2332
|
-
|
|
2333
|
-
action:
|
|
2334
|
-
type:
|
|
2335
|
-
command:
|
|
2336
|
-
timeoutMs:
|
|
2337
|
-
user:
|
|
2338
|
-
workingDirectory:
|
|
2339
|
-
env:
|
|
2415
|
+
import { z as z17 } from "zod/v4";
|
|
2416
|
+
var localShellInputSchema = lazySchema16(
|
|
2417
|
+
() => zodSchema16(
|
|
2418
|
+
z17.object({
|
|
2419
|
+
action: z17.object({
|
|
2420
|
+
type: z17.literal("exec"),
|
|
2421
|
+
command: z17.array(z17.string()),
|
|
2422
|
+
timeoutMs: z17.number().optional(),
|
|
2423
|
+
user: z17.string().optional(),
|
|
2424
|
+
workingDirectory: z17.string().optional(),
|
|
2425
|
+
env: z17.record(z17.string(), z17.string()).optional()
|
|
2340
2426
|
})
|
|
2341
2427
|
})
|
|
2342
2428
|
)
|
|
2343
2429
|
);
|
|
2344
|
-
var localShellOutputSchema =
|
|
2345
|
-
() =>
|
|
2430
|
+
var localShellOutputSchema = lazySchema16(
|
|
2431
|
+
() => zodSchema16(z17.object({ output: z17.string() }))
|
|
2346
2432
|
);
|
|
2347
2433
|
var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
|
|
2348
2434
|
id: "openai.local_shell",
|
|
@@ -2353,91 +2439,91 @@ var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
|
|
|
2353
2439
|
// src/tool/shell.ts
|
|
2354
2440
|
import {
|
|
2355
2441
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
|
|
2356
|
-
lazySchema as
|
|
2357
|
-
zodSchema as
|
|
2442
|
+
lazySchema as lazySchema17,
|
|
2443
|
+
zodSchema as zodSchema17
|
|
2358
2444
|
} from "@ai-sdk/provider-utils";
|
|
2359
|
-
import { z as
|
|
2360
|
-
var shellInputSchema =
|
|
2361
|
-
() =>
|
|
2362
|
-
|
|
2363
|
-
action:
|
|
2364
|
-
commands:
|
|
2365
|
-
timeoutMs:
|
|
2366
|
-
maxOutputLength:
|
|
2445
|
+
import { z as z18 } from "zod/v4";
|
|
2446
|
+
var shellInputSchema = lazySchema17(
|
|
2447
|
+
() => zodSchema17(
|
|
2448
|
+
z18.object({
|
|
2449
|
+
action: z18.object({
|
|
2450
|
+
commands: z18.array(z18.string()),
|
|
2451
|
+
timeoutMs: z18.number().optional(),
|
|
2452
|
+
maxOutputLength: z18.number().optional()
|
|
2367
2453
|
})
|
|
2368
2454
|
})
|
|
2369
2455
|
)
|
|
2370
2456
|
);
|
|
2371
|
-
var shellOutputSchema =
|
|
2372
|
-
() =>
|
|
2373
|
-
|
|
2374
|
-
output:
|
|
2375
|
-
|
|
2376
|
-
stdout:
|
|
2377
|
-
stderr:
|
|
2378
|
-
outcome:
|
|
2379
|
-
|
|
2380
|
-
|
|
2457
|
+
var shellOutputSchema = lazySchema17(
|
|
2458
|
+
() => zodSchema17(
|
|
2459
|
+
z18.object({
|
|
2460
|
+
output: z18.array(
|
|
2461
|
+
z18.object({
|
|
2462
|
+
stdout: z18.string(),
|
|
2463
|
+
stderr: z18.string(),
|
|
2464
|
+
outcome: z18.discriminatedUnion("type", [
|
|
2465
|
+
z18.object({ type: z18.literal("timeout") }),
|
|
2466
|
+
z18.object({ type: z18.literal("exit"), exitCode: z18.number() })
|
|
2381
2467
|
])
|
|
2382
2468
|
})
|
|
2383
2469
|
)
|
|
2384
2470
|
})
|
|
2385
2471
|
)
|
|
2386
2472
|
);
|
|
2387
|
-
var shellSkillsSchema =
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
type:
|
|
2391
|
-
providerReference:
|
|
2392
|
-
version:
|
|
2473
|
+
var shellSkillsSchema = z18.array(
|
|
2474
|
+
z18.discriminatedUnion("type", [
|
|
2475
|
+
z18.object({
|
|
2476
|
+
type: z18.literal("skillReference"),
|
|
2477
|
+
providerReference: z18.record(z18.string(), z18.string()),
|
|
2478
|
+
version: z18.string().optional()
|
|
2393
2479
|
}),
|
|
2394
|
-
|
|
2395
|
-
type:
|
|
2396
|
-
name:
|
|
2397
|
-
description:
|
|
2398
|
-
source:
|
|
2399
|
-
type:
|
|
2400
|
-
mediaType:
|
|
2401
|
-
data:
|
|
2480
|
+
z18.object({
|
|
2481
|
+
type: z18.literal("inline"),
|
|
2482
|
+
name: z18.string(),
|
|
2483
|
+
description: z18.string(),
|
|
2484
|
+
source: z18.object({
|
|
2485
|
+
type: z18.literal("base64"),
|
|
2486
|
+
mediaType: z18.literal("application/zip"),
|
|
2487
|
+
data: z18.string()
|
|
2402
2488
|
})
|
|
2403
2489
|
})
|
|
2404
2490
|
])
|
|
2405
2491
|
).optional();
|
|
2406
|
-
var shellArgsSchema =
|
|
2407
|
-
() =>
|
|
2408
|
-
|
|
2409
|
-
environment:
|
|
2410
|
-
|
|
2411
|
-
type:
|
|
2412
|
-
fileIds:
|
|
2413
|
-
memoryLimit:
|
|
2414
|
-
networkPolicy:
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
type:
|
|
2418
|
-
allowedDomains:
|
|
2419
|
-
domainSecrets:
|
|
2420
|
-
|
|
2421
|
-
domain:
|
|
2422
|
-
name:
|
|
2423
|
-
value:
|
|
2492
|
+
var shellArgsSchema = lazySchema17(
|
|
2493
|
+
() => zodSchema17(
|
|
2494
|
+
z18.object({
|
|
2495
|
+
environment: z18.union([
|
|
2496
|
+
z18.object({
|
|
2497
|
+
type: z18.literal("containerAuto"),
|
|
2498
|
+
fileIds: z18.array(z18.string()).optional(),
|
|
2499
|
+
memoryLimit: z18.enum(["1g", "4g", "16g", "64g"]).optional(),
|
|
2500
|
+
networkPolicy: z18.discriminatedUnion("type", [
|
|
2501
|
+
z18.object({ type: z18.literal("disabled") }),
|
|
2502
|
+
z18.object({
|
|
2503
|
+
type: z18.literal("allowlist"),
|
|
2504
|
+
allowedDomains: z18.array(z18.string()),
|
|
2505
|
+
domainSecrets: z18.array(
|
|
2506
|
+
z18.object({
|
|
2507
|
+
domain: z18.string(),
|
|
2508
|
+
name: z18.string(),
|
|
2509
|
+
value: z18.string()
|
|
2424
2510
|
})
|
|
2425
2511
|
).optional()
|
|
2426
2512
|
})
|
|
2427
2513
|
]).optional(),
|
|
2428
2514
|
skills: shellSkillsSchema
|
|
2429
2515
|
}),
|
|
2430
|
-
|
|
2431
|
-
type:
|
|
2432
|
-
containerId:
|
|
2516
|
+
z18.object({
|
|
2517
|
+
type: z18.literal("containerReference"),
|
|
2518
|
+
containerId: z18.string()
|
|
2433
2519
|
}),
|
|
2434
|
-
|
|
2435
|
-
type:
|
|
2436
|
-
skills:
|
|
2437
|
-
|
|
2438
|
-
name:
|
|
2439
|
-
description:
|
|
2440
|
-
path:
|
|
2520
|
+
z18.object({
|
|
2521
|
+
type: z18.literal("local").optional(),
|
|
2522
|
+
skills: z18.array(
|
|
2523
|
+
z18.object({
|
|
2524
|
+
name: z18.string(),
|
|
2525
|
+
description: z18.string(),
|
|
2526
|
+
path: z18.string()
|
|
2441
2527
|
})
|
|
2442
2528
|
).optional()
|
|
2443
2529
|
})
|
|
@@ -2454,31 +2540,31 @@ var shell = createProviderDefinedToolFactoryWithOutputSchema3({
|
|
|
2454
2540
|
// src/tool/tool-search.ts
|
|
2455
2541
|
import {
|
|
2456
2542
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
|
|
2457
|
-
lazySchema as
|
|
2458
|
-
zodSchema as
|
|
2543
|
+
lazySchema as lazySchema18,
|
|
2544
|
+
zodSchema as zodSchema18
|
|
2459
2545
|
} from "@ai-sdk/provider-utils";
|
|
2460
|
-
import { z as
|
|
2461
|
-
var toolSearchArgsSchema =
|
|
2462
|
-
() =>
|
|
2463
|
-
|
|
2464
|
-
execution:
|
|
2465
|
-
description:
|
|
2466
|
-
parameters:
|
|
2546
|
+
import { z as z19 } from "zod/v4";
|
|
2547
|
+
var toolSearchArgsSchema = lazySchema18(
|
|
2548
|
+
() => zodSchema18(
|
|
2549
|
+
z19.object({
|
|
2550
|
+
execution: z19.enum(["server", "client"]).optional(),
|
|
2551
|
+
description: z19.string().optional(),
|
|
2552
|
+
parameters: z19.record(z19.string(), z19.unknown()).optional()
|
|
2467
2553
|
})
|
|
2468
2554
|
)
|
|
2469
2555
|
);
|
|
2470
|
-
var toolSearchInputSchema =
|
|
2471
|
-
() =>
|
|
2472
|
-
|
|
2473
|
-
arguments:
|
|
2474
|
-
call_id:
|
|
2556
|
+
var toolSearchInputSchema = lazySchema18(
|
|
2557
|
+
() => zodSchema18(
|
|
2558
|
+
z19.object({
|
|
2559
|
+
arguments: z19.unknown().optional(),
|
|
2560
|
+
call_id: z19.string().nullish()
|
|
2475
2561
|
})
|
|
2476
2562
|
)
|
|
2477
2563
|
);
|
|
2478
|
-
var toolSearchOutputSchema =
|
|
2479
|
-
() =>
|
|
2480
|
-
|
|
2481
|
-
tools:
|
|
2564
|
+
var toolSearchOutputSchema = lazySchema18(
|
|
2565
|
+
() => zodSchema18(
|
|
2566
|
+
z19.object({
|
|
2567
|
+
tools: z19.array(z19.record(z19.string(), z19.unknown()))
|
|
2482
2568
|
})
|
|
2483
2569
|
)
|
|
2484
2570
|
);
|
|
@@ -2492,71 +2578,15 @@ var toolSearch = (args = {}) => toolSearchToolFactory(args);
|
|
|
2492
2578
|
// src/tool/web-search.ts
|
|
2493
2579
|
import {
|
|
2494
2580
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
2495
|
-
lazySchema as lazySchema18,
|
|
2496
|
-
zodSchema as zodSchema18
|
|
2497
|
-
} from "@ai-sdk/provider-utils";
|
|
2498
|
-
import { z as z19 } from "zod/v4";
|
|
2499
|
-
var webSearchArgsSchema = lazySchema18(
|
|
2500
|
-
() => zodSchema18(
|
|
2501
|
-
z19.object({
|
|
2502
|
-
externalWebAccess: z19.boolean().optional(),
|
|
2503
|
-
filters: z19.object({ allowedDomains: z19.array(z19.string()).optional() }).optional(),
|
|
2504
|
-
searchContextSize: z19.enum(["low", "medium", "high"]).optional(),
|
|
2505
|
-
userLocation: z19.object({
|
|
2506
|
-
type: z19.literal("approximate"),
|
|
2507
|
-
country: z19.string().optional(),
|
|
2508
|
-
city: z19.string().optional(),
|
|
2509
|
-
region: z19.string().optional(),
|
|
2510
|
-
timezone: z19.string().optional()
|
|
2511
|
-
}).optional()
|
|
2512
|
-
})
|
|
2513
|
-
)
|
|
2514
|
-
);
|
|
2515
|
-
var webSearchInputSchema = lazySchema18(() => zodSchema18(z19.object({})));
|
|
2516
|
-
var webSearchOutputSchema = lazySchema18(
|
|
2517
|
-
() => zodSchema18(
|
|
2518
|
-
z19.object({
|
|
2519
|
-
action: z19.discriminatedUnion("type", [
|
|
2520
|
-
z19.object({
|
|
2521
|
-
type: z19.literal("search"),
|
|
2522
|
-
query: z19.string().optional()
|
|
2523
|
-
}),
|
|
2524
|
-
z19.object({
|
|
2525
|
-
type: z19.literal("openPage"),
|
|
2526
|
-
url: z19.string().nullish()
|
|
2527
|
-
}),
|
|
2528
|
-
z19.object({
|
|
2529
|
-
type: z19.literal("findInPage"),
|
|
2530
|
-
url: z19.string().nullish(),
|
|
2531
|
-
pattern: z19.string().nullish()
|
|
2532
|
-
})
|
|
2533
|
-
]).optional(),
|
|
2534
|
-
sources: z19.array(
|
|
2535
|
-
z19.discriminatedUnion("type", [
|
|
2536
|
-
z19.object({ type: z19.literal("url"), url: z19.string() }),
|
|
2537
|
-
z19.object({ type: z19.literal("api"), name: z19.string() })
|
|
2538
|
-
])
|
|
2539
|
-
).optional()
|
|
2540
|
-
})
|
|
2541
|
-
)
|
|
2542
|
-
);
|
|
2543
|
-
var webSearchToolFactory = createProviderExecutedToolFactory4({
|
|
2544
|
-
id: "openai.web_search",
|
|
2545
|
-
inputSchema: webSearchInputSchema,
|
|
2546
|
-
outputSchema: webSearchOutputSchema
|
|
2547
|
-
});
|
|
2548
|
-
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
2549
|
-
|
|
2550
|
-
// src/tool/web-search-preview.ts
|
|
2551
|
-
import {
|
|
2552
|
-
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
2553
2581
|
lazySchema as lazySchema19,
|
|
2554
2582
|
zodSchema as zodSchema19
|
|
2555
2583
|
} from "@ai-sdk/provider-utils";
|
|
2556
2584
|
import { z as z20 } from "zod/v4";
|
|
2557
|
-
var
|
|
2585
|
+
var webSearchArgsSchema = lazySchema19(
|
|
2558
2586
|
() => zodSchema19(
|
|
2559
2587
|
z20.object({
|
|
2588
|
+
externalWebAccess: z20.boolean().optional(),
|
|
2589
|
+
filters: z20.object({ allowedDomains: z20.array(z20.string()).optional() }).optional(),
|
|
2560
2590
|
searchContextSize: z20.enum(["low", "medium", "high"]).optional(),
|
|
2561
2591
|
userLocation: z20.object({
|
|
2562
2592
|
type: z20.literal("approximate"),
|
|
@@ -2568,10 +2598,8 @@ var webSearchPreviewArgsSchema = lazySchema19(
|
|
|
2568
2598
|
})
|
|
2569
2599
|
)
|
|
2570
2600
|
);
|
|
2571
|
-
var
|
|
2572
|
-
|
|
2573
|
-
);
|
|
2574
|
-
var webSearchPreviewOutputSchema = lazySchema19(
|
|
2601
|
+
var webSearchInputSchema = lazySchema19(() => zodSchema19(z20.object({})));
|
|
2602
|
+
var webSearchOutputSchema = lazySchema19(
|
|
2575
2603
|
() => zodSchema19(
|
|
2576
2604
|
z20.object({
|
|
2577
2605
|
action: z20.discriminatedUnion("type", [
|
|
@@ -2588,6 +2616,64 @@ var webSearchPreviewOutputSchema = lazySchema19(
|
|
|
2588
2616
|
url: z20.string().nullish(),
|
|
2589
2617
|
pattern: z20.string().nullish()
|
|
2590
2618
|
})
|
|
2619
|
+
]).optional(),
|
|
2620
|
+
sources: z20.array(
|
|
2621
|
+
z20.discriminatedUnion("type", [
|
|
2622
|
+
z20.object({ type: z20.literal("url"), url: z20.string() }),
|
|
2623
|
+
z20.object({ type: z20.literal("api"), name: z20.string() })
|
|
2624
|
+
])
|
|
2625
|
+
).optional()
|
|
2626
|
+
})
|
|
2627
|
+
)
|
|
2628
|
+
);
|
|
2629
|
+
var webSearchToolFactory = createProviderExecutedToolFactory4({
|
|
2630
|
+
id: "openai.web_search",
|
|
2631
|
+
inputSchema: webSearchInputSchema,
|
|
2632
|
+
outputSchema: webSearchOutputSchema
|
|
2633
|
+
});
|
|
2634
|
+
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
2635
|
+
|
|
2636
|
+
// src/tool/web-search-preview.ts
|
|
2637
|
+
import {
|
|
2638
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
2639
|
+
lazySchema as lazySchema20,
|
|
2640
|
+
zodSchema as zodSchema20
|
|
2641
|
+
} from "@ai-sdk/provider-utils";
|
|
2642
|
+
import { z as z21 } from "zod/v4";
|
|
2643
|
+
var webSearchPreviewArgsSchema = lazySchema20(
|
|
2644
|
+
() => zodSchema20(
|
|
2645
|
+
z21.object({
|
|
2646
|
+
searchContextSize: z21.enum(["low", "medium", "high"]).optional(),
|
|
2647
|
+
userLocation: z21.object({
|
|
2648
|
+
type: z21.literal("approximate"),
|
|
2649
|
+
country: z21.string().optional(),
|
|
2650
|
+
city: z21.string().optional(),
|
|
2651
|
+
region: z21.string().optional(),
|
|
2652
|
+
timezone: z21.string().optional()
|
|
2653
|
+
}).optional()
|
|
2654
|
+
})
|
|
2655
|
+
)
|
|
2656
|
+
);
|
|
2657
|
+
var webSearchPreviewInputSchema = lazySchema20(
|
|
2658
|
+
() => zodSchema20(z21.object({}))
|
|
2659
|
+
);
|
|
2660
|
+
var webSearchPreviewOutputSchema = lazySchema20(
|
|
2661
|
+
() => zodSchema20(
|
|
2662
|
+
z21.object({
|
|
2663
|
+
action: z21.discriminatedUnion("type", [
|
|
2664
|
+
z21.object({
|
|
2665
|
+
type: z21.literal("search"),
|
|
2666
|
+
query: z21.string().optional()
|
|
2667
|
+
}),
|
|
2668
|
+
z21.object({
|
|
2669
|
+
type: z21.literal("openPage"),
|
|
2670
|
+
url: z21.string().nullish()
|
|
2671
|
+
}),
|
|
2672
|
+
z21.object({
|
|
2673
|
+
type: z21.literal("findInPage"),
|
|
2674
|
+
url: z21.string().nullish(),
|
|
2675
|
+
pattern: z21.string().nullish()
|
|
2676
|
+
})
|
|
2591
2677
|
]).optional()
|
|
2592
2678
|
})
|
|
2593
2679
|
)
|
|
@@ -2601,60 +2687,60 @@ var webSearchPreview = createProviderExecutedToolFactory5({
|
|
|
2601
2687
|
// src/tool/mcp.ts
|
|
2602
2688
|
import {
|
|
2603
2689
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
2604
|
-
lazySchema as
|
|
2605
|
-
zodSchema as
|
|
2690
|
+
lazySchema as lazySchema21,
|
|
2691
|
+
zodSchema as zodSchema21
|
|
2606
2692
|
} from "@ai-sdk/provider-utils";
|
|
2607
|
-
import { z as
|
|
2608
|
-
var jsonValueSchema =
|
|
2609
|
-
() =>
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2693
|
+
import { z as z22 } from "zod/v4";
|
|
2694
|
+
var jsonValueSchema = z22.lazy(
|
|
2695
|
+
() => z22.union([
|
|
2696
|
+
z22.string(),
|
|
2697
|
+
z22.number(),
|
|
2698
|
+
z22.boolean(),
|
|
2699
|
+
z22.null(),
|
|
2700
|
+
z22.array(jsonValueSchema),
|
|
2701
|
+
z22.record(z22.string(), jsonValueSchema)
|
|
2616
2702
|
])
|
|
2617
2703
|
);
|
|
2618
|
-
var mcpArgsSchema =
|
|
2619
|
-
() =>
|
|
2620
|
-
|
|
2621
|
-
serverLabel:
|
|
2622
|
-
allowedTools:
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
readOnly:
|
|
2626
|
-
toolNames:
|
|
2704
|
+
var mcpArgsSchema = lazySchema21(
|
|
2705
|
+
() => zodSchema21(
|
|
2706
|
+
z22.object({
|
|
2707
|
+
serverLabel: z22.string(),
|
|
2708
|
+
allowedTools: z22.union([
|
|
2709
|
+
z22.array(z22.string()),
|
|
2710
|
+
z22.object({
|
|
2711
|
+
readOnly: z22.boolean().optional(),
|
|
2712
|
+
toolNames: z22.array(z22.string()).optional()
|
|
2627
2713
|
})
|
|
2628
2714
|
]).optional(),
|
|
2629
|
-
authorization:
|
|
2630
|
-
connectorId:
|
|
2631
|
-
headers:
|
|
2632
|
-
requireApproval:
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
never:
|
|
2636
|
-
toolNames:
|
|
2715
|
+
authorization: z22.string().optional(),
|
|
2716
|
+
connectorId: z22.string().optional(),
|
|
2717
|
+
headers: z22.record(z22.string(), z22.string()).optional(),
|
|
2718
|
+
requireApproval: z22.union([
|
|
2719
|
+
z22.enum(["always", "never"]),
|
|
2720
|
+
z22.object({
|
|
2721
|
+
never: z22.object({
|
|
2722
|
+
toolNames: z22.array(z22.string()).optional()
|
|
2637
2723
|
}).optional()
|
|
2638
2724
|
})
|
|
2639
2725
|
]).optional(),
|
|
2640
|
-
serverDescription:
|
|
2641
|
-
serverUrl:
|
|
2726
|
+
serverDescription: z22.string().optional(),
|
|
2727
|
+
serverUrl: z22.string().optional()
|
|
2642
2728
|
}).refine(
|
|
2643
2729
|
(v) => v.serverUrl != null || v.connectorId != null,
|
|
2644
2730
|
"One of serverUrl or connectorId must be provided."
|
|
2645
2731
|
)
|
|
2646
2732
|
)
|
|
2647
2733
|
);
|
|
2648
|
-
var mcpInputSchema =
|
|
2649
|
-
var mcpOutputSchema =
|
|
2650
|
-
() =>
|
|
2651
|
-
|
|
2652
|
-
type:
|
|
2653
|
-
serverLabel:
|
|
2654
|
-
name:
|
|
2655
|
-
arguments:
|
|
2656
|
-
output:
|
|
2657
|
-
error:
|
|
2734
|
+
var mcpInputSchema = lazySchema21(() => zodSchema21(z22.object({})));
|
|
2735
|
+
var mcpOutputSchema = lazySchema21(
|
|
2736
|
+
() => zodSchema21(
|
|
2737
|
+
z22.object({
|
|
2738
|
+
type: z22.literal("call"),
|
|
2739
|
+
serverLabel: z22.string(),
|
|
2740
|
+
name: z22.string(),
|
|
2741
|
+
arguments: z22.string(),
|
|
2742
|
+
output: z22.string().nullish(),
|
|
2743
|
+
error: z22.union([z22.string(), jsonValueSchema]).optional()
|
|
2658
2744
|
})
|
|
2659
2745
|
)
|
|
2660
2746
|
);
|
|
@@ -2793,7 +2879,7 @@ import {
|
|
|
2793
2879
|
createToolNameMapping,
|
|
2794
2880
|
generateId as generateId2,
|
|
2795
2881
|
isCustomReasoning as isCustomReasoning2,
|
|
2796
|
-
parseProviderOptions as
|
|
2882
|
+
parseProviderOptions as parseProviderOptions7,
|
|
2797
2883
|
postJsonToApi as postJsonToApi5,
|
|
2798
2884
|
serializeModelOptions as serializeModelOptions5,
|
|
2799
2885
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE5,
|
|
@@ -2848,12 +2934,12 @@ import {
|
|
|
2848
2934
|
getTopLevelMediaType as getTopLevelMediaType2,
|
|
2849
2935
|
isNonNullable,
|
|
2850
2936
|
parseJSON,
|
|
2851
|
-
parseProviderOptions as
|
|
2937
|
+
parseProviderOptions as parseProviderOptions6,
|
|
2852
2938
|
resolveFullMediaType as resolveFullMediaType2,
|
|
2853
2939
|
resolveProviderReference as resolveProviderReference2,
|
|
2854
2940
|
validateTypes
|
|
2855
2941
|
} from "@ai-sdk/provider-utils";
|
|
2856
|
-
import { z as
|
|
2942
|
+
import { z as z23 } from "zod/v4";
|
|
2857
2943
|
function serializeToolCallArguments2(input) {
|
|
2858
2944
|
return JSON.stringify(input === void 0 ? {} : input);
|
|
2859
2945
|
}
|
|
@@ -3178,7 +3264,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3178
3264
|
break;
|
|
3179
3265
|
}
|
|
3180
3266
|
case "reasoning": {
|
|
3181
|
-
const providerOptions = await
|
|
3267
|
+
const providerOptions = await parseProviderOptions6({
|
|
3182
3268
|
provider: providerOptionsName,
|
|
3183
3269
|
providerOptions: part.providerOptions,
|
|
3184
3270
|
schema: openaiResponsesReasoningProviderOptionsSchema
|
|
@@ -3510,9 +3596,9 @@ async function convertToOpenAIResponsesInput({
|
|
|
3510
3596
|
}
|
|
3511
3597
|
return { input, warnings };
|
|
3512
3598
|
}
|
|
3513
|
-
var openaiResponsesReasoningProviderOptionsSchema =
|
|
3514
|
-
itemId:
|
|
3515
|
-
reasoningEncryptedContent:
|
|
3599
|
+
var openaiResponsesReasoningProviderOptionsSchema = z23.object({
|
|
3600
|
+
itemId: z23.string().nullish(),
|
|
3601
|
+
reasoningEncryptedContent: z23.string().nullish()
|
|
3516
3602
|
});
|
|
3517
3603
|
|
|
3518
3604
|
// src/responses/map-openai-responses-finish-reason.ts
|
|
@@ -3535,554 +3621,556 @@ function mapOpenAIResponseFinishReason({
|
|
|
3535
3621
|
|
|
3536
3622
|
// src/responses/openai-responses-api.ts
|
|
3537
3623
|
import {
|
|
3538
|
-
lazySchema as
|
|
3539
|
-
zodSchema as
|
|
3624
|
+
lazySchema as lazySchema22,
|
|
3625
|
+
zodSchema as zodSchema22
|
|
3540
3626
|
} from "@ai-sdk/provider-utils";
|
|
3541
|
-
import { z as
|
|
3542
|
-
var jsonValueSchema2 =
|
|
3543
|
-
() =>
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3627
|
+
import { z as z24 } from "zod/v4";
|
|
3628
|
+
var jsonValueSchema2 = z24.lazy(
|
|
3629
|
+
() => z24.union([
|
|
3630
|
+
z24.string(),
|
|
3631
|
+
z24.number(),
|
|
3632
|
+
z24.boolean(),
|
|
3633
|
+
z24.null(),
|
|
3634
|
+
z24.array(jsonValueSchema2),
|
|
3635
|
+
z24.record(z24.string(), jsonValueSchema2.optional())
|
|
3550
3636
|
])
|
|
3551
3637
|
);
|
|
3552
|
-
var openaiResponsesChunkSchema =
|
|
3553
|
-
() =>
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
type:
|
|
3557
|
-
item_id:
|
|
3558
|
-
delta:
|
|
3559
|
-
logprobs:
|
|
3560
|
-
|
|
3561
|
-
token:
|
|
3562
|
-
logprob:
|
|
3563
|
-
top_logprobs:
|
|
3564
|
-
|
|
3565
|
-
token:
|
|
3566
|
-
logprob:
|
|
3638
|
+
var openaiResponsesChunkSchema = lazySchema22(
|
|
3639
|
+
() => zodSchema22(
|
|
3640
|
+
z24.union([
|
|
3641
|
+
z24.object({
|
|
3642
|
+
type: z24.literal("response.output_text.delta"),
|
|
3643
|
+
item_id: z24.string(),
|
|
3644
|
+
delta: z24.string(),
|
|
3645
|
+
logprobs: z24.array(
|
|
3646
|
+
z24.object({
|
|
3647
|
+
token: z24.string(),
|
|
3648
|
+
logprob: z24.number(),
|
|
3649
|
+
top_logprobs: z24.array(
|
|
3650
|
+
z24.object({
|
|
3651
|
+
token: z24.string(),
|
|
3652
|
+
logprob: z24.number()
|
|
3567
3653
|
})
|
|
3568
3654
|
)
|
|
3569
3655
|
})
|
|
3570
3656
|
).nullish()
|
|
3571
3657
|
}),
|
|
3572
|
-
|
|
3573
|
-
type:
|
|
3574
|
-
response:
|
|
3575
|
-
incomplete_details:
|
|
3576
|
-
usage:
|
|
3577
|
-
input_tokens:
|
|
3578
|
-
input_tokens_details:
|
|
3579
|
-
output_tokens:
|
|
3580
|
-
output_tokens_details:
|
|
3658
|
+
z24.object({
|
|
3659
|
+
type: z24.enum(["response.completed", "response.incomplete"]),
|
|
3660
|
+
response: z24.object({
|
|
3661
|
+
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
3662
|
+
usage: z24.object({
|
|
3663
|
+
input_tokens: z24.number(),
|
|
3664
|
+
input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
|
|
3665
|
+
output_tokens: z24.number(),
|
|
3666
|
+
output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
|
|
3581
3667
|
}),
|
|
3582
|
-
service_tier:
|
|
3668
|
+
service_tier: z24.string().nullish()
|
|
3583
3669
|
})
|
|
3584
3670
|
}),
|
|
3585
|
-
|
|
3586
|
-
type:
|
|
3587
|
-
response:
|
|
3588
|
-
error:
|
|
3589
|
-
code:
|
|
3590
|
-
message:
|
|
3671
|
+
z24.object({
|
|
3672
|
+
type: z24.literal("response.failed"),
|
|
3673
|
+
response: z24.object({
|
|
3674
|
+
error: z24.object({
|
|
3675
|
+
code: z24.string().nullish(),
|
|
3676
|
+
message: z24.string()
|
|
3591
3677
|
}).nullish(),
|
|
3592
|
-
incomplete_details:
|
|
3593
|
-
usage:
|
|
3594
|
-
input_tokens:
|
|
3595
|
-
input_tokens_details:
|
|
3596
|
-
output_tokens:
|
|
3597
|
-
output_tokens_details:
|
|
3678
|
+
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
3679
|
+
usage: z24.object({
|
|
3680
|
+
input_tokens: z24.number(),
|
|
3681
|
+
input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
|
|
3682
|
+
output_tokens: z24.number(),
|
|
3683
|
+
output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
|
|
3598
3684
|
}).nullish(),
|
|
3599
|
-
service_tier:
|
|
3685
|
+
service_tier: z24.string().nullish()
|
|
3600
3686
|
})
|
|
3601
3687
|
}),
|
|
3602
|
-
|
|
3603
|
-
type:
|
|
3604
|
-
response:
|
|
3605
|
-
id:
|
|
3606
|
-
created_at:
|
|
3607
|
-
model:
|
|
3608
|
-
service_tier:
|
|
3688
|
+
z24.object({
|
|
3689
|
+
type: z24.literal("response.created"),
|
|
3690
|
+
response: z24.object({
|
|
3691
|
+
id: z24.string(),
|
|
3692
|
+
created_at: z24.number(),
|
|
3693
|
+
model: z24.string(),
|
|
3694
|
+
service_tier: z24.string().nullish()
|
|
3609
3695
|
})
|
|
3610
3696
|
}),
|
|
3611
|
-
|
|
3612
|
-
type:
|
|
3613
|
-
output_index:
|
|
3614
|
-
item:
|
|
3615
|
-
|
|
3616
|
-
type:
|
|
3617
|
-
id:
|
|
3618
|
-
phase:
|
|
3697
|
+
z24.object({
|
|
3698
|
+
type: z24.literal("response.output_item.added"),
|
|
3699
|
+
output_index: z24.number(),
|
|
3700
|
+
item: z24.discriminatedUnion("type", [
|
|
3701
|
+
z24.object({
|
|
3702
|
+
type: z24.literal("message"),
|
|
3703
|
+
id: z24.string(),
|
|
3704
|
+
phase: z24.enum(["commentary", "final_answer"]).nullish()
|
|
3619
3705
|
}),
|
|
3620
|
-
|
|
3621
|
-
type:
|
|
3622
|
-
id:
|
|
3623
|
-
encrypted_content:
|
|
3706
|
+
z24.object({
|
|
3707
|
+
type: z24.literal("reasoning"),
|
|
3708
|
+
id: z24.string(),
|
|
3709
|
+
encrypted_content: z24.string().nullish()
|
|
3624
3710
|
}),
|
|
3625
|
-
|
|
3626
|
-
type:
|
|
3627
|
-
id:
|
|
3628
|
-
call_id:
|
|
3629
|
-
name:
|
|
3630
|
-
arguments:
|
|
3711
|
+
z24.object({
|
|
3712
|
+
type: z24.literal("function_call"),
|
|
3713
|
+
id: z24.string(),
|
|
3714
|
+
call_id: z24.string(),
|
|
3715
|
+
name: z24.string(),
|
|
3716
|
+
arguments: z24.string(),
|
|
3717
|
+
namespace: z24.string().nullish()
|
|
3631
3718
|
}),
|
|
3632
|
-
|
|
3633
|
-
type:
|
|
3634
|
-
id:
|
|
3635
|
-
status:
|
|
3719
|
+
z24.object({
|
|
3720
|
+
type: z24.literal("web_search_call"),
|
|
3721
|
+
id: z24.string(),
|
|
3722
|
+
status: z24.string()
|
|
3636
3723
|
}),
|
|
3637
|
-
|
|
3638
|
-
type:
|
|
3639
|
-
id:
|
|
3640
|
-
status:
|
|
3724
|
+
z24.object({
|
|
3725
|
+
type: z24.literal("computer_call"),
|
|
3726
|
+
id: z24.string(),
|
|
3727
|
+
status: z24.string()
|
|
3641
3728
|
}),
|
|
3642
|
-
|
|
3643
|
-
type:
|
|
3644
|
-
id:
|
|
3729
|
+
z24.object({
|
|
3730
|
+
type: z24.literal("file_search_call"),
|
|
3731
|
+
id: z24.string()
|
|
3645
3732
|
}),
|
|
3646
|
-
|
|
3647
|
-
type:
|
|
3648
|
-
id:
|
|
3733
|
+
z24.object({
|
|
3734
|
+
type: z24.literal("image_generation_call"),
|
|
3735
|
+
id: z24.string()
|
|
3649
3736
|
}),
|
|
3650
|
-
|
|
3651
|
-
type:
|
|
3652
|
-
id:
|
|
3653
|
-
container_id:
|
|
3654
|
-
code:
|
|
3655
|
-
outputs:
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3737
|
+
z24.object({
|
|
3738
|
+
type: z24.literal("code_interpreter_call"),
|
|
3739
|
+
id: z24.string(),
|
|
3740
|
+
container_id: z24.string(),
|
|
3741
|
+
code: z24.string().nullable(),
|
|
3742
|
+
outputs: z24.array(
|
|
3743
|
+
z24.discriminatedUnion("type", [
|
|
3744
|
+
z24.object({ type: z24.literal("logs"), logs: z24.string() }),
|
|
3745
|
+
z24.object({ type: z24.literal("image"), url: z24.string() })
|
|
3659
3746
|
])
|
|
3660
3747
|
).nullable(),
|
|
3661
|
-
status:
|
|
3748
|
+
status: z24.string()
|
|
3662
3749
|
}),
|
|
3663
|
-
|
|
3664
|
-
type:
|
|
3665
|
-
id:
|
|
3666
|
-
status:
|
|
3667
|
-
approval_request_id:
|
|
3750
|
+
z24.object({
|
|
3751
|
+
type: z24.literal("mcp_call"),
|
|
3752
|
+
id: z24.string(),
|
|
3753
|
+
status: z24.string(),
|
|
3754
|
+
approval_request_id: z24.string().nullish()
|
|
3668
3755
|
}),
|
|
3669
|
-
|
|
3670
|
-
type:
|
|
3671
|
-
id:
|
|
3756
|
+
z24.object({
|
|
3757
|
+
type: z24.literal("mcp_list_tools"),
|
|
3758
|
+
id: z24.string()
|
|
3672
3759
|
}),
|
|
3673
|
-
|
|
3674
|
-
type:
|
|
3675
|
-
id:
|
|
3760
|
+
z24.object({
|
|
3761
|
+
type: z24.literal("mcp_approval_request"),
|
|
3762
|
+
id: z24.string()
|
|
3676
3763
|
}),
|
|
3677
|
-
|
|
3678
|
-
type:
|
|
3679
|
-
id:
|
|
3680
|
-
call_id:
|
|
3681
|
-
status:
|
|
3682
|
-
operation:
|
|
3683
|
-
|
|
3684
|
-
type:
|
|
3685
|
-
path:
|
|
3686
|
-
diff:
|
|
3764
|
+
z24.object({
|
|
3765
|
+
type: z24.literal("apply_patch_call"),
|
|
3766
|
+
id: z24.string(),
|
|
3767
|
+
call_id: z24.string(),
|
|
3768
|
+
status: z24.enum(["in_progress", "completed"]),
|
|
3769
|
+
operation: z24.discriminatedUnion("type", [
|
|
3770
|
+
z24.object({
|
|
3771
|
+
type: z24.literal("create_file"),
|
|
3772
|
+
path: z24.string(),
|
|
3773
|
+
diff: z24.string()
|
|
3687
3774
|
}),
|
|
3688
|
-
|
|
3689
|
-
type:
|
|
3690
|
-
path:
|
|
3775
|
+
z24.object({
|
|
3776
|
+
type: z24.literal("delete_file"),
|
|
3777
|
+
path: z24.string()
|
|
3691
3778
|
}),
|
|
3692
|
-
|
|
3693
|
-
type:
|
|
3694
|
-
path:
|
|
3695
|
-
diff:
|
|
3779
|
+
z24.object({
|
|
3780
|
+
type: z24.literal("update_file"),
|
|
3781
|
+
path: z24.string(),
|
|
3782
|
+
diff: z24.string()
|
|
3696
3783
|
})
|
|
3697
3784
|
])
|
|
3698
3785
|
}),
|
|
3699
|
-
|
|
3700
|
-
type:
|
|
3701
|
-
id:
|
|
3702
|
-
call_id:
|
|
3703
|
-
name:
|
|
3704
|
-
input:
|
|
3786
|
+
z24.object({
|
|
3787
|
+
type: z24.literal("custom_tool_call"),
|
|
3788
|
+
id: z24.string(),
|
|
3789
|
+
call_id: z24.string(),
|
|
3790
|
+
name: z24.string(),
|
|
3791
|
+
input: z24.string()
|
|
3705
3792
|
}),
|
|
3706
|
-
|
|
3707
|
-
type:
|
|
3708
|
-
id:
|
|
3709
|
-
call_id:
|
|
3710
|
-
status:
|
|
3711
|
-
action:
|
|
3712
|
-
commands:
|
|
3793
|
+
z24.object({
|
|
3794
|
+
type: z24.literal("shell_call"),
|
|
3795
|
+
id: z24.string(),
|
|
3796
|
+
call_id: z24.string(),
|
|
3797
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
3798
|
+
action: z24.object({
|
|
3799
|
+
commands: z24.array(z24.string())
|
|
3713
3800
|
})
|
|
3714
3801
|
}),
|
|
3715
|
-
|
|
3716
|
-
type:
|
|
3717
|
-
id:
|
|
3718
|
-
encrypted_content:
|
|
3802
|
+
z24.object({
|
|
3803
|
+
type: z24.literal("compaction"),
|
|
3804
|
+
id: z24.string(),
|
|
3805
|
+
encrypted_content: z24.string().nullish()
|
|
3719
3806
|
}),
|
|
3720
|
-
|
|
3721
|
-
type:
|
|
3722
|
-
id:
|
|
3723
|
-
call_id:
|
|
3724
|
-
status:
|
|
3725
|
-
output:
|
|
3726
|
-
|
|
3727
|
-
stdout:
|
|
3728
|
-
stderr:
|
|
3729
|
-
outcome:
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
type:
|
|
3733
|
-
exit_code:
|
|
3807
|
+
z24.object({
|
|
3808
|
+
type: z24.literal("shell_call_output"),
|
|
3809
|
+
id: z24.string(),
|
|
3810
|
+
call_id: z24.string(),
|
|
3811
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
3812
|
+
output: z24.array(
|
|
3813
|
+
z24.object({
|
|
3814
|
+
stdout: z24.string(),
|
|
3815
|
+
stderr: z24.string(),
|
|
3816
|
+
outcome: z24.discriminatedUnion("type", [
|
|
3817
|
+
z24.object({ type: z24.literal("timeout") }),
|
|
3818
|
+
z24.object({
|
|
3819
|
+
type: z24.literal("exit"),
|
|
3820
|
+
exit_code: z24.number()
|
|
3734
3821
|
})
|
|
3735
3822
|
])
|
|
3736
3823
|
})
|
|
3737
3824
|
)
|
|
3738
3825
|
}),
|
|
3739
|
-
|
|
3740
|
-
type:
|
|
3741
|
-
id:
|
|
3742
|
-
execution:
|
|
3743
|
-
call_id:
|
|
3744
|
-
status:
|
|
3745
|
-
arguments:
|
|
3826
|
+
z24.object({
|
|
3827
|
+
type: z24.literal("tool_search_call"),
|
|
3828
|
+
id: z24.string(),
|
|
3829
|
+
execution: z24.enum(["server", "client"]),
|
|
3830
|
+
call_id: z24.string().nullable(),
|
|
3831
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
3832
|
+
arguments: z24.unknown()
|
|
3746
3833
|
}),
|
|
3747
|
-
|
|
3748
|
-
type:
|
|
3749
|
-
id:
|
|
3750
|
-
execution:
|
|
3751
|
-
call_id:
|
|
3752
|
-
status:
|
|
3753
|
-
tools:
|
|
3834
|
+
z24.object({
|
|
3835
|
+
type: z24.literal("tool_search_output"),
|
|
3836
|
+
id: z24.string(),
|
|
3837
|
+
execution: z24.enum(["server", "client"]),
|
|
3838
|
+
call_id: z24.string().nullable(),
|
|
3839
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
3840
|
+
tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
|
|
3754
3841
|
})
|
|
3755
3842
|
])
|
|
3756
3843
|
}),
|
|
3757
|
-
|
|
3758
|
-
type:
|
|
3759
|
-
output_index:
|
|
3760
|
-
item:
|
|
3761
|
-
|
|
3762
|
-
type:
|
|
3763
|
-
id:
|
|
3764
|
-
phase:
|
|
3844
|
+
z24.object({
|
|
3845
|
+
type: z24.literal("response.output_item.done"),
|
|
3846
|
+
output_index: z24.number(),
|
|
3847
|
+
item: z24.discriminatedUnion("type", [
|
|
3848
|
+
z24.object({
|
|
3849
|
+
type: z24.literal("message"),
|
|
3850
|
+
id: z24.string(),
|
|
3851
|
+
phase: z24.enum(["commentary", "final_answer"]).nullish()
|
|
3765
3852
|
}),
|
|
3766
|
-
|
|
3767
|
-
type:
|
|
3768
|
-
id:
|
|
3769
|
-
encrypted_content:
|
|
3853
|
+
z24.object({
|
|
3854
|
+
type: z24.literal("reasoning"),
|
|
3855
|
+
id: z24.string(),
|
|
3856
|
+
encrypted_content: z24.string().nullish()
|
|
3770
3857
|
}),
|
|
3771
|
-
|
|
3772
|
-
type:
|
|
3773
|
-
id:
|
|
3774
|
-
call_id:
|
|
3775
|
-
name:
|
|
3776
|
-
arguments:
|
|
3777
|
-
status:
|
|
3858
|
+
z24.object({
|
|
3859
|
+
type: z24.literal("function_call"),
|
|
3860
|
+
id: z24.string(),
|
|
3861
|
+
call_id: z24.string(),
|
|
3862
|
+
name: z24.string(),
|
|
3863
|
+
arguments: z24.string(),
|
|
3864
|
+
status: z24.literal("completed"),
|
|
3865
|
+
namespace: z24.string().nullish()
|
|
3778
3866
|
}),
|
|
3779
|
-
|
|
3780
|
-
type:
|
|
3781
|
-
id:
|
|
3782
|
-
call_id:
|
|
3783
|
-
name:
|
|
3784
|
-
input:
|
|
3785
|
-
status:
|
|
3867
|
+
z24.object({
|
|
3868
|
+
type: z24.literal("custom_tool_call"),
|
|
3869
|
+
id: z24.string(),
|
|
3870
|
+
call_id: z24.string(),
|
|
3871
|
+
name: z24.string(),
|
|
3872
|
+
input: z24.string(),
|
|
3873
|
+
status: z24.literal("completed")
|
|
3786
3874
|
}),
|
|
3787
|
-
|
|
3788
|
-
type:
|
|
3789
|
-
id:
|
|
3790
|
-
code:
|
|
3791
|
-
container_id:
|
|
3792
|
-
outputs:
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3875
|
+
z24.object({
|
|
3876
|
+
type: z24.literal("code_interpreter_call"),
|
|
3877
|
+
id: z24.string(),
|
|
3878
|
+
code: z24.string().nullable(),
|
|
3879
|
+
container_id: z24.string(),
|
|
3880
|
+
outputs: z24.array(
|
|
3881
|
+
z24.discriminatedUnion("type", [
|
|
3882
|
+
z24.object({ type: z24.literal("logs"), logs: z24.string() }),
|
|
3883
|
+
z24.object({ type: z24.literal("image"), url: z24.string() })
|
|
3796
3884
|
])
|
|
3797
3885
|
).nullable()
|
|
3798
3886
|
}),
|
|
3799
|
-
|
|
3800
|
-
type:
|
|
3801
|
-
id:
|
|
3802
|
-
result:
|
|
3887
|
+
z24.object({
|
|
3888
|
+
type: z24.literal("image_generation_call"),
|
|
3889
|
+
id: z24.string(),
|
|
3890
|
+
result: z24.string()
|
|
3803
3891
|
}),
|
|
3804
|
-
|
|
3805
|
-
type:
|
|
3806
|
-
id:
|
|
3807
|
-
status:
|
|
3808
|
-
action:
|
|
3809
|
-
|
|
3810
|
-
type:
|
|
3811
|
-
query:
|
|
3812
|
-
sources:
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3892
|
+
z24.object({
|
|
3893
|
+
type: z24.literal("web_search_call"),
|
|
3894
|
+
id: z24.string(),
|
|
3895
|
+
status: z24.string(),
|
|
3896
|
+
action: z24.discriminatedUnion("type", [
|
|
3897
|
+
z24.object({
|
|
3898
|
+
type: z24.literal("search"),
|
|
3899
|
+
query: z24.string().nullish(),
|
|
3900
|
+
sources: z24.array(
|
|
3901
|
+
z24.discriminatedUnion("type", [
|
|
3902
|
+
z24.object({ type: z24.literal("url"), url: z24.string() }),
|
|
3903
|
+
z24.object({ type: z24.literal("api"), name: z24.string() })
|
|
3816
3904
|
])
|
|
3817
3905
|
).nullish()
|
|
3818
3906
|
}),
|
|
3819
|
-
|
|
3820
|
-
type:
|
|
3821
|
-
url:
|
|
3907
|
+
z24.object({
|
|
3908
|
+
type: z24.literal("open_page"),
|
|
3909
|
+
url: z24.string().nullish()
|
|
3822
3910
|
}),
|
|
3823
|
-
|
|
3824
|
-
type:
|
|
3825
|
-
url:
|
|
3826
|
-
pattern:
|
|
3911
|
+
z24.object({
|
|
3912
|
+
type: z24.literal("find_in_page"),
|
|
3913
|
+
url: z24.string().nullish(),
|
|
3914
|
+
pattern: z24.string().nullish()
|
|
3827
3915
|
})
|
|
3828
3916
|
]).nullish()
|
|
3829
3917
|
}),
|
|
3830
|
-
|
|
3831
|
-
type:
|
|
3832
|
-
id:
|
|
3833
|
-
queries:
|
|
3834
|
-
results:
|
|
3835
|
-
|
|
3836
|
-
attributes:
|
|
3837
|
-
|
|
3838
|
-
|
|
3918
|
+
z24.object({
|
|
3919
|
+
type: z24.literal("file_search_call"),
|
|
3920
|
+
id: z24.string(),
|
|
3921
|
+
queries: z24.array(z24.string()),
|
|
3922
|
+
results: z24.array(
|
|
3923
|
+
z24.object({
|
|
3924
|
+
attributes: z24.record(
|
|
3925
|
+
z24.string(),
|
|
3926
|
+
z24.union([z24.string(), z24.number(), z24.boolean()])
|
|
3839
3927
|
),
|
|
3840
|
-
file_id:
|
|
3841
|
-
filename:
|
|
3842
|
-
score:
|
|
3843
|
-
text:
|
|
3928
|
+
file_id: z24.string(),
|
|
3929
|
+
filename: z24.string(),
|
|
3930
|
+
score: z24.number(),
|
|
3931
|
+
text: z24.string()
|
|
3844
3932
|
})
|
|
3845
3933
|
).nullish()
|
|
3846
3934
|
}),
|
|
3847
|
-
|
|
3848
|
-
type:
|
|
3849
|
-
id:
|
|
3850
|
-
call_id:
|
|
3851
|
-
action:
|
|
3852
|
-
type:
|
|
3853
|
-
command:
|
|
3854
|
-
timeout_ms:
|
|
3855
|
-
user:
|
|
3856
|
-
working_directory:
|
|
3857
|
-
env:
|
|
3935
|
+
z24.object({
|
|
3936
|
+
type: z24.literal("local_shell_call"),
|
|
3937
|
+
id: z24.string(),
|
|
3938
|
+
call_id: z24.string(),
|
|
3939
|
+
action: z24.object({
|
|
3940
|
+
type: z24.literal("exec"),
|
|
3941
|
+
command: z24.array(z24.string()),
|
|
3942
|
+
timeout_ms: z24.number().optional(),
|
|
3943
|
+
user: z24.string().optional(),
|
|
3944
|
+
working_directory: z24.string().optional(),
|
|
3945
|
+
env: z24.record(z24.string(), z24.string()).optional()
|
|
3858
3946
|
})
|
|
3859
3947
|
}),
|
|
3860
|
-
|
|
3861
|
-
type:
|
|
3862
|
-
id:
|
|
3863
|
-
status:
|
|
3948
|
+
z24.object({
|
|
3949
|
+
type: z24.literal("computer_call"),
|
|
3950
|
+
id: z24.string(),
|
|
3951
|
+
status: z24.literal("completed")
|
|
3864
3952
|
}),
|
|
3865
|
-
|
|
3866
|
-
type:
|
|
3867
|
-
id:
|
|
3868
|
-
status:
|
|
3869
|
-
arguments:
|
|
3870
|
-
name:
|
|
3871
|
-
server_label:
|
|
3872
|
-
output:
|
|
3873
|
-
error:
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
type:
|
|
3877
|
-
code:
|
|
3878
|
-
message:
|
|
3953
|
+
z24.object({
|
|
3954
|
+
type: z24.literal("mcp_call"),
|
|
3955
|
+
id: z24.string(),
|
|
3956
|
+
status: z24.string(),
|
|
3957
|
+
arguments: z24.string(),
|
|
3958
|
+
name: z24.string(),
|
|
3959
|
+
server_label: z24.string(),
|
|
3960
|
+
output: z24.string().nullish(),
|
|
3961
|
+
error: z24.union([
|
|
3962
|
+
z24.string(),
|
|
3963
|
+
z24.object({
|
|
3964
|
+
type: z24.string().optional(),
|
|
3965
|
+
code: z24.union([z24.number(), z24.string()]).optional(),
|
|
3966
|
+
message: z24.string().optional()
|
|
3879
3967
|
}).loose()
|
|
3880
3968
|
]).nullish(),
|
|
3881
|
-
approval_request_id:
|
|
3969
|
+
approval_request_id: z24.string().nullish()
|
|
3882
3970
|
}),
|
|
3883
|
-
|
|
3884
|
-
type:
|
|
3885
|
-
id:
|
|
3886
|
-
server_label:
|
|
3887
|
-
tools:
|
|
3888
|
-
|
|
3889
|
-
name:
|
|
3890
|
-
description:
|
|
3891
|
-
input_schema:
|
|
3892
|
-
annotations:
|
|
3971
|
+
z24.object({
|
|
3972
|
+
type: z24.literal("mcp_list_tools"),
|
|
3973
|
+
id: z24.string(),
|
|
3974
|
+
server_label: z24.string(),
|
|
3975
|
+
tools: z24.array(
|
|
3976
|
+
z24.object({
|
|
3977
|
+
name: z24.string(),
|
|
3978
|
+
description: z24.string().optional(),
|
|
3979
|
+
input_schema: z24.any(),
|
|
3980
|
+
annotations: z24.record(z24.string(), z24.unknown()).optional()
|
|
3893
3981
|
})
|
|
3894
3982
|
),
|
|
3895
|
-
error:
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
type:
|
|
3899
|
-
code:
|
|
3900
|
-
message:
|
|
3983
|
+
error: z24.union([
|
|
3984
|
+
z24.string(),
|
|
3985
|
+
z24.object({
|
|
3986
|
+
type: z24.string().optional(),
|
|
3987
|
+
code: z24.union([z24.number(), z24.string()]).optional(),
|
|
3988
|
+
message: z24.string().optional()
|
|
3901
3989
|
}).loose()
|
|
3902
3990
|
]).optional()
|
|
3903
3991
|
}),
|
|
3904
|
-
|
|
3905
|
-
type:
|
|
3906
|
-
id:
|
|
3907
|
-
server_label:
|
|
3908
|
-
name:
|
|
3909
|
-
arguments:
|
|
3910
|
-
approval_request_id:
|
|
3992
|
+
z24.object({
|
|
3993
|
+
type: z24.literal("mcp_approval_request"),
|
|
3994
|
+
id: z24.string(),
|
|
3995
|
+
server_label: z24.string(),
|
|
3996
|
+
name: z24.string(),
|
|
3997
|
+
arguments: z24.string(),
|
|
3998
|
+
approval_request_id: z24.string().optional()
|
|
3911
3999
|
}),
|
|
3912
|
-
|
|
3913
|
-
type:
|
|
3914
|
-
id:
|
|
3915
|
-
call_id:
|
|
3916
|
-
status:
|
|
3917
|
-
operation:
|
|
3918
|
-
|
|
3919
|
-
type:
|
|
3920
|
-
path:
|
|
3921
|
-
diff:
|
|
4000
|
+
z24.object({
|
|
4001
|
+
type: z24.literal("apply_patch_call"),
|
|
4002
|
+
id: z24.string(),
|
|
4003
|
+
call_id: z24.string(),
|
|
4004
|
+
status: z24.enum(["in_progress", "completed"]),
|
|
4005
|
+
operation: z24.discriminatedUnion("type", [
|
|
4006
|
+
z24.object({
|
|
4007
|
+
type: z24.literal("create_file"),
|
|
4008
|
+
path: z24.string(),
|
|
4009
|
+
diff: z24.string()
|
|
3922
4010
|
}),
|
|
3923
|
-
|
|
3924
|
-
type:
|
|
3925
|
-
path:
|
|
4011
|
+
z24.object({
|
|
4012
|
+
type: z24.literal("delete_file"),
|
|
4013
|
+
path: z24.string()
|
|
3926
4014
|
}),
|
|
3927
|
-
|
|
3928
|
-
type:
|
|
3929
|
-
path:
|
|
3930
|
-
diff:
|
|
4015
|
+
z24.object({
|
|
4016
|
+
type: z24.literal("update_file"),
|
|
4017
|
+
path: z24.string(),
|
|
4018
|
+
diff: z24.string()
|
|
3931
4019
|
})
|
|
3932
4020
|
])
|
|
3933
4021
|
}),
|
|
3934
|
-
|
|
3935
|
-
type:
|
|
3936
|
-
id:
|
|
3937
|
-
call_id:
|
|
3938
|
-
status:
|
|
3939
|
-
action:
|
|
3940
|
-
commands:
|
|
4022
|
+
z24.object({
|
|
4023
|
+
type: z24.literal("shell_call"),
|
|
4024
|
+
id: z24.string(),
|
|
4025
|
+
call_id: z24.string(),
|
|
4026
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4027
|
+
action: z24.object({
|
|
4028
|
+
commands: z24.array(z24.string())
|
|
3941
4029
|
})
|
|
3942
4030
|
}),
|
|
3943
|
-
|
|
3944
|
-
type:
|
|
3945
|
-
id:
|
|
3946
|
-
encrypted_content:
|
|
4031
|
+
z24.object({
|
|
4032
|
+
type: z24.literal("compaction"),
|
|
4033
|
+
id: z24.string(),
|
|
4034
|
+
encrypted_content: z24.string()
|
|
3947
4035
|
}),
|
|
3948
|
-
|
|
3949
|
-
type:
|
|
3950
|
-
id:
|
|
3951
|
-
call_id:
|
|
3952
|
-
status:
|
|
3953
|
-
output:
|
|
3954
|
-
|
|
3955
|
-
stdout:
|
|
3956
|
-
stderr:
|
|
3957
|
-
outcome:
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
type:
|
|
3961
|
-
exit_code:
|
|
4036
|
+
z24.object({
|
|
4037
|
+
type: z24.literal("shell_call_output"),
|
|
4038
|
+
id: z24.string(),
|
|
4039
|
+
call_id: z24.string(),
|
|
4040
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4041
|
+
output: z24.array(
|
|
4042
|
+
z24.object({
|
|
4043
|
+
stdout: z24.string(),
|
|
4044
|
+
stderr: z24.string(),
|
|
4045
|
+
outcome: z24.discriminatedUnion("type", [
|
|
4046
|
+
z24.object({ type: z24.literal("timeout") }),
|
|
4047
|
+
z24.object({
|
|
4048
|
+
type: z24.literal("exit"),
|
|
4049
|
+
exit_code: z24.number()
|
|
3962
4050
|
})
|
|
3963
4051
|
])
|
|
3964
4052
|
})
|
|
3965
4053
|
)
|
|
3966
4054
|
}),
|
|
3967
|
-
|
|
3968
|
-
type:
|
|
3969
|
-
id:
|
|
3970
|
-
execution:
|
|
3971
|
-
call_id:
|
|
3972
|
-
status:
|
|
3973
|
-
arguments:
|
|
4055
|
+
z24.object({
|
|
4056
|
+
type: z24.literal("tool_search_call"),
|
|
4057
|
+
id: z24.string(),
|
|
4058
|
+
execution: z24.enum(["server", "client"]),
|
|
4059
|
+
call_id: z24.string().nullable(),
|
|
4060
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4061
|
+
arguments: z24.unknown()
|
|
3974
4062
|
}),
|
|
3975
|
-
|
|
3976
|
-
type:
|
|
3977
|
-
id:
|
|
3978
|
-
execution:
|
|
3979
|
-
call_id:
|
|
3980
|
-
status:
|
|
3981
|
-
tools:
|
|
4063
|
+
z24.object({
|
|
4064
|
+
type: z24.literal("tool_search_output"),
|
|
4065
|
+
id: z24.string(),
|
|
4066
|
+
execution: z24.enum(["server", "client"]),
|
|
4067
|
+
call_id: z24.string().nullable(),
|
|
4068
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4069
|
+
tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
|
|
3982
4070
|
})
|
|
3983
4071
|
])
|
|
3984
4072
|
}),
|
|
3985
|
-
|
|
3986
|
-
type:
|
|
3987
|
-
item_id:
|
|
3988
|
-
output_index:
|
|
3989
|
-
delta:
|
|
4073
|
+
z24.object({
|
|
4074
|
+
type: z24.literal("response.function_call_arguments.delta"),
|
|
4075
|
+
item_id: z24.string(),
|
|
4076
|
+
output_index: z24.number(),
|
|
4077
|
+
delta: z24.string()
|
|
3990
4078
|
}),
|
|
3991
|
-
|
|
3992
|
-
type:
|
|
3993
|
-
item_id:
|
|
3994
|
-
output_index:
|
|
3995
|
-
delta:
|
|
4079
|
+
z24.object({
|
|
4080
|
+
type: z24.literal("response.custom_tool_call_input.delta"),
|
|
4081
|
+
item_id: z24.string(),
|
|
4082
|
+
output_index: z24.number(),
|
|
4083
|
+
delta: z24.string()
|
|
3996
4084
|
}),
|
|
3997
|
-
|
|
3998
|
-
type:
|
|
3999
|
-
item_id:
|
|
4000
|
-
output_index:
|
|
4001
|
-
partial_image_b64:
|
|
4085
|
+
z24.object({
|
|
4086
|
+
type: z24.literal("response.image_generation_call.partial_image"),
|
|
4087
|
+
item_id: z24.string(),
|
|
4088
|
+
output_index: z24.number(),
|
|
4089
|
+
partial_image_b64: z24.string()
|
|
4002
4090
|
}),
|
|
4003
|
-
|
|
4004
|
-
type:
|
|
4005
|
-
item_id:
|
|
4006
|
-
output_index:
|
|
4007
|
-
delta:
|
|
4091
|
+
z24.object({
|
|
4092
|
+
type: z24.literal("response.code_interpreter_call_code.delta"),
|
|
4093
|
+
item_id: z24.string(),
|
|
4094
|
+
output_index: z24.number(),
|
|
4095
|
+
delta: z24.string()
|
|
4008
4096
|
}),
|
|
4009
|
-
|
|
4010
|
-
type:
|
|
4011
|
-
item_id:
|
|
4012
|
-
output_index:
|
|
4013
|
-
code:
|
|
4097
|
+
z24.object({
|
|
4098
|
+
type: z24.literal("response.code_interpreter_call_code.done"),
|
|
4099
|
+
item_id: z24.string(),
|
|
4100
|
+
output_index: z24.number(),
|
|
4101
|
+
code: z24.string()
|
|
4014
4102
|
}),
|
|
4015
|
-
|
|
4016
|
-
type:
|
|
4017
|
-
annotation:
|
|
4018
|
-
|
|
4019
|
-
type:
|
|
4020
|
-
start_index:
|
|
4021
|
-
end_index:
|
|
4022
|
-
url:
|
|
4023
|
-
title:
|
|
4103
|
+
z24.object({
|
|
4104
|
+
type: z24.literal("response.output_text.annotation.added"),
|
|
4105
|
+
annotation: z24.discriminatedUnion("type", [
|
|
4106
|
+
z24.object({
|
|
4107
|
+
type: z24.literal("url_citation"),
|
|
4108
|
+
start_index: z24.number(),
|
|
4109
|
+
end_index: z24.number(),
|
|
4110
|
+
url: z24.string(),
|
|
4111
|
+
title: z24.string()
|
|
4024
4112
|
}),
|
|
4025
|
-
|
|
4026
|
-
type:
|
|
4027
|
-
file_id:
|
|
4028
|
-
filename:
|
|
4029
|
-
index:
|
|
4113
|
+
z24.object({
|
|
4114
|
+
type: z24.literal("file_citation"),
|
|
4115
|
+
file_id: z24.string(),
|
|
4116
|
+
filename: z24.string(),
|
|
4117
|
+
index: z24.number()
|
|
4030
4118
|
}),
|
|
4031
|
-
|
|
4032
|
-
type:
|
|
4033
|
-
container_id:
|
|
4034
|
-
file_id:
|
|
4035
|
-
filename:
|
|
4036
|
-
start_index:
|
|
4037
|
-
end_index:
|
|
4119
|
+
z24.object({
|
|
4120
|
+
type: z24.literal("container_file_citation"),
|
|
4121
|
+
container_id: z24.string(),
|
|
4122
|
+
file_id: z24.string(),
|
|
4123
|
+
filename: z24.string(),
|
|
4124
|
+
start_index: z24.number(),
|
|
4125
|
+
end_index: z24.number()
|
|
4038
4126
|
}),
|
|
4039
|
-
|
|
4040
|
-
type:
|
|
4041
|
-
file_id:
|
|
4042
|
-
index:
|
|
4127
|
+
z24.object({
|
|
4128
|
+
type: z24.literal("file_path"),
|
|
4129
|
+
file_id: z24.string(),
|
|
4130
|
+
index: z24.number()
|
|
4043
4131
|
})
|
|
4044
4132
|
])
|
|
4045
4133
|
}),
|
|
4046
|
-
|
|
4047
|
-
type:
|
|
4048
|
-
item_id:
|
|
4049
|
-
summary_index:
|
|
4134
|
+
z24.object({
|
|
4135
|
+
type: z24.literal("response.reasoning_summary_part.added"),
|
|
4136
|
+
item_id: z24.string(),
|
|
4137
|
+
summary_index: z24.number()
|
|
4050
4138
|
}),
|
|
4051
|
-
|
|
4052
|
-
type:
|
|
4053
|
-
item_id:
|
|
4054
|
-
summary_index:
|
|
4055
|
-
delta:
|
|
4139
|
+
z24.object({
|
|
4140
|
+
type: z24.literal("response.reasoning_summary_text.delta"),
|
|
4141
|
+
item_id: z24.string(),
|
|
4142
|
+
summary_index: z24.number(),
|
|
4143
|
+
delta: z24.string()
|
|
4056
4144
|
}),
|
|
4057
|
-
|
|
4058
|
-
type:
|
|
4059
|
-
item_id:
|
|
4060
|
-
summary_index:
|
|
4145
|
+
z24.object({
|
|
4146
|
+
type: z24.literal("response.reasoning_summary_part.done"),
|
|
4147
|
+
item_id: z24.string(),
|
|
4148
|
+
summary_index: z24.number()
|
|
4061
4149
|
}),
|
|
4062
|
-
|
|
4063
|
-
type:
|
|
4064
|
-
item_id:
|
|
4065
|
-
output_index:
|
|
4066
|
-
delta:
|
|
4067
|
-
obfuscation:
|
|
4150
|
+
z24.object({
|
|
4151
|
+
type: z24.literal("response.apply_patch_call_operation_diff.delta"),
|
|
4152
|
+
item_id: z24.string(),
|
|
4153
|
+
output_index: z24.number(),
|
|
4154
|
+
delta: z24.string(),
|
|
4155
|
+
obfuscation: z24.string().nullish()
|
|
4068
4156
|
}),
|
|
4069
|
-
|
|
4070
|
-
type:
|
|
4071
|
-
item_id:
|
|
4072
|
-
output_index:
|
|
4073
|
-
diff:
|
|
4157
|
+
z24.object({
|
|
4158
|
+
type: z24.literal("response.apply_patch_call_operation_diff.done"),
|
|
4159
|
+
item_id: z24.string(),
|
|
4160
|
+
output_index: z24.number(),
|
|
4161
|
+
diff: z24.string()
|
|
4074
4162
|
}),
|
|
4075
|
-
|
|
4076
|
-
type:
|
|
4077
|
-
sequence_number:
|
|
4078
|
-
error:
|
|
4079
|
-
type:
|
|
4080
|
-
code:
|
|
4081
|
-
message:
|
|
4082
|
-
param:
|
|
4163
|
+
z24.object({
|
|
4164
|
+
type: z24.literal("error"),
|
|
4165
|
+
sequence_number: z24.number(),
|
|
4166
|
+
error: z24.object({
|
|
4167
|
+
type: z24.string(),
|
|
4168
|
+
code: z24.string(),
|
|
4169
|
+
message: z24.string(),
|
|
4170
|
+
param: z24.string().nullish()
|
|
4083
4171
|
})
|
|
4084
4172
|
}),
|
|
4085
|
-
|
|
4173
|
+
z24.object({ type: z24.string() }).loose().transform((value) => ({
|
|
4086
4174
|
type: "unknown_chunk",
|
|
4087
4175
|
message: value.type
|
|
4088
4176
|
}))
|
|
@@ -4090,318 +4178,319 @@ var openaiResponsesChunkSchema = lazySchema21(
|
|
|
4090
4178
|
])
|
|
4091
4179
|
)
|
|
4092
4180
|
);
|
|
4093
|
-
var openaiResponsesResponseSchema =
|
|
4094
|
-
() =>
|
|
4095
|
-
|
|
4096
|
-
id:
|
|
4097
|
-
created_at:
|
|
4098
|
-
error:
|
|
4099
|
-
message:
|
|
4100
|
-
type:
|
|
4101
|
-
param:
|
|
4102
|
-
code:
|
|
4181
|
+
var openaiResponsesResponseSchema = lazySchema22(
|
|
4182
|
+
() => zodSchema22(
|
|
4183
|
+
z24.object({
|
|
4184
|
+
id: z24.string().optional(),
|
|
4185
|
+
created_at: z24.number().optional(),
|
|
4186
|
+
error: z24.object({
|
|
4187
|
+
message: z24.string(),
|
|
4188
|
+
type: z24.string(),
|
|
4189
|
+
param: z24.string().nullish(),
|
|
4190
|
+
code: z24.string()
|
|
4103
4191
|
}).nullish(),
|
|
4104
|
-
model:
|
|
4105
|
-
output:
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
type:
|
|
4109
|
-
role:
|
|
4110
|
-
id:
|
|
4111
|
-
phase:
|
|
4112
|
-
content:
|
|
4113
|
-
|
|
4114
|
-
type:
|
|
4115
|
-
text:
|
|
4116
|
-
logprobs:
|
|
4117
|
-
|
|
4118
|
-
token:
|
|
4119
|
-
logprob:
|
|
4120
|
-
top_logprobs:
|
|
4121
|
-
|
|
4122
|
-
token:
|
|
4123
|
-
logprob:
|
|
4192
|
+
model: z24.string().optional(),
|
|
4193
|
+
output: z24.array(
|
|
4194
|
+
z24.discriminatedUnion("type", [
|
|
4195
|
+
z24.object({
|
|
4196
|
+
type: z24.literal("message"),
|
|
4197
|
+
role: z24.literal("assistant"),
|
|
4198
|
+
id: z24.string(),
|
|
4199
|
+
phase: z24.enum(["commentary", "final_answer"]).nullish(),
|
|
4200
|
+
content: z24.array(
|
|
4201
|
+
z24.object({
|
|
4202
|
+
type: z24.literal("output_text"),
|
|
4203
|
+
text: z24.string(),
|
|
4204
|
+
logprobs: z24.array(
|
|
4205
|
+
z24.object({
|
|
4206
|
+
token: z24.string(),
|
|
4207
|
+
logprob: z24.number(),
|
|
4208
|
+
top_logprobs: z24.array(
|
|
4209
|
+
z24.object({
|
|
4210
|
+
token: z24.string(),
|
|
4211
|
+
logprob: z24.number()
|
|
4124
4212
|
})
|
|
4125
4213
|
)
|
|
4126
4214
|
})
|
|
4127
4215
|
).nullish(),
|
|
4128
|
-
annotations:
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
type:
|
|
4132
|
-
start_index:
|
|
4133
|
-
end_index:
|
|
4134
|
-
url:
|
|
4135
|
-
title:
|
|
4216
|
+
annotations: z24.array(
|
|
4217
|
+
z24.discriminatedUnion("type", [
|
|
4218
|
+
z24.object({
|
|
4219
|
+
type: z24.literal("url_citation"),
|
|
4220
|
+
start_index: z24.number(),
|
|
4221
|
+
end_index: z24.number(),
|
|
4222
|
+
url: z24.string(),
|
|
4223
|
+
title: z24.string()
|
|
4136
4224
|
}),
|
|
4137
|
-
|
|
4138
|
-
type:
|
|
4139
|
-
file_id:
|
|
4140
|
-
filename:
|
|
4141
|
-
index:
|
|
4225
|
+
z24.object({
|
|
4226
|
+
type: z24.literal("file_citation"),
|
|
4227
|
+
file_id: z24.string(),
|
|
4228
|
+
filename: z24.string(),
|
|
4229
|
+
index: z24.number()
|
|
4142
4230
|
}),
|
|
4143
|
-
|
|
4144
|
-
type:
|
|
4145
|
-
container_id:
|
|
4146
|
-
file_id:
|
|
4147
|
-
filename:
|
|
4148
|
-
start_index:
|
|
4149
|
-
end_index:
|
|
4231
|
+
z24.object({
|
|
4232
|
+
type: z24.literal("container_file_citation"),
|
|
4233
|
+
container_id: z24.string(),
|
|
4234
|
+
file_id: z24.string(),
|
|
4235
|
+
filename: z24.string(),
|
|
4236
|
+
start_index: z24.number(),
|
|
4237
|
+
end_index: z24.number()
|
|
4150
4238
|
}),
|
|
4151
|
-
|
|
4152
|
-
type:
|
|
4153
|
-
file_id:
|
|
4154
|
-
index:
|
|
4239
|
+
z24.object({
|
|
4240
|
+
type: z24.literal("file_path"),
|
|
4241
|
+
file_id: z24.string(),
|
|
4242
|
+
index: z24.number()
|
|
4155
4243
|
})
|
|
4156
4244
|
])
|
|
4157
4245
|
)
|
|
4158
4246
|
})
|
|
4159
4247
|
)
|
|
4160
4248
|
}),
|
|
4161
|
-
|
|
4162
|
-
type:
|
|
4163
|
-
id:
|
|
4164
|
-
status:
|
|
4165
|
-
action:
|
|
4166
|
-
|
|
4167
|
-
type:
|
|
4168
|
-
query:
|
|
4169
|
-
sources:
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
type:
|
|
4174
|
-
name:
|
|
4249
|
+
z24.object({
|
|
4250
|
+
type: z24.literal("web_search_call"),
|
|
4251
|
+
id: z24.string(),
|
|
4252
|
+
status: z24.string(),
|
|
4253
|
+
action: z24.discriminatedUnion("type", [
|
|
4254
|
+
z24.object({
|
|
4255
|
+
type: z24.literal("search"),
|
|
4256
|
+
query: z24.string().nullish(),
|
|
4257
|
+
sources: z24.array(
|
|
4258
|
+
z24.discriminatedUnion("type", [
|
|
4259
|
+
z24.object({ type: z24.literal("url"), url: z24.string() }),
|
|
4260
|
+
z24.object({
|
|
4261
|
+
type: z24.literal("api"),
|
|
4262
|
+
name: z24.string()
|
|
4175
4263
|
})
|
|
4176
4264
|
])
|
|
4177
4265
|
).nullish()
|
|
4178
4266
|
}),
|
|
4179
|
-
|
|
4180
|
-
type:
|
|
4181
|
-
url:
|
|
4267
|
+
z24.object({
|
|
4268
|
+
type: z24.literal("open_page"),
|
|
4269
|
+
url: z24.string().nullish()
|
|
4182
4270
|
}),
|
|
4183
|
-
|
|
4184
|
-
type:
|
|
4185
|
-
url:
|
|
4186
|
-
pattern:
|
|
4271
|
+
z24.object({
|
|
4272
|
+
type: z24.literal("find_in_page"),
|
|
4273
|
+
url: z24.string().nullish(),
|
|
4274
|
+
pattern: z24.string().nullish()
|
|
4187
4275
|
})
|
|
4188
4276
|
]).nullish()
|
|
4189
4277
|
}),
|
|
4190
|
-
|
|
4191
|
-
type:
|
|
4192
|
-
id:
|
|
4193
|
-
queries:
|
|
4194
|
-
results:
|
|
4195
|
-
|
|
4196
|
-
attributes:
|
|
4197
|
-
|
|
4198
|
-
|
|
4278
|
+
z24.object({
|
|
4279
|
+
type: z24.literal("file_search_call"),
|
|
4280
|
+
id: z24.string(),
|
|
4281
|
+
queries: z24.array(z24.string()),
|
|
4282
|
+
results: z24.array(
|
|
4283
|
+
z24.object({
|
|
4284
|
+
attributes: z24.record(
|
|
4285
|
+
z24.string(),
|
|
4286
|
+
z24.union([z24.string(), z24.number(), z24.boolean()])
|
|
4199
4287
|
),
|
|
4200
|
-
file_id:
|
|
4201
|
-
filename:
|
|
4202
|
-
score:
|
|
4203
|
-
text:
|
|
4288
|
+
file_id: z24.string(),
|
|
4289
|
+
filename: z24.string(),
|
|
4290
|
+
score: z24.number(),
|
|
4291
|
+
text: z24.string()
|
|
4204
4292
|
})
|
|
4205
4293
|
).nullish()
|
|
4206
4294
|
}),
|
|
4207
|
-
|
|
4208
|
-
type:
|
|
4209
|
-
id:
|
|
4210
|
-
code:
|
|
4211
|
-
container_id:
|
|
4212
|
-
outputs:
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4295
|
+
z24.object({
|
|
4296
|
+
type: z24.literal("code_interpreter_call"),
|
|
4297
|
+
id: z24.string(),
|
|
4298
|
+
code: z24.string().nullable(),
|
|
4299
|
+
container_id: z24.string(),
|
|
4300
|
+
outputs: z24.array(
|
|
4301
|
+
z24.discriminatedUnion("type", [
|
|
4302
|
+
z24.object({ type: z24.literal("logs"), logs: z24.string() }),
|
|
4303
|
+
z24.object({ type: z24.literal("image"), url: z24.string() })
|
|
4216
4304
|
])
|
|
4217
4305
|
).nullable()
|
|
4218
4306
|
}),
|
|
4219
|
-
|
|
4220
|
-
type:
|
|
4221
|
-
id:
|
|
4222
|
-
result:
|
|
4307
|
+
z24.object({
|
|
4308
|
+
type: z24.literal("image_generation_call"),
|
|
4309
|
+
id: z24.string(),
|
|
4310
|
+
result: z24.string()
|
|
4223
4311
|
}),
|
|
4224
|
-
|
|
4225
|
-
type:
|
|
4226
|
-
id:
|
|
4227
|
-
call_id:
|
|
4228
|
-
action:
|
|
4229
|
-
type:
|
|
4230
|
-
command:
|
|
4231
|
-
timeout_ms:
|
|
4232
|
-
user:
|
|
4233
|
-
working_directory:
|
|
4234
|
-
env:
|
|
4312
|
+
z24.object({
|
|
4313
|
+
type: z24.literal("local_shell_call"),
|
|
4314
|
+
id: z24.string(),
|
|
4315
|
+
call_id: z24.string(),
|
|
4316
|
+
action: z24.object({
|
|
4317
|
+
type: z24.literal("exec"),
|
|
4318
|
+
command: z24.array(z24.string()),
|
|
4319
|
+
timeout_ms: z24.number().optional(),
|
|
4320
|
+
user: z24.string().optional(),
|
|
4321
|
+
working_directory: z24.string().optional(),
|
|
4322
|
+
env: z24.record(z24.string(), z24.string()).optional()
|
|
4235
4323
|
})
|
|
4236
4324
|
}),
|
|
4237
|
-
|
|
4238
|
-
type:
|
|
4239
|
-
call_id:
|
|
4240
|
-
name:
|
|
4241
|
-
arguments:
|
|
4242
|
-
id:
|
|
4325
|
+
z24.object({
|
|
4326
|
+
type: z24.literal("function_call"),
|
|
4327
|
+
call_id: z24.string(),
|
|
4328
|
+
name: z24.string(),
|
|
4329
|
+
arguments: z24.string(),
|
|
4330
|
+
id: z24.string(),
|
|
4331
|
+
namespace: z24.string().nullish()
|
|
4243
4332
|
}),
|
|
4244
|
-
|
|
4245
|
-
type:
|
|
4246
|
-
call_id:
|
|
4247
|
-
name:
|
|
4248
|
-
input:
|
|
4249
|
-
id:
|
|
4333
|
+
z24.object({
|
|
4334
|
+
type: z24.literal("custom_tool_call"),
|
|
4335
|
+
call_id: z24.string(),
|
|
4336
|
+
name: z24.string(),
|
|
4337
|
+
input: z24.string(),
|
|
4338
|
+
id: z24.string()
|
|
4250
4339
|
}),
|
|
4251
|
-
|
|
4252
|
-
type:
|
|
4253
|
-
id:
|
|
4254
|
-
status:
|
|
4340
|
+
z24.object({
|
|
4341
|
+
type: z24.literal("computer_call"),
|
|
4342
|
+
id: z24.string(),
|
|
4343
|
+
status: z24.string().optional()
|
|
4255
4344
|
}),
|
|
4256
|
-
|
|
4257
|
-
type:
|
|
4258
|
-
id:
|
|
4259
|
-
encrypted_content:
|
|
4260
|
-
summary:
|
|
4261
|
-
|
|
4262
|
-
type:
|
|
4263
|
-
text:
|
|
4345
|
+
z24.object({
|
|
4346
|
+
type: z24.literal("reasoning"),
|
|
4347
|
+
id: z24.string(),
|
|
4348
|
+
encrypted_content: z24.string().nullish(),
|
|
4349
|
+
summary: z24.array(
|
|
4350
|
+
z24.object({
|
|
4351
|
+
type: z24.literal("summary_text"),
|
|
4352
|
+
text: z24.string()
|
|
4264
4353
|
})
|
|
4265
4354
|
)
|
|
4266
4355
|
}),
|
|
4267
|
-
|
|
4268
|
-
type:
|
|
4269
|
-
id:
|
|
4270
|
-
status:
|
|
4271
|
-
arguments:
|
|
4272
|
-
name:
|
|
4273
|
-
server_label:
|
|
4274
|
-
output:
|
|
4275
|
-
error:
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
type:
|
|
4279
|
-
code:
|
|
4280
|
-
message:
|
|
4356
|
+
z24.object({
|
|
4357
|
+
type: z24.literal("mcp_call"),
|
|
4358
|
+
id: z24.string(),
|
|
4359
|
+
status: z24.string(),
|
|
4360
|
+
arguments: z24.string(),
|
|
4361
|
+
name: z24.string(),
|
|
4362
|
+
server_label: z24.string(),
|
|
4363
|
+
output: z24.string().nullish(),
|
|
4364
|
+
error: z24.union([
|
|
4365
|
+
z24.string(),
|
|
4366
|
+
z24.object({
|
|
4367
|
+
type: z24.string().optional(),
|
|
4368
|
+
code: z24.union([z24.number(), z24.string()]).optional(),
|
|
4369
|
+
message: z24.string().optional()
|
|
4281
4370
|
}).loose()
|
|
4282
4371
|
]).nullish(),
|
|
4283
|
-
approval_request_id:
|
|
4372
|
+
approval_request_id: z24.string().nullish()
|
|
4284
4373
|
}),
|
|
4285
|
-
|
|
4286
|
-
type:
|
|
4287
|
-
id:
|
|
4288
|
-
server_label:
|
|
4289
|
-
tools:
|
|
4290
|
-
|
|
4291
|
-
name:
|
|
4292
|
-
description:
|
|
4293
|
-
input_schema:
|
|
4294
|
-
annotations:
|
|
4374
|
+
z24.object({
|
|
4375
|
+
type: z24.literal("mcp_list_tools"),
|
|
4376
|
+
id: z24.string(),
|
|
4377
|
+
server_label: z24.string(),
|
|
4378
|
+
tools: z24.array(
|
|
4379
|
+
z24.object({
|
|
4380
|
+
name: z24.string(),
|
|
4381
|
+
description: z24.string().optional(),
|
|
4382
|
+
input_schema: z24.any(),
|
|
4383
|
+
annotations: z24.record(z24.string(), z24.unknown()).optional()
|
|
4295
4384
|
})
|
|
4296
4385
|
),
|
|
4297
|
-
error:
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
type:
|
|
4301
|
-
code:
|
|
4302
|
-
message:
|
|
4386
|
+
error: z24.union([
|
|
4387
|
+
z24.string(),
|
|
4388
|
+
z24.object({
|
|
4389
|
+
type: z24.string().optional(),
|
|
4390
|
+
code: z24.union([z24.number(), z24.string()]).optional(),
|
|
4391
|
+
message: z24.string().optional()
|
|
4303
4392
|
}).loose()
|
|
4304
4393
|
]).optional()
|
|
4305
4394
|
}),
|
|
4306
|
-
|
|
4307
|
-
type:
|
|
4308
|
-
id:
|
|
4309
|
-
server_label:
|
|
4310
|
-
name:
|
|
4311
|
-
arguments:
|
|
4312
|
-
approval_request_id:
|
|
4395
|
+
z24.object({
|
|
4396
|
+
type: z24.literal("mcp_approval_request"),
|
|
4397
|
+
id: z24.string(),
|
|
4398
|
+
server_label: z24.string(),
|
|
4399
|
+
name: z24.string(),
|
|
4400
|
+
arguments: z24.string(),
|
|
4401
|
+
approval_request_id: z24.string().optional()
|
|
4313
4402
|
}),
|
|
4314
|
-
|
|
4315
|
-
type:
|
|
4316
|
-
id:
|
|
4317
|
-
call_id:
|
|
4318
|
-
status:
|
|
4319
|
-
operation:
|
|
4320
|
-
|
|
4321
|
-
type:
|
|
4322
|
-
path:
|
|
4323
|
-
diff:
|
|
4403
|
+
z24.object({
|
|
4404
|
+
type: z24.literal("apply_patch_call"),
|
|
4405
|
+
id: z24.string(),
|
|
4406
|
+
call_id: z24.string(),
|
|
4407
|
+
status: z24.enum(["in_progress", "completed"]),
|
|
4408
|
+
operation: z24.discriminatedUnion("type", [
|
|
4409
|
+
z24.object({
|
|
4410
|
+
type: z24.literal("create_file"),
|
|
4411
|
+
path: z24.string(),
|
|
4412
|
+
diff: z24.string()
|
|
4324
4413
|
}),
|
|
4325
|
-
|
|
4326
|
-
type:
|
|
4327
|
-
path:
|
|
4414
|
+
z24.object({
|
|
4415
|
+
type: z24.literal("delete_file"),
|
|
4416
|
+
path: z24.string()
|
|
4328
4417
|
}),
|
|
4329
|
-
|
|
4330
|
-
type:
|
|
4331
|
-
path:
|
|
4332
|
-
diff:
|
|
4418
|
+
z24.object({
|
|
4419
|
+
type: z24.literal("update_file"),
|
|
4420
|
+
path: z24.string(),
|
|
4421
|
+
diff: z24.string()
|
|
4333
4422
|
})
|
|
4334
4423
|
])
|
|
4335
4424
|
}),
|
|
4336
|
-
|
|
4337
|
-
type:
|
|
4338
|
-
id:
|
|
4339
|
-
call_id:
|
|
4340
|
-
status:
|
|
4341
|
-
action:
|
|
4342
|
-
commands:
|
|
4425
|
+
z24.object({
|
|
4426
|
+
type: z24.literal("shell_call"),
|
|
4427
|
+
id: z24.string(),
|
|
4428
|
+
call_id: z24.string(),
|
|
4429
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4430
|
+
action: z24.object({
|
|
4431
|
+
commands: z24.array(z24.string())
|
|
4343
4432
|
})
|
|
4344
4433
|
}),
|
|
4345
|
-
|
|
4346
|
-
type:
|
|
4347
|
-
id:
|
|
4348
|
-
encrypted_content:
|
|
4434
|
+
z24.object({
|
|
4435
|
+
type: z24.literal("compaction"),
|
|
4436
|
+
id: z24.string(),
|
|
4437
|
+
encrypted_content: z24.string()
|
|
4349
4438
|
}),
|
|
4350
|
-
|
|
4351
|
-
type:
|
|
4352
|
-
id:
|
|
4353
|
-
call_id:
|
|
4354
|
-
status:
|
|
4355
|
-
output:
|
|
4356
|
-
|
|
4357
|
-
stdout:
|
|
4358
|
-
stderr:
|
|
4359
|
-
outcome:
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
type:
|
|
4363
|
-
exit_code:
|
|
4439
|
+
z24.object({
|
|
4440
|
+
type: z24.literal("shell_call_output"),
|
|
4441
|
+
id: z24.string(),
|
|
4442
|
+
call_id: z24.string(),
|
|
4443
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4444
|
+
output: z24.array(
|
|
4445
|
+
z24.object({
|
|
4446
|
+
stdout: z24.string(),
|
|
4447
|
+
stderr: z24.string(),
|
|
4448
|
+
outcome: z24.discriminatedUnion("type", [
|
|
4449
|
+
z24.object({ type: z24.literal("timeout") }),
|
|
4450
|
+
z24.object({
|
|
4451
|
+
type: z24.literal("exit"),
|
|
4452
|
+
exit_code: z24.number()
|
|
4364
4453
|
})
|
|
4365
4454
|
])
|
|
4366
4455
|
})
|
|
4367
4456
|
)
|
|
4368
4457
|
}),
|
|
4369
|
-
|
|
4370
|
-
type:
|
|
4371
|
-
id:
|
|
4372
|
-
execution:
|
|
4373
|
-
call_id:
|
|
4374
|
-
status:
|
|
4375
|
-
arguments:
|
|
4458
|
+
z24.object({
|
|
4459
|
+
type: z24.literal("tool_search_call"),
|
|
4460
|
+
id: z24.string(),
|
|
4461
|
+
execution: z24.enum(["server", "client"]),
|
|
4462
|
+
call_id: z24.string().nullable(),
|
|
4463
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4464
|
+
arguments: z24.unknown()
|
|
4376
4465
|
}),
|
|
4377
|
-
|
|
4378
|
-
type:
|
|
4379
|
-
id:
|
|
4380
|
-
execution:
|
|
4381
|
-
call_id:
|
|
4382
|
-
status:
|
|
4383
|
-
tools:
|
|
4466
|
+
z24.object({
|
|
4467
|
+
type: z24.literal("tool_search_output"),
|
|
4468
|
+
id: z24.string(),
|
|
4469
|
+
execution: z24.enum(["server", "client"]),
|
|
4470
|
+
call_id: z24.string().nullable(),
|
|
4471
|
+
status: z24.enum(["in_progress", "completed", "incomplete"]),
|
|
4472
|
+
tools: z24.array(z24.record(z24.string(), jsonValueSchema2.optional()))
|
|
4384
4473
|
})
|
|
4385
4474
|
])
|
|
4386
4475
|
).optional(),
|
|
4387
|
-
service_tier:
|
|
4388
|
-
incomplete_details:
|
|
4389
|
-
usage:
|
|
4390
|
-
input_tokens:
|
|
4391
|
-
input_tokens_details:
|
|
4392
|
-
output_tokens:
|
|
4393
|
-
output_tokens_details:
|
|
4476
|
+
service_tier: z24.string().nullish(),
|
|
4477
|
+
incomplete_details: z24.object({ reason: z24.string() }).nullish(),
|
|
4478
|
+
usage: z24.object({
|
|
4479
|
+
input_tokens: z24.number(),
|
|
4480
|
+
input_tokens_details: z24.object({ cached_tokens: z24.number().nullish() }).nullish(),
|
|
4481
|
+
output_tokens: z24.number(),
|
|
4482
|
+
output_tokens_details: z24.object({ reasoning_tokens: z24.number().nullish() }).nullish()
|
|
4394
4483
|
}).optional()
|
|
4395
4484
|
})
|
|
4396
4485
|
)
|
|
4397
4486
|
);
|
|
4398
4487
|
|
|
4399
|
-
// src/responses/openai-responses-options.ts
|
|
4488
|
+
// src/responses/openai-responses-language-model-options.ts
|
|
4400
4489
|
import {
|
|
4401
|
-
lazySchema as
|
|
4402
|
-
zodSchema as
|
|
4490
|
+
lazySchema as lazySchema23,
|
|
4491
|
+
zodSchema as zodSchema23
|
|
4403
4492
|
} from "@ai-sdk/provider-utils";
|
|
4404
|
-
import { z as
|
|
4493
|
+
import { z as z25 } from "zod/v4";
|
|
4405
4494
|
var TOP_LOGPROBS_MAX = 20;
|
|
4406
4495
|
var openaiResponsesReasoningModelIds = [
|
|
4407
4496
|
"o1",
|
|
@@ -4466,9 +4555,9 @@ var openaiResponsesModelIds = [
|
|
|
4466
4555
|
"gpt-5-chat-latest",
|
|
4467
4556
|
...openaiResponsesReasoningModelIds
|
|
4468
4557
|
];
|
|
4469
|
-
var openaiLanguageModelResponsesOptionsSchema =
|
|
4470
|
-
() =>
|
|
4471
|
-
|
|
4558
|
+
var openaiLanguageModelResponsesOptionsSchema = lazySchema23(
|
|
4559
|
+
() => zodSchema23(
|
|
4560
|
+
z25.object({
|
|
4472
4561
|
/**
|
|
4473
4562
|
* The ID of the OpenAI Conversation to continue.
|
|
4474
4563
|
* You must create a conversation first via the OpenAI API.
|
|
@@ -4476,13 +4565,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4476
4565
|
* Defaults to `undefined`.
|
|
4477
4566
|
* @see https://platform.openai.com/docs/api-reference/conversations/create
|
|
4478
4567
|
*/
|
|
4479
|
-
conversation:
|
|
4568
|
+
conversation: z25.string().nullish(),
|
|
4480
4569
|
/**
|
|
4481
4570
|
* The set of extra fields to include in the response (advanced, usually not needed).
|
|
4482
4571
|
* Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
|
|
4483
4572
|
*/
|
|
4484
|
-
include:
|
|
4485
|
-
|
|
4573
|
+
include: z25.array(
|
|
4574
|
+
z25.enum([
|
|
4486
4575
|
"reasoning.encrypted_content",
|
|
4487
4576
|
// handled internally by default, only needed for unknown reasoning models
|
|
4488
4577
|
"file_search_call.results",
|
|
@@ -4494,7 +4583,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4494
4583
|
* They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
|
|
4495
4584
|
* Defaults to `undefined`.
|
|
4496
4585
|
*/
|
|
4497
|
-
instructions:
|
|
4586
|
+
instructions: z25.string().nullish(),
|
|
4498
4587
|
/**
|
|
4499
4588
|
* Return the log probabilities of the tokens. Including logprobs will increase
|
|
4500
4589
|
* the response size and can slow down response times. However, it can
|
|
@@ -4509,30 +4598,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4509
4598
|
* @see https://platform.openai.com/docs/api-reference/responses/create
|
|
4510
4599
|
* @see https://cookbook.openai.com/examples/using_logprobs
|
|
4511
4600
|
*/
|
|
4512
|
-
logprobs:
|
|
4601
|
+
logprobs: z25.union([z25.boolean(), z25.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
|
|
4513
4602
|
/**
|
|
4514
4603
|
* The maximum number of total calls to built-in tools that can be processed in a response.
|
|
4515
4604
|
* This maximum number applies across all built-in tool calls, not per individual tool.
|
|
4516
4605
|
* Any further attempts to call a tool by the model will be ignored.
|
|
4517
4606
|
*/
|
|
4518
|
-
maxToolCalls:
|
|
4607
|
+
maxToolCalls: z25.number().nullish(),
|
|
4519
4608
|
/**
|
|
4520
4609
|
* Additional metadata to store with the generation.
|
|
4521
4610
|
*/
|
|
4522
|
-
metadata:
|
|
4611
|
+
metadata: z25.any().nullish(),
|
|
4523
4612
|
/**
|
|
4524
4613
|
* Whether to use parallel tool calls. Defaults to `true`.
|
|
4525
4614
|
*/
|
|
4526
|
-
parallelToolCalls:
|
|
4615
|
+
parallelToolCalls: z25.boolean().nullish(),
|
|
4527
4616
|
/**
|
|
4528
4617
|
* The ID of the previous response. You can use it to continue a conversation.
|
|
4529
4618
|
* Defaults to `undefined`.
|
|
4530
4619
|
*/
|
|
4531
|
-
previousResponseId:
|
|
4620
|
+
previousResponseId: z25.string().nullish(),
|
|
4532
4621
|
/**
|
|
4533
4622
|
* Sets a cache key to tie this prompt to cached prefixes for better caching performance.
|
|
4534
4623
|
*/
|
|
4535
|
-
promptCacheKey:
|
|
4624
|
+
promptCacheKey: z25.string().nullish(),
|
|
4536
4625
|
/**
|
|
4537
4626
|
* The retention policy for the prompt cache.
|
|
4538
4627
|
* - 'in_memory': Default. Standard prompt caching behavior.
|
|
@@ -4541,7 +4630,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4541
4630
|
*
|
|
4542
4631
|
* @default 'in_memory'
|
|
4543
4632
|
*/
|
|
4544
|
-
promptCacheRetention:
|
|
4633
|
+
promptCacheRetention: z25.enum(["in_memory", "24h"]).nullish(),
|
|
4545
4634
|
/**
|
|
4546
4635
|
* Reasoning effort for reasoning models. Defaults to `medium`. If you use
|
|
4547
4636
|
* `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
|
|
@@ -4552,17 +4641,17 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4552
4641
|
* OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in
|
|
4553
4642
|
* an error.
|
|
4554
4643
|
*/
|
|
4555
|
-
reasoningEffort:
|
|
4644
|
+
reasoningEffort: z25.string().nullish(),
|
|
4556
4645
|
/**
|
|
4557
4646
|
* Controls reasoning summary output from the model.
|
|
4558
4647
|
* Set to "auto" to automatically receive the richest level available,
|
|
4559
4648
|
* or "detailed" for comprehensive summaries.
|
|
4560
4649
|
*/
|
|
4561
|
-
reasoningSummary:
|
|
4650
|
+
reasoningSummary: z25.string().nullish(),
|
|
4562
4651
|
/**
|
|
4563
4652
|
* The identifier for safety monitoring and tracking.
|
|
4564
4653
|
*/
|
|
4565
|
-
safetyIdentifier:
|
|
4654
|
+
safetyIdentifier: z25.string().nullish(),
|
|
4566
4655
|
/**
|
|
4567
4656
|
* Service tier for the request.
|
|
4568
4657
|
* Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
|
|
@@ -4570,34 +4659,34 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4570
4659
|
*
|
|
4571
4660
|
* Defaults to 'auto'.
|
|
4572
4661
|
*/
|
|
4573
|
-
serviceTier:
|
|
4662
|
+
serviceTier: z25.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
4574
4663
|
/**
|
|
4575
4664
|
* Whether to store the generation. Defaults to `true`.
|
|
4576
4665
|
*/
|
|
4577
|
-
store:
|
|
4666
|
+
store: z25.boolean().nullish(),
|
|
4578
4667
|
/**
|
|
4579
4668
|
* Whether to use strict JSON schema validation.
|
|
4580
4669
|
* Defaults to `true`.
|
|
4581
4670
|
*/
|
|
4582
|
-
strictJsonSchema:
|
|
4671
|
+
strictJsonSchema: z25.boolean().nullish(),
|
|
4583
4672
|
/**
|
|
4584
4673
|
* Controls the verbosity of the model's responses. Lower values ('low') will result
|
|
4585
4674
|
* in more concise responses, while higher values ('high') will result in more verbose responses.
|
|
4586
4675
|
* Valid values: 'low', 'medium', 'high'.
|
|
4587
4676
|
*/
|
|
4588
|
-
textVerbosity:
|
|
4677
|
+
textVerbosity: z25.enum(["low", "medium", "high"]).nullish(),
|
|
4589
4678
|
/**
|
|
4590
4679
|
* Controls output truncation. 'auto' (default) performs truncation automatically;
|
|
4591
4680
|
* 'disabled' turns truncation off.
|
|
4592
4681
|
*/
|
|
4593
|
-
truncation:
|
|
4682
|
+
truncation: z25.enum(["auto", "disabled"]).nullish(),
|
|
4594
4683
|
/**
|
|
4595
4684
|
* A unique identifier representing your end-user, which can help OpenAI to
|
|
4596
4685
|
* monitor and detect abuse.
|
|
4597
4686
|
* Defaults to `undefined`.
|
|
4598
4687
|
* @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
|
|
4599
4688
|
*/
|
|
4600
|
-
user:
|
|
4689
|
+
user: z25.string().nullish(),
|
|
4601
4690
|
/**
|
|
4602
4691
|
* Override the system message mode for this model.
|
|
4603
4692
|
* - 'system': Use the 'system' role for system messages (default for most models)
|
|
@@ -4606,7 +4695,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4606
4695
|
*
|
|
4607
4696
|
* If not specified, the mode is automatically determined based on the model.
|
|
4608
4697
|
*/
|
|
4609
|
-
systemMessageMode:
|
|
4698
|
+
systemMessageMode: z25.enum(["system", "developer", "remove"]).optional(),
|
|
4610
4699
|
/**
|
|
4611
4700
|
* Force treating this model as a reasoning model.
|
|
4612
4701
|
*
|
|
@@ -4616,14 +4705,14 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema22(
|
|
|
4616
4705
|
* When enabled, the SDK applies reasoning-model parameter compatibility rules
|
|
4617
4706
|
* and defaults `systemMessageMode` to `developer` unless overridden.
|
|
4618
4707
|
*/
|
|
4619
|
-
forceReasoning:
|
|
4708
|
+
forceReasoning: z25.boolean().optional(),
|
|
4620
4709
|
/**
|
|
4621
4710
|
* Enable server-side context management (compaction).
|
|
4622
4711
|
*/
|
|
4623
|
-
contextManagement:
|
|
4624
|
-
|
|
4625
|
-
type:
|
|
4626
|
-
compactThreshold:
|
|
4712
|
+
contextManagement: z25.array(
|
|
4713
|
+
z25.object({
|
|
4714
|
+
type: z25.literal("compaction"),
|
|
4715
|
+
compactThreshold: z25.number()
|
|
4627
4716
|
})
|
|
4628
4717
|
).nullish()
|
|
4629
4718
|
})
|
|
@@ -4986,13 +5075,13 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
4986
5075
|
warnings.push({ type: "unsupported", feature: "stopSequences" });
|
|
4987
5076
|
}
|
|
4988
5077
|
const providerOptionsName = this.config.provider.includes("azure") ? "azure" : "openai";
|
|
4989
|
-
let openaiOptions = await
|
|
5078
|
+
let openaiOptions = await parseProviderOptions7({
|
|
4990
5079
|
provider: providerOptionsName,
|
|
4991
5080
|
providerOptions,
|
|
4992
5081
|
schema: openaiLanguageModelResponsesOptionsSchema
|
|
4993
5082
|
});
|
|
4994
5083
|
if (openaiOptions == null && providerOptionsName !== "openai") {
|
|
4995
|
-
openaiOptions = await
|
|
5084
|
+
openaiOptions = await parseProviderOptions7({
|
|
4996
5085
|
provider: "openai",
|
|
4997
5086
|
providerOptions,
|
|
4998
5087
|
schema: openaiLanguageModelResponsesOptionsSchema
|
|
@@ -5468,7 +5557,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
5468
5557
|
input: part.arguments,
|
|
5469
5558
|
providerMetadata: {
|
|
5470
5559
|
[providerOptionsName]: {
|
|
5471
|
-
itemId: part.id
|
|
5560
|
+
itemId: part.id,
|
|
5561
|
+
...part.namespace != null && { namespace: part.namespace }
|
|
5472
5562
|
}
|
|
5473
5563
|
}
|
|
5474
5564
|
});
|
|
@@ -5966,7 +6056,14 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
5966
6056
|
hasFunctionCall = true;
|
|
5967
6057
|
controller.enqueue({
|
|
5968
6058
|
type: "tool-input-end",
|
|
5969
|
-
id: value.item.call_id
|
|
6059
|
+
id: value.item.call_id,
|
|
6060
|
+
...value.item.namespace != null && {
|
|
6061
|
+
providerMetadata: {
|
|
6062
|
+
[providerOptionsName]: {
|
|
6063
|
+
namespace: value.item.namespace
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
6066
|
+
}
|
|
5970
6067
|
});
|
|
5971
6068
|
controller.enqueue({
|
|
5972
6069
|
type: "tool-call",
|
|
@@ -5975,7 +6072,10 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
5975
6072
|
input: value.item.arguments,
|
|
5976
6073
|
providerMetadata: {
|
|
5977
6074
|
[providerOptionsName]: {
|
|
5978
|
-
itemId: value.item.id
|
|
6075
|
+
itemId: value.item.id,
|
|
6076
|
+
...value.item.namespace != null && {
|
|
6077
|
+
namespace: value.item.namespace
|
|
6078
|
+
}
|
|
5979
6079
|
}
|
|
5980
6080
|
}
|
|
5981
6081
|
});
|
|
@@ -6652,24 +6752,24 @@ function escapeJSONDelta(delta) {
|
|
|
6652
6752
|
import {
|
|
6653
6753
|
combineHeaders as combineHeaders7,
|
|
6654
6754
|
createBinaryResponseHandler,
|
|
6655
|
-
parseProviderOptions as
|
|
6755
|
+
parseProviderOptions as parseProviderOptions8,
|
|
6656
6756
|
postJsonToApi as postJsonToApi6,
|
|
6657
6757
|
serializeModelOptions as serializeModelOptions6,
|
|
6658
6758
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE6,
|
|
6659
6759
|
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE6
|
|
6660
6760
|
} from "@ai-sdk/provider-utils";
|
|
6661
6761
|
|
|
6662
|
-
// src/speech/openai-speech-options.ts
|
|
6762
|
+
// src/speech/openai-speech-model-options.ts
|
|
6663
6763
|
import {
|
|
6664
|
-
lazySchema as
|
|
6665
|
-
zodSchema as
|
|
6764
|
+
lazySchema as lazySchema24,
|
|
6765
|
+
zodSchema as zodSchema24
|
|
6666
6766
|
} from "@ai-sdk/provider-utils";
|
|
6667
|
-
import { z as
|
|
6668
|
-
var openaiSpeechModelOptionsSchema =
|
|
6669
|
-
() =>
|
|
6670
|
-
|
|
6671
|
-
instructions:
|
|
6672
|
-
speed:
|
|
6767
|
+
import { z as z26 } from "zod/v4";
|
|
6768
|
+
var openaiSpeechModelOptionsSchema = lazySchema24(
|
|
6769
|
+
() => zodSchema24(
|
|
6770
|
+
z26.object({
|
|
6771
|
+
instructions: z26.string().nullish(),
|
|
6772
|
+
speed: z26.number().min(0.25).max(4).default(1).nullish()
|
|
6673
6773
|
})
|
|
6674
6774
|
)
|
|
6675
6775
|
);
|
|
@@ -6703,7 +6803,7 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
6703
6803
|
providerOptions
|
|
6704
6804
|
}) {
|
|
6705
6805
|
const warnings = [];
|
|
6706
|
-
const openAIOptions = await
|
|
6806
|
+
const openAIOptions = await parseProviderOptions8({
|
|
6707
6807
|
provider: "openai",
|
|
6708
6808
|
providerOptions,
|
|
6709
6809
|
schema: openaiSpeechModelOptionsSchema
|
|
@@ -6790,7 +6890,7 @@ import {
|
|
|
6790
6890
|
convertBase64ToUint8Array as convertBase64ToUint8Array2,
|
|
6791
6891
|
createJsonResponseHandler as createJsonResponseHandler7,
|
|
6792
6892
|
mediaTypeToExtension,
|
|
6793
|
-
parseProviderOptions as
|
|
6893
|
+
parseProviderOptions as parseProviderOptions9,
|
|
6794
6894
|
postFormDataToApi as postFormDataToApi3,
|
|
6795
6895
|
serializeModelOptions as serializeModelOptions7,
|
|
6796
6896
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE7,
|
|
@@ -6798,70 +6898,70 @@ import {
|
|
|
6798
6898
|
} from "@ai-sdk/provider-utils";
|
|
6799
6899
|
|
|
6800
6900
|
// src/transcription/openai-transcription-api.ts
|
|
6801
|
-
import { lazySchema as
|
|
6802
|
-
import { z as
|
|
6803
|
-
var openaiTranscriptionResponseSchema =
|
|
6804
|
-
() =>
|
|
6805
|
-
|
|
6806
|
-
text:
|
|
6807
|
-
language:
|
|
6808
|
-
duration:
|
|
6809
|
-
words:
|
|
6810
|
-
|
|
6811
|
-
word:
|
|
6812
|
-
start:
|
|
6813
|
-
end:
|
|
6901
|
+
import { lazySchema as lazySchema25, zodSchema as zodSchema25 } from "@ai-sdk/provider-utils";
|
|
6902
|
+
import { z as z27 } from "zod/v4";
|
|
6903
|
+
var openaiTranscriptionResponseSchema = lazySchema25(
|
|
6904
|
+
() => zodSchema25(
|
|
6905
|
+
z27.object({
|
|
6906
|
+
text: z27.string(),
|
|
6907
|
+
language: z27.string().nullish(),
|
|
6908
|
+
duration: z27.number().nullish(),
|
|
6909
|
+
words: z27.array(
|
|
6910
|
+
z27.object({
|
|
6911
|
+
word: z27.string(),
|
|
6912
|
+
start: z27.number(),
|
|
6913
|
+
end: z27.number()
|
|
6814
6914
|
})
|
|
6815
6915
|
).nullish(),
|
|
6816
|
-
segments:
|
|
6817
|
-
|
|
6818
|
-
id:
|
|
6819
|
-
seek:
|
|
6820
|
-
start:
|
|
6821
|
-
end:
|
|
6822
|
-
text:
|
|
6823
|
-
tokens:
|
|
6824
|
-
temperature:
|
|
6825
|
-
avg_logprob:
|
|
6826
|
-
compression_ratio:
|
|
6827
|
-
no_speech_prob:
|
|
6916
|
+
segments: z27.array(
|
|
6917
|
+
z27.object({
|
|
6918
|
+
id: z27.number(),
|
|
6919
|
+
seek: z27.number(),
|
|
6920
|
+
start: z27.number(),
|
|
6921
|
+
end: z27.number(),
|
|
6922
|
+
text: z27.string(),
|
|
6923
|
+
tokens: z27.array(z27.number()),
|
|
6924
|
+
temperature: z27.number(),
|
|
6925
|
+
avg_logprob: z27.number(),
|
|
6926
|
+
compression_ratio: z27.number(),
|
|
6927
|
+
no_speech_prob: z27.number()
|
|
6828
6928
|
})
|
|
6829
6929
|
).nullish()
|
|
6830
6930
|
})
|
|
6831
6931
|
)
|
|
6832
6932
|
);
|
|
6833
6933
|
|
|
6834
|
-
// src/transcription/openai-transcription-options.ts
|
|
6934
|
+
// src/transcription/openai-transcription-model-options.ts
|
|
6835
6935
|
import {
|
|
6836
|
-
lazySchema as
|
|
6837
|
-
zodSchema as
|
|
6936
|
+
lazySchema as lazySchema26,
|
|
6937
|
+
zodSchema as zodSchema26
|
|
6838
6938
|
} from "@ai-sdk/provider-utils";
|
|
6839
|
-
import { z as
|
|
6840
|
-
var openAITranscriptionModelOptions =
|
|
6841
|
-
() =>
|
|
6842
|
-
|
|
6939
|
+
import { z as z28 } from "zod/v4";
|
|
6940
|
+
var openAITranscriptionModelOptions = lazySchema26(
|
|
6941
|
+
() => zodSchema26(
|
|
6942
|
+
z28.object({
|
|
6843
6943
|
/**
|
|
6844
6944
|
* Additional information to include in the transcription response.
|
|
6845
6945
|
*/
|
|
6846
|
-
include:
|
|
6946
|
+
include: z28.array(z28.string()).optional(),
|
|
6847
6947
|
/**
|
|
6848
6948
|
* The language of the input audio in ISO-639-1 format.
|
|
6849
6949
|
*/
|
|
6850
|
-
language:
|
|
6950
|
+
language: z28.string().optional(),
|
|
6851
6951
|
/**
|
|
6852
6952
|
* An optional text to guide the model's style or continue a previous audio segment.
|
|
6853
6953
|
*/
|
|
6854
|
-
prompt:
|
|
6954
|
+
prompt: z28.string().optional(),
|
|
6855
6955
|
/**
|
|
6856
6956
|
* The sampling temperature, between 0 and 1.
|
|
6857
6957
|
* @default 0
|
|
6858
6958
|
*/
|
|
6859
|
-
temperature:
|
|
6959
|
+
temperature: z28.number().min(0).max(1).default(0).optional(),
|
|
6860
6960
|
/**
|
|
6861
6961
|
* The timestamp granularities to populate for this transcription.
|
|
6862
6962
|
* @default ['segment']
|
|
6863
6963
|
*/
|
|
6864
|
-
timestampGranularities:
|
|
6964
|
+
timestampGranularities: z28.array(z28.enum(["word", "segment"])).default(["segment"]).optional()
|
|
6865
6965
|
})
|
|
6866
6966
|
)
|
|
6867
6967
|
);
|
|
@@ -6950,7 +7050,7 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
6950
7050
|
providerOptions
|
|
6951
7051
|
}) {
|
|
6952
7052
|
const warnings = [];
|
|
6953
|
-
const openAIOptions = await
|
|
7053
|
+
const openAIOptions = await parseProviderOptions9({
|
|
6954
7054
|
provider: "openai",
|
|
6955
7055
|
providerOptions,
|
|
6956
7056
|
schema: openAITranscriptionModelOptions
|
|
@@ -7051,28 +7151,28 @@ import {
|
|
|
7051
7151
|
} from "@ai-sdk/provider-utils";
|
|
7052
7152
|
|
|
7053
7153
|
// src/skills/openai-skills-api.ts
|
|
7054
|
-
import { lazySchema as
|
|
7055
|
-
import { z as
|
|
7056
|
-
var openaiSkillResponseSchema =
|
|
7057
|
-
() =>
|
|
7058
|
-
|
|
7059
|
-
id:
|
|
7060
|
-
name:
|
|
7061
|
-
description:
|
|
7062
|
-
default_version:
|
|
7063
|
-
latest_version:
|
|
7064
|
-
created_at:
|
|
7065
|
-
updated_at:
|
|
7154
|
+
import { lazySchema as lazySchema27, zodSchema as zodSchema27 } from "@ai-sdk/provider-utils";
|
|
7155
|
+
import { z as z29 } from "zod/v4";
|
|
7156
|
+
var openaiSkillResponseSchema = lazySchema27(
|
|
7157
|
+
() => zodSchema27(
|
|
7158
|
+
z29.object({
|
|
7159
|
+
id: z29.string(),
|
|
7160
|
+
name: z29.string().nullish(),
|
|
7161
|
+
description: z29.string().nullish(),
|
|
7162
|
+
default_version: z29.string().nullish(),
|
|
7163
|
+
latest_version: z29.string().nullish(),
|
|
7164
|
+
created_at: z29.number(),
|
|
7165
|
+
updated_at: z29.number().nullish()
|
|
7066
7166
|
})
|
|
7067
7167
|
)
|
|
7068
7168
|
);
|
|
7069
|
-
var openaiSkillVersionResponseSchema =
|
|
7070
|
-
() =>
|
|
7071
|
-
|
|
7072
|
-
id:
|
|
7073
|
-
version:
|
|
7074
|
-
name:
|
|
7075
|
-
description:
|
|
7169
|
+
var openaiSkillVersionResponseSchema = lazySchema27(
|
|
7170
|
+
() => zodSchema27(
|
|
7171
|
+
z29.object({
|
|
7172
|
+
id: z29.string(),
|
|
7173
|
+
version: z29.string().nullish(),
|
|
7174
|
+
name: z29.string().nullish(),
|
|
7175
|
+
description: z29.string().nullish()
|
|
7076
7176
|
})
|
|
7077
7177
|
)
|
|
7078
7178
|
);
|
|
@@ -7127,7 +7227,7 @@ var OpenAISkills = class {
|
|
|
7127
7227
|
};
|
|
7128
7228
|
|
|
7129
7229
|
// src/version.ts
|
|
7130
|
-
var VERSION = true ? "4.0.0-beta.
|
|
7230
|
+
var VERSION = true ? "4.0.0-beta.44" : "0.0.0-test";
|
|
7131
7231
|
|
|
7132
7232
|
// src/openai-provider.ts
|
|
7133
7233
|
function createOpenAI(options = {}) {
|