Skip to main content

available_catalog

Function available_catalog 

Source
pub fn available_catalog(resolved: &ResolvedModel) -> Vec<Model>
Expand description

The catalog the TUI’s /model selector displays (read-only). Re-derives the auth-filtered snapshot the provider was built from so the selector shows exactly the models that can actually run (mirrors pi getAvailableSnapshot: available = all.filter(m => configuredProviders.has(m.provider)) — v1’s single-provider equivalent of “configured” is [model_is_authed]).

The runtime provider already owns one provider-id-specific catalog. The additional auth filter keeps header-only and provider-key paths consistent if a future runtime exposes a broader snapshot.

On any config read error it falls back to the built-in Anthropic catalog — the selector is non-critical and must never block the TUI from starting.