A non-tool message in the OpenAI-compatible request body.
Discriminated on role rather than a single interface with a union-typed role, because every
provider SDK models it that way — a flat interface fails to narrow when assigned to theirs.
tool_calls rides on the assistant turn; without it the tool messages answering those calls
are orphaned and the provider rejects the conversation.
A non-tool message in the OpenAI-compatible request body.
Discriminated on
rolerather than a single interface with a union-typed role, because every provider SDK models it that way — a flat interface fails to narrow when assigned to theirs.tool_callsrides on the assistant turn; without it thetoolmessages answering those calls are orphaned and the provider rejects the conversation.