mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #18209] [CLOSED] Fix: Embedding and Reranker Models Not Working After JSON Config Import#17984 #11505
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/18209
Author: @lokiee0
Created: 10/10/2025
Status: ❌ Closed
Base:
main← Head:main📝 Commits (2)
5f584abAdd setup documentation and configuration files66e1360Fix memory leak and NUL character issues in web search📊 Changes
10 files changed (+718 additions, -560 deletions)
View changed files
➕
FIX_MEMORY_LEAK_AND_NUL_CHARS.md(+57 -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/retrieval.py(+49 -22)➕
litellm_config.yaml(+23 -0)📝
package-lock.json(+113 -533)📝
package.json(+1 -0)➕
test_backend.py(+95 -0)➕
test_web_search_fix.py(+219 -0)📄 Description
Fix: Embedding and Reranker Models Not Working After JSON Config Import
🐛 Issue Description
Fixes issue #17984: Embedding and reranker models fail to work after reinstalling OpenWebUI and importing a JSON configuration file.
"Vector dimension error: expected dim: 1024, got 384"Related Issue: #17984
🔧 Root Cause Analysis
/api/configs/importonly updatesapp.state.config.*valuesapp.state.ef,app.state.EMBEDDING_FUNCTION) not updated/embedding/updateendpoint properly initializes functions✅ Solution Implemented
1. Automatic Function Re-initialization
backend/open_webui/routers/configs.pyimport_config()to detect embedding configuration changes2. Comprehensive Detection
3. Memory Management
📊 Performance Impact
🧪 Testing
Comprehensive Test Suite
test_embedding_config_fix.pyValidation Results
validate_fix.py🔄 Backward Compatibility
📁 Files Changed
backend/open_webui/routers/configs.py- Enhanced config import with embedding re-initializationfix_embedding_config_import.py- Utility function and implementation guidetest_embedding_config_fix.py- Comprehensive test suitevalidate_fix.py- Fix validation scriptFIX_EMBEDDING_CONFIG_IMPORT.md- Detailed technical documentation🚀 Deployment Notes
configs.py📈 Monitoring Recommendations
📝 Contributor License Agreement
contributor license agreement
This fix resolves a critical user experience issue affecting configuration management and should be prioritized for merge to improve the OpenWebUI import workflow.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.