What one image model accepts, in provider-neutral terms.
Built from a provider's capability listing (OpenRouter publishes one at
/images/models; other providers get a static list from their adapter)
and used by PhoenixKitAI.Images to keep a request inside what the
model can do: an option the model does not list is dropped with a
warning, or refused when the caller asked for strict: true.
params maps an option name to its constraint:
{:enum, values}— one ofvalues(strings){:range, min, max}— an integer within the range:boolean— accepted, any value:any— accepted, unconstrained
The option names are the ones PhoenixKitAI.Images uses everywhere:
:aspect_ratio, :resolution, :size, :quality, :background,
:output_format, :output_compression, :n, :seed,
:input_references.
Summary
Functions
Whether value is acceptable for option on this model. Unknown
options are not; values are compared as strings for enums.
Builds a model from one entry of OpenRouter's /api/v1/images/models
listing. supported_parameters there is typed per field
(%{"type" => "enum", "values" => [...]} /
%{"type" => "range", "min" => m, "max" => n} /
%{"type" => "boolean"}).
How many reference images the model takes for an edit (nil = unknown).
Whether the model lists option at all.
The values an enum option accepts, or [].
Types
Functions
Whether value is acceptable for option on this model. Unknown
options are not; values are compared as strings for enums.
Builds a model from one entry of OpenRouter's /api/v1/images/models
listing. supported_parameters there is typed per field
(%{"type" => "enum", "values" => [...]} /
%{"type" => "range", "min" => m, "max" => n} /
%{"type" => "boolean"}).
@spec max_references(t() | nil) :: non_neg_integer() | nil
How many reference images the model takes for an edit (nil = unknown).
Whether the model lists option at all.
The values an enum option accepts, or [].