import type { LLMProvider } from './types.js'; import type { KeyStoreOpts } from '../../../security/key-store.js'; /** Read a provider's API key from env, accepting the canonical var or an alias. */ export declare function providerKeyFromEnv(p: LLMProvider, env: Record): string | undefined; export declare function selectProvider(env: Record): LLMProvider | null; /** * Select a provider considering keystore (keychain/file) in addition to env. * Returns { provider, key } so the caller can use the key directly without * hydrating process.env. Returns null when no provider is configured. * * Resolution order: * 1. WIGOLO_LLM_PROVIDER env override (if key resolves in keystore or env) * 2. Persisted config.json `llmProvider` (if key resolves) — so a runtime * with zero env vars honors the provider chosen during `wigolo init`. * 3. First provider in PROVIDER_ORDER whose key resolves (auto-detect, * keychain → file → env via resolveProviderKey). */ export declare function selectProviderWithKeyStore(env: Record, opts: KeyStoreOpts): Promise<{ provider: LLMProvider; key: string; } | null>; export declare function providerEnvVar(p: LLMProvider): string; export declare function allProviders(): readonly LLMProvider[]; //# sourceMappingURL=select.d.ts.map