Skip to content

feat(app): add provider-level visibility toggle to settings models - #54923

Closed
kyan0045 wants to merge 1 commit into
anomalyco:devfrom
kyan0045:provider-visibility-toggle
Closed

kyan0045 wants to merge 1 commit into
anomalyco:devfrom
kyan0045:provider-visibility-toggle

Conversation

@kyan0045

@kyan0045 kyan0045 commented Oct 12, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #45225

Type of change

  • New feature

What does this PR do?

Settings → Models only offered a per-model visibility switch, so showing or hiding every model of a provider meant clicking each one. Each provider header now carries a master visibility toggle through the existing ProviderModelSections.action slot, using the existing setProviderVisibility helper and a providerVisible helper copied from the Manage models dialog. No new state or storage.

The switch reuses the exact control and placement (me-6) of the model picker's "Manage models" dialog, so the header control sits in the same position relative to the model rows as it already does there rather than introducing a new alignment.

How did you verify your code works?

bun typecheck in packages/app is clean. In the running app, toggling the OpenCode Free header flipped all 12 of its model switches, and the state persisted across a reload.

Screenshots / recordings

Before / after:

Before and after

Placement matches the existing Manage models dialog:

Manage models dialog and Settings → Models side by side

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The change looks sound: it reuses the Manage models header switch (same control, same providerVisible / setProviderVisibility logic) through the existing action slot of ProviderModelSections, so the two screens now match. I checked it by reading the code against manage.tsx and provider-group.tsx and running bun run typecheck in packages/app, which passes. I couldn't click through it in a browser here; your before/after screenshots cover the visible result.

Public API: unchanged (app UI only).

One small correction to the description: providerVisible isn't an existing helper in this file. This PR adds it, copied from manage.tsx, which is fine.

Not blocking: #51479 changes setProviderVisibility in this same file to save one setting per provider instead of one per model. Whichever of the two merges second needs a small rebase. Until then, this switch is as slow on very large providers (e.g. OpenRouter) as the one in Manage models.

Related: #51479

@kyan0045 kyan0045 closed this by deleting the head repository Oct 21, 2026
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.

desktop: Settings Models tab is missing the provider-level visibility toggle

1 participant