mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2285] [CLOSED] fix(serve): preserve late instruction roles across adapters #3960
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#3960
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/2285
Author: @Tsury
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:fix/native-roles📝 Commits (1)
c680df8fix(serve): preserve late instruction roles across adapters📊 Changes
5 files changed (+22 additions, -21 deletions)
View changed files
📝
serve/chat_template.jinja(+4 -3)📝
serve/frontend.py(+2 -10)📝
serve/responses.py(+3 -3)📝
serve/test_responses.py(+2 -2)📝
serve/test_server.py(+11 -3)📄 Description
Late system/developer messages currently become user messages on the Chat, Messages and Responses paths. Their position survives, but their instruction role does not.
Preserve the role through adapters and render late system/developer content as system messages in the bundled template. Keep leading instruction merging and the existing rejection of images in system content. Remove the conversion helper and its imports.
Based on main
a0116b2782a5b82622358c04a06496485d12b2d6. Related #56 fixed template refusal by changing late roles to user; this change retains the accepted messages' instruction role instead. Custom templates remain responsible for their own accepted roles.Validation: 52 focused model-free client/Responses tests pass. The strengthened existing HTTP tests fail on stock for the missing system-role markers and pass after this change. They verify order and one occurrence of each late instruction. No new GPU workload or deployment, and no model-quality or throughput claim.
Command:
python3 -m unittest serve.test_server.ClientShapes serve.test_responses.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.