mix models.get (Omni v1.3.1)

Copy Markdown View Source

Fetches model catalog data from models.dev and writes JSON files to priv/models/.

mix models.get

Each supported provider gets a JSON file containing an array of model objects with fields matching the Omni.Model struct: id, name, reasoning, release_date, dialect, input_modalities, output_modalities, input_cost, output_cost, cache_read_cost, cache_write_cost, context_size, and max_output_tokens.

The dialect field is a string identifier (e.g. "anthropic_messages", "openai_responses") inferred from the models.dev npm package metadata. It is resolved to a module by Omni.Dialect.get!/1 at load time. For single-dialect providers the field is present but ignored — the provider's declared dialect takes priority.

Models that are deprecated or lack tool use support are filtered out. Modalities are filtered to those Omni supports (input: text, image, pdf; output: text). Output is sorted by id for stable diffs.