mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2274] [Issue]: 09-CHAT-API-generation-request-options trim flag is not sent by refactor generation requests #1111
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#1111
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 @Promansis on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2274
Originally assigned to: @Promansis on GitHub.
Summary
09-CHAT-API-generation-request-optionsparity gap: the refactor keeps thetrimIncompleteModelOutputsetting and request schema field, but normal chat generation requests no longer send the setting intostartGeneration.Expected behavior
When "Trim incomplete model endings" is enabled, chat generation requests should carry
trimIncompleteModelOutput: truethrough the refactor generation request envelope, matching legacy behavior.Actual behavior
The refactor UI store and settings panel still expose
trimIncompleteModelOutput, andgenerateRequestSchemastill accepts it, butuseGenerate()only adds status/activity/timezone/debug fields before callingstartGeneration. The trim option is not forwarded by normal quick-send/generation paths.Steps to reproduce
startGeneration;trimIncompleteModelOutputis absent even though the setting is enabled.Impact area
Environment
refactor@37585ab9Logs, screenshots, or video
Legacy behavior:
main:packages/shared/src/schemas/chat.schema.ts:27defines the legacy generation request schema, includingtrimIncompleteModelOutputatmain:packages/shared/src/schemas/chat.schema.ts:53.main:packages/client/src/hooks/use-generate.ts:893readstrimIncompleteModelOutputfromuseUIStore;main:packages/client/src/hooks/use-generate.ts:900sends it in the/generaterequest body atmain:packages/client/src/hooks/use-generate.ts:908.main:packages/server/src/routes/generate.routes.ts:7898consumes the option before saving non-impersonation output.Refactor behavior:
src/engine/contracts/schemas/chat.schema.ts:33defines the refactor generation request schema;trimIncompleteModelOutputremains accepted atsrc/engine/contracts/schemas/chat.schema.ts:63.src/shared/stores/ui.store.ts:172still stores the setting, andsrc/features/shell/settings/components/SettingsPanel.tsx:1109still exposes the setting.src/features/runtime/generation/hooks/use-generate.ts:1757callsstartGeneration; the forwarded request only addsuserStatus,userActivity,userTimeZone, image prompt settings, summary hiding,debugMode, anddebugSinkatsrc/features/runtime/generation/hooks/use-generate.ts:1763. NotrimIncompleteModelOutputis forwarded.src/engine/generation/start-generation.ts:100definesStartGenerationInput; it has debug/guide/attachment fields but notrimIncompleteModelOutputmember.Files inspected:
src/engine/contracts/schemas/chat.schema.tssrc/engine/generation/start-generation.tssrc/features/runtime/generation/hooks/use-generate.tssrc/features/modes/shared/chat-ui/components/ChatInput.tsxsrc/features/modes/conversation/components/ConversationInput.tsxsrc/features/shell/settings/components/SettingsPanel.tsxsrc/shared/stores/ui.store.tsmain:packages/shared/src/schemas/chat.schema.tsmain:packages/client/src/hooks/use-generate.tsmain:packages/server/src/routes/generate.routes.tsmain:packages/client/src/components/chat/ChatInput.tsxRegression notes
Confirmed by Batch 7 static parityscan for upstream tracker #2268. Legacy sent and consumed the trim option; refactor keeps the setting/schema but drops the option from the generation request path.
Additional context
Surface ID:
09-CHAT-API-generation-request-optionsLinked tracker: #2268
Acceptance criteria:
trimIncompleteModelOutputfromuseUIStorewhen callingstartGeneration.useGenerate()to the generation entrypoint.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: