janhq/jan · error
Catalog not supported for
Error message
Catalog not supported for ${provider.provider} What it means
fetchTopRemoteModels throws this when resolveCatalogKind(provider) returns null, i.e. the provider's type is not one of the supported remote catalog kinds (e.g. only OpenAI/Anthropic-style providers have model list catalogs). It signals that 'list top models' is not implemented for this provider rather than a network failure.
Solutions
- Only call fetchTopRemoteModels for providers where resolveCatalogKind(provider) is non-null; show manual model entry otherwise.
- Extend resolveCatalogKind to map the new provider kind if the upstream API actually supports /models.
- Catch the error in UI and fall back to a user-supplied model id input.
Example fix
// before
const models = await fetchTopRemoteModels(provider, fetch)
// after
if (resolveCatalogKind(provider)) {
const models = await fetchTopRemoteModels(provider, fetch)
} else {
showManualModelInput(provider)
} Defensive patterns
Strategy: fallback
Validate before calling
if (!resolveCatalogKind(provider)) { showManualModelInput(provider); return } Type guard
const supportsCatalog = (p) => resolveCatalogKind(p) !== null
Try / catch
try { models = await fetchTopRemoteModels(provider, fetch) } catch (e) { if (e.message.startsWith('Catalog not supported')) { models = [] } else throw e } Prevention
- Only offer 'Fetch models' for providers with a known catalog kind.
- Keep resolveCatalogKind mappings in sync with new provider types.
- Always provide a manual model-id fallback in the UI.
When it happens
Trigger: Calling fetchTopRemoteModels with an Ollama/llama.cpp/local provider or a custom remote provider whose kind isn't mapped; provider misconfigured so its discriminator no longer resolves.
Common situations: Showing a model catalog for every provider in settings without gating on supported kinds; custom OpenAI-compatible proxies not registered as a catalog kind; new provider type added without extending resolveCatalogKind.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Failed to fetch models from
- No API key configured for
- Provider configuration is required
- Provider must have base_url configured
- Provider must have base_url configured
AI-assisted analysis of janhq/jan@7205d770c1 (2026-09-17).
Data as JSON: /api/errors/8c462bc14eafe14f.
Report an issue: GitHub.
Appendix: source
Thrown at web-app/src/lib/remoteModelCatalog.ts:202
body = await response.json()
} catch {
body = null
}
return {
ok: response.ok,
status: response.status,
statusText: response.statusText,
body,
}
}
export async function fetchTopRemoteModels(
provider: ProviderLike,
fetchImpl: FetchImpl
): Promise<RemoteCatalogModel[]> {
const kind = resolveCatalogKind(provider)
if (!kind) {
throw new Error(`Catalog not supported for ${provider.provider}`)
}
if (!provider.base_url) {
throw new Error('Provider must have base_url configured')
}
const keyChain = providerRemoteApiKeyChain(provider)
const attempts: (string | undefined)[] = keyChain.length > 0 ? keyChain : [undefined]
let lastStatus = 0
let lastStatusText = ''
for (let i = 0; i < attempts.length; i++) {
const result = await getJson(
fetchImpl,
`${provider.base_url}/models`,
buildHeaders(provider, attempts[i])
)
lastStatus = result.status
lastStatusText = result.statusTextView on GitHub (pinned to 7205d770c1)