Skip to content

Show benched (runtime-unavailable) state on the AI Providers page#1280

Merged
atomantic merged 1 commit into
mainfrom
feat/ai-providers-availability-badge
Jun 15, 2026
Merged

Show benched (runtime-unavailable) state on the AI Providers page#1280
atomantic merged 1 commit into
mainfrom
feat/ai-providers-availability-badge

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Follow-up to #1278/#1279. The AI Providers page showed only the enabled toggle, 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:

  • an UNAVAILABLE · {reason} badge (with the error message as a tooltip), and
  • a detail panel: 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) and available (runtime health the fallback router acts on) are deliberately distinct.

Test plan

  • Client builds clean (vite build); provider util + selector suites green (45 tests).
  • Badge gates on available === false (strict), so a provider with no status yet isn't mis-badged.
  • Manual: a benched provider shows the badge + reason + Why + ETA; Recover now clears it optimistically and toasts.

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.
@atomantic atomantic merged commit 64b0af5 into main Jun 15, 2026
@atomantic atomantic deleted the feat/ai-providers-availability-badge branch June 15, 2026 22:52
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