mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1547] [Issue]: Lorebook token budget controls are saved but not applied to prompts #790
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#790
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 @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1547
Originally assigned to: @Xelvanis on GitHub.
Found during the 2026-05-29 native Tauri Lorebooks QA pass on
origin/refactorcommitf120eb33.Proof method: seeded disposable lorebook/chat records through the app's Tauri storage API, then ran the app's own prompt-preview assembly from the native WebView. The same pass included positive controls for selected, global, character-scoped, persona-scoped, and roleplay-trigger-filtered entries.
What happened
Lorebook token-budget controls are saved but not applied by prompt activation.
Repro
metadata.lorebookTokenBudget: 1.Expected
The chat's lorebook token budget should limit injected lorebook entries, or the UI should not present the setting as controlling prompt activation.
Actual
Prompt preview still injected all active lorebook entries. In QA, the preview included direct, disabled-folder, scan-depth, recursion-parent, roleplay-trigger, global, character-scoped, and persona-scoped lore markers despite the chat metadata budget being
1.This is distinct from #1533, which tracks tokenizer-backed estimates. This bug is about the configured budget not being read/applied at all.
Likely owner
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsxsavesmetadata.lorebookTokenBudget, butsrc/engine/generation/prompt-assembly.tscalls:The prompt-preview input and generation request schema do not appear to pass the chat metadata value into
input.request.lorebookTokenBudget.Per-lorebook
tokenBudgetis also saved on lorebook records, but the prompt assembly path does not use that value when processing selected books.Acceptance criteria
tokenBudgetbehavior so the record field is not misleading.