mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-05 21:50:46 +08:00
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com> Signed-off-by: Vaayne <liu.vaayne@gmail.com>
@cherrystudio/provider-registry
Bundled AI provider and model catalog for Cherry Studio: static JSON data files plus TypeScript schemas for reading them.
Internal package — not published to npm. It's
privateand consumed only inside this monorepo (the app resolves it tosrc/directly; the main process readsdata/*.jsonfrom the bundled resources). The imports below are for in-repo consumers via the workspace, not an external install.
Contributing? The
data/*.jsonfiles are generated — never hand-edit them. Editsrc/creators//src/providers/and runpnpm generate. See CLAUDE.md and docs/architecture.md.
Data Files
data/
models.json # Base model catalog (capabilities, limits, pricing)
providers.json # Provider configurations (endpoints, API features)
provider-models.json # Per-provider model overrides
Usage
import {
readModelRegistry,
readProviderRegistry,
readProviderModelRegistry
} from '@cherrystudio/provider-registry/node'
const models = readModelRegistry('/path/to/models.json')
const providers = readProviderRegistry('/path/to/providers.json')
const overrides = readProviderModelRegistry('/path/to/provider-models.json')
Schema Types
import type {
ProtoModelConfig,
ProtoProviderConfig,
ProtoProviderModelOverride,
EndpointType,
ModelCapability,
Modality
} from '@cherrystudio/provider-registry'
Build
pnpm build