mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4175] [MERGED] fix(noodle): honor CHAT_GENERATION_TIMEOUT_MS for background generation #6267
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#6267
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4175
Author: @Gunterlie
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/27/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/4174-noodle-headers-timeout📝 Commits (1)
2a6ea3dfix(noodle): honor CHAT_GENERATION_TIMEOUT_MS for background generation📊 Changes
4 files changed (+17 additions, -9 deletions)
View changed files
📝
.env.example(+4 -1)📝
CHANGELOG.md(+1 -0)📝
docs/CONFIGURATION.md(+1 -1)📝
packages/server/src/services/llm/base-provider.ts(+11 -7)📄 Description
Linked issue
Closes #4174
Why this change
HeadersTimeoutError/ "fetch failed", for both the manual Refresh timeline button and the automatic refresh.*_TIMEOUT_MSvalue in.env, includingCHAT_GENERATION_TIMEOUT_MS=3600000, and the error persisted — there was no setting that could fix this.llmFetchinpackages/server/src/services/llm/base-provider.tshard-coded the undiciheadersTimeout(time to first byte) to 5 minutes.CHAT_GENERATION_TIMEOUT_MSonly reached undici throughwithLlmRequestTimeout(...), which is used solely bygenerate.routes.ts,game.routes.ts, and the long-term-memory runtime. Noodle callsprovider.chatCompletedirectly withstream: false, so it always got the fixed 5 minutes — as did every other unwrapped background generation path. Present since7577dd930(2026-04-02), not a regression from the recent Noodle work.What changed
packages/server/src/services/llm/base-provider.ts: the default undici agent options now readgetChatGenerationTimeoutMs()forheadersTimeoutinstead of the hard-codedLLM_HEADERS_TIMEOUTconstant. The 2-minute inter-chunkbodyTimeoutis unchanged, so half-open streams still cannot hang forever. The default is still 300 000 ms — behavior is identical for anyone who does not set the variable..env.exampleanddocs/CONFIGURATION.md: document thatCHAT_GENERATION_TIMEOUT_MSalso covers background generation with no timeout of its own (Noodle timeline refresh, Noodler replies). The configuration table previously stated the opposite.CHANGELOG.md: entry under Unreleased → Fixed.Deliberately not added: a Noodle-specific env var, or
withLlmRequestTimeoutwrapping at each call site. One shared default fixes every caller; a separate knob is only worth it if Noodle ever needs a budget different from chat.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
⚠️ Written by an AI agent as a to-do list — nothing below has been performed by a human yet.
pnpm checkwas run by the agent and exited 0, but the box stays unticked until a maintainer confirms it.CHAT_GENERATION_TIMEOUT_MS=3600000, point at a local model slow enough to take more than 5 minutes on a timeline refresh, click Refresh timeline in Noodle, and confirm it completes instead of failing withHeadersTimeoutError.CHAT_GENERATION_TIMEOUT_MSunset, confirm ordinary Conversation and Roleplay streaming still behaves as before (default remains 5 minutes).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/CONFIGURATION.mdchanged, so thedocs-i18nlanguage packs (Spanish, German) need the matching edit or a[docs-i18n] docs/CONFIGURATION.mdfollow-up issue.UI evidence (if applicable)
Not applicable — server-side timeout configuration, no UI change.
Summary by CodeRabbit
Bug Fixes
Documentation
CHAT_GENERATION_TIMEOUT_MS, including its background-generation coverage and default value.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.