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

オープン 初心者向け
#64,845 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
api

調査の方向性

packages/core/src/models-dev.ts の SourceModel から始め、デコードされたモデルデータが model.list に届くまでの流れを追ってください。packages/data の catalog-identity.ts から、このプロジェクトではすでに canonical_model_id を使用していることがわかります。返されるモデルの構造にオプションのフィールドを追加し、関連するモデル一覧のテストを確認して、フィールドがある場合は含まれ、ない場合は省略されることを確かめてください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
227k
フォーク
30.7k
平均マージ
5時間 14分
マージ済み PR(30日)
486

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。