/** * Model Compatibility Module (SMCP-074) * * Provides migration detection for embedding model changes. * When the embedding model changes between versions, existing indexes * need to be rebuilt to use the new model's embeddings. * * This module checks if the stored model metadata matches the current * model configuration and provides helpful error messages when a * mismatch is detected. */ import type { EmbeddingModelInfo } from '../storage/metadata.js'; /** * Result of model compatibility check */ export interface ModelCompatibilityResult { /** Whether the models are compatible */ compatible: boolean; /** Code model compatibility */ codeModelMatch: boolean; /** Docs model compatibility */ docsModelMatch: boolean; /** Detailed message if incompatible */ message?: string; } /** * Model information for display */ export interface ModelDisplayInfo { codeModelName: string | null; codeModelDimension: number | null; docsModelName: string | null; docsModelDimension: number | null; } /** * Get the current model configuration * * @returns Current model configuration used by the application */ export declare function getCurrentModelConfig(): ModelDisplayInfo; /** * Check if the stored model metadata is compatible with current models * * @param storedModels - Embedding model info from index metadata (may be null for legacy indexes) * @returns Compatibility result with details */ export declare function checkModelCompatibility(storedModels: EmbeddingModelInfo | null | undefined): ModelCompatibilityResult; /** * Check only code model compatibility (for search_code) * * @param storedModels - Embedding model info from index metadata * @returns Compatibility result for code model only */ export declare function checkCodeModelCompatibility(storedModels: EmbeddingModelInfo | null | undefined): ModelCompatibilityResult; /** * Check only docs model compatibility (for search_docs) * * @param storedModels - Embedding model info from index metadata * @returns Compatibility result for docs model only */ export declare function checkDocsModelCompatibility(storedModels: EmbeddingModelInfo | null | undefined): ModelCompatibilityResult; /** * Build warning message for get_index_status (non-blocking) */ export declare function buildStatusWarning(storedModels: EmbeddingModelInfo | null | undefined): string | undefined; //# sourceMappingURL=modelCompatibility.d.ts.map