mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2435] [Issue]: 11-PROV-PERF-timeouts-size-streaming Rust LLM provider calls lack timeout #1188
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#1188
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 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2435
Originally assigned to: @SpicyMarinara on GitHub.
Summary
11-PROV-PERF-timeouts-size-streaming: Rust LLM provider transport does not configure a request/header/connect timeout for outbound provider calls, so slow or stalled providers can hang longer than legacy allowed.Links back to #2410.
Expected behavior
Legacy LLM transport used a bounded 5-minute headers timeout while allowing long streaming bodies, and still capped provider response size.
Acceptance criteria:
Actual behavior
Refactor Rust LLM provider clients validate URL safety and disable redirects, but
provider_http_clientbuildsreqwest::Clientwithout a timeout. Non-stream and stream calls for Cohere, OpenAI-compatible, OpenAI Responses, Anthropic, and Google use that client.The refactor does cap provider response bodies at 5 MiB, but the timeout part of the surface is missing.
Steps to reproduce
src-tauri/crates/llm/src/lib.rs.provider_http_client_for_urlintoprovider_http_client.provider_http_client_for_url(...).await?.post(...).send().await.Impact area
Environment
Logs, screenshots, or video
Static trace proof only. No live provider call was run.
Regression notes
Legacy
mainusedllmFetchwithLLM_HEADERS_TIMEOUT = 5 * 60 * 1000,bodyTimeout: 0, andmaxResponseBytes: 50 * 1024 * 1024.Refactor evidence:
src-tauri/crates/llm/src/lib.rs:395validates provider URLs before client creation.src-tauri/crates/llm/src/lib.rs:495builds the provider client without a timeout.src-tauri/crates/llm/src/lib.rs:1765,:1859,:2067,:3594, and:4008use the timeoutless provider client for live calls.src-tauri/crates/llm/src/lib.rs:26and:4205cap provider response bodies.Legacy evidence:
packages/server/src/services/llm/base-provider.ts:13defines the 5-minute headers timeout.packages/server/src/services/llm/base-provider.ts:20routes outgoing LLM fetches throughllmFetch.packages/server/src/services/llm/base-provider.ts:35sets the LLM response cap.Additional context
Surface ID:
11-PROV-PERF-timeouts-size-streaming.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@carter-smalls commented on GitHub (Jun 6, 2026):
Seems like Ai Api timeout conditions. Running
npx ai-doctormight point out missing timeout guards and unprotected requests.@SpicyMarinara commented on GitHub (Jun 6, 2026):
Fixed on refactor in commit
360652d5.What changed:
Verification: