mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #968] [Feature]: Option to exclude past reasoning from prompts/context #471
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#471
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 @thedarkness000 on GitHub (May 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/968
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
The most direct benefit to enabling this option would be a reduction in context length, resulting in faster processing (if running a local model) or reduced costs (if accessing a metered API endpoint). I propose this as an option for the end-user to select, since I can anticipate some users not caring about speed/cost if they perceive better quality/consistency by including all of the model's past reasoning in the prompt.
A secondary benefit would be to reduce distractions to the model from past thoughts that may have been disregarded in its final output, or which are otherwise no longer valid. This one may be an artifact of the particular model I'm using (Gemma 4 26B A4B, running locally), but on a few occasions during RPs, the model has generated seemingly confusing or contradictory responses which can (at least based on my observations) be explained by it giving undue weight to its past reasoning content. That reasoning may no longer be valid due to events that have transpired in the RP since, or due to edits I've made to the model's response that invalidate said reasoning.
Proposed solution
Add a toggle to the Chat Settings (possibly under Advanced Parameters) to exclude past reasoning from prompts (or have the toggle be to include past reasoning in prompts and have it enabled by default--whichever you think is better UX).
(I did my best to search all the places in the app I could think of and could not find such an option, but freely admit that I could just be blind.)
I don't have strong feelings on where this option ultimately ends up, so you can put it wherever you think it makes the most sense within the app. (I personally only care about being able to use this option in Roleplay mode, but I don't see why it couldn't also apply to a Conversation, for example.)
Alternatives considered
I attempted to achieve this through the use of a regex script with the pattern
, "reasoning_content": ".+?"(?=})(based on the raw input I was seeing in KoboldCPP's terminal window). While it successfully stripped the reasoning content from the raw input I pasted into the Live Test box, it didn't seem to modify the actual input being sent to the model. I suspect this is because the regex scripts only operate on actual chat content, and not the raw prompt.(It was because of this workaround attempt that I discovered the bug in #965.)
Additional context
I'm going to use this space to give a few different ideas for where this toggle could be placed within the app.
1. Chat Settings > Advanced Parameters
This would be intuitive in a way, since it's near the related Reasoning Effort setting, but could be unintuitive since it's not really a model parameter in the same way that everything else in that section is.
2. Chat Settings > Context Limit
I mocked this one up a little nicer, since I could just duplicate the existing toggle's HTML.

This location might make more sense, since it is also, in a way, limiting the type of context being sent to the model.
3. Presets > Sections > Chat History
This option probably makes the most sense from a system design perspective (this is where you would otherwise change how the prompt is composed), but is also the least discoverable (and most complicated for the user to change).
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 18, 2026):
Triage note: labeling this as
scope-riskbecause the request is aligned with prompt/context controls but the placement and ownership could cross chat settings, presets, and prompt assembly behavior.The least risky next step is to decide where this control belongs before implementation, then build a narrow first slice around that surface.
@SpicyMarinara commented on GitHub (May 23, 2026):
We should naturally remove all past reasoning, so I'll add a general regex to do the cleanup.
@SpicyMarinara commented on GitHub (May 23, 2026):
Implemented in the local fix pass.
What changed:
Exclude Past ReasoningChat Settings toggle under Context Limit.Validation run:
pnpm --filter @marinara-engine/shared lintpnpm --filter @marinara-engine/server lintpnpm --filter @marinara-engine/client lint