Commit Graph

55 Commits

Author SHA1 Message Date
chaithanyak42 60065f3792 fix(tests): fix remaining 6 failures — mock setup for v3 pipeline
- _get_all_from_vector_store: top_k -> limit (2 missed occurrences)
- test_empty_llm_response_fact_extraction (sync+async): add
  db.get_last_messages mock returning [], set custom_instructions=None,
  fix log assertion to use record.message not record.msg
- test_thinking_tags (sync+async): add embed_batch mock, db mock
  with get_last_messages=[], set custom_instructions=None

Root cause: v3 pipeline calls self.db.get_last_messages() and
self.embedding_model.embed_batch() which weren't mocked, causing
the pipeline to silently fail before reaching the LLM call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 02:32:29 +05:30
chaithanyak42 0b4bbcefff fix(tests): update 35 failing tests for v3 single-pass pipeline
Tests were written for the old two-pass extraction pipeline (extract
facts + merge with ADD/UPDATE/DELETE). V3 uses single-pass ADD-only
extraction with one LLM call returning {"memory": [...]}.

Changes by category:

Old pipeline tests (13 failures):
- Delete TestHallucinatedIdGuard entirely (tests UPDATE/DELETE ID
  resolution that no longer exists)
- Update error log assertions to match v3 log messages
- Change LLM mock from 2-call side_effect to 1-call return_value
- Update vllm thinking tag tests for single-call format

ensure_json_instruction removed (3):
- Delete source-inspection tests (function still exists in utils
  but is no longer called from _add_to_vector_store)

UTC timestamp normalization removed (2):
- Update expected timestamps to stored-as-is (no UTC conversion)
- Remove _normalize_iso_timestamp_to_utc import

_search_vector_store signature: top_k -> limit (2):
- Update test calls to use limit= parameter

Context manager + close/db removed (6):
- Delete tests for __enter__/__exit__/close/db that were removed

Vector store BM25 config (3):
- Qdrant: add sparse_vectors_config to create_col assertion,
  named vector format {"": vector} in update assertion
- MongoDB: assert_any_call for both vector + text search indexes

Misc (6):
- test_search_handles_incomplete_payloads: expect 1 result (v3
  filters entries without 'data' key)
- Embedding cache tests: update for embed_batch (1 call) vs
  individual embed (was 2 calls)
- Graph reset tests: delete (graph support removed)
- use_azure_credential: update expected sensitivity to True

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 02:19:39 +05:30
Soumil Rathi 78cc11ef1f fix: restore lmstudio/deepseek providers in TS factory, add langchain to extras
- Restore LMStudioEmbedder, LMStudioLLM, DeepSeekLLM in TS factory.ts
  (accidentally removed during graph store cleanup — unrelated to graphs)
- Add langchain>=0.1.0 to Python extras dep group (was transitively
  provided by langchain-neo4j in the removed graph group, still needed
  by mem0/llms/langchain.py and mem0/embeddings/langchain.py)
- Add pytest.importorskip("langchain") to test_langchain.py for graceful
  skip when langchain isn't installed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:55:36 -07:00
Rakhee Singh 3ffea554bc fix(azure_openai): forward response_format to Azure OpenAI API (#4689) 2026-04-08 19:22:02 +05:30
Rakhee Singh 93bd4e248c fix(deepseek): forward response_format to OpenAI-compatible API (#4635) 2026-03-31 18:06:53 +05:30
Rakhee Singh dbac83218f fix(vllm): forward response_format to OpenAI-compatible API (#4608)
Co-authored-by: rasingh5 <rasingh@demandbase.com>
2026-03-31 13:25:45 +05:30
HUANG XIAO 5d30af9560 feat(bedrock): add MiniMax provider support for AWS Bedrock (#4609) 2026-03-30 20:40:24 +05:30
Gopal Bagaswar 68cf4e118d feat: add reasoning_effort parameter support for reasoning models (#4461) 2026-03-27 17:54:44 +05:30
Himanshu 2e0f91e70d fix(bedrock): omit topP for Anthropic Converse; use AWSBedrockConfig in LlmFactory (#4469) 2026-03-25 11:22:52 +05:30
Utkarsh bda5b726bd fix: avoid sending both temperature and top_p to Anthropic API (#4471)
Co-authored-by: utkarsh240799 <utkarsh240799@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:00:41 +05:30
Kartik abdb07c204 fix: handle None content and empty candidates in GeminiLLM parsing (#4462) 2026-03-21 13:52:13 +05:30
Matt Van Horn 4437c3e8a8 fix: add missing _parse_response to AzureOpenAIStructuredLLM (#4434)
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:14:47 +05:30
Himanshu 54bdbde6e6 feat: add MiniMax LLM provider (#4132) (#4431)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-03-20 19:18:36 +05:30
darrenxu d7a34c24dd fix(ollama): pass tools to client.chat and parse tool_calls from response (#4176)
Signed-off-by: sxu75374 <imshuaixu@gmail.com>
Signed-off-by: Small <imshuaixu@gmail.com>
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-03-18 19:19:36 +05:30
Parshva Daftari 41cfb3ab1a [Update] Default LLM (#3587) 2025-10-15 11:19:52 -07:00
Alex Kondratev ee0202764b Tool call support for LangchainLLM (#3542) 2025-10-06 00:03:44 +05:30
dog-last 51ce6f1347 Bug fix of thinking llm in vllm (#3510) 2025-10-03 19:13:08 +05:30
Srishti Gureja cc15a22bf9 support store for openai (#3399) 2025-09-02 21:23:59 +05:30
David A. Torres 4487785cec feature: add Azure Identity for Azure OpenAI and Azure AI Search authentication (#3262) 2025-08-21 02:00:27 +05:30
John Lockwood 4c748423fc Feat/llm monitoring callback (#2877) 2025-08-08 14:26:51 -07:00
Parshva Daftari 6e8c6c1cb7 Refactored base class config for llms (#3241) 2025-08-05 15:42:06 -07:00
Parshva Daftari 4433666117 Fix failing tests (#3162) 2025-07-25 00:58:45 +05:30
Dev Khant 70d6f9231b Abstraction for Project in MemoryClient (#3067) 2025-07-08 11:33:20 +05:30
Deshraj Yadav 7484eed4b2 Fix CI issues related to missing dependency (#3096) 2025-07-03 18:52:50 -07:00
NiLAy 89499aedbe Feature/vllm support (#2981) 2025-06-23 13:18:38 +05:30
Akshat Jain 386d8b87ae Fix: Migrate Gemini Embeddings (#3002)
Co-authored-by: Dev-Khant <devkhant24@gmail.com>
2025-06-23 13:16:10 +05:30
i-sun 62c330e5b3 feat(LM Studio): Add response_format param for LM Studio to config (#2502) 2025-06-17 17:55:18 +05:30
Dev Khant d85fcda037 Formatting (#2750) 2025-05-22 01:17:29 +05:30
Dev Khant ec1d7a45d3 Fix all lint errors (#2627) 2025-05-06 01:16:02 +05:30
Dev Khant 9dfa9b4412 Add langchain embedding, update langchain LLM and version bump -> 0.1.84 (#2510) 2025-04-07 15:27:26 +05:30
Dev Khant 39e5cbfacc Support for langchain LLMs (#2506) 2025-04-07 11:28:30 +05:30
Anusha Yella 1b1f02eb57 fix/failing-unit-tests (#2486) 2025-04-02 10:36:02 +05:30
Dev Khant e77a10a8da Add LM Studio support (#2425) 2025-03-24 13:32:26 +05:30
Parshva Daftari ee66e0c954 Reverting the tools commit (#2404) 2025-03-20 00:09:00 +05:30
Anusha Yella ee80a43810 Remove tools from LLMs (#2363) 2025-03-14 17:42:48 +05:30
Dev Khant b131c4bfc4 Update max_token and formatting (#2273) 2025-02-28 15:59:34 +05:30
Dev Khant f16a580ef6 Fix Azure OpenAI test (#2217) 2025-02-17 19:21:12 +05:30
Dev Khant 04bbad67ac DeepSeek Integration (#2173) 2025-01-23 17:45:03 +05:30
Dev Khant 605558da9d Code formatting (#1986) 2024-10-29 11:32:07 +05:30
Dev Khant c5d298eec8 Remove unnecessary tools (#1979) 2024-10-22 11:47:16 +05:30
Abhay Shukla 078aa66b90 Implemented Gemini (#1490) (#1965) 2024-10-21 16:23:26 +05:30
Jian Yu, Chen ff7761aaf8 Add Support for Customizing default_headers in Azure OpenAI (#1925) 2024-10-19 15:57:28 +05:30
Mathew Shen 8511eca03b fix(llm): consume llm base url config with a better way (#1861) 2024-09-24 10:05:09 +05:30
Deshraj Yadav 55c54beeab [Misc] Lint code and fix code smells (#1871) 2024-09-16 17:39:54 -07:00
Dev Khant a972d2fb07 Code Formatting (#1828) 2024-09-07 22:39:28 +05:30
k10 077d0c47f9 AzureOpenAI Embedding Model and LLM Model Initialisation from Config. (#1773) 2024-09-01 02:09:00 +05:30
Pranav Puranik fee3c27af3 Adding proxy server settings to azure openai (#1753) 2024-08-29 15:18:50 +05:30
dbcontributions b6cfd960d1 Fix/ollama test cases (#1639) 2024-08-04 12:56:25 +05:30
Mitul Kataria 81b4431c9b Support Azure OpenAI LLM (#1581) 2024-08-03 20:31:43 +05:30
Dev Khant 44aa16a0f8 Support Ollama models (#1596) 2024-08-02 23:45:45 +05:30