You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: HTTP BGE reranking drops memory text when selected sources are missing #2559
Searched existing issues and PRs for rerank_source and concat_original_source.
Checked the project behavior and verified the failure is in MemOS's request construction.
Bug Description | 问题描述
When HTTPBGEReranker is configured with rerank_source="sources", a memory with a nonempty memory field and no metadata.sources is sent to the endpoint as an empty document. This also happens when sources is None. The reranker receives no text for that candidate, even though the same record has valid text when source enrichment is disabled.
How to Reproduce | 如何重现
Instantiate HTTPBGEReranker with rerank_source="sources".
Call rerank("offline preference", [{"memory": "Prefers offline mode", "metadata": {}}], top_k=1) against a stub endpoint and inspect the JSON request.
The payload contains "documents": [""]. Expected "documents": ["Prefers offline mode"].
Environment | 环境信息
MemOS 2.0.33 (d326a64), Python 3.12.14, macOS. Reproduced using the real reranker with a mocked HTTP response.
Additional Context | 其他信息
The source concatenator initializes the primary text inside the loop over sources, which is never entered when no selected source field is present. The fix will retain the primary text for those candidates and keep normal source-enriched documents and index alignment.
AI assistance: Codex identified and reproduced the problem. A focused patch and regression tests are being prepared for this report.
Activity
Memtensor-AI commentedon Nov 4, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
aa6f4f98538689eeWorking branch:
bugfix/autodev-2559-20261104125512737Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.