/** Provider API key validation — hits each provider's models endpoint to verify the key works. */ /** * Result of an API key validation check performed by {@link validateApiKey}. * * @docLink packages/bridge/api-reference#validation */ export interface ValidationResult { /** `true` when the API key was accepted by the provider's models endpoint. */ ok: boolean; /** Human-readable error description when `ok` is `false`. */ error?: string; } /** * Validate an API key by sending a lightweight GET request to the provider's models endpoint. * * Returns `{ ok: true }` when the provider accepts the key (HTTP 2xx). Returns * `{ ok: false, error }` on 401/403 (invalid key), other HTTP errors, network failures, * or unsupported providers. Requests time out after 8 seconds. * * @param provider - Provider name matching a key in the shared `PROVIDER_ENDPOINTS` map * (e.g. `"anthropic"`, `"openai"`, `"google"`). * @param key - API key to validate. * @param options - Optional base-URL / environment overrides; defaults to the * provider's own API, or its `baseUrlEnv` value when one is set. * @returns Validation result with optional error description. * @docLink packages/bridge/api-reference#validation */ export declare function validateApiKey(provider: string, key: string, options?: { baseUrl?: string; env?: Record; }): Promise; //# sourceMappingURL=validation.d.ts.map