Skip to main content

resolve

Function resolve 

Source
pub fn resolve(catalog_id: &str) -> Mapping
Expand description

Resolve a catalog provider id to its models.dev counterpart.

Returns Mapping::Exact when the id matches a models.dev key directly, Mapping::Aliased with the upstream key when an alias is known, and Mapping::Manual for catalog providers absent from models.dev (local engines and curated passthroughs such as native). Callers should keep Mapping::Manual providers untouched during sync.

When adding a provider to catalog.json, decide its mapping here so the table stays in sync — otherwise it silently resolves to Mapping::Manual.