# `PtcRunner.LLM.Requirements`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/llm/requirements.ex#L1)

Closed, bounded model-contract requirements sealed into a prepared target.

Kernel constructs this map after manifest selection and before credentials.
`PtcRunner.LLM.prepare/2` validates both the requested map and the adapter
attestation, then requires exact canonical equality. The output-limit binding
records whether the effective application limit, installation parameter, or
both selected the effective `max_tokens`; adapters carry that fact into
authenticated truncation metadata.

# `cost_tariff`

```elixir
@type cost_tariff() :: %{currency: String.t(), id: binary()}
```

# `exact_options`

```elixir
@type exact_options() :: %{
  :max_tokens =&gt; pos_integer(),
  optional(:temperature) =&gt; float(),
  optional(:seed) =&gt; non_neg_integer(),
  optional(:top_p) =&gt; float(),
  optional(:presence_penalty) =&gt; float(),
  optional(:frequency_penalty) =&gt; float(),
  optional(:reasoning_effort) =&gt; :none | :minimal | :low | :medium | :high
}
```

# `output_limit_binding`

```elixir
@type output_limit_binding() :: :application_limit | :installation_param | :configured
```

# `reservation`

```elixir
@type reservation() :: %{total_tokens?: boolean(), cost_tariff: cost_tariff() | nil}
```

# `t`

```elixir
@type t() :: %{
  exact_options: exact_options(),
  output_limit_bindings: [output_limit_binding(), ...],
  structured_output_mode: :json_schema | :json_object | :unsupported,
  usage_guarantees: usage_guarantees(),
  reservation: reservation()
}
```

# `usage_guarantees`

```elixir
@type usage_guarantees() :: %{tokens: boolean(), cost_currency: String.t() | nil}
```

# `canonical`

```elixir
@spec canonical(term()) :: {:ok, t()} | :error
```

# `equal?`

```elixir
@spec equal?(t(), t()) :: boolean()
```

# `interim`

```elixir
@spec interim(exact_options()) :: t()
```

Returns a requirement map for direct embedders that do not request reporting
guarantees or reservation authority.

# `interim`

```elixir
@spec interim(exact_options(), :json_schema | :json_object | :unsupported) :: t()
```

# `live`

```elixir
@spec live(
  map(),
  pos_integer(),
  :json_schema | :json_object | :unsupported,
  usage_guarantees(),
  reservation()
) :: {:ok, t()} | :error
```

# `probe`

```elixir
@spec probe(map(), usage_guarantees()) :: {:ok, t()} | :error
```

# `probe`

```elixir
@spec probe(map(), usage_guarantees(), reservation()) :: {:ok, t()} | :error
```

---

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