# `LlmCall.Request`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/request.ex#L1)

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.

# `modalities`

```elixir
@type modalities() :: [LlmCall.modality()]
```

# `output`

```elixir
@type output() ::
  :text | :json_object | {:json_schema, String.t(), map(), boolean() | nil}
```

# `params`

```elixir
@type params() :: %{
  optional(atom()) =&gt; nil | boolean() | number() | String.t() | [String.t()]
}
```

# `system`

```elixir
@type system() :: nil | String.t() | [LlmCall.Content.Text.t()]
```

# `t`

```elixir
@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: [LlmCall.ToolSpec.t()]
}
```

# `tool_choice`

```elixir
@type tool_choice() ::
  :auto | :none | :required | {:tool, String.t()} | {:allowed, [String.t()]}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
