Show benched (runtime-unavailable) state on the AI Providers page#1280
Merged
Conversation
An enabled provider can still be benched after a failure (usage limit, auth, model-not-found) and skipped for a fallback, which made 'but it's enabled' confusing. Surface an UNAVAILABLE · <reason> badge plus a detail panel with the underlying error message, the auto-retry ETA, and a 'Recover now' button, refreshed every 20s. enabled = user toggle; this is the separate runtime-health state the fallback router acts on.
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
Follow-up to #1278/#1279. The AI Providers page showed only the
enabledtoggle, so a provider that was benched (runtime-unavailable after a failure — usage limit, auth,model-not-found) looked fine while every call silently routed to a fallback. That's the "but it's enabled, why isn't it used?" confusion.Each enabled-but-unavailable provider now renders:
Benched ({reason}) — auto-retries in {time}, a Why: {message} line, and a Recover now button that clears the bench (POST /api/providers/:id/status/recover).The availability map refreshes every 20s (cleaned up on unmount) so the badge appears/clears on its own as the server expires the recovery window. Reads the existing
GET /api/providers/status.enabled(user toggle) andavailable(runtime health the fallback router acts on) are deliberately distinct.Test plan
vite build); provider util + selector suites green (45 tests).available === false(strict), so a provider with no status yet isn't mis-badged.