Skip to content

Commit 475da21

Browse files
author
dori
committed
feat: during load only verify max token limit and filter old records according
1 parent 69b220e commit 475da21

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/mcp_as_a_judge/db/conversation_history_service.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ async def load_context_for_enrichment(
6161
logger.info(f"📚 Retrieved {len(recent_records)} conversation records from DB")
6262

6363
# Apply LLM context filtering: ensure history + current prompt will fit within token limit
64-
# This filters the list without modifying the database
65-
filtered_records = filter_records_by_token_limit(
66-
records=recent_records, max_records=self.config.database.max_session_records
67-
)
64+
# This filters the list without modifying the database (only token limit matters for LLM)
65+
filtered_records = filter_records_by_token_limit(recent_records)
6866

6967
logger.info(
7068
f"✅ Returning {len(filtered_records)} conversation records for LLM context"

0 commit comments

Comments
 (0)