Fix truncation tests to check output chat history for truncation

New truncation logic return a new message list.
It does not update message list by reference/in place since 8a16f5a2a.
So truncation tests should run verification on the truncated chat
history returned by the truncation func instead of the original chat
history passed into the truncation func.
This commit is contained in:
Debanjum
2025-08-28 15:38:40 -07:00
parent c0f192b436
commit 81c651b5b2
2 changed files with 18 additions and 20 deletions

View File

@@ -817,6 +817,8 @@ def truncate_messages(
system_message.append(message)
else:
non_system_messages.append(message)
# New message list without system messages
messages = non_system_messages
# Drop older messages until under max supported prompt size by model