# `Pixir.ModelsRefresh`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/pixir/models_refresh.ex#L1)

Explicit, fail-closed model-catalog discovery.

Refresh is never invoked implicitly. Each provider is queried only when Pixir has
an authentication kind supported by that provider's public models endpoint.
Successful provider lists are merged into the raw config JSON with an atomic write;
skipped or failed providers retain their existing config keys.

# `result`

```elixir
@type result() :: %{required(String.t()) =&gt; term()}
```

# `catalog`

```elixir
@spec catalog(keyword()) :: {:ok, result()} | {:error, map()}
```

Return the current effective catalogs and their local source without network access.

# `refresh`

```elixir
@spec refresh(keyword()) :: {:ok, result()} | {:error, map()}
```

Query supported model endpoints and atomically persist each successful catalog.

---

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