# Models catalog The models extension supplies model metadata to the harness. Provider extensions can also supply model lists and metadata. Authentication and profile selection are described in [model authentication](auth.md). ## Cache The [models extension](../src/albedo/harness/extensions/models/extension.gleam) stores the catalog as `models.json` in the Albedo home. Its default URL is `https://models.dev/api.json`, and its default refresh interval is 24 hours. A refresh runs in the background when the cache is missing or old. A failed fetch keeps the previous cache. `refreshHours` set to zero disables that automatic fetch. An explicit reload reports fetch errors. The typed [catalog projection](../src/albedo/harness/extensions/models/catalog.gleam) decodes provider and model metadata and trims fetched catalogs to the fields lookup uses. The [native cache](../src/albedo/harness/extensions/models/albedo_models.erl) owns file revisions, isolated parsing, the persisted version-2 index, and publication of the provider and model maps together. Legacy untrimmed files are rewritten on first parse while preserving their modification time. The catalog is external data, not a guarantee of a provider's current offerings. ## Lookup [`catalog.select`](../src/albedo/harness/extensions/models/catalog.gleam) uses the endpoint host to select a provider when possible. `chatgpt.com` selects the OpenAI catalog identity. Without an attributed match, it uses the smallest known context limit, reports an output limit only when known limits agree, and intersects reported modalities and efforts. `select_provider` instead requires the named provider. When a model is missing, the [extension lookup](../src/albedo/harness/extensions/models/extension.gleam) can infer low, medium, and high reasoning efforts from certain model names. That fallback does not supply catalog limits. A failed lookup otherwise returns no metadata. ## Model lists [`model_lists`](../src/albedo/harness/model_lists.gleam) exposes `ids`, `refetch`, `saved`, and `ready` for provider-specific lists. The [native cache](../src/albedo/harness/albedo_model_lists.erl) stores lists separately from the general catalog and applies success and failure expiry periods. Consumers must handle a missing or unavailable list. The [proxy](proxy.md) uses profile and catalog information when it lists models. OpenAI-compatible lists share [`catalog.ids`](../src/albedo/openai_api/catalog.gleam) for sorted, unique IDs. Providers retain eligibility, credential precedence, headers, timeouts, and HTTP status policy. The [ordinary HTTP client](../src/albedo/harness/http.gleam) preserves response headers for conditional catalog requests. Mixed-credential catalog reads do not establish model-session affinity. ## Related pages - [All topics](README.md) - [Change guidance](contributing.md) - [Model authentication](auth.md) - [Compaction](compaction.md) - [Image generation](imagegen.md): driver selection and image model settings.