fix(web): filter model picker by server provider health status#1378
Open
timmske wants to merge 1 commit intopingdotgg:mainfrom
Open
fix(web): filter model picker by server provider health status#1378timmske wants to merge 1 commit intopingdotgg:mainfrom
timmske wants to merge 1 commit intopingdotgg:mainfrom
Conversation
The model picker used hardcoded availability flags, ignoring server health checks. When codex was missing, it still appeared selectable, blocking users who only have Claude Code installed. Thread providerStatuses from the server config query into ProviderModelPicker. Providers that fail health checks (CLI not installed or not on PATH) now appear as disabled with a "Not installed" label instead of being selectable. Static unavailable providers (Cursor) retain their "Coming soon" label. The providerStatuses prop is optional—when omitted the component falls back to the existing static lists, preserving backward compatibility. Fixes pingdotgg#1332
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
providerStatusesfrom the server config query intoProviderModelPickerso it can dynamically hide providers whose CLI binary is missingavailable: false) are shown as disabled with a "Not installed" label instead of remaining selectableproviderStatusesprop is optional — when omitted the component falls back to the existing static lists, preserving backward compatibilityContext
When
codexis not installed but Claude Code is, the model picker still showed Codex as a selectable provider. The server already performs health checks and sendsServerProviderStatus[]to the client, but this data was only used for theProviderHealthBannerwarning display — not for filtering the picker itself.Changes
apps/web/src/components/chat/ProviderModelPicker.tsxproviderStatusesprop, compute dynamic available/unavailable lists viauseMemo, show "Not installed" for health-unavailable providersapps/web/src/components/ChatView.tsxproviderStatusestoProviderModelPicker(1 line), moveproviderStatusesderivation earlier to keep variable ordering clean (move, not logic change)Known limitation
If the user has a provider selected and it becomes unavailable mid-session (e.g. CLI uninstalled while t3code is open), the picker button still shows that provider's icon/model until the user manually switches. This is a pre-existing condition not introduced by this change. A follow-up could auto-switch to the first available provider.
Test plan
bun fmt,bun lint,bun typecheckpass (confirmed locally — the@t3tools/scriptstypecheck failure is pre-existing onmain)codexinstalled → Codex should appear disabled with "Not installed"claudeinstalled → Claude should appear disabled with "Not installed"ProviderModelPicker.browser.tsxtests pass unchanged (prop is optional)Fixes #1332
Note
Low Risk
Low risk UI behavior change that only affects which provider options are selectable in the model picker based on server-reported availability.
Overview
Provider/model picker options are now filtered using server-reported
providerStatuses, hiding providers that fail health checks from the selectable list.Health-unavailable providers are shown as disabled with a "Not installed" badge (while statically unsupported providers remain "Coming soon"), and
ChatViewnow passesproviderStatusesintoProviderModelPickervia an optional prop for backwards compatibility.Written by Cursor Bugbot for commit ca34f5f. This will update automatically on new commits. Configure here.
Note
Filter model picker options by server provider health status
ProviderModelPickernow accepts an optionalproviderStatusesprop and usesuseMemoto derive effective available/unavailable provider lists based on server-reported health.ChatViewderivesproviderStatusesfromserverConfigQueryand passes it down toProviderModelPicker.providerStatusesis not provided, behavior falls back to the previous static availability lists.Macroscope summarized ca34f5f.