/**
 * Model Router
 *
 * Routes tasks to appropriate models based on:
 * - Task complexity and type
 * - Routing rules configuration
 * - Cost optimization strategy
 * - Available model capabilities
 */
import { ModelConfig, MultiModelConfig, TaskClassificationResult, TaskComplexity, ModelSelection, RoutingRule, ModelRole } from './types.js';
/**
 * Model Router - routes tasks to appropriate models
 */
export declare class ModelRouter {
    private config;
    private models;
    private routingRules;
    private roleAssignments;
    constructor(config: MultiModelConfig);
    private initializeModels;
    private initializeRoles;
    private validateRoleAssignments;
    /**
     * Classify a task to determine complexity and type.
     * Results are cached to implement LLM call reduction (costOptimization.llmCallReduction).
     */
    classifyTask(taskDescription: string): TaskClassificationResult;
    /**
     * Select the appropriate model for a task.
     * Behavior varies by routingStrategy:
     * - 'performance-first': Always use planner (highest-capability model)
     * - 'cost-optimized': Use cheapest model that meets capability threshold
     * - 'balanced': Standard priority-rule matching (default)
     * - 'adaptive': Dynamically balances cost and performance based on task characteristics
     */
    selectModel(complexity: TaskComplexity, taskType: string, keywords: string[]): ModelSelection;
    /**
     * Map task type + complexity to a required model capability.
     */
    private getRequiredCapability;
    private buildReasoning;
    /**
     * Adaptive routing: dynamically balance cost and performance based on task characteristics.
     * - Critical/high complexity tasks → use planner (performance-focused)
     * - Medium complexity → use balanced approach with cost consideration
     * - Low complexity → use cheapest capable model (cost-optimized)
     * - Security-sensitive tasks → always use higher-capability model
     */
    private selectAdaptiveModel;
    /**
     * Balanced routing: standard priority-rule matching (used as fallback in adaptive)
     */
    private selectBalancedModel;
    /**
     * Estimate cost for a model invocation
     */
    estimateCost(model: ModelConfig, inputTokens: number, outputTokens: number): number;
    /**
     * Get model by ID
     */
    getModel(modelId: string): ModelConfig | undefined;
    /**
     * Get model for a specific role
     */
    getModelForRole(role: ModelRole): ModelConfig | undefined;
    /**
     * Get all configured models
     */
    getAllModels(): ModelConfig[];
    /**
     * Get routing analysis for debugging
     */
    analyzeRouting(taskDescription: string): {
        classification: TaskClassificationResult;
        matchedRules: Array<{
            rule: RoutingRule;
            matched: boolean;
            reason: string;
        }>;
        costComparison: Array<{
            model: string;
            cost: number;
        }>;
    };
    /**
     * Get default configuration with opus-4.6 for planning and qwen35 for execution
     */
    static getDefaultUAPConfig(): MultiModelConfig;
}
/**
 * Create a router instance from config
 */
export declare function createRouter(config: MultiModelConfig): ModelRouter;
/**
 * Default router with cost-optimized settings
 */
export declare function createCostOptimizedRouter(): ModelRouter;
/**
 * Default router with performance-first settings
 */
export declare function createPerformanceRouter(): ModelRouter;
/**
 * Default UAP router with opus-4.6 for planning and qwen35 for execution
 */
export declare function createUAPRouter(): ModelRouter;
//# sourceMappingURL=router.d.ts.map