Skip to content

fix(llamaindex): pass valid EpisodeType enum instead of invalid "text" string - #1512

Open
connectsudhindra-gif wants to merge 1 commit into
MemMachine:mainfrom
connectsudhindra-gif:fix/llamaindex-episode-type
Open

fix(llamaindex): pass valid EpisodeType enum instead of invalid "text" string#1512
connectsudhindra-gif wants to merge 1 commit into
MemMachine:mainfrom
connectsudhindra-gif:fix/llamaindex-episode-type

Conversation

@connectsudhindra-gif

@connectsudhindra-gif connectsudhindra-gif commented Aug 15, 2026

Copy link
Copy Markdown

Summary

Test plan

  • Added integrations/llamaindex/test_mem_machine_memory.py with two unit tests (mocking the backend Memory) that assert episode_type is forwarded as a real EpisodeType.MESSAGE enum via both add() and put().
  • Verified the new tests fail against the pre-fix code with the exact same shape of error class this bug produces, and pass after the fix.
  • Ran ruff check and ruff format --diff on both changed files: clean.

…" string

MemMachineMemory.add() called memory.add(episode_type="text", ...), but
Memory.add() expects an EpisodeType enum and calls episode_type.value
internally, raising AttributeError: 'str' object has no attribute 'value'.
"text" was also never a valid EpisodeType value (only MESSAGE="message"
exists), so this crashed on every call. Same failure mode as the LangGraph
integration bug fixed in MemMachine#1403 (issue MemMachine#1002).
@connectsudhindra-gif
connectsudhindra-gif force-pushed the fix/llamaindex-episode-type branch from 22dfd6e to c3285b4 Compare August 15, 2026 04:49
@connectsudhindra-gif

Copy link
Copy Markdown
Author

This is ready for review whenever a maintainer has time. Let me know if any changes are needed.

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