mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6489] [MERGED] fix: enforce agent timeout on capability language model calls #7199
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#7199
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/6489
Author: @Promansis
Created: 9/21/2026
Status: ✅ Merged
Merged: 9/21/2026
Merged by: @Promansis
Base:
staging← Head:fix(capability)/ltm-agent-request-timeout📝 Commits (2)
425bf7bfix: enforce agent timeout on capability language model callscacf205Merge branch 'staging' into fix(capability)/ltm-agent-request-timeout📊 Changes
2 files changed (+30 additions, -10 deletions)
View changed files
📝
packages/server/src/services/capability-packages/capability-language-model.service.ts(+20 -10)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+10 -0)📄 Description
Linked issue
Closes https://github.com/Pasta-Devs/Marinara-Engine/issues/6488
Why this change
Long-Term Memory (and any capability package) extraction through an agent connection can fail on large payloads because the LLM transport uses a fixed two-minute inter-chunk body timeout (
LLM_BODY_TIMEOUT) instead of the host's configured agent request timeout. A slow-but-progressing provider (e.g. a local model thinking for more than two minutes between chunks) gets cut off at exactly 120 seconds even whenAGENT_CALL_TIMEOUT_MSis longer, and there is no total-duration deadline at all.The fix aligns the capability
languageModels.chatCompletehost path with the normal agent-call timeout policy (agentCallSignal), which LTM extraction and other capability packages inherit.What changed
packages/server/src/services/capability-packages/capability-language-model.service.tschatCompletenow wraps the provider call inwithLlmRequestTimeout(getAgentCallTimeoutMs())so the transport headers/body budget follows the configured agent timeout instead of the fixed 120s fallback.AbortSignal.any([caller signal, AbortSignal.timeout(getAgentCallTimeoutMs())])is passed to the provider soAGENT_CALL_TIMEOUT_MSis enforced as a total-duration cap while caller cancellation is preserved — matchingagent-executoragentCallSignaland the LTM runtime recall path.scripts/regressions/capability-package-lifecycle.regression.tschatCompletekeeps the total-duration deadline wiring and the transport-timeout scope.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Completed by maintainer direction (automated checks, not browser click-through):
pnpm --filter @marinara-engine/server lint— exit 0 (type-check gate)node ./scripts/run-regressions.mjs --filter capability-package-lifecycle— PASSED (1.1s)prettier --checkon both changed files — cleanSummary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.