Skip to content

Return no memory results for empty prompt ID filters#1499

Open
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:reject-empty-memory-filters
Open

Return no memory results for empty prompt ID filters#1499
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:reject-empty-memory-filters

Conversation

@biefan
Copy link
Contributor

@biefan biefan commented Mar 17, 2026

Summary

  • return an empty result when prompt_ids=[] is passed to memory queries
  • add regression coverage for both get_message_pieces() and get_prompt_scores()

Problem

MemoryInterface.get_message_pieces() currently uses a truthy check for prompt_ids, so an explicit empty list is treated the same as omitting the filter entirely.

That makes get_message_pieces(prompt_ids=[]) and get_prompt_scores(prompt_ids=[]) fall back to full queries, which is inconsistent with get_scores(score_ids=[]) and surprising for an explicit ID filter.

Testing

  • .venv/bin/pytest tests/unit/memory/memory_interface/test_interface_prompts.py tests/unit/memory/memory_interface/test_interface_scores.py -q

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