mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1257] [Issue]: LLM stream cancel can silently miss the original remote runtime target #615
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#615
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 @Xelvanis on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1257
## Summary
LLM stream cancellation can miss the original remote runtime target if the Remote Runtime URL changes while a stream is active. Cancel failures are also swallowed, which makes failed or misrouted cancellation hard to diagnose.
Expected behavior
A stream cancel request should target the same runtime that started the stream. If the cancel request fails, the app should keep cancellation best-effort but emit enough sanitized debug information to diagnose the failed cancel path.
Actual behavior
The shared API stream path checks that a remote runtime target exists, then the remote stream request resolves the target from the current UI store. On abort,
cancelRemoteLlmStreamresolves the remote runtime target again from the current UI store. If the setting changed between stream start and abort, cancel can be sent to a different runtime. Local and remote cancel failures were intentionally swallowed, so failures were not visible during debugging.Steps to reproduce
Impact area
Environment
origin/refactorshared API cancellation path before the fix branchLogs, screenshots, or video
No user log attached. Code path evidence is in
src/shared/api/llm-api.tsandsrc/shared/api/remote-runtime.ts.Regression notes
Unknown. This appears to be an existing edge case in the current refactor branch cancellation flow.
Additional context
A fix should capture the remote runtime target once at stream start, use that same target for both streaming and cancellation, and preserve best-effort cancellation while logging sanitized cancel failures.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: