Skip to main content

Module models_dev

Module models_dev 

Source
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:

  • models are provider-agnostic model facts.
  • providers.*.models are 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§

ModelsDevCatalog
Combined Models.dev catalog payload.
ModelsDevCost
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.
ModelsDevLimit
Token limits.
ModelsDevModalities
Input/output modalities.
ModelsDevModel
Provider-agnostic model facts from models.json / catalog.models.
ModelsDevProvider
Provider row from Models.dev.
ModelsDevProviderModel
Provider-scoped model row from api.json / catalog.providers.*.models.

Enums§

ModelsDevInterleaved
Interleaved reasoning metadata from a Models.dev provider row.

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.

Functions§

image_input_support
Resolve the exact image-input fact from a provider-owned modality block. Missing or empty input metadata remains unknown; stated text-only input is unsupported rather than silently treated as unknown.