mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-07-07 23:33:14 +08:00
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: suyao <sy20010504@gmail.com>
1.5 KiB
1.5 KiB
@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