# `OzMcp.Structs.ModelPreferences`
[🔗](https://github.com/oz-elixir/oz_mcp/blob/v0.9.0/lib/oz_mcp/structs/model_preferences.ex#L1)

Helper module used to build `ModelPreferences` structure: what the server
prefers when the client chooses a model. The client has the last word.

_(MCP protocol: 2025-11-25)_

`hints` is a list of model names (strings) or maps with a `name`. The
priorities are numbers from `0` to `1`.

## Short example:

```elixir
%ModelPreferences{}
  |> ModelPreferences.hints(["claude-3-sonnet"])
  |> ModelPreferences.intelligence_priority(0.8)
  |> ModelPreferences.build()
```

Result:

```elixir
%{hints: [%{name: "claude-3-sonnet"}], intelligencePriority: 0.8}
```

Specification: [ModelPreferences](https://modelcontextprotocol.io/specification/2025-11-25/schema#modelpreferences)

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `hints` | `hints/2` | list(String.t() \| map()) \| nil | no |
| `costPriority` | `cost_priority/2` | number between 0 and 1 | no |
| `speedPriority` | `speed_priority/2` | number between 0 and 1 | no |
| `intelligencePriority` | `intelligence_priority/2` | number between 0 and 1 | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.ModelPreferences{
  costPriority: number() | nil,
  hints: [String.t() | map()] | nil,
  intelligencePriority: number() | nil,
  speedPriority: number() | nil
}
```

# `build`

```elixir
@spec build(t()) :: map()
```

# `cost_priority`

```elixir
@spec cost_priority(t(), number() | nil) :: t()
```

# `hints`

```elixir
@spec hints(t(), [String.t() | map()] | nil) :: t()
```

# `intelligence_priority`

```elixir
@spec intelligence_priority(t(), number() | nil) :: t()
```

# `speed_priority`

```elixir
@spec speed_priority(t(), number() | nil) :: t()
```

---

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