[FEATURE]: include models.dev's `canonical_model_id` in `model.list`
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 内容生成。
描述
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 分钟
- 30 天内合并 PR
- 486
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/providers platform/macos status/repro-simulated type/bug version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#64723 · 1 条评论 ·
维护者通常 1 天内回复
-
area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#64566 · 1 条评论 ·
维护者通常 1 天内回复
-
area/desktop platform/windows status/repro-plausible type/bug version/v2
难度 2/5 1-3 小时 新手友好度 64/100
anomalyco/opencode#64522 · 1 条评论 ·
维护者通常 1 天内回复
-
cli: plugin list shows - for ID of TUI-only plugins configured in cli.json可能已有人在做 @yash-alla 于 2 天前认领。 未关闭area/cli platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#64175 · 1 条评论 ·
维护者通常 1 天内回复
-
area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#64077 · 3 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 87/100
维护者通常 1 天内回复
-
🛠️ dette technique
难度 2/5 1-3 小时 新手友好度 61/100
betagouv/mon-entreprise#4752 · 1 条评论 ·
维护者通常 5 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 67/100
franciscoBSalgueiro/en-croissant#1111 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 83/100
inmanta/web-console#7947 ·
维护者通常 1 天内回复