Skip to main content

discover_available_providers

Function discover_available_providers 

Source
pub fn discover_available_providers() -> Vec<DiscoveredProvider>
Expand description

Scan all built-in providers and return those with a discoverable credential.

“Discoverable” means the provider can be used right now without the user pasting a key: the env var is set (shell export or loaded .env), a key is in secure storage, an OAuth session is active, auth is managed by an external CLI, or the provider is local and needs no key.

Results follow Provider::all_providers() order. This does not consult vtcode.toml custom providers — the first-run wizard runs before a config exists. Runtime custom-provider auth is handled by resolve_runtime_provider_auth.