- 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) andapps/web/server(the/api/system/modelsroute) can import. - Workspace deps none
- External deps none
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.tsbuilds its canonical-name map fromMODEL_GROUPSkeyed byproviderSlug, 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/modelCatalogshim:features/teams/CreateTeamModal.tsx,features/teams/MemberModelSelect.tsx,features/onboarding/steps/ConfigureStep.tsx,features/agent-detail/AgentModelSelector.tsx,features/maintenance/ModelSelector.tsx, plus thelib/useModelCatalog.ts/lib/useProviderModels.ts/lib/useOpenRouterModels.tshooks andlib/modelProvider.ts.
Source
Barrel:packages/model-catalog/src/index.ts (re-exports ./catalog).
See also
- Monorepo & build, the layer boundaries this package exists to keep
- System REST API, the
/api/system/modelsroute that reads the catalog - Package overview