feat: Implement hybrid model management with multi-source fallbacks

- Add HybridModelManager with singleton pattern to prevent duplicate model loads
- Implement triple-fallback model downloading (CDN → GitHub → Hugging Face)
- Fix soft-delete filtering to only apply when metadata filters are present
- Enhance model initialization with environment-specific optimizations
- Fix vitest configuration to use correct setup file
- Ensure consistent 384-dimensional embeddings across all operations

This release combines the best of both approaches:
- Singleton pattern prevents multiple ONNX model loads in memory
- Multi-source fallback ensures model availability even if CDN is down
- Soft deletes work correctly without breaking pure vector searches
- All core functionality preserved with enhanced reliability
This commit is contained in:
David Snelling 2025-08-19 13:13:37 -07:00
parent c9b0bd0e3f
commit b2cb85651a
4 changed files with 347 additions and 13 deletions

View file

@ -4,7 +4,7 @@ export default defineConfig({
test: {
// Default configuration
globals: true,
setupFiles: ['./tests/test-setup.ts', './tests/setup.ts'],
setupFiles: ['./tests/setup.ts'],
testTimeout: 120000, // 120 seconds for TensorFlow operations
hookTimeout: 120000,
// Run tests in parallel with limited pool