Skip to main content
  • Version 0.1.0
  • Purity pure zero-dep (browser-safe; no workspace or external deps, no node:*)
  • Purpose Hold the static OpenClaw provider/model catalog and the pure helpers that read it, in one place both apps/web/src (the model pickers) and apps/web/server (the /api/system/models route) can import.
  • Workspace deps none
  • External deps none
Model ids use the OpenClaw routing shape, provider/model-id, because OpenClaw splits on the first /. That is deliberately distinct from the native harness’s catalog (apps/web/src/lib/nativeModelCatalog.ts), which uses provider-native ids because it passes the model straight to a provider SDK. This package exists to keep a layer boundary honest. The catalog previously lived at apps/web/src/lib/modelCatalog.ts and the Express server reached into SPA source to read it, the only such import in the tree. Extracting it means the server imports a package like any other, and the no-restricted-imports boundary rules in eslint.config.mjs can forbid apps/web/server from importing apps/web/src outright. apps/web/src/lib/modelCatalog.ts remains as a one-line re-export shim so the existing SPA call sites are unchanged.

Public API

Functions

Types & interfaces

Classes

None; this package exports only functions, types, and constants.

Constants

The catalog is the source of truth for casing, not for availability. The live /api/system/models groups come from the OpenClaw CLI, which emits lowercase provider ids; the server canonicalizes those against MODEL_GROUPS through providerSlug and only falls back to the static catalog when the CLI is unavailable. Comparing with a bare .toLowerCase() instead of providerSlug mismatches on spaces and hyphens, which is what silently dropped Hugging Face before the slug was extracted.

Used by

  • apps/web (server); api/system.ts builds its canonical-name map from MODEL_GROUPS keyed by providerSlug, rewrites each live CLI group onto the catalog’s casing, supplements missing known providers from the catalog, and serves the full filtered catalog when the CLI is unavailable.
  • apps/web (SPA); the model pickers and onboarding read it through the @/lib/modelCatalog shim: features/teams/CreateTeamModal.tsx, features/teams/MemberModelSelect.tsx, features/onboarding/steps/ConfigureStep.tsx, features/agent-detail/AgentModelSelector.tsx, features/maintenance/ModelSelector.tsx, plus the lib/useModelCatalog.ts / lib/useProviderModels.ts / lib/useOpenRouterModels.ts hooks and lib/modelProvider.ts.

Source

Barrel: packages/model-catalog/src/index.ts (re-exports ./catalog).

See also

Last modified on August 3, 2026