Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docker/mem0/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ def add_memories(req: AddRequest):
def search_memories(req: SearchRequest):
"""Search memories by semantic similarity + BM25 + entity boost."""
mem = _get_memory()
params: dict[str, Any] = {"limit": req.limit}
# mem0 SDK renamed Memory.search()'s 'limit' param to 'top_k' in e6d6276b
# (2026-04-15, #4843). Passing 'limit=' here falls into **kwargs and is
# silently ignored, so top_k always defaults to 20 — making the benchmark's
# top_50/top_200 cutoffs ineffective. Pass 'top_k=' instead.
params: dict[str, Any] = {"top_k": req.limit}
if req.user_id:
params["user_id"] = req.user_id
if req.agent_id:
Expand Down