v0.2.13

mem0ai/mem0v0.2.13Jul 22, 2026by kartik-mem0

AI Summary

This release focuses on critical bug fixes for vector stores (Qdrant, Pinecone) and core logic to prevent metadata injection of immutable identity fields, alongside improvements to LLM configuration and similarity scoring.

Key Highlights

  • Fixed `reset()` leaving stale vectors in local Qdrant stores due to file handle issues.
  • Prevented `update()` metadata from overwriting immutable identity fields like `user_id` and `agent_id`.
  • Scoped Pinecone `delete_col()` and `reset()` to the configured namespace to prevent data loss.
  • Fixed Baidu Mochow similarity scoring to rank closer matches higher.
  • Updated `OPENAI_BASE_URL` environment variable support in OpenAI-compatible providers.

Breaking Changes

  • The `update()` method now strictly rejects attempts to overwrite identity fields (`user_id`, `agent_id`, `run_id`, `actor_id`) via the metadata parameter.
  • Pinecone `delete_col()` and `reset()` operations are now strictly scoped to the configured namespace.

Full Release Notes

**Bug Fixes:**
- **Vector Stores:** Fix `reset()` silently leaving stale vectors behind on local (on-disk) Qdrant when the old collection directory could not be removed, for example an open file handle on Windows or NFS ([#6412](https://github.com/mem0ai/mem0/pull/6412))
- **Core:** Stop `update()` metadata from overwriting or injecting `user_id`, `agent_id`, `run_id`, or `actor_id`. These identity fields are immutable after creation, so passing them in `metadata` can no longer move a memory into a different tenant's scope ([#6278](https://github.com/mem0ai/mem0/pull/6278))
- **Vector Stores:** Scope Pinecone `delete_col()`/`reset()` to the configured namespace instead of deleting the whole index, so resetting a namespaced Pinecone store no longer wipes out the other namespaces sharing that index ([#6287](https://github.com/mem0ai/mem0/pull/6287))
- **Vector Stores:** Convert Baidu Mochow's raw L2 distance into a similarity score in `search()` (`1 / (1 + distance)`), so closer matches rank higher instead of lower, matching the Milvus provider and the rest of the `VectorStoreBase` contract ([#6435](https://github.com/mem0ai/mem0/pull/6435))
- **LLMs:** Read `OPENAI_BASE_URL` (was `OPENAI_API_BASE`) in `OpenAIStructuredLLM`, matching the official OpenAI SDK's environment variable and the rest of the OpenAI-compatible providers ([#6322](https://github.com/mem0ai/mem0/pull/6322))

**Improvements:**
- **LLMs:** Remove a dead, no-op `api_key` attribute check from `LLMBase.__init__` ([#6460](https://github.com/mem0ai/mem0/pull/6460))

**Changes:**
- **Client:** Remove the `retrieval_criteria` parameter from `MemoryClient.update_project()`/`AsyncMemoryClient.update_project()` and `Project.update()`/`AsyncProject.update()`. It was accepted and forwarded but never affected retrieval, so removing it is not a behavior change ([#6313](https://github.com/mem0ai/mem0/pull/6313))