Skip to content

Auto-select top models when adding a new provider #239

@Saul-Gomez-J

Description

@Saul-Gomez-J

Problem

When a user adds a new provider (e.g., OpenAI, Anthropic, Google) and syncs models, all models start with isSelected: false. This means the chat input model selector (ModelSearchableSelect) shows no models for that provider until the user manually navigates to the Models page and selects them one by one.

This is a confusing UX — the user configures their API key, the sync succeeds, but when they go to chat, no models appear in the selector. The user can get stuck thinking something went wrong.

Expected Behavior

After syncing models for a newly added provider, at least 7 models should be auto-selected from the available list. The selection should prioritize the most popular/capable models of that provider (e.g., for OpenAI: gpt-4o, gpt-4o-mini, gpt-4-turbo, o1, o3-mini, etc.).

This ensures the user immediately sees models in the chat input and can start chatting without friction.

Current Flow (broken UX)

  1. User adds a provider → enters API key → sync triggers
  2. Models fetched — all with isSelected: false
  3. User opens chat → model selector is empty for that provider
  4. User is confused — needs to go to Models page and manually check models

Proposed Flow

  1. User adds a provider → enters API key → sync triggers
  2. Models fetched → top 7 models auto-selected based on popularity/capability ranking
  3. User opens chat → models are immediately available in the selector
  4. User can still customize selection in the Models page

Technical Context

The relevant code is in modelService.ts_doSyncProviderModels() (around line 687-703):

// Current: new models default to isSelected: false
models.forEach(model => {
  model.isSelected = existingSelections[model.id] ?? false;
});

This should be updated so that when selectedModelIds is empty (first sync), a smart default selection of ~7 models is applied. Subsequent syncs should respect the user's existing selection.

Suggested approach

  • Add a helper that ranks models by category/name (prefer flagship models)
  • Only auto-select on first sync (when selectedModelIds is empty or undefined)
  • Update selectedModelIds array accordingly before saving to preferences
  • Consider provider-specific rankings (each provider has different flagship models)

Files to modify

  • src/renderer/services/modelService.ts — auto-selection logic in sync flow
  • Possibly src/types/models.ts — if a priority/ranking field is needed

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv1.7.4Planned for v1.7.4 release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions