export type OpenAIConnectionResult = { readonly ok: true; } | { readonly ok: false; readonly reason: "missing-key" | "auth-failed" | "network-error" | "unknown-error"; readonly message: string; }; export interface OpenAIModelsClient { readonly models: { list(): Promise; }; } export type OpenAIClientFactory = (apiKey: string) => OpenAIModelsClient; export declare const SETUP_OPENAI_VALIDATION_TIMEOUT_MS = 10000; /** * Check an OpenAI key by listing models. * * @param apiKey OpenAI API key. * @param createClient Factory used to create the OpenAI client. * @returns Validation result for the API key. */ export declare function validateOpenAIConnection(apiKey: string, createClient?: OpenAIClientFactory): Promise;