mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #886] [CLOSED] serve: skip completed empty assistant turns in chat history #2894
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2894
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/886
Author: @Arthur031221
Created: 10/5/2026
Status: ❌ Closed
Base:
main← Head:fix/empty-assistant-history📝 Commits (1)
1bb8ff9serve: skip completed empty assistant turns in chat history📊 Changes
2 files changed (+86 additions, -0 deletions)
View changed files
📝
serve/frontend.py(+5 -0)➕
serve/test_frontend.py(+81 -0)📄 Description
Clients that resend empty assistant replies can get completed turns with no answer or tool call in their next prompt. This skips those turns before rendering and keeps the final message, tool calls, and images.
Based on @jramirez-uab's patch in #843. Added a regression that checks rendered history through the server's prompt tokenization.
Tested with
.venv/bin/python -m unittest serve.test_frontend -q.Fixes #843
Co-authored-by: jramirez-uab 238218748+jramirez-uab@users.noreply.github.com
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.