github doobidoo/mcp-memory-service v10.24.0
v10.24.0 - Fix external embedding API silent fallback (#551)

latest releases: v10.40.3, v10.40.2, v10.40.1...
one month ago

What's Changed

Bug Fixes

  • [#551] Fix external embedding API silent fallback (PR #554): When an external embedding provider (vLLM, Ollama, TEI, OpenAI-compatible) returned an error during startup or embedding generation, sqlite_vec.py silently fell back to the local ONNX model. This mixed two incompatible vector spaces in the same database, causing all subsequent semantic searches to return incorrect or irrelevant results — with no warning to the user that anything was wrong.

    The fix:

    • Replaced the silent logger.warning + fallback path with a hard raise RuntimeError(...) that clearly reports the API failure reason
    • Added _get_existing_db_embedding_dimension() helper that reads the FLOAT[N] column definition from sqlite_master to detect the dimension already stored in the database
    • Used asyncio.to_thread() for the synchronous DB read inside the async method
    • DRY error message includes the detected existing DB dimension when available, making mismatch diagnosis straightforward
    • Corrected a stale integration test that asserted a version field on /api/health (removed in the GHSA-73hc-m4hx-79pj security hardening in v10.21.0)

Tests

  • 10 new regression tests in tests/storage/test_issue_551_external_embedding_fallback.py covering: hard failure on API error, dimension mismatch detection, DRY error message format, asyncio.to_thread integration, and interaction with the existing DB dimension helper
  • 1,397 total tests

Upgrade Notes

This is a PATCH release. No breaking changes. No migration required.

If you were relying on the silent fallback to local ONNX when your external embedding API was unavailable, you will now receive a RuntimeError at startup instead. This is intentional — the previous behaviour silently corrupted your vector database.

Full Changelog: https://github.com/doobidoo/mcp-memory-service/blob/main/CHANGELOG.md#10240---2026-03-05

Don't miss a new mcp-memory-service release

NewReleases is sending notifications on new releases.