Canonical model registry with capability metadata.
The registry is sourced from the Gemini models catalog pages and provides a stable API for:
- model lookup by code (including resource-style names and aliases)
- capability checks (for example
:live_api,:function_calling) - live-model candidate selection by modality (
:text/:audio)
This keeps model selection logic out of tests and centralizes support decisions in one place.
Summary
Functions
Returns capability state for a model code.
Returns all registry entries.
Find an entry by model code.
Find an entry by registry key.
Returns preferred Live API candidates for a modality.
Returns all canonical model codes.
Returns true if a model's capability matches the expected state.
Returns model codes whose capability matches the expected state.
Types
@type capability() ::
:live_api
| :thinking
| :function_calling
| :structured_outputs
| :audio_generation
| :image_generation
| :batch_api
| :caching
@type entry() :: %{ key: atom(), code: String.t(), source_page: String.t(), track: :stable | :preview | :experimental | :deprecated | :agent, latest_update: String.t() | nil, input_modalities: [modality()], output_modalities: [modality()], capabilities: %{optional(capability()) => support_state()}, aliases: [String.t()], live_modalities: [modality()], notes: String.t() | nil }
@type modality() :: :text | :image | :video | :audio | :pdf | :embeddings | :music
@type support_state() :: :supported | :not_supported | :experimental | :unknown
Functions
@spec capability(String.t(), capability()) :: support_state()
Returns capability state for a model code.
@spec entries() :: [entry()]
Returns all registry entries.
Find an entry by model code.
Accepts plain model names, models/..., publisher-prefixed, project-scoped,
and endpoint-suffixed (:bidiGenerateContent) forms.
Find an entry by registry key.
Returns preferred Live API candidates for a modality.
@spec model_codes() :: [String.t()]
Returns all canonical model codes.
@spec supports?(String.t(), capability(), support_state()) :: boolean()
Returns true if a model's capability matches the expected state.
@spec with_capability(capability(), support_state()) :: [String.t()]
Returns model codes whose capability matches the expected state.