Skip to content

[Improve] Show provider headers in multi-provider model choosers#392

Merged
mrubens merged 2 commits into
developfrom
improve/model-chooser-provider-headers-0tfv4duwtxmnk
Jul 15, 2026
Merged

[Improve] Show provider headers in multi-provider model choosers#392
mrubens merged 2 commits into
developfrom
improve/model-chooser-provider-headers-0tfv4duwtxmnk

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

Internal consistency fix — no linked issue.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Launch model choosers (home, onboarding, preview, and settings role selects) now show the same provider section headers as the settings coding-model dropdown when more than one display provider is represented in the list.

Shared grouping now lives in groupModelsByDisplayProvider, and launch options include chatgptConnected so subscription OpenAI models group under ChatGPT (subscription) instead of OpenAI when appropriate. With only one provider group present, headers stay hidden so a single-provider list stays flat.

Connecting or disconnecting a ChatGPT subscription now also invalidates taskModels.launchOptions, so the home/launch model chooser refetches and regroups immediately instead of keeping a stale chatgptConnected flag.

Why this change was made

With multiple inference providers connected, the home/launch model dropdown was a flat list while Settings already grouped by provider, making multi-provider catalogs harder to scan and inconsistent across surfaces. After the grouping fix landed, ChatGPT connect/disconnect still left launch options cached, so the chooser could keep the wrong provider headers until a full refresh.

Impact

Opening any multi-provider model chooser now shows labeled provider sections (for example OpenRouter and OpenAI / ChatGPT subscription) above the models. Single-provider lists remain unchanged visually. ChatGPT subscription connect/disconnect updates the launch chooser grouping without a page reload.

How it was tested

  • pnpm --filter @roomote/types exec vitest run src/model-provider-config.test.ts
  • pnpm --filter @roomote/web exec vitest run src/components/tasks/ModelSelect.client.test.tsx
  • pnpm --filter @roomote/web exec vitest run src/components/settings/ModelSettingsSection.test.tsx
  • pnpm --filter @roomote/web exec vitest run src/components/settings/InferenceProviderSection.test.tsx
  • Pre-push suite (oxlint, residual lint, check-types:fast, knip)
  • Manual visual capture of the home Model select with OpenRouter + OpenAI models enabled

Screenshots

Home model chooser with OpenRouter and OpenAI provider headers

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

@roomote-roomote

roomote-roomote Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • Invalidate launch options when ChatGPT auth changes (apps/web/src/components/tasks/ModelSelect.tsx:46). ModelSelect now derives provider headers from the cached launchOptions.chatgptConnected value, but the ChatGPT connect and disconnect success paths only invalidate provider setup and subscription status. With the shared 30-second query staleTime, navigating back to a chooser immediately can retain OpenAI after connecting or ChatGPT (subscription) after disconnecting; invalidate trpc.taskModels.launchOptions in both success paths.

Reviewed 6d938e9

@mrubens
mrubens marked this pull request as ready for review July 15, 2026 17:40
@mrubens
mrubens merged commit 7303b21 into develop Jul 15, 2026
17 checks passed
@mrubens
mrubens deleted the improve/model-chooser-provider-headers-0tfv4duwtxmnk branch July 15, 2026 17:40
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.

1 participant