@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/internal/index.js
CHANGED
|
@@ -481,7 +481,7 @@ var openaiChatChunkSchema = lazySchema(
|
|
|
481
481
|
)
|
|
482
482
|
);
|
|
483
483
|
|
|
484
|
-
// src/chat/openai-chat-options.ts
|
|
484
|
+
// src/chat/openai-chat-language-model-options.ts
|
|
485
485
|
import {
|
|
486
486
|
lazySchema as lazySchema2,
|
|
487
487
|
zodSchema as zodSchema2
|
|
@@ -1302,7 +1302,7 @@ var openaiCompletionChunkSchema = lazySchema3(
|
|
|
1302
1302
|
)
|
|
1303
1303
|
);
|
|
1304
1304
|
|
|
1305
|
-
// src/completion/openai-completion-options.ts
|
|
1305
|
+
// src/completion/openai-completion-language-model-options.ts
|
|
1306
1306
|
import {
|
|
1307
1307
|
lazySchema as lazySchema4,
|
|
1308
1308
|
zodSchema as zodSchema4
|
|
@@ -1606,7 +1606,7 @@ import {
|
|
|
1606
1606
|
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE3
|
|
1607
1607
|
} from "@ai-sdk/provider-utils";
|
|
1608
1608
|
|
|
1609
|
-
// src/embedding/openai-embedding-options.ts
|
|
1609
|
+
// src/embedding/openai-embedding-model-options.ts
|
|
1610
1610
|
import {
|
|
1611
1611
|
lazySchema as lazySchema5,
|
|
1612
1612
|
zodSchema as zodSchema5
|
|
@@ -1722,6 +1722,7 @@ import {
|
|
|
1722
1722
|
convertToFormData,
|
|
1723
1723
|
createJsonResponseHandler as createJsonResponseHandler4,
|
|
1724
1724
|
downloadBlob,
|
|
1725
|
+
parseProviderOptions as parseProviderOptions4,
|
|
1725
1726
|
postFormDataToApi,
|
|
1726
1727
|
postJsonToApi as postJsonToApi4,
|
|
1727
1728
|
serializeModelOptions as serializeModelOptions4,
|
|
@@ -1759,7 +1760,12 @@ var openaiImageResponseSchema = lazySchema7(
|
|
|
1759
1760
|
)
|
|
1760
1761
|
);
|
|
1761
1762
|
|
|
1762
|
-
// src/image/openai-image-options.ts
|
|
1763
|
+
// src/image/openai-image-model-options.ts
|
|
1764
|
+
import {
|
|
1765
|
+
lazySchema as lazySchema8,
|
|
1766
|
+
zodSchema as zodSchema8
|
|
1767
|
+
} from "@ai-sdk/provider-utils";
|
|
1768
|
+
import { z as z9 } from "zod/v4";
|
|
1763
1769
|
var modelMaxImagesPerCall = {
|
|
1764
1770
|
"dall-e-3": 1,
|
|
1765
1771
|
"dall-e-2": 10,
|
|
@@ -1781,6 +1787,65 @@ function hasDefaultResponseFormat(modelId) {
|
|
|
1781
1787
|
(prefix) => modelId.startsWith(prefix)
|
|
1782
1788
|
);
|
|
1783
1789
|
}
|
|
1790
|
+
var baseImageModelOptionsObject = z9.object({
|
|
1791
|
+
/**
|
|
1792
|
+
* Quality of the generated image(s).
|
|
1793
|
+
*
|
|
1794
|
+
* Valid values: `standard`, `hd`, `low`, `medium`, `high`, `auto`.
|
|
1795
|
+
*/
|
|
1796
|
+
quality: z9.enum(["standard", "hd", "low", "medium", "high", "auto"]).optional(),
|
|
1797
|
+
/**
|
|
1798
|
+
* Background behavior for the generated image(s).
|
|
1799
|
+
*
|
|
1800
|
+
* If `transparent`, the output format must support transparency
|
|
1801
|
+
* (i.e. `png` or `webp`).
|
|
1802
|
+
*/
|
|
1803
|
+
background: z9.enum(["transparent", "opaque", "auto"]).optional(),
|
|
1804
|
+
/**
|
|
1805
|
+
* Format in which the generated image(s) are returned.
|
|
1806
|
+
*/
|
|
1807
|
+
outputFormat: z9.enum(["png", "jpeg", "webp"]).optional(),
|
|
1808
|
+
/**
|
|
1809
|
+
* Compression level (0-100) for the generated image(s). Applies to the
|
|
1810
|
+
* `jpeg` and `webp` output formats.
|
|
1811
|
+
*/
|
|
1812
|
+
outputCompression: z9.number().int().min(0).max(100).optional(),
|
|
1813
|
+
/**
|
|
1814
|
+
* A unique identifier representing your end-user, which can help OpenAI
|
|
1815
|
+
* to monitor and detect abuse.
|
|
1816
|
+
*/
|
|
1817
|
+
user: z9.string().optional()
|
|
1818
|
+
});
|
|
1819
|
+
var openaiImageModelOptions = lazySchema8(
|
|
1820
|
+
() => zodSchema8(baseImageModelOptionsObject)
|
|
1821
|
+
);
|
|
1822
|
+
var openaiImageModelGenerationOptions = lazySchema8(
|
|
1823
|
+
() => zodSchema8(
|
|
1824
|
+
baseImageModelOptionsObject.extend({
|
|
1825
|
+
/**
|
|
1826
|
+
* Style of the generated image. `vivid` produces hyper-real and
|
|
1827
|
+
* dramatic images; `natural` produces more subdued, less hyper-real
|
|
1828
|
+
* looking images.
|
|
1829
|
+
*/
|
|
1830
|
+
style: z9.enum(["vivid", "natural"]).optional(),
|
|
1831
|
+
/**
|
|
1832
|
+
* Content moderation level for the generated image(s). `low` applies
|
|
1833
|
+
* less restrictive filtering.
|
|
1834
|
+
*/
|
|
1835
|
+
moderation: z9.enum(["auto", "low"]).optional()
|
|
1836
|
+
})
|
|
1837
|
+
)
|
|
1838
|
+
);
|
|
1839
|
+
var openaiImageModelEditOptions = lazySchema8(
|
|
1840
|
+
() => zodSchema8(
|
|
1841
|
+
baseImageModelOptionsObject.extend({
|
|
1842
|
+
/**
|
|
1843
|
+
* Fidelity of the output image(s) to the input image(s).
|
|
1844
|
+
*/
|
|
1845
|
+
inputFidelity: z9.enum(["high", "low"]).optional()
|
|
1846
|
+
})
|
|
1847
|
+
)
|
|
1848
|
+
);
|
|
1784
1849
|
|
|
1785
1850
|
// src/image/openai-image-model.ts
|
|
1786
1851
|
var OpenAIImageModel = class _OpenAIImageModel {
|
|
@@ -1831,12 +1896,17 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
1831
1896
|
}
|
|
1832
1897
|
const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
|
|
1833
1898
|
if (files != null) {
|
|
1899
|
+
const openaiOptions2 = (_d = await parseProviderOptions4({
|
|
1900
|
+
provider: "openai",
|
|
1901
|
+
providerOptions,
|
|
1902
|
+
schema: openaiImageModelEditOptions
|
|
1903
|
+
})) != null ? _d : {};
|
|
1834
1904
|
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
|
|
1835
1905
|
url: this.config.url({
|
|
1836
1906
|
path: "/images/edits",
|
|
1837
1907
|
modelId: this.modelId
|
|
1838
1908
|
}),
|
|
1839
|
-
headers: combineHeaders4((
|
|
1909
|
+
headers: combineHeaders4((_f = (_e = this.config).headers) == null ? void 0 : _f.call(_e), headers),
|
|
1840
1910
|
formData: convertToFormData({
|
|
1841
1911
|
model: this.modelId,
|
|
1842
1912
|
prompt,
|
|
@@ -1857,7 +1927,12 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
1857
1927
|
mask: mask != null ? await fileToBlob(mask) : void 0,
|
|
1858
1928
|
n,
|
|
1859
1929
|
size,
|
|
1860
|
-
|
|
1930
|
+
quality: openaiOptions2.quality,
|
|
1931
|
+
background: openaiOptions2.background,
|
|
1932
|
+
output_format: openaiOptions2.outputFormat,
|
|
1933
|
+
output_compression: openaiOptions2.outputCompression,
|
|
1934
|
+
input_fidelity: openaiOptions2.inputFidelity,
|
|
1935
|
+
user: openaiOptions2.user
|
|
1861
1936
|
}),
|
|
1862
1937
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
1863
1938
|
successfulResponseHandler: createJsonResponseHandler4(
|
|
@@ -1901,18 +1976,29 @@ var OpenAIImageModel = class _OpenAIImageModel {
|
|
|
1901
1976
|
}
|
|
1902
1977
|
};
|
|
1903
1978
|
}
|
|
1979
|
+
const openaiOptions = (_j = await parseProviderOptions4({
|
|
1980
|
+
provider: "openai",
|
|
1981
|
+
providerOptions,
|
|
1982
|
+
schema: openaiImageModelGenerationOptions
|
|
1983
|
+
})) != null ? _j : {};
|
|
1904
1984
|
const { value: response, responseHeaders } = await postJsonToApi4({
|
|
1905
1985
|
url: this.config.url({
|
|
1906
1986
|
path: "/images/generations",
|
|
1907
1987
|
modelId: this.modelId
|
|
1908
1988
|
}),
|
|
1909
|
-
headers: combineHeaders4((
|
|
1989
|
+
headers: combineHeaders4((_l = (_k = this.config).headers) == null ? void 0 : _l.call(_k), headers),
|
|
1910
1990
|
body: {
|
|
1911
1991
|
model: this.modelId,
|
|
1912
1992
|
prompt,
|
|
1913
1993
|
n,
|
|
1914
1994
|
size,
|
|
1915
|
-
|
|
1995
|
+
quality: openaiOptions.quality,
|
|
1996
|
+
style: openaiOptions.style,
|
|
1997
|
+
background: openaiOptions.background,
|
|
1998
|
+
moderation: openaiOptions.moderation,
|
|
1999
|
+
output_format: openaiOptions.outputFormat,
|
|
2000
|
+
output_compression: openaiOptions.outputCompression,
|
|
2001
|
+
user: openaiOptions.user,
|
|
1916
2002
|
...!hasDefaultResponseFormat(this.modelId) ? { response_format: "b64_json" } : {}
|
|
1917
2003
|
},
|
|
1918
2004
|
failedResponseHandler: openaiFailedResponseHandler,
|
|
@@ -1990,7 +2076,7 @@ import {
|
|
|
1990
2076
|
convertBase64ToUint8Array as convertBase64ToUint8Array2,
|
|
1991
2077
|
createJsonResponseHandler as createJsonResponseHandler5,
|
|
1992
2078
|
mediaTypeToExtension,
|
|
1993
|
-
parseProviderOptions as
|
|
2079
|
+
parseProviderOptions as parseProviderOptions5,
|
|
1994
2080
|
postFormDataToApi as postFormDataToApi2,
|
|
1995
2081
|
serializeModelOptions as serializeModelOptions5,
|
|
1996
2082
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE5,
|
|
@@ -1998,70 +2084,70 @@ import {
|
|
|
1998
2084
|
} from "@ai-sdk/provider-utils";
|
|
1999
2085
|
|
|
2000
2086
|
// src/transcription/openai-transcription-api.ts
|
|
2001
|
-
import { lazySchema as
|
|
2002
|
-
import { z as
|
|
2003
|
-
var openaiTranscriptionResponseSchema =
|
|
2004
|
-
() =>
|
|
2005
|
-
|
|
2006
|
-
text:
|
|
2007
|
-
language:
|
|
2008
|
-
duration:
|
|
2009
|
-
words:
|
|
2010
|
-
|
|
2011
|
-
word:
|
|
2012
|
-
start:
|
|
2013
|
-
end:
|
|
2087
|
+
import { lazySchema as lazySchema9, zodSchema as zodSchema9 } from "@ai-sdk/provider-utils";
|
|
2088
|
+
import { z as z10 } from "zod/v4";
|
|
2089
|
+
var openaiTranscriptionResponseSchema = lazySchema9(
|
|
2090
|
+
() => zodSchema9(
|
|
2091
|
+
z10.object({
|
|
2092
|
+
text: z10.string(),
|
|
2093
|
+
language: z10.string().nullish(),
|
|
2094
|
+
duration: z10.number().nullish(),
|
|
2095
|
+
words: z10.array(
|
|
2096
|
+
z10.object({
|
|
2097
|
+
word: z10.string(),
|
|
2098
|
+
start: z10.number(),
|
|
2099
|
+
end: z10.number()
|
|
2014
2100
|
})
|
|
2015
2101
|
).nullish(),
|
|
2016
|
-
segments:
|
|
2017
|
-
|
|
2018
|
-
id:
|
|
2019
|
-
seek:
|
|
2020
|
-
start:
|
|
2021
|
-
end:
|
|
2022
|
-
text:
|
|
2023
|
-
tokens:
|
|
2024
|
-
temperature:
|
|
2025
|
-
avg_logprob:
|
|
2026
|
-
compression_ratio:
|
|
2027
|
-
no_speech_prob:
|
|
2102
|
+
segments: z10.array(
|
|
2103
|
+
z10.object({
|
|
2104
|
+
id: z10.number(),
|
|
2105
|
+
seek: z10.number(),
|
|
2106
|
+
start: z10.number(),
|
|
2107
|
+
end: z10.number(),
|
|
2108
|
+
text: z10.string(),
|
|
2109
|
+
tokens: z10.array(z10.number()),
|
|
2110
|
+
temperature: z10.number(),
|
|
2111
|
+
avg_logprob: z10.number(),
|
|
2112
|
+
compression_ratio: z10.number(),
|
|
2113
|
+
no_speech_prob: z10.number()
|
|
2028
2114
|
})
|
|
2029
2115
|
).nullish()
|
|
2030
2116
|
})
|
|
2031
2117
|
)
|
|
2032
2118
|
);
|
|
2033
2119
|
|
|
2034
|
-
// src/transcription/openai-transcription-options.ts
|
|
2120
|
+
// src/transcription/openai-transcription-model-options.ts
|
|
2035
2121
|
import {
|
|
2036
|
-
lazySchema as
|
|
2037
|
-
zodSchema as
|
|
2122
|
+
lazySchema as lazySchema10,
|
|
2123
|
+
zodSchema as zodSchema10
|
|
2038
2124
|
} from "@ai-sdk/provider-utils";
|
|
2039
|
-
import { z as
|
|
2040
|
-
var openAITranscriptionModelOptions =
|
|
2041
|
-
() =>
|
|
2042
|
-
|
|
2125
|
+
import { z as z11 } from "zod/v4";
|
|
2126
|
+
var openAITranscriptionModelOptions = lazySchema10(
|
|
2127
|
+
() => zodSchema10(
|
|
2128
|
+
z11.object({
|
|
2043
2129
|
/**
|
|
2044
2130
|
* Additional information to include in the transcription response.
|
|
2045
2131
|
*/
|
|
2046
|
-
include:
|
|
2132
|
+
include: z11.array(z11.string()).optional(),
|
|
2047
2133
|
/**
|
|
2048
2134
|
* The language of the input audio in ISO-639-1 format.
|
|
2049
2135
|
*/
|
|
2050
|
-
language:
|
|
2136
|
+
language: z11.string().optional(),
|
|
2051
2137
|
/**
|
|
2052
2138
|
* An optional text to guide the model's style or continue a previous audio segment.
|
|
2053
2139
|
*/
|
|
2054
|
-
prompt:
|
|
2140
|
+
prompt: z11.string().optional(),
|
|
2055
2141
|
/**
|
|
2056
2142
|
* The sampling temperature, between 0 and 1.
|
|
2057
2143
|
* @default 0
|
|
2058
2144
|
*/
|
|
2059
|
-
temperature:
|
|
2145
|
+
temperature: z11.number().min(0).max(1).default(0).optional(),
|
|
2060
2146
|
/**
|
|
2061
2147
|
* The timestamp granularities to populate for this transcription.
|
|
2062
2148
|
* @default ['segment']
|
|
2063
2149
|
*/
|
|
2064
|
-
timestampGranularities:
|
|
2150
|
+
timestampGranularities: z11.array(z11.enum(["word", "segment"])).default(["segment"]).optional()
|
|
2065
2151
|
})
|
|
2066
2152
|
)
|
|
2067
2153
|
);
|
|
@@ -2150,7 +2236,7 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
2150
2236
|
providerOptions
|
|
2151
2237
|
}) {
|
|
2152
2238
|
const warnings = [];
|
|
2153
|
-
const openAIOptions = await
|
|
2239
|
+
const openAIOptions = await parseProviderOptions5({
|
|
2154
2240
|
provider: "openai",
|
|
2155
2241
|
providerOptions,
|
|
2156
2242
|
schema: openAITranscriptionModelOptions
|
|
@@ -2246,24 +2332,24 @@ var OpenAITranscriptionModel = class _OpenAITranscriptionModel {
|
|
|
2246
2332
|
import {
|
|
2247
2333
|
combineHeaders as combineHeaders6,
|
|
2248
2334
|
createBinaryResponseHandler,
|
|
2249
|
-
parseProviderOptions as
|
|
2335
|
+
parseProviderOptions as parseProviderOptions6,
|
|
2250
2336
|
postJsonToApi as postJsonToApi5,
|
|
2251
2337
|
serializeModelOptions as serializeModelOptions6,
|
|
2252
2338
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE6,
|
|
2253
2339
|
WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE6
|
|
2254
2340
|
} from "@ai-sdk/provider-utils";
|
|
2255
2341
|
|
|
2256
|
-
// src/speech/openai-speech-options.ts
|
|
2342
|
+
// src/speech/openai-speech-model-options.ts
|
|
2257
2343
|
import {
|
|
2258
|
-
lazySchema as
|
|
2259
|
-
zodSchema as
|
|
2344
|
+
lazySchema as lazySchema11,
|
|
2345
|
+
zodSchema as zodSchema11
|
|
2260
2346
|
} from "@ai-sdk/provider-utils";
|
|
2261
|
-
import { z as
|
|
2262
|
-
var openaiSpeechModelOptionsSchema =
|
|
2263
|
-
() =>
|
|
2264
|
-
|
|
2265
|
-
instructions:
|
|
2266
|
-
speed:
|
|
2347
|
+
import { z as z12 } from "zod/v4";
|
|
2348
|
+
var openaiSpeechModelOptionsSchema = lazySchema11(
|
|
2349
|
+
() => zodSchema11(
|
|
2350
|
+
z12.object({
|
|
2351
|
+
instructions: z12.string().nullish(),
|
|
2352
|
+
speed: z12.number().min(0.25).max(4).default(1).nullish()
|
|
2267
2353
|
})
|
|
2268
2354
|
)
|
|
2269
2355
|
);
|
|
@@ -2297,7 +2383,7 @@ var OpenAISpeechModel = class _OpenAISpeechModel {
|
|
|
2297
2383
|
providerOptions
|
|
2298
2384
|
}) {
|
|
2299
2385
|
const warnings = [];
|
|
2300
|
-
const openAIOptions = await
|
|
2386
|
+
const openAIOptions = await parseProviderOptions6({
|
|
2301
2387
|
provider: "openai",
|
|
2302
2388
|
providerOptions,
|
|
2303
2389
|
schema: openaiSpeechModelOptionsSchema
|
|
@@ -2389,7 +2475,7 @@ import {
|
|
|
2389
2475
|
createToolNameMapping,
|
|
2390
2476
|
generateId as generateId2,
|
|
2391
2477
|
isCustomReasoning as isCustomReasoning2,
|
|
2392
|
-
parseProviderOptions as
|
|
2478
|
+
parseProviderOptions as parseProviderOptions8,
|
|
2393
2479
|
postJsonToApi as postJsonToApi6,
|
|
2394
2480
|
serializeModelOptions as serializeModelOptions7,
|
|
2395
2481
|
WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE7,
|
|
@@ -2444,52 +2530,52 @@ import {
|
|
|
2444
2530
|
getTopLevelMediaType as getTopLevelMediaType2,
|
|
2445
2531
|
isNonNullable,
|
|
2446
2532
|
parseJSON,
|
|
2447
|
-
parseProviderOptions as
|
|
2533
|
+
parseProviderOptions as parseProviderOptions7,
|
|
2448
2534
|
resolveFullMediaType as resolveFullMediaType2,
|
|
2449
2535
|
resolveProviderReference as resolveProviderReference2,
|
|
2450
2536
|
validateTypes
|
|
2451
2537
|
} from "@ai-sdk/provider-utils";
|
|
2452
|
-
import { z as
|
|
2538
|
+
import { z as z17 } from "zod/v4";
|
|
2453
2539
|
|
|
2454
2540
|
// src/tool/apply-patch.ts
|
|
2455
2541
|
import {
|
|
2456
2542
|
createProviderDefinedToolFactoryWithOutputSchema,
|
|
2457
|
-
lazySchema as
|
|
2458
|
-
zodSchema as
|
|
2543
|
+
lazySchema as lazySchema12,
|
|
2544
|
+
zodSchema as zodSchema12
|
|
2459
2545
|
} from "@ai-sdk/provider-utils";
|
|
2460
|
-
import { z as
|
|
2461
|
-
var applyPatchInputSchema =
|
|
2462
|
-
() =>
|
|
2463
|
-
|
|
2464
|
-
callId:
|
|
2465
|
-
operation:
|
|
2466
|
-
|
|
2467
|
-
type:
|
|
2468
|
-
path:
|
|
2469
|
-
diff:
|
|
2546
|
+
import { z as z13 } from "zod/v4";
|
|
2547
|
+
var applyPatchInputSchema = lazySchema12(
|
|
2548
|
+
() => zodSchema12(
|
|
2549
|
+
z13.object({
|
|
2550
|
+
callId: z13.string(),
|
|
2551
|
+
operation: z13.discriminatedUnion("type", [
|
|
2552
|
+
z13.object({
|
|
2553
|
+
type: z13.literal("create_file"),
|
|
2554
|
+
path: z13.string(),
|
|
2555
|
+
diff: z13.string()
|
|
2470
2556
|
}),
|
|
2471
|
-
|
|
2472
|
-
type:
|
|
2473
|
-
path:
|
|
2557
|
+
z13.object({
|
|
2558
|
+
type: z13.literal("delete_file"),
|
|
2559
|
+
path: z13.string()
|
|
2474
2560
|
}),
|
|
2475
|
-
|
|
2476
|
-
type:
|
|
2477
|
-
path:
|
|
2478
|
-
diff:
|
|
2561
|
+
z13.object({
|
|
2562
|
+
type: z13.literal("update_file"),
|
|
2563
|
+
path: z13.string(),
|
|
2564
|
+
diff: z13.string()
|
|
2479
2565
|
})
|
|
2480
2566
|
])
|
|
2481
2567
|
})
|
|
2482
2568
|
)
|
|
2483
2569
|
);
|
|
2484
|
-
var applyPatchOutputSchema =
|
|
2485
|
-
() =>
|
|
2486
|
-
|
|
2487
|
-
status:
|
|
2488
|
-
output:
|
|
2570
|
+
var applyPatchOutputSchema = lazySchema12(
|
|
2571
|
+
() => zodSchema12(
|
|
2572
|
+
z13.object({
|
|
2573
|
+
status: z13.enum(["completed", "failed"]),
|
|
2574
|
+
output: z13.string().optional()
|
|
2489
2575
|
})
|
|
2490
2576
|
)
|
|
2491
2577
|
);
|
|
2492
|
-
var applyPatchArgsSchema =
|
|
2578
|
+
var applyPatchArgsSchema = lazySchema12(() => zodSchema12(z13.object({})));
|
|
2493
2579
|
var applyPatchToolFactory = createProviderDefinedToolFactoryWithOutputSchema({
|
|
2494
2580
|
id: "openai.apply_patch",
|
|
2495
2581
|
inputSchema: applyPatchInputSchema,
|
|
@@ -2500,26 +2586,26 @@ var applyPatch = applyPatchToolFactory;
|
|
|
2500
2586
|
// src/tool/local-shell.ts
|
|
2501
2587
|
import {
|
|
2502
2588
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema2,
|
|
2503
|
-
lazySchema as
|
|
2504
|
-
zodSchema as
|
|
2589
|
+
lazySchema as lazySchema13,
|
|
2590
|
+
zodSchema as zodSchema13
|
|
2505
2591
|
} from "@ai-sdk/provider-utils";
|
|
2506
|
-
import { z as
|
|
2507
|
-
var localShellInputSchema =
|
|
2508
|
-
() =>
|
|
2509
|
-
|
|
2510
|
-
action:
|
|
2511
|
-
type:
|
|
2512
|
-
command:
|
|
2513
|
-
timeoutMs:
|
|
2514
|
-
user:
|
|
2515
|
-
workingDirectory:
|
|
2516
|
-
env:
|
|
2592
|
+
import { z as z14 } from "zod/v4";
|
|
2593
|
+
var localShellInputSchema = lazySchema13(
|
|
2594
|
+
() => zodSchema13(
|
|
2595
|
+
z14.object({
|
|
2596
|
+
action: z14.object({
|
|
2597
|
+
type: z14.literal("exec"),
|
|
2598
|
+
command: z14.array(z14.string()),
|
|
2599
|
+
timeoutMs: z14.number().optional(),
|
|
2600
|
+
user: z14.string().optional(),
|
|
2601
|
+
workingDirectory: z14.string().optional(),
|
|
2602
|
+
env: z14.record(z14.string(), z14.string()).optional()
|
|
2517
2603
|
})
|
|
2518
2604
|
})
|
|
2519
2605
|
)
|
|
2520
2606
|
);
|
|
2521
|
-
var localShellOutputSchema =
|
|
2522
|
-
() =>
|
|
2607
|
+
var localShellOutputSchema = lazySchema13(
|
|
2608
|
+
() => zodSchema13(z14.object({ output: z14.string() }))
|
|
2523
2609
|
);
|
|
2524
2610
|
var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
|
|
2525
2611
|
id: "openai.local_shell",
|
|
@@ -2530,91 +2616,91 @@ var localShell = createProviderDefinedToolFactoryWithOutputSchema2({
|
|
|
2530
2616
|
// src/tool/shell.ts
|
|
2531
2617
|
import {
|
|
2532
2618
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema3,
|
|
2533
|
-
lazySchema as
|
|
2534
|
-
zodSchema as
|
|
2619
|
+
lazySchema as lazySchema14,
|
|
2620
|
+
zodSchema as zodSchema14
|
|
2535
2621
|
} from "@ai-sdk/provider-utils";
|
|
2536
|
-
import { z as
|
|
2537
|
-
var shellInputSchema =
|
|
2538
|
-
() =>
|
|
2539
|
-
|
|
2540
|
-
action:
|
|
2541
|
-
commands:
|
|
2542
|
-
timeoutMs:
|
|
2543
|
-
maxOutputLength:
|
|
2622
|
+
import { z as z15 } from "zod/v4";
|
|
2623
|
+
var shellInputSchema = lazySchema14(
|
|
2624
|
+
() => zodSchema14(
|
|
2625
|
+
z15.object({
|
|
2626
|
+
action: z15.object({
|
|
2627
|
+
commands: z15.array(z15.string()),
|
|
2628
|
+
timeoutMs: z15.number().optional(),
|
|
2629
|
+
maxOutputLength: z15.number().optional()
|
|
2544
2630
|
})
|
|
2545
2631
|
})
|
|
2546
2632
|
)
|
|
2547
2633
|
);
|
|
2548
|
-
var shellOutputSchema =
|
|
2549
|
-
() =>
|
|
2550
|
-
|
|
2551
|
-
output:
|
|
2552
|
-
|
|
2553
|
-
stdout:
|
|
2554
|
-
stderr:
|
|
2555
|
-
outcome:
|
|
2556
|
-
|
|
2557
|
-
|
|
2634
|
+
var shellOutputSchema = lazySchema14(
|
|
2635
|
+
() => zodSchema14(
|
|
2636
|
+
z15.object({
|
|
2637
|
+
output: z15.array(
|
|
2638
|
+
z15.object({
|
|
2639
|
+
stdout: z15.string(),
|
|
2640
|
+
stderr: z15.string(),
|
|
2641
|
+
outcome: z15.discriminatedUnion("type", [
|
|
2642
|
+
z15.object({ type: z15.literal("timeout") }),
|
|
2643
|
+
z15.object({ type: z15.literal("exit"), exitCode: z15.number() })
|
|
2558
2644
|
])
|
|
2559
2645
|
})
|
|
2560
2646
|
)
|
|
2561
2647
|
})
|
|
2562
2648
|
)
|
|
2563
2649
|
);
|
|
2564
|
-
var shellSkillsSchema =
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
type:
|
|
2568
|
-
providerReference:
|
|
2569
|
-
version:
|
|
2650
|
+
var shellSkillsSchema = z15.array(
|
|
2651
|
+
z15.discriminatedUnion("type", [
|
|
2652
|
+
z15.object({
|
|
2653
|
+
type: z15.literal("skillReference"),
|
|
2654
|
+
providerReference: z15.record(z15.string(), z15.string()),
|
|
2655
|
+
version: z15.string().optional()
|
|
2570
2656
|
}),
|
|
2571
|
-
|
|
2572
|
-
type:
|
|
2573
|
-
name:
|
|
2574
|
-
description:
|
|
2575
|
-
source:
|
|
2576
|
-
type:
|
|
2577
|
-
mediaType:
|
|
2578
|
-
data:
|
|
2657
|
+
z15.object({
|
|
2658
|
+
type: z15.literal("inline"),
|
|
2659
|
+
name: z15.string(),
|
|
2660
|
+
description: z15.string(),
|
|
2661
|
+
source: z15.object({
|
|
2662
|
+
type: z15.literal("base64"),
|
|
2663
|
+
mediaType: z15.literal("application/zip"),
|
|
2664
|
+
data: z15.string()
|
|
2579
2665
|
})
|
|
2580
2666
|
})
|
|
2581
2667
|
])
|
|
2582
2668
|
).optional();
|
|
2583
|
-
var shellArgsSchema =
|
|
2584
|
-
() =>
|
|
2585
|
-
|
|
2586
|
-
environment:
|
|
2587
|
-
|
|
2588
|
-
type:
|
|
2589
|
-
fileIds:
|
|
2590
|
-
memoryLimit:
|
|
2591
|
-
networkPolicy:
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
type:
|
|
2595
|
-
allowedDomains:
|
|
2596
|
-
domainSecrets:
|
|
2597
|
-
|
|
2598
|
-
domain:
|
|
2599
|
-
name:
|
|
2600
|
-
value:
|
|
2669
|
+
var shellArgsSchema = lazySchema14(
|
|
2670
|
+
() => zodSchema14(
|
|
2671
|
+
z15.object({
|
|
2672
|
+
environment: z15.union([
|
|
2673
|
+
z15.object({
|
|
2674
|
+
type: z15.literal("containerAuto"),
|
|
2675
|
+
fileIds: z15.array(z15.string()).optional(),
|
|
2676
|
+
memoryLimit: z15.enum(["1g", "4g", "16g", "64g"]).optional(),
|
|
2677
|
+
networkPolicy: z15.discriminatedUnion("type", [
|
|
2678
|
+
z15.object({ type: z15.literal("disabled") }),
|
|
2679
|
+
z15.object({
|
|
2680
|
+
type: z15.literal("allowlist"),
|
|
2681
|
+
allowedDomains: z15.array(z15.string()),
|
|
2682
|
+
domainSecrets: z15.array(
|
|
2683
|
+
z15.object({
|
|
2684
|
+
domain: z15.string(),
|
|
2685
|
+
name: z15.string(),
|
|
2686
|
+
value: z15.string()
|
|
2601
2687
|
})
|
|
2602
2688
|
).optional()
|
|
2603
2689
|
})
|
|
2604
2690
|
]).optional(),
|
|
2605
2691
|
skills: shellSkillsSchema
|
|
2606
2692
|
}),
|
|
2607
|
-
|
|
2608
|
-
type:
|
|
2609
|
-
containerId:
|
|
2693
|
+
z15.object({
|
|
2694
|
+
type: z15.literal("containerReference"),
|
|
2695
|
+
containerId: z15.string()
|
|
2610
2696
|
}),
|
|
2611
|
-
|
|
2612
|
-
type:
|
|
2613
|
-
skills:
|
|
2614
|
-
|
|
2615
|
-
name:
|
|
2616
|
-
description:
|
|
2617
|
-
path:
|
|
2697
|
+
z15.object({
|
|
2698
|
+
type: z15.literal("local").optional(),
|
|
2699
|
+
skills: z15.array(
|
|
2700
|
+
z15.object({
|
|
2701
|
+
name: z15.string(),
|
|
2702
|
+
description: z15.string(),
|
|
2703
|
+
path: z15.string()
|
|
2618
2704
|
})
|
|
2619
2705
|
).optional()
|
|
2620
2706
|
})
|
|
@@ -2631,31 +2717,31 @@ var shell = createProviderDefinedToolFactoryWithOutputSchema3({
|
|
|
2631
2717
|
// src/tool/tool-search.ts
|
|
2632
2718
|
import {
|
|
2633
2719
|
createProviderDefinedToolFactoryWithOutputSchema as createProviderDefinedToolFactoryWithOutputSchema4,
|
|
2634
|
-
lazySchema as
|
|
2635
|
-
zodSchema as
|
|
2720
|
+
lazySchema as lazySchema15,
|
|
2721
|
+
zodSchema as zodSchema15
|
|
2636
2722
|
} from "@ai-sdk/provider-utils";
|
|
2637
|
-
import { z as
|
|
2638
|
-
var toolSearchArgsSchema =
|
|
2639
|
-
() =>
|
|
2640
|
-
|
|
2641
|
-
execution:
|
|
2642
|
-
description:
|
|
2643
|
-
parameters:
|
|
2723
|
+
import { z as z16 } from "zod/v4";
|
|
2724
|
+
var toolSearchArgsSchema = lazySchema15(
|
|
2725
|
+
() => zodSchema15(
|
|
2726
|
+
z16.object({
|
|
2727
|
+
execution: z16.enum(["server", "client"]).optional(),
|
|
2728
|
+
description: z16.string().optional(),
|
|
2729
|
+
parameters: z16.record(z16.string(), z16.unknown()).optional()
|
|
2644
2730
|
})
|
|
2645
2731
|
)
|
|
2646
2732
|
);
|
|
2647
|
-
var toolSearchInputSchema =
|
|
2648
|
-
() =>
|
|
2649
|
-
|
|
2650
|
-
arguments:
|
|
2651
|
-
call_id:
|
|
2733
|
+
var toolSearchInputSchema = lazySchema15(
|
|
2734
|
+
() => zodSchema15(
|
|
2735
|
+
z16.object({
|
|
2736
|
+
arguments: z16.unknown().optional(),
|
|
2737
|
+
call_id: z16.string().nullish()
|
|
2652
2738
|
})
|
|
2653
2739
|
)
|
|
2654
2740
|
);
|
|
2655
|
-
var toolSearchOutputSchema =
|
|
2656
|
-
() =>
|
|
2657
|
-
|
|
2658
|
-
tools:
|
|
2741
|
+
var toolSearchOutputSchema = lazySchema15(
|
|
2742
|
+
() => zodSchema15(
|
|
2743
|
+
z16.object({
|
|
2744
|
+
tools: z16.array(z16.record(z16.string(), z16.unknown()))
|
|
2659
2745
|
})
|
|
2660
2746
|
)
|
|
2661
2747
|
);
|
|
@@ -2990,7 +3076,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
2990
3076
|
break;
|
|
2991
3077
|
}
|
|
2992
3078
|
case "reasoning": {
|
|
2993
|
-
const providerOptions = await
|
|
3079
|
+
const providerOptions = await parseProviderOptions7({
|
|
2994
3080
|
provider: providerOptionsName,
|
|
2995
3081
|
providerOptions: part.providerOptions,
|
|
2996
3082
|
schema: openaiResponsesReasoningProviderOptionsSchema
|
|
@@ -3322,9 +3408,9 @@ async function convertToOpenAIResponsesInput({
|
|
|
3322
3408
|
}
|
|
3323
3409
|
return { input, warnings };
|
|
3324
3410
|
}
|
|
3325
|
-
var openaiResponsesReasoningProviderOptionsSchema =
|
|
3326
|
-
itemId:
|
|
3327
|
-
reasoningEncryptedContent:
|
|
3411
|
+
var openaiResponsesReasoningProviderOptionsSchema = z17.object({
|
|
3412
|
+
itemId: z17.string().nullish(),
|
|
3413
|
+
reasoningEncryptedContent: z17.string().nullish()
|
|
3328
3414
|
});
|
|
3329
3415
|
|
|
3330
3416
|
// src/responses/map-openai-responses-finish-reason.ts
|
|
@@ -3347,554 +3433,556 @@ function mapOpenAIResponseFinishReason({
|
|
|
3347
3433
|
|
|
3348
3434
|
// src/responses/openai-responses-api.ts
|
|
3349
3435
|
import {
|
|
3350
|
-
lazySchema as
|
|
3351
|
-
zodSchema as
|
|
3436
|
+
lazySchema as lazySchema16,
|
|
3437
|
+
zodSchema as zodSchema16
|
|
3352
3438
|
} from "@ai-sdk/provider-utils";
|
|
3353
|
-
import { z as
|
|
3354
|
-
var jsonValueSchema =
|
|
3355
|
-
() =>
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3439
|
+
import { z as z18 } from "zod/v4";
|
|
3440
|
+
var jsonValueSchema = z18.lazy(
|
|
3441
|
+
() => z18.union([
|
|
3442
|
+
z18.string(),
|
|
3443
|
+
z18.number(),
|
|
3444
|
+
z18.boolean(),
|
|
3445
|
+
z18.null(),
|
|
3446
|
+
z18.array(jsonValueSchema),
|
|
3447
|
+
z18.record(z18.string(), jsonValueSchema.optional())
|
|
3362
3448
|
])
|
|
3363
3449
|
);
|
|
3364
|
-
var openaiResponsesChunkSchema =
|
|
3365
|
-
() =>
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
type:
|
|
3369
|
-
item_id:
|
|
3370
|
-
delta:
|
|
3371
|
-
logprobs:
|
|
3372
|
-
|
|
3373
|
-
token:
|
|
3374
|
-
logprob:
|
|
3375
|
-
top_logprobs:
|
|
3376
|
-
|
|
3377
|
-
token:
|
|
3378
|
-
logprob:
|
|
3450
|
+
var openaiResponsesChunkSchema = lazySchema16(
|
|
3451
|
+
() => zodSchema16(
|
|
3452
|
+
z18.union([
|
|
3453
|
+
z18.object({
|
|
3454
|
+
type: z18.literal("response.output_text.delta"),
|
|
3455
|
+
item_id: z18.string(),
|
|
3456
|
+
delta: z18.string(),
|
|
3457
|
+
logprobs: z18.array(
|
|
3458
|
+
z18.object({
|
|
3459
|
+
token: z18.string(),
|
|
3460
|
+
logprob: z18.number(),
|
|
3461
|
+
top_logprobs: z18.array(
|
|
3462
|
+
z18.object({
|
|
3463
|
+
token: z18.string(),
|
|
3464
|
+
logprob: z18.number()
|
|
3379
3465
|
})
|
|
3380
3466
|
)
|
|
3381
3467
|
})
|
|
3382
3468
|
).nullish()
|
|
3383
3469
|
}),
|
|
3384
|
-
|
|
3385
|
-
type:
|
|
3386
|
-
response:
|
|
3387
|
-
incomplete_details:
|
|
3388
|
-
usage:
|
|
3389
|
-
input_tokens:
|
|
3390
|
-
input_tokens_details:
|
|
3391
|
-
output_tokens:
|
|
3392
|
-
output_tokens_details:
|
|
3470
|
+
z18.object({
|
|
3471
|
+
type: z18.enum(["response.completed", "response.incomplete"]),
|
|
3472
|
+
response: z18.object({
|
|
3473
|
+
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
3474
|
+
usage: z18.object({
|
|
3475
|
+
input_tokens: z18.number(),
|
|
3476
|
+
input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
|
|
3477
|
+
output_tokens: z18.number(),
|
|
3478
|
+
output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
|
|
3393
3479
|
}),
|
|
3394
|
-
service_tier:
|
|
3480
|
+
service_tier: z18.string().nullish()
|
|
3395
3481
|
})
|
|
3396
3482
|
}),
|
|
3397
|
-
|
|
3398
|
-
type:
|
|
3399
|
-
response:
|
|
3400
|
-
error:
|
|
3401
|
-
code:
|
|
3402
|
-
message:
|
|
3483
|
+
z18.object({
|
|
3484
|
+
type: z18.literal("response.failed"),
|
|
3485
|
+
response: z18.object({
|
|
3486
|
+
error: z18.object({
|
|
3487
|
+
code: z18.string().nullish(),
|
|
3488
|
+
message: z18.string()
|
|
3403
3489
|
}).nullish(),
|
|
3404
|
-
incomplete_details:
|
|
3405
|
-
usage:
|
|
3406
|
-
input_tokens:
|
|
3407
|
-
input_tokens_details:
|
|
3408
|
-
output_tokens:
|
|
3409
|
-
output_tokens_details:
|
|
3490
|
+
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
3491
|
+
usage: z18.object({
|
|
3492
|
+
input_tokens: z18.number(),
|
|
3493
|
+
input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
|
|
3494
|
+
output_tokens: z18.number(),
|
|
3495
|
+
output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
|
|
3410
3496
|
}).nullish(),
|
|
3411
|
-
service_tier:
|
|
3497
|
+
service_tier: z18.string().nullish()
|
|
3412
3498
|
})
|
|
3413
3499
|
}),
|
|
3414
|
-
|
|
3415
|
-
type:
|
|
3416
|
-
response:
|
|
3417
|
-
id:
|
|
3418
|
-
created_at:
|
|
3419
|
-
model:
|
|
3420
|
-
service_tier:
|
|
3500
|
+
z18.object({
|
|
3501
|
+
type: z18.literal("response.created"),
|
|
3502
|
+
response: z18.object({
|
|
3503
|
+
id: z18.string(),
|
|
3504
|
+
created_at: z18.number(),
|
|
3505
|
+
model: z18.string(),
|
|
3506
|
+
service_tier: z18.string().nullish()
|
|
3421
3507
|
})
|
|
3422
3508
|
}),
|
|
3423
|
-
|
|
3424
|
-
type:
|
|
3425
|
-
output_index:
|
|
3426
|
-
item:
|
|
3427
|
-
|
|
3428
|
-
type:
|
|
3429
|
-
id:
|
|
3430
|
-
phase:
|
|
3509
|
+
z18.object({
|
|
3510
|
+
type: z18.literal("response.output_item.added"),
|
|
3511
|
+
output_index: z18.number(),
|
|
3512
|
+
item: z18.discriminatedUnion("type", [
|
|
3513
|
+
z18.object({
|
|
3514
|
+
type: z18.literal("message"),
|
|
3515
|
+
id: z18.string(),
|
|
3516
|
+
phase: z18.enum(["commentary", "final_answer"]).nullish()
|
|
3431
3517
|
}),
|
|
3432
|
-
|
|
3433
|
-
type:
|
|
3434
|
-
id:
|
|
3435
|
-
encrypted_content:
|
|
3518
|
+
z18.object({
|
|
3519
|
+
type: z18.literal("reasoning"),
|
|
3520
|
+
id: z18.string(),
|
|
3521
|
+
encrypted_content: z18.string().nullish()
|
|
3436
3522
|
}),
|
|
3437
|
-
|
|
3438
|
-
type:
|
|
3439
|
-
id:
|
|
3440
|
-
call_id:
|
|
3441
|
-
name:
|
|
3442
|
-
arguments:
|
|
3523
|
+
z18.object({
|
|
3524
|
+
type: z18.literal("function_call"),
|
|
3525
|
+
id: z18.string(),
|
|
3526
|
+
call_id: z18.string(),
|
|
3527
|
+
name: z18.string(),
|
|
3528
|
+
arguments: z18.string(),
|
|
3529
|
+
namespace: z18.string().nullish()
|
|
3443
3530
|
}),
|
|
3444
|
-
|
|
3445
|
-
type:
|
|
3446
|
-
id:
|
|
3447
|
-
status:
|
|
3531
|
+
z18.object({
|
|
3532
|
+
type: z18.literal("web_search_call"),
|
|
3533
|
+
id: z18.string(),
|
|
3534
|
+
status: z18.string()
|
|
3448
3535
|
}),
|
|
3449
|
-
|
|
3450
|
-
type:
|
|
3451
|
-
id:
|
|
3452
|
-
status:
|
|
3536
|
+
z18.object({
|
|
3537
|
+
type: z18.literal("computer_call"),
|
|
3538
|
+
id: z18.string(),
|
|
3539
|
+
status: z18.string()
|
|
3453
3540
|
}),
|
|
3454
|
-
|
|
3455
|
-
type:
|
|
3456
|
-
id:
|
|
3541
|
+
z18.object({
|
|
3542
|
+
type: z18.literal("file_search_call"),
|
|
3543
|
+
id: z18.string()
|
|
3457
3544
|
}),
|
|
3458
|
-
|
|
3459
|
-
type:
|
|
3460
|
-
id:
|
|
3545
|
+
z18.object({
|
|
3546
|
+
type: z18.literal("image_generation_call"),
|
|
3547
|
+
id: z18.string()
|
|
3461
3548
|
}),
|
|
3462
|
-
|
|
3463
|
-
type:
|
|
3464
|
-
id:
|
|
3465
|
-
container_id:
|
|
3466
|
-
code:
|
|
3467
|
-
outputs:
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3549
|
+
z18.object({
|
|
3550
|
+
type: z18.literal("code_interpreter_call"),
|
|
3551
|
+
id: z18.string(),
|
|
3552
|
+
container_id: z18.string(),
|
|
3553
|
+
code: z18.string().nullable(),
|
|
3554
|
+
outputs: z18.array(
|
|
3555
|
+
z18.discriminatedUnion("type", [
|
|
3556
|
+
z18.object({ type: z18.literal("logs"), logs: z18.string() }),
|
|
3557
|
+
z18.object({ type: z18.literal("image"), url: z18.string() })
|
|
3471
3558
|
])
|
|
3472
3559
|
).nullable(),
|
|
3473
|
-
status:
|
|
3560
|
+
status: z18.string()
|
|
3474
3561
|
}),
|
|
3475
|
-
|
|
3476
|
-
type:
|
|
3477
|
-
id:
|
|
3478
|
-
status:
|
|
3479
|
-
approval_request_id:
|
|
3562
|
+
z18.object({
|
|
3563
|
+
type: z18.literal("mcp_call"),
|
|
3564
|
+
id: z18.string(),
|
|
3565
|
+
status: z18.string(),
|
|
3566
|
+
approval_request_id: z18.string().nullish()
|
|
3480
3567
|
}),
|
|
3481
|
-
|
|
3482
|
-
type:
|
|
3483
|
-
id:
|
|
3568
|
+
z18.object({
|
|
3569
|
+
type: z18.literal("mcp_list_tools"),
|
|
3570
|
+
id: z18.string()
|
|
3484
3571
|
}),
|
|
3485
|
-
|
|
3486
|
-
type:
|
|
3487
|
-
id:
|
|
3572
|
+
z18.object({
|
|
3573
|
+
type: z18.literal("mcp_approval_request"),
|
|
3574
|
+
id: z18.string()
|
|
3488
3575
|
}),
|
|
3489
|
-
|
|
3490
|
-
type:
|
|
3491
|
-
id:
|
|
3492
|
-
call_id:
|
|
3493
|
-
status:
|
|
3494
|
-
operation:
|
|
3495
|
-
|
|
3496
|
-
type:
|
|
3497
|
-
path:
|
|
3498
|
-
diff:
|
|
3576
|
+
z18.object({
|
|
3577
|
+
type: z18.literal("apply_patch_call"),
|
|
3578
|
+
id: z18.string(),
|
|
3579
|
+
call_id: z18.string(),
|
|
3580
|
+
status: z18.enum(["in_progress", "completed"]),
|
|
3581
|
+
operation: z18.discriminatedUnion("type", [
|
|
3582
|
+
z18.object({
|
|
3583
|
+
type: z18.literal("create_file"),
|
|
3584
|
+
path: z18.string(),
|
|
3585
|
+
diff: z18.string()
|
|
3499
3586
|
}),
|
|
3500
|
-
|
|
3501
|
-
type:
|
|
3502
|
-
path:
|
|
3587
|
+
z18.object({
|
|
3588
|
+
type: z18.literal("delete_file"),
|
|
3589
|
+
path: z18.string()
|
|
3503
3590
|
}),
|
|
3504
|
-
|
|
3505
|
-
type:
|
|
3506
|
-
path:
|
|
3507
|
-
diff:
|
|
3591
|
+
z18.object({
|
|
3592
|
+
type: z18.literal("update_file"),
|
|
3593
|
+
path: z18.string(),
|
|
3594
|
+
diff: z18.string()
|
|
3508
3595
|
})
|
|
3509
3596
|
])
|
|
3510
3597
|
}),
|
|
3511
|
-
|
|
3512
|
-
type:
|
|
3513
|
-
id:
|
|
3514
|
-
call_id:
|
|
3515
|
-
name:
|
|
3516
|
-
input:
|
|
3598
|
+
z18.object({
|
|
3599
|
+
type: z18.literal("custom_tool_call"),
|
|
3600
|
+
id: z18.string(),
|
|
3601
|
+
call_id: z18.string(),
|
|
3602
|
+
name: z18.string(),
|
|
3603
|
+
input: z18.string()
|
|
3517
3604
|
}),
|
|
3518
|
-
|
|
3519
|
-
type:
|
|
3520
|
-
id:
|
|
3521
|
-
call_id:
|
|
3522
|
-
status:
|
|
3523
|
-
action:
|
|
3524
|
-
commands:
|
|
3605
|
+
z18.object({
|
|
3606
|
+
type: z18.literal("shell_call"),
|
|
3607
|
+
id: z18.string(),
|
|
3608
|
+
call_id: z18.string(),
|
|
3609
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3610
|
+
action: z18.object({
|
|
3611
|
+
commands: z18.array(z18.string())
|
|
3525
3612
|
})
|
|
3526
3613
|
}),
|
|
3527
|
-
|
|
3528
|
-
type:
|
|
3529
|
-
id:
|
|
3530
|
-
encrypted_content:
|
|
3614
|
+
z18.object({
|
|
3615
|
+
type: z18.literal("compaction"),
|
|
3616
|
+
id: z18.string(),
|
|
3617
|
+
encrypted_content: z18.string().nullish()
|
|
3531
3618
|
}),
|
|
3532
|
-
|
|
3533
|
-
type:
|
|
3534
|
-
id:
|
|
3535
|
-
call_id:
|
|
3536
|
-
status:
|
|
3537
|
-
output:
|
|
3538
|
-
|
|
3539
|
-
stdout:
|
|
3540
|
-
stderr:
|
|
3541
|
-
outcome:
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
type:
|
|
3545
|
-
exit_code:
|
|
3619
|
+
z18.object({
|
|
3620
|
+
type: z18.literal("shell_call_output"),
|
|
3621
|
+
id: z18.string(),
|
|
3622
|
+
call_id: z18.string(),
|
|
3623
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3624
|
+
output: z18.array(
|
|
3625
|
+
z18.object({
|
|
3626
|
+
stdout: z18.string(),
|
|
3627
|
+
stderr: z18.string(),
|
|
3628
|
+
outcome: z18.discriminatedUnion("type", [
|
|
3629
|
+
z18.object({ type: z18.literal("timeout") }),
|
|
3630
|
+
z18.object({
|
|
3631
|
+
type: z18.literal("exit"),
|
|
3632
|
+
exit_code: z18.number()
|
|
3546
3633
|
})
|
|
3547
3634
|
])
|
|
3548
3635
|
})
|
|
3549
3636
|
)
|
|
3550
3637
|
}),
|
|
3551
|
-
|
|
3552
|
-
type:
|
|
3553
|
-
id:
|
|
3554
|
-
execution:
|
|
3555
|
-
call_id:
|
|
3556
|
-
status:
|
|
3557
|
-
arguments:
|
|
3638
|
+
z18.object({
|
|
3639
|
+
type: z18.literal("tool_search_call"),
|
|
3640
|
+
id: z18.string(),
|
|
3641
|
+
execution: z18.enum(["server", "client"]),
|
|
3642
|
+
call_id: z18.string().nullable(),
|
|
3643
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3644
|
+
arguments: z18.unknown()
|
|
3558
3645
|
}),
|
|
3559
|
-
|
|
3560
|
-
type:
|
|
3561
|
-
id:
|
|
3562
|
-
execution:
|
|
3563
|
-
call_id:
|
|
3564
|
-
status:
|
|
3565
|
-
tools:
|
|
3646
|
+
z18.object({
|
|
3647
|
+
type: z18.literal("tool_search_output"),
|
|
3648
|
+
id: z18.string(),
|
|
3649
|
+
execution: z18.enum(["server", "client"]),
|
|
3650
|
+
call_id: z18.string().nullable(),
|
|
3651
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3652
|
+
tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
|
|
3566
3653
|
})
|
|
3567
3654
|
])
|
|
3568
3655
|
}),
|
|
3569
|
-
|
|
3570
|
-
type:
|
|
3571
|
-
output_index:
|
|
3572
|
-
item:
|
|
3573
|
-
|
|
3574
|
-
type:
|
|
3575
|
-
id:
|
|
3576
|
-
phase:
|
|
3656
|
+
z18.object({
|
|
3657
|
+
type: z18.literal("response.output_item.done"),
|
|
3658
|
+
output_index: z18.number(),
|
|
3659
|
+
item: z18.discriminatedUnion("type", [
|
|
3660
|
+
z18.object({
|
|
3661
|
+
type: z18.literal("message"),
|
|
3662
|
+
id: z18.string(),
|
|
3663
|
+
phase: z18.enum(["commentary", "final_answer"]).nullish()
|
|
3577
3664
|
}),
|
|
3578
|
-
|
|
3579
|
-
type:
|
|
3580
|
-
id:
|
|
3581
|
-
encrypted_content:
|
|
3665
|
+
z18.object({
|
|
3666
|
+
type: z18.literal("reasoning"),
|
|
3667
|
+
id: z18.string(),
|
|
3668
|
+
encrypted_content: z18.string().nullish()
|
|
3582
3669
|
}),
|
|
3583
|
-
|
|
3584
|
-
type:
|
|
3585
|
-
id:
|
|
3586
|
-
call_id:
|
|
3587
|
-
name:
|
|
3588
|
-
arguments:
|
|
3589
|
-
status:
|
|
3670
|
+
z18.object({
|
|
3671
|
+
type: z18.literal("function_call"),
|
|
3672
|
+
id: z18.string(),
|
|
3673
|
+
call_id: z18.string(),
|
|
3674
|
+
name: z18.string(),
|
|
3675
|
+
arguments: z18.string(),
|
|
3676
|
+
status: z18.literal("completed"),
|
|
3677
|
+
namespace: z18.string().nullish()
|
|
3590
3678
|
}),
|
|
3591
|
-
|
|
3592
|
-
type:
|
|
3593
|
-
id:
|
|
3594
|
-
call_id:
|
|
3595
|
-
name:
|
|
3596
|
-
input:
|
|
3597
|
-
status:
|
|
3679
|
+
z18.object({
|
|
3680
|
+
type: z18.literal("custom_tool_call"),
|
|
3681
|
+
id: z18.string(),
|
|
3682
|
+
call_id: z18.string(),
|
|
3683
|
+
name: z18.string(),
|
|
3684
|
+
input: z18.string(),
|
|
3685
|
+
status: z18.literal("completed")
|
|
3598
3686
|
}),
|
|
3599
|
-
|
|
3600
|
-
type:
|
|
3601
|
-
id:
|
|
3602
|
-
code:
|
|
3603
|
-
container_id:
|
|
3604
|
-
outputs:
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3687
|
+
z18.object({
|
|
3688
|
+
type: z18.literal("code_interpreter_call"),
|
|
3689
|
+
id: z18.string(),
|
|
3690
|
+
code: z18.string().nullable(),
|
|
3691
|
+
container_id: z18.string(),
|
|
3692
|
+
outputs: z18.array(
|
|
3693
|
+
z18.discriminatedUnion("type", [
|
|
3694
|
+
z18.object({ type: z18.literal("logs"), logs: z18.string() }),
|
|
3695
|
+
z18.object({ type: z18.literal("image"), url: z18.string() })
|
|
3608
3696
|
])
|
|
3609
3697
|
).nullable()
|
|
3610
3698
|
}),
|
|
3611
|
-
|
|
3612
|
-
type:
|
|
3613
|
-
id:
|
|
3614
|
-
result:
|
|
3699
|
+
z18.object({
|
|
3700
|
+
type: z18.literal("image_generation_call"),
|
|
3701
|
+
id: z18.string(),
|
|
3702
|
+
result: z18.string()
|
|
3615
3703
|
}),
|
|
3616
|
-
|
|
3617
|
-
type:
|
|
3618
|
-
id:
|
|
3619
|
-
status:
|
|
3620
|
-
action:
|
|
3621
|
-
|
|
3622
|
-
type:
|
|
3623
|
-
query:
|
|
3624
|
-
sources:
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3704
|
+
z18.object({
|
|
3705
|
+
type: z18.literal("web_search_call"),
|
|
3706
|
+
id: z18.string(),
|
|
3707
|
+
status: z18.string(),
|
|
3708
|
+
action: z18.discriminatedUnion("type", [
|
|
3709
|
+
z18.object({
|
|
3710
|
+
type: z18.literal("search"),
|
|
3711
|
+
query: z18.string().nullish(),
|
|
3712
|
+
sources: z18.array(
|
|
3713
|
+
z18.discriminatedUnion("type", [
|
|
3714
|
+
z18.object({ type: z18.literal("url"), url: z18.string() }),
|
|
3715
|
+
z18.object({ type: z18.literal("api"), name: z18.string() })
|
|
3628
3716
|
])
|
|
3629
3717
|
).nullish()
|
|
3630
3718
|
}),
|
|
3631
|
-
|
|
3632
|
-
type:
|
|
3633
|
-
url:
|
|
3719
|
+
z18.object({
|
|
3720
|
+
type: z18.literal("open_page"),
|
|
3721
|
+
url: z18.string().nullish()
|
|
3634
3722
|
}),
|
|
3635
|
-
|
|
3636
|
-
type:
|
|
3637
|
-
url:
|
|
3638
|
-
pattern:
|
|
3723
|
+
z18.object({
|
|
3724
|
+
type: z18.literal("find_in_page"),
|
|
3725
|
+
url: z18.string().nullish(),
|
|
3726
|
+
pattern: z18.string().nullish()
|
|
3639
3727
|
})
|
|
3640
3728
|
]).nullish()
|
|
3641
3729
|
}),
|
|
3642
|
-
|
|
3643
|
-
type:
|
|
3644
|
-
id:
|
|
3645
|
-
queries:
|
|
3646
|
-
results:
|
|
3647
|
-
|
|
3648
|
-
attributes:
|
|
3649
|
-
|
|
3650
|
-
|
|
3730
|
+
z18.object({
|
|
3731
|
+
type: z18.literal("file_search_call"),
|
|
3732
|
+
id: z18.string(),
|
|
3733
|
+
queries: z18.array(z18.string()),
|
|
3734
|
+
results: z18.array(
|
|
3735
|
+
z18.object({
|
|
3736
|
+
attributes: z18.record(
|
|
3737
|
+
z18.string(),
|
|
3738
|
+
z18.union([z18.string(), z18.number(), z18.boolean()])
|
|
3651
3739
|
),
|
|
3652
|
-
file_id:
|
|
3653
|
-
filename:
|
|
3654
|
-
score:
|
|
3655
|
-
text:
|
|
3740
|
+
file_id: z18.string(),
|
|
3741
|
+
filename: z18.string(),
|
|
3742
|
+
score: z18.number(),
|
|
3743
|
+
text: z18.string()
|
|
3656
3744
|
})
|
|
3657
3745
|
).nullish()
|
|
3658
3746
|
}),
|
|
3659
|
-
|
|
3660
|
-
type:
|
|
3661
|
-
id:
|
|
3662
|
-
call_id:
|
|
3663
|
-
action:
|
|
3664
|
-
type:
|
|
3665
|
-
command:
|
|
3666
|
-
timeout_ms:
|
|
3667
|
-
user:
|
|
3668
|
-
working_directory:
|
|
3669
|
-
env:
|
|
3747
|
+
z18.object({
|
|
3748
|
+
type: z18.literal("local_shell_call"),
|
|
3749
|
+
id: z18.string(),
|
|
3750
|
+
call_id: z18.string(),
|
|
3751
|
+
action: z18.object({
|
|
3752
|
+
type: z18.literal("exec"),
|
|
3753
|
+
command: z18.array(z18.string()),
|
|
3754
|
+
timeout_ms: z18.number().optional(),
|
|
3755
|
+
user: z18.string().optional(),
|
|
3756
|
+
working_directory: z18.string().optional(),
|
|
3757
|
+
env: z18.record(z18.string(), z18.string()).optional()
|
|
3670
3758
|
})
|
|
3671
3759
|
}),
|
|
3672
|
-
|
|
3673
|
-
type:
|
|
3674
|
-
id:
|
|
3675
|
-
status:
|
|
3760
|
+
z18.object({
|
|
3761
|
+
type: z18.literal("computer_call"),
|
|
3762
|
+
id: z18.string(),
|
|
3763
|
+
status: z18.literal("completed")
|
|
3676
3764
|
}),
|
|
3677
|
-
|
|
3678
|
-
type:
|
|
3679
|
-
id:
|
|
3680
|
-
status:
|
|
3681
|
-
arguments:
|
|
3682
|
-
name:
|
|
3683
|
-
server_label:
|
|
3684
|
-
output:
|
|
3685
|
-
error:
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
type:
|
|
3689
|
-
code:
|
|
3690
|
-
message:
|
|
3765
|
+
z18.object({
|
|
3766
|
+
type: z18.literal("mcp_call"),
|
|
3767
|
+
id: z18.string(),
|
|
3768
|
+
status: z18.string(),
|
|
3769
|
+
arguments: z18.string(),
|
|
3770
|
+
name: z18.string(),
|
|
3771
|
+
server_label: z18.string(),
|
|
3772
|
+
output: z18.string().nullish(),
|
|
3773
|
+
error: z18.union([
|
|
3774
|
+
z18.string(),
|
|
3775
|
+
z18.object({
|
|
3776
|
+
type: z18.string().optional(),
|
|
3777
|
+
code: z18.union([z18.number(), z18.string()]).optional(),
|
|
3778
|
+
message: z18.string().optional()
|
|
3691
3779
|
}).loose()
|
|
3692
3780
|
]).nullish(),
|
|
3693
|
-
approval_request_id:
|
|
3781
|
+
approval_request_id: z18.string().nullish()
|
|
3694
3782
|
}),
|
|
3695
|
-
|
|
3696
|
-
type:
|
|
3697
|
-
id:
|
|
3698
|
-
server_label:
|
|
3699
|
-
tools:
|
|
3700
|
-
|
|
3701
|
-
name:
|
|
3702
|
-
description:
|
|
3703
|
-
input_schema:
|
|
3704
|
-
annotations:
|
|
3783
|
+
z18.object({
|
|
3784
|
+
type: z18.literal("mcp_list_tools"),
|
|
3785
|
+
id: z18.string(),
|
|
3786
|
+
server_label: z18.string(),
|
|
3787
|
+
tools: z18.array(
|
|
3788
|
+
z18.object({
|
|
3789
|
+
name: z18.string(),
|
|
3790
|
+
description: z18.string().optional(),
|
|
3791
|
+
input_schema: z18.any(),
|
|
3792
|
+
annotations: z18.record(z18.string(), z18.unknown()).optional()
|
|
3705
3793
|
})
|
|
3706
3794
|
),
|
|
3707
|
-
error:
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
type:
|
|
3711
|
-
code:
|
|
3712
|
-
message:
|
|
3795
|
+
error: z18.union([
|
|
3796
|
+
z18.string(),
|
|
3797
|
+
z18.object({
|
|
3798
|
+
type: z18.string().optional(),
|
|
3799
|
+
code: z18.union([z18.number(), z18.string()]).optional(),
|
|
3800
|
+
message: z18.string().optional()
|
|
3713
3801
|
}).loose()
|
|
3714
3802
|
]).optional()
|
|
3715
3803
|
}),
|
|
3716
|
-
|
|
3717
|
-
type:
|
|
3718
|
-
id:
|
|
3719
|
-
server_label:
|
|
3720
|
-
name:
|
|
3721
|
-
arguments:
|
|
3722
|
-
approval_request_id:
|
|
3804
|
+
z18.object({
|
|
3805
|
+
type: z18.literal("mcp_approval_request"),
|
|
3806
|
+
id: z18.string(),
|
|
3807
|
+
server_label: z18.string(),
|
|
3808
|
+
name: z18.string(),
|
|
3809
|
+
arguments: z18.string(),
|
|
3810
|
+
approval_request_id: z18.string().optional()
|
|
3723
3811
|
}),
|
|
3724
|
-
|
|
3725
|
-
type:
|
|
3726
|
-
id:
|
|
3727
|
-
call_id:
|
|
3728
|
-
status:
|
|
3729
|
-
operation:
|
|
3730
|
-
|
|
3731
|
-
type:
|
|
3732
|
-
path:
|
|
3733
|
-
diff:
|
|
3812
|
+
z18.object({
|
|
3813
|
+
type: z18.literal("apply_patch_call"),
|
|
3814
|
+
id: z18.string(),
|
|
3815
|
+
call_id: z18.string(),
|
|
3816
|
+
status: z18.enum(["in_progress", "completed"]),
|
|
3817
|
+
operation: z18.discriminatedUnion("type", [
|
|
3818
|
+
z18.object({
|
|
3819
|
+
type: z18.literal("create_file"),
|
|
3820
|
+
path: z18.string(),
|
|
3821
|
+
diff: z18.string()
|
|
3734
3822
|
}),
|
|
3735
|
-
|
|
3736
|
-
type:
|
|
3737
|
-
path:
|
|
3823
|
+
z18.object({
|
|
3824
|
+
type: z18.literal("delete_file"),
|
|
3825
|
+
path: z18.string()
|
|
3738
3826
|
}),
|
|
3739
|
-
|
|
3740
|
-
type:
|
|
3741
|
-
path:
|
|
3742
|
-
diff:
|
|
3827
|
+
z18.object({
|
|
3828
|
+
type: z18.literal("update_file"),
|
|
3829
|
+
path: z18.string(),
|
|
3830
|
+
diff: z18.string()
|
|
3743
3831
|
})
|
|
3744
3832
|
])
|
|
3745
3833
|
}),
|
|
3746
|
-
|
|
3747
|
-
type:
|
|
3748
|
-
id:
|
|
3749
|
-
call_id:
|
|
3750
|
-
status:
|
|
3751
|
-
action:
|
|
3752
|
-
commands:
|
|
3834
|
+
z18.object({
|
|
3835
|
+
type: z18.literal("shell_call"),
|
|
3836
|
+
id: z18.string(),
|
|
3837
|
+
call_id: z18.string(),
|
|
3838
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3839
|
+
action: z18.object({
|
|
3840
|
+
commands: z18.array(z18.string())
|
|
3753
3841
|
})
|
|
3754
3842
|
}),
|
|
3755
|
-
|
|
3756
|
-
type:
|
|
3757
|
-
id:
|
|
3758
|
-
encrypted_content:
|
|
3843
|
+
z18.object({
|
|
3844
|
+
type: z18.literal("compaction"),
|
|
3845
|
+
id: z18.string(),
|
|
3846
|
+
encrypted_content: z18.string()
|
|
3759
3847
|
}),
|
|
3760
|
-
|
|
3761
|
-
type:
|
|
3762
|
-
id:
|
|
3763
|
-
call_id:
|
|
3764
|
-
status:
|
|
3765
|
-
output:
|
|
3766
|
-
|
|
3767
|
-
stdout:
|
|
3768
|
-
stderr:
|
|
3769
|
-
outcome:
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
type:
|
|
3773
|
-
exit_code:
|
|
3848
|
+
z18.object({
|
|
3849
|
+
type: z18.literal("shell_call_output"),
|
|
3850
|
+
id: z18.string(),
|
|
3851
|
+
call_id: z18.string(),
|
|
3852
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3853
|
+
output: z18.array(
|
|
3854
|
+
z18.object({
|
|
3855
|
+
stdout: z18.string(),
|
|
3856
|
+
stderr: z18.string(),
|
|
3857
|
+
outcome: z18.discriminatedUnion("type", [
|
|
3858
|
+
z18.object({ type: z18.literal("timeout") }),
|
|
3859
|
+
z18.object({
|
|
3860
|
+
type: z18.literal("exit"),
|
|
3861
|
+
exit_code: z18.number()
|
|
3774
3862
|
})
|
|
3775
3863
|
])
|
|
3776
3864
|
})
|
|
3777
3865
|
)
|
|
3778
3866
|
}),
|
|
3779
|
-
|
|
3780
|
-
type:
|
|
3781
|
-
id:
|
|
3782
|
-
execution:
|
|
3783
|
-
call_id:
|
|
3784
|
-
status:
|
|
3785
|
-
arguments:
|
|
3867
|
+
z18.object({
|
|
3868
|
+
type: z18.literal("tool_search_call"),
|
|
3869
|
+
id: z18.string(),
|
|
3870
|
+
execution: z18.enum(["server", "client"]),
|
|
3871
|
+
call_id: z18.string().nullable(),
|
|
3872
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3873
|
+
arguments: z18.unknown()
|
|
3786
3874
|
}),
|
|
3787
|
-
|
|
3788
|
-
type:
|
|
3789
|
-
id:
|
|
3790
|
-
execution:
|
|
3791
|
-
call_id:
|
|
3792
|
-
status:
|
|
3793
|
-
tools:
|
|
3875
|
+
z18.object({
|
|
3876
|
+
type: z18.literal("tool_search_output"),
|
|
3877
|
+
id: z18.string(),
|
|
3878
|
+
execution: z18.enum(["server", "client"]),
|
|
3879
|
+
call_id: z18.string().nullable(),
|
|
3880
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
3881
|
+
tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
|
|
3794
3882
|
})
|
|
3795
3883
|
])
|
|
3796
3884
|
}),
|
|
3797
|
-
|
|
3798
|
-
type:
|
|
3799
|
-
item_id:
|
|
3800
|
-
output_index:
|
|
3801
|
-
delta:
|
|
3885
|
+
z18.object({
|
|
3886
|
+
type: z18.literal("response.function_call_arguments.delta"),
|
|
3887
|
+
item_id: z18.string(),
|
|
3888
|
+
output_index: z18.number(),
|
|
3889
|
+
delta: z18.string()
|
|
3802
3890
|
}),
|
|
3803
|
-
|
|
3804
|
-
type:
|
|
3805
|
-
item_id:
|
|
3806
|
-
output_index:
|
|
3807
|
-
delta:
|
|
3891
|
+
z18.object({
|
|
3892
|
+
type: z18.literal("response.custom_tool_call_input.delta"),
|
|
3893
|
+
item_id: z18.string(),
|
|
3894
|
+
output_index: z18.number(),
|
|
3895
|
+
delta: z18.string()
|
|
3808
3896
|
}),
|
|
3809
|
-
|
|
3810
|
-
type:
|
|
3811
|
-
item_id:
|
|
3812
|
-
output_index:
|
|
3813
|
-
partial_image_b64:
|
|
3897
|
+
z18.object({
|
|
3898
|
+
type: z18.literal("response.image_generation_call.partial_image"),
|
|
3899
|
+
item_id: z18.string(),
|
|
3900
|
+
output_index: z18.number(),
|
|
3901
|
+
partial_image_b64: z18.string()
|
|
3814
3902
|
}),
|
|
3815
|
-
|
|
3816
|
-
type:
|
|
3817
|
-
item_id:
|
|
3818
|
-
output_index:
|
|
3819
|
-
delta:
|
|
3903
|
+
z18.object({
|
|
3904
|
+
type: z18.literal("response.code_interpreter_call_code.delta"),
|
|
3905
|
+
item_id: z18.string(),
|
|
3906
|
+
output_index: z18.number(),
|
|
3907
|
+
delta: z18.string()
|
|
3820
3908
|
}),
|
|
3821
|
-
|
|
3822
|
-
type:
|
|
3823
|
-
item_id:
|
|
3824
|
-
output_index:
|
|
3825
|
-
code:
|
|
3909
|
+
z18.object({
|
|
3910
|
+
type: z18.literal("response.code_interpreter_call_code.done"),
|
|
3911
|
+
item_id: z18.string(),
|
|
3912
|
+
output_index: z18.number(),
|
|
3913
|
+
code: z18.string()
|
|
3826
3914
|
}),
|
|
3827
|
-
|
|
3828
|
-
type:
|
|
3829
|
-
annotation:
|
|
3830
|
-
|
|
3831
|
-
type:
|
|
3832
|
-
start_index:
|
|
3833
|
-
end_index:
|
|
3834
|
-
url:
|
|
3835
|
-
title:
|
|
3915
|
+
z18.object({
|
|
3916
|
+
type: z18.literal("response.output_text.annotation.added"),
|
|
3917
|
+
annotation: z18.discriminatedUnion("type", [
|
|
3918
|
+
z18.object({
|
|
3919
|
+
type: z18.literal("url_citation"),
|
|
3920
|
+
start_index: z18.number(),
|
|
3921
|
+
end_index: z18.number(),
|
|
3922
|
+
url: z18.string(),
|
|
3923
|
+
title: z18.string()
|
|
3836
3924
|
}),
|
|
3837
|
-
|
|
3838
|
-
type:
|
|
3839
|
-
file_id:
|
|
3840
|
-
filename:
|
|
3841
|
-
index:
|
|
3925
|
+
z18.object({
|
|
3926
|
+
type: z18.literal("file_citation"),
|
|
3927
|
+
file_id: z18.string(),
|
|
3928
|
+
filename: z18.string(),
|
|
3929
|
+
index: z18.number()
|
|
3842
3930
|
}),
|
|
3843
|
-
|
|
3844
|
-
type:
|
|
3845
|
-
container_id:
|
|
3846
|
-
file_id:
|
|
3847
|
-
filename:
|
|
3848
|
-
start_index:
|
|
3849
|
-
end_index:
|
|
3931
|
+
z18.object({
|
|
3932
|
+
type: z18.literal("container_file_citation"),
|
|
3933
|
+
container_id: z18.string(),
|
|
3934
|
+
file_id: z18.string(),
|
|
3935
|
+
filename: z18.string(),
|
|
3936
|
+
start_index: z18.number(),
|
|
3937
|
+
end_index: z18.number()
|
|
3850
3938
|
}),
|
|
3851
|
-
|
|
3852
|
-
type:
|
|
3853
|
-
file_id:
|
|
3854
|
-
index:
|
|
3939
|
+
z18.object({
|
|
3940
|
+
type: z18.literal("file_path"),
|
|
3941
|
+
file_id: z18.string(),
|
|
3942
|
+
index: z18.number()
|
|
3855
3943
|
})
|
|
3856
3944
|
])
|
|
3857
3945
|
}),
|
|
3858
|
-
|
|
3859
|
-
type:
|
|
3860
|
-
item_id:
|
|
3861
|
-
summary_index:
|
|
3946
|
+
z18.object({
|
|
3947
|
+
type: z18.literal("response.reasoning_summary_part.added"),
|
|
3948
|
+
item_id: z18.string(),
|
|
3949
|
+
summary_index: z18.number()
|
|
3862
3950
|
}),
|
|
3863
|
-
|
|
3864
|
-
type:
|
|
3865
|
-
item_id:
|
|
3866
|
-
summary_index:
|
|
3867
|
-
delta:
|
|
3951
|
+
z18.object({
|
|
3952
|
+
type: z18.literal("response.reasoning_summary_text.delta"),
|
|
3953
|
+
item_id: z18.string(),
|
|
3954
|
+
summary_index: z18.number(),
|
|
3955
|
+
delta: z18.string()
|
|
3868
3956
|
}),
|
|
3869
|
-
|
|
3870
|
-
type:
|
|
3871
|
-
item_id:
|
|
3872
|
-
summary_index:
|
|
3957
|
+
z18.object({
|
|
3958
|
+
type: z18.literal("response.reasoning_summary_part.done"),
|
|
3959
|
+
item_id: z18.string(),
|
|
3960
|
+
summary_index: z18.number()
|
|
3873
3961
|
}),
|
|
3874
|
-
|
|
3875
|
-
type:
|
|
3876
|
-
item_id:
|
|
3877
|
-
output_index:
|
|
3878
|
-
delta:
|
|
3879
|
-
obfuscation:
|
|
3962
|
+
z18.object({
|
|
3963
|
+
type: z18.literal("response.apply_patch_call_operation_diff.delta"),
|
|
3964
|
+
item_id: z18.string(),
|
|
3965
|
+
output_index: z18.number(),
|
|
3966
|
+
delta: z18.string(),
|
|
3967
|
+
obfuscation: z18.string().nullish()
|
|
3880
3968
|
}),
|
|
3881
|
-
|
|
3882
|
-
type:
|
|
3883
|
-
item_id:
|
|
3884
|
-
output_index:
|
|
3885
|
-
diff:
|
|
3969
|
+
z18.object({
|
|
3970
|
+
type: z18.literal("response.apply_patch_call_operation_diff.done"),
|
|
3971
|
+
item_id: z18.string(),
|
|
3972
|
+
output_index: z18.number(),
|
|
3973
|
+
diff: z18.string()
|
|
3886
3974
|
}),
|
|
3887
|
-
|
|
3888
|
-
type:
|
|
3889
|
-
sequence_number:
|
|
3890
|
-
error:
|
|
3891
|
-
type:
|
|
3892
|
-
code:
|
|
3893
|
-
message:
|
|
3894
|
-
param:
|
|
3975
|
+
z18.object({
|
|
3976
|
+
type: z18.literal("error"),
|
|
3977
|
+
sequence_number: z18.number(),
|
|
3978
|
+
error: z18.object({
|
|
3979
|
+
type: z18.string(),
|
|
3980
|
+
code: z18.string(),
|
|
3981
|
+
message: z18.string(),
|
|
3982
|
+
param: z18.string().nullish()
|
|
3895
3983
|
})
|
|
3896
3984
|
}),
|
|
3897
|
-
|
|
3985
|
+
z18.object({ type: z18.string() }).loose().transform((value) => ({
|
|
3898
3986
|
type: "unknown_chunk",
|
|
3899
3987
|
message: value.type
|
|
3900
3988
|
}))
|
|
@@ -3902,318 +3990,319 @@ var openaiResponsesChunkSchema = lazySchema15(
|
|
|
3902
3990
|
])
|
|
3903
3991
|
)
|
|
3904
3992
|
);
|
|
3905
|
-
var openaiResponsesResponseSchema =
|
|
3906
|
-
() =>
|
|
3907
|
-
|
|
3908
|
-
id:
|
|
3909
|
-
created_at:
|
|
3910
|
-
error:
|
|
3911
|
-
message:
|
|
3912
|
-
type:
|
|
3913
|
-
param:
|
|
3914
|
-
code:
|
|
3993
|
+
var openaiResponsesResponseSchema = lazySchema16(
|
|
3994
|
+
() => zodSchema16(
|
|
3995
|
+
z18.object({
|
|
3996
|
+
id: z18.string().optional(),
|
|
3997
|
+
created_at: z18.number().optional(),
|
|
3998
|
+
error: z18.object({
|
|
3999
|
+
message: z18.string(),
|
|
4000
|
+
type: z18.string(),
|
|
4001
|
+
param: z18.string().nullish(),
|
|
4002
|
+
code: z18.string()
|
|
3915
4003
|
}).nullish(),
|
|
3916
|
-
model:
|
|
3917
|
-
output:
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
type:
|
|
3921
|
-
role:
|
|
3922
|
-
id:
|
|
3923
|
-
phase:
|
|
3924
|
-
content:
|
|
3925
|
-
|
|
3926
|
-
type:
|
|
3927
|
-
text:
|
|
3928
|
-
logprobs:
|
|
3929
|
-
|
|
3930
|
-
token:
|
|
3931
|
-
logprob:
|
|
3932
|
-
top_logprobs:
|
|
3933
|
-
|
|
3934
|
-
token:
|
|
3935
|
-
logprob:
|
|
4004
|
+
model: z18.string().optional(),
|
|
4005
|
+
output: z18.array(
|
|
4006
|
+
z18.discriminatedUnion("type", [
|
|
4007
|
+
z18.object({
|
|
4008
|
+
type: z18.literal("message"),
|
|
4009
|
+
role: z18.literal("assistant"),
|
|
4010
|
+
id: z18.string(),
|
|
4011
|
+
phase: z18.enum(["commentary", "final_answer"]).nullish(),
|
|
4012
|
+
content: z18.array(
|
|
4013
|
+
z18.object({
|
|
4014
|
+
type: z18.literal("output_text"),
|
|
4015
|
+
text: z18.string(),
|
|
4016
|
+
logprobs: z18.array(
|
|
4017
|
+
z18.object({
|
|
4018
|
+
token: z18.string(),
|
|
4019
|
+
logprob: z18.number(),
|
|
4020
|
+
top_logprobs: z18.array(
|
|
4021
|
+
z18.object({
|
|
4022
|
+
token: z18.string(),
|
|
4023
|
+
logprob: z18.number()
|
|
3936
4024
|
})
|
|
3937
4025
|
)
|
|
3938
4026
|
})
|
|
3939
4027
|
).nullish(),
|
|
3940
|
-
annotations:
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
type:
|
|
3944
|
-
start_index:
|
|
3945
|
-
end_index:
|
|
3946
|
-
url:
|
|
3947
|
-
title:
|
|
4028
|
+
annotations: z18.array(
|
|
4029
|
+
z18.discriminatedUnion("type", [
|
|
4030
|
+
z18.object({
|
|
4031
|
+
type: z18.literal("url_citation"),
|
|
4032
|
+
start_index: z18.number(),
|
|
4033
|
+
end_index: z18.number(),
|
|
4034
|
+
url: z18.string(),
|
|
4035
|
+
title: z18.string()
|
|
3948
4036
|
}),
|
|
3949
|
-
|
|
3950
|
-
type:
|
|
3951
|
-
file_id:
|
|
3952
|
-
filename:
|
|
3953
|
-
index:
|
|
4037
|
+
z18.object({
|
|
4038
|
+
type: z18.literal("file_citation"),
|
|
4039
|
+
file_id: z18.string(),
|
|
4040
|
+
filename: z18.string(),
|
|
4041
|
+
index: z18.number()
|
|
3954
4042
|
}),
|
|
3955
|
-
|
|
3956
|
-
type:
|
|
3957
|
-
container_id:
|
|
3958
|
-
file_id:
|
|
3959
|
-
filename:
|
|
3960
|
-
start_index:
|
|
3961
|
-
end_index:
|
|
4043
|
+
z18.object({
|
|
4044
|
+
type: z18.literal("container_file_citation"),
|
|
4045
|
+
container_id: z18.string(),
|
|
4046
|
+
file_id: z18.string(),
|
|
4047
|
+
filename: z18.string(),
|
|
4048
|
+
start_index: z18.number(),
|
|
4049
|
+
end_index: z18.number()
|
|
3962
4050
|
}),
|
|
3963
|
-
|
|
3964
|
-
type:
|
|
3965
|
-
file_id:
|
|
3966
|
-
index:
|
|
4051
|
+
z18.object({
|
|
4052
|
+
type: z18.literal("file_path"),
|
|
4053
|
+
file_id: z18.string(),
|
|
4054
|
+
index: z18.number()
|
|
3967
4055
|
})
|
|
3968
4056
|
])
|
|
3969
4057
|
)
|
|
3970
4058
|
})
|
|
3971
4059
|
)
|
|
3972
4060
|
}),
|
|
3973
|
-
|
|
3974
|
-
type:
|
|
3975
|
-
id:
|
|
3976
|
-
status:
|
|
3977
|
-
action:
|
|
3978
|
-
|
|
3979
|
-
type:
|
|
3980
|
-
query:
|
|
3981
|
-
sources:
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
type:
|
|
3986
|
-
name:
|
|
4061
|
+
z18.object({
|
|
4062
|
+
type: z18.literal("web_search_call"),
|
|
4063
|
+
id: z18.string(),
|
|
4064
|
+
status: z18.string(),
|
|
4065
|
+
action: z18.discriminatedUnion("type", [
|
|
4066
|
+
z18.object({
|
|
4067
|
+
type: z18.literal("search"),
|
|
4068
|
+
query: z18.string().nullish(),
|
|
4069
|
+
sources: z18.array(
|
|
4070
|
+
z18.discriminatedUnion("type", [
|
|
4071
|
+
z18.object({ type: z18.literal("url"), url: z18.string() }),
|
|
4072
|
+
z18.object({
|
|
4073
|
+
type: z18.literal("api"),
|
|
4074
|
+
name: z18.string()
|
|
3987
4075
|
})
|
|
3988
4076
|
])
|
|
3989
4077
|
).nullish()
|
|
3990
4078
|
}),
|
|
3991
|
-
|
|
3992
|
-
type:
|
|
3993
|
-
url:
|
|
4079
|
+
z18.object({
|
|
4080
|
+
type: z18.literal("open_page"),
|
|
4081
|
+
url: z18.string().nullish()
|
|
3994
4082
|
}),
|
|
3995
|
-
|
|
3996
|
-
type:
|
|
3997
|
-
url:
|
|
3998
|
-
pattern:
|
|
4083
|
+
z18.object({
|
|
4084
|
+
type: z18.literal("find_in_page"),
|
|
4085
|
+
url: z18.string().nullish(),
|
|
4086
|
+
pattern: z18.string().nullish()
|
|
3999
4087
|
})
|
|
4000
4088
|
]).nullish()
|
|
4001
4089
|
}),
|
|
4002
|
-
|
|
4003
|
-
type:
|
|
4004
|
-
id:
|
|
4005
|
-
queries:
|
|
4006
|
-
results:
|
|
4007
|
-
|
|
4008
|
-
attributes:
|
|
4009
|
-
|
|
4010
|
-
|
|
4090
|
+
z18.object({
|
|
4091
|
+
type: z18.literal("file_search_call"),
|
|
4092
|
+
id: z18.string(),
|
|
4093
|
+
queries: z18.array(z18.string()),
|
|
4094
|
+
results: z18.array(
|
|
4095
|
+
z18.object({
|
|
4096
|
+
attributes: z18.record(
|
|
4097
|
+
z18.string(),
|
|
4098
|
+
z18.union([z18.string(), z18.number(), z18.boolean()])
|
|
4011
4099
|
),
|
|
4012
|
-
file_id:
|
|
4013
|
-
filename:
|
|
4014
|
-
score:
|
|
4015
|
-
text:
|
|
4100
|
+
file_id: z18.string(),
|
|
4101
|
+
filename: z18.string(),
|
|
4102
|
+
score: z18.number(),
|
|
4103
|
+
text: z18.string()
|
|
4016
4104
|
})
|
|
4017
4105
|
).nullish()
|
|
4018
4106
|
}),
|
|
4019
|
-
|
|
4020
|
-
type:
|
|
4021
|
-
id:
|
|
4022
|
-
code:
|
|
4023
|
-
container_id:
|
|
4024
|
-
outputs:
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4107
|
+
z18.object({
|
|
4108
|
+
type: z18.literal("code_interpreter_call"),
|
|
4109
|
+
id: z18.string(),
|
|
4110
|
+
code: z18.string().nullable(),
|
|
4111
|
+
container_id: z18.string(),
|
|
4112
|
+
outputs: z18.array(
|
|
4113
|
+
z18.discriminatedUnion("type", [
|
|
4114
|
+
z18.object({ type: z18.literal("logs"), logs: z18.string() }),
|
|
4115
|
+
z18.object({ type: z18.literal("image"), url: z18.string() })
|
|
4028
4116
|
])
|
|
4029
4117
|
).nullable()
|
|
4030
4118
|
}),
|
|
4031
|
-
|
|
4032
|
-
type:
|
|
4033
|
-
id:
|
|
4034
|
-
result:
|
|
4119
|
+
z18.object({
|
|
4120
|
+
type: z18.literal("image_generation_call"),
|
|
4121
|
+
id: z18.string(),
|
|
4122
|
+
result: z18.string()
|
|
4035
4123
|
}),
|
|
4036
|
-
|
|
4037
|
-
type:
|
|
4038
|
-
id:
|
|
4039
|
-
call_id:
|
|
4040
|
-
action:
|
|
4041
|
-
type:
|
|
4042
|
-
command:
|
|
4043
|
-
timeout_ms:
|
|
4044
|
-
user:
|
|
4045
|
-
working_directory:
|
|
4046
|
-
env:
|
|
4124
|
+
z18.object({
|
|
4125
|
+
type: z18.literal("local_shell_call"),
|
|
4126
|
+
id: z18.string(),
|
|
4127
|
+
call_id: z18.string(),
|
|
4128
|
+
action: z18.object({
|
|
4129
|
+
type: z18.literal("exec"),
|
|
4130
|
+
command: z18.array(z18.string()),
|
|
4131
|
+
timeout_ms: z18.number().optional(),
|
|
4132
|
+
user: z18.string().optional(),
|
|
4133
|
+
working_directory: z18.string().optional(),
|
|
4134
|
+
env: z18.record(z18.string(), z18.string()).optional()
|
|
4047
4135
|
})
|
|
4048
4136
|
}),
|
|
4049
|
-
|
|
4050
|
-
type:
|
|
4051
|
-
call_id:
|
|
4052
|
-
name:
|
|
4053
|
-
arguments:
|
|
4054
|
-
id:
|
|
4137
|
+
z18.object({
|
|
4138
|
+
type: z18.literal("function_call"),
|
|
4139
|
+
call_id: z18.string(),
|
|
4140
|
+
name: z18.string(),
|
|
4141
|
+
arguments: z18.string(),
|
|
4142
|
+
id: z18.string(),
|
|
4143
|
+
namespace: z18.string().nullish()
|
|
4055
4144
|
}),
|
|
4056
|
-
|
|
4057
|
-
type:
|
|
4058
|
-
call_id:
|
|
4059
|
-
name:
|
|
4060
|
-
input:
|
|
4061
|
-
id:
|
|
4145
|
+
z18.object({
|
|
4146
|
+
type: z18.literal("custom_tool_call"),
|
|
4147
|
+
call_id: z18.string(),
|
|
4148
|
+
name: z18.string(),
|
|
4149
|
+
input: z18.string(),
|
|
4150
|
+
id: z18.string()
|
|
4062
4151
|
}),
|
|
4063
|
-
|
|
4064
|
-
type:
|
|
4065
|
-
id:
|
|
4066
|
-
status:
|
|
4152
|
+
z18.object({
|
|
4153
|
+
type: z18.literal("computer_call"),
|
|
4154
|
+
id: z18.string(),
|
|
4155
|
+
status: z18.string().optional()
|
|
4067
4156
|
}),
|
|
4068
|
-
|
|
4069
|
-
type:
|
|
4070
|
-
id:
|
|
4071
|
-
encrypted_content:
|
|
4072
|
-
summary:
|
|
4073
|
-
|
|
4074
|
-
type:
|
|
4075
|
-
text:
|
|
4157
|
+
z18.object({
|
|
4158
|
+
type: z18.literal("reasoning"),
|
|
4159
|
+
id: z18.string(),
|
|
4160
|
+
encrypted_content: z18.string().nullish(),
|
|
4161
|
+
summary: z18.array(
|
|
4162
|
+
z18.object({
|
|
4163
|
+
type: z18.literal("summary_text"),
|
|
4164
|
+
text: z18.string()
|
|
4076
4165
|
})
|
|
4077
4166
|
)
|
|
4078
4167
|
}),
|
|
4079
|
-
|
|
4080
|
-
type:
|
|
4081
|
-
id:
|
|
4082
|
-
status:
|
|
4083
|
-
arguments:
|
|
4084
|
-
name:
|
|
4085
|
-
server_label:
|
|
4086
|
-
output:
|
|
4087
|
-
error:
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
type:
|
|
4091
|
-
code:
|
|
4092
|
-
message:
|
|
4168
|
+
z18.object({
|
|
4169
|
+
type: z18.literal("mcp_call"),
|
|
4170
|
+
id: z18.string(),
|
|
4171
|
+
status: z18.string(),
|
|
4172
|
+
arguments: z18.string(),
|
|
4173
|
+
name: z18.string(),
|
|
4174
|
+
server_label: z18.string(),
|
|
4175
|
+
output: z18.string().nullish(),
|
|
4176
|
+
error: z18.union([
|
|
4177
|
+
z18.string(),
|
|
4178
|
+
z18.object({
|
|
4179
|
+
type: z18.string().optional(),
|
|
4180
|
+
code: z18.union([z18.number(), z18.string()]).optional(),
|
|
4181
|
+
message: z18.string().optional()
|
|
4093
4182
|
}).loose()
|
|
4094
4183
|
]).nullish(),
|
|
4095
|
-
approval_request_id:
|
|
4184
|
+
approval_request_id: z18.string().nullish()
|
|
4096
4185
|
}),
|
|
4097
|
-
|
|
4098
|
-
type:
|
|
4099
|
-
id:
|
|
4100
|
-
server_label:
|
|
4101
|
-
tools:
|
|
4102
|
-
|
|
4103
|
-
name:
|
|
4104
|
-
description:
|
|
4105
|
-
input_schema:
|
|
4106
|
-
annotations:
|
|
4186
|
+
z18.object({
|
|
4187
|
+
type: z18.literal("mcp_list_tools"),
|
|
4188
|
+
id: z18.string(),
|
|
4189
|
+
server_label: z18.string(),
|
|
4190
|
+
tools: z18.array(
|
|
4191
|
+
z18.object({
|
|
4192
|
+
name: z18.string(),
|
|
4193
|
+
description: z18.string().optional(),
|
|
4194
|
+
input_schema: z18.any(),
|
|
4195
|
+
annotations: z18.record(z18.string(), z18.unknown()).optional()
|
|
4107
4196
|
})
|
|
4108
4197
|
),
|
|
4109
|
-
error:
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
type:
|
|
4113
|
-
code:
|
|
4114
|
-
message:
|
|
4198
|
+
error: z18.union([
|
|
4199
|
+
z18.string(),
|
|
4200
|
+
z18.object({
|
|
4201
|
+
type: z18.string().optional(),
|
|
4202
|
+
code: z18.union([z18.number(), z18.string()]).optional(),
|
|
4203
|
+
message: z18.string().optional()
|
|
4115
4204
|
}).loose()
|
|
4116
4205
|
]).optional()
|
|
4117
4206
|
}),
|
|
4118
|
-
|
|
4119
|
-
type:
|
|
4120
|
-
id:
|
|
4121
|
-
server_label:
|
|
4122
|
-
name:
|
|
4123
|
-
arguments:
|
|
4124
|
-
approval_request_id:
|
|
4207
|
+
z18.object({
|
|
4208
|
+
type: z18.literal("mcp_approval_request"),
|
|
4209
|
+
id: z18.string(),
|
|
4210
|
+
server_label: z18.string(),
|
|
4211
|
+
name: z18.string(),
|
|
4212
|
+
arguments: z18.string(),
|
|
4213
|
+
approval_request_id: z18.string().optional()
|
|
4125
4214
|
}),
|
|
4126
|
-
|
|
4127
|
-
type:
|
|
4128
|
-
id:
|
|
4129
|
-
call_id:
|
|
4130
|
-
status:
|
|
4131
|
-
operation:
|
|
4132
|
-
|
|
4133
|
-
type:
|
|
4134
|
-
path:
|
|
4135
|
-
diff:
|
|
4215
|
+
z18.object({
|
|
4216
|
+
type: z18.literal("apply_patch_call"),
|
|
4217
|
+
id: z18.string(),
|
|
4218
|
+
call_id: z18.string(),
|
|
4219
|
+
status: z18.enum(["in_progress", "completed"]),
|
|
4220
|
+
operation: z18.discriminatedUnion("type", [
|
|
4221
|
+
z18.object({
|
|
4222
|
+
type: z18.literal("create_file"),
|
|
4223
|
+
path: z18.string(),
|
|
4224
|
+
diff: z18.string()
|
|
4136
4225
|
}),
|
|
4137
|
-
|
|
4138
|
-
type:
|
|
4139
|
-
path:
|
|
4226
|
+
z18.object({
|
|
4227
|
+
type: z18.literal("delete_file"),
|
|
4228
|
+
path: z18.string()
|
|
4140
4229
|
}),
|
|
4141
|
-
|
|
4142
|
-
type:
|
|
4143
|
-
path:
|
|
4144
|
-
diff:
|
|
4230
|
+
z18.object({
|
|
4231
|
+
type: z18.literal("update_file"),
|
|
4232
|
+
path: z18.string(),
|
|
4233
|
+
diff: z18.string()
|
|
4145
4234
|
})
|
|
4146
4235
|
])
|
|
4147
4236
|
}),
|
|
4148
|
-
|
|
4149
|
-
type:
|
|
4150
|
-
id:
|
|
4151
|
-
call_id:
|
|
4152
|
-
status:
|
|
4153
|
-
action:
|
|
4154
|
-
commands:
|
|
4237
|
+
z18.object({
|
|
4238
|
+
type: z18.literal("shell_call"),
|
|
4239
|
+
id: z18.string(),
|
|
4240
|
+
call_id: z18.string(),
|
|
4241
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
4242
|
+
action: z18.object({
|
|
4243
|
+
commands: z18.array(z18.string())
|
|
4155
4244
|
})
|
|
4156
4245
|
}),
|
|
4157
|
-
|
|
4158
|
-
type:
|
|
4159
|
-
id:
|
|
4160
|
-
encrypted_content:
|
|
4246
|
+
z18.object({
|
|
4247
|
+
type: z18.literal("compaction"),
|
|
4248
|
+
id: z18.string(),
|
|
4249
|
+
encrypted_content: z18.string()
|
|
4161
4250
|
}),
|
|
4162
|
-
|
|
4163
|
-
type:
|
|
4164
|
-
id:
|
|
4165
|
-
call_id:
|
|
4166
|
-
status:
|
|
4167
|
-
output:
|
|
4168
|
-
|
|
4169
|
-
stdout:
|
|
4170
|
-
stderr:
|
|
4171
|
-
outcome:
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
type:
|
|
4175
|
-
exit_code:
|
|
4251
|
+
z18.object({
|
|
4252
|
+
type: z18.literal("shell_call_output"),
|
|
4253
|
+
id: z18.string(),
|
|
4254
|
+
call_id: z18.string(),
|
|
4255
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
4256
|
+
output: z18.array(
|
|
4257
|
+
z18.object({
|
|
4258
|
+
stdout: z18.string(),
|
|
4259
|
+
stderr: z18.string(),
|
|
4260
|
+
outcome: z18.discriminatedUnion("type", [
|
|
4261
|
+
z18.object({ type: z18.literal("timeout") }),
|
|
4262
|
+
z18.object({
|
|
4263
|
+
type: z18.literal("exit"),
|
|
4264
|
+
exit_code: z18.number()
|
|
4176
4265
|
})
|
|
4177
4266
|
])
|
|
4178
4267
|
})
|
|
4179
4268
|
)
|
|
4180
4269
|
}),
|
|
4181
|
-
|
|
4182
|
-
type:
|
|
4183
|
-
id:
|
|
4184
|
-
execution:
|
|
4185
|
-
call_id:
|
|
4186
|
-
status:
|
|
4187
|
-
arguments:
|
|
4270
|
+
z18.object({
|
|
4271
|
+
type: z18.literal("tool_search_call"),
|
|
4272
|
+
id: z18.string(),
|
|
4273
|
+
execution: z18.enum(["server", "client"]),
|
|
4274
|
+
call_id: z18.string().nullable(),
|
|
4275
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
4276
|
+
arguments: z18.unknown()
|
|
4188
4277
|
}),
|
|
4189
|
-
|
|
4190
|
-
type:
|
|
4191
|
-
id:
|
|
4192
|
-
execution:
|
|
4193
|
-
call_id:
|
|
4194
|
-
status:
|
|
4195
|
-
tools:
|
|
4278
|
+
z18.object({
|
|
4279
|
+
type: z18.literal("tool_search_output"),
|
|
4280
|
+
id: z18.string(),
|
|
4281
|
+
execution: z18.enum(["server", "client"]),
|
|
4282
|
+
call_id: z18.string().nullable(),
|
|
4283
|
+
status: z18.enum(["in_progress", "completed", "incomplete"]),
|
|
4284
|
+
tools: z18.array(z18.record(z18.string(), jsonValueSchema.optional()))
|
|
4196
4285
|
})
|
|
4197
4286
|
])
|
|
4198
4287
|
).optional(),
|
|
4199
|
-
service_tier:
|
|
4200
|
-
incomplete_details:
|
|
4201
|
-
usage:
|
|
4202
|
-
input_tokens:
|
|
4203
|
-
input_tokens_details:
|
|
4204
|
-
output_tokens:
|
|
4205
|
-
output_tokens_details:
|
|
4288
|
+
service_tier: z18.string().nullish(),
|
|
4289
|
+
incomplete_details: z18.object({ reason: z18.string() }).nullish(),
|
|
4290
|
+
usage: z18.object({
|
|
4291
|
+
input_tokens: z18.number(),
|
|
4292
|
+
input_tokens_details: z18.object({ cached_tokens: z18.number().nullish() }).nullish(),
|
|
4293
|
+
output_tokens: z18.number(),
|
|
4294
|
+
output_tokens_details: z18.object({ reasoning_tokens: z18.number().nullish() }).nullish()
|
|
4206
4295
|
}).optional()
|
|
4207
4296
|
})
|
|
4208
4297
|
)
|
|
4209
4298
|
);
|
|
4210
4299
|
|
|
4211
|
-
// src/responses/openai-responses-options.ts
|
|
4300
|
+
// src/responses/openai-responses-language-model-options.ts
|
|
4212
4301
|
import {
|
|
4213
|
-
lazySchema as
|
|
4214
|
-
zodSchema as
|
|
4302
|
+
lazySchema as lazySchema17,
|
|
4303
|
+
zodSchema as zodSchema17
|
|
4215
4304
|
} from "@ai-sdk/provider-utils";
|
|
4216
|
-
import { z as
|
|
4305
|
+
import { z as z19 } from "zod/v4";
|
|
4217
4306
|
var TOP_LOGPROBS_MAX = 20;
|
|
4218
4307
|
var openaiResponsesReasoningModelIds = [
|
|
4219
4308
|
"o1",
|
|
@@ -4278,9 +4367,9 @@ var openaiResponsesModelIds = [
|
|
|
4278
4367
|
"gpt-5-chat-latest",
|
|
4279
4368
|
...openaiResponsesReasoningModelIds
|
|
4280
4369
|
];
|
|
4281
|
-
var openaiLanguageModelResponsesOptionsSchema =
|
|
4282
|
-
() =>
|
|
4283
|
-
|
|
4370
|
+
var openaiLanguageModelResponsesOptionsSchema = lazySchema17(
|
|
4371
|
+
() => zodSchema17(
|
|
4372
|
+
z19.object({
|
|
4284
4373
|
/**
|
|
4285
4374
|
* The ID of the OpenAI Conversation to continue.
|
|
4286
4375
|
* You must create a conversation first via the OpenAI API.
|
|
@@ -4288,13 +4377,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4288
4377
|
* Defaults to `undefined`.
|
|
4289
4378
|
* @see https://platform.openai.com/docs/api-reference/conversations/create
|
|
4290
4379
|
*/
|
|
4291
|
-
conversation:
|
|
4380
|
+
conversation: z19.string().nullish(),
|
|
4292
4381
|
/**
|
|
4293
4382
|
* The set of extra fields to include in the response (advanced, usually not needed).
|
|
4294
4383
|
* Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'message.output_text.logprobs'.
|
|
4295
4384
|
*/
|
|
4296
|
-
include:
|
|
4297
|
-
|
|
4385
|
+
include: z19.array(
|
|
4386
|
+
z19.enum([
|
|
4298
4387
|
"reasoning.encrypted_content",
|
|
4299
4388
|
// handled internally by default, only needed for unknown reasoning models
|
|
4300
4389
|
"file_search_call.results",
|
|
@@ -4306,7 +4395,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4306
4395
|
* They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
|
|
4307
4396
|
* Defaults to `undefined`.
|
|
4308
4397
|
*/
|
|
4309
|
-
instructions:
|
|
4398
|
+
instructions: z19.string().nullish(),
|
|
4310
4399
|
/**
|
|
4311
4400
|
* Return the log probabilities of the tokens. Including logprobs will increase
|
|
4312
4401
|
* the response size and can slow down response times. However, it can
|
|
@@ -4321,30 +4410,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4321
4410
|
* @see https://platform.openai.com/docs/api-reference/responses/create
|
|
4322
4411
|
* @see https://cookbook.openai.com/examples/using_logprobs
|
|
4323
4412
|
*/
|
|
4324
|
-
logprobs:
|
|
4413
|
+
logprobs: z19.union([z19.boolean(), z19.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
|
|
4325
4414
|
/**
|
|
4326
4415
|
* The maximum number of total calls to built-in tools that can be processed in a response.
|
|
4327
4416
|
* This maximum number applies across all built-in tool calls, not per individual tool.
|
|
4328
4417
|
* Any further attempts to call a tool by the model will be ignored.
|
|
4329
4418
|
*/
|
|
4330
|
-
maxToolCalls:
|
|
4419
|
+
maxToolCalls: z19.number().nullish(),
|
|
4331
4420
|
/**
|
|
4332
4421
|
* Additional metadata to store with the generation.
|
|
4333
4422
|
*/
|
|
4334
|
-
metadata:
|
|
4423
|
+
metadata: z19.any().nullish(),
|
|
4335
4424
|
/**
|
|
4336
4425
|
* Whether to use parallel tool calls. Defaults to `true`.
|
|
4337
4426
|
*/
|
|
4338
|
-
parallelToolCalls:
|
|
4427
|
+
parallelToolCalls: z19.boolean().nullish(),
|
|
4339
4428
|
/**
|
|
4340
4429
|
* The ID of the previous response. You can use it to continue a conversation.
|
|
4341
4430
|
* Defaults to `undefined`.
|
|
4342
4431
|
*/
|
|
4343
|
-
previousResponseId:
|
|
4432
|
+
previousResponseId: z19.string().nullish(),
|
|
4344
4433
|
/**
|
|
4345
4434
|
* Sets a cache key to tie this prompt to cached prefixes for better caching performance.
|
|
4346
4435
|
*/
|
|
4347
|
-
promptCacheKey:
|
|
4436
|
+
promptCacheKey: z19.string().nullish(),
|
|
4348
4437
|
/**
|
|
4349
4438
|
* The retention policy for the prompt cache.
|
|
4350
4439
|
* - 'in_memory': Default. Standard prompt caching behavior.
|
|
@@ -4353,7 +4442,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4353
4442
|
*
|
|
4354
4443
|
* @default 'in_memory'
|
|
4355
4444
|
*/
|
|
4356
|
-
promptCacheRetention:
|
|
4445
|
+
promptCacheRetention: z19.enum(["in_memory", "24h"]).nullish(),
|
|
4357
4446
|
/**
|
|
4358
4447
|
* Reasoning effort for reasoning models. Defaults to `medium`. If you use
|
|
4359
4448
|
* `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
|
|
@@ -4364,17 +4453,17 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4364
4453
|
* OpenAI's GPT-5.1-Codex-Max model. Setting `reasoningEffort` to 'none' or 'xhigh' with unsupported models will result in
|
|
4365
4454
|
* an error.
|
|
4366
4455
|
*/
|
|
4367
|
-
reasoningEffort:
|
|
4456
|
+
reasoningEffort: z19.string().nullish(),
|
|
4368
4457
|
/**
|
|
4369
4458
|
* Controls reasoning summary output from the model.
|
|
4370
4459
|
* Set to "auto" to automatically receive the richest level available,
|
|
4371
4460
|
* or "detailed" for comprehensive summaries.
|
|
4372
4461
|
*/
|
|
4373
|
-
reasoningSummary:
|
|
4462
|
+
reasoningSummary: z19.string().nullish(),
|
|
4374
4463
|
/**
|
|
4375
4464
|
* The identifier for safety monitoring and tracking.
|
|
4376
4465
|
*/
|
|
4377
|
-
safetyIdentifier:
|
|
4466
|
+
safetyIdentifier: z19.string().nullish(),
|
|
4378
4467
|
/**
|
|
4379
4468
|
* Service tier for the request.
|
|
4380
4469
|
* Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
|
|
@@ -4382,34 +4471,34 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4382
4471
|
*
|
|
4383
4472
|
* Defaults to 'auto'.
|
|
4384
4473
|
*/
|
|
4385
|
-
serviceTier:
|
|
4474
|
+
serviceTier: z19.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
4386
4475
|
/**
|
|
4387
4476
|
* Whether to store the generation. Defaults to `true`.
|
|
4388
4477
|
*/
|
|
4389
|
-
store:
|
|
4478
|
+
store: z19.boolean().nullish(),
|
|
4390
4479
|
/**
|
|
4391
4480
|
* Whether to use strict JSON schema validation.
|
|
4392
4481
|
* Defaults to `true`.
|
|
4393
4482
|
*/
|
|
4394
|
-
strictJsonSchema:
|
|
4483
|
+
strictJsonSchema: z19.boolean().nullish(),
|
|
4395
4484
|
/**
|
|
4396
4485
|
* Controls the verbosity of the model's responses. Lower values ('low') will result
|
|
4397
4486
|
* in more concise responses, while higher values ('high') will result in more verbose responses.
|
|
4398
4487
|
* Valid values: 'low', 'medium', 'high'.
|
|
4399
4488
|
*/
|
|
4400
|
-
textVerbosity:
|
|
4489
|
+
textVerbosity: z19.enum(["low", "medium", "high"]).nullish(),
|
|
4401
4490
|
/**
|
|
4402
4491
|
* Controls output truncation. 'auto' (default) performs truncation automatically;
|
|
4403
4492
|
* 'disabled' turns truncation off.
|
|
4404
4493
|
*/
|
|
4405
|
-
truncation:
|
|
4494
|
+
truncation: z19.enum(["auto", "disabled"]).nullish(),
|
|
4406
4495
|
/**
|
|
4407
4496
|
* A unique identifier representing your end-user, which can help OpenAI to
|
|
4408
4497
|
* monitor and detect abuse.
|
|
4409
4498
|
* Defaults to `undefined`.
|
|
4410
4499
|
* @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
|
|
4411
4500
|
*/
|
|
4412
|
-
user:
|
|
4501
|
+
user: z19.string().nullish(),
|
|
4413
4502
|
/**
|
|
4414
4503
|
* Override the system message mode for this model.
|
|
4415
4504
|
* - 'system': Use the 'system' role for system messages (default for most models)
|
|
@@ -4418,7 +4507,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4418
4507
|
*
|
|
4419
4508
|
* If not specified, the mode is automatically determined based on the model.
|
|
4420
4509
|
*/
|
|
4421
|
-
systemMessageMode:
|
|
4510
|
+
systemMessageMode: z19.enum(["system", "developer", "remove"]).optional(),
|
|
4422
4511
|
/**
|
|
4423
4512
|
* Force treating this model as a reasoning model.
|
|
4424
4513
|
*
|
|
@@ -4428,14 +4517,14 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema16(
|
|
|
4428
4517
|
* When enabled, the SDK applies reasoning-model parameter compatibility rules
|
|
4429
4518
|
* and defaults `systemMessageMode` to `developer` unless overridden.
|
|
4430
4519
|
*/
|
|
4431
|
-
forceReasoning:
|
|
4520
|
+
forceReasoning: z19.boolean().optional(),
|
|
4432
4521
|
/**
|
|
4433
4522
|
* Enable server-side context management (compaction).
|
|
4434
4523
|
*/
|
|
4435
|
-
contextManagement:
|
|
4436
|
-
|
|
4437
|
-
type:
|
|
4438
|
-
compactThreshold:
|
|
4524
|
+
contextManagement: z19.array(
|
|
4525
|
+
z19.object({
|
|
4526
|
+
type: z19.literal("compaction"),
|
|
4527
|
+
compactThreshold: z19.number()
|
|
4439
4528
|
})
|
|
4440
4529
|
).nullish()
|
|
4441
4530
|
})
|
|
@@ -4454,37 +4543,37 @@ import {
|
|
|
4454
4543
|
// src/tool/code-interpreter.ts
|
|
4455
4544
|
import {
|
|
4456
4545
|
createProviderExecutedToolFactory,
|
|
4457
|
-
lazySchema as
|
|
4458
|
-
zodSchema as
|
|
4546
|
+
lazySchema as lazySchema18,
|
|
4547
|
+
zodSchema as zodSchema18
|
|
4459
4548
|
} from "@ai-sdk/provider-utils";
|
|
4460
|
-
import { z as
|
|
4461
|
-
var codeInterpreterInputSchema =
|
|
4462
|
-
() =>
|
|
4463
|
-
|
|
4464
|
-
code:
|
|
4465
|
-
containerId:
|
|
4549
|
+
import { z as z20 } from "zod/v4";
|
|
4550
|
+
var codeInterpreterInputSchema = lazySchema18(
|
|
4551
|
+
() => zodSchema18(
|
|
4552
|
+
z20.object({
|
|
4553
|
+
code: z20.string().nullish(),
|
|
4554
|
+
containerId: z20.string()
|
|
4466
4555
|
})
|
|
4467
4556
|
)
|
|
4468
4557
|
);
|
|
4469
|
-
var codeInterpreterOutputSchema =
|
|
4470
|
-
() =>
|
|
4471
|
-
|
|
4472
|
-
outputs:
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4558
|
+
var codeInterpreterOutputSchema = lazySchema18(
|
|
4559
|
+
() => zodSchema18(
|
|
4560
|
+
z20.object({
|
|
4561
|
+
outputs: z20.array(
|
|
4562
|
+
z20.discriminatedUnion("type", [
|
|
4563
|
+
z20.object({ type: z20.literal("logs"), logs: z20.string() }),
|
|
4564
|
+
z20.object({ type: z20.literal("image"), url: z20.string() })
|
|
4476
4565
|
])
|
|
4477
4566
|
).nullish()
|
|
4478
4567
|
})
|
|
4479
4568
|
)
|
|
4480
4569
|
);
|
|
4481
|
-
var codeInterpreterArgsSchema =
|
|
4482
|
-
() =>
|
|
4483
|
-
|
|
4484
|
-
container:
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
fileIds:
|
|
4570
|
+
var codeInterpreterArgsSchema = lazySchema18(
|
|
4571
|
+
() => zodSchema18(
|
|
4572
|
+
z20.object({
|
|
4573
|
+
container: z20.union([
|
|
4574
|
+
z20.string(),
|
|
4575
|
+
z20.object({
|
|
4576
|
+
fileIds: z20.array(z20.string()).optional()
|
|
4488
4577
|
})
|
|
4489
4578
|
]).optional()
|
|
4490
4579
|
})
|
|
@@ -4502,45 +4591,45 @@ var codeInterpreter = (args = {}) => {
|
|
|
4502
4591
|
// src/tool/file-search.ts
|
|
4503
4592
|
import {
|
|
4504
4593
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
4505
|
-
lazySchema as
|
|
4506
|
-
zodSchema as
|
|
4594
|
+
lazySchema as lazySchema19,
|
|
4595
|
+
zodSchema as zodSchema19
|
|
4507
4596
|
} from "@ai-sdk/provider-utils";
|
|
4508
|
-
import { z as
|
|
4509
|
-
var comparisonFilterSchema =
|
|
4510
|
-
key:
|
|
4511
|
-
type:
|
|
4512
|
-
value:
|
|
4597
|
+
import { z as z21 } from "zod/v4";
|
|
4598
|
+
var comparisonFilterSchema = z21.object({
|
|
4599
|
+
key: z21.string(),
|
|
4600
|
+
type: z21.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
|
|
4601
|
+
value: z21.union([z21.string(), z21.number(), z21.boolean(), z21.array(z21.string())])
|
|
4513
4602
|
});
|
|
4514
|
-
var compoundFilterSchema =
|
|
4515
|
-
type:
|
|
4516
|
-
filters:
|
|
4517
|
-
|
|
4603
|
+
var compoundFilterSchema = z21.object({
|
|
4604
|
+
type: z21.enum(["and", "or"]),
|
|
4605
|
+
filters: z21.array(
|
|
4606
|
+
z21.union([comparisonFilterSchema, z21.lazy(() => compoundFilterSchema)])
|
|
4518
4607
|
)
|
|
4519
4608
|
});
|
|
4520
|
-
var fileSearchArgsSchema =
|
|
4521
|
-
() =>
|
|
4522
|
-
|
|
4523
|
-
vectorStoreIds:
|
|
4524
|
-
maxNumResults:
|
|
4525
|
-
ranking:
|
|
4526
|
-
ranker:
|
|
4527
|
-
scoreThreshold:
|
|
4609
|
+
var fileSearchArgsSchema = lazySchema19(
|
|
4610
|
+
() => zodSchema19(
|
|
4611
|
+
z21.object({
|
|
4612
|
+
vectorStoreIds: z21.array(z21.string()),
|
|
4613
|
+
maxNumResults: z21.number().optional(),
|
|
4614
|
+
ranking: z21.object({
|
|
4615
|
+
ranker: z21.string().optional(),
|
|
4616
|
+
scoreThreshold: z21.number().optional()
|
|
4528
4617
|
}).optional(),
|
|
4529
|
-
filters:
|
|
4618
|
+
filters: z21.union([comparisonFilterSchema, compoundFilterSchema]).optional()
|
|
4530
4619
|
})
|
|
4531
4620
|
)
|
|
4532
4621
|
);
|
|
4533
|
-
var fileSearchOutputSchema =
|
|
4534
|
-
() =>
|
|
4535
|
-
|
|
4536
|
-
queries:
|
|
4537
|
-
results:
|
|
4538
|
-
|
|
4539
|
-
attributes:
|
|
4540
|
-
fileId:
|
|
4541
|
-
filename:
|
|
4542
|
-
score:
|
|
4543
|
-
text:
|
|
4622
|
+
var fileSearchOutputSchema = lazySchema19(
|
|
4623
|
+
() => zodSchema19(
|
|
4624
|
+
z21.object({
|
|
4625
|
+
queries: z21.array(z21.string()),
|
|
4626
|
+
results: z21.array(
|
|
4627
|
+
z21.object({
|
|
4628
|
+
attributes: z21.record(z21.string(), z21.unknown()),
|
|
4629
|
+
fileId: z21.string(),
|
|
4630
|
+
filename: z21.string(),
|
|
4631
|
+
score: z21.number(),
|
|
4632
|
+
text: z21.string()
|
|
4544
4633
|
})
|
|
4545
4634
|
).nullable()
|
|
4546
4635
|
})
|
|
@@ -4548,39 +4637,39 @@ var fileSearchOutputSchema = lazySchema18(
|
|
|
4548
4637
|
);
|
|
4549
4638
|
var fileSearch = createProviderExecutedToolFactory2({
|
|
4550
4639
|
id: "openai.file_search",
|
|
4551
|
-
inputSchema:
|
|
4640
|
+
inputSchema: z21.object({}),
|
|
4552
4641
|
outputSchema: fileSearchOutputSchema
|
|
4553
4642
|
});
|
|
4554
4643
|
|
|
4555
4644
|
// src/tool/image-generation.ts
|
|
4556
4645
|
import {
|
|
4557
4646
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
4558
|
-
lazySchema as
|
|
4559
|
-
zodSchema as
|
|
4647
|
+
lazySchema as lazySchema20,
|
|
4648
|
+
zodSchema as zodSchema20
|
|
4560
4649
|
} from "@ai-sdk/provider-utils";
|
|
4561
|
-
import { z as
|
|
4562
|
-
var imageGenerationArgsSchema =
|
|
4563
|
-
() =>
|
|
4564
|
-
|
|
4565
|
-
background:
|
|
4566
|
-
inputFidelity:
|
|
4567
|
-
inputImageMask:
|
|
4568
|
-
fileId:
|
|
4569
|
-
imageUrl:
|
|
4650
|
+
import { z as z22 } from "zod/v4";
|
|
4651
|
+
var imageGenerationArgsSchema = lazySchema20(
|
|
4652
|
+
() => zodSchema20(
|
|
4653
|
+
z22.object({
|
|
4654
|
+
background: z22.enum(["auto", "opaque", "transparent"]).optional(),
|
|
4655
|
+
inputFidelity: z22.enum(["low", "high"]).optional(),
|
|
4656
|
+
inputImageMask: z22.object({
|
|
4657
|
+
fileId: z22.string().optional(),
|
|
4658
|
+
imageUrl: z22.string().optional()
|
|
4570
4659
|
}).optional(),
|
|
4571
|
-
model:
|
|
4572
|
-
moderation:
|
|
4573
|
-
outputCompression:
|
|
4574
|
-
outputFormat:
|
|
4575
|
-
partialImages:
|
|
4576
|
-
quality:
|
|
4577
|
-
size:
|
|
4660
|
+
model: z22.string().optional(),
|
|
4661
|
+
moderation: z22.enum(["auto"]).optional(),
|
|
4662
|
+
outputCompression: z22.number().int().min(0).max(100).optional(),
|
|
4663
|
+
outputFormat: z22.enum(["png", "jpeg", "webp"]).optional(),
|
|
4664
|
+
partialImages: z22.number().int().min(0).max(3).optional(),
|
|
4665
|
+
quality: z22.enum(["auto", "low", "medium", "high"]).optional(),
|
|
4666
|
+
size: z22.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
|
|
4578
4667
|
}).strict()
|
|
4579
4668
|
)
|
|
4580
4669
|
);
|
|
4581
|
-
var imageGenerationInputSchema =
|
|
4582
|
-
var imageGenerationOutputSchema =
|
|
4583
|
-
() =>
|
|
4670
|
+
var imageGenerationInputSchema = lazySchema20(() => zodSchema20(z22.object({})));
|
|
4671
|
+
var imageGenerationOutputSchema = lazySchema20(
|
|
4672
|
+
() => zodSchema20(z22.object({ result: z22.string() }))
|
|
4584
4673
|
);
|
|
4585
4674
|
var imageGenerationToolFactory = createProviderExecutedToolFactory3({
|
|
4586
4675
|
id: "openai.image_generation",
|
|
@@ -4594,28 +4683,28 @@ var imageGeneration = (args = {}) => {
|
|
|
4594
4683
|
// src/tool/custom.ts
|
|
4595
4684
|
import {
|
|
4596
4685
|
createProviderDefinedToolFactory,
|
|
4597
|
-
lazySchema as
|
|
4598
|
-
zodSchema as
|
|
4686
|
+
lazySchema as lazySchema21,
|
|
4687
|
+
zodSchema as zodSchema21
|
|
4599
4688
|
} from "@ai-sdk/provider-utils";
|
|
4600
|
-
import { z as
|
|
4601
|
-
var customArgsSchema =
|
|
4602
|
-
() =>
|
|
4603
|
-
|
|
4604
|
-
description:
|
|
4605
|
-
format:
|
|
4606
|
-
|
|
4607
|
-
type:
|
|
4608
|
-
syntax:
|
|
4609
|
-
definition:
|
|
4689
|
+
import { z as z23 } from "zod/v4";
|
|
4690
|
+
var customArgsSchema = lazySchema21(
|
|
4691
|
+
() => zodSchema21(
|
|
4692
|
+
z23.object({
|
|
4693
|
+
description: z23.string().optional(),
|
|
4694
|
+
format: z23.union([
|
|
4695
|
+
z23.object({
|
|
4696
|
+
type: z23.literal("grammar"),
|
|
4697
|
+
syntax: z23.enum(["regex", "lark"]),
|
|
4698
|
+
definition: z23.string()
|
|
4610
4699
|
}),
|
|
4611
|
-
|
|
4612
|
-
type:
|
|
4700
|
+
z23.object({
|
|
4701
|
+
type: z23.literal("text")
|
|
4613
4702
|
})
|
|
4614
4703
|
]).optional()
|
|
4615
4704
|
})
|
|
4616
4705
|
)
|
|
4617
4706
|
);
|
|
4618
|
-
var customInputSchema =
|
|
4707
|
+
var customInputSchema = lazySchema21(() => zodSchema21(z23.string()));
|
|
4619
4708
|
var customToolFactory = createProviderDefinedToolFactory({
|
|
4620
4709
|
id: "openai.custom",
|
|
4621
4710
|
inputSchema: customInputSchema
|
|
@@ -4624,60 +4713,60 @@ var customToolFactory = createProviderDefinedToolFactory({
|
|
|
4624
4713
|
// src/tool/mcp.ts
|
|
4625
4714
|
import {
|
|
4626
4715
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
4627
|
-
lazySchema as
|
|
4628
|
-
zodSchema as
|
|
4716
|
+
lazySchema as lazySchema22,
|
|
4717
|
+
zodSchema as zodSchema22
|
|
4629
4718
|
} from "@ai-sdk/provider-utils";
|
|
4630
|
-
import { z as
|
|
4631
|
-
var jsonValueSchema2 =
|
|
4632
|
-
() =>
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4719
|
+
import { z as z24 } from "zod/v4";
|
|
4720
|
+
var jsonValueSchema2 = z24.lazy(
|
|
4721
|
+
() => z24.union([
|
|
4722
|
+
z24.string(),
|
|
4723
|
+
z24.number(),
|
|
4724
|
+
z24.boolean(),
|
|
4725
|
+
z24.null(),
|
|
4726
|
+
z24.array(jsonValueSchema2),
|
|
4727
|
+
z24.record(z24.string(), jsonValueSchema2)
|
|
4639
4728
|
])
|
|
4640
4729
|
);
|
|
4641
|
-
var mcpArgsSchema =
|
|
4642
|
-
() =>
|
|
4643
|
-
|
|
4644
|
-
serverLabel:
|
|
4645
|
-
allowedTools:
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
readOnly:
|
|
4649
|
-
toolNames:
|
|
4730
|
+
var mcpArgsSchema = lazySchema22(
|
|
4731
|
+
() => zodSchema22(
|
|
4732
|
+
z24.object({
|
|
4733
|
+
serverLabel: z24.string(),
|
|
4734
|
+
allowedTools: z24.union([
|
|
4735
|
+
z24.array(z24.string()),
|
|
4736
|
+
z24.object({
|
|
4737
|
+
readOnly: z24.boolean().optional(),
|
|
4738
|
+
toolNames: z24.array(z24.string()).optional()
|
|
4650
4739
|
})
|
|
4651
4740
|
]).optional(),
|
|
4652
|
-
authorization:
|
|
4653
|
-
connectorId:
|
|
4654
|
-
headers:
|
|
4655
|
-
requireApproval:
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
never:
|
|
4659
|
-
toolNames:
|
|
4741
|
+
authorization: z24.string().optional(),
|
|
4742
|
+
connectorId: z24.string().optional(),
|
|
4743
|
+
headers: z24.record(z24.string(), z24.string()).optional(),
|
|
4744
|
+
requireApproval: z24.union([
|
|
4745
|
+
z24.enum(["always", "never"]),
|
|
4746
|
+
z24.object({
|
|
4747
|
+
never: z24.object({
|
|
4748
|
+
toolNames: z24.array(z24.string()).optional()
|
|
4660
4749
|
}).optional()
|
|
4661
4750
|
})
|
|
4662
4751
|
]).optional(),
|
|
4663
|
-
serverDescription:
|
|
4664
|
-
serverUrl:
|
|
4752
|
+
serverDescription: z24.string().optional(),
|
|
4753
|
+
serverUrl: z24.string().optional()
|
|
4665
4754
|
}).refine(
|
|
4666
4755
|
(v) => v.serverUrl != null || v.connectorId != null,
|
|
4667
4756
|
"One of serverUrl or connectorId must be provided."
|
|
4668
4757
|
)
|
|
4669
4758
|
)
|
|
4670
4759
|
);
|
|
4671
|
-
var mcpInputSchema =
|
|
4672
|
-
var mcpOutputSchema =
|
|
4673
|
-
() =>
|
|
4674
|
-
|
|
4675
|
-
type:
|
|
4676
|
-
serverLabel:
|
|
4677
|
-
name:
|
|
4678
|
-
arguments:
|
|
4679
|
-
output:
|
|
4680
|
-
error:
|
|
4760
|
+
var mcpInputSchema = lazySchema22(() => zodSchema22(z24.object({})));
|
|
4761
|
+
var mcpOutputSchema = lazySchema22(
|
|
4762
|
+
() => zodSchema22(
|
|
4763
|
+
z24.object({
|
|
4764
|
+
type: z24.literal("call"),
|
|
4765
|
+
serverLabel: z24.string(),
|
|
4766
|
+
name: z24.string(),
|
|
4767
|
+
arguments: z24.string(),
|
|
4768
|
+
output: z24.string().nullish(),
|
|
4769
|
+
error: z24.union([z24.string(), jsonValueSchema2]).optional()
|
|
4681
4770
|
})
|
|
4682
4771
|
)
|
|
4683
4772
|
);
|
|
@@ -4690,70 +4779,15 @@ var mcpToolFactory = createProviderExecutedToolFactory4({
|
|
|
4690
4779
|
// src/tool/web-search.ts
|
|
4691
4780
|
import {
|
|
4692
4781
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
4693
|
-
lazySchema as lazySchema22,
|
|
4694
|
-
zodSchema as zodSchema22
|
|
4695
|
-
} from "@ai-sdk/provider-utils";
|
|
4696
|
-
import { z as z24 } from "zod/v4";
|
|
4697
|
-
var webSearchArgsSchema = lazySchema22(
|
|
4698
|
-
() => zodSchema22(
|
|
4699
|
-
z24.object({
|
|
4700
|
-
externalWebAccess: z24.boolean().optional(),
|
|
4701
|
-
filters: z24.object({ allowedDomains: z24.array(z24.string()).optional() }).optional(),
|
|
4702
|
-
searchContextSize: z24.enum(["low", "medium", "high"]).optional(),
|
|
4703
|
-
userLocation: z24.object({
|
|
4704
|
-
type: z24.literal("approximate"),
|
|
4705
|
-
country: z24.string().optional(),
|
|
4706
|
-
city: z24.string().optional(),
|
|
4707
|
-
region: z24.string().optional(),
|
|
4708
|
-
timezone: z24.string().optional()
|
|
4709
|
-
}).optional()
|
|
4710
|
-
})
|
|
4711
|
-
)
|
|
4712
|
-
);
|
|
4713
|
-
var webSearchInputSchema = lazySchema22(() => zodSchema22(z24.object({})));
|
|
4714
|
-
var webSearchOutputSchema = lazySchema22(
|
|
4715
|
-
() => zodSchema22(
|
|
4716
|
-
z24.object({
|
|
4717
|
-
action: z24.discriminatedUnion("type", [
|
|
4718
|
-
z24.object({
|
|
4719
|
-
type: z24.literal("search"),
|
|
4720
|
-
query: z24.string().optional()
|
|
4721
|
-
}),
|
|
4722
|
-
z24.object({
|
|
4723
|
-
type: z24.literal("openPage"),
|
|
4724
|
-
url: z24.string().nullish()
|
|
4725
|
-
}),
|
|
4726
|
-
z24.object({
|
|
4727
|
-
type: z24.literal("findInPage"),
|
|
4728
|
-
url: z24.string().nullish(),
|
|
4729
|
-
pattern: z24.string().nullish()
|
|
4730
|
-
})
|
|
4731
|
-
]).optional(),
|
|
4732
|
-
sources: z24.array(
|
|
4733
|
-
z24.discriminatedUnion("type", [
|
|
4734
|
-
z24.object({ type: z24.literal("url"), url: z24.string() }),
|
|
4735
|
-
z24.object({ type: z24.literal("api"), name: z24.string() })
|
|
4736
|
-
])
|
|
4737
|
-
).optional()
|
|
4738
|
-
})
|
|
4739
|
-
)
|
|
4740
|
-
);
|
|
4741
|
-
var webSearchToolFactory = createProviderExecutedToolFactory5({
|
|
4742
|
-
id: "openai.web_search",
|
|
4743
|
-
inputSchema: webSearchInputSchema,
|
|
4744
|
-
outputSchema: webSearchOutputSchema
|
|
4745
|
-
});
|
|
4746
|
-
|
|
4747
|
-
// src/tool/web-search-preview.ts
|
|
4748
|
-
import {
|
|
4749
|
-
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
4750
4782
|
lazySchema as lazySchema23,
|
|
4751
4783
|
zodSchema as zodSchema23
|
|
4752
4784
|
} from "@ai-sdk/provider-utils";
|
|
4753
4785
|
import { z as z25 } from "zod/v4";
|
|
4754
|
-
var
|
|
4786
|
+
var webSearchArgsSchema = lazySchema23(
|
|
4755
4787
|
() => zodSchema23(
|
|
4756
4788
|
z25.object({
|
|
4789
|
+
externalWebAccess: z25.boolean().optional(),
|
|
4790
|
+
filters: z25.object({ allowedDomains: z25.array(z25.string()).optional() }).optional(),
|
|
4757
4791
|
searchContextSize: z25.enum(["low", "medium", "high"]).optional(),
|
|
4758
4792
|
userLocation: z25.object({
|
|
4759
4793
|
type: z25.literal("approximate"),
|
|
@@ -4765,10 +4799,8 @@ var webSearchPreviewArgsSchema = lazySchema23(
|
|
|
4765
4799
|
})
|
|
4766
4800
|
)
|
|
4767
4801
|
);
|
|
4768
|
-
var
|
|
4769
|
-
|
|
4770
|
-
);
|
|
4771
|
-
var webSearchPreviewOutputSchema = lazySchema23(
|
|
4802
|
+
var webSearchInputSchema = lazySchema23(() => zodSchema23(z25.object({})));
|
|
4803
|
+
var webSearchOutputSchema = lazySchema23(
|
|
4772
4804
|
() => zodSchema23(
|
|
4773
4805
|
z25.object({
|
|
4774
4806
|
action: z25.discriminatedUnion("type", [
|
|
@@ -4785,6 +4817,63 @@ var webSearchPreviewOutputSchema = lazySchema23(
|
|
|
4785
4817
|
url: z25.string().nullish(),
|
|
4786
4818
|
pattern: z25.string().nullish()
|
|
4787
4819
|
})
|
|
4820
|
+
]).optional(),
|
|
4821
|
+
sources: z25.array(
|
|
4822
|
+
z25.discriminatedUnion("type", [
|
|
4823
|
+
z25.object({ type: z25.literal("url"), url: z25.string() }),
|
|
4824
|
+
z25.object({ type: z25.literal("api"), name: z25.string() })
|
|
4825
|
+
])
|
|
4826
|
+
).optional()
|
|
4827
|
+
})
|
|
4828
|
+
)
|
|
4829
|
+
);
|
|
4830
|
+
var webSearchToolFactory = createProviderExecutedToolFactory5({
|
|
4831
|
+
id: "openai.web_search",
|
|
4832
|
+
inputSchema: webSearchInputSchema,
|
|
4833
|
+
outputSchema: webSearchOutputSchema
|
|
4834
|
+
});
|
|
4835
|
+
|
|
4836
|
+
// src/tool/web-search-preview.ts
|
|
4837
|
+
import {
|
|
4838
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
4839
|
+
lazySchema as lazySchema24,
|
|
4840
|
+
zodSchema as zodSchema24
|
|
4841
|
+
} from "@ai-sdk/provider-utils";
|
|
4842
|
+
import { z as z26 } from "zod/v4";
|
|
4843
|
+
var webSearchPreviewArgsSchema = lazySchema24(
|
|
4844
|
+
() => zodSchema24(
|
|
4845
|
+
z26.object({
|
|
4846
|
+
searchContextSize: z26.enum(["low", "medium", "high"]).optional(),
|
|
4847
|
+
userLocation: z26.object({
|
|
4848
|
+
type: z26.literal("approximate"),
|
|
4849
|
+
country: z26.string().optional(),
|
|
4850
|
+
city: z26.string().optional(),
|
|
4851
|
+
region: z26.string().optional(),
|
|
4852
|
+
timezone: z26.string().optional()
|
|
4853
|
+
}).optional()
|
|
4854
|
+
})
|
|
4855
|
+
)
|
|
4856
|
+
);
|
|
4857
|
+
var webSearchPreviewInputSchema = lazySchema24(
|
|
4858
|
+
() => zodSchema24(z26.object({}))
|
|
4859
|
+
);
|
|
4860
|
+
var webSearchPreviewOutputSchema = lazySchema24(
|
|
4861
|
+
() => zodSchema24(
|
|
4862
|
+
z26.object({
|
|
4863
|
+
action: z26.discriminatedUnion("type", [
|
|
4864
|
+
z26.object({
|
|
4865
|
+
type: z26.literal("search"),
|
|
4866
|
+
query: z26.string().optional()
|
|
4867
|
+
}),
|
|
4868
|
+
z26.object({
|
|
4869
|
+
type: z26.literal("openPage"),
|
|
4870
|
+
url: z26.string().nullish()
|
|
4871
|
+
}),
|
|
4872
|
+
z26.object({
|
|
4873
|
+
type: z26.literal("findInPage"),
|
|
4874
|
+
url: z26.string().nullish(),
|
|
4875
|
+
pattern: z26.string().nullish()
|
|
4876
|
+
})
|
|
4788
4877
|
]).optional()
|
|
4789
4878
|
})
|
|
4790
4879
|
)
|
|
@@ -5144,13 +5233,13 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
5144
5233
|
warnings.push({ type: "unsupported", feature: "stopSequences" });
|
|
5145
5234
|
}
|
|
5146
5235
|
const providerOptionsName = this.config.provider.includes("azure") ? "azure" : "openai";
|
|
5147
|
-
let openaiOptions = await
|
|
5236
|
+
let openaiOptions = await parseProviderOptions8({
|
|
5148
5237
|
provider: providerOptionsName,
|
|
5149
5238
|
providerOptions,
|
|
5150
5239
|
schema: openaiLanguageModelResponsesOptionsSchema
|
|
5151
5240
|
});
|
|
5152
5241
|
if (openaiOptions == null && providerOptionsName !== "openai") {
|
|
5153
|
-
openaiOptions = await
|
|
5242
|
+
openaiOptions = await parseProviderOptions8({
|
|
5154
5243
|
provider: "openai",
|
|
5155
5244
|
providerOptions,
|
|
5156
5245
|
schema: openaiLanguageModelResponsesOptionsSchema
|
|
@@ -5626,7 +5715,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
5626
5715
|
input: part.arguments,
|
|
5627
5716
|
providerMetadata: {
|
|
5628
5717
|
[providerOptionsName]: {
|
|
5629
|
-
itemId: part.id
|
|
5718
|
+
itemId: part.id,
|
|
5719
|
+
...part.namespace != null && { namespace: part.namespace }
|
|
5630
5720
|
}
|
|
5631
5721
|
}
|
|
5632
5722
|
});
|
|
@@ -6124,7 +6214,14 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6124
6214
|
hasFunctionCall = true;
|
|
6125
6215
|
controller.enqueue({
|
|
6126
6216
|
type: "tool-input-end",
|
|
6127
|
-
id: value.item.call_id
|
|
6217
|
+
id: value.item.call_id,
|
|
6218
|
+
...value.item.namespace != null && {
|
|
6219
|
+
providerMetadata: {
|
|
6220
|
+
[providerOptionsName]: {
|
|
6221
|
+
namespace: value.item.namespace
|
|
6222
|
+
}
|
|
6223
|
+
}
|
|
6224
|
+
}
|
|
6128
6225
|
});
|
|
6129
6226
|
controller.enqueue({
|
|
6130
6227
|
type: "tool-call",
|
|
@@ -6133,7 +6230,10 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6133
6230
|
input: value.item.arguments,
|
|
6134
6231
|
providerMetadata: {
|
|
6135
6232
|
[providerOptionsName]: {
|
|
6136
|
-
itemId: value.item.id
|
|
6233
|
+
itemId: value.item.id,
|
|
6234
|
+
...value.item.namespace != null && {
|
|
6235
|
+
namespace: value.item.namespace
|
|
6236
|
+
}
|
|
6137
6237
|
}
|
|
6138
6238
|
}
|
|
6139
6239
|
});
|
|
@@ -6833,6 +6933,9 @@ export {
|
|
|
6833
6933
|
modelMaxImagesPerCall,
|
|
6834
6934
|
openAITranscriptionModelOptions,
|
|
6835
6935
|
openaiEmbeddingModelOptions,
|
|
6936
|
+
openaiImageModelEditOptions,
|
|
6937
|
+
openaiImageModelGenerationOptions,
|
|
6938
|
+
openaiImageModelOptions,
|
|
6836
6939
|
openaiLanguageModelChatOptions,
|
|
6837
6940
|
openaiLanguageModelCompletionOptions,
|
|
6838
6941
|
openaiSpeechModelOptionsSchema,
|