# `Gemini.ModelRegistry`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L1)

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.

# `capability`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L18)

```elixir
@type capability() ::
  :live_api
  | :thinking
  | :function_calling
  | :structured_outputs
  | :audio_generation
  | :image_generation
  | :batch_api
  | :caching
```

# `entry`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L30)

```elixir
@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()) =&gt; support_state()},
  aliases: [String.t()],
  live_modalities: [modality()],
  notes: String.t() | nil
}
```

# `modality`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L28)

```elixir
@type modality() :: :text | :image | :video | :audio | :pdf | :embeddings | :music
```

# `support_state`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L16)

```elixir
@type support_state() :: :supported | :not_supported | :experimental | :unknown
```

# `capability`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L646)

```elixir
@spec capability(String.t(), capability()) :: support_state()
```

Returns capability state for a model code.

# `entries`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L609)

```elixir
@spec entries() :: [entry()]
```

Returns all registry entries.

# `get`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L632)

```elixir
@spec get(String.t()) :: entry() | nil
```

Find an entry by model code.

Accepts plain model names, `models/...`, publisher-prefixed, project-scoped,
and endpoint-suffixed (`:bidiGenerateContent`) forms.

# `get_by_key`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L623)

```elixir
@spec get_by_key(atom()) :: entry() | nil
```

Find an entry by registry key.

# `live_candidates`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L677)

```elixir
@spec live_candidates(
  :text | :audio,
  keyword()
) :: [String.t()]
```

Returns preferred Live API candidates for a modality.

# `model_codes`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L615)

```elixir
@spec model_codes() :: [String.t()]
```

Returns all canonical model codes.

# `supports?`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L657)

```elixir
@spec supports?(String.t(), capability(), support_state()) :: boolean()
```

Returns true if a model's capability matches the expected state.

# `with_capability`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/model_registry.ex#L666)

```elixir
@spec with_capability(capability(), support_state()) :: [String.t()]
```

Returns model codes whose capability matches the expected state.

---

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