models.dev database service. Defines the schema for provider/model metadata (costs, limits, capabilities) and loads it from a configured on-disk path or the build-time generated snapshot, caching the result indefinitely.

Classes

Service

Members

(static, constant) Model

Schema for a single model's metadata in the models.dev database.

(static, constant) Provider

Schema for a provider entry in the models.dev database (its models keyed by id).

(static, constant) defaultLayer

The ModelsDev layer with its AppFileSystem dependency provided.

(static, constant) layer

Layer building the ModelsDev service. Loads the model database from the CLOSEDCODE_MODELS_PATH file if set, else the bundled build-time snapshot (else {}), and caches it forever — exposing get and a refresh invalidator.

(inner, constant) Cost

Per-token cost schema, with an optional override for >200k-token contexts.