Skip to content

Conversation

@sudo-tee
Copy link
Owner

@sudo-tee sudo-tee commented Jan 13, 2026

  • Adds keybinding to toggle model favorite state in the picker (configurable)
  • UI shows star for favorites and clock for recent
image

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
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

sudo-tee and others added 2 commits January 13, 2026 14:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sudo-tee sudo-tee merged commit a8e53d5 into main Jan 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants