# `Jidoka.Agent.Spec.Generation`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/agent/spec/generation.ex#L1)

Provider-facing generation defaults for an agent.

Generation parameters are intentionally permissive because the supported
option set varies by model and provider. Jidoka owns the merge shape, while
ReqLLM/provider clients own final option validation.

# `t`

```elixir
@type t() :: %Jidoka.Agent.Spec.Generation{
  extra: map(),
  params: map(),
  provider_options: map()
}
```

# `from_input`

```elixir
@spec from_input(t() | keyword() | map() | nil) :: {:ok, t()} | {:error, term()}
```

Normalizes optional generation settings.

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds generation settings from keyword or map attributes.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds generation settings and raises if the attributes are invalid.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for model generation settings.

# `to_req_llm_opts`

```elixir
@spec to_req_llm_opts(t() | keyword() | map() | nil) :: keyword()
```

Converts generation settings to options for ReqLLM.

---

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