LibreChat/api/server/middleware
Marco Beretta 8718338728
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/chat (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
⏱️ fix: Bound Outbound Calls Made Inside a Request (#17263)
* fix: Bound Outbound Calls Made Inside a Request

RAG queries for file search and message context, OCR provider calls,
action HTTP calls, the moderation check, the stored-image fetch for
base64 providers, and Flux result polling had no timeout. A stalled
upstream hung the chat turn, the upload or the tool call indefinitely,
and Flux kept polling forever on statuses that never become Ready.

Each now runs under a budget from a new librechat.yaml timeouts block
with finite defaults (getOutboundTimeoutMs in @librechat/api). Action
calls also receive the run's abort signal, so stopping a run closes the
socket.

* test: Cover a Stalled RAG Query in the Mock Harness

* fix: Share One Flux Budget Across Submit and Polls, Bound the Vertex Token Exchange

* refactor: Poll Flux Results Through pollUntilSettled

* refactor: Leave Flux Polling for a Separate Migration

* fix: Cap Configured Timeouts at the Node Timer Limit

* fix: Bound the Action Token Refresh and the Whole Image Download

* fix: Cap Every Outbound Budget by Wall-Clock Time

Axios's timeout only fires on an idle socket, so a RAG, OCR, moderation,
action or token response that keeps trickling bytes never ended.
outboundRequestBudget pairs each timeout with an AbortSignal deadline, and
action calls combine it with the run's own signal.

* fix: Name the Budget That Ran Out and Give Actions Five Minutes

The actions default rises to five minutes, since action endpoints are
arbitrary third-party APIs and the old minute could cut off legitimately
slow ones after an upgrade.

A budget overrun now fails with an error naming the timeouts key and its
value, whether it was the idle timeout or the wall-clock deadline, and
logAxiosError logs it as a warning so operators know what to raise. A
deadline cancellation is no longer read as a user stop, so an action that
runs out of time reports a timeout instead of looking like a stopped run.

* fix: Hold Outbound Deadlines Weakly So Finished Requests Leave No Timers

* fix: Check the Budget Before Reading an Error Message

* fix: Report a Wrapped Deadline as a Failure, Not a Stop

* fix: Bound the OAuth Code Exchange and Keep the OCR Budget Hint When Protected

* chore: Sort Imports in axios.ts After Rebase
2026-10-21 19:10:13 +02:00
..
__tests__ 📃 fix: Enforce Terms Acceptance on the Server and Mark Backfilled Consent (#17063) 2026-10-14 17:45:28 +02:00
accessResources ♻️ refactor: Native Prompts Behind a Shared Service and Adapter (#16506) 2026-10-02 08:40:39 -04:00
assistants 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
config 💓 feat: Keep Quiet Chat Streams Alive Behind Idle-Timeout Proxies (#16904) 2026-10-09 10:29:45 +02:00
limiters 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
roles 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
spec 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
validate ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
abortMiddleware.js 🔒 fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors (#17256) 2026-10-19 15:56:03 +02:00
abortMiddleware.spec.js 🔒 fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors (#17256) 2026-10-19 15:56:03 +02:00
abortRun.js
blockRetiredSetupToken.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
buildEndpointOption.js 🎚️ feat: Filter OpenRouter Reasoning Efforts by the Selected Model (#16808) 2026-10-08 18:04:13 +02:00
buildEndpointOption.spec.js 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
canAccessSharedLink.js
canDeleteAccount.js
canDeleteAccount.spec.js
checkBan.js 🛶 fix: Keep Trigger Bans Off Shared Loopback IPs (#16535) 2026-09-29 20:50:23 -04:00
checkBan.spec.js 🛶 fix: Keep Trigger Bans Off Shared Loopback IPs (#16535) 2026-09-29 20:50:23 -04:00
checkDomainAllowed.js
checkInviteUser.js
checkInviteUser.spec.js
checkPeoplePickerAccess.js 🫂 fix: Scope People Picker Searches to Permitted Types (#15878) 2026-09-13 02:48:27 -04:00
checkSharePublicAccess.js
checkSharePublicAccess.spec.js
denyRequest.js 📔 feat: Preserve Owner Text During PII Redaction (#16311) 2026-10-02 11:43:10 -04:00
denyRequest.privateText.spec.js 📔 feat: Preserve Owner Text During PII Redaction (#16311) 2026-10-02 11:43:10 -04:00
error.js 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
error.spec.js 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
index.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
logHeaders.js 🙈 fix: Mask Emails and Drop Personal Identifiers From Logs (#17048) 2026-10-15 15:54:27 +02:00
messageValidation.js
moderateText.js ⏱️ fix: Bound Outbound Calls Made Inside a Request (#17263) 2026-10-21 19:10:13 +02:00
moderateText.spec.js ⏱️ fix: Bound Outbound Calls Made Inside a Request (#17263) 2026-10-21 19:10:13 +02:00
noIndex.js
oauthNavigation.js
optionalJwtAuth.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalJwtAuth.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalShareFileAuth.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalShareFileAuth.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
requireJwtAuth.js 📃 fix: Enforce Terms Acceptance on the Server and Mark Backfilled Consent (#17063) 2026-10-14 17:45:28 +02:00
requireLdapAuth.js
requireLocalAuth.js
requireSameOrigin.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
setHeaders.js
setTwoFactorTempUser.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
uaParser.js
validateEmailLogin.js
validateImageRequest.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
validateMessageReq.js
validateModel.js
validatePasswordReset.js
validateRegistration.js