# `OpenrouterSdk.Catalog.Models`
[🔗](https://github.com/zmzlois/openrouter_sdk/blob/v0.1.0/lib/openrouter_sdk/catalog/models.ex#L1)

hard-coded snapshot of `/api/v1/models`.

embedded into the beam at compile time so lookups are zero-io. the
contents are managed by `mix openrouter.snapshot` and kept fresh by
ci — see `.github/workflows/openrouter-drift.yml`.

the catalog is purely informational. nothing in this sdk validates
that a model id passed to `Api.Chat.completions/2` exists here —
consumers can use this list to drive their own routing / rotation /
fallback policies.

# `context_length`

```elixir
@spec context_length(String.t()) :: integer() | nil
```

context length for a model id, or nil

# `get`

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

lookup by id, returns nil if absent

# `list`

```elixir
@spec list() :: [map()]
```

all models in the snapshot

# `list`

```elixir
@spec list(keyword()) :: [map()]
```

filter the snapshot.

supported keys: `:modality`, `:supported_parameter`, `:provider_id`.

# `pricing`

```elixir
@spec pricing(String.t()) :: map() | nil
```

pricing map for a model id, or nil

# `version`

```elixir
@spec version() :: String.t()
```

snapshot version (iso date or `unseeded`)

---

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