Skip to main content

fetch_and_cache

Function fetch_and_cache 

Source
pub fn fetch_and_cache(cache_path: &str) -> Result<ModelsDevPayload>
Expand description

Fetch models from the models.dev API and cache the raw payload to disk.

The cache file is written byte-identical to the upstream response, so it diffs cleanly against https://models.dev/api.json and round-trips through load_cache.