Skip to main content

Module detect

Module detect 

Source
Expand description

Provider auto-detection: scan environment for API keys, test connectivity with lightweight API calls, rank providers by cost tier (free > paid), and return a list of ready-to-use providers.

Integrates with the first-run wizard in crate::onboarding::wizard.

Structs§

DetectedProvider
The result of scanning for one provider.

Enums§

ProviderTier
Cost tier for ranking.

Functions§

detect_all_providers
Detect all providers with their status.
free_providers
Get a list of free providers (regardless of key status), for suggestions.
gh_cli_installed
Check if the gh CLI is installed (for GitHub Copilot integration).
ready_providers
Get a summary list of ready-to-use providers (key found + validated).
scan_environment
Scan the environment for all known API keys.
validate_api_key
Test a provider’s API key with a minimal request.
validate_detected_providers
Run validation for all detected providers with keys.