mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1273] [Issue]: User and assistant roles get switched when a preset is active (roleplay) #620
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#620
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?
Originally created by @GetBeholder on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1273
Originally assigned to: @cha1latte on GitHub.
Summary
When any preset is applied in roleplay mode — including the default Marinara
preset — the user and assistant roles get switched in the generated prompt. The
model then treats the user's messages as the character/assistant and becomes
confused about who is writing.
Expected behavior
User messages should be sent with the
userrole and the character/assistantresponses with the
assistantrole, whether or not a preset is active.Actual behavior
With a preset active, the roles are swapped. Without a preset, role assignment
is normal. As a result the model is confused and asks why the user is writing as
the character (which they are not).
Steps to reproduce
assignment is normal.
model treats user input as the character and may ask why you are writing as
the character.
Impact area
Environment
Logs, screenshots, or video
The reporter references three screenshots that demonstrate the issue:
These were described in text but were not provided as image files or URLs, so
they are not attached here. Adding the actual screenshots would strengthen
the report.
Regression notes
Not provided.
Additional context
Source: community forum post by ":)" (1-Star), posted ~11:17 PM (yesterday). The
reporter considers this a significant issue.
Triage pointer (from a quick scan, not from the reporter): preset selection and
prompt assembly live in the engine —
src/engine/generation/prompt-preset-selection.tsand
src/engine/generation/prompt-assembly.ts— with message role assignment insrc/engine/generation/start-generation.ts(roles typed as"system" | "user" | "assistant"). The preset path appears to change rolemapping relative to the no-preset path.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: