The sources
- Pricing overrides — set per model in the dashboard’s Models page. The top layer for pricing fields only; unset price types keep inheriting. See Cost tracking.
config.yamlmetadata —providers.<name>.modelsentries can attachmetadata(pricing,context_window,modes,capabilities, …). Declared fields win field-by-field over everything below; omitted fields inherit. This is the escape hatch for local models: declaringmodes: [embedding]also derives the model’s category.- Provider discovery — some providers report metadata in their own model
listings, and what a provider says about its own deployment wins over the
catalog field by field: Gemini’s
supportedGenerationMethods, Cohere’s per-modelendpointsand context length, OpenRouter’s architecture modalities and context length, Chutes’ context length, max output, capabilities, and pricing, Ollama’s/api/showcapabilities, and llama.cpp’s context window and modalities (see llama.cpp). This matters most for self-hosted servers, where the running process is the only source that can know the real context window. Models declared via configured model lists skip this step. - The model catalog — the
ai-model-listregistry, fetched fromMODEL_LIST_URL(default: the registry’smodels.min.jsonon GitHub) at startup and on every catalog refresh. It supplies the rich defaults — pricing, context windows, capabilities, modes — for most hosted models, matching IDs directly, through aliases, and with release-date suffixes stripped, and it fills in every field the provider above did not report. Wrong or missing data is best fixed by contributing to the registry; use an override for an immediate fix. - ID heuristic — a last-resort name check for models that end up with no
modes at all (typical for llama.cpp and LM Studio): IDs containing
embedor matching well-known embedding families (bge,e5,gte,minilm) become embedding models, IDs containingrerankbecome reranking models. Namespaced IDs are matched by their final path segment. When unsure, it claims nothing.
What metadata affects
- Pricing drives cost tracking, budgets, and
costload-balancing. Each priced field remembers its source, so the dashboard can show where a rate came from. - Modes and categories drive dashboard grouping only — routing never
blocks on them, so
/v1/embeddingsreaches any model the provider serves. - Context window and capabilities are advertised on
GET /v1/models(and onGET /v1/models/{model}for a single model) for clients that pick models dynamically.
Offline behavior
If the catalog fetch fails or the deployment is air-gapped, the gateway runs normally — only the catalog-supplied defaults (including catalog pricing) are missing. Pricing overrides,config.yaml metadata, provider discovery signals,
and the ID heuristic still apply.
MODEL_LIST_URL accepts a local file as well as an HTTP URL:
GOMODEL_OFFLINE=true, which drops HTTP catalog URLs. Set MODEL_LIST_URL=off
to turn the catalog off entirely and declare metadata in config.yaml; see the
production guide for
the full air-gap checklist.