mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1024] [Issue]: imported presets can invisibly disable reasoning #500
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#500
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 @jake9000 on GitHub (May 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1024
Summary
Some imported sillytavern presets incorrectly disables thinking in marinara-engine.
Expected behavior
The setting displayed in 'Chat Settings > Advanced Parameters > Reasoning Effort should apply to the chat at all times.
Actual behavior
When importing a preset that has 'thinking' set to automatic, marinara-engine disables thinking entirely.
Steps to reproduce
Environment
Logs, screenshots, or video
Additional context
An RCA will appear in the pr
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@jake9000 commented on GitHub (May 20, 2026):
Root Cause Analysis: Thinking Stops Working After Importing Presets
Summary
Importing a SillyTavern preset (e.g., Chatfill II) causes thinking/reasoning to stop working, even though the UI shows "Reasoning Effort: Maximum." Toggling the setting to "High" and back to "Maximum" restores it. The bug has one primary cause and two contributing factors.
Primary Cause: ST Importer Doesn't Handle
"auto"forreasoning_effortThe imported preset
Chatfill II.jsoncontains"reasoning_effort": "auto"(line 624). In SillyTavern,"auto"means "let the provider decide," which for reasoning-capable models typically enables thinking.In Marinara's ST importer (
packages/server/src/services/import/st-prompt.importer.ts:29-32):"auto"is not in the valid set, so it maps tonull. The imported preset storesreasoningEffort: nullin the DB.Contributing Factor #1:
nullPasses ThroughapplyParameterOverridesas an Explicit OverrideIn
packages/server/src/routes/generate.routes.ts:2926:This means a preset's
reasoningEffort: nullis treated as an explicit override to disable reasoning, not as "unset / fall through to defaults." The trigger chain:Line 1633 — Preset parameters applied:
reasoningEffort = assembled.parameters.reasoningEffort ?? null→nullLine 2961 — Connection defaults: no override (connection params don't set reasoningEffort)
Line 2962 — Chat overrides: no override (chat params don't set reasoningEffort)
Line 2966 — Resolution:
resolvedEffort = reasoningEffort !== "maximum" ? reasoningEffort : null→nullLine 2997 — Thinking flag:
const enableThinking = !!resolvedEffort→falseContributing Factor #2: UI/Runtime Value Mismatch
The client-side "Advanced Parameters" UI in
ChatSettingsDrawer.tsx:5895-5902computes the displayed value from a separate chain:It never reads the prompt preset's parameters. Both mode defaults (
CHAT_PARAMETER_DEFAULTSandROLEPLAY_PARAMETER_DEFAULTS) hardcodereasoningEffort: "maximum", so the UI always shows "Maximum" — even when the active preset's stored value isnull.This is why step 6 of the repro shows "Reasoning Effort is already set to Maximum" while thinking is actually disabled.
Why Toggling Fixes It
When the user toggles reasoning effort from "Maximum" → "High" → "Maximum", the client writes
reasoningEffort: "maximum"tochat.chatParameters(line 5905 ofChatSettingsDrawer.tsx). NowapplyParameterOverrides(chatParams)at line 2962 picks it up as"maximum", overriding the preset'snull. The"maximum"→ model-specific resolution (lines 2964-2975) then maps it to"xhigh"or"high", and thinking works.