Skip to content

fix(oss-server): use top_k= instead of limit= after SDK rename (#4843)#16

Open
artree222 wants to merge 1 commit into
mem0ai:mainfrom
artree222:fix/search-top-k
Open

fix(oss-server): use top_k= instead of limit= after SDK rename (#4843)#16
artree222 wants to merge 1 commit into
mem0ai:mainfrom
artree222:fix/search-top-k

Conversation

@artree222

Copy link
Copy Markdown

mem0 SDK renamed Memory.search()'s 'limit' param to 'top_k' in e6d6276b (2026-04-15, #4843). The OSS server still passes limit=, which silently falls into **kwargs and is ignored, so top_k always defaults to 20 — making the benchmark's top_50/top_200 cutoffs ineffective (they only feed ~20 memories to the LLM).

Pass top_k= to mem.search() so the REST field 'limit' (SearchRequest) maps to the SDK's current parameter name. Client payload is unchanged — it already talks to the REST field, not the SDK.

mem0 SDK renamed Memory.search()'s 'limit' param to 'top_k' in e6d6276b
(2026-04-15, #4843). The OSS server still passes limit=, which silently
falls into **kwargs and is ignored, so top_k always defaults to 20 —
making the benchmark's top_50/top_200 cutoffs ineffective (they only
feed ~20 memories to the LLM).

Pass top_k= to mem.search() so the REST field 'limit' (SearchRequest)
maps to the SDK's current parameter name. Client payload is unchanged —
it already talks to the REST field, not the SDK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant