Skip to main content

Module sync

Module sync 

Source
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_catalog refreshes 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§

CatalogDiff
Summary of what a merge_catalog pass changed.
PriceDelta
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.json document into its provider list.
serialize_catalog
Serialize a provider list back into the canonical catalog.json form (pretty-printed, 2-space indent, trailing newline).