Skip to content

Wire the explicit ContradictionDetector into the /add path #1

@omarnagy91

Description

@omarnagy91

The ContradictionDetector in server/contradiction.py (LLM judges keep-old / keep-new / merge) is instantiated in server.py (contradiction_detector = ContradictionDetector(...)) but the /add route never calls it. Today the only fact resolution is mem0 built-in.

Wire it behind a config flag (default off so behavior does not change silently): when on, /add runs check_and_handle before storing and acts on the decision (store / skip / merge). Add a test with a mocked detector.

Acceptance: with the flag on, adding a contradicting fact supersedes or merges the old one; with it off, behavior is unchanged; covered by a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions