# `ReqLLM.Output.Result`
[🔗](https://github.com/agentjido/req_llm/blob/main/lib/req_llm/output/result.ex#L1)

Describes how a complete `ReqLLM.Output` value was materialized and validated.

Results keep the retained raw provider value, projected value, validation
errors, warnings, repair attempts, extraction source, and provider metadata
separate. They are computed with `ReqLLM.Response.output_result/3` and do not
change the response or trigger another model call.

# `repair`

```elixir
@type repair() :: %{
  :type =&gt; :json_repair | :legacy_type_coercion | :callback,
  :status =&gt; :applied | :failed,
  optional(:reason) =&gt; String.t()
}
```

# `source`

```elixir
@type source() :: :text | :tool_call | :response_object | :missing
```

# `t`

```elixir
@type t() :: %ReqLLM.Output.Result{
  errors: [validation_error()],
  policy: ReqLLM.Output.validation_policy(),
  provider_metadata: map(),
  raw: term(),
  repairs: [repair()],
  source: source(),
  valid?: boolean(),
  value: term(),
  warnings: [String.t()]
}
```

# `validation_error`

```elixir
@type validation_error() :: %{
  type: :missing_value | :invalid_type | :schema_validation,
  message: String.t()
}
```

---

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