Interactive model selector screen for /model command.
Get the glyph set for the current charset mode.
Remove the default model from the config file.
Deletes the [models].default key so that future launches fall back to
[models].recent or environment auto-detection.
Get available models dynamically from installed LangChain provider packages.
Imports model profiles from each provider package and extracts model names.
Results are cached after the first call; use clear_caches() to reset.
Check if credentials are available for a provider.
Checks in order:
config.toml) — takes priority so user
overrides (e.g., custom api_key_env or base_url) are respected.PROVIDER_API_KEY_ENV mapping (anthropic, openai, etc.)._SUPPORTED_PROVIDERS registry — if the provider is known
to init_chat_model, credential status is unknown; the provider
itself will report auth failures at model-creation time.Update the default model in config file.
Reads existing config (if any), updates [models].default, and writes
back using proper TOML serialization.
Character set mode for TUI display.
Parsed model configuration from config.toml.
Instances are immutable once constructed. The providers mapping is
wrapped in MappingProxyType to prevent accidental mutation of the
globally cached singleton returned by load().
A clickable model option in the selector.
Full-screen modal for model selection.
Displays available models grouped by provider with keyboard navigation and search filtering. Current model is highlighted.
Returns (model_spec, provider) tuple on selection, or None on cancel.