codecrucible-synth
Version:
Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability
70 lines • 2.37 kB
TypeScript
/**
* Model Selection Coordinator - Single Source of Truth for Model Selection
* Implements audit report recommendations for fixing model inconsistency
* Created: August 21, 2025
*/
import { EventEmitter } from 'events';
export interface ModelSelectionConfig {
provider: 'ollama' | 'lm-studio' | 'auto';
model: string;
reason: string;
confidence: number;
taskType?: string;
}
export interface ProviderCapabilities {
provider: string;
available: boolean;
models: string[];
preferredModels: string[];
strengths: string[];
responseTime: string;
}
/**
* Single authoritative model selection system
* Resolves conflicts between multiple routing systems
*/
export declare class ModelSelectionCoordinator extends EventEmitter {
private logger;
private selectedModels;
private providerCapabilities;
private routingHistory;
private readonly modelPriority;
constructor();
/**
* Select model based on task requirements and provider availability
* This is the ONLY method that should be used for model selection
*/
selectModel(provider: string, taskType: string, availableModels?: string[]): Promise<ModelSelectionConfig>;
/**
* Get the currently selected model for a provider
* Returns consistent model throughout the session
*/
getSelectedModel(provider: string): string;
/**
* Update provider capabilities (called when providers report available models)
*/
updateProviderCapabilities(provider: string, capabilities: Partial<ProviderCapabilities>): void;
/**
* Determine which provider to use based on task complexity
* This replaces the conflicting routing logic in multiple places
*/
routeToProvider(taskType: string, complexity: 'simple' | 'complex' | 'auto'): Promise<string>;
/**
* Get routing statistics for monitoring
*/
getRoutingStats(): any;
/**
* Clear cached selections (useful for testing or provider changes)
*/
clearSelections(): void;
/**
* Export current configuration for persistence
*/
exportConfiguration(): any;
/**
* Import configuration from persistence
*/
importConfiguration(config: any): void;
}
export declare const modelCoordinator: ModelSelectionCoordinator;
//# sourceMappingURL=model-selection-coordinator.d.ts.map