/**
 * @fileoverview AI Handler Algorithm
 * @description Platform-agnostic handler for AI chat requests.
 * Validates, rate limits (Upstash), dispatches to provider adapter.
 *
 * @version 0.2.0
 * @since 0.1.0
 * @author AMBROISE PARK Consulting
 */
import type {
  AIChatRequest,
  AIChatResponse,
  AIProviderAdapter,
  AIRateLimitConfig,
} from '@donotdev/core/server';
/**
 * Handle an AI chat request (non-streaming).
 * Returns the full response as JSON.
 */
export declare function handleAIChatRequest(
  request: AIChatRequest,
  adapter: AIProviderAdapter,
  options: {
    userId: string;
    rateLimitConfig?: AIRateLimitConfig;
  }
): Promise<AIChatResponse>;
/**
 * Handle an AI chat request (streaming).
 * Returns an SSE Response for direct use in edge functions.
 */
export declare function handleAIStreamRequest(
  request: AIChatRequest,
  adapter: AIProviderAdapter,
  options: {
    userId: string;
    rateLimitConfig?: AIRateLimitConfig;
  }
): Response;
