getProviderCatalog
getProviderCatalog(
providerId,options?):Promise<ProviderCatalog|null>
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelCatalog.ts:255
Get the models.dev catalog slice for one provider, cache-first.
- Local / self-hosted (
ollama, or any provider without a MODELS_DEV_PROVIDER_KEY): returnsnullimmediately, with no network call. - Cloud, fresh cache (and not
refresh): returns the cached slice, no network call. - Cloud, missing / stale cache, or
refresh: fetchesapi.jsononce, slices this provider, writes the slice to the per-provider cache, and returns it. - Fetch fails: returns the stale cached slice if one exists (degrade, don’t blank), else
null.
NEVER throws — catalog availability must never block model use.
Parameters
Section titled “Parameters”providerId
Section titled “providerId”options?
Section titled “options?”CatalogOptions = {}
Returns
Section titled “Returns”Promise<ProviderCatalog | null>