[FEATURE]: Configurable sort criterion for models within each group in the /models picker
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 70/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- json, typescript
調査の方向性
Start with packages/tui/src/component/dialog-model.tsx and its sortModelOptions() function, then trace how configuration is loaded before reading packages/cli/src/commands/handlers/models.ts for the existing alphabetical comparison. Add the configurable models.sort option with release-desc, release-asc, name-asc, and name-desc, preserving group order, Favorites, Recent, and fuzzy-search behavior. Done means the /models picker respects the configured within-group order while the default remains release date descending.
索引モデルが 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
Make the sort criterion of the models within each group configurable of the /models picker (provider groups and the "Free" group).
Current behavior
The server returns chat models sorted by release date, newest first (packages/core/src/model.ts: .sort((left, right) => right.time.released - left.time.released)). The TUI picker (packages/tui/src/component/dialog-model.tsx → sortModelOptions()) only orders the provider groups and keeps the release-date order inside each group.
With large catalogs (opencode, opencode-go, google-vertex, …) this makes it hard to find a model by name when scrolling a group: models of the same family end up scattered by release date.
The CLI already does the opposite: opencode models sorts its output alphabetically (packages/cli/src/commands/handlers/models.ts: .toSorted((a, b) => a.localeCompare(b))), so the two views of the same catalog disagree.
Proposal
Make the sort criterion of the /models picker configurable, e.g. in cli.json:
{ "models": { "sort": "release-desc" } }
| Value | Order inside each group |
|---|---|
release-desc (default, current behavior) |
newest first |
release-asc |
oldest first |
name-asc |
alphabetical by display name |
name-desc |
reverse alphabetical |
Both criteria are useful: newest-first to spot what was just released, alphabetical to find a known model by name. Implementation-wise this is a final tie-breaker in sortModelOptions() (time.released or title.localeCompare, with the chosen direction). Group order, Favorites, Recent and fuzzy search results would stay as they are.
A picker keybind to cycle the criterion on the fly (like other *.cycle keybinds) would be a nice extra, but the config option alone would solve it.
Why not a plugin
A V2 plugin can filter the catalog (ctx.model.transform), but it cannot control picker order. The only lever is rewriting model.time.released, which also feeds default-model selection and the model metadata exposed to agents, so it is not a safe workaround. (#45412 asked for a plugin ordering API for the same reason and was auto-closed for template compliance.)
Related
- #57195: configurable provider group order (open). This request is complementary: order of models inside a group.
- #22593 (Filter and sort models), #38228 (custom order UI), #51941 (user-defined order in config): closed as not planned / stale; they proposed broader custom ordering. This one only asks for a few built-in sort criteria (release date or name, each in both directions).
Environment
- opencode version: 2.4.2
- OS: macOS 12.7.6 (Darwin 21.6.0)
- Terminal: tmux 3.5a
- 主要言語
- TypeScript
- スター
- 230k
- フォーク
- 31.3k
- 平均マージ
- 5時間 32分
- マージ済み PR(30日)
- 453
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
anomalyco/opencode#67064 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 82/100
anomalyco/opencode#67009 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/web type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#67001 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any log対応中かも @liwenjie200543 が 2 日前に担当しました。 オープンarea/plugins platform/linux reproduced type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#66970 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks対応中かも @argszero が 2 日前に担当しました。 オープンarea/tui platform/wsl status/repro-simulated type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
anomalyco/opencode#66773 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tashfeenahmed/freellmapi#2169 ·
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vercel-labs/ui#1563 ·
メンテナーはふだん 1 日以内に返信