Expand description
Catalog sync tooling — merge models.dev into the embedded catalog. Catalog sync engine — merge a live models.dev payload into the embedded catalog.
The catalog is split into two concerns:
- Connection metadata (auth, base URL, install-wizard text, model tiers): llm-kernel-specific, always kept from the catalog.
- Model data (pricing, limits, modalities, capabilities): the source of
truth is models.dev.
merge_catalogrefreshes it for every provider that maps to models.dev (crate::provider::mapping); providers with no upstream counterpart are left untouched.
merge_catalog is pure (no I/O) so it is unit-testable without network.
Structs§
- Catalog
Diff - Summary of what a
merge_catalogpass changed. - Price
Delta - A change in a model’s per-million-token pricing across a sync.
Functions§
- fetch_
models_ dev - Fetch the live models.dev catalog, optionally from a custom URL.
- merge_
catalog - Merge a models.dev payload into the current catalog.
- parse_
catalog - Parse a
catalog.jsondocument into its provider list. - serialize_
catalog - Serialize a provider list back into the canonical
catalog.jsonform (pretty-printed, 2-space indent, trailing newline).