mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #947] [Issue]: Roleplay user-message regenerate works with OpenAI but can return empty response with Gemini #460
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#460
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 @Minsklatte on GitHub (May 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/947
Summary
In Roleplay mode, normal user-authored messages expose the Regenerate/Reroll action. After deleting the latest assistant message, using that action on the now-bottommost user message fails with Gemini, while the same
flow appears to work with GPT-5.5.
Expected behavior
Either normal user-authored Roleplay messages should not show Regenerate/Reroll unless they have replay metadata, or regenerating them should work consistently across providers, including Gemini.
Actual behavior
With a Gemini model, clicking Regenerate/Reroll on a normal user message produces:
With GPT-5.5, the same flow appears to regenerate the user message successfully, so this may be a provider-specific prompt/payload-shaping issue rather than only a UI affordance issue.
Steps to reproduce
Environment
Logs, screenshots, or video
Error shown in the UI:
Additional context
I retried the same flow with GPT-5.5 and it appeared to work, which makes me suspect this is related to provider-specific payload construction.
My guess is that regeneration sends
regenerateMessageIdand excludes the target message from context. That works naturally for assistant-message swipes. But when the target is the latest user message, excluding it mayleave the remaining prompt ending on a previous assistant/model turn.
That may be tolerated by OpenAI/GPT-5.5, but Gemini’s native adapter maps assistant messages to
role: "model"and user messages torole: "user", so the Gemini request may end up without the expected latest user turnand return no visible text.
Conversation mode appears to guard this case by allowing regenerate on user messages only when generation replay metadata exists. Roleplay may need the same guard, unless regenerating normal user messages is intended.
I’d be happy to make a PR for this, but I’m not sure which behavior is intended:
If maintainers can confirm the intended behavior, I can take a pass at the fix.
Template check
@SpicyMarinara commented on GitHub (May 17, 2026):
This is just a Gemini filter kicking in.
@Minsklatte commented on GitHub (May 17, 2026):
Opened PR #954 with a Gemini-specific fix for user-message regenerate swipes: https://github.com/Pasta-Devs/Marinara-Engine/pull/954
thisto globalThis in module loader #4627