You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openrouter: ~…-latest aliases have no canonical_model_id, so consumers can't tell which model an alias currently serves #14055
OpenRouter's ~…-latest aliases are listed in models.dev as standalone entries with no base_model. So the published catalog has no canonical_model_id for them, and their release_date is the date the alias was created, not the date of the model it serves.
OpenRouter publishes the target. GET https://openrouter.ai/api/v1/models returns alias_target: { slug, name } on every alias. On 2026-11-18:
Alias
alias_target (OpenRouter)
models.dev canonical_model_id
models.dev release_date
Target's release_date
~openai/gpt-astra-latest
openai/gpt-6.2-astra
none
2026-09-11
2026-11-17
~deepseek/deepseek-flash-latest
deepseek/deepseek-v4.1-flash-1017
none
2026-09-14
2026-10-17
Non-alias OpenRouter entries such as openai/gpt-6.2-astra do have canonical_model_id.
The sync drops the link on purpose today. OpenRouterModel in packages/core/src/sync/providers/openrouter.ts doesn't read alias_target, and both resolveCanonicalBaseModel and resolveMediaBaseModel return undefined for any ID starting with ~.
Why it matters downstream
Without the target, a client sees a "latest" alias as an old model in its family. T3 Code, which reads OpenCode's catalog, marks 13 of the 19 OpenRouter aliases that OpenCode lists for me as legacy for this reason, including ~openai/gpt-astra-latest, which serves the newest Astra. The client can't fix this itself, because nothing in the data says where the alias points. Details: pingdotgg/t3code#39072.
The reverse problem exists too. ~openai/gpt-mini-latest still serves openai/gpt-5.4-mini (2026-03-17) because no newer "mini" model has shipped. A client could only notice that from the target.
Proposal
In the OpenRouter sync, when a model has alias_target, write base_model = <alias_target.slug> (mapped to the lab ID the way the existing prefix tables do). Keep the alias's own name and description as overrides. The alias then:
publishes canonical_model_id pointing at the model it currently serves,
inherits the target's release_date, limits, and modalities, all of which describe what a request to the alias actually gets,
gets repointed by the next sync run after OpenRouter moves it.
If a base_model that changes from run to run conflicts with the catalog rules (AGENTS.md treats base_model as a stable identity), a separate field like alias_of would also work, as long as it's published in the JSON API.
OpenCode would also need to pass the field through to its clients; that's tracked in anomalyco/opencode#64845. That change only helps once this data exists.
Activity