mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2713] [Issue]: Game-mode forced generation defaults are silently overwritten by chat-level Advanced Parameters #1358
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#1358
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 @kolacheee on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2713
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Game Mode forces "optimal" generation defaults (temperature=1, maxTokens=16384, reasoningEffort=maximum, etc.) for reliable structured GM output, and its own comment says it "ignores preset/chat overrides" — but the connection/chat Advanced-Parameter overrides are applied immediately after the force block and silently win, so a leftover chat-level parameter (e.g. a low
maxTokens) degrades GM output and the trackers.Expected behavior
If game mode is documented to force its own generation defaults for structured reliability, those forced values should actually take precedence (or the precedence should be the documented connection/chat-wins behavior — but not silently contradict the in-code comment and the feature's promise).
Actual behavior
The game-mode block forces
temperature=1, maxTokens=16384, topP=1, topK=0, freq/pres=0, reasoningEffort='maximum', verbosity=nullfor non-Gemma game chats, with a comment that it should "ignore preset/chat overrides." ButapplyParameterOverrides(connectionParams)andapplyParameterOverrides(chatParams)are called immediately after, and they unconditionally reassigntemperature/maxTokens/topK/reasoningEffort/verbosity/etc. whenever the stored param is set. So a per-chat Advanced Parameter (e.g.maxTokens=512ortemperature=0.4, set once or inherited) clobbers the just-forced game defaults — yielding truncated/garbled GM JSON and degraded agents, presenting as "agent weirdness" that's impossible to diagnose because the UI claims game defaults are enforced.How it breaks the pipeline
Code trace (staging @
b826f8f4) —packages/server/src/routes/generate.routes.ts::3298-3312(comment: "ignore preset/chat overrides").applyParameterOverrides(connectionParams)/applyParameterOverrides(chatParams)at:3314-3315;applyParameterOverrides(:3263-3286) unconditionally reassigns the forced fields.Steps to reproduce
maxTokenssmall (e.g. 512) ortemperature0.3.Suggested fix
Confirm the intended precedence, then either move the game force block to after
applyParameterOverrides(chatParams)so it truly wins, or gate the twoapplyParameterOverridescalls so game-forced fields aren't reapplied for non-Gemma game chats (skipmaxTokens/temperature/reasoningEffort/topP/topKreassignment whenchatMode==='game' && !isLocalGemma).Environment
b826f8f4)Additional context
Found via a systematic multi-agent audit of Game Mode. A leftover chat-level
maxTokenssilently sabotaging the GM is a stealthy source of "game agents misbehave / truncated GM output". Part of a set of game-mode issues filed together.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 21, 2026):
Fixed in
a61ccac4. Non-Gemma game-mode generation defaults are now applied after connection/chat Advanced Parameters, so forced temperature/token/reasoning/sampling defaults actually take precedence while still allowing unrelated override data such as custom parameters and context settings to be merged first.