mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3042] [Issue]: Local-sidecar provider ignores per-request temperature/topP/topK (uses the runtime config instead, contradicting its own comment) #1612
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#1612
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 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3042
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
The local (sidecar) model provider's
applyRuntimeSettingsis documented to let chat/preset Advanced Parameters win over the local runtime fallback — and it does so formaxTokensandminP. But fortemperature,topP, andtopK(in the normal non-structured-output case) it uses the sidecar's runtimeconfig.*value and ignores the per-requestoptions.*. So a user who sets temperature / top_p / top_k in their chat or preset Advanced Parameters has those silently ignored on the bundled local model — every request uses the sidecar's configured values instead.How to reproduce (try it yourself)
0.2) different from the sidecar's configured temperature.You'll see: the request goes out with the sidecar config's temperature, not
0.2; same fortop_pandtop_k. OnlymaxTokensandminPreflect the per-request values.Expected: the per-request
temperature/top_p/top_kwin (falling back to the sidecar config only when unset), exactly asmaxTokensandminPalready do.Where it is
packages/server/src/services/llm/providers/local-sidecar.provider.ts:58-75(applyRuntimeSettings). The returnedChatOptionssetsmaxTokens: requestedMaxTokens ?? config.maxTokens(line 69, per-request wins) andminP: structuredOutput ? 0 : options.minP(line 73, per-request), buttemperature: structuredOutput ? 0 : config.temperature(line 70),topP: structuredOutput ? 1 : config.topP(line 71), andtopK: structuredOutput ? 0 : config.topK(line 72) readconfig.*instead ofoptions.*. The line-68 comment explicitly states: "Chat/preset Advanced Parameters are per-request and should win over the local runtime fallback."What's happening
The non-structured-output branch for
temperature/topP/topKreads the sidecar runtimeconfig, not the per-requestoptions, so the user's chat/preset values for those three fields are dropped on this provider — inconsistent withmaxTokens/minPand with the stated intent.Suggested fix
Make
temperature/topP/topKrespect the per-request value with the sidecar config as fallback, mirroringmaxTokens/minPand honoring the line-68 comment:The
structuredOutputbranch (deterministic0/1/0for response-format/tool requests) is intentional and unchanged; only the non-structured branch now uses the per-request value when present, falling back to the sidecar config when not — identical in shape to the existingmaxTokenshandling. No regression: when the chat/preset doesn't set these (options.*undefined), the sidecar config is still used exactly as today; only a user-supplied per-request value newly takes effect.AI-investigated against v2.0.6; cited lines read and confirmed. Please verify before fixing.
@SpicyMarinara commented on GitHub (Jun 29, 2026):
Claiming this for the current staging sweep in draft PR #3053 (branch
codex/issue-sweep-3033-3052).@SpicyMarinara commented on GitHub (Jun 29, 2026):
Fixed in PR #3053 on branch
codex/issue-sweep-3033-3052(commitbfb1bc76). Closing this issue as addressed; the PR remains open for staging review/merge.