Integration failure attribution
Host apps should not guess whether a red ModelSelector state is “Restormel down”, “policy blocked”, or “provider key invalid”.
Use the packaged status callbacks, batch policy availability, and the shared backend message constant from @restormel/keys-svelte.
Typed props and status
Import KeyManagerProps, ModelSelectorProps, ModelSelectorHostStatus, and RESTORMEL_BACKEND_ERROR_MESSAGE from @restormel/keys-svelte (see package types exports).
Wire onStatusChange to show banners: loading, ready, empty, error, degraded.
Policy vs provider
- Pass a server-built
policyAvailabilitymap so blocked models skip unnecessary resolve calls (batch evaluation on the host). - When status is
degraded, nothing is selectable under current policy + credentials—distinguish fromerror(load/transport failure).
Canonical assessment
Dogfood priorities and ordering: docs/reference/restormel-first-assessment.md.