mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[GH-ISSUE #4933] [Other] serve: one unknown key in .shared-settings.json silently disables every shared setting #2270
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2270
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 @dan64 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4933
Summary
One unknown key in a config's
.shared-settings.jsondoes not lose just that key: it empties every shared Chatsetting, silently, for the whole life of the server.
reasoning_effortwritten next to it stops applying too, andnothing in the log says so.
clean_shared_defaults(serve/server.py:8473) is deliberately strict — it is what/settingsuses to answer aclient with a 400 naming a bad key (
serve/server.py:8509). The start-up path reuses it and swallows the same error:The same
ValueErrortherefore means "tell the client which key is wrong" on one path and "forget everything, insilence" on the other.
Environment
--ple-io direct,--kv q4_0,524288 context
serve/server.py --engine strata --config <cfg>.json --port 9983mainatc62d5e3a(no local patches)Reproduce
Two runs of the same server, the same model, the same config — only the
.shared-settings.jsonnext to it differs.The config is a copy of a working Q4_K_S config, with
logchanged; the server file is<config>.shared-settings.json, asserver.py:9469builds it.<cfg-a>.shared-settings.json:<cfg-b>.shared-settings.json:Start the server on each and look for the start-up line that reports what the shared settings will be.
Expected
Two reasonable outcomes, either is fine and neither happens today:
reasoning_effort=mediumstays in force); or
What should not happen is that a typo in one key silently disables the others.
Actual
Boot A (
reasoning_effort+preserve_thinking), stdout:No
[strata] other apps use the Chat settings: ...line at all. The server is healthy and answers; the sharedsettings are
{}. Thereasoning_effort=mediumthat was in the same file is gone with the unknown key, and there isno warning anywhere:
Boot B (
reasoning_effortalone), same machine, same revision, stdout:So the key was accepted and applied in B and silently discarded in A — the difference between the two runs is exactly
the one extra key.
The mechanism, from the source (this part is read, not executed as a separate test):
and that
ValueErroris caught byexcept (OSError, ValueError): svc.shared = {}.Evidence
preserve_thinkingis the key I hit it with, and it is a useful example because it is not a typo: it is the nameQwen's chat templates test, and a user who wants the reasoning of earlier turns out of the prompt has a reason to write
it there. Any other key a user might invent does the same thing. I opened #4932 (still a draft) to make those two keys
known, which stops it for them — but it leaves the behaviour for every other unknown key exactly as it is.
Reproduction status
Reproduced locally, twice, on the revision above: the A/B above is two boots, not a reading of the code.
The
/settings400 path was not exercised in this report; it is cited fromserve/server.py:7775-7777only.What I would change (a suggestion, not a decision for me to make)
Keep the strictness where a client can be told about it, and separate "this file is unusable" from "this key is
unknown":
svc.shared = {}, but print one line saying the file wasignored and why;
reasoning_effortstays in force).The second bullet is a behaviour decision (skip and continue vs. refuse to start), which is why I am reporting it
rather than guessing: a server that starts with half of a user's settings silently missing is what caused this report
in the first place.