@ai-sdk/openai 4.0.19 → 4.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.ts +60 -3
- package/dist/index.js +1081 -872
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +66 -2
- package/dist/internal/index.js +1216 -1009
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +62 -0
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/internal/index.ts +1 -0
- package/src/openai-tools.ts +7 -0
- package/src/responses/convert-to-openai-responses-input.ts +86 -0
- package/src/responses/openai-responses-api.ts +63 -1
- package/src/responses/openai-responses-language-model.ts +103 -0
- package/src/responses/openai-responses-prepare-tools.ts +20 -2
- package/src/tool/programmatic-tool-calling.ts +57 -0
package/dist/internal/index.js
CHANGED
|
@@ -3069,7 +3069,7 @@ import {
|
|
|
3069
3069
|
resolveProviderReference as resolveProviderReference2,
|
|
3070
3070
|
validateTypes
|
|
3071
3071
|
} from "@ai-sdk/provider-utils";
|
|
3072
|
-
import { z as
|
|
3072
|
+
import { z as z19 } from "zod/v4";
|
|
3073
3073
|
|
|
3074
3074
|
// src/tool/apply-patch.ts
|
|
3075
3075
|
import {
|
|
@@ -3381,10 +3381,44 @@ var toolSearchToolFactory = createProviderDefinedToolFactoryWithOutputSchema5({
|
|
|
3381
3381
|
outputSchema: toolSearchOutputSchema
|
|
3382
3382
|
});
|
|
3383
3383
|
|
|
3384
|
+
// src/tool/programmatic-tool-calling.ts
|
|
3385
|
+
import {
|
|
3386
|
+
createProviderExecutedToolFactory,
|
|
3387
|
+
lazySchema as lazySchema17,
|
|
3388
|
+
zodSchema as zodSchema17
|
|
3389
|
+
} from "@ai-sdk/provider-utils";
|
|
3390
|
+
import { z as z18 } from "zod/v4";
|
|
3391
|
+
var programmaticToolCallingInputSchema = lazySchema17(
|
|
3392
|
+
() => zodSchema17(
|
|
3393
|
+
z18.object({
|
|
3394
|
+
code: z18.string(),
|
|
3395
|
+
fingerprint: z18.string()
|
|
3396
|
+
})
|
|
3397
|
+
)
|
|
3398
|
+
);
|
|
3399
|
+
var programmaticToolCallingOutputSchema = lazySchema17(
|
|
3400
|
+
() => zodSchema17(
|
|
3401
|
+
z18.object({
|
|
3402
|
+
result: z18.string(),
|
|
3403
|
+
status: z18.enum(["completed", "incomplete"])
|
|
3404
|
+
})
|
|
3405
|
+
)
|
|
3406
|
+
);
|
|
3407
|
+
var programmaticToolCallingFactory = createProviderExecutedToolFactory({
|
|
3408
|
+
id: "openai.programmatic_tool_calling",
|
|
3409
|
+
inputSchema: programmaticToolCallingInputSchema,
|
|
3410
|
+
outputSchema: programmaticToolCallingOutputSchema,
|
|
3411
|
+
supportsDeferredResults: true
|
|
3412
|
+
});
|
|
3413
|
+
var programmaticToolCalling = () => programmaticToolCallingFactory({});
|
|
3414
|
+
|
|
3384
3415
|
// src/responses/convert-to-openai-responses-input.ts
|
|
3385
3416
|
function serializeToolCallArguments2(input) {
|
|
3386
3417
|
return JSON.stringify(input === void 0 ? {} : input);
|
|
3387
3418
|
}
|
|
3419
|
+
function mapToolCaller(caller) {
|
|
3420
|
+
return caller == null ? void 0 : caller.type === "program" ? { type: "program", caller_id: caller.callerId } : caller;
|
|
3421
|
+
}
|
|
3388
3422
|
function getPromptCacheBreakpoint2(providerOptions, providerOptionsName) {
|
|
3389
3423
|
var _a;
|
|
3390
3424
|
return (_a = providerOptions == null ? void 0 : providerOptions[providerOptionsName]) == null ? void 0 : _a.promptCacheBreakpoint;
|
|
@@ -3409,7 +3443,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3409
3443
|
hasComputerTool = false,
|
|
3410
3444
|
customProviderToolNames
|
|
3411
3445
|
}) {
|
|
3412
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
3446
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
3413
3447
|
let input = [];
|
|
3414
3448
|
const warnings = [];
|
|
3415
3449
|
const processedApprovalIds = /* @__PURE__ */ new Set();
|
|
@@ -3595,6 +3629,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3595
3629
|
case "tool-call": {
|
|
3596
3630
|
const id = (_f = (_c = (_b = part.providerOptions) == null ? void 0 : _b[providerOptionsName]) == null ? void 0 : _c.itemId) != null ? _f : (_e = (_d = part.providerMetadata) == null ? void 0 : _d[providerOptionsName]) == null ? void 0 : _e.itemId;
|
|
3597
3631
|
const namespace = (_k = (_h = (_g = part.providerOptions) == null ? void 0 : _g[providerOptionsName]) == null ? void 0 : _h.namespace) != null ? _k : (_j = (_i = part.providerMetadata) == null ? void 0 : _i[providerOptionsName]) == null ? void 0 : _j.namespace;
|
|
3632
|
+
const caller = (_m = (_l = part.providerOptions) == null ? void 0 : _l[providerOptionsName]) == null ? void 0 : _m.caller;
|
|
3598
3633
|
if (hasConversation && id != null) {
|
|
3599
3634
|
break;
|
|
3600
3635
|
}
|
|
@@ -3618,12 +3653,30 @@ async function convertToOpenAIResponsesInput({
|
|
|
3618
3653
|
type: "tool_search_call",
|
|
3619
3654
|
id: id != null ? id : part.toolCallId,
|
|
3620
3655
|
execution,
|
|
3621
|
-
call_id: (
|
|
3656
|
+
call_id: (_n = parsedInput.call_id) != null ? _n : null,
|
|
3622
3657
|
status: "completed",
|
|
3623
3658
|
arguments: parsedInput.arguments
|
|
3624
3659
|
});
|
|
3625
3660
|
break;
|
|
3626
3661
|
}
|
|
3662
|
+
if (resolvedToolName === "programmatic_tool_calling") {
|
|
3663
|
+
if (store && id != null) {
|
|
3664
|
+
input.push({ type: "item_reference", id });
|
|
3665
|
+
break;
|
|
3666
|
+
}
|
|
3667
|
+
const parsedInput = await validateTypes({
|
|
3668
|
+
value: part.input,
|
|
3669
|
+
schema: programmaticToolCallingInputSchema
|
|
3670
|
+
});
|
|
3671
|
+
input.push({
|
|
3672
|
+
type: "program",
|
|
3673
|
+
id: id != null ? id : part.toolCallId,
|
|
3674
|
+
call_id: part.toolCallId,
|
|
3675
|
+
code: parsedInput.code,
|
|
3676
|
+
fingerprint: parsedInput.fingerprint
|
|
3677
|
+
});
|
|
3678
|
+
break;
|
|
3679
|
+
}
|
|
3627
3680
|
if (part.providerExecuted) {
|
|
3628
3681
|
if (store && id != null) {
|
|
3629
3682
|
input.push({ type: "item_reference", id });
|
|
@@ -3633,7 +3686,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3633
3686
|
if (hasPreviousResponseId && store && id != null) {
|
|
3634
3687
|
break;
|
|
3635
3688
|
}
|
|
3636
|
-
const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || hasComputerTool && resolvedToolName === "computer" || ((
|
|
3689
|
+
const isProviderDefinedToolCall = hasLocalShellTool && resolvedToolName === "local_shell" || hasShellTool && resolvedToolName === "shell" || hasApplyPatchTool && resolvedToolName === "apply_patch" || hasComputerTool && resolvedToolName === "computer" || ((_o = customProviderToolNames == null ? void 0 : customProviderToolNames.has(resolvedToolName)) != null ? _o : false);
|
|
3637
3690
|
if (store && id != null && isProviderDefinedToolCall) {
|
|
3638
3691
|
input.push({ type: "item_reference", id });
|
|
3639
3692
|
break;
|
|
@@ -3752,7 +3805,10 @@ async function convertToOpenAIResponsesInput({
|
|
|
3752
3805
|
call_id: part.toolCallId,
|
|
3753
3806
|
name: resolvedToolName,
|
|
3754
3807
|
arguments: serializeToolCallArguments2(part.input),
|
|
3755
|
-
...namespace != null && { namespace }
|
|
3808
|
+
...namespace != null && { namespace },
|
|
3809
|
+
...caller != null && {
|
|
3810
|
+
caller: mapToolCaller(caller)
|
|
3811
|
+
}
|
|
3756
3812
|
});
|
|
3757
3813
|
break;
|
|
3758
3814
|
}
|
|
@@ -3768,7 +3824,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3768
3824
|
part.toolName
|
|
3769
3825
|
);
|
|
3770
3826
|
if (resolvedResultToolName === "tool_search") {
|
|
3771
|
-
const itemId = (
|
|
3827
|
+
const itemId = (_u = (_t = (_q = (_p = part.providerOptions) == null ? void 0 : _p[providerOptionsName]) == null ? void 0 : _q.itemId) != null ? _t : (_s = (_r = part.providerMetadata) == null ? void 0 : _r[providerOptionsName]) == null ? void 0 : _s.itemId) != null ? _u : part.toolCallId;
|
|
3772
3828
|
if (store) {
|
|
3773
3829
|
input.push({ type: "item_reference", id: itemId });
|
|
3774
3830
|
} else if (part.output.type === "json") {
|
|
@@ -3787,6 +3843,25 @@ async function convertToOpenAIResponsesInput({
|
|
|
3787
3843
|
}
|
|
3788
3844
|
break;
|
|
3789
3845
|
}
|
|
3846
|
+
if (resolvedResultToolName === "programmatic_tool_calling") {
|
|
3847
|
+
const itemId = (_A = (_z = (_w = (_v = part.providerOptions) == null ? void 0 : _v[providerOptionsName]) == null ? void 0 : _w.itemId) != null ? _z : (_y = (_x = part.providerMetadata) == null ? void 0 : _x[providerOptionsName]) == null ? void 0 : _y.itemId) != null ? _A : part.toolCallId;
|
|
3848
|
+
if (store) {
|
|
3849
|
+
input.push({ type: "item_reference", id: itemId });
|
|
3850
|
+
} else if (part.output.type === "json") {
|
|
3851
|
+
const parsedOutput = await validateTypes({
|
|
3852
|
+
value: part.output.value,
|
|
3853
|
+
schema: programmaticToolCallingOutputSchema
|
|
3854
|
+
});
|
|
3855
|
+
input.push({
|
|
3856
|
+
type: "program_output",
|
|
3857
|
+
id: itemId,
|
|
3858
|
+
call_id: part.toolCallId,
|
|
3859
|
+
result: parsedOutput.result,
|
|
3860
|
+
status: parsedOutput.status
|
|
3861
|
+
});
|
|
3862
|
+
}
|
|
3863
|
+
break;
|
|
3864
|
+
}
|
|
3790
3865
|
if (hasShellTool && resolvedResultToolName === "shell") {
|
|
3791
3866
|
if (part.output.type === "json") {
|
|
3792
3867
|
const parsedOutput = await validateTypes({
|
|
@@ -3809,7 +3884,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3809
3884
|
break;
|
|
3810
3885
|
}
|
|
3811
3886
|
if (store) {
|
|
3812
|
-
const itemId = (
|
|
3887
|
+
const itemId = (_D = (_C = (_B = part.providerOptions) == null ? void 0 : _B[providerOptionsName]) == null ? void 0 : _C.itemId) != null ? _D : part.toolCallId;
|
|
3813
3888
|
input.push({ type: "item_reference", id: itemId });
|
|
3814
3889
|
} else {
|
|
3815
3890
|
warnings.push({
|
|
@@ -3894,7 +3969,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3894
3969
|
}
|
|
3895
3970
|
case "custom": {
|
|
3896
3971
|
if (part.kind === "openai.compaction") {
|
|
3897
|
-
const providerOptions2 = (
|
|
3972
|
+
const providerOptions2 = (_E = part.providerOptions) == null ? void 0 : _E[providerOptionsName];
|
|
3898
3973
|
const id = providerOptions2 == null ? void 0 : providerOptions2.itemId;
|
|
3899
3974
|
if (hasConversation && id != null) {
|
|
3900
3975
|
break;
|
|
@@ -3941,7 +4016,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
3941
4016
|
}
|
|
3942
4017
|
const output = part.output;
|
|
3943
4018
|
if (output.type === "execution-denied") {
|
|
3944
|
-
const approvalId = (
|
|
4019
|
+
const approvalId = (_G = (_F = output.providerOptions) == null ? void 0 : _F.openai) == null ? void 0 : _G.approvalId;
|
|
3945
4020
|
if (approvalId) {
|
|
3946
4021
|
continue;
|
|
3947
4022
|
}
|
|
@@ -4021,7 +4096,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4021
4096
|
file_id: parsedOutput.output.fileId,
|
|
4022
4097
|
detail: parsedOutput.output.detail
|
|
4023
4098
|
},
|
|
4024
|
-
acknowledged_safety_checks: (
|
|
4099
|
+
acknowledged_safety_checks: (_H = parsedOutput.acknowledgedSafetyChecks) == null ? void 0 : _H.map((safetyCheck) => ({
|
|
4025
4100
|
id: safetyCheck.id,
|
|
4026
4101
|
code: safetyCheck.code,
|
|
4027
4102
|
message: safetyCheck.message
|
|
@@ -4037,7 +4112,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4037
4112
|
outputValue = output.value;
|
|
4038
4113
|
break;
|
|
4039
4114
|
case "execution-denied":
|
|
4040
|
-
outputValue = (
|
|
4115
|
+
outputValue = (_I = output.reason) != null ? _I : "Tool call execution denied.";
|
|
4041
4116
|
break;
|
|
4042
4117
|
case "json":
|
|
4043
4118
|
case "error-json":
|
|
@@ -4136,7 +4211,7 @@ async function convertToOpenAIResponsesInput({
|
|
|
4136
4211
|
contentValue = output.value;
|
|
4137
4212
|
break;
|
|
4138
4213
|
case "execution-denied":
|
|
4139
|
-
contentValue = (
|
|
4214
|
+
contentValue = (_J = output.reason) != null ? _J : "Tool call execution denied.";
|
|
4140
4215
|
break;
|
|
4141
4216
|
case "json":
|
|
4142
4217
|
case "error-json":
|
|
@@ -4221,10 +4296,14 @@ async function convertToOpenAIResponsesInput({
|
|
|
4221
4296
|
}).filter(isNonNullable);
|
|
4222
4297
|
break;
|
|
4223
4298
|
}
|
|
4299
|
+
const caller = mapToolCaller(
|
|
4300
|
+
(_L = (_K = part.providerOptions) == null ? void 0 : _K[providerOptionsName]) == null ? void 0 : _L.caller
|
|
4301
|
+
);
|
|
4224
4302
|
input.push({
|
|
4225
4303
|
type: "function_call_output",
|
|
4226
4304
|
call_id: part.toolCallId,
|
|
4227
|
-
output: contentValue
|
|
4305
|
+
output: contentValue,
|
|
4306
|
+
...caller != null && { caller }
|
|
4228
4307
|
});
|
|
4229
4308
|
}
|
|
4230
4309
|
break;
|
|
@@ -4248,9 +4327,9 @@ async function convertToOpenAIResponsesInput({
|
|
|
4248
4327
|
}
|
|
4249
4328
|
return { input, warnings };
|
|
4250
4329
|
}
|
|
4251
|
-
var openaiResponsesReasoningProviderOptionsSchema =
|
|
4252
|
-
itemId:
|
|
4253
|
-
reasoningEncryptedContent:
|
|
4330
|
+
var openaiResponsesReasoningProviderOptionsSchema = z19.object({
|
|
4331
|
+
itemId: z19.string().nullish(),
|
|
4332
|
+
reasoningEncryptedContent: z19.string().nullish()
|
|
4254
4333
|
});
|
|
4255
4334
|
|
|
4256
4335
|
// src/responses/map-openai-responses-finish-reason.ts
|
|
@@ -4273,643 +4352,670 @@ function mapOpenAIResponseFinishReason({
|
|
|
4273
4352
|
|
|
4274
4353
|
// src/responses/openai-responses-api.ts
|
|
4275
4354
|
import {
|
|
4276
|
-
lazySchema as
|
|
4277
|
-
zodSchema as
|
|
4355
|
+
lazySchema as lazySchema18,
|
|
4356
|
+
zodSchema as zodSchema18
|
|
4278
4357
|
} from "@ai-sdk/provider-utils";
|
|
4279
|
-
import { z as
|
|
4280
|
-
var jsonValueSchema =
|
|
4281
|
-
() =>
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4358
|
+
import { z as z20 } from "zod/v4";
|
|
4359
|
+
var jsonValueSchema = z20.lazy(
|
|
4360
|
+
() => z20.union([
|
|
4361
|
+
z20.string(),
|
|
4362
|
+
z20.number(),
|
|
4363
|
+
z20.boolean(),
|
|
4364
|
+
z20.null(),
|
|
4365
|
+
z20.array(jsonValueSchema),
|
|
4366
|
+
z20.record(z20.string(), jsonValueSchema.optional())
|
|
4288
4367
|
])
|
|
4289
4368
|
);
|
|
4290
|
-
var openaiResponsesComputerSafetyCheckSchema =
|
|
4291
|
-
id:
|
|
4292
|
-
code:
|
|
4293
|
-
message:
|
|
4369
|
+
var openaiResponsesComputerSafetyCheckSchema = z20.object({
|
|
4370
|
+
id: z20.string(),
|
|
4371
|
+
code: z20.string().nullish(),
|
|
4372
|
+
message: z20.string().nullish()
|
|
4294
4373
|
});
|
|
4295
|
-
var openaiResponsesComputerActionSchema =
|
|
4296
|
-
|
|
4297
|
-
type:
|
|
4298
|
-
button:
|
|
4299
|
-
x:
|
|
4300
|
-
y:
|
|
4301
|
-
keys:
|
|
4374
|
+
var openaiResponsesComputerActionSchema = z20.discriminatedUnion("type", [
|
|
4375
|
+
z20.object({
|
|
4376
|
+
type: z20.literal("click"),
|
|
4377
|
+
button: z20.enum(["left", "right", "wheel", "back", "forward"]),
|
|
4378
|
+
x: z20.number(),
|
|
4379
|
+
y: z20.number(),
|
|
4380
|
+
keys: z20.array(z20.string()).nullish()
|
|
4302
4381
|
}),
|
|
4303
|
-
|
|
4304
|
-
type:
|
|
4305
|
-
x:
|
|
4306
|
-
y:
|
|
4307
|
-
keys:
|
|
4382
|
+
z20.object({
|
|
4383
|
+
type: z20.literal("double_click"),
|
|
4384
|
+
x: z20.number(),
|
|
4385
|
+
y: z20.number(),
|
|
4386
|
+
keys: z20.array(z20.string()).nullish()
|
|
4308
4387
|
}),
|
|
4309
|
-
|
|
4310
|
-
type:
|
|
4311
|
-
path:
|
|
4312
|
-
keys:
|
|
4388
|
+
z20.object({
|
|
4389
|
+
type: z20.literal("drag"),
|
|
4390
|
+
path: z20.array(z20.object({ x: z20.number(), y: z20.number() })),
|
|
4391
|
+
keys: z20.array(z20.string()).nullish()
|
|
4313
4392
|
}),
|
|
4314
|
-
|
|
4315
|
-
type:
|
|
4316
|
-
keys:
|
|
4393
|
+
z20.object({
|
|
4394
|
+
type: z20.literal("keypress"),
|
|
4395
|
+
keys: z20.array(z20.string())
|
|
4317
4396
|
}),
|
|
4318
|
-
|
|
4319
|
-
type:
|
|
4320
|
-
x:
|
|
4321
|
-
y:
|
|
4322
|
-
keys:
|
|
4397
|
+
z20.object({
|
|
4398
|
+
type: z20.literal("move"),
|
|
4399
|
+
x: z20.number(),
|
|
4400
|
+
y: z20.number(),
|
|
4401
|
+
keys: z20.array(z20.string()).nullish()
|
|
4323
4402
|
}),
|
|
4324
|
-
|
|
4325
|
-
type:
|
|
4403
|
+
z20.object({
|
|
4404
|
+
type: z20.literal("screenshot")
|
|
4326
4405
|
}),
|
|
4327
|
-
|
|
4328
|
-
type:
|
|
4329
|
-
x:
|
|
4330
|
-
y:
|
|
4331
|
-
scroll_x:
|
|
4332
|
-
scroll_y:
|
|
4333
|
-
keys:
|
|
4406
|
+
z20.object({
|
|
4407
|
+
type: z20.literal("scroll"),
|
|
4408
|
+
x: z20.number(),
|
|
4409
|
+
y: z20.number(),
|
|
4410
|
+
scroll_x: z20.number(),
|
|
4411
|
+
scroll_y: z20.number(),
|
|
4412
|
+
keys: z20.array(z20.string()).nullish()
|
|
4334
4413
|
}),
|
|
4335
|
-
|
|
4336
|
-
type:
|
|
4337
|
-
text:
|
|
4414
|
+
z20.object({
|
|
4415
|
+
type: z20.literal("type"),
|
|
4416
|
+
text: z20.string()
|
|
4338
4417
|
}),
|
|
4339
|
-
|
|
4340
|
-
type:
|
|
4418
|
+
z20.object({
|
|
4419
|
+
type: z20.literal("wait")
|
|
4341
4420
|
})
|
|
4342
4421
|
]);
|
|
4343
|
-
var openaiResponsesComputerCallSchema =
|
|
4344
|
-
type:
|
|
4345
|
-
id:
|
|
4346
|
-
call_id:
|
|
4347
|
-
status:
|
|
4422
|
+
var openaiResponsesComputerCallSchema = z20.object({
|
|
4423
|
+
type: z20.literal("computer_call"),
|
|
4424
|
+
id: z20.string(),
|
|
4425
|
+
call_id: z20.string().nullish(),
|
|
4426
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4348
4427
|
action: openaiResponsesComputerActionSchema.nullish(),
|
|
4349
|
-
actions:
|
|
4350
|
-
pending_safety_checks:
|
|
4428
|
+
actions: z20.array(openaiResponsesComputerActionSchema).nullish(),
|
|
4429
|
+
pending_safety_checks: z20.array(openaiResponsesComputerSafetyCheckSchema).nullish()
|
|
4351
4430
|
});
|
|
4352
|
-
var
|
|
4353
|
-
type:
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
code: z19.string(),
|
|
4358
|
-
message: z19.string(),
|
|
4359
|
-
param: z19.string().nullish()
|
|
4431
|
+
var openaiResponsesToolCallerSchema = z20.discriminatedUnion("type", [
|
|
4432
|
+
z20.object({ type: z20.literal("direct") }),
|
|
4433
|
+
z20.object({
|
|
4434
|
+
type: z20.literal("program"),
|
|
4435
|
+
caller_id: z20.string()
|
|
4360
4436
|
})
|
|
4437
|
+
]);
|
|
4438
|
+
var openaiResponsesProgramSchema = z20.object({
|
|
4439
|
+
type: z20.literal("program"),
|
|
4440
|
+
id: z20.string(),
|
|
4441
|
+
call_id: z20.string(),
|
|
4442
|
+
code: z20.string(),
|
|
4443
|
+
fingerprint: z20.string()
|
|
4361
4444
|
});
|
|
4362
|
-
var
|
|
4363
|
-
type:
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4445
|
+
var openaiResponsesProgramOutputSchema = z20.object({
|
|
4446
|
+
type: z20.literal("program_output"),
|
|
4447
|
+
id: z20.string(),
|
|
4448
|
+
call_id: z20.string(),
|
|
4449
|
+
result: z20.string(),
|
|
4450
|
+
status: z20.enum(["completed", "incomplete"])
|
|
4368
4451
|
});
|
|
4369
|
-
var
|
|
4370
|
-
()
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4452
|
+
var openaiResponsesNestedErrorChunkSchema = z20.object({
|
|
4453
|
+
type: z20.literal("error"),
|
|
4454
|
+
sequence_number: z20.number(),
|
|
4455
|
+
error: z20.object({
|
|
4456
|
+
type: z20.string(),
|
|
4457
|
+
code: z20.string(),
|
|
4458
|
+
message: z20.string(),
|
|
4459
|
+
param: z20.string().nullish()
|
|
4460
|
+
})
|
|
4461
|
+
});
|
|
4462
|
+
var openaiResponsesErrorChunkSchema = z20.object({
|
|
4463
|
+
type: z20.literal("error"),
|
|
4464
|
+
sequence_number: z20.number(),
|
|
4465
|
+
code: z20.string().nullish(),
|
|
4466
|
+
message: z20.string(),
|
|
4467
|
+
param: z20.string().nullish()
|
|
4468
|
+
});
|
|
4469
|
+
var openaiResponsesChunkSchema = lazySchema18(
|
|
4470
|
+
() => zodSchema18(
|
|
4471
|
+
z20.union([
|
|
4472
|
+
z20.object({
|
|
4473
|
+
type: z20.literal("response.output_text.delta"),
|
|
4474
|
+
item_id: z20.string(),
|
|
4475
|
+
delta: z20.string(),
|
|
4476
|
+
logprobs: z20.array(
|
|
4477
|
+
z20.object({
|
|
4478
|
+
token: z20.string(),
|
|
4479
|
+
logprob: z20.number(),
|
|
4480
|
+
top_logprobs: z20.array(
|
|
4481
|
+
z20.object({
|
|
4482
|
+
token: z20.string(),
|
|
4483
|
+
logprob: z20.number()
|
|
4384
4484
|
})
|
|
4385
4485
|
)
|
|
4386
4486
|
})
|
|
4387
4487
|
).nullish()
|
|
4388
4488
|
}),
|
|
4389
|
-
|
|
4390
|
-
type:
|
|
4391
|
-
response:
|
|
4392
|
-
incomplete_details:
|
|
4393
|
-
usage:
|
|
4394
|
-
input_tokens:
|
|
4395
|
-
input_tokens_details:
|
|
4396
|
-
cached_tokens:
|
|
4397
|
-
cache_write_tokens:
|
|
4398
|
-
orchestration_input_tokens:
|
|
4399
|
-
orchestration_input_cached_tokens:
|
|
4489
|
+
z20.object({
|
|
4490
|
+
type: z20.enum(["response.completed", "response.incomplete"]),
|
|
4491
|
+
response: z20.object({
|
|
4492
|
+
incomplete_details: z20.object({ reason: z20.string() }).nullish(),
|
|
4493
|
+
usage: z20.object({
|
|
4494
|
+
input_tokens: z20.number(),
|
|
4495
|
+
input_tokens_details: z20.object({
|
|
4496
|
+
cached_tokens: z20.number().nullish(),
|
|
4497
|
+
cache_write_tokens: z20.number().nullish(),
|
|
4498
|
+
orchestration_input_tokens: z20.number().nullish(),
|
|
4499
|
+
orchestration_input_cached_tokens: z20.number().nullish()
|
|
4400
4500
|
}).nullish(),
|
|
4401
|
-
output_tokens:
|
|
4402
|
-
output_tokens_details:
|
|
4403
|
-
reasoning_tokens:
|
|
4404
|
-
orchestration_output_tokens:
|
|
4501
|
+
output_tokens: z20.number(),
|
|
4502
|
+
output_tokens_details: z20.object({
|
|
4503
|
+
reasoning_tokens: z20.number().nullish(),
|
|
4504
|
+
orchestration_output_tokens: z20.number().nullish()
|
|
4405
4505
|
}).nullish()
|
|
4406
4506
|
}),
|
|
4407
|
-
reasoning:
|
|
4408
|
-
context:
|
|
4507
|
+
reasoning: z20.object({
|
|
4508
|
+
context: z20.string().nullish()
|
|
4409
4509
|
}).nullish(),
|
|
4410
|
-
service_tier:
|
|
4510
|
+
service_tier: z20.string().nullish()
|
|
4411
4511
|
})
|
|
4412
4512
|
}),
|
|
4413
|
-
|
|
4414
|
-
type:
|
|
4415
|
-
sequence_number:
|
|
4416
|
-
response:
|
|
4417
|
-
error:
|
|
4418
|
-
code:
|
|
4419
|
-
message:
|
|
4513
|
+
z20.object({
|
|
4514
|
+
type: z20.literal("response.failed"),
|
|
4515
|
+
sequence_number: z20.number(),
|
|
4516
|
+
response: z20.object({
|
|
4517
|
+
error: z20.object({
|
|
4518
|
+
code: z20.string().nullish(),
|
|
4519
|
+
message: z20.string()
|
|
4420
4520
|
}).nullish(),
|
|
4421
|
-
incomplete_details:
|
|
4422
|
-
usage:
|
|
4423
|
-
input_tokens:
|
|
4424
|
-
input_tokens_details:
|
|
4425
|
-
cached_tokens:
|
|
4426
|
-
cache_write_tokens:
|
|
4427
|
-
orchestration_input_tokens:
|
|
4428
|
-
orchestration_input_cached_tokens:
|
|
4521
|
+
incomplete_details: z20.object({ reason: z20.string() }).nullish(),
|
|
4522
|
+
usage: z20.object({
|
|
4523
|
+
input_tokens: z20.number(),
|
|
4524
|
+
input_tokens_details: z20.object({
|
|
4525
|
+
cached_tokens: z20.number().nullish(),
|
|
4526
|
+
cache_write_tokens: z20.number().nullish(),
|
|
4527
|
+
orchestration_input_tokens: z20.number().nullish(),
|
|
4528
|
+
orchestration_input_cached_tokens: z20.number().nullish()
|
|
4429
4529
|
}).nullish(),
|
|
4430
|
-
output_tokens:
|
|
4431
|
-
output_tokens_details:
|
|
4432
|
-
reasoning_tokens:
|
|
4433
|
-
orchestration_output_tokens:
|
|
4530
|
+
output_tokens: z20.number(),
|
|
4531
|
+
output_tokens_details: z20.object({
|
|
4532
|
+
reasoning_tokens: z20.number().nullish(),
|
|
4533
|
+
orchestration_output_tokens: z20.number().nullish()
|
|
4434
4534
|
}).nullish()
|
|
4435
4535
|
}).nullish(),
|
|
4436
|
-
reasoning:
|
|
4437
|
-
context:
|
|
4536
|
+
reasoning: z20.object({
|
|
4537
|
+
context: z20.string().nullish()
|
|
4438
4538
|
}).nullish(),
|
|
4439
|
-
service_tier:
|
|
4539
|
+
service_tier: z20.string().nullish()
|
|
4440
4540
|
})
|
|
4441
4541
|
}),
|
|
4442
|
-
|
|
4443
|
-
type:
|
|
4444
|
-
response:
|
|
4445
|
-
id:
|
|
4446
|
-
created_at:
|
|
4447
|
-
model:
|
|
4448
|
-
service_tier:
|
|
4542
|
+
z20.object({
|
|
4543
|
+
type: z20.literal("response.created"),
|
|
4544
|
+
response: z20.object({
|
|
4545
|
+
id: z20.string(),
|
|
4546
|
+
created_at: z20.number(),
|
|
4547
|
+
model: z20.string(),
|
|
4548
|
+
service_tier: z20.string().nullish()
|
|
4449
4549
|
})
|
|
4450
4550
|
}),
|
|
4451
|
-
|
|
4452
|
-
type:
|
|
4453
|
-
output_index:
|
|
4454
|
-
item:
|
|
4455
|
-
|
|
4456
|
-
type:
|
|
4457
|
-
id:
|
|
4458
|
-
phase:
|
|
4551
|
+
z20.object({
|
|
4552
|
+
type: z20.literal("response.output_item.added"),
|
|
4553
|
+
output_index: z20.number(),
|
|
4554
|
+
item: z20.discriminatedUnion("type", [
|
|
4555
|
+
z20.object({
|
|
4556
|
+
type: z20.literal("message"),
|
|
4557
|
+
id: z20.string(),
|
|
4558
|
+
phase: z20.enum(["commentary", "final_answer"]).nullish()
|
|
4459
4559
|
}),
|
|
4460
|
-
|
|
4461
|
-
type:
|
|
4462
|
-
id:
|
|
4463
|
-
encrypted_content:
|
|
4560
|
+
z20.object({
|
|
4561
|
+
type: z20.literal("reasoning"),
|
|
4562
|
+
id: z20.string(),
|
|
4563
|
+
encrypted_content: z20.string().nullish()
|
|
4464
4564
|
}),
|
|
4465
|
-
|
|
4466
|
-
type:
|
|
4467
|
-
id:
|
|
4468
|
-
call_id:
|
|
4469
|
-
name:
|
|
4470
|
-
arguments:
|
|
4471
|
-
namespace:
|
|
4565
|
+
z20.object({
|
|
4566
|
+
type: z20.literal("function_call"),
|
|
4567
|
+
id: z20.string(),
|
|
4568
|
+
call_id: z20.string(),
|
|
4569
|
+
name: z20.string(),
|
|
4570
|
+
arguments: z20.string(),
|
|
4571
|
+
namespace: z20.string().nullish(),
|
|
4572
|
+
caller: openaiResponsesToolCallerSchema.nullish()
|
|
4472
4573
|
}),
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4574
|
+
openaiResponsesProgramSchema,
|
|
4575
|
+
openaiResponsesProgramOutputSchema,
|
|
4576
|
+
z20.object({
|
|
4577
|
+
type: z20.literal("web_search_call"),
|
|
4578
|
+
id: z20.string(),
|
|
4579
|
+
status: z20.string()
|
|
4477
4580
|
}),
|
|
4478
4581
|
openaiResponsesComputerCallSchema,
|
|
4479
|
-
|
|
4480
|
-
type:
|
|
4481
|
-
id:
|
|
4582
|
+
z20.object({
|
|
4583
|
+
type: z20.literal("file_search_call"),
|
|
4584
|
+
id: z20.string()
|
|
4482
4585
|
}),
|
|
4483
|
-
|
|
4484
|
-
type:
|
|
4485
|
-
id:
|
|
4586
|
+
z20.object({
|
|
4587
|
+
type: z20.literal("image_generation_call"),
|
|
4588
|
+
id: z20.string()
|
|
4486
4589
|
}),
|
|
4487
|
-
|
|
4488
|
-
type:
|
|
4489
|
-
id:
|
|
4490
|
-
container_id:
|
|
4491
|
-
code:
|
|
4492
|
-
outputs:
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4590
|
+
z20.object({
|
|
4591
|
+
type: z20.literal("code_interpreter_call"),
|
|
4592
|
+
id: z20.string(),
|
|
4593
|
+
container_id: z20.string(),
|
|
4594
|
+
code: z20.string().nullable(),
|
|
4595
|
+
outputs: z20.array(
|
|
4596
|
+
z20.discriminatedUnion("type", [
|
|
4597
|
+
z20.object({ type: z20.literal("logs"), logs: z20.string() }),
|
|
4598
|
+
z20.object({ type: z20.literal("image"), url: z20.string() })
|
|
4496
4599
|
])
|
|
4497
4600
|
).nullable(),
|
|
4498
|
-
status:
|
|
4601
|
+
status: z20.string()
|
|
4499
4602
|
}),
|
|
4500
|
-
|
|
4501
|
-
type:
|
|
4502
|
-
id:
|
|
4503
|
-
status:
|
|
4504
|
-
approval_request_id:
|
|
4603
|
+
z20.object({
|
|
4604
|
+
type: z20.literal("mcp_call"),
|
|
4605
|
+
id: z20.string(),
|
|
4606
|
+
status: z20.string(),
|
|
4607
|
+
approval_request_id: z20.string().nullish()
|
|
4505
4608
|
}),
|
|
4506
|
-
|
|
4507
|
-
type:
|
|
4508
|
-
id:
|
|
4609
|
+
z20.object({
|
|
4610
|
+
type: z20.literal("mcp_list_tools"),
|
|
4611
|
+
id: z20.string()
|
|
4509
4612
|
}),
|
|
4510
|
-
|
|
4511
|
-
type:
|
|
4512
|
-
id:
|
|
4613
|
+
z20.object({
|
|
4614
|
+
type: z20.literal("mcp_approval_request"),
|
|
4615
|
+
id: z20.string()
|
|
4513
4616
|
}),
|
|
4514
|
-
|
|
4515
|
-
type:
|
|
4516
|
-
id:
|
|
4517
|
-
call_id:
|
|
4518
|
-
status:
|
|
4519
|
-
operation:
|
|
4520
|
-
|
|
4521
|
-
type:
|
|
4522
|
-
path:
|
|
4523
|
-
diff:
|
|
4617
|
+
z20.object({
|
|
4618
|
+
type: z20.literal("apply_patch_call"),
|
|
4619
|
+
id: z20.string(),
|
|
4620
|
+
call_id: z20.string(),
|
|
4621
|
+
status: z20.enum(["in_progress", "completed"]),
|
|
4622
|
+
operation: z20.discriminatedUnion("type", [
|
|
4623
|
+
z20.object({
|
|
4624
|
+
type: z20.literal("create_file"),
|
|
4625
|
+
path: z20.string(),
|
|
4626
|
+
diff: z20.string()
|
|
4524
4627
|
}),
|
|
4525
|
-
|
|
4526
|
-
type:
|
|
4527
|
-
path:
|
|
4628
|
+
z20.object({
|
|
4629
|
+
type: z20.literal("delete_file"),
|
|
4630
|
+
path: z20.string()
|
|
4528
4631
|
}),
|
|
4529
|
-
|
|
4530
|
-
type:
|
|
4531
|
-
path:
|
|
4532
|
-
diff:
|
|
4632
|
+
z20.object({
|
|
4633
|
+
type: z20.literal("update_file"),
|
|
4634
|
+
path: z20.string(),
|
|
4635
|
+
diff: z20.string()
|
|
4533
4636
|
})
|
|
4534
4637
|
])
|
|
4535
4638
|
}),
|
|
4536
|
-
|
|
4537
|
-
type:
|
|
4538
|
-
id:
|
|
4539
|
-
call_id:
|
|
4540
|
-
name:
|
|
4541
|
-
input:
|
|
4639
|
+
z20.object({
|
|
4640
|
+
type: z20.literal("custom_tool_call"),
|
|
4641
|
+
id: z20.string(),
|
|
4642
|
+
call_id: z20.string(),
|
|
4643
|
+
name: z20.string(),
|
|
4644
|
+
input: z20.string()
|
|
4542
4645
|
}),
|
|
4543
|
-
|
|
4544
|
-
type:
|
|
4545
|
-
id:
|
|
4546
|
-
call_id:
|
|
4547
|
-
status:
|
|
4548
|
-
action:
|
|
4549
|
-
commands:
|
|
4646
|
+
z20.object({
|
|
4647
|
+
type: z20.literal("shell_call"),
|
|
4648
|
+
id: z20.string(),
|
|
4649
|
+
call_id: z20.string(),
|
|
4650
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4651
|
+
action: z20.object({
|
|
4652
|
+
commands: z20.array(z20.string())
|
|
4550
4653
|
})
|
|
4551
4654
|
}),
|
|
4552
|
-
|
|
4553
|
-
type:
|
|
4554
|
-
id:
|
|
4555
|
-
encrypted_content:
|
|
4655
|
+
z20.object({
|
|
4656
|
+
type: z20.literal("compaction"),
|
|
4657
|
+
id: z20.string(),
|
|
4658
|
+
encrypted_content: z20.string().nullish()
|
|
4556
4659
|
}),
|
|
4557
|
-
|
|
4558
|
-
type:
|
|
4559
|
-
id:
|
|
4560
|
-
call_id:
|
|
4561
|
-
status:
|
|
4562
|
-
output:
|
|
4563
|
-
|
|
4564
|
-
stdout:
|
|
4565
|
-
stderr:
|
|
4566
|
-
outcome:
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
type:
|
|
4570
|
-
exit_code:
|
|
4660
|
+
z20.object({
|
|
4661
|
+
type: z20.literal("shell_call_output"),
|
|
4662
|
+
id: z20.string(),
|
|
4663
|
+
call_id: z20.string(),
|
|
4664
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4665
|
+
output: z20.array(
|
|
4666
|
+
z20.object({
|
|
4667
|
+
stdout: z20.string(),
|
|
4668
|
+
stderr: z20.string(),
|
|
4669
|
+
outcome: z20.discriminatedUnion("type", [
|
|
4670
|
+
z20.object({ type: z20.literal("timeout") }),
|
|
4671
|
+
z20.object({
|
|
4672
|
+
type: z20.literal("exit"),
|
|
4673
|
+
exit_code: z20.number()
|
|
4571
4674
|
})
|
|
4572
4675
|
])
|
|
4573
4676
|
})
|
|
4574
4677
|
)
|
|
4575
4678
|
}),
|
|
4576
|
-
|
|
4577
|
-
type:
|
|
4578
|
-
id:
|
|
4579
|
-
execution:
|
|
4580
|
-
call_id:
|
|
4581
|
-
status:
|
|
4582
|
-
arguments:
|
|
4679
|
+
z20.object({
|
|
4680
|
+
type: z20.literal("tool_search_call"),
|
|
4681
|
+
id: z20.string(),
|
|
4682
|
+
execution: z20.enum(["server", "client"]),
|
|
4683
|
+
call_id: z20.string().nullable(),
|
|
4684
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4685
|
+
arguments: z20.unknown()
|
|
4583
4686
|
}),
|
|
4584
|
-
|
|
4585
|
-
type:
|
|
4586
|
-
id:
|
|
4587
|
-
execution:
|
|
4588
|
-
call_id:
|
|
4589
|
-
status:
|
|
4590
|
-
tools:
|
|
4687
|
+
z20.object({
|
|
4688
|
+
type: z20.literal("tool_search_output"),
|
|
4689
|
+
id: z20.string(),
|
|
4690
|
+
execution: z20.enum(["server", "client"]),
|
|
4691
|
+
call_id: z20.string().nullable(),
|
|
4692
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4693
|
+
tools: z20.array(z20.record(z20.string(), jsonValueSchema.optional()))
|
|
4591
4694
|
})
|
|
4592
4695
|
])
|
|
4593
4696
|
}),
|
|
4594
|
-
|
|
4595
|
-
type:
|
|
4596
|
-
output_index:
|
|
4597
|
-
item:
|
|
4598
|
-
|
|
4599
|
-
type:
|
|
4600
|
-
id:
|
|
4601
|
-
phase:
|
|
4697
|
+
z20.object({
|
|
4698
|
+
type: z20.literal("response.output_item.done"),
|
|
4699
|
+
output_index: z20.number(),
|
|
4700
|
+
item: z20.discriminatedUnion("type", [
|
|
4701
|
+
z20.object({
|
|
4702
|
+
type: z20.literal("message"),
|
|
4703
|
+
id: z20.string(),
|
|
4704
|
+
phase: z20.enum(["commentary", "final_answer"]).nullish()
|
|
4602
4705
|
}),
|
|
4603
|
-
|
|
4604
|
-
type:
|
|
4605
|
-
id:
|
|
4606
|
-
encrypted_content:
|
|
4706
|
+
z20.object({
|
|
4707
|
+
type: z20.literal("reasoning"),
|
|
4708
|
+
id: z20.string(),
|
|
4709
|
+
encrypted_content: z20.string().nullish()
|
|
4607
4710
|
}),
|
|
4608
|
-
|
|
4609
|
-
type:
|
|
4610
|
-
id:
|
|
4611
|
-
call_id:
|
|
4612
|
-
name:
|
|
4613
|
-
arguments:
|
|
4614
|
-
status:
|
|
4615
|
-
namespace:
|
|
4711
|
+
z20.object({
|
|
4712
|
+
type: z20.literal("function_call"),
|
|
4713
|
+
id: z20.string(),
|
|
4714
|
+
call_id: z20.string(),
|
|
4715
|
+
name: z20.string(),
|
|
4716
|
+
arguments: z20.string(),
|
|
4717
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4718
|
+
namespace: z20.string().nullish(),
|
|
4719
|
+
caller: openaiResponsesToolCallerSchema.nullish()
|
|
4616
4720
|
}),
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4721
|
+
openaiResponsesProgramSchema,
|
|
4722
|
+
openaiResponsesProgramOutputSchema,
|
|
4723
|
+
z20.object({
|
|
4724
|
+
type: z20.literal("custom_tool_call"),
|
|
4725
|
+
id: z20.string(),
|
|
4726
|
+
call_id: z20.string(),
|
|
4727
|
+
name: z20.string(),
|
|
4728
|
+
input: z20.string(),
|
|
4729
|
+
status: z20.literal("completed")
|
|
4624
4730
|
}),
|
|
4625
|
-
|
|
4626
|
-
type:
|
|
4627
|
-
id:
|
|
4628
|
-
code:
|
|
4629
|
-
container_id:
|
|
4630
|
-
outputs:
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4731
|
+
z20.object({
|
|
4732
|
+
type: z20.literal("code_interpreter_call"),
|
|
4733
|
+
id: z20.string(),
|
|
4734
|
+
code: z20.string().nullable(),
|
|
4735
|
+
container_id: z20.string(),
|
|
4736
|
+
outputs: z20.array(
|
|
4737
|
+
z20.discriminatedUnion("type", [
|
|
4738
|
+
z20.object({ type: z20.literal("logs"), logs: z20.string() }),
|
|
4739
|
+
z20.object({ type: z20.literal("image"), url: z20.string() })
|
|
4634
4740
|
])
|
|
4635
4741
|
).nullable()
|
|
4636
4742
|
}),
|
|
4637
|
-
|
|
4638
|
-
type:
|
|
4639
|
-
id:
|
|
4640
|
-
result:
|
|
4743
|
+
z20.object({
|
|
4744
|
+
type: z20.literal("image_generation_call"),
|
|
4745
|
+
id: z20.string(),
|
|
4746
|
+
result: z20.string()
|
|
4641
4747
|
}),
|
|
4642
|
-
|
|
4643
|
-
type:
|
|
4644
|
-
id:
|
|
4645
|
-
status:
|
|
4646
|
-
action:
|
|
4647
|
-
|
|
4648
|
-
type:
|
|
4649
|
-
query:
|
|
4650
|
-
queries:
|
|
4651
|
-
sources:
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4748
|
+
z20.object({
|
|
4749
|
+
type: z20.literal("web_search_call"),
|
|
4750
|
+
id: z20.string(),
|
|
4751
|
+
status: z20.string(),
|
|
4752
|
+
action: z20.discriminatedUnion("type", [
|
|
4753
|
+
z20.object({
|
|
4754
|
+
type: z20.literal("search"),
|
|
4755
|
+
query: z20.string().nullish(),
|
|
4756
|
+
queries: z20.array(z20.string()).nullish(),
|
|
4757
|
+
sources: z20.array(
|
|
4758
|
+
z20.discriminatedUnion("type", [
|
|
4759
|
+
z20.object({ type: z20.literal("url"), url: z20.string() }),
|
|
4760
|
+
z20.object({ type: z20.literal("api"), name: z20.string() })
|
|
4655
4761
|
])
|
|
4656
4762
|
).nullish()
|
|
4657
4763
|
}),
|
|
4658
|
-
|
|
4659
|
-
type:
|
|
4660
|
-
url:
|
|
4764
|
+
z20.object({
|
|
4765
|
+
type: z20.literal("open_page"),
|
|
4766
|
+
url: z20.string().nullish()
|
|
4661
4767
|
}),
|
|
4662
|
-
|
|
4663
|
-
type:
|
|
4664
|
-
url:
|
|
4665
|
-
pattern:
|
|
4768
|
+
z20.object({
|
|
4769
|
+
type: z20.literal("find_in_page"),
|
|
4770
|
+
url: z20.string().nullish(),
|
|
4771
|
+
pattern: z20.string().nullish()
|
|
4666
4772
|
})
|
|
4667
4773
|
]).nullish()
|
|
4668
4774
|
}),
|
|
4669
|
-
|
|
4670
|
-
type:
|
|
4671
|
-
id:
|
|
4672
|
-
queries:
|
|
4673
|
-
results:
|
|
4674
|
-
|
|
4675
|
-
attributes:
|
|
4676
|
-
|
|
4677
|
-
|
|
4775
|
+
z20.object({
|
|
4776
|
+
type: z20.literal("file_search_call"),
|
|
4777
|
+
id: z20.string(),
|
|
4778
|
+
queries: z20.array(z20.string()),
|
|
4779
|
+
results: z20.array(
|
|
4780
|
+
z20.object({
|
|
4781
|
+
attributes: z20.record(
|
|
4782
|
+
z20.string(),
|
|
4783
|
+
z20.union([z20.string(), z20.number(), z20.boolean()])
|
|
4678
4784
|
),
|
|
4679
|
-
file_id:
|
|
4680
|
-
filename:
|
|
4681
|
-
score:
|
|
4682
|
-
text:
|
|
4785
|
+
file_id: z20.string(),
|
|
4786
|
+
filename: z20.string(),
|
|
4787
|
+
score: z20.number(),
|
|
4788
|
+
text: z20.string()
|
|
4683
4789
|
})
|
|
4684
4790
|
).nullish()
|
|
4685
4791
|
}),
|
|
4686
|
-
|
|
4687
|
-
type:
|
|
4688
|
-
id:
|
|
4689
|
-
call_id:
|
|
4690
|
-
action:
|
|
4691
|
-
type:
|
|
4692
|
-
command:
|
|
4693
|
-
timeout_ms:
|
|
4694
|
-
user:
|
|
4695
|
-
working_directory:
|
|
4696
|
-
env:
|
|
4792
|
+
z20.object({
|
|
4793
|
+
type: z20.literal("local_shell_call"),
|
|
4794
|
+
id: z20.string(),
|
|
4795
|
+
call_id: z20.string(),
|
|
4796
|
+
action: z20.object({
|
|
4797
|
+
type: z20.literal("exec"),
|
|
4798
|
+
command: z20.array(z20.string()),
|
|
4799
|
+
timeout_ms: z20.number().optional(),
|
|
4800
|
+
user: z20.string().optional(),
|
|
4801
|
+
working_directory: z20.string().optional(),
|
|
4802
|
+
env: z20.record(z20.string(), z20.string()).optional()
|
|
4697
4803
|
})
|
|
4698
4804
|
}),
|
|
4699
4805
|
openaiResponsesComputerCallSchema,
|
|
4700
|
-
|
|
4701
|
-
type:
|
|
4702
|
-
id:
|
|
4703
|
-
status:
|
|
4704
|
-
arguments:
|
|
4705
|
-
name:
|
|
4706
|
-
server_label:
|
|
4707
|
-
output:
|
|
4708
|
-
error:
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
type:
|
|
4712
|
-
code:
|
|
4713
|
-
message:
|
|
4806
|
+
z20.object({
|
|
4807
|
+
type: z20.literal("mcp_call"),
|
|
4808
|
+
id: z20.string(),
|
|
4809
|
+
status: z20.string(),
|
|
4810
|
+
arguments: z20.string(),
|
|
4811
|
+
name: z20.string(),
|
|
4812
|
+
server_label: z20.string(),
|
|
4813
|
+
output: z20.string().nullish(),
|
|
4814
|
+
error: z20.union([
|
|
4815
|
+
z20.string(),
|
|
4816
|
+
z20.object({
|
|
4817
|
+
type: z20.string().optional(),
|
|
4818
|
+
code: z20.union([z20.number(), z20.string()]).optional(),
|
|
4819
|
+
message: z20.string().optional()
|
|
4714
4820
|
}).loose()
|
|
4715
4821
|
]).nullish(),
|
|
4716
|
-
approval_request_id:
|
|
4822
|
+
approval_request_id: z20.string().nullish()
|
|
4717
4823
|
}),
|
|
4718
|
-
|
|
4719
|
-
type:
|
|
4720
|
-
id:
|
|
4721
|
-
server_label:
|
|
4722
|
-
tools:
|
|
4723
|
-
|
|
4724
|
-
name:
|
|
4725
|
-
description:
|
|
4726
|
-
input_schema:
|
|
4727
|
-
annotations:
|
|
4824
|
+
z20.object({
|
|
4825
|
+
type: z20.literal("mcp_list_tools"),
|
|
4826
|
+
id: z20.string(),
|
|
4827
|
+
server_label: z20.string(),
|
|
4828
|
+
tools: z20.array(
|
|
4829
|
+
z20.object({
|
|
4830
|
+
name: z20.string(),
|
|
4831
|
+
description: z20.string().optional(),
|
|
4832
|
+
input_schema: z20.any(),
|
|
4833
|
+
annotations: z20.record(z20.string(), z20.unknown()).optional()
|
|
4728
4834
|
})
|
|
4729
4835
|
),
|
|
4730
|
-
error:
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
type:
|
|
4734
|
-
code:
|
|
4735
|
-
message:
|
|
4836
|
+
error: z20.union([
|
|
4837
|
+
z20.string(),
|
|
4838
|
+
z20.object({
|
|
4839
|
+
type: z20.string().optional(),
|
|
4840
|
+
code: z20.union([z20.number(), z20.string()]).optional(),
|
|
4841
|
+
message: z20.string().optional()
|
|
4736
4842
|
}).loose()
|
|
4737
4843
|
]).optional()
|
|
4738
4844
|
}),
|
|
4739
|
-
|
|
4740
|
-
type:
|
|
4741
|
-
id:
|
|
4742
|
-
server_label:
|
|
4743
|
-
name:
|
|
4744
|
-
arguments:
|
|
4745
|
-
approval_request_id:
|
|
4845
|
+
z20.object({
|
|
4846
|
+
type: z20.literal("mcp_approval_request"),
|
|
4847
|
+
id: z20.string(),
|
|
4848
|
+
server_label: z20.string(),
|
|
4849
|
+
name: z20.string(),
|
|
4850
|
+
arguments: z20.string(),
|
|
4851
|
+
approval_request_id: z20.string().optional()
|
|
4746
4852
|
}),
|
|
4747
|
-
|
|
4748
|
-
type:
|
|
4749
|
-
id:
|
|
4750
|
-
call_id:
|
|
4751
|
-
status:
|
|
4752
|
-
operation:
|
|
4753
|
-
|
|
4754
|
-
type:
|
|
4755
|
-
path:
|
|
4756
|
-
diff:
|
|
4853
|
+
z20.object({
|
|
4854
|
+
type: z20.literal("apply_patch_call"),
|
|
4855
|
+
id: z20.string(),
|
|
4856
|
+
call_id: z20.string(),
|
|
4857
|
+
status: z20.enum(["in_progress", "completed"]),
|
|
4858
|
+
operation: z20.discriminatedUnion("type", [
|
|
4859
|
+
z20.object({
|
|
4860
|
+
type: z20.literal("create_file"),
|
|
4861
|
+
path: z20.string(),
|
|
4862
|
+
diff: z20.string()
|
|
4757
4863
|
}),
|
|
4758
|
-
|
|
4759
|
-
type:
|
|
4760
|
-
path:
|
|
4864
|
+
z20.object({
|
|
4865
|
+
type: z20.literal("delete_file"),
|
|
4866
|
+
path: z20.string()
|
|
4761
4867
|
}),
|
|
4762
|
-
|
|
4763
|
-
type:
|
|
4764
|
-
path:
|
|
4765
|
-
diff:
|
|
4868
|
+
z20.object({
|
|
4869
|
+
type: z20.literal("update_file"),
|
|
4870
|
+
path: z20.string(),
|
|
4871
|
+
diff: z20.string()
|
|
4766
4872
|
})
|
|
4767
4873
|
])
|
|
4768
4874
|
}),
|
|
4769
|
-
|
|
4770
|
-
type:
|
|
4771
|
-
id:
|
|
4772
|
-
call_id:
|
|
4773
|
-
status:
|
|
4774
|
-
action:
|
|
4775
|
-
commands:
|
|
4875
|
+
z20.object({
|
|
4876
|
+
type: z20.literal("shell_call"),
|
|
4877
|
+
id: z20.string(),
|
|
4878
|
+
call_id: z20.string(),
|
|
4879
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4880
|
+
action: z20.object({
|
|
4881
|
+
commands: z20.array(z20.string())
|
|
4776
4882
|
})
|
|
4777
4883
|
}),
|
|
4778
|
-
|
|
4779
|
-
type:
|
|
4780
|
-
id:
|
|
4781
|
-
encrypted_content:
|
|
4884
|
+
z20.object({
|
|
4885
|
+
type: z20.literal("compaction"),
|
|
4886
|
+
id: z20.string(),
|
|
4887
|
+
encrypted_content: z20.string()
|
|
4782
4888
|
}),
|
|
4783
|
-
|
|
4784
|
-
type:
|
|
4785
|
-
id:
|
|
4786
|
-
call_id:
|
|
4787
|
-
status:
|
|
4788
|
-
output:
|
|
4789
|
-
|
|
4790
|
-
stdout:
|
|
4791
|
-
stderr:
|
|
4792
|
-
outcome:
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
type:
|
|
4796
|
-
exit_code:
|
|
4889
|
+
z20.object({
|
|
4890
|
+
type: z20.literal("shell_call_output"),
|
|
4891
|
+
id: z20.string(),
|
|
4892
|
+
call_id: z20.string(),
|
|
4893
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4894
|
+
output: z20.array(
|
|
4895
|
+
z20.object({
|
|
4896
|
+
stdout: z20.string(),
|
|
4897
|
+
stderr: z20.string(),
|
|
4898
|
+
outcome: z20.discriminatedUnion("type", [
|
|
4899
|
+
z20.object({ type: z20.literal("timeout") }),
|
|
4900
|
+
z20.object({
|
|
4901
|
+
type: z20.literal("exit"),
|
|
4902
|
+
exit_code: z20.number()
|
|
4797
4903
|
})
|
|
4798
4904
|
])
|
|
4799
4905
|
})
|
|
4800
4906
|
)
|
|
4801
4907
|
}),
|
|
4802
|
-
|
|
4803
|
-
type:
|
|
4804
|
-
id:
|
|
4805
|
-
execution:
|
|
4806
|
-
call_id:
|
|
4807
|
-
status:
|
|
4808
|
-
arguments:
|
|
4908
|
+
z20.object({
|
|
4909
|
+
type: z20.literal("tool_search_call"),
|
|
4910
|
+
id: z20.string(),
|
|
4911
|
+
execution: z20.enum(["server", "client"]),
|
|
4912
|
+
call_id: z20.string().nullable(),
|
|
4913
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4914
|
+
arguments: z20.unknown()
|
|
4809
4915
|
}),
|
|
4810
|
-
|
|
4811
|
-
type:
|
|
4812
|
-
id:
|
|
4813
|
-
execution:
|
|
4814
|
-
call_id:
|
|
4815
|
-
status:
|
|
4816
|
-
tools:
|
|
4916
|
+
z20.object({
|
|
4917
|
+
type: z20.literal("tool_search_output"),
|
|
4918
|
+
id: z20.string(),
|
|
4919
|
+
execution: z20.enum(["server", "client"]),
|
|
4920
|
+
call_id: z20.string().nullable(),
|
|
4921
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
4922
|
+
tools: z20.array(z20.record(z20.string(), jsonValueSchema.optional()))
|
|
4817
4923
|
})
|
|
4818
4924
|
])
|
|
4819
4925
|
}),
|
|
4820
|
-
|
|
4821
|
-
type:
|
|
4822
|
-
item_id:
|
|
4823
|
-
output_index:
|
|
4824
|
-
delta:
|
|
4926
|
+
z20.object({
|
|
4927
|
+
type: z20.literal("response.function_call_arguments.delta"),
|
|
4928
|
+
item_id: z20.string(),
|
|
4929
|
+
output_index: z20.number(),
|
|
4930
|
+
delta: z20.string()
|
|
4825
4931
|
}),
|
|
4826
|
-
|
|
4827
|
-
type:
|
|
4828
|
-
item_id:
|
|
4829
|
-
output_index:
|
|
4830
|
-
delta:
|
|
4932
|
+
z20.object({
|
|
4933
|
+
type: z20.literal("response.custom_tool_call_input.delta"),
|
|
4934
|
+
item_id: z20.string(),
|
|
4935
|
+
output_index: z20.number(),
|
|
4936
|
+
delta: z20.string()
|
|
4831
4937
|
}),
|
|
4832
|
-
|
|
4833
|
-
type:
|
|
4834
|
-
item_id:
|
|
4835
|
-
output_index:
|
|
4836
|
-
partial_image_b64:
|
|
4938
|
+
z20.object({
|
|
4939
|
+
type: z20.literal("response.image_generation_call.partial_image"),
|
|
4940
|
+
item_id: z20.string(),
|
|
4941
|
+
output_index: z20.number(),
|
|
4942
|
+
partial_image_b64: z20.string()
|
|
4837
4943
|
}),
|
|
4838
|
-
|
|
4839
|
-
type:
|
|
4840
|
-
item_id:
|
|
4841
|
-
output_index:
|
|
4842
|
-
delta:
|
|
4944
|
+
z20.object({
|
|
4945
|
+
type: z20.literal("response.code_interpreter_call_code.delta"),
|
|
4946
|
+
item_id: z20.string(),
|
|
4947
|
+
output_index: z20.number(),
|
|
4948
|
+
delta: z20.string()
|
|
4843
4949
|
}),
|
|
4844
|
-
|
|
4845
|
-
type:
|
|
4846
|
-
item_id:
|
|
4847
|
-
output_index:
|
|
4848
|
-
code:
|
|
4950
|
+
z20.object({
|
|
4951
|
+
type: z20.literal("response.code_interpreter_call_code.done"),
|
|
4952
|
+
item_id: z20.string(),
|
|
4953
|
+
output_index: z20.number(),
|
|
4954
|
+
code: z20.string()
|
|
4849
4955
|
}),
|
|
4850
|
-
|
|
4851
|
-
type:
|
|
4852
|
-
annotation:
|
|
4853
|
-
|
|
4854
|
-
type:
|
|
4855
|
-
start_index:
|
|
4856
|
-
end_index:
|
|
4857
|
-
url:
|
|
4858
|
-
title:
|
|
4956
|
+
z20.object({
|
|
4957
|
+
type: z20.literal("response.output_text.annotation.added"),
|
|
4958
|
+
annotation: z20.discriminatedUnion("type", [
|
|
4959
|
+
z20.object({
|
|
4960
|
+
type: z20.literal("url_citation"),
|
|
4961
|
+
start_index: z20.number(),
|
|
4962
|
+
end_index: z20.number(),
|
|
4963
|
+
url: z20.string(),
|
|
4964
|
+
title: z20.string()
|
|
4859
4965
|
}),
|
|
4860
|
-
|
|
4861
|
-
type:
|
|
4862
|
-
file_id:
|
|
4863
|
-
filename:
|
|
4864
|
-
index:
|
|
4966
|
+
z20.object({
|
|
4967
|
+
type: z20.literal("file_citation"),
|
|
4968
|
+
file_id: z20.string(),
|
|
4969
|
+
filename: z20.string(),
|
|
4970
|
+
index: z20.number()
|
|
4865
4971
|
}),
|
|
4866
|
-
|
|
4867
|
-
type:
|
|
4868
|
-
container_id:
|
|
4869
|
-
file_id:
|
|
4870
|
-
filename:
|
|
4871
|
-
start_index:
|
|
4872
|
-
end_index:
|
|
4972
|
+
z20.object({
|
|
4973
|
+
type: z20.literal("container_file_citation"),
|
|
4974
|
+
container_id: z20.string(),
|
|
4975
|
+
file_id: z20.string(),
|
|
4976
|
+
filename: z20.string(),
|
|
4977
|
+
start_index: z20.number(),
|
|
4978
|
+
end_index: z20.number()
|
|
4873
4979
|
}),
|
|
4874
|
-
|
|
4875
|
-
type:
|
|
4876
|
-
file_id:
|
|
4877
|
-
index:
|
|
4980
|
+
z20.object({
|
|
4981
|
+
type: z20.literal("file_path"),
|
|
4982
|
+
file_id: z20.string(),
|
|
4983
|
+
index: z20.number()
|
|
4878
4984
|
})
|
|
4879
4985
|
])
|
|
4880
4986
|
}),
|
|
4881
|
-
|
|
4882
|
-
type:
|
|
4883
|
-
item_id:
|
|
4884
|
-
summary_index:
|
|
4987
|
+
z20.object({
|
|
4988
|
+
type: z20.literal("response.reasoning_summary_part.added"),
|
|
4989
|
+
item_id: z20.string(),
|
|
4990
|
+
summary_index: z20.number()
|
|
4885
4991
|
}),
|
|
4886
|
-
|
|
4887
|
-
type:
|
|
4888
|
-
item_id:
|
|
4889
|
-
summary_index:
|
|
4890
|
-
delta:
|
|
4992
|
+
z20.object({
|
|
4993
|
+
type: z20.literal("response.reasoning_summary_text.delta"),
|
|
4994
|
+
item_id: z20.string(),
|
|
4995
|
+
summary_index: z20.number(),
|
|
4996
|
+
delta: z20.string()
|
|
4891
4997
|
}),
|
|
4892
|
-
|
|
4893
|
-
type:
|
|
4894
|
-
item_id:
|
|
4895
|
-
summary_index:
|
|
4998
|
+
z20.object({
|
|
4999
|
+
type: z20.literal("response.reasoning_summary_part.done"),
|
|
5000
|
+
item_id: z20.string(),
|
|
5001
|
+
summary_index: z20.number()
|
|
4896
5002
|
}),
|
|
4897
|
-
|
|
4898
|
-
type:
|
|
4899
|
-
item_id:
|
|
4900
|
-
output_index:
|
|
4901
|
-
delta:
|
|
4902
|
-
obfuscation:
|
|
5003
|
+
z20.object({
|
|
5004
|
+
type: z20.literal("response.apply_patch_call_operation_diff.delta"),
|
|
5005
|
+
item_id: z20.string(),
|
|
5006
|
+
output_index: z20.number(),
|
|
5007
|
+
delta: z20.string(),
|
|
5008
|
+
obfuscation: z20.string().nullish()
|
|
4903
5009
|
}),
|
|
4904
|
-
|
|
4905
|
-
type:
|
|
4906
|
-
item_id:
|
|
4907
|
-
output_index:
|
|
4908
|
-
diff:
|
|
5010
|
+
z20.object({
|
|
5011
|
+
type: z20.literal("response.apply_patch_call_operation_diff.done"),
|
|
5012
|
+
item_id: z20.string(),
|
|
5013
|
+
output_index: z20.number(),
|
|
5014
|
+
diff: z20.string()
|
|
4909
5015
|
}),
|
|
4910
5016
|
openaiResponsesNestedErrorChunkSchema,
|
|
4911
5017
|
openaiResponsesErrorChunkSchema,
|
|
4912
|
-
|
|
5018
|
+
z20.object({ type: z20.string() }).loose().transform((value) => ({
|
|
4913
5019
|
type: "unknown_chunk",
|
|
4914
5020
|
message: value.type
|
|
4915
5021
|
}))
|
|
@@ -4917,315 +5023,318 @@ var openaiResponsesChunkSchema = lazySchema17(
|
|
|
4917
5023
|
])
|
|
4918
5024
|
)
|
|
4919
5025
|
);
|
|
4920
|
-
var openaiResponsesResponseSchema =
|
|
4921
|
-
() =>
|
|
4922
|
-
|
|
4923
|
-
id:
|
|
4924
|
-
created_at:
|
|
4925
|
-
error:
|
|
4926
|
-
message:
|
|
4927
|
-
type:
|
|
4928
|
-
param:
|
|
4929
|
-
code:
|
|
5026
|
+
var openaiResponsesResponseSchema = lazySchema18(
|
|
5027
|
+
() => zodSchema18(
|
|
5028
|
+
z20.object({
|
|
5029
|
+
id: z20.string().optional(),
|
|
5030
|
+
created_at: z20.number().optional(),
|
|
5031
|
+
error: z20.object({
|
|
5032
|
+
message: z20.string(),
|
|
5033
|
+
type: z20.string(),
|
|
5034
|
+
param: z20.string().nullish(),
|
|
5035
|
+
code: z20.string()
|
|
4930
5036
|
}).nullish(),
|
|
4931
|
-
model:
|
|
4932
|
-
output:
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
type:
|
|
4936
|
-
role:
|
|
4937
|
-
id:
|
|
4938
|
-
phase:
|
|
4939
|
-
content:
|
|
4940
|
-
|
|
4941
|
-
type:
|
|
4942
|
-
text:
|
|
4943
|
-
logprobs:
|
|
4944
|
-
|
|
4945
|
-
token:
|
|
4946
|
-
logprob:
|
|
4947
|
-
top_logprobs:
|
|
4948
|
-
|
|
4949
|
-
token:
|
|
4950
|
-
logprob:
|
|
5037
|
+
model: z20.string().optional(),
|
|
5038
|
+
output: z20.array(
|
|
5039
|
+
z20.discriminatedUnion("type", [
|
|
5040
|
+
z20.object({
|
|
5041
|
+
type: z20.literal("message"),
|
|
5042
|
+
role: z20.literal("assistant"),
|
|
5043
|
+
id: z20.string(),
|
|
5044
|
+
phase: z20.enum(["commentary", "final_answer"]).nullish(),
|
|
5045
|
+
content: z20.array(
|
|
5046
|
+
z20.object({
|
|
5047
|
+
type: z20.literal("output_text"),
|
|
5048
|
+
text: z20.string(),
|
|
5049
|
+
logprobs: z20.array(
|
|
5050
|
+
z20.object({
|
|
5051
|
+
token: z20.string(),
|
|
5052
|
+
logprob: z20.number(),
|
|
5053
|
+
top_logprobs: z20.array(
|
|
5054
|
+
z20.object({
|
|
5055
|
+
token: z20.string(),
|
|
5056
|
+
logprob: z20.number()
|
|
4951
5057
|
})
|
|
4952
5058
|
)
|
|
4953
5059
|
})
|
|
4954
5060
|
).nullish(),
|
|
4955
|
-
annotations:
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
type:
|
|
4959
|
-
start_index:
|
|
4960
|
-
end_index:
|
|
4961
|
-
url:
|
|
4962
|
-
title:
|
|
5061
|
+
annotations: z20.array(
|
|
5062
|
+
z20.discriminatedUnion("type", [
|
|
5063
|
+
z20.object({
|
|
5064
|
+
type: z20.literal("url_citation"),
|
|
5065
|
+
start_index: z20.number(),
|
|
5066
|
+
end_index: z20.number(),
|
|
5067
|
+
url: z20.string(),
|
|
5068
|
+
title: z20.string()
|
|
4963
5069
|
}),
|
|
4964
|
-
|
|
4965
|
-
type:
|
|
4966
|
-
file_id:
|
|
4967
|
-
filename:
|
|
4968
|
-
index:
|
|
5070
|
+
z20.object({
|
|
5071
|
+
type: z20.literal("file_citation"),
|
|
5072
|
+
file_id: z20.string(),
|
|
5073
|
+
filename: z20.string(),
|
|
5074
|
+
index: z20.number()
|
|
4969
5075
|
}),
|
|
4970
|
-
|
|
4971
|
-
type:
|
|
4972
|
-
container_id:
|
|
4973
|
-
file_id:
|
|
4974
|
-
filename:
|
|
4975
|
-
start_index:
|
|
4976
|
-
end_index:
|
|
5076
|
+
z20.object({
|
|
5077
|
+
type: z20.literal("container_file_citation"),
|
|
5078
|
+
container_id: z20.string(),
|
|
5079
|
+
file_id: z20.string(),
|
|
5080
|
+
filename: z20.string(),
|
|
5081
|
+
start_index: z20.number(),
|
|
5082
|
+
end_index: z20.number()
|
|
4977
5083
|
}),
|
|
4978
|
-
|
|
4979
|
-
type:
|
|
4980
|
-
file_id:
|
|
4981
|
-
index:
|
|
5084
|
+
z20.object({
|
|
5085
|
+
type: z20.literal("file_path"),
|
|
5086
|
+
file_id: z20.string(),
|
|
5087
|
+
index: z20.number()
|
|
4982
5088
|
})
|
|
4983
5089
|
])
|
|
4984
5090
|
)
|
|
4985
5091
|
})
|
|
4986
5092
|
)
|
|
4987
5093
|
}),
|
|
4988
|
-
|
|
4989
|
-
type:
|
|
4990
|
-
id:
|
|
4991
|
-
status:
|
|
4992
|
-
action:
|
|
4993
|
-
|
|
4994
|
-
type:
|
|
4995
|
-
query:
|
|
4996
|
-
queries:
|
|
4997
|
-
sources:
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
type:
|
|
5002
|
-
name:
|
|
5094
|
+
z20.object({
|
|
5095
|
+
type: z20.literal("web_search_call"),
|
|
5096
|
+
id: z20.string(),
|
|
5097
|
+
status: z20.string(),
|
|
5098
|
+
action: z20.discriminatedUnion("type", [
|
|
5099
|
+
z20.object({
|
|
5100
|
+
type: z20.literal("search"),
|
|
5101
|
+
query: z20.string().nullish(),
|
|
5102
|
+
queries: z20.array(z20.string()).nullish(),
|
|
5103
|
+
sources: z20.array(
|
|
5104
|
+
z20.discriminatedUnion("type", [
|
|
5105
|
+
z20.object({ type: z20.literal("url"), url: z20.string() }),
|
|
5106
|
+
z20.object({
|
|
5107
|
+
type: z20.literal("api"),
|
|
5108
|
+
name: z20.string()
|
|
5003
5109
|
})
|
|
5004
5110
|
])
|
|
5005
5111
|
).nullish()
|
|
5006
5112
|
}),
|
|
5007
|
-
|
|
5008
|
-
type:
|
|
5009
|
-
url:
|
|
5113
|
+
z20.object({
|
|
5114
|
+
type: z20.literal("open_page"),
|
|
5115
|
+
url: z20.string().nullish()
|
|
5010
5116
|
}),
|
|
5011
|
-
|
|
5012
|
-
type:
|
|
5013
|
-
url:
|
|
5014
|
-
pattern:
|
|
5117
|
+
z20.object({
|
|
5118
|
+
type: z20.literal("find_in_page"),
|
|
5119
|
+
url: z20.string().nullish(),
|
|
5120
|
+
pattern: z20.string().nullish()
|
|
5015
5121
|
})
|
|
5016
5122
|
]).nullish()
|
|
5017
5123
|
}),
|
|
5018
|
-
|
|
5019
|
-
type:
|
|
5020
|
-
id:
|
|
5021
|
-
queries:
|
|
5022
|
-
results:
|
|
5023
|
-
|
|
5024
|
-
attributes:
|
|
5025
|
-
|
|
5026
|
-
|
|
5124
|
+
z20.object({
|
|
5125
|
+
type: z20.literal("file_search_call"),
|
|
5126
|
+
id: z20.string(),
|
|
5127
|
+
queries: z20.array(z20.string()),
|
|
5128
|
+
results: z20.array(
|
|
5129
|
+
z20.object({
|
|
5130
|
+
attributes: z20.record(
|
|
5131
|
+
z20.string(),
|
|
5132
|
+
z20.union([z20.string(), z20.number(), z20.boolean()])
|
|
5027
5133
|
),
|
|
5028
|
-
file_id:
|
|
5029
|
-
filename:
|
|
5030
|
-
score:
|
|
5031
|
-
text:
|
|
5134
|
+
file_id: z20.string(),
|
|
5135
|
+
filename: z20.string(),
|
|
5136
|
+
score: z20.number(),
|
|
5137
|
+
text: z20.string()
|
|
5032
5138
|
})
|
|
5033
5139
|
).nullish()
|
|
5034
5140
|
}),
|
|
5035
|
-
|
|
5036
|
-
type:
|
|
5037
|
-
id:
|
|
5038
|
-
code:
|
|
5039
|
-
container_id:
|
|
5040
|
-
outputs:
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5141
|
+
z20.object({
|
|
5142
|
+
type: z20.literal("code_interpreter_call"),
|
|
5143
|
+
id: z20.string(),
|
|
5144
|
+
code: z20.string().nullable(),
|
|
5145
|
+
container_id: z20.string(),
|
|
5146
|
+
outputs: z20.array(
|
|
5147
|
+
z20.discriminatedUnion("type", [
|
|
5148
|
+
z20.object({ type: z20.literal("logs"), logs: z20.string() }),
|
|
5149
|
+
z20.object({ type: z20.literal("image"), url: z20.string() })
|
|
5044
5150
|
])
|
|
5045
5151
|
).nullable()
|
|
5046
5152
|
}),
|
|
5047
|
-
|
|
5048
|
-
type:
|
|
5049
|
-
id:
|
|
5050
|
-
result:
|
|
5153
|
+
z20.object({
|
|
5154
|
+
type: z20.literal("image_generation_call"),
|
|
5155
|
+
id: z20.string(),
|
|
5156
|
+
result: z20.string()
|
|
5051
5157
|
}),
|
|
5052
|
-
|
|
5053
|
-
type:
|
|
5054
|
-
id:
|
|
5055
|
-
call_id:
|
|
5056
|
-
action:
|
|
5057
|
-
type:
|
|
5058
|
-
command:
|
|
5059
|
-
timeout_ms:
|
|
5060
|
-
user:
|
|
5061
|
-
working_directory:
|
|
5062
|
-
env:
|
|
5158
|
+
z20.object({
|
|
5159
|
+
type: z20.literal("local_shell_call"),
|
|
5160
|
+
id: z20.string(),
|
|
5161
|
+
call_id: z20.string(),
|
|
5162
|
+
action: z20.object({
|
|
5163
|
+
type: z20.literal("exec"),
|
|
5164
|
+
command: z20.array(z20.string()),
|
|
5165
|
+
timeout_ms: z20.number().optional(),
|
|
5166
|
+
user: z20.string().optional(),
|
|
5167
|
+
working_directory: z20.string().optional(),
|
|
5168
|
+
env: z20.record(z20.string(), z20.string()).optional()
|
|
5063
5169
|
})
|
|
5064
5170
|
}),
|
|
5065
|
-
|
|
5066
|
-
type:
|
|
5067
|
-
call_id:
|
|
5068
|
-
name:
|
|
5069
|
-
arguments:
|
|
5070
|
-
id:
|
|
5071
|
-
namespace:
|
|
5171
|
+
z20.object({
|
|
5172
|
+
type: z20.literal("function_call"),
|
|
5173
|
+
call_id: z20.string(),
|
|
5174
|
+
name: z20.string(),
|
|
5175
|
+
arguments: z20.string(),
|
|
5176
|
+
id: z20.string(),
|
|
5177
|
+
namespace: z20.string().nullish(),
|
|
5178
|
+
caller: openaiResponsesToolCallerSchema.nullish()
|
|
5072
5179
|
}),
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5180
|
+
openaiResponsesProgramSchema,
|
|
5181
|
+
openaiResponsesProgramOutputSchema,
|
|
5182
|
+
z20.object({
|
|
5183
|
+
type: z20.literal("custom_tool_call"),
|
|
5184
|
+
call_id: z20.string(),
|
|
5185
|
+
name: z20.string(),
|
|
5186
|
+
input: z20.string(),
|
|
5187
|
+
id: z20.string()
|
|
5079
5188
|
}),
|
|
5080
5189
|
openaiResponsesComputerCallSchema,
|
|
5081
|
-
|
|
5082
|
-
type:
|
|
5083
|
-
id:
|
|
5084
|
-
encrypted_content:
|
|
5085
|
-
summary:
|
|
5086
|
-
|
|
5087
|
-
type:
|
|
5088
|
-
text:
|
|
5190
|
+
z20.object({
|
|
5191
|
+
type: z20.literal("reasoning"),
|
|
5192
|
+
id: z20.string(),
|
|
5193
|
+
encrypted_content: z20.string().nullish(),
|
|
5194
|
+
summary: z20.array(
|
|
5195
|
+
z20.object({
|
|
5196
|
+
type: z20.literal("summary_text"),
|
|
5197
|
+
text: z20.string()
|
|
5089
5198
|
})
|
|
5090
5199
|
)
|
|
5091
5200
|
}),
|
|
5092
|
-
|
|
5093
|
-
type:
|
|
5094
|
-
id:
|
|
5095
|
-
status:
|
|
5096
|
-
arguments:
|
|
5097
|
-
name:
|
|
5098
|
-
server_label:
|
|
5099
|
-
output:
|
|
5100
|
-
error:
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
type:
|
|
5104
|
-
code:
|
|
5105
|
-
message:
|
|
5201
|
+
z20.object({
|
|
5202
|
+
type: z20.literal("mcp_call"),
|
|
5203
|
+
id: z20.string(),
|
|
5204
|
+
status: z20.string(),
|
|
5205
|
+
arguments: z20.string(),
|
|
5206
|
+
name: z20.string(),
|
|
5207
|
+
server_label: z20.string(),
|
|
5208
|
+
output: z20.string().nullish(),
|
|
5209
|
+
error: z20.union([
|
|
5210
|
+
z20.string(),
|
|
5211
|
+
z20.object({
|
|
5212
|
+
type: z20.string().optional(),
|
|
5213
|
+
code: z20.union([z20.number(), z20.string()]).optional(),
|
|
5214
|
+
message: z20.string().optional()
|
|
5106
5215
|
}).loose()
|
|
5107
5216
|
]).nullish(),
|
|
5108
|
-
approval_request_id:
|
|
5217
|
+
approval_request_id: z20.string().nullish()
|
|
5109
5218
|
}),
|
|
5110
|
-
|
|
5111
|
-
type:
|
|
5112
|
-
id:
|
|
5113
|
-
server_label:
|
|
5114
|
-
tools:
|
|
5115
|
-
|
|
5116
|
-
name:
|
|
5117
|
-
description:
|
|
5118
|
-
input_schema:
|
|
5119
|
-
annotations:
|
|
5219
|
+
z20.object({
|
|
5220
|
+
type: z20.literal("mcp_list_tools"),
|
|
5221
|
+
id: z20.string(),
|
|
5222
|
+
server_label: z20.string(),
|
|
5223
|
+
tools: z20.array(
|
|
5224
|
+
z20.object({
|
|
5225
|
+
name: z20.string(),
|
|
5226
|
+
description: z20.string().optional(),
|
|
5227
|
+
input_schema: z20.any(),
|
|
5228
|
+
annotations: z20.record(z20.string(), z20.unknown()).optional()
|
|
5120
5229
|
})
|
|
5121
5230
|
),
|
|
5122
|
-
error:
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
type:
|
|
5126
|
-
code:
|
|
5127
|
-
message:
|
|
5231
|
+
error: z20.union([
|
|
5232
|
+
z20.string(),
|
|
5233
|
+
z20.object({
|
|
5234
|
+
type: z20.string().optional(),
|
|
5235
|
+
code: z20.union([z20.number(), z20.string()]).optional(),
|
|
5236
|
+
message: z20.string().optional()
|
|
5128
5237
|
}).loose()
|
|
5129
5238
|
]).optional()
|
|
5130
5239
|
}),
|
|
5131
|
-
|
|
5132
|
-
type:
|
|
5133
|
-
id:
|
|
5134
|
-
server_label:
|
|
5135
|
-
name:
|
|
5136
|
-
arguments:
|
|
5137
|
-
approval_request_id:
|
|
5240
|
+
z20.object({
|
|
5241
|
+
type: z20.literal("mcp_approval_request"),
|
|
5242
|
+
id: z20.string(),
|
|
5243
|
+
server_label: z20.string(),
|
|
5244
|
+
name: z20.string(),
|
|
5245
|
+
arguments: z20.string(),
|
|
5246
|
+
approval_request_id: z20.string().optional()
|
|
5138
5247
|
}),
|
|
5139
|
-
|
|
5140
|
-
type:
|
|
5141
|
-
id:
|
|
5142
|
-
call_id:
|
|
5143
|
-
status:
|
|
5144
|
-
operation:
|
|
5145
|
-
|
|
5146
|
-
type:
|
|
5147
|
-
path:
|
|
5148
|
-
diff:
|
|
5248
|
+
z20.object({
|
|
5249
|
+
type: z20.literal("apply_patch_call"),
|
|
5250
|
+
id: z20.string(),
|
|
5251
|
+
call_id: z20.string(),
|
|
5252
|
+
status: z20.enum(["in_progress", "completed"]),
|
|
5253
|
+
operation: z20.discriminatedUnion("type", [
|
|
5254
|
+
z20.object({
|
|
5255
|
+
type: z20.literal("create_file"),
|
|
5256
|
+
path: z20.string(),
|
|
5257
|
+
diff: z20.string()
|
|
5149
5258
|
}),
|
|
5150
|
-
|
|
5151
|
-
type:
|
|
5152
|
-
path:
|
|
5259
|
+
z20.object({
|
|
5260
|
+
type: z20.literal("delete_file"),
|
|
5261
|
+
path: z20.string()
|
|
5153
5262
|
}),
|
|
5154
|
-
|
|
5155
|
-
type:
|
|
5156
|
-
path:
|
|
5157
|
-
diff:
|
|
5263
|
+
z20.object({
|
|
5264
|
+
type: z20.literal("update_file"),
|
|
5265
|
+
path: z20.string(),
|
|
5266
|
+
diff: z20.string()
|
|
5158
5267
|
})
|
|
5159
5268
|
])
|
|
5160
5269
|
}),
|
|
5161
|
-
|
|
5162
|
-
type:
|
|
5163
|
-
id:
|
|
5164
|
-
call_id:
|
|
5165
|
-
status:
|
|
5166
|
-
action:
|
|
5167
|
-
commands:
|
|
5270
|
+
z20.object({
|
|
5271
|
+
type: z20.literal("shell_call"),
|
|
5272
|
+
id: z20.string(),
|
|
5273
|
+
call_id: z20.string(),
|
|
5274
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
5275
|
+
action: z20.object({
|
|
5276
|
+
commands: z20.array(z20.string())
|
|
5168
5277
|
})
|
|
5169
5278
|
}),
|
|
5170
|
-
|
|
5171
|
-
type:
|
|
5172
|
-
id:
|
|
5173
|
-
encrypted_content:
|
|
5279
|
+
z20.object({
|
|
5280
|
+
type: z20.literal("compaction"),
|
|
5281
|
+
id: z20.string(),
|
|
5282
|
+
encrypted_content: z20.string()
|
|
5174
5283
|
}),
|
|
5175
|
-
|
|
5176
|
-
type:
|
|
5177
|
-
id:
|
|
5178
|
-
call_id:
|
|
5179
|
-
status:
|
|
5180
|
-
output:
|
|
5181
|
-
|
|
5182
|
-
stdout:
|
|
5183
|
-
stderr:
|
|
5184
|
-
outcome:
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
type:
|
|
5188
|
-
exit_code:
|
|
5284
|
+
z20.object({
|
|
5285
|
+
type: z20.literal("shell_call_output"),
|
|
5286
|
+
id: z20.string(),
|
|
5287
|
+
call_id: z20.string(),
|
|
5288
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
5289
|
+
output: z20.array(
|
|
5290
|
+
z20.object({
|
|
5291
|
+
stdout: z20.string(),
|
|
5292
|
+
stderr: z20.string(),
|
|
5293
|
+
outcome: z20.discriminatedUnion("type", [
|
|
5294
|
+
z20.object({ type: z20.literal("timeout") }),
|
|
5295
|
+
z20.object({
|
|
5296
|
+
type: z20.literal("exit"),
|
|
5297
|
+
exit_code: z20.number()
|
|
5189
5298
|
})
|
|
5190
5299
|
])
|
|
5191
5300
|
})
|
|
5192
5301
|
)
|
|
5193
5302
|
}),
|
|
5194
|
-
|
|
5195
|
-
type:
|
|
5196
|
-
id:
|
|
5197
|
-
execution:
|
|
5198
|
-
call_id:
|
|
5199
|
-
status:
|
|
5200
|
-
arguments:
|
|
5303
|
+
z20.object({
|
|
5304
|
+
type: z20.literal("tool_search_call"),
|
|
5305
|
+
id: z20.string(),
|
|
5306
|
+
execution: z20.enum(["server", "client"]),
|
|
5307
|
+
call_id: z20.string().nullable(),
|
|
5308
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
5309
|
+
arguments: z20.unknown()
|
|
5201
5310
|
}),
|
|
5202
|
-
|
|
5203
|
-
type:
|
|
5204
|
-
id:
|
|
5205
|
-
execution:
|
|
5206
|
-
call_id:
|
|
5207
|
-
status:
|
|
5208
|
-
tools:
|
|
5311
|
+
z20.object({
|
|
5312
|
+
type: z20.literal("tool_search_output"),
|
|
5313
|
+
id: z20.string(),
|
|
5314
|
+
execution: z20.enum(["server", "client"]),
|
|
5315
|
+
call_id: z20.string().nullable(),
|
|
5316
|
+
status: z20.enum(["in_progress", "completed", "incomplete"]),
|
|
5317
|
+
tools: z20.array(z20.record(z20.string(), jsonValueSchema.optional()))
|
|
5209
5318
|
})
|
|
5210
5319
|
])
|
|
5211
5320
|
).optional(),
|
|
5212
|
-
service_tier:
|
|
5213
|
-
reasoning:
|
|
5214
|
-
context:
|
|
5321
|
+
service_tier: z20.string().nullish(),
|
|
5322
|
+
reasoning: z20.object({
|
|
5323
|
+
context: z20.string().nullish()
|
|
5215
5324
|
}).nullish(),
|
|
5216
|
-
incomplete_details:
|
|
5217
|
-
usage:
|
|
5218
|
-
input_tokens:
|
|
5219
|
-
input_tokens_details:
|
|
5220
|
-
cached_tokens:
|
|
5221
|
-
cache_write_tokens:
|
|
5222
|
-
orchestration_input_tokens:
|
|
5223
|
-
orchestration_input_cached_tokens:
|
|
5325
|
+
incomplete_details: z20.object({ reason: z20.string() }).nullish(),
|
|
5326
|
+
usage: z20.object({
|
|
5327
|
+
input_tokens: z20.number(),
|
|
5328
|
+
input_tokens_details: z20.object({
|
|
5329
|
+
cached_tokens: z20.number().nullish(),
|
|
5330
|
+
cache_write_tokens: z20.number().nullish(),
|
|
5331
|
+
orchestration_input_tokens: z20.number().nullish(),
|
|
5332
|
+
orchestration_input_cached_tokens: z20.number().nullish()
|
|
5224
5333
|
}).nullish(),
|
|
5225
|
-
output_tokens:
|
|
5226
|
-
output_tokens_details:
|
|
5227
|
-
reasoning_tokens:
|
|
5228
|
-
orchestration_output_tokens:
|
|
5334
|
+
output_tokens: z20.number(),
|
|
5335
|
+
output_tokens_details: z20.object({
|
|
5336
|
+
reasoning_tokens: z20.number().nullish(),
|
|
5337
|
+
orchestration_output_tokens: z20.number().nullish()
|
|
5229
5338
|
}).nullish()
|
|
5230
5339
|
}).optional()
|
|
5231
5340
|
})
|
|
@@ -5234,10 +5343,10 @@ var openaiResponsesResponseSchema = lazySchema17(
|
|
|
5234
5343
|
|
|
5235
5344
|
// src/responses/openai-responses-language-model-options.ts
|
|
5236
5345
|
import {
|
|
5237
|
-
lazySchema as
|
|
5238
|
-
zodSchema as
|
|
5346
|
+
lazySchema as lazySchema19,
|
|
5347
|
+
zodSchema as zodSchema19
|
|
5239
5348
|
} from "@ai-sdk/provider-utils";
|
|
5240
|
-
import { z as
|
|
5349
|
+
import { z as z21 } from "zod/v4";
|
|
5241
5350
|
var TOP_LOGPROBS_MAX = 20;
|
|
5242
5351
|
var openaiResponsesReasoningModelIds = [
|
|
5243
5352
|
"o1",
|
|
@@ -5308,9 +5417,9 @@ var openaiResponsesModelIds = [
|
|
|
5308
5417
|
"gpt-5-chat-latest",
|
|
5309
5418
|
...openaiResponsesReasoningModelIds
|
|
5310
5419
|
];
|
|
5311
|
-
var openaiLanguageModelResponsesOptionsSchema =
|
|
5312
|
-
() =>
|
|
5313
|
-
|
|
5420
|
+
var openaiLanguageModelResponsesOptionsSchema = lazySchema19(
|
|
5421
|
+
() => zodSchema19(
|
|
5422
|
+
z21.object({
|
|
5314
5423
|
/**
|
|
5315
5424
|
* The ID of the OpenAI Conversation to continue.
|
|
5316
5425
|
* You must create a conversation first via the OpenAI API.
|
|
@@ -5318,13 +5427,13 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5318
5427
|
* Defaults to `undefined`.
|
|
5319
5428
|
* @see https://platform.openai.com/docs/api-reference/conversations/create
|
|
5320
5429
|
*/
|
|
5321
|
-
conversation:
|
|
5430
|
+
conversation: z21.string().nullish(),
|
|
5322
5431
|
/**
|
|
5323
5432
|
* The set of extra fields to include in the response (advanced, usually not needed).
|
|
5324
5433
|
* Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'web_search_call.results', 'message.output_text.logprobs'.
|
|
5325
5434
|
*/
|
|
5326
|
-
include:
|
|
5327
|
-
|
|
5435
|
+
include: z21.array(
|
|
5436
|
+
z21.enum([
|
|
5328
5437
|
"reasoning.encrypted_content",
|
|
5329
5438
|
// handled internally by default, only needed for unknown reasoning models
|
|
5330
5439
|
"file_search_call.results",
|
|
@@ -5337,7 +5446,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5337
5446
|
* They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
|
|
5338
5447
|
* Defaults to `undefined`.
|
|
5339
5448
|
*/
|
|
5340
|
-
instructions:
|
|
5449
|
+
instructions: z21.string().nullish(),
|
|
5341
5450
|
/**
|
|
5342
5451
|
* Return the log probabilities of the tokens. Including logprobs will increase
|
|
5343
5452
|
* the response size and can slow down response times. However, it can
|
|
@@ -5352,38 +5461,38 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5352
5461
|
* @see https://platform.openai.com/docs/api-reference/responses/create
|
|
5353
5462
|
* @see https://cookbook.openai.com/examples/using_logprobs
|
|
5354
5463
|
*/
|
|
5355
|
-
logprobs:
|
|
5464
|
+
logprobs: z21.union([z21.boolean(), z21.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
|
|
5356
5465
|
/**
|
|
5357
5466
|
* The maximum number of total calls to built-in tools that can be processed in a response.
|
|
5358
5467
|
* This maximum number applies across all built-in tool calls, not per individual tool.
|
|
5359
5468
|
* Any further attempts to call a tool by the model will be ignored.
|
|
5360
5469
|
*/
|
|
5361
|
-
maxToolCalls:
|
|
5470
|
+
maxToolCalls: z21.number().nullish(),
|
|
5362
5471
|
/**
|
|
5363
5472
|
* Additional metadata to store with the generation.
|
|
5364
5473
|
*/
|
|
5365
|
-
metadata:
|
|
5474
|
+
metadata: z21.any().nullish(),
|
|
5366
5475
|
/**
|
|
5367
5476
|
* Whether to use parallel tool calls. Defaults to `true`.
|
|
5368
5477
|
*/
|
|
5369
|
-
parallelToolCalls:
|
|
5478
|
+
parallelToolCalls: z21.boolean().nullish(),
|
|
5370
5479
|
/**
|
|
5371
5480
|
* The ID of the previous response. You can use it to continue a conversation.
|
|
5372
5481
|
* Defaults to `undefined`.
|
|
5373
5482
|
*/
|
|
5374
|
-
previousResponseId:
|
|
5483
|
+
previousResponseId: z21.string().nullish(),
|
|
5375
5484
|
/**
|
|
5376
5485
|
* Sets a cache key to tie this prompt to cached prefixes for better caching performance.
|
|
5377
5486
|
*/
|
|
5378
|
-
promptCacheKey:
|
|
5487
|
+
promptCacheKey: z21.string().nullish(),
|
|
5379
5488
|
/**
|
|
5380
5489
|
* Prompt cache behavior for GPT-5.6 and later models.
|
|
5381
5490
|
* `mode` controls whether OpenAI also places an implicit breakpoint.
|
|
5382
5491
|
* `ttl` sets the minimum cache lifetime and currently only supports 30 minutes.
|
|
5383
5492
|
*/
|
|
5384
|
-
promptCacheOptions:
|
|
5385
|
-
mode:
|
|
5386
|
-
ttl:
|
|
5493
|
+
promptCacheOptions: z21.object({
|
|
5494
|
+
mode: z21.enum(["implicit", "explicit"]).optional(),
|
|
5495
|
+
ttl: z21.literal("30m").optional()
|
|
5387
5496
|
}).optional(),
|
|
5388
5497
|
/**
|
|
5389
5498
|
* The retention policy for the prompt cache.
|
|
@@ -5395,35 +5504,35 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5395
5504
|
*
|
|
5396
5505
|
* @default 'in_memory'
|
|
5397
5506
|
*/
|
|
5398
|
-
promptCacheRetention:
|
|
5507
|
+
promptCacheRetention: z21.enum(["in_memory", "24h"]).nullish(),
|
|
5399
5508
|
/**
|
|
5400
5509
|
* Reasoning effort for reasoning models. Defaults to `medium`. If you use
|
|
5401
5510
|
* `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
|
|
5402
5511
|
* GPT-5.6 supports 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
|
|
5403
5512
|
* Supported values vary by model.
|
|
5404
5513
|
*/
|
|
5405
|
-
reasoningEffort:
|
|
5514
|
+
reasoningEffort: z21.string().nullish(),
|
|
5406
5515
|
/**
|
|
5407
5516
|
* Controls how much model work GPT-5.6 performs before returning a final answer.
|
|
5408
5517
|
* `standard` is the default. `pro` increases quality, latency, and token usage.
|
|
5409
5518
|
*/
|
|
5410
|
-
reasoningMode:
|
|
5519
|
+
reasoningMode: z21.enum(["standard", "pro"]).optional(),
|
|
5411
5520
|
/**
|
|
5412
5521
|
* Controls which available reasoning items GPT-5.6 can use.
|
|
5413
5522
|
* `auto` uses the model default, `current_turn` excludes reasoning from earlier
|
|
5414
5523
|
* turns, and `all_turns` makes compatible earlier reasoning available.
|
|
5415
5524
|
*/
|
|
5416
|
-
reasoningContext:
|
|
5525
|
+
reasoningContext: z21.enum(["auto", "current_turn", "all_turns"]).optional(),
|
|
5417
5526
|
/**
|
|
5418
5527
|
* Controls reasoning summary output from the model.
|
|
5419
5528
|
* Set to "auto" to automatically receive the richest level available,
|
|
5420
5529
|
* or "detailed" for comprehensive summaries.
|
|
5421
5530
|
*/
|
|
5422
|
-
reasoningSummary:
|
|
5531
|
+
reasoningSummary: z21.string().nullish(),
|
|
5423
5532
|
/**
|
|
5424
5533
|
* The identifier for safety monitoring and tracking.
|
|
5425
5534
|
*/
|
|
5426
|
-
safetyIdentifier:
|
|
5535
|
+
safetyIdentifier: z21.string().nullish(),
|
|
5427
5536
|
/**
|
|
5428
5537
|
* Service tier for the request.
|
|
5429
5538
|
* Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
|
|
@@ -5431,11 +5540,11 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5431
5540
|
*
|
|
5432
5541
|
* Defaults to 'auto'.
|
|
5433
5542
|
*/
|
|
5434
|
-
serviceTier:
|
|
5543
|
+
serviceTier: z21.enum(["auto", "flex", "priority", "default"]).nullish(),
|
|
5435
5544
|
/**
|
|
5436
5545
|
* Whether to store the generation. Defaults to `true`.
|
|
5437
5546
|
*/
|
|
5438
|
-
store:
|
|
5547
|
+
store: z21.boolean().nullish(),
|
|
5439
5548
|
/**
|
|
5440
5549
|
* Whether to pass through non-image file types as generic input files.
|
|
5441
5550
|
*
|
|
@@ -5443,30 +5552,30 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5443
5552
|
* Enable this when the target OpenAI Responses model supports additional
|
|
5444
5553
|
* file media types, such as text/csv.
|
|
5445
5554
|
*/
|
|
5446
|
-
passThroughUnsupportedFiles:
|
|
5555
|
+
passThroughUnsupportedFiles: z21.boolean().optional(),
|
|
5447
5556
|
/**
|
|
5448
5557
|
* Whether to use strict JSON schema validation.
|
|
5449
5558
|
* Defaults to `true`.
|
|
5450
5559
|
*/
|
|
5451
|
-
strictJsonSchema:
|
|
5560
|
+
strictJsonSchema: z21.boolean().nullish(),
|
|
5452
5561
|
/**
|
|
5453
5562
|
* Controls the verbosity of the model's responses. Lower values ('low') will result
|
|
5454
5563
|
* in more concise responses, while higher values ('high') will result in more verbose responses.
|
|
5455
5564
|
* Valid values: 'low', 'medium', 'high'.
|
|
5456
5565
|
*/
|
|
5457
|
-
textVerbosity:
|
|
5566
|
+
textVerbosity: z21.enum(["low", "medium", "high"]).nullish(),
|
|
5458
5567
|
/**
|
|
5459
5568
|
* Controls output truncation. 'auto' (default) performs truncation automatically;
|
|
5460
5569
|
* 'disabled' turns truncation off.
|
|
5461
5570
|
*/
|
|
5462
|
-
truncation:
|
|
5571
|
+
truncation: z21.enum(["auto", "disabled"]).nullish(),
|
|
5463
5572
|
/**
|
|
5464
5573
|
* A unique identifier representing your end-user, which can help OpenAI to
|
|
5465
5574
|
* monitor and detect abuse.
|
|
5466
5575
|
* Defaults to `undefined`.
|
|
5467
5576
|
* @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
|
|
5468
5577
|
*/
|
|
5469
|
-
user:
|
|
5578
|
+
user: z21.string().nullish(),
|
|
5470
5579
|
/**
|
|
5471
5580
|
* Override the system message mode for this model.
|
|
5472
5581
|
* - 'system': Use the 'system' role for system messages (default for most models)
|
|
@@ -5475,7 +5584,7 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5475
5584
|
*
|
|
5476
5585
|
* If not specified, the mode is automatically determined based on the model.
|
|
5477
5586
|
*/
|
|
5478
|
-
systemMessageMode:
|
|
5587
|
+
systemMessageMode: z21.enum(["system", "developer", "remove"]).optional(),
|
|
5479
5588
|
/**
|
|
5480
5589
|
* Force treating this model as a reasoning model.
|
|
5481
5590
|
*
|
|
@@ -5485,14 +5594,14 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5485
5594
|
* When enabled, the SDK applies reasoning-model parameter compatibility rules
|
|
5486
5595
|
* and defaults `systemMessageMode` to `developer` unless overridden.
|
|
5487
5596
|
*/
|
|
5488
|
-
forceReasoning:
|
|
5597
|
+
forceReasoning: z21.boolean().optional(),
|
|
5489
5598
|
/**
|
|
5490
5599
|
* Enable server-side context management (compaction).
|
|
5491
5600
|
*/
|
|
5492
|
-
contextManagement:
|
|
5493
|
-
|
|
5494
|
-
type:
|
|
5495
|
-
compactThreshold:
|
|
5601
|
+
contextManagement: z21.array(
|
|
5602
|
+
z21.object({
|
|
5603
|
+
type: z21.literal("compaction"),
|
|
5604
|
+
compactThreshold: z21.number()
|
|
5496
5605
|
})
|
|
5497
5606
|
).nullish(),
|
|
5498
5607
|
/**
|
|
@@ -5505,9 +5614,9 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema18(
|
|
|
5505
5614
|
*
|
|
5506
5615
|
* @see https://developers.openai.com/api/reference/resources/responses/methods/create#(resource)%20responses%20%3E%20(model)%20tool_choice_allowed%20%3E%20(schema)
|
|
5507
5616
|
*/
|
|
5508
|
-
allowedTools:
|
|
5509
|
-
toolNames:
|
|
5510
|
-
mode:
|
|
5617
|
+
allowedTools: z21.object({
|
|
5618
|
+
toolNames: z21.array(z21.string()).min(1),
|
|
5619
|
+
mode: z21.enum(["auto", "required"]).optional()
|
|
5511
5620
|
}).optional()
|
|
5512
5621
|
})
|
|
5513
5622
|
)
|
|
@@ -5524,44 +5633,44 @@ import {
|
|
|
5524
5633
|
|
|
5525
5634
|
// src/tool/code-interpreter.ts
|
|
5526
5635
|
import {
|
|
5527
|
-
createProviderExecutedToolFactory,
|
|
5528
|
-
lazySchema as
|
|
5529
|
-
zodSchema as
|
|
5636
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
5637
|
+
lazySchema as lazySchema20,
|
|
5638
|
+
zodSchema as zodSchema20
|
|
5530
5639
|
} from "@ai-sdk/provider-utils";
|
|
5531
|
-
import { z as
|
|
5532
|
-
var codeInterpreterInputSchema =
|
|
5533
|
-
() =>
|
|
5534
|
-
|
|
5535
|
-
code:
|
|
5536
|
-
containerId:
|
|
5640
|
+
import { z as z22 } from "zod/v4";
|
|
5641
|
+
var codeInterpreterInputSchema = lazySchema20(
|
|
5642
|
+
() => zodSchema20(
|
|
5643
|
+
z22.object({
|
|
5644
|
+
code: z22.string().nullish(),
|
|
5645
|
+
containerId: z22.string()
|
|
5537
5646
|
})
|
|
5538
5647
|
)
|
|
5539
5648
|
);
|
|
5540
|
-
var codeInterpreterOutputSchema =
|
|
5541
|
-
() =>
|
|
5542
|
-
|
|
5543
|
-
outputs:
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5649
|
+
var codeInterpreterOutputSchema = lazySchema20(
|
|
5650
|
+
() => zodSchema20(
|
|
5651
|
+
z22.object({
|
|
5652
|
+
outputs: z22.array(
|
|
5653
|
+
z22.discriminatedUnion("type", [
|
|
5654
|
+
z22.object({ type: z22.literal("logs"), logs: z22.string() }),
|
|
5655
|
+
z22.object({ type: z22.literal("image"), url: z22.string() })
|
|
5547
5656
|
])
|
|
5548
5657
|
).nullish()
|
|
5549
5658
|
})
|
|
5550
5659
|
)
|
|
5551
5660
|
);
|
|
5552
|
-
var codeInterpreterArgsSchema =
|
|
5553
|
-
() =>
|
|
5554
|
-
|
|
5555
|
-
container:
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
fileIds:
|
|
5661
|
+
var codeInterpreterArgsSchema = lazySchema20(
|
|
5662
|
+
() => zodSchema20(
|
|
5663
|
+
z22.object({
|
|
5664
|
+
container: z22.union([
|
|
5665
|
+
z22.string(),
|
|
5666
|
+
z22.object({
|
|
5667
|
+
fileIds: z22.array(z22.string()).optional()
|
|
5559
5668
|
})
|
|
5560
5669
|
]).optional()
|
|
5561
5670
|
})
|
|
5562
5671
|
)
|
|
5563
5672
|
);
|
|
5564
|
-
var codeInterpreterToolFactory =
|
|
5673
|
+
var codeInterpreterToolFactory = createProviderExecutedToolFactory2({
|
|
5565
5674
|
id: "openai.code_interpreter",
|
|
5566
5675
|
inputSchema: codeInterpreterInputSchema,
|
|
5567
5676
|
outputSchema: codeInterpreterOutputSchema
|
|
@@ -5572,88 +5681,88 @@ var codeInterpreter = (args = {}) => {
|
|
|
5572
5681
|
|
|
5573
5682
|
// src/tool/file-search.ts
|
|
5574
5683
|
import {
|
|
5575
|
-
createProviderExecutedToolFactory as
|
|
5576
|
-
lazySchema as
|
|
5577
|
-
zodSchema as
|
|
5684
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
5685
|
+
lazySchema as lazySchema21,
|
|
5686
|
+
zodSchema as zodSchema21
|
|
5578
5687
|
} from "@ai-sdk/provider-utils";
|
|
5579
|
-
import { z as
|
|
5580
|
-
var comparisonFilterSchema =
|
|
5581
|
-
key:
|
|
5582
|
-
type:
|
|
5583
|
-
value:
|
|
5688
|
+
import { z as z23 } from "zod/v4";
|
|
5689
|
+
var comparisonFilterSchema = z23.object({
|
|
5690
|
+
key: z23.string(),
|
|
5691
|
+
type: z23.enum(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
|
|
5692
|
+
value: z23.union([z23.string(), z23.number(), z23.boolean(), z23.array(z23.string())])
|
|
5584
5693
|
});
|
|
5585
|
-
var compoundFilterSchema =
|
|
5586
|
-
type:
|
|
5587
|
-
filters:
|
|
5588
|
-
|
|
5694
|
+
var compoundFilterSchema = z23.object({
|
|
5695
|
+
type: z23.enum(["and", "or"]),
|
|
5696
|
+
filters: z23.array(
|
|
5697
|
+
z23.union([comparisonFilterSchema, z23.lazy(() => compoundFilterSchema)])
|
|
5589
5698
|
)
|
|
5590
5699
|
});
|
|
5591
|
-
var fileSearchArgsSchema =
|
|
5592
|
-
() =>
|
|
5593
|
-
|
|
5594
|
-
vectorStoreIds:
|
|
5595
|
-
maxNumResults:
|
|
5596
|
-
ranking:
|
|
5597
|
-
ranker:
|
|
5598
|
-
scoreThreshold:
|
|
5700
|
+
var fileSearchArgsSchema = lazySchema21(
|
|
5701
|
+
() => zodSchema21(
|
|
5702
|
+
z23.object({
|
|
5703
|
+
vectorStoreIds: z23.array(z23.string()),
|
|
5704
|
+
maxNumResults: z23.number().optional(),
|
|
5705
|
+
ranking: z23.object({
|
|
5706
|
+
ranker: z23.string().optional(),
|
|
5707
|
+
scoreThreshold: z23.number().optional()
|
|
5599
5708
|
}).optional(),
|
|
5600
|
-
filters:
|
|
5709
|
+
filters: z23.union([comparisonFilterSchema, compoundFilterSchema]).optional()
|
|
5601
5710
|
})
|
|
5602
5711
|
)
|
|
5603
5712
|
);
|
|
5604
|
-
var fileSearchOutputSchema =
|
|
5605
|
-
() =>
|
|
5606
|
-
|
|
5607
|
-
queries:
|
|
5608
|
-
results:
|
|
5609
|
-
|
|
5610
|
-
attributes:
|
|
5611
|
-
fileId:
|
|
5612
|
-
filename:
|
|
5613
|
-
score:
|
|
5614
|
-
text:
|
|
5713
|
+
var fileSearchOutputSchema = lazySchema21(
|
|
5714
|
+
() => zodSchema21(
|
|
5715
|
+
z23.object({
|
|
5716
|
+
queries: z23.array(z23.string()),
|
|
5717
|
+
results: z23.array(
|
|
5718
|
+
z23.object({
|
|
5719
|
+
attributes: z23.record(z23.string(), z23.unknown()),
|
|
5720
|
+
fileId: z23.string(),
|
|
5721
|
+
filename: z23.string(),
|
|
5722
|
+
score: z23.number(),
|
|
5723
|
+
text: z23.string()
|
|
5615
5724
|
})
|
|
5616
5725
|
).nullable()
|
|
5617
5726
|
})
|
|
5618
5727
|
)
|
|
5619
5728
|
);
|
|
5620
|
-
var fileSearch =
|
|
5729
|
+
var fileSearch = createProviderExecutedToolFactory3({
|
|
5621
5730
|
id: "openai.file_search",
|
|
5622
|
-
inputSchema:
|
|
5731
|
+
inputSchema: z23.object({}),
|
|
5623
5732
|
outputSchema: fileSearchOutputSchema
|
|
5624
5733
|
});
|
|
5625
5734
|
|
|
5626
5735
|
// src/tool/image-generation.ts
|
|
5627
5736
|
import {
|
|
5628
|
-
createProviderExecutedToolFactory as
|
|
5629
|
-
lazySchema as
|
|
5630
|
-
zodSchema as
|
|
5737
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
5738
|
+
lazySchema as lazySchema22,
|
|
5739
|
+
zodSchema as zodSchema22
|
|
5631
5740
|
} from "@ai-sdk/provider-utils";
|
|
5632
|
-
import { z as
|
|
5633
|
-
var imageGenerationArgsSchema =
|
|
5634
|
-
() =>
|
|
5635
|
-
|
|
5636
|
-
background:
|
|
5637
|
-
inputFidelity:
|
|
5638
|
-
inputImageMask:
|
|
5639
|
-
fileId:
|
|
5640
|
-
imageUrl:
|
|
5741
|
+
import { z as z24 } from "zod/v4";
|
|
5742
|
+
var imageGenerationArgsSchema = lazySchema22(
|
|
5743
|
+
() => zodSchema22(
|
|
5744
|
+
z24.object({
|
|
5745
|
+
background: z24.enum(["auto", "opaque", "transparent"]).optional(),
|
|
5746
|
+
inputFidelity: z24.enum(["low", "high"]).optional(),
|
|
5747
|
+
inputImageMask: z24.object({
|
|
5748
|
+
fileId: z24.string().optional(),
|
|
5749
|
+
imageUrl: z24.string().optional()
|
|
5641
5750
|
}).optional(),
|
|
5642
|
-
model:
|
|
5643
|
-
moderation:
|
|
5644
|
-
outputCompression:
|
|
5645
|
-
outputFormat:
|
|
5646
|
-
partialImages:
|
|
5647
|
-
quality:
|
|
5648
|
-
size:
|
|
5751
|
+
model: z24.string().optional(),
|
|
5752
|
+
moderation: z24.enum(["auto"]).optional(),
|
|
5753
|
+
outputCompression: z24.number().int().min(0).max(100).optional(),
|
|
5754
|
+
outputFormat: z24.enum(["png", "jpeg", "webp"]).optional(),
|
|
5755
|
+
partialImages: z24.number().int().min(0).max(3).optional(),
|
|
5756
|
+
quality: z24.enum(["auto", "low", "medium", "high"]).optional(),
|
|
5757
|
+
size: z24.enum(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
|
|
5649
5758
|
}).strict()
|
|
5650
5759
|
)
|
|
5651
5760
|
);
|
|
5652
|
-
var imageGenerationInputSchema =
|
|
5653
|
-
var imageGenerationOutputSchema =
|
|
5654
|
-
() =>
|
|
5761
|
+
var imageGenerationInputSchema = lazySchema22(() => zodSchema22(z24.object({})));
|
|
5762
|
+
var imageGenerationOutputSchema = lazySchema22(
|
|
5763
|
+
() => zodSchema22(z24.object({ result: z24.string() }))
|
|
5655
5764
|
);
|
|
5656
|
-
var imageGenerationToolFactory =
|
|
5765
|
+
var imageGenerationToolFactory = createProviderExecutedToolFactory4({
|
|
5657
5766
|
id: "openai.image_generation",
|
|
5658
5767
|
inputSchema: imageGenerationInputSchema,
|
|
5659
5768
|
outputSchema: imageGenerationOutputSchema
|
|
@@ -5665,28 +5774,28 @@ var imageGeneration = (args = {}) => {
|
|
|
5665
5774
|
// src/tool/custom.ts
|
|
5666
5775
|
import {
|
|
5667
5776
|
createProviderDefinedToolFactory,
|
|
5668
|
-
lazySchema as
|
|
5669
|
-
zodSchema as
|
|
5777
|
+
lazySchema as lazySchema23,
|
|
5778
|
+
zodSchema as zodSchema23
|
|
5670
5779
|
} from "@ai-sdk/provider-utils";
|
|
5671
|
-
import { z as
|
|
5672
|
-
var customArgsSchema =
|
|
5673
|
-
() =>
|
|
5674
|
-
|
|
5675
|
-
description:
|
|
5676
|
-
format:
|
|
5677
|
-
|
|
5678
|
-
type:
|
|
5679
|
-
syntax:
|
|
5680
|
-
definition:
|
|
5780
|
+
import { z as z25 } from "zod/v4";
|
|
5781
|
+
var customArgsSchema = lazySchema23(
|
|
5782
|
+
() => zodSchema23(
|
|
5783
|
+
z25.object({
|
|
5784
|
+
description: z25.string().optional(),
|
|
5785
|
+
format: z25.union([
|
|
5786
|
+
z25.object({
|
|
5787
|
+
type: z25.literal("grammar"),
|
|
5788
|
+
syntax: z25.enum(["regex", "lark"]),
|
|
5789
|
+
definition: z25.string()
|
|
5681
5790
|
}),
|
|
5682
|
-
|
|
5683
|
-
type:
|
|
5791
|
+
z25.object({
|
|
5792
|
+
type: z25.literal("text")
|
|
5684
5793
|
})
|
|
5685
5794
|
]).optional()
|
|
5686
5795
|
})
|
|
5687
5796
|
)
|
|
5688
5797
|
);
|
|
5689
|
-
var customInputSchema =
|
|
5798
|
+
var customInputSchema = lazySchema23(() => zodSchema23(z25.string()));
|
|
5690
5799
|
var customToolFactory = createProviderDefinedToolFactory({
|
|
5691
5800
|
id: "openai.custom",
|
|
5692
5801
|
inputSchema: customInputSchema
|
|
@@ -5694,139 +5803,82 @@ var customToolFactory = createProviderDefinedToolFactory({
|
|
|
5694
5803
|
|
|
5695
5804
|
// src/tool/mcp.ts
|
|
5696
5805
|
import {
|
|
5697
|
-
createProviderExecutedToolFactory as
|
|
5698
|
-
lazySchema as
|
|
5699
|
-
zodSchema as
|
|
5806
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
5807
|
+
lazySchema as lazySchema24,
|
|
5808
|
+
zodSchema as zodSchema24
|
|
5700
5809
|
} from "@ai-sdk/provider-utils";
|
|
5701
|
-
import { z as
|
|
5702
|
-
var jsonValueSchema2 =
|
|
5703
|
-
() =>
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5810
|
+
import { z as z26 } from "zod/v4";
|
|
5811
|
+
var jsonValueSchema2 = z26.lazy(
|
|
5812
|
+
() => z26.union([
|
|
5813
|
+
z26.string(),
|
|
5814
|
+
z26.number(),
|
|
5815
|
+
z26.boolean(),
|
|
5816
|
+
z26.null(),
|
|
5817
|
+
z26.array(jsonValueSchema2),
|
|
5818
|
+
z26.record(z26.string(), jsonValueSchema2)
|
|
5710
5819
|
])
|
|
5711
5820
|
);
|
|
5712
|
-
var mcpArgsSchema =
|
|
5713
|
-
() =>
|
|
5714
|
-
|
|
5715
|
-
serverLabel:
|
|
5716
|
-
allowedTools:
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
readOnly:
|
|
5720
|
-
toolNames:
|
|
5821
|
+
var mcpArgsSchema = lazySchema24(
|
|
5822
|
+
() => zodSchema24(
|
|
5823
|
+
z26.object({
|
|
5824
|
+
serverLabel: z26.string(),
|
|
5825
|
+
allowedTools: z26.union([
|
|
5826
|
+
z26.array(z26.string()),
|
|
5827
|
+
z26.object({
|
|
5828
|
+
readOnly: z26.boolean().optional(),
|
|
5829
|
+
toolNames: z26.array(z26.string()).optional()
|
|
5721
5830
|
})
|
|
5722
5831
|
]).optional(),
|
|
5723
|
-
authorization:
|
|
5724
|
-
connectorId:
|
|
5725
|
-
headers:
|
|
5726
|
-
requireApproval:
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
never:
|
|
5730
|
-
toolNames:
|
|
5832
|
+
authorization: z26.string().optional(),
|
|
5833
|
+
connectorId: z26.string().optional(),
|
|
5834
|
+
headers: z26.record(z26.string(), z26.string()).optional(),
|
|
5835
|
+
requireApproval: z26.union([
|
|
5836
|
+
z26.enum(["always", "never"]),
|
|
5837
|
+
z26.object({
|
|
5838
|
+
never: z26.object({
|
|
5839
|
+
toolNames: z26.array(z26.string()).optional()
|
|
5731
5840
|
}).optional()
|
|
5732
5841
|
})
|
|
5733
5842
|
]).optional(),
|
|
5734
|
-
serverDescription:
|
|
5735
|
-
serverUrl:
|
|
5843
|
+
serverDescription: z26.string().optional(),
|
|
5844
|
+
serverUrl: z26.string().optional()
|
|
5736
5845
|
}).refine(
|
|
5737
5846
|
(v) => v.serverUrl != null || v.connectorId != null,
|
|
5738
5847
|
"One of serverUrl or connectorId must be provided."
|
|
5739
5848
|
)
|
|
5740
5849
|
)
|
|
5741
5850
|
);
|
|
5742
|
-
var mcpInputSchema =
|
|
5743
|
-
var mcpOutputSchema =
|
|
5744
|
-
() =>
|
|
5745
|
-
|
|
5746
|
-
type:
|
|
5747
|
-
serverLabel:
|
|
5748
|
-
name:
|
|
5749
|
-
arguments:
|
|
5750
|
-
output:
|
|
5751
|
-
error:
|
|
5851
|
+
var mcpInputSchema = lazySchema24(() => zodSchema24(z26.object({})));
|
|
5852
|
+
var mcpOutputSchema = lazySchema24(
|
|
5853
|
+
() => zodSchema24(
|
|
5854
|
+
z26.object({
|
|
5855
|
+
type: z26.literal("call"),
|
|
5856
|
+
serverLabel: z26.string(),
|
|
5857
|
+
name: z26.string(),
|
|
5858
|
+
arguments: z26.string(),
|
|
5859
|
+
output: z26.string().nullish(),
|
|
5860
|
+
error: z26.union([z26.string(), jsonValueSchema2]).optional()
|
|
5752
5861
|
})
|
|
5753
5862
|
)
|
|
5754
5863
|
);
|
|
5755
|
-
var mcpToolFactory =
|
|
5864
|
+
var mcpToolFactory = createProviderExecutedToolFactory5({
|
|
5756
5865
|
id: "openai.mcp",
|
|
5757
5866
|
inputSchema: mcpInputSchema,
|
|
5758
5867
|
outputSchema: mcpOutputSchema
|
|
5759
5868
|
});
|
|
5760
5869
|
|
|
5761
5870
|
// src/tool/web-search.ts
|
|
5762
|
-
import {
|
|
5763
|
-
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
5764
|
-
lazySchema as lazySchema24,
|
|
5765
|
-
zodSchema as zodSchema24
|
|
5766
|
-
} from "@ai-sdk/provider-utils";
|
|
5767
|
-
import { z as z26 } from "zod/v4";
|
|
5768
|
-
var webSearchArgsSchema = lazySchema24(
|
|
5769
|
-
() => zodSchema24(
|
|
5770
|
-
z26.object({
|
|
5771
|
-
externalWebAccess: z26.boolean().optional(),
|
|
5772
|
-
filters: z26.object({ allowedDomains: z26.array(z26.string()).optional() }).optional(),
|
|
5773
|
-
searchContextSize: z26.enum(["low", "medium", "high"]).optional(),
|
|
5774
|
-
userLocation: z26.object({
|
|
5775
|
-
type: z26.literal("approximate"),
|
|
5776
|
-
country: z26.string().optional(),
|
|
5777
|
-
city: z26.string().optional(),
|
|
5778
|
-
region: z26.string().optional(),
|
|
5779
|
-
timezone: z26.string().optional()
|
|
5780
|
-
}).optional()
|
|
5781
|
-
})
|
|
5782
|
-
)
|
|
5783
|
-
);
|
|
5784
|
-
var webSearchInputSchema = lazySchema24(() => zodSchema24(z26.object({})));
|
|
5785
|
-
var webSearchOutputSchema = lazySchema24(
|
|
5786
|
-
() => zodSchema24(
|
|
5787
|
-
z26.object({
|
|
5788
|
-
action: z26.discriminatedUnion("type", [
|
|
5789
|
-
z26.object({
|
|
5790
|
-
type: z26.literal("search"),
|
|
5791
|
-
query: z26.string().optional(),
|
|
5792
|
-
queries: z26.array(z26.string()).optional()
|
|
5793
|
-
}),
|
|
5794
|
-
z26.object({
|
|
5795
|
-
type: z26.literal("openPage"),
|
|
5796
|
-
url: z26.string().nullish()
|
|
5797
|
-
}),
|
|
5798
|
-
z26.object({
|
|
5799
|
-
type: z26.literal("findInPage"),
|
|
5800
|
-
url: z26.string().nullish(),
|
|
5801
|
-
pattern: z26.string().nullish()
|
|
5802
|
-
})
|
|
5803
|
-
]).optional(),
|
|
5804
|
-
sources: z26.array(
|
|
5805
|
-
z26.discriminatedUnion("type", [
|
|
5806
|
-
z26.object({ type: z26.literal("url"), url: z26.string() }),
|
|
5807
|
-
z26.object({ type: z26.literal("api"), name: z26.string() })
|
|
5808
|
-
])
|
|
5809
|
-
).optional()
|
|
5810
|
-
})
|
|
5811
|
-
)
|
|
5812
|
-
);
|
|
5813
|
-
var webSearchToolFactory = createProviderExecutedToolFactory5({
|
|
5814
|
-
id: "openai.web_search",
|
|
5815
|
-
inputSchema: webSearchInputSchema,
|
|
5816
|
-
outputSchema: webSearchOutputSchema
|
|
5817
|
-
});
|
|
5818
|
-
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
5819
|
-
|
|
5820
|
-
// src/tool/web-search-preview.ts
|
|
5821
5871
|
import {
|
|
5822
5872
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
5823
5873
|
lazySchema as lazySchema25,
|
|
5824
5874
|
zodSchema as zodSchema25
|
|
5825
5875
|
} from "@ai-sdk/provider-utils";
|
|
5826
5876
|
import { z as z27 } from "zod/v4";
|
|
5827
|
-
var
|
|
5877
|
+
var webSearchArgsSchema = lazySchema25(
|
|
5828
5878
|
() => zodSchema25(
|
|
5829
5879
|
z27.object({
|
|
5880
|
+
externalWebAccess: z27.boolean().optional(),
|
|
5881
|
+
filters: z27.object({ allowedDomains: z27.array(z27.string()).optional() }).optional(),
|
|
5830
5882
|
searchContextSize: z27.enum(["low", "medium", "high"]).optional(),
|
|
5831
5883
|
userLocation: z27.object({
|
|
5832
5884
|
type: z27.literal("approximate"),
|
|
@@ -5838,16 +5890,15 @@ var webSearchPreviewArgsSchema = lazySchema25(
|
|
|
5838
5890
|
})
|
|
5839
5891
|
)
|
|
5840
5892
|
);
|
|
5841
|
-
var
|
|
5842
|
-
|
|
5843
|
-
);
|
|
5844
|
-
var webSearchPreviewOutputSchema = lazySchema25(
|
|
5893
|
+
var webSearchInputSchema = lazySchema25(() => zodSchema25(z27.object({})));
|
|
5894
|
+
var webSearchOutputSchema = lazySchema25(
|
|
5845
5895
|
() => zodSchema25(
|
|
5846
5896
|
z27.object({
|
|
5847
5897
|
action: z27.discriminatedUnion("type", [
|
|
5848
5898
|
z27.object({
|
|
5849
5899
|
type: z27.literal("search"),
|
|
5850
|
-
query: z27.string().optional()
|
|
5900
|
+
query: z27.string().optional(),
|
|
5901
|
+
queries: z27.array(z27.string()).optional()
|
|
5851
5902
|
}),
|
|
5852
5903
|
z27.object({
|
|
5853
5904
|
type: z27.literal("openPage"),
|
|
@@ -5858,11 +5909,69 @@ var webSearchPreviewOutputSchema = lazySchema25(
|
|
|
5858
5909
|
url: z27.string().nullish(),
|
|
5859
5910
|
pattern: z27.string().nullish()
|
|
5860
5911
|
})
|
|
5912
|
+
]).optional(),
|
|
5913
|
+
sources: z27.array(
|
|
5914
|
+
z27.discriminatedUnion("type", [
|
|
5915
|
+
z27.object({ type: z27.literal("url"), url: z27.string() }),
|
|
5916
|
+
z27.object({ type: z27.literal("api"), name: z27.string() })
|
|
5917
|
+
])
|
|
5918
|
+
).optional()
|
|
5919
|
+
})
|
|
5920
|
+
)
|
|
5921
|
+
);
|
|
5922
|
+
var webSearchToolFactory = createProviderExecutedToolFactory6({
|
|
5923
|
+
id: "openai.web_search",
|
|
5924
|
+
inputSchema: webSearchInputSchema,
|
|
5925
|
+
outputSchema: webSearchOutputSchema
|
|
5926
|
+
});
|
|
5927
|
+
var webSearch = (args = {}) => webSearchToolFactory(args);
|
|
5928
|
+
|
|
5929
|
+
// src/tool/web-search-preview.ts
|
|
5930
|
+
import {
|
|
5931
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory7,
|
|
5932
|
+
lazySchema as lazySchema26,
|
|
5933
|
+
zodSchema as zodSchema26
|
|
5934
|
+
} from "@ai-sdk/provider-utils";
|
|
5935
|
+
import { z as z28 } from "zod/v4";
|
|
5936
|
+
var webSearchPreviewArgsSchema = lazySchema26(
|
|
5937
|
+
() => zodSchema26(
|
|
5938
|
+
z28.object({
|
|
5939
|
+
searchContextSize: z28.enum(["low", "medium", "high"]).optional(),
|
|
5940
|
+
userLocation: z28.object({
|
|
5941
|
+
type: z28.literal("approximate"),
|
|
5942
|
+
country: z28.string().optional(),
|
|
5943
|
+
city: z28.string().optional(),
|
|
5944
|
+
region: z28.string().optional(),
|
|
5945
|
+
timezone: z28.string().optional()
|
|
5946
|
+
}).optional()
|
|
5947
|
+
})
|
|
5948
|
+
)
|
|
5949
|
+
);
|
|
5950
|
+
var webSearchPreviewInputSchema = lazySchema26(
|
|
5951
|
+
() => zodSchema26(z28.object({}))
|
|
5952
|
+
);
|
|
5953
|
+
var webSearchPreviewOutputSchema = lazySchema26(
|
|
5954
|
+
() => zodSchema26(
|
|
5955
|
+
z28.object({
|
|
5956
|
+
action: z28.discriminatedUnion("type", [
|
|
5957
|
+
z28.object({
|
|
5958
|
+
type: z28.literal("search"),
|
|
5959
|
+
query: z28.string().optional()
|
|
5960
|
+
}),
|
|
5961
|
+
z28.object({
|
|
5962
|
+
type: z28.literal("openPage"),
|
|
5963
|
+
url: z28.string().nullish()
|
|
5964
|
+
}),
|
|
5965
|
+
z28.object({
|
|
5966
|
+
type: z28.literal("findInPage"),
|
|
5967
|
+
url: z28.string().nullish(),
|
|
5968
|
+
pattern: z28.string().nullish()
|
|
5969
|
+
})
|
|
5861
5970
|
]).optional()
|
|
5862
5971
|
})
|
|
5863
5972
|
)
|
|
5864
5973
|
);
|
|
5865
|
-
var webSearchPreview =
|
|
5974
|
+
var webSearchPreview = createProviderExecutedToolFactory7({
|
|
5866
5975
|
id: "openai.web_search_preview",
|
|
5867
5976
|
inputSchema: webSearchPreviewInputSchema,
|
|
5868
5977
|
outputSchema: webSearchPreviewOutputSchema
|
|
@@ -6066,6 +6175,12 @@ async function prepareResponsesTools({
|
|
|
6066
6175
|
resolvedCustomProviderToolNames.add(tool.name);
|
|
6067
6176
|
break;
|
|
6068
6177
|
}
|
|
6178
|
+
case "openai.programmatic_tool_calling": {
|
|
6179
|
+
openaiTools.push({
|
|
6180
|
+
type: "programmatic_tool_calling"
|
|
6181
|
+
});
|
|
6182
|
+
break;
|
|
6183
|
+
}
|
|
6069
6184
|
case "openai.tool_search": {
|
|
6070
6185
|
const args = await validateTypes2({
|
|
6071
6186
|
value: tool.args,
|
|
@@ -6120,7 +6235,7 @@ async function prepareResponsesTools({
|
|
|
6120
6235
|
const resolvedToolName = (_c = toolNameMapping == null ? void 0 : toolNameMapping.toProviderToolName(toolChoice.toolName)) != null ? _c : toolChoice.toolName;
|
|
6121
6236
|
return {
|
|
6122
6237
|
tools: openaiTools,
|
|
6123
|
-
toolChoice: resolvedToolName === "code_interpreter" || resolvedToolName === "file_search" || resolvedToolName === "image_generation" || resolvedToolName === "web_search_preview" || resolvedToolName === "web_search" || resolvedToolName === "mcp" || resolvedToolName === "apply_patch" || resolvedToolName === "computer" ? { type: resolvedToolName } : resolvedCustomProviderToolNames.has(resolvedToolName) ? { type: "custom", name: resolvedToolName } : { type: "function", name: resolvedToolName },
|
|
6238
|
+
toolChoice: resolvedToolName === "code_interpreter" || resolvedToolName === "file_search" || resolvedToolName === "image_generation" || resolvedToolName === "web_search_preview" || resolvedToolName === "web_search" || resolvedToolName === "mcp" || resolvedToolName === "apply_patch" || resolvedToolName === "computer" || resolvedToolName === "programmatic_tool_calling" ? { type: resolvedToolName } : resolvedCustomProviderToolNames.has(resolvedToolName) ? { type: "custom", name: resolvedToolName } : { type: "function", name: resolvedToolName },
|
|
6124
6239
|
toolWarnings
|
|
6125
6240
|
};
|
|
6126
6241
|
}
|
|
@@ -6143,7 +6258,9 @@ function prepareFunctionTool({
|
|
|
6143
6258
|
description: tool.description,
|
|
6144
6259
|
parameters: tool.inputSchema,
|
|
6145
6260
|
...tool.strict != null ? { strict: tool.strict } : {},
|
|
6146
|
-
...deferLoading != null ? { defer_loading: deferLoading } : {}
|
|
6261
|
+
...deferLoading != null ? { defer_loading: deferLoading } : {},
|
|
6262
|
+
...(options == null ? void 0 : options.allowedCallers) != null ? { allowed_callers: options.allowedCallers } : {},
|
|
6263
|
+
...(options == null ? void 0 : options.outputSchema) != null ? { output_schema: options.outputSchema } : {}
|
|
6147
6264
|
};
|
|
6148
6265
|
}
|
|
6149
6266
|
function mapShellEnvironment(environment) {
|
|
@@ -6375,7 +6492,8 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6375
6492
|
"openai.web_search_preview": "web_search_preview",
|
|
6376
6493
|
"openai.mcp": "mcp",
|
|
6377
6494
|
"openai.apply_patch": "apply_patch",
|
|
6378
|
-
"openai.tool_search": "tool_search"
|
|
6495
|
+
"openai.tool_search": "tool_search",
|
|
6496
|
+
"openai.programmatic_tool_calling": "programmatic_tool_calling"
|
|
6379
6497
|
}
|
|
6380
6498
|
});
|
|
6381
6499
|
const customProviderToolNames = /* @__PURE__ */ new Set();
|
|
@@ -6862,7 +6980,52 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
6862
6980
|
providerMetadata: {
|
|
6863
6981
|
[providerOptionsName]: {
|
|
6864
6982
|
itemId: part.id,
|
|
6865
|
-
...part.namespace != null && { namespace: part.namespace }
|
|
6983
|
+
...part.namespace != null && { namespace: part.namespace },
|
|
6984
|
+
...part.caller != null && {
|
|
6985
|
+
caller: part.caller.type === "program" ? {
|
|
6986
|
+
type: "program",
|
|
6987
|
+
callerId: part.caller.caller_id
|
|
6988
|
+
} : part.caller
|
|
6989
|
+
}
|
|
6990
|
+
}
|
|
6991
|
+
}
|
|
6992
|
+
});
|
|
6993
|
+
break;
|
|
6994
|
+
}
|
|
6995
|
+
case "program": {
|
|
6996
|
+
content.push({
|
|
6997
|
+
type: "tool-call",
|
|
6998
|
+
toolCallId: part.call_id,
|
|
6999
|
+
toolName: toolNameMapping.toCustomToolName(
|
|
7000
|
+
"programmatic_tool_calling"
|
|
7001
|
+
),
|
|
7002
|
+
input: JSON.stringify({
|
|
7003
|
+
code: part.code,
|
|
7004
|
+
fingerprint: part.fingerprint
|
|
7005
|
+
}),
|
|
7006
|
+
providerExecuted: true,
|
|
7007
|
+
providerMetadata: {
|
|
7008
|
+
[providerOptionsName]: {
|
|
7009
|
+
itemId: part.id
|
|
7010
|
+
}
|
|
7011
|
+
}
|
|
7012
|
+
});
|
|
7013
|
+
break;
|
|
7014
|
+
}
|
|
7015
|
+
case "program_output": {
|
|
7016
|
+
content.push({
|
|
7017
|
+
type: "tool-result",
|
|
7018
|
+
toolCallId: part.call_id,
|
|
7019
|
+
toolName: toolNameMapping.toCustomToolName(
|
|
7020
|
+
"programmatic_tool_calling"
|
|
7021
|
+
),
|
|
7022
|
+
result: {
|
|
7023
|
+
result: part.result,
|
|
7024
|
+
status: part.status
|
|
7025
|
+
},
|
|
7026
|
+
providerMetadata: {
|
|
7027
|
+
[providerOptionsName]: {
|
|
7028
|
+
itemId: part.id
|
|
6866
7029
|
}
|
|
6867
7030
|
}
|
|
6868
7031
|
});
|
|
@@ -7414,10 +7577,51 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
|
|
|
7414
7577
|
itemId: value.item.id,
|
|
7415
7578
|
...value.item.namespace != null && {
|
|
7416
7579
|
namespace: value.item.namespace
|
|
7580
|
+
},
|
|
7581
|
+
...value.item.caller != null && {
|
|
7582
|
+
caller: value.item.caller.type === "program" ? {
|
|
7583
|
+
type: "program",
|
|
7584
|
+
callerId: value.item.caller.caller_id
|
|
7585
|
+
} : value.item.caller
|
|
7417
7586
|
}
|
|
7418
7587
|
}
|
|
7419
7588
|
}
|
|
7420
7589
|
});
|
|
7590
|
+
} else if (value.item.type === "program") {
|
|
7591
|
+
controller.enqueue({
|
|
7592
|
+
type: "tool-call",
|
|
7593
|
+
toolCallId: value.item.call_id,
|
|
7594
|
+
toolName: toolNameMapping.toCustomToolName(
|
|
7595
|
+
"programmatic_tool_calling"
|
|
7596
|
+
),
|
|
7597
|
+
input: JSON.stringify({
|
|
7598
|
+
code: value.item.code,
|
|
7599
|
+
fingerprint: value.item.fingerprint
|
|
7600
|
+
}),
|
|
7601
|
+
providerExecuted: true,
|
|
7602
|
+
providerMetadata: {
|
|
7603
|
+
[providerOptionsName]: {
|
|
7604
|
+
itemId: value.item.id
|
|
7605
|
+
}
|
|
7606
|
+
}
|
|
7607
|
+
});
|
|
7608
|
+
} else if (value.item.type === "program_output") {
|
|
7609
|
+
controller.enqueue({
|
|
7610
|
+
type: "tool-result",
|
|
7611
|
+
toolCallId: value.item.call_id,
|
|
7612
|
+
toolName: toolNameMapping.toCustomToolName(
|
|
7613
|
+
"programmatic_tool_calling"
|
|
7614
|
+
),
|
|
7615
|
+
result: {
|
|
7616
|
+
result: value.item.result,
|
|
7617
|
+
status: value.item.status
|
|
7618
|
+
},
|
|
7619
|
+
providerMetadata: {
|
|
7620
|
+
[providerOptionsName]: {
|
|
7621
|
+
itemId: value.item.id
|
|
7622
|
+
}
|
|
7623
|
+
}
|
|
7624
|
+
});
|
|
7421
7625
|
} else if (value.item.type === "custom_tool_call") {
|
|
7422
7626
|
ongoingToolCalls[value.output_index] = void 0;
|
|
7423
7627
|
hasFunctionCall = true;
|
|
@@ -8204,6 +8408,9 @@ export {
|
|
|
8204
8408
|
openaiLanguageModelChatOptions,
|
|
8205
8409
|
openaiLanguageModelCompletionOptions,
|
|
8206
8410
|
openaiSpeechModelOptionsSchema,
|
|
8411
|
+
programmaticToolCalling,
|
|
8412
|
+
programmaticToolCallingInputSchema,
|
|
8413
|
+
programmaticToolCallingOutputSchema,
|
|
8207
8414
|
webSearch,
|
|
8208
8415
|
webSearchArgsSchema,
|
|
8209
8416
|
webSearchOutputSchema,
|