Expand description
Models.dev catalog schema and helpers.
Models.dev is the upstream taxonomy CodeWhale should use for model facts, provider offerings, pricing, limits, and capabilities. This module is intentionally network-free: callers provide JSON from a bundled snapshot, live refresh, or tests. Runtime fetch/cache policy belongs above this layer.
The important boundary is the same one Models.dev uses:
modelsare provider-agnostic model facts.providers.*.modelsare provider-scoped wire offerings.
A provider row may inline inherited facts without exposing a canonical
base_model link. CodeWhale must preserve that distinction instead of
inferring canonical ownership from wire IDs or namespace prefixes.
Structs§
- Models
DevCatalog - Combined Models.dev catalog payload.
- Models
DevCost - Provider-scoped cost fields. Values are per million tokens unless a future Models.dev row specifies a richer tiering object in fields CodeWhale does not yet model.
- Models
DevInterleaved - Interleaved reasoning field metadata.
- Models
DevLimit - Token limits.
- Models
DevModalities - Input/output modalities.
- Models
DevModel - Provider-agnostic model facts from
models.json/catalog.models. - Models
DevProvider - Provider row from Models.dev.
- Models
DevProvider Model - Provider-scoped model row from
api.json/catalog.providers.*.models.
Constants§
- MODELS_
DEV_ API_ URL - Provider catalog endpoint used by Models.dev.
- MODELS_
DEV_ CATALOG_ URL - Combined
{ models, providers }endpoint used by Models.dev. - MODELS_
DEV_ MODELS_ URL - Provider-agnostic model metadata endpoint used by Models.dev.