mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6718] [Issue]: Open-Jev 2B gets a flat 4-second limit, so a long chat with more than about 16 decision statements times out and every statement reads as no #3766
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#3766
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 (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6718
Originally assigned to: @kolacheee on GitHub.
The Open-Jev 2B decision sidecar gets a flat 4 seconds per request, however many decision statements a turn asks. Each statement reads the recent chat again, so on a long chat a turn with more than about 16 statements runs past 4 seconds. The request is abandoned, and every statement in it reads as no for that turn. The default Decision statements per turn is 32.
How to reproduce (try it yourself)
{{#if decision:"The scene changed location."}}The scene has moved.{{/if}}, each with its own statement.What you'll see: every one of the 24 branches is left out of the prompt, even the ones that are clearly true. The server log shows
[decision] Activation request failed: timeout. The same statements answer normally on a short chat.What should happen: the statements get answers.
Measured through the engine's own decision backend (
resolveDecisionBackend→askMixed) against the real Open-Jev 2B, with five long messages trimmed to the model's limit, on staging77d4b0e57:A Choice statement costs one statement per option, so fewer Choice statements are enough to hit it.
Where it is
packages/shared/src/types/decision-catalog.ts: the Open-Jev 2B entry has noperQuestionMs. Open-Jev 9B has 800.packages/server/src/services/decision/decision-default.ts: the sidecar request limit ismin(20 s, 4 s + perQuestionMs × (questions − 1)), so 2B always gets 4 s.What's happening
The prefix cache stays off, so every statement, and every Choice option, re-reads the whole recent chat. The cost grows with both, at about 0.25 s per statement on a long chat. A timed-out request is not cached, so later requests in the same turn ask the same statements again and can time out again.
Suggested fix
Give Open-Jev 2B a measured
perQuestionMs, the same way 9B has one. The budget then grows with the number of statements and Choice options. At the model's own full length (3,479 tokens), a statement costs 0.33 s, so about 350 ms covers it.Context
Staging only: the decision sidecar arrived in #6556 and prompt decision statements in #6572. Investigated with an AI agent; verify before fixing.