feat: add intelligent model picker with favorites, recent usage#182
Merged
feat: add intelligent model picker with favorites, recent usage#182
Conversation
Add support for highlighting and sorting a preferred model to the top of the provider list. Users can now set preferred_model in config to specify their preferred provider/model combination (e.g., 'github-copilot/claude-sonnet-4'), which will be visually marked and sorted to the top of the model selection list.
…persistent sorting - Adds <C-f> keybinding to toggle model favorite state in the picker (configurable) - UI shows star for favorites and clock for recent
a644755 to
fe69584
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds an intelligent model picker with favorites and recent usage tracking to enhance the model selection experience. Users can mark models as favorites using <C-f> in the picker, and the list automatically sorts to show favorites first, followed by recently used models, then alphabetically sorted remaining models.
Changes:
- Added state persistence for model favorites and recent usage in
~/.local/state/opencode/model.json - Implemented model picker with visual indicators (star for favorites, clock for recent)
- Added
<C-f>keybinding to toggle favorite status in the model picker - Updated documentation with new feature details and configuration options
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| lua/opencode/ui/icons.lua | Added preferred and last_used icons for both nerdfonts and text presets |
| lua/opencode/provider.lua | Implemented core functionality: state management, model access tracking, favorites toggling, and enhanced picker UI with sorting |
| lua/opencode/config.lua | Added model_picker.toggle_favorite keymap configuration |
| README.md | Added documentation for Model Sorting and Favorites feature with usage instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
aweis89
pushed a commit
to aweis89/opencode.nvim
that referenced
this pull request
Jan 29, 2026
…-tee#182) This pull request adds an intelligent model picker with favorites and recent usage tracking to enhance the model selection experience. Users can mark models as favorites using <C-f> in the picker, and the list automatically sorts to show favorites first, followed by recently used models, then alphabetically sorted remaining models. Changes: Using state persistence for model favorites and recent usage in ~/.local/state/opencode/model.json (same as opencode CLI) Implemented model picker with visual indicators (star for favorites, clock for recent) Added <C-f> keybinding to toggle favorite status in the model picker Updated documentation with new feature details and configuration options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.