anomalyco / anomalyco/opencode

[FEATURE]: Model Management UI — custom order, aliases, favorites, and default model

Open
#38,228 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Jul 22, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

Managing many models across multiple providers is cumbersome in the current UI:

  • Models are sorted alphabetically within hardcoded provider groups — users cannot reorder to prioritize frequently used models
  • The model name is read-only, taken directly from the provider catalog — users cannot assign friendly aliases (e.g. "My Cheap Fast Model" for a long API ID)
  • There is no way to set a default model for new conversations; OpenCode falls back to last-used or an internal priority, which is unpredictable

Describe the solution you'd like

A redesigned model management screen (both dialog-manage-models and settings-models) with four new capabilities:

1. Drag-and-drop reordering
  • Allow dragging providers and individual models to set a custom display order
  • A toggle in settings to switch between "automatic sort" (current behavior) and "custom order" (user-defined)
  • Custom order persisted to opencode.json as a displayOrder array (or equivalent)
2. Inline alias/rename
  • Each model shows an editable name field (pencil icon or inline input)
  • Changing the name writes the name field to the model's config entry in opencode.json
  • The alias is used everywhere: model picker, chat header, system prompt (complementing #36164)
3. Favorite / pin models
  • Star/pin icon on models for quick access at the top of the list
  • Pinned models appear in a separate "Pinned" section regardless of provider grouping
4. Default model for new conversations
  • A "Set as default" button / radio indicator per model
  • The default is written to the model field in opencode.json
  • New conversations pre-select this model instead of falling back to last-used
// Example resulting config
{
  "model": "anthropic/my-sonnet",              // default model
  "provider": {
    "anthropic": {
      "models": {
        "my-sonnet": {
          "id": "claude-sonnet-4-20250514",
          "name": "Meu Sonnet Padrão"          // alias
        }
      }
    }
  },
  "displayOrder": [                            // custom order
    "anthropic/claude-sonnet-4-20250514",
    "openai/gpt-5",
    "google/gemini-2.5-flash"
  ]
}

Describe alternatives you've considered

  • Using only the existing name field in config — works but has no UI, making it inaccessible to non-technical users
  • Keyboard shortcut to cycle models — useful but does not solve discoverability or organization

Additional context

This proposal builds on prior discussions:

  • #3439 (custom model aliases, completed)
  • #36164 (use alias in system prompt, open)
  • #23893 (sort providers alphabetically, closed as not planned — a richer proposal may have better acceptance)

The implementation touches:

  • packages/app/src/components/dialog-manage-models.tsx — drag handles, rename inputs, pin button, default indicator
  • packages/app/src/context/models.tsxdisplayOrder, customName, pinned, defaultModel state
  • packages/app/src/hooks/use-providers.ts — respect custom order over hardcoded sort
  • Persistence layer — write changes back to opencode.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.