import type { AIChatRequest, AICostRecord, AIRouteConfig } from '@donotdev/core/server';
/** Per-request options passed to the AI route handler. */
export interface AIRouteOptions {
    /** Authenticated user ID */
    userId: string;
    /** Request ID for cost tracking */
    requestId?: string;
    /** Callback to persist cost record (platform-specific) */
    onCostRecord?: (record: AICostRecord) => Promise<void>;
}
/**
 * Handle an AI chat request using Vercel AI SDK.
 * Supports both streaming (returns SSE Response) and non-streaming (returns JSON).
 *
 * @param request - Validated AI chat request
 * @param config - Route configuration
 * @param options - Per-request options (userId, cost callback)
 * @returns Response (SSE stream or JSON)
 */
export declare function handleAIRequest(request: AIChatRequest, config: AIRouteConfig, options: AIRouteOptions): Promise<Response>;
