Context
PR #1075 introduced a single backend provider registry (open_notebook/ai/provider_registry.py) and a GET /api/providers endpoint exposing name, display name, modalities, docs URL and env-configured status. The frontend still hardcodes its own copy in frontend/src/lib/providers.tsx (ALL_PROVIDERS, PROVIDER_MODALITIES, PROVIDER_DOCS), kept in sync only by a backend test that regex-parses the .tsx file (tests/test_credential_provider_validation.py) — which already broke once when the table moved files (see #1065).
Proposal
- Fetch provider metadata from
GET /api/providers (react-query hook, cached)
- Keep only genuinely frontend-only presentation data locally (icons)
- Delete the regex-based cross-check test once the manual table is gone
Outcome
Adding a provider becomes: registry entry + SupportedProvider Literal (enforced by test). Zero frontend edits.
Context
PR #1075 introduced a single backend provider registry (
open_notebook/ai/provider_registry.py) and aGET /api/providersendpoint exposing name, display name, modalities, docs URL and env-configured status. The frontend still hardcodes its own copy infrontend/src/lib/providers.tsx(ALL_PROVIDERS,PROVIDER_MODALITIES,PROVIDER_DOCS), kept in sync only by a backend test that regex-parses the.tsxfile (tests/test_credential_provider_validation.py) — which already broke once when the table moved files (see #1065).Proposal
GET /api/providers(react-query hook, cached)Outcome
Adding a provider becomes: registry entry +
SupportedProviderLiteral (enforced by test). Zero frontend edits.