Skip to main content

Module catalog

Module catalog 

Source
Expand description

Compile-time model catalog hydrated from models.dev + liter-llm provider registry.

The catalog is embedded at build time by build.rs as a JSON blob via include_str!. It provides typed access to provider routing data, model capabilities, pricing, and context limits — used by the [ProviderRegistry], model router, and admin UI.

Structs§

CapabilityFilter
Filter for querying models by capability requirements.
Modalities
Input/output modalities.
ModelCapabilities
Model capability flags.
ModelCatalog
Top-level catalog containing all known providers and their models.
ModelCost
Pricing per 1M tokens (in USD).
ModelInfo
Model information from the catalog.
ModelLimits
Context and output token limits.
ProviderAuth
Provider authentication configuration.
ProviderInfo
Provider information from the merged catalog.

Functions§

estimate_cost
Estimate USD cost for a provider/model request from the global pricing catalog. Returns None when the model id is malformed, the model is absent from the catalog, or the model has no pricing — callers treat None as “cost unknown” (no error).