mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2668] [Issue]: Preset minP is parsed, stored, and salvaged but never sent to any provider (orphaned parameter) #1319
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#1319
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 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2668
Originally assigned to: @kolacheee on GitHub.
Summary
minP(Min-P sampling) is a first-class generation parameter — defined in the schema, shipped in the default preset, and parsed/salvaged from stored params — but it is never placed on theChatOptionspassed to providers (and isn't even a field on theChatOptionstype). As a result, Min-P silently does nothing on every provider.Expected behavior
A
minPset in a preset or in Chat/Connection advanced parameters should be sent to providers that supportmin_p, so it actually influences sampling.Actual behavior
minPis parsed and stored but orphaned: there is nominPlocal in the param assembly,applyParameterOverridesdoesn't handle it, none of theChatOptionsconstruction sites set it, andChatOptionshas nominPfield — so no provider can mapmin_p. The only way to sendmin_ptoday is the rawcustomParametersescape hatch.How it breaks the pipeline
Code trace (staging @
b826f8f4):packages/shared/src/schemas/prompt.schema.ts—minP: z.number().min(0).max(1).default(0).packages/server/src/db/default-preset.json("minP":0).packages/server/src/routes/generate/generate-route-utils.ts:825("minP").generate.routes.ts: the preset block (:1965–1977) reads temperature/maxTokens/topP/topK/penalties/etc. and omitsminP;applyParameterOverrides(:3263–3286) never handlesminP; there is nominPlocal; and none of the threeChatOptionssites (provider.chatComplete~:5822/:5977,provider.chat~:6032) set aminPkey.ChatOptionsinpackages/server/src/services/llm/base-provider.tshas nominPfield, and no provider mapsmin_p.This is the same orphaned-parameter class as the filed stop-sequences bug (#2658): parsed and persisted, but never wired to
ChatOptions.Steps to reproduce
minP=0.1in a preset (or Chat Settings → Advanced Parameters) for an OpenAI-compatible / OpenRouter / KoboldCpp connection that supportsmin_p.min_p/minPkey is present; the stored0.1is dropped.Suggested fix
Wire
minPthrough the same path used for the stop-sequences fix: (1) addminP?: numbertoChatOptions; (2) add aminPlocal, read it in the preset block (minP = assembled.parameters.minP ?? 0) and inapplyParameterOverrides; (3) passminP: minP || undefinedin all threeChatOptionsobjects; (4) map it in providers that supportmin_p(OpenAI-compatible body asmin_p; providers without amin_pconcept may ignore it). Use!== undefinedguards so a legitimate0isn't dropped.Environment
b826f8f4)Additional context
Identified via systematic source review on staging (refs @
b826f8f4). Same root cause as the stop-sequences issue (#2658); ideally both orphaned fields are wired in the same pass. Filed alongside related pipeline issues.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: