chore: upgrade mem0ai to 2.0.5 and adapt provider to the 2.0 search API#13
Merged
Conversation
…arch API
mem0ai 2.0 moved entity scoping in Memory.search from a top-level
user_id= kwarg to filters={"user_id": ...} and renamed limit= to
top_k=. The 2.0 API rejects the old call shape outright, so the
provider could not run at all against current mem0.
Also installs the [nlp] extra so mem0's keyword/lemma pipeline is
active rather than degraded.
Fairness note: this keeps mem0 at its current released version with
out-of-the-box defaults (score threshold 0.1, rerank off), per the
fairness contract. Operators need spaCy's en_core_web_sm model
available; mem0 auto-downloads it where pip is present.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
mem0-localprovider was pinned tomem0ai==1.0.0(November-era). mem0 has since shipped 2.0 (currently 2.0.5), whoseMemory.searchAPI is a breaking change:user_id=kwarg tofilters={"user_id": ...}limit=becametop_k=The 2.0 API rejects the old call shape outright (
_reject_top_level_entity_params), so the provider could not run against current mem0 at all — meaning headline comparisons were silently testing a major version behind mem0's current state.Changes
mem0ai[nlp]==2.0.5(thenlpextra activates mem0's spaCy lemma/keyword pipeline instead of running degraded with a warning)Memory.searchcall inmem0_local.pyto the 2.0 signature;add/delete_allare unchanged in 2.0Fairness / reproducibility impact
en_core_web_smmodel present; mem0 auto-downloads it where pip is available. In uv-managed venvs (no pip), preinstall withuv pip install <en_core_web_sm wheel URL>./tmp/qdrantwas created by an earlier version — wipe/tmp/qdrantand~/.mem0before fresh comparison runs.Validation
uv run ruff check .anduv run pytest testspassmem0-localstateokon 2.0.5🤖 Generated with Claude Code