[FEATURE]: Configurable sort criterion for models within each group in the /models picker
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 70/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- json, typescript
- Bereich
- cli, developer-experience
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 230k
- Forks
- 31.3k
- Ø Merge
- 5 Std. 32 Min.
- Gemergte PRs (30 T.)
- 453
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
anomalyco/opencode#67064 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 82/100
anomalyco/opencode#67009 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/web type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
anomalyco/opencode#67001 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logEvtl. vergeben @liwenjie200543 hat das vor 2 Tagen übernommen. Offenarea/plugins platform/linux reproduced type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anomalyco/opencode#66970 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksEvtl. vergeben @argszero hat das vor 2 Tagen übernommen. Offenarea/tui platform/wsl status/repro-simulated type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
anomalyco/opencode#66773 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode
Ähnliche Issues
-
enhancement feature/signals self-driving team/self-driving
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PostHog/posthog#144208 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue web
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
triage: not actionable
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
oxc-project/oxc#30518 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug Claude useability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
Maintainer antworten meist innerhalb von 1 Tag