A provider-neutral completion request.
system stays here rather than becoming a message because providers place it
differently (leading message, top-level field, or instruction field). It is
text-only: no protocol accepts a non-text system block, so a wider type would
promise what validation refuses.
provider_options is keyed by provider namespace and is for features the
canonical layer cannot express. params covers the sampling and length
controls providers share.
Summary
Types
@type modalities() :: [LlmCall.modality()]
@type system() :: nil | String.t() | [LlmCall.Content.Text.t()]
@type t() :: %LlmCall.Request{ messages: [LlmCall.Message.t()], modalities: modalities(), model: String.t(), output: output(), params: params(), provider_options: map(), reasoning: LlmCall.Reasoning.t() | nil, stream: boolean(), system: system(), tool_choice: tool_choice(), tools: [tool_entry()] }
@type tool_entry() :: LlmCall.ToolSpec.t() | module() | {module(), keyword()}
A tool entry: a canonical spec, a ToolCall module, or {module, opts}.
A module expands to one LlmCall.ToolSpec per declared tool when the request
is encoded, with the schema projected for the codec's protocol. Callers that
already hold specs pass them unchanged.