Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(vikingdb): drop schema version from embedding metadata (#2848)
Qin Haojie47556bf69414
diff --git a/openviking/storage/collection_schemas.py b/openviking/storage/collection_schemas.pyindex bb01b9227..1b1b8d3cb 100644--- a/openviking/storage/collection_schemas.py+++ b/openviking/storage/collection_schemas.py@@ -41,8 +41,6 @@ from openviking_cli.utils.config.open_viking_config import OpenVikingConfiglogger = get_logger(__name__)EMBEDDING_META_MARKER = "\n\n[openviking.embedding]\n"-# Minimum OV version that supports content field + FullText config for grep bm25-_FULLTEXT_MIN_VERSION = "0.3.18"_EMBEDDING_COMPATIBILITY_KEYS = ("provider", "model", "dimension", "model_identity")@@ -190,14 +188,11 @@ def _build_embedding_metadata(config: "OpenVikingConfig") -> Dict[str, Any]:except Exception:model_identity = model- from openviking import __version__-return {"provider": provider,"model": model,"dimension": dimension,"model_identity": model_identity,- "schema_version": __version__,}@@ -313,17 +308,11 @@ async def init_context_collection(storage) -> bool:if ("Fields" in existing_meta or "FullText" in existing_meta) and not _collection_has_content_fulltext(existing_meta):- existing_schema_version = "unknown"- if existing_embedding_meta:- existing_schema_version = existing_embedding_meta.get("schema_version", "0.0.0")logger.warning("Collection schema does not support VikingDB full-text grep "- "(created by OV %s, feature requires >= %s). ""Missing 'content' field or FullText config. ""grep engine=auto will fall back to fs. "- "Recreate the collection to enable vikingdb-based grep.",- existing_schema_version,- _FULLTEXT_MIN_VERSION,+ "Recreate the collection to enable vikingdb-based grep.")if _embedding_metadata_compatible(existing_embedding_meta, embedding_meta):diff --git a/tests/storage/test_collection_schemas.py b/tests/storage/test_collection_schemas.pyindex daef696b8..95eb2772b 100644--- a/tests/storage/test_collection_schemas.py+++ b/tests/storage/test_collection_schemas.py@@ -251,6 +251,7 @@ def test_build_embedding_metadata_hashes_resolved_local_model_path(tmp_path):assert payload["provider"] == "local"assert payload["model"] == "bge-small-zh-v1.5-f16"assert payload["model_identity"] == hashlib.sha256(expected.encode("utf-8")).hexdigest()+ assert "schema_version" not in payload@pytest.mark.asyncio