mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7661] [Issue]: Profile export blanks agents' Max Output Tokens (maxTokens matches the credential redaction) #4237
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#4237
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 @stonebystone on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7661
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Profile export blanks every agent's Max Output Tokens (
settings.maxTokens).redactAgentSecretsinpackages/server/src/routes/backup.routes.tstreats any agent setting whose key matches/token|secret|password|api[_-]?key/ias a credential and sets it tonull, andmaxTokensmatches on "token".Expected behavior
A profile export keeps non-credential agent settings, including each agent's Max Output Tokens, so restoring the profile brings those limits back.
Actual behavior
The exported
agent_configsrows havemaxTokens: null. Importing that profile on a fresh install writes the null, andnormalizeAgentMaxTokensthen falls back toDEFAULT_AGENT_MAX_TOKENS, so every agent quietly returns to the default output limit. (When the agent row already exists, import skips the settings column, so the existing value survives.)Steps to reproduce
GET /api/backup/export-profile?format=zip).profile-tables/agent_configs.jsonlin the ZIP and find that agent's row:settings.maxTokensisnull.Environment
stagingat5c07e57f5Logs, screenshots, or video
Found while testing #7657 against a profile export: the Agent Editor showed 4096 for the Narrative Director, and the exported row had
maxTokens: null.Additional context
The same over-broad match also caught the
secretPlot*Narrative Director settings (secretPlotEnabled,secretPlotRunInterval). #7657 exempts those three settings by name (secretPlotEnabled,secretPlotRunInterval,secretPlotPromptTemplate), butmaxTokensis still affected. A likely fix is matching credential-style names more narrowly (e.g./(^|[a-z])(api[_-]?key|token)$/i-style endings, or an explicit allowlist of non-secret keys such asmaxTokens), so real tokens stay redacted.cc @SpicyMarinara
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 (Oct 16, 2026):
Working on this in #7727.
@SpicyMarinara commented on GitHub (Oct 16, 2026):
Fixed on staging by #7727. Thank you for the precise report, @stonebystone!