[FEATURE]: include models.dev's `canonical_model_id` in `model.list`

Open Beginner friendly
#64,845 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start with SourceModel in packages/core/src/models-dev.ts and trace how decoded model data reaches model.list; packages/data's catalog-identity.ts shows the project already uses canonical_model_id. Add the optional field to the returned model shape and check the relevant model-list tests to confirm it is included when present and omitted when absent.

Written by the indexing model from the issue text.

Description

area/providers type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

model.list doesn't say which underlying model an entry is. models.dev publishes canonical_model_id for most hosted models, but SourceModel in packages/core/src/models-dev.ts doesn't decode it, so it never reaches clients. OpenCode's own packages/data service already relies on the field (catalog-identity.ts), so it's a field the project already trusts.

Why I need it: clients that group or label models have nothing to go on but family and release_date. For OpenRouter's ~…-latest aliases that goes wrong. T3 Code marks ~openai/gpt-astra-latest as legacy because its release_date (2026-09-10) is older than openai/gpt-6.2-astra (2026-11-17), even though the alias serves 6.2 Astra (pingdotgg/t3code#39072). anomalyco/models.dev#14055 asks models.dev to link those aliases to their targets. This request is the other half: exposing that link once it exists.

Proposed: decode canonical_model_id as an optional string and return it on each model as canonicalID (or whatever name fits). No behavior change otherwise.

Dominant language
TypeScript
Stars
227k
Forks
30.7k
Avg merge
5h 14m
Merged PRs (30d)
486

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.