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:
%ModelPreferences{}
|> ModelPreferences.hints(["claude-3-sonnet"])
|> ModelPreferences.intelligence_priority(0.8)
|> ModelPreferences.build()Result:
%{hints: [%{name: "claude-3-sonnet"}], intelligencePriority: 0.8}Specification: 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 |