Expand description
Client for the models.dev model catalog API. Client for the models.dev model catalog API.
Fetches the live catalog from https://models.dev/api.json, whose top-level
shape is a provider-keyed map:
{ "<provider_id>": { "id": ..., "env": [...], "api": ...,
"models": { "<model_id>": { "cost": {...}, "limit": {...}, ... } } } }Results are flattened into ModelEntry records carrying the full
models.dev metadata (pricing, limits, modalities, capabilities) so they can
feed crate::provider::ProviderIndex::with_discovered.
Structs§
- Model
Entry - A single model entry discovered from a remote catalog.
- Model
Limits - Token limits reported by a discovery source for a single model.
- Models
DevPayload - Top-level response payload from the models.dev API: a provider-keyed map.
Functions§
- fetch
- Fetch and parse the catalog from the default models.dev endpoint (no cache).
- fetch_
and_ cache - Fetch models from the models.dev API and cache the raw payload to disk.
- fetch_
from - Fetch and parse the models.dev catalog from
url(no disk cache). - load_
cache - Load previously cached models.dev data.