CRITICAL FIX: PostgreSQL vector index creation now uses the actual embedding dimension from PGVectorStorage instead of reading from EMBEDDING_DIM environment variable (which defaults to 1024). Root Cause: - check_tables() called _create_vector_indexes() during db initialization - It read EMBEDDING_DIM from env, defaulting to 1024 - E2E tests created 1536d legacy tables - ALTER TABLE failed: "expected 1024 dimensions, not 1536" Solution: - Removed vector index creation from check_tables() - Created new _create_vector_index(table_name, embedding_dim) method - setup_table() now creates index with correct embedding_dim - Each PGVectorStorage instance manages its own index Impact: - E2E tests will now pass - Production deployments work without EMBEDDING_DIM env var - Multi-model support with different dimensions works correctly |
||
|---|---|---|
| .. | ||
| api | ||
| evaluation | ||
| kg | ||
| llm | ||
| tools | ||
| __init__.py | ||
| base.py | ||
| constants.py | ||
| exceptions.py | ||
| lightrag.py | ||
| namespace.py | ||
| operate.py | ||
| prompt.py | ||
| rerank.py | ||
| types.py | ||
| utils.py | ||
| utils_graph.py | ||