export type CursorGatewayConfig = | { provider?: "ai-gateway" runtime?: "local-executor" apiKey: string baseURL?: string headers?: Record metadataCacheRefreshMillis?: number imageModel?: string imageSize?: string imageAspectRatio?: string imageProviderOptions?: Record image?: CursorGatewayImageConfig } | { provider: "openai-compatible" runtime?: "local-executor" baseURL: string apiKey: string headers?: Record queryParams?: Record includeUsage?: boolean imageModel?: string imageSize?: string imageAspectRatio?: string imageProviderOptions?: Record image?: CursorGatewayImageConfig } export type CursorGatewayImageConfig = { model: string size?: string aspectRatio?: string providerOptions?: Record } export type CursorGatewayHandle = { url: string runtime: "local-executor" close(): Promise } export function configureCursorGateway(config: CursorGatewayConfig): Promise export function closeCursorGateway(): Promise