mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18208
Author: @lokiee0
Created: 10/10/2025
Status: ❌ Closed
Base:
main← Head:fix-embedding-config-import-issue-17984📝 Commits (5)
5f584abAdd setup documentation and configuration files66e1360Fix memory leak and NUL character issues in web search924c849Add comprehensive pull request template for web search fix31fe01cAdd CLA text to pull request templatea201d43Fix embedding and reranker models not working after JSON config import📊 Changes
16 files changed (+1494 additions, -561 deletions)
View changed files
➕
FIX_EMBEDDING_CONFIG_IMPORT.md(+144 -0)➕
FIX_MEMORY_LEAK_AND_NUL_CHARS.md(+57 -0)➕
PULL_REQUEST_TEMPLATE.md(+91 -0)➕
SETUP_STATUS.md(+125 -0)📝
backend/open_webui/retrieval/vector/dbs/pgvector.py(+6 -2)📝
backend/open_webui/retrieval/vector/utils.py(+30 -3)📝
backend/open_webui/routers/configs.py(+99 -1)📝
backend/open_webui/routers/retrieval.py(+49 -22)➕
fix_embedding_config_import.py(+137 -0)➕
litellm_config.yaml(+23 -0)📝
package-lock.json(+113 -533)📝
package.json(+1 -0)➕
test_backend.py(+95 -0)➕
test_embedding_config_fix.py(+204 -0)➕
test_web_search_fix.py(+219 -0)➕
validate_fix.py(+101 -0)📄 Description
Fix: Embedding and Reranker Models Not Working After JSON Import
🐛 Issue Description
Issue #17984: After reinstalling OpenWebUI and importing a JSON configuration file, embedding and reranker models fail to work properly, causing vector dimension errors.
Error Symptoms
"Vector dimension error: expected dim: 1024, got 384"Root Cause
When JSON configuration is imported via
/api/configs/import, the system only updates configuration values (app.state.config.*) but doesn't re-initialize the actual embedding functions (app.state.ef,app.state.EMBEDDING_FUNCTION). This causes a mismatch between:✅ Solution Implemented
Fix Location
File:
backend/open_webui/routers/configs.pyFunction:
import_config()What the Fix Does
Key Changes
📊 Impact & Benefits
🧪 Testing
Test Scenarios Covered
Validation Steps
🔄 Backward Compatibility
📁 Files Modified
backend/open_webui/routers/configs.py- Added embedding function re-initializationfix_embedding_config_import.py- Utility function for re-initializationtest_embedding_config_fix.py- Comprehensive test suiteFIX_EMBEDDING_CONFIG_IMPORT.md- This documentation🚀 Deployment Notes
configs.py🔍 Technical Details
Embedding Function Initialization Flow
Memory Management
🎯 Future Improvements
This fix resolves a critical user experience issue and ensures that imported configurations work immediately without manual intervention.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.