/**
 * Model Tier Routing
 *
 * Research-based implementation of tiered model selection.
 * Routes requests to appropriate model tiers based on task complexity.
 *
 * Expected Impact:
 * - 30-70% cost reduction
 * - Maintain quality for complex tasks
 *
 * Reference: FrugalGPT (Stanford), LLMProxy (arXiv 2024)
 */
/**
 * Model tier definitions
 */
export type ModelTier = "mini" | "standard" | "reasoning" | "vision";
/**
 * Task complexity levels
 */
export type TaskComplexity = "simple" | "moderate" | "complex" | "reasoning_heavy";
/**
 * Model configuration
 */
export interface ModelConfig {
    id: string;
    tier: ModelTier;
    costPerMillionTokens: number;
    maxTokens: number;
    supportsVision: boolean;
    supportsToolUse: boolean;
    reasoning: "basic" | "standard" | "extended";
}
/**
 * Available Grok models with their configurations
 */
export declare const GROK_MODELS: Record<string, ModelConfig>;
/**
 * Task classification for routing
 */
export interface TaskClassification {
    complexity: TaskComplexity;
    requiresVision: boolean;
    requiresReasoning: boolean;
    requiresLongContext: boolean;
    estimatedTokens: number;
    confidence: number;
}
/**
 * Routing decision
 */
export interface RoutingDecision {
    recommendedModel: string;
    tier: ModelTier;
    reason: string;
    estimatedCost: number;
    alternativeModel?: string;
    alternativeReason?: string;
}
/**
 * Classify task complexity from user message
 */
export declare function classifyTaskComplexity(message: string, conversationHistory?: string[], _currentFile?: string): TaskClassification;
/**
 * Select optimal model based on task classification
 */
export declare function selectModel(classification: TaskClassification, preferredModel?: string, availableModels?: string[]): RoutingDecision;
/**
 * Calculate estimated cost for a request
 */
export declare function calculateCost(tokens: number, modelId: string): number;
/**
 * Get cost comparison between models
 */
export declare function getCostComparison(tokens: number): Array<{
    model: string;
    tier: ModelTier;
    cost: number;
    savings: string;
}>;
/**
 * Routing configuration
 */
export interface RoutingConfig {
    /** Enable automatic model routing */
    enabled: boolean;
    /** Default model when routing is disabled */
    defaultModel: string;
    /** Minimum confidence to apply routing */
    minConfidence: number;
    /** Cost threshold to prefer cheaper models */
    costSensitivity: "low" | "medium" | "high";
    /** Allow falling back to cheaper models on rate limits */
    allowFallback: boolean;
    /** Models to exclude from routing */
    excludeModels: string[];
}
/**
 * Default routing configuration
 */
export declare const DEFAULT_ROUTING_CONFIG: RoutingConfig;
/**
 * Model router class for managing routing state
 */
export declare class ModelRouter {
    private config;
    private usageStats;
    constructor(config?: Partial<RoutingConfig>);
    /**
     * Route a request to the optimal model
     */
    route(message: string, conversationHistory?: string[], preferredModel?: string): RoutingDecision;
    /**
     * Record usage for a model
     */
    recordUsage(modelId: string, tokens: number, cost: number): void;
    /**
     * Get usage statistics
     */
    getUsageStats(): Map<string, {
        calls: number;
        tokens: number;
        cost: number;
    }>;
    /**
     * Get total cost
     */
    getTotalCost(): number;
    /**
     * Get cost savings estimate (vs always using most expensive)
     */
    getEstimatedSavings(): {
        saved: number;
        percentage: number;
    };
    /**
     * Update configuration
     */
    updateConfig(config: Partial<RoutingConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): RoutingConfig;
}
/**
 * Get the global model router
 */
export declare function getModelRouter(): ModelRouter;
/**
 * Initialize model router with custom config
 */
export declare function initializeModelRouter(config: Partial<RoutingConfig>): ModelRouter;
declare const _default: {
    classifyTaskComplexity: typeof classifyTaskComplexity;
    selectModel: typeof selectModel;
    calculateCost: typeof calculateCost;
    getCostComparison: typeof getCostComparison;
    ModelRouter: typeof ModelRouter;
    getModelRouter: typeof getModelRouter;
    initializeModelRouter: typeof initializeModelRouter;
    GROK_MODELS: Record<string, ModelConfig>;
    DEFAULT_ROUTING_CONFIG: RoutingConfig;
};
export default _default;
