Skip to content

feat: Add provider health and per-provider controls#1289

Closed
huxcrux wants to merge 28 commits intopingdotgg:mainfrom
huxcrux:feat/provider-settings-cleanup
Closed

feat: Add provider health and per-provider controls#1289
huxcrux wants to merge 28 commits intopingdotgg:mainfrom
huxcrux:feat/provider-settings-cleanup

Conversation

@huxcrux
Copy link
Copy Markdown
Contributor

@huxcrux huxcrux commented Mar 21, 2026

What Changed

Added provider health visibility and per-provider enablement across Settings and provider selection.

  • Added provider health states for supported providers.
  • Added per-provider enable/disable controls in Settings.
  • Added provider login/logout actions in Settings.
  • Improved the Settings provider list so status and disabled state are easier to scan.
  • Prevented unavailable providers from being selected in provider pickers.
  • Updated tests and fixtures for the new provider health and enablement behavior.

Why

As more providers are added, provider availability needs to be explicit and predictable across the app.

This change makes provider health visible in one place, gives users a direct way to disable providers individually, and ensures the picker only allows selecting providers that are actually usable.

UI Changes

Added aa few extra pictures to show the different states when a provider is not found, unauthed or working fine.

Provider picker:

Before After
image image
image
image

Settings:

Before After
This UI is new image
image
image
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add provider health monitoring, per-provider enable/disable controls, and CLI login/logout to settings

  • Adds a ProviderHealth service that probes Codex and Claude CLI binaries for version, auth status, and account plan; results are cached and refreshable on demand via new WebSocket RPC methods (server.refreshProviderStatuses, server.refreshProviderStatus, server.providerLogin, server.providerLogout).
  • Extends app settings with an enabledProviders field (defaulting to true) and adds isProviderEnabled/patchProviderEnabled helpers in appSettings.ts.
  • Adds a new Providers section to the Settings page (_chat.settings.tsx) where users can view status, refresh detection, toggle enabled, log in/out, override binary paths, and manage custom models per provider.
  • Updates ChatView.tsx to disable the composer and send actions when the selected provider is not usable, show an inline issue banner with an "Open Settings" shortcut, and filter provider options to only enabled providers.
  • Updates ProviderModelPicker.tsx to visually disable and label unusable providers and prevent switching to them.
  • Removes per-client git action progress event publishing from wsServer and GitActionsControl.
  • Risk: serverGetConfig now queries provider health on every call instead of returning a cached snapshot, adding probe latency to that request path.

Macroscope summarized d52b1b1.


Note

Medium Risk
Touches provider readiness/auth probing and WebSocket RPC surface area (new refresh/login/logout flows) and changes how clients select/disable providers, which could impact session start and settings UX if statuses/options are miscomputed.

Overview
Adds a richer ProviderHealth service that probes Codex/Claude CLIs for version, auth status, and optional plan info, including a Codex fallback that reads the plan via codex app-server when login status omits it.

Extends the server WebSocket API to support on-demand provider status refresh and provider login/logout, and updates wsServer to always read provider statuses dynamically (vs. snapshotting once at startup).

Introduces per-provider enable/disable settings (enabledProviders) and threads this through the UI: provider/model pickers now hide or disable unusable providers (disabled/not found/unauthenticated), the chat composer blocks sends when the selected provider isn’t usable and links to Settings, and the Settings page is reworked into per-provider panels showing status, refresh, auth actions, and CLI overrides.

Also adjusts tests for new provider plan parsing (including snake_case fields), Bun/node sqlite compatibility, and removes the client-side subscription to git action progress events.

Written by Cursor Bugbot for commit d52b1b1. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a7fa8aae-7ec2-47ba-bcf5-9fb41d116962

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 21, 2026
@huxcrux huxcrux changed the title feat: Refine provider settings and picker availability states feat: Add provider health and per-provider controls Mar 24, 2026
@huxcrux
Copy link
Copy Markdown
Contributor Author

huxcrux commented Mar 24, 2026

Changed this PR from modifying settings (after the settings change where merged) to only focus on provider health/controls instead

@huxcrux huxcrux force-pushed the feat/provider-settings-cleanup branch from c0aedc6 to ed8c49b Compare March 24, 2026 19:28
@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Mar 24, 2026
@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Mar 24, 2026
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use effect/Schema and Schema.fromJsonString(expectedschema) instead of ad-hoc parse helpers and try-catch wrapped JSON.parse/stringify

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is now fixed :)

@huxcrux huxcrux requested a review from juliusmarminge March 24, 2026 21:44
@juliusmarminge
Copy link
Copy Markdown
Member

i tihnk we should have the custom models for each provider under the same collapsible component, so it's not spread out so widely

@huxcrux huxcrux force-pushed the feat/provider-settings-cleanup branch from 6439f12 to 4a6cb6a Compare March 25, 2026 12:28
@huxcrux huxcrux force-pushed the feat/provider-settings-cleanup branch from 4888b5e to 64a6f91 Compare March 25, 2026 19:36
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@huxcrux
Copy link
Copy Markdown
Contributor Author

huxcrux commented Mar 25, 2026

i tihnk we should have the custom models for each provider under the same collapsible component, so it's not spread out so widely

I agree with this, I moved in the custom model and path overrides alongside expanded a bit on the auth/version etc. It can probably be a bit more compact but now you can se most relevant info and settings under each provider.

image image

Also statuses are updated to keep the setting page clean unless you open the provider:
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants