Variable llmProviderMessageSchemaConst
llmProviderMessageSchema: ZodUnion<
readonly [
ZodDiscriminatedUnion<
[
ZodObject<
{
content: ZodUnion<
readonly [
ZodArray<ZodObject<{ text: ...; type: ... }, $strip>>,
ZodString,
],
>;
name: ZodOptional<ZodString>;
role: ZodLiteral<"assistant">;
tool_call_id: ZodOptional<ZodString>;
tool_calls: ZodOptional<
ZodArray<
ZodObject<
{
function: ZodObject<(...), (...)>;
id: ZodString;
type: ZodPipe<(...), (...)>;
},
$strip,
>,
>,
>;
},
$loose,
>,
ZodObject<
{
content: ZodUnion<
readonly [
ZodArray<ZodObject<{ text: ...; type: ... }, $strip>>,
ZodString,
],
>;
role: ZodLiteral<"tool">;
tool_call_id: ZodString;
},
$loose,
>,
ZodObject<
{
content: ZodNullable<ZodString>;
name: ZodString;
role: ZodLiteral<"function">;
},
$loose,
>,
],
"role",
>,
ZodObject<
{
content: ZodUnion<
readonly [
ZodString,
ZodArray<
ZodDiscriminatedUnion<
[
ZodObject<{ text: ...; type: ... }, $strip>,
ZodObject<{ source: ...; type: ... }, $strip>,
ZodObject<{ id: ...; input: ...; name: ...; type: ... }, $strip>,
ZodObject<
{ content: ...; is_error: ...; tool_use_id: ...; type: ... },
$strip,
>,
],
"type",
>,
>,
],
>;
role: ZodEnum<{ assistant: "assistant"; user: "user" }>;
},
$loose,
>,
ZodObject<
{
content: ZodUnion<
readonly [
ZodString,
ZodArray<
ZodDiscriminatedUnion<
[
ZodObject<{ text: ...; type: ... }, $strip>,
ZodObject<{ tool_call: ...; tool_call_id: ...; type: ... }, $strip>,
ZodObject<
{ tool_call_id: ...; tool_result: ...; type: ... },
$strip,
>,
],
"type",
>,
>,
],
>;
role: ZodEnum<
{
ai: "ai";
assistant: "assistant";
developer: "developer";
model: "model";
system: "system";
tool: "tool";
user: "user";
},
>;
},
$strip,
>,
ZodDiscriminatedUnion<
[
ZodObject<{ content: ZodString; role: ZodLiteral<"system"> }, $strip>,
ZodObject<
{
content: ZodUnion<
readonly [ZodArray<ZodUnion<readonly [(...), (...)]>>, ZodString],
>;
role: ZodLiteral<"user">;
},
$strip,
>,
ZodObject<
{
content: ZodUnion<
readonly [ZodArray<ZodUnion<readonly [(...), (...)]>>, ZodString],
>;
role: ZodLiteral<"assistant">;
},
$strip,
>,
ZodObject<
{
content: ZodArray<
ZodObject<
{
output: ZodObject<{ type: ...; value: ... }, $strip>;
toolCallId: ZodString;
toolName: ZodString;
type: ZodLiteral<"tool-result">;
},
$strip,
>,
>;
role: ZodLiteral<"tool">;
},
$strip,
>,
],
"role",
>,
],
> = ...
Union of all message formats