[GH-ISSUE #5785] [Feature]: Reasoning Context Control ("Add to Prompt") #3195

Closed
opened 2026-10-21 06:00:26 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Doublesubwalfas on GitHub (Sep 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5785

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

In the Advanced Parameters, there is an "Exclude past reasoning" toggle. However, there is no way to determine exactly how much of the previous thinking is kept in the context. Users like me running local models with limited VRAM cannot efficiently use complex AI agents nor can we use it with such speed that's comfortable. As an alternative, we use custom "thinking" (reasoning) prompts to guide the model's behavior. This acts as a lightweight shortcut that forces the model to act in a specific way while speeding up the generation process in its thinking, while having the side effect of forcing the model to follow the instructions by having only making the think output only the character stats.

Proposed solution

Add "Add to prompt" setting, similar to the one found in SillyTavern

Alternatives considered

On Advanced parameters on "Eclude past reasoning" but there is nothing like the add to prompt section to determine how much of the previous thinking is included. I've searched, asked Professor Mari, but no results.

Additional context

Image here is the setting on sillytavern.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Doublesubwalfas on GitHub (Sep 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5785 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? In the Advanced Parameters, there is an "Exclude past reasoning" toggle. However, there is no way to determine exactly how much of the previous thinking is kept in the context. Users like me running local models with limited VRAM cannot efficiently use complex AI agents nor can we use it with such speed that's comfortable. As an alternative, we use custom "thinking" (reasoning) prompts to guide the model's behavior. This acts as a lightweight shortcut that forces the model to act in a specific way while speeding up the generation process in its thinking, while having the side effect of forcing the model to follow the instructions by having only making the think output only the character stats. ## Proposed solution Add "Add to prompt" setting, similar to the one found in SillyTavern ## Alternatives considered On Advanced parameters on "Eclude past reasoning" but there is nothing like the add to prompt section to determine how much of the previous thinking is included. I've searched, asked Professor Mari, but no results. ## Additional context <img width="124" height="113" alt="Image" src="https://github.com/user-attachments/assets/3c96b7e2-ceb8-4827-a4e2-44c3727be81b" /> here is the setting on sillytavern. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

I'll add it, so if you turn the "Exclude past reasoning" toggle off, you'll see a field to specify how many past reasoning blocks from previous assistant messages to include when sending the prompt (defaults to one; set to 0 to send all).

<!-- gh-comment-id:5551086801 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): I'll add it, so if you turn the "Exclude past reasoning" toggle off, you'll see a field to specify how many past reasoning blocks from previous assistant messages to include when sending the prompt (defaults to one; set to 0 to send all).
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.

<!-- gh-comment-id:5551230285 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Completed on staging in #5865 (merge 314a71a586).

Added a persisted past-reasoning count, retaining provider-native metadata with its originating output and respecting exclusion/context limits. Mock provider tests cover replay and bounded rejection fallback; live-provider verification remains manual.

Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.

<!-- gh-comment-id:5552144304 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Completed on staging in #5865 (merge 314a71a5862f120284bb24014e401e226be79866). Added a persisted past-reasoning count, retaining provider-native metadata with its originating output and respecting exclusion/context limits. Mock provider tests cover replay and bounded rejection fallback; live-provider verification remains manual. Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3195
No description provided.