Function safelyConvertToolCallToProvider
safelyConvertToolCallToProvider< TargetProviderSDK extends NonNullable<PromptSDKFormat>,>( __namedParameters: { targetProvider: TargetProviderSDK; toolCall: unknown; },): | null| TypeOf< { ANTHROPIC: SDKConverters< ZodEffects< ZodDiscriminatedUnion< "role", [ ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, objectOutputType< { content: ZodUnion<(...)
>; role: ZodEnum<(...)
> }, ZodTypeAny, "passthrough", >, | objectInputType< { content: ...
; name: ...
; role: ...
; tool_call_id: ...
; tool_calls: ...
; }, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; role: ...
; tool_call_id: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", >, >, ZodEffects< ZodDiscriminatedUnion< "type", [ ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, | null | { source?: undefined; text: string; type: "text" } | { source: { data: ...
; media_type: ...
; type: ...
}; text?: undefined; type: "image"; }, | { text: string; type: "text" } | { image_url: { url: ...
}; type: "image_url" }, >, ZodEffects< ZodUnion< [ ZodLiteral<(...)
>, ZodLiteral<(...)
>, ZodLiteral<(...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, { name: string; type: "tool" } | { type: "auto" } | { type: "any" }, | "none" | "auto" | "required" | { function: { name: ...
}; type: "function" }, >, ZodEffects< ZodObject< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; id: ZodString; type: ZodEffects<(...)
, (...)
, (...)
>; }, "strip", ZodTypeAny, { function: (...)
& (...)
; id: string; type: "function" }, { function: (...)
& (...)
; id: string; type?: (...)
| (...)
}, >, { id: string; input: JSONLiteral; name: string; type: "tool_use" }, { function: { arguments: ...
; name: ...
} & { [k: ...
]: ...
}; id: string; type?: "function"; }, >, ZodEffects< ZodObject< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, "passthrough", ZodTypeAny, objectOutputType< { function: ...
; type: ...
}, ZodTypeAny, "passthrough", >, objectInputType< { function: ...
; type: ...
}, ZodTypeAny, "passthrough", >, >, { description: string; input_schema: { additionalProperties?: ...
; properties: ...
; required?: ...
; type: ...
; } & { [k: ...
]: ...
}; name: string; }, objectInputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, >, ZodTypeAny, >; AZURE_OPENAI: SDKConverters< ZodDiscriminatedUnion< "role", [ ZodObject< { content: ...
; name: ...
; role: ...
; tool_call_id: ...
; tool_calls: ...
; }, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ZodObject< { content: ...
; role: ...
; tool_call_id: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ZodObject< { content: ...
; name: ...
; role: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ], >, ZodDiscriminatedUnion< "type", [ ZodObject< { text: ...
; type: ...
}, "strip", ZodTypeAny, { text: ...
; type: ...
}, { text: ...
; type: ...
}, >, ZodObject< { image_url: ...
; type: ...
}, "strip", ZodTypeAny, { image_url: ...
; type: ...
}, { image_url: ...
; type: ...
}, >, ], >, ZodUnion< [ ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject< { function: ...
; type: ...
}, "strip", ZodTypeAny, { function: ...
; type: ...
}, { function: ...
; type: ...
}, >, ], >, ZodObject< { function: ZodObject< { arguments: ...
; name: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >; id: ZodString; type: ZodEffects<ZodOptional<(...)
>, "function", (...)
| (...)
>; }, "strip", ZodTypeAny, { function: { arguments: ...
; name: ...
} & { [k: ...
]: ...
}; id: string; type: "function"; }, { function: { arguments: ...
; name: ...
} & { [k: ...
]: ...
}; id: string; type?: "function"; }, >, ZodObject< { function: ZodObject< { description: ...
; name: ...
; parameters: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >; type: ZodLiteral<"function">; }, "passthrough", ZodTypeAny, objectOutputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, objectInputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, >, ZodObject< { json_schema: ZodObject< { description: ...
; name: ...
; schema: ...
}, "strip", ZodTypeAny, { description?: ...
; name: ...
; schema: ...
}, { description?: ...
; name: ...
; schema: ...
}, >; type: ZodLiteral<"json_schema">; }, "strip", ZodTypeAny, { json_schema: { description?: (...)
| (...)
; name: string; schema: (...)
& (...)
; }; type: "json_schema"; }, { json_schema: { description?: (...)
| (...)
; name: string; schema: (...)
& (...)
; }; type: "json_schema"; }, >, >; OPENAI: SDKConverters< ZodDiscriminatedUnion< "role", [ ZodObject< { content: ...
; name: ...
; role: ...
; tool_call_id: ...
; tool_calls: ...
; }, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ZodObject< { content: ...
; role: ...
; tool_call_id: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ZodObject< { content: ...
; name: ...
; role: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >, ], >, ZodDiscriminatedUnion< "type", [ ZodObject< { text: ...
; type: ...
}, "strip", ZodTypeAny, { text: ...
; type: ...
}, { text: ...
; type: ...
}, >, ZodObject< { image_url: ...
; type: ...
}, "strip", ZodTypeAny, { image_url: ...
; type: ...
}, { image_url: ...
; type: ...
}, >, ], >, ZodUnion< [ ZodLiteral<"auto">, ZodLiteral<"none">, ZodLiteral<"required">, ZodObject< { function: ...
; type: ...
}, "strip", ZodTypeAny, { function: ...
; type: ...
}, { function: ...
; type: ...
}, >, ], >, ZodObject< { function: ZodObject< { arguments: ...
; name: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >; id: ZodString; type: ZodEffects<ZodOptional<(...)
>, "function", (...)
| (...)
>; }, "strip", ZodTypeAny, { function: { arguments: ...
; name: ...
} & { [k: ...
]: ...
}; id: string; type: "function"; }, { function: { arguments: ...
; name: ...
} & { [k: ...
]: ...
}; id: string; type?: "function"; }, >, ZodObject< { function: ZodObject< { description: ...
; name: ...
; parameters: ...
}, "passthrough", ZodTypeAny, objectOutputType<(...)
, (...)
, (...)
>, objectInputType<(...)
, (...)
, (...)
>, >; type: ZodLiteral<"function">; }, "passthrough", ZodTypeAny, objectOutputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, objectInputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, >, ZodObject< { json_schema: ZodObject< { description: ...
; name: ...
; schema: ...
}, "strip", ZodTypeAny, { description?: ...
; name: ...
; schema: ...
}, { description?: ...
; name: ...
; schema: ...
}, >; type: ZodLiteral<"json_schema">; }, "strip", ZodTypeAny, { json_schema: { description?: (...)
| (...)
; name: string; schema: (...)
& (...)
; }; type: "json_schema"; }, { json_schema: { description?: (...)
| (...)
; name: string; schema: (...)
& (...)
; }; type: "json_schema"; }, >, >; PHOENIX: SDKConverters< ZodEffects< ZodDiscriminatedUnion< "role", [ ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, { content: string | (...)
[]; role: | "user" | "assistant" | "model" | "ai" | "tool" | "system" | "developer"; }, | objectInputType< { content: ...
; name: ...
; role: ...
; tool_call_id: ...
; tool_calls: ...
; }, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; role: ...
; tool_call_id: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", >, >, ZodUnknown, ZodUnknown, ZodUnknown, ZodUnknown, ZodUnknown, >; VERCEL_AI: SDKConverters< ZodEffects< ZodDiscriminatedUnion< "role", [ ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, | { content: string; role: "system" } | { content: (...)
| (...)
; role: "user" } | { content: (...)
| (...)
; role: "assistant" } | { content: (...)
[]; role: "tool" }, | objectInputType< { content: ...
; name: ...
; role: ...
; tool_call_id: ...
; tool_calls: ...
; }, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; role: ...
; tool_call_id: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", > | objectInputType< { content: ...
; name: ...
; role: ...
}, ZodTypeAny, "passthrough", >, >, ZodDiscriminatedUnion< "type", [ ZodObject< { text: ...
; type: ...
}, "strip", ZodTypeAny, { text: ...
; type: ...
}, { text: ...
; type: ...
}, >, ZodObject< { image: ...
; mimeType: ...
; type: ...
}, "strip", ZodTypeAny, { image: ...
; mimeType?: ...
; type: ...
}, { image: ...
; mimeType?: ...
; type: ...
}, >, ZodObject< { args: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, "strip", ZodTypeAny, { args: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, { args: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, >, ZodObject< { result: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, "strip", ZodTypeAny, { result: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, { result: ...
; toolCallId: ...
; toolName: ...
; type: ...
}, >, ], >, ZodEffects< ZodUnion< [ ZodLiteral<(...)
>, ZodLiteral<(...)
>, ZodLiteral<(...)
>, ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>, ], >, "none" | "auto" | "required" | { toolName: string; type: "tool" }, | "none" | "auto" | "required" | { function: { name: ...
}; type: "function" }, >, ZodObject< { args: ZodType<JSONLiteral, ZodTypeDef, JSONLiteral>; toolCallId: ZodString; toolName: ZodString; type: ZodLiteral<"tool-call">; }, "strip", ZodTypeAny, { args: JSONLiteral; toolCallId: string; toolName: string; type: "tool-call"; }, { args: JSONLiteral; toolCallId: string; toolName: string; type: "tool-call"; }, >, ZodEffects< ZodObject< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, "passthrough", ZodTypeAny, objectOutputType< { function: ...
; type: ...
}, ZodTypeAny, "passthrough", >, objectInputType< { function: ...
; type: ...
}, ZodTypeAny, "passthrough", >, >, { description?: string; parameters: { _type?: unknown; jsonSchema?: (...)
| (...)
; validate?: unknown; }; type: "function"; }, objectInputType< { function: ZodObject<(...)
, (...)
, (...)
, (...)
, (...)
>; type: ZodLiteral<(...)
>; }, ZodTypeAny, "passthrough", >, >, ZodTypeAny, >; }[TargetProviderSDK]["toolCalls"]["fromOpenAI"],> Returns
| null
| TypeOf<
{
ANTHROPIC: SDKConverters<
ZodEffects<
ZodDiscriminatedUnion<
"role",
[
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
objectOutputType<
{ content: ZodUnion<(...)>; role: ZodEnum<(...)> },
ZodTypeAny,
"passthrough",
>,
| objectInputType<
{
content: ...;
name: ...;
role: ...;
tool_call_id: ...;
tool_calls: ...;
},
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; role: ...; tool_call_id: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>,
>,
ZodEffects<
ZodDiscriminatedUnion<
"type",
[
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
| null
| { source?: undefined; text: string; type: "text" }
| {
source: { data: ...; media_type: ...; type: ... };
text?: undefined;
type: "image";
},
| { text: string; type: "text" }
| { image_url: { url: ... }; type: "image_url" },
>,
ZodEffects<
ZodUnion<
[
ZodLiteral<(...)>,
ZodLiteral<(...)>,
ZodLiteral<(...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
{ name: string; type: "tool" } | { type: "auto" } | { type: "any" },
| "none"
| "auto"
| "required"
| { function: { name: ... }; type: "function" },
>,
ZodEffects<
ZodObject<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
id: ZodString;
type: ZodEffects<(...), (...), (...)>;
},
"strip",
ZodTypeAny,
{ function: (...) & (...); id: string; type: "function" },
{ function: (...) & (...); id: string; type?: (...) | (...) },
>,
{ id: string; input: JSONLiteral; name: string; type: "tool_use" },
{
function: { arguments: ...; name: ... } & { [k: ...]: ... };
id: string;
type?: "function";
},
>,
ZodEffects<
ZodObject<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
"passthrough",
ZodTypeAny,
objectOutputType<
{ function: ...; type: ... },
ZodTypeAny,
"passthrough",
>,
objectInputType<
{ function: ...; type: ... },
ZodTypeAny,
"passthrough",
>,
>,
{
description: string;
input_schema: {
additionalProperties?: ...;
properties: ...;
required?: ...;
type: ...;
} & { [k: ...]: ... };
name: string;
},
objectInputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
>,
ZodTypeAny,
>;
AZURE_OPENAI: SDKConverters<
ZodDiscriminatedUnion<
"role",
[
ZodObject<
{
content: ...;
name: ...;
role: ...;
tool_call_id: ...;
tool_calls: ...;
},
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
ZodObject<
{ content: ...; role: ...; tool_call_id: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
ZodObject<
{ content: ...; name: ...; role: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
],
>,
ZodDiscriminatedUnion<
"type",
[
ZodObject<
{ text: ...; type: ... },
"strip",
ZodTypeAny,
{ text: ...; type: ... },
{ text: ...; type: ... },
>,
ZodObject<
{ image_url: ...; type: ... },
"strip",
ZodTypeAny,
{ image_url: ...; type: ... },
{ image_url: ...; type: ... },
>,
],
>,
ZodUnion<
[
ZodLiteral<"auto">,
ZodLiteral<"none">,
ZodLiteral<"required">,
ZodObject<
{ function: ...; type: ... },
"strip",
ZodTypeAny,
{ function: ...; type: ... },
{ function: ...; type: ... },
>,
],
>,
ZodObject<
{
function: ZodObject<
{ arguments: ...; name: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>;
id: ZodString;
type: ZodEffects<ZodOptional<(...)>, "function", (...) | (...)>;
},
"strip",
ZodTypeAny,
{
function: { arguments: ...; name: ... } & { [k: ...]: ... };
id: string;
type: "function";
},
{
function: { arguments: ...; name: ... } & { [k: ...]: ... };
id: string;
type?: "function";
},
>,
ZodObject<
{
function: ZodObject<
{ description: ...; name: ...; parameters: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>;
type: ZodLiteral<"function">;
},
"passthrough",
ZodTypeAny,
objectOutputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
objectInputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
>,
ZodObject<
{
json_schema: ZodObject<
{ description: ...; name: ...; schema: ... },
"strip",
ZodTypeAny,
{ description?: ...; name: ...; schema: ... },
{ description?: ...; name: ...; schema: ... },
>;
type: ZodLiteral<"json_schema">;
},
"strip",
ZodTypeAny,
{
json_schema: {
description?: (...)
| (...);
name: string;
schema: (...) & (...);
};
type: "json_schema";
},
{
json_schema: {
description?: (...)
| (...);
name: string;
schema: (...) & (...);
};
type: "json_schema";
},
>,
>;
OPENAI: SDKConverters<
ZodDiscriminatedUnion<
"role",
[
ZodObject<
{
content: ...;
name: ...;
role: ...;
tool_call_id: ...;
tool_calls: ...;
},
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
ZodObject<
{ content: ...; role: ...; tool_call_id: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
ZodObject<
{ content: ...; name: ...; role: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>,
],
>,
ZodDiscriminatedUnion<
"type",
[
ZodObject<
{ text: ...; type: ... },
"strip",
ZodTypeAny,
{ text: ...; type: ... },
{ text: ...; type: ... },
>,
ZodObject<
{ image_url: ...; type: ... },
"strip",
ZodTypeAny,
{ image_url: ...; type: ... },
{ image_url: ...; type: ... },
>,
],
>,
ZodUnion<
[
ZodLiteral<"auto">,
ZodLiteral<"none">,
ZodLiteral<"required">,
ZodObject<
{ function: ...; type: ... },
"strip",
ZodTypeAny,
{ function: ...; type: ... },
{ function: ...; type: ... },
>,
],
>,
ZodObject<
{
function: ZodObject<
{ arguments: ...; name: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>;
id: ZodString;
type: ZodEffects<ZodOptional<(...)>, "function", (...) | (...)>;
},
"strip",
ZodTypeAny,
{
function: { arguments: ...; name: ... } & { [k: ...]: ... };
id: string;
type: "function";
},
{
function: { arguments: ...; name: ... } & { [k: ...]: ... };
id: string;
type?: "function";
},
>,
ZodObject<
{
function: ZodObject<
{ description: ...; name: ...; parameters: ... },
"passthrough",
ZodTypeAny,
objectOutputType<(...), (...), (...)>,
objectInputType<(...), (...), (...)>,
>;
type: ZodLiteral<"function">;
},
"passthrough",
ZodTypeAny,
objectOutputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
objectInputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
>,
ZodObject<
{
json_schema: ZodObject<
{ description: ...; name: ...; schema: ... },
"strip",
ZodTypeAny,
{ description?: ...; name: ...; schema: ... },
{ description?: ...; name: ...; schema: ... },
>;
type: ZodLiteral<"json_schema">;
},
"strip",
ZodTypeAny,
{
json_schema: {
description?: (...)
| (...);
name: string;
schema: (...) & (...);
};
type: "json_schema";
},
{
json_schema: {
description?: (...)
| (...);
name: string;
schema: (...) & (...);
};
type: "json_schema";
},
>,
>;
PHOENIX: SDKConverters<
ZodEffects<
ZodDiscriminatedUnion<
"role",
[
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
{
content: string | (...)[];
role:
| "user"
| "assistant"
| "model"
| "ai"
| "tool"
| "system"
| "developer";
},
| objectInputType<
{
content: ...;
name: ...;
role: ...;
tool_call_id: ...;
tool_calls: ...;
},
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; role: ...; tool_call_id: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>,
>,
ZodUnknown,
ZodUnknown,
ZodUnknown,
ZodUnknown,
ZodUnknown,
>;
VERCEL_AI: SDKConverters<
ZodEffects<
ZodDiscriminatedUnion<
"role",
[
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
| { content: string; role: "system" }
| { content: (...) | (...); role: "user" }
| { content: (...) | (...); role: "assistant" }
| { content: (...)[]; role: "tool" },
| objectInputType<
{
content: ...;
name: ...;
role: ...;
tool_call_id: ...;
tool_calls: ...;
},
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; role: ...; tool_call_id: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>
| objectInputType<
{ content: ...; name: ...; role: ... },
ZodTypeAny,
"passthrough",
>,
>,
ZodDiscriminatedUnion<
"type",
[
ZodObject<
{ text: ...; type: ... },
"strip",
ZodTypeAny,
{ text: ...; type: ... },
{ text: ...; type: ... },
>,
ZodObject<
{ image: ...; mimeType: ...; type: ... },
"strip",
ZodTypeAny,
{ image: ...; mimeType?: ...; type: ... },
{ image: ...; mimeType?: ...; type: ... },
>,
ZodObject<
{ args: ...; toolCallId: ...; toolName: ...; type: ... },
"strip",
ZodTypeAny,
{ args: ...; toolCallId: ...; toolName: ...; type: ... },
{ args: ...; toolCallId: ...; toolName: ...; type: ... },
>,
ZodObject<
{ result: ...; toolCallId: ...; toolName: ...; type: ... },
"strip",
ZodTypeAny,
{ result: ...; toolCallId: ...; toolName: ...; type: ... },
{ result: ...; toolCallId: ...; toolName: ...; type: ... },
>,
],
>,
ZodEffects<
ZodUnion<
[
ZodLiteral<(...)>,
ZodLiteral<(...)>,
ZodLiteral<(...)>,
ZodObject<(...), (...), (...), (...), (...)>,
],
>,
"none" | "auto" | "required" | { toolName: string; type: "tool" },
| "none"
| "auto"
| "required"
| { function: { name: ... }; type: "function" },
>,
ZodObject<
{
args: ZodType<JSONLiteral, ZodTypeDef, JSONLiteral>;
toolCallId: ZodString;
toolName: ZodString;
type: ZodLiteral<"tool-call">;
},
"strip",
ZodTypeAny,
{
args: JSONLiteral;
toolCallId: string;
toolName: string;
type: "tool-call";
},
{
args: JSONLiteral;
toolCallId: string;
toolName: string;
type: "tool-call";
},
>,
ZodEffects<
ZodObject<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
"passthrough",
ZodTypeAny,
objectOutputType<
{ function: ...; type: ... },
ZodTypeAny,
"passthrough",
>,
objectInputType<
{ function: ...; type: ... },
ZodTypeAny,
"passthrough",
>,
>,
{
description?: string;
parameters: {
_type?: unknown;
jsonSchema?: (...) | (...);
validate?: unknown;
};
type: "function";
},
objectInputType<
{
function: ZodObject<(...), (...), (...), (...), (...)>;
type: ZodLiteral<(...)>;
},
ZodTypeAny,
"passthrough",
>,
>,
ZodTypeAny,
>;
}[TargetProviderSDK]["toolCalls"]["fromOpenAI"],
>