Written from today's DeepSeek 1017 repoint: the spend-log measurement that chose repointing (3,014 calls on the prefixed id vs 84 on the alias), the aliases that duplicate litellm_params and must move with the pointer, the emission-factor keys that silently degrade on a rename, and the picker that only needs touching when the id changes. Verification is a spend row, not an HTTP 200.
3.9 KiB
Model transitions (changing what a gateway model serves)
A provider retires or replaces a model we serve. The gateway can absorb this in two shapes, and picking the right one is the first decision, not a detail.
Repoint or rename.
- Repoint — keep the
model_name, change onlylitellm_params.modelandmodel_infoprices. No member config breaks. Use this whenever clients may pin the prefixed id. - Rename — a new
model_name. Honest about the version, but every client config pinned to the old id starts returning400 Invalid model name … Call /v1/models. We cannot see those configs.
Measure before choosing. Spend logs record the requested name in model_group
and the upstream string in model. Group one page of /spend/logs and compare traffic
on the alias vs the prefixed id:
rows = GET https://gateway.inference.coop/spend/logs # master key
Counter((r["model_group"], r["model"]) for r in rows if "deepseek" in r["model_group"])
On 2026-11-16 that comparison was 3,014 calls on greenpt/deepseek-v4.1-flash against
84 on deepseek-flash-green — which settled it in favour of repointing.
Checklist
config.yaml(gateway) — update the pointerlitellm_params.modeland themodel_infoprices. Do it for every deployment that carries its own copy: the provider-prefixed entry and any alias that duplicates the params (deepseek-flash-greenis a separate entry with its own pointer and prices — miss it and the alias keeps billing the old rate). Update the header price comment and the entry comment, since a repointed name no longer says which snapshot it serves.librechat.yaml(chat picker) — only needed on a RENAME. The picker is a hand-maintained list of provider-prefixed ids in two places:models.defaultand eachmodelSpecsentry'slabel+preset.model. A repoint needs no picker change. (models.fetch: truedoes not add entries to the visible dropdown — verified by observation, not by reading the config.)- Portal emission factors —
member-portal/metrics_snapshot.pykeys Wh/1k-out and gCO2e factors on the model-group name, andapp/main.pycarries a display-name map. A RENAME requires updating both or Energy/Carbon silently drops from MEASURED to unmeasured. A repoint needs nothing. - Docs —
docs/models.md(default line and the table row: price + which snapshot),docs/api-access.mdalias table (only if the id changes),docs/energy.md(only if renamed),ops-docs/provider-pricing/<provider>.md. - Validate —
python3 validate_config.py litellm config.yaml. Fail-closed: an unknown top-level key or unresolvable provider prefix refuses the build. - Build, pin, deploy.
- Verify by spend row, not by HTTP 200. A successful call proves nothing about
what it pointed at. Read the newest
/spend/logsrow:model_groupmust be the name you called andmodelmust be the provider's new upstream string. Confirm aliases bill under their own name. - Tell members — append a line to
~/.hermes/cron/updates_notes.jsonland it lands in the next digest's Stewarding section; recommend pinning the alias. - Record — comment on the originating issue/PR with the shape chosen and why.
Deprecating a name instead of deleting it
If a rename is eventually wanted, add the versioned id alongside the old one (both
pointing at the same upstream), tell members to migrate, and remove the old entry only
when model_group traffic on it reads zero for a full cycle. That trigger is measurable,
so retirement is a data decision rather than a judgement call.
Three independent lists
config.yaml (what exists), librechat.yaml (what the chat offers), and the docs alias
table (what members are told) are separate lists. A single transition touches all three;
repointing touches one. That asymmetry is the strongest argument for repointing.