Commit graph

2758 commits

Author SHA1 Message Date
lia-by-librechat[bot]
ea8c133c0b
🥸 fix: Resolve Directory Principals Through Trusted Integration Data (#17825)
* 🥸 fix: Resolve Directory Principals Through Trusted Integration Data

* fix: Verify Permission Principals Concurrently and Preserve Stored Groups

* fix: Refresh Stored Directory Group Membership Before Sharing

* fix: Preserve Directory Membership and Surface Principal Failures

* fix: Stage Principal Reads Before Bounded Permission Persistence

* test: Classify Historical Code Capability Name Expansion

* fix: Bound Directory Verification and Propagate Graph Denials

* test: Await Principal Collections Before Transaction Verification

* test: Isolate Theme Paint Measurements From DOM Trace Capture

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-10 09:22:08 -05:00
dvorak33
a3868fdbe8
🖼️ fix: Bound Flux Tool Images and Preserve Original Attachments (#13749)
Bound model-facing Flux images to the 5 MiB base64 budget for standard and finetuned generation. Preserve original image data for attachment storage under the existing resolution policy.

Fixes #6954.
2026-11-09 22:41:29 +01:00
Marco Beretta
4e0f242557
⚡ fix: Parallelize Setup Cancel Lookups and Keep Attachment Drafts on Reload (#17963)
* fix: Read the Account and Session Together and Test Cancel on a Real Database

- Start the setup user and refresh session lookups together in the cancel controller instead of one after the other, as the opt-in confirmation already does
- Run the cancel controller spec on mongodb-memory-server with the real data-schemas methods, so the session and compare-and-swap predicates under test are the production ones, and add a negative case for each
- Keep only a module wiring test in the CJS controller spec, since the database behavior is now covered where it can run for real

* test: Pin the Cancel Response When the Session Lookup Fails

Both lookups now run before any cookie or write, so a failed session lookup answers 500 with the browser and the stored state untouched. Cover that on the real database.

* fix: Keep the Saved Files Draft Until the File List Loads

After a reload the live file map is empty until the server's file list arrives, and the restore that rebuilds it needs that list. The save effect rewrote the stored draft from the empty map in between, so a pasted-text chip or any other attachment was gone before it could be restored. It now waits for the list. This is what turned the composer-attachments restore scenario red on dev.
2026-11-09 21:57:01 +01:00
Marco Beretta
876f3aad1a
🪟 fix: Serve the OAuth Error Page for Connect Callback Failures (#17946) 2026-11-09 17:41:17 +01:00
Marco Beretta
7a927fb19e
🚪 fix: Let Users Sign Out of Required Two-Factor Enrollment (#17956) 2026-11-09 17:40:50 +01:00
Marco Beretta
1c95034f93
🔗 fix: Encode Local Storage URLs and Reject Nested File Names (#17949) 2026-11-09 17:40:12 +01:00
lia-by-librechat[bot]
b4afbb3a1e
🛝 perf: Render Chats Independently of Catalog Discovery (#17692)
* 🛝 perf: Render Chats Independently of Catalog Discovery

* Preserve Target Authorization and Passive Startup Intent

* Keep Startup Selection, Readiness, and Catalog Keys Consistent

* Preserve Remembered Targets and Validate Scoped Presets

* Retain Remembered Assistant Resource Aliases Across Endpoint Switches

* Apply URL Targets Before Waiting for Send Readiness

* Fix First-Page Agent Discovery and Await Model Selection

* Preserve Spec Access and Refresh Selected Assistant State

* Preserve Builder Deletion State and Start History Reads Earlier

* fix: Preserve Startup Recovery and History Read Ownership

* fix: Retain Express Query Routing in Assistant Lookups

* fix: Prioritize Route Reads and Recover Credential Changes

* fix: Bind Credential Revocation to Its Requested Scope

* fix: Refresh Credential Metadata After Pending Key Reads

* fix: Revalidate Inactive Credential Metadata on Target Mount

* fix: Preserve Reviewed Chat Resolutions After Rebase

* fix: Resolve Dev Conflicts and Preserve Startup Boundaries

* test: Preserve the ChatView Slot Target Boundary

* fix: Defer Terminal Delivery Until Subscription Attachment Completes

* fix: Contain Deferred Terminal Callback Failures

* test: Classify Historical Tool Name Capability Reads

* fix: Activate Requested Catalogs and Isolate Provider Failures

* fix: Keep Healthy Provider Choices Available During Catalog Recovery

* test: Exclude Copied Trace Bundles From Dependency Comparison

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-09 11:11:22 -05:00
Marco Beretta
bffa50e7a8
🚦 fix: Keep the Gateway Message on Classified Rate Limit Errors (#17903)
* fix: Keep the Provider Message on Classified Rate Limit Errors

* fix: Honor maxProviderErrorChars for Classified Generation Errors

* test: Cover Classified Gateway Errors in the Mock Harness

* test: Cover a Zero Provider Detail Limit on Generation Errors

* refactor: Resolve Classified Provider Errors in the TypeScript Backend

* fix: Redact Provider Details Before Truncating Them
2026-11-09 15:44:02 +01:00
Marco Beretta
db083e1cf3
🗑️ fix: Drain Assistants Runs Before Erasing the Account (#17937) 2026-11-09 15:35:31 +01:00
Marco Beretta
70dfb8abe0
🔒 fix: Gate GET Routes That Start OAuth Flows Behind Terms Acceptance (#17935) 2026-11-09 15:35:24 +01:00
Marco Beretta
c6c79e4ea7
🔒 fix: Return Approved Error Text From the Remaining Structured Tools (#17934) 2026-11-09 15:35:18 +01:00
Marco Beretta
9bd44801ec
⏳ fix: Bound Blob Storage Image Reads by the Image Fetch Budget (#17932) 2026-11-09 15:35:11 +01:00
Marco Beretta
2855de2637
🧷 fix: Keep Agent References to File Ids Another Record Still Holds (#17931) 2026-11-09 15:35:05 +01:00
Marco Beretta
7c92a7f7d9
📜 fix: Skip Scheduled Fires for Owners Who Have Not Accepted the Terms (#17930) 2026-11-09 15:34:59 +01:00
lia-by-librechat[bot]
907589a38c
🦦 fix: Bound Spreadsheet Text Extraction (#17824)
* 🦦 fix: Bound Spreadsheet Text Extraction

* fix: Isolate Spreadsheet Parsing From Inherited Heap Flags

* fix: Configure Spreadsheet Admission and Return Retryable Overload

* fix: Return Structured Spreadsheet Limit Rejections

* fix: Preserve Spreadsheet Date Epoch During Deferred Formatting

* fix: Preserve Bounded OpenDocument Display Text

* fix: Detect UTF-16 OpenDocument Display Text

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-09 08:27:47 -05:00
lia-by-librechat[bot]
d3ca74605c
📪 fix: Require Email Delivery for Password Reset Links (#17823)
* 📪 fix: Require Email Delivery for Password Reset Links

* fix: Sanitize Recovery Delivery Errors and Handle Disabled Email

* test: Preserve Recovery Mutation State Types and Remove Obsolete Copy

* test: Enable Email Capability in Password Recovery Shape Fixtures

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-09 08:27:33 -05:00
Danny Avila
57ab67cbac
📏 fix: Measure Usage Percent Against the Allowance Each Period Granted (#17850)
* 📏 fix: Measure Usage Percent Against the Allowance Each Period Granted

Store the credits granted at the start of each balance period on the record and measure the usage percent against it, so changing refillAmount or startBalance no longer moves a user's percent until their next grant. Legacy records fall back to the configured amount.

* 🕰️ fix: Ignore a Stored Allotment a Later Refill Has Replaced

Stamp each stored allotment with the time of its grant and measure against it only while no refill is more recent, so a refill by a replica that predates the field falls back to the configured amount instead of reporting usage against the prior period's allowance.

* 🔒 fix: Write the Allotment Grant Atomically and Return Its Period Start

Insert lastRefill with the credit, allotment and grant time when a balance record is created, so a racing creator never moves another's period start past its grant. Return lastRefill even without auto-refill so the client can place a stored allotment in its period, and fall back when it cannot.
2026-11-09 08:27:13 -05:00
Danny Avila
23aa0f822d
🗂️ feat: Defer System Tools Behind Tool Search (#17864)
* 🎛️ fix: Treat Model Spec Tools as Defaults, Not Mandates

* 🗂️ feat: Defer System Tools Behind Tool Search
2026-11-09 08:27:01 -05:00
Marco Beretta
4c14c1eb2c
🗃️ fix: Load Retention Config on the Archive Route Before Saving (#17929) 2026-11-09 13:40:37 +01:00
Danny Avila
d875425ed2
🔐 fix: Authorize Restored MCP Tools Before Agent Revert Writes Them (#17843)
* 🔐 fix: Authorize Restored MCP Tools Before Agent Revert Writes Them

Reverting wrote the version snapshot, including its mcpServerNames, before
filterAuthorizedTools ran. Agent-scoped MCP access is granted from that index,
so a restored server vouched for itself and an editor without access to it
could re-attach it. A snapshot without mcpServerNames also left the current
index in place, keeping agent-scoped access to servers no tool used.

The handler now authorizes the restored tools against the agent as it stands,
treating only its current tools as existing, and passes the authorized tools
and rebuilt index to revertAgentVersion so the restore is one write pinned to
the revision it was checked against. revertAgentVersion always rewrites the
index for the restored tools.

* 🔐 fix: Exclude the Target Agent's Own Grant When Authorizing a Revert

Moves the restore authorization into authorizeAgentRestore in packages/api,
leaving the revert controller as wiring.

A newly restored MCP tool whose server the user reaches only through agents
must now be reachable through an agent other than the one being reverted,
checked fresh against the database. The target's current or cached index
(including one left stale by an earlier revert) no longer vouches for it.

Prior server names are matched through their normalized aliases, and only for
tools the agent already had. When nothing resolves, the pre-restore index is
kept instead of deriving names from tool keys.

A revision-filtered restore that misses is reported as a 409 conflict.

The route spec restores the real ~/config so the MCP registry is consulted
rather than reported unavailable.

* 🔐 fix: Check Newly Restored MCP Servers Against Live Grants

The restore gate now runs for every approved MCP tool, not only consumeOnly
ones. A tool the agent doesn't already have, on a DB-backed server, is
admitted when a current tool still uses that server, or on a live direct
server grant, or through another viewable agent. A grant the registry still
caches after revocation no longer becomes durable through the restored index.

Admission is memoized per server. A snapshot tools array that sanitizes to
nothing restores an explicit empty set. Active-server matching no longer
reuses the index fallback, so a stale entry is never read as in use.

* 🔐 fix: Treat Legacy Cached DB Configs as User-Sourced in the Restore Gate

A config cached before an upgrade may carry a dbId without source. The
restore gate now uses isUserSourced, so such configs get the live access
check instead of passing as operator-managed.

* 🔐 fix: Recheck Unindexed Existing MCP Tools in the Restore Gate

Holding a tool no longer exempts it from the live check. Only a current tool
whose server the agent's index already lists skips it. Otherwise an unindexed
tool on a legacy agent could pass on a revoked grant the registry still
caches, and the restore would add its server to the index.

* ⚡ perf: Run Restore Admission Checks for Distinct Servers Concurrently

filterAuthorizedTools now starts every admission check during its single pass
and awaits them together, so each distinct DB-backed server no longer adds a
serial lookup wave to the revert. Tool order is preserved and server names
are recorded only for admitted tools.
2026-11-09 07:20:31 -05:00
Marco Beretta
4bded120a9
🛂 fix: Only Hand Out OpenID Access Tokens the Bearer Verifier Accepts (#17904)
* fix: Only Hand Out OpenID Access Tokens the Bearer Verifier Accepts

The OpenID reuse path in refreshController and the post-refresh fallback in
getOpenIDAppAuthToken returned the cached access token as the app auth token
whenever its exp was in the future. Entra issues Microsoft Graph access tokens
to sign-in clients by default; their aud names Graph, so the bearer verifier
rejects them and every protected request answers 401 until the client loops.

Both paths now require the access token's aud to name the client id or an
OPENID_AUDIENCE entry, the same audiences the verifier accepts. The reuse path
refreshes with the IdP instead, and the post-refresh fallback keeps opaque
tokens as before. Audience parsing is shared with openIdJwtStrategy.

Related to #17791

* test: Exercise Real OpenID Audience Helpers in AuthService Spec

The AuthService spec stubbed the audience helpers as pass-throughs, so it
could not catch a foreign-audience access token escaping the post-refresh
fallback. Use the real exports and cover Graph-audience, configured-audience
and opaque access tokens through setOpenIDAuthTokens.
2026-11-08 23:40:21 +01:00
Marco Beretta
654ce897e9
🗄️ fix: Skip Attachments Deleted by Storage Retention Instead of Failing the Turn (#17910)
* fix: Skip Attachments Deleted by Storage Retention Instead of Failing the Turn

A file that storage retention removed from an earlier message made every
later turn of the conversation fail, because the encoders rethrew the
storage miss and the user has no way to remove an attachment from history.

History replay now passes a handler to the encoders, which leave missing
files out of the request and report them; the message's file context tells
the model which files were deleted and were not read. Current-turn
attachments keep the strict error, since the user can remove and re-upload
them. Code Interpreter priming names files missing from storage in the
tool context and only requires resource recovery for other failures.

* refactor: Keep Code Reupload Failure Policy in packages/api

Tally priming reupload failures in createCodeReuploadFailures so the
decision that a file deleted from storage is named instead of requiring
resource recovery lives in TypeScript, and add mock e2e scenarios for a
follow-up after an attachment is deleted from storage.

* fix: Classify Code Files as Deleted Only at the Storage Read

A 404 from the Code API upload was counted as a source file deleted from
storage, which skipped resource recovery. openCodeFileSource marks a miss
where the stored object is read, and only that error counts as deleted.

Move the history replay of attachments with tolerated misses into
replayMessageAttachments so BaseClient only calls it.

* fix: Name Local Code Files Whose Stream Reports a Missing Object

Local storage returns a read stream that raises ENOENT only once read, so
openCodeFileSource now holds a stream until its first chunk or error and
names a miss there. The missing-files context assignment moves into
setMissingCodeFilesContext so both tool loaders only call it.

* fix: Close a Held Code File Stream When Priming Is Cancelled

openCodeFileSource waits for a source stream's first chunk; when that
wait fails, as on cancellation, the caller never receives the stream, so
destroy it before rethrowing instead of leaking its file descriptor.
2026-11-08 23:38:47 +01:00
Marco Beretta
ca013bb229
🌐 fix: Default the Flux Tool to the Global BFL Endpoint (#17909) 2026-11-08 22:28:16 +01:00
Marco Beretta
c3d5815d50
🛰️ fix: Poll the Flux Cluster Returned by the Global Endpoint (#17907)
* fix: Poll the Flux Cluster polling_url Returned by the Global Endpoint

* fix: Only Forward the Flux Key to Same-Origin or BFL Polling URLs

* test: Cover Flux polling_url Routing in the Mock Harness
2026-11-08 22:25:36 +01:00
Marco Beretta
d0d9a30327
🧩 fix: Accept Content-Array Tool Outputs in the Responses API (#17900)
* fix: Accept Content-Array Outputs in Responses function_call_output

The Open Responses spec allows function_call_output.output to be a string or
an array of input_text, input_image and input_file parts, but request
validation refused anything that was not a string. Validate the array parts
and convert them with the same part mapping the message path uses, so the
replayed tool result keeps its text and images in order.

* fix: Inspect Tool-Output Media Against File Policies

Image URLs and file names in a function_call_output content array reached the
model without the file-policy fragments the same parts get in a message.
Collect those fragments for both item types in packages/api and call that
from the Responses controller.

* test: Cover Content-Array Tool Outputs in the Responses API
2026-11-08 19:22:29 +01:00
Marco Beretta
5440735bed
🧮 fix: Count Memory Tokens After the o200k Encoding Loads (#17892)
* fix: Count Memory Tokens After the o200k Encoding Loads

Memory create and update routes, the by-id handler, and the memory agent's
set_memory tool persisted Tokenizer.getTokenCount, which returns the UTF-8
byte length for long text while o200k_base is still loading. Await
countTokens instead so the stored tokenCount is the real count.

Related to #17842

* test: Cover Memory Token Counts Saved Before the Tokenizer Loads

* test: Mock countTokens in Memory Tool and Route Specs
2026-11-08 15:23:40 +01:00
Marco Beretta
d114306a91
🧾 fix: Read Skill Upload Filenames as UTF-8 (#17880)
Some checks are pending
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 Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (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
Multer assumes latin1 for multipart filenames, and the skills routes have no decode step, so a non-ASCII name reached the handlers garbled. A file name content filter could not match it on import, and the file upload route stored the garbled name.
2026-11-07 18:01:30 +01:00
Marco Beretta
76c25680ce
🔐 fix: Retire Credentials by Their Committing Write and on Opt-In 2FA (#17504)
Some checks failed
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 Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (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
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* fix: Retire Credentials by Their Committing Write and on Opt-In 2FA

Re-date password reset and enrollment cutoffs once the write that set them commits, so a credential minted while the write is in flight is retired. Opt-in 2FA confirmation now stamps twoFactorEnrolledAt and rotates the session like required enrollment. OpenID refresh ends a session established before a reset or enrollment instead of spending its IdP grant.

* fix: Bind Opt-In 2FA Rotation to the Caller's Refresh Session

Confirmation now requires the refresh session the request was issued with, rotates it in place and revokes only the others, so an access token on its own cannot trade enrollment for a long-lived session. The OpenID retirement check moves into the refresh recovery service and ends the session through the existing session-missing path, leaving the CJS controller unchanged.

* fix: Clear a Retired OpenID Session Against the User It Was Checked For

* refactor: Inject the Refresh Secret Into OpenID Recovery

* fix: Report a Reset Whose Cutoff Could Not Be Re-Dated

A failed re-stamp now propagates as RETIREMENT_RESTAMP_FAILED. The reset controller still revokes sessions and passkeys and answers CREDENTIAL_RETIREMENT_INCOMPLETE; the CLI re-stamps after its revocations and exits non-zero; enrollment revokes sessions before the re-stamp and mints nothing when it fails.

* fix: Re-Date the Reset Cutoff Only After the Link Is Consumed

The web reset re-stamps credentialsChangedAt in the controller once resetPassword has committed, consumed the token and sent the notice, so a failed re-stamp can no longer leave the link replayable. Revocations still run and the response reports CREDENTIAL_RETIREMENT_INCOMPLETE.

* fix: Retire Credentials on Every Exit Path After a Reset Commits

resetPasswordWithToken owns the post-commit steps: deleting the link and sending the notice no longer throw, and a link issued before the account's last credentialsChangedAt is refused, so it is spent even when its deletion fails. The reset write is conditioned on the cutoff it read, so one link commits once. The controller re-dates the cutoff and revokes sessions and passkeys whenever the password changed, and answers CREDENTIAL_RETIREMENT_INCOMPLETE if any of that fails.

* fix: Spend Undated Reset Links and Move the Reset Notice Into TypeScript

* fix: Tell the User When a Reset Could Not Sign Out Every Session

The reset page now recognizes CREDENTIAL_RETIREMENT_INCOMPLETE, shared from librechat-data-provider, and shows a localized warning that the new password is active with a sign-in action, instead of reporting the spent link as invalid.

* perf: Re-Date the Reset Cutoff From the Committed Write

The committed reset hands its credentialsChangedAt back through PasswordResetResult, so the controller re-stamps without a second user read.

* fix: Retire Every Superseded Credential Before Minting on 2FA Enrollment

Opt-in confirmation and setup finalization now revoke sessions, re-date twoFactorEnrolledAt and wait for the auth cache to drop the pre-enrollment document, running every step even when one fails. If any step fails they mint nothing and answer CREDENTIAL_RETIREMENT_INCOMPLETE; the settings dialog keeps 2FA on with a warning and the setup screen sends the user back to sign in with the new factor.

* test: Cover the Settings Warning When 2FA Enrollment Leaves Sessions Behind

* fix: Send the User Back to Sign In After an Incomplete Opt-In Enrollment

Enrollment retires the confirming tab's bearer, and an incomplete retirement mints no replacement, so the settings dialog now shows the backup codes and then signs out to the login page, whether the user completes setup or closes the dialog.

* test: Run the Retirement Warning Scenarios Against Their Own Signed-Out or Fresh Accounts

* test: Open the Sidebar Drawer Before the Account Menu on Phones

* fix: Report a Committed Opt-In Enrollment When Rotating the Session Fails

Once 2FA is promoted, a later failure in confirm2FA withdraws whatever session it may have minted and answers CREDENTIAL_RETIREMENT_INCOMPLETE, so the settings dialog hands over the backup codes and signs the user in again instead of reporting an invalid code.

* test: Prove an Incomplete Reset Does Not Resume the Retired Session

The Sign in action sends a browser with a live session through /login for about 150 ms before it lands in chat, so the signed-in version of the warning scenario only passed when the URL check caught that window. The warning scenario runs signed out, and a new scenario holds a pre-reset session and asserts its refresh is refused and the user stays on the login page.

* fix: Settle the Auth Cache After the CLI Reset's Final Cutoff Write

* test: Require the Login Form After Signing In From a Signed-Out Reset

* fix: Explain an Incomplete Session Retirement Before Restarting Sign-In After Required 2FA Setup

* perf: Start the Opt-In Enrollment User and Session Reads Together
2026-11-05 22:53:11 +01:00
lia-by-librechat[bot]
43aac5246a
🪰 chore: Bump HTTP Dependencies and Scope Security Overrides (#17688)
* 🪰 chore: Bump Axios and Refresh Vulnerable HTTP Dependencies

* 🪰 chore: Scope Patched Glob and Minimatch Overrides to Tested Consumers

* 🪰 test: Await Seed Read Receipts Before Persistence Snapshots

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-05 05:35:17 -05:00
Marco Beretta
49ecc0695b
🧹 chore: Clear the Whole-Repo Lint Errors on Dev (#17702) 2026-11-01 01:23:47 +01:00
lia-by-librechat[bot]
f4154b649e
🦿 chore: Bump Agents SDK to 4.2.1 (#17664)
Some checks failed
Publish `@librechat/client` to NPM / pack (push) Has been cancelled
Publish `librechat-data-provider` to NPM / pack (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / pack (push) Has been cancelled
Docker Dev Images Build / publish (push) Has been cancelled
Sync Helm Chart Tags / Ignore non-main push (push) Has been cancelled
Sync Helm Chart Tags / Sync chart tags (push) Has been cancelled
Publish `@librechat/client` to NPM / publish-npm (push) Has been cancelled
Publish `librechat-data-provider` to NPM / publish-npm (push) Has been cancelled
Publish `@librechat/data-schemas` to NPM / publish-npm (push) Has been cancelled
* 🦿 chore: Bump Agents SDK to 4.2.0

* test: Adapt Compaction Fixtures to Retained Recent Turns

* test: Preserve the Azure Reasoning Token Contract

* chore: Bump Agents SDK to 4.2.1

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-31 15:17:05 -04:00
Danny Avila
696a1b6b56
🪪 feat: Name the Build and Config in Telemetry, Configure Stack Depth, Keep Scoped Frames (#17515)
* 🔎 fix: Keep Scoped Package Frames Out of the Log Email Redactor

The log redactor read node_modules/@scope/pkg/... as an address and replaced
whole stack frame locations with [REDACTED_EMAIL], in file, console and
OpenTelemetry output alike. An @ between path separators now names a scoped
package; addresses beside such frames are still masked.

* 🪪 feat: Name the Build and Loaded Config on OpenTelemetry Records

service.version now defaults to the image's BUILD_COMMIT ahead of the npm
package version. Each successful librechat.yaml load records a short digest
of the parsed file, which exported log records and request spans carry as
librechat.config.digest, and applies telemetry.stackTraceLimit to
Error.stackTraceLimit; unset keeps the process default.

* fix: Publish telemetry settings with the accepted base config

* fix: Initialize process settings before adopting cached config

* fix: Preserve runtime settings when cache writes are refused

* fix: Keep telemetry identity local and propagate Redis write errors

* fix: Partition merged config caches by the local base

* fix: Keep config cache failures recoverable

* test: Verify cache recovery contracts with typed fixtures

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-31 11:44:23 -04:00
Danny Avila
f5fa39c9b2
📦 chore: Update re2js to v2.9.1 and bump @hono/node-server to v2.1.5 (#17652) 2026-10-31 00:34:33 +01:00
Atef Bellaaj
05e7f1d2e6
🔗 feat: Link Langfuse Prompts as Agent Instructions (#17294)
Some checks failed
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 Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (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
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Main Promotion Policy Tests / Main promotion denial and fast-forward tests (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
- Let agents use Langfuse prompts by production label or pinned version,
  with the existing permission and usage checks.
- Add a configuration switch, disabled by default. Preserve saved links
  while disabled, without resolving them or falling back to inline text.
- Share source-specific production and exact selections across agent
  links and the prompt service. Reject source mismatches.
- Add revision lists for the Agent Builder version picker. Resolve
  Langfuse instructions on each initialization without caching.
- Improve disabled and unavailable states and test source changes,
  revision loading, and permission failures.
2026-10-30 17:28:37 +01:00
JOJO
fba013c42e
🧪 ci: Isolate auth.tenant Spec From a Local librechat.yaml (#17642)
The login tests reach getAppConfig through the balance middleware, which
loads librechat.yaml from the repository root by default. The file is
gitignored, so a developer who keeps one locally runs the spec against
their own config; an unresolved `${VAR}` MCP URL in it makes
configSchema.safeParse throw and every login returns 500. Point
CONFIG_PATH at a missing file so the spec runs with no config, as CI does.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:18:21 +01:00
lia-by-librechat[bot]
f03a4686ff
🚋 fix: Scope Document Name Traversal to Bedrock Agents (#17627)
* 🚋 fix: Scope Document Name Traversal to Bedrock Agents

* test: Preserve Replay Content Across Token Cache Refreshes

* fix: Include All Bedrock Replay Recipients in Document Naming

* fix: Include Lazy Provider Metadata in Document Naming

* perf: Short-Circuit Reachable Agent Predicates

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-30 13:53:36 +01:00
Marco Beretta
2ad2c1c14b
🔑 perf: Cache JWT Users and Batch Auth-Path Reads (#17466)
* perf: Serve JWT Bearer User Lookups From the Auth User Cache

* perf: Batch Agent Permission Reads on the File Access Path

* perf: Remember a Loaded Google Service Key Across Endpoint Config Reads

* perf: Run Independent Startup, Tool, Skill and Erasure Reads Concurrently

* fix: Drop JWT User Cache Writes That Race a User Mutation

Confirm each cache write with a second read and evict when the user changed,
so an in-flight lookup cannot repopulate an entry a credential change just
evicted. The cache mode now arrives through the loader dependencies.

* refactor: Move Agent Skill Access Reads Into packages/api

The chat-completions and Responses controllers call loadSkillAccess instead of
orchestrating the three reads in CJS. The preview route spec mocks the batched
file access helper the middleware now calls.

* test: Cover Agent File Access, JWT Bursts and Remote Skill Reads End to End

* fix: Serve a Cached JWT User Only While Its updatedAt Is Current

A cache hit now reads the stored updatedAt and deletion fence instead of the
fence alone, so a document cached from a read that raced a user mutation is
never served, even when the write landed after that mutation's eviction.

* refactor: Move Startup Migration Checks Into packages/api

* refactor: Inject the Startup Migration Checks Instead of Mongoose Models

* fix: Serve Cached OpenID Users Only While Their updatedAt Is Current

Moves the freshness check into getCurrentCachedAuthUserDoc and uses it on the
OpenID bearer path as well as the local JWT one, so a document cached from a
read that raced a credential or role change is never served there either.

Fixes berry-13/LibreChat#432

* fix: Compare Authorization Fields on Every Auth Cache Hit

updatedAt has millisecond resolution, so the freshness read also compares the
token retirement stamps, role, tenant and two-factor state.

* fix: Annotate the Auth Freshness Projection for Isolated Declarations

* perf: Reuse the OpenID Cache Freshness Read for Deletion Admission

A cache hit already proved the deletion fence is clear, so only users read from
the database take the separate fence query.

* refactor: Keep the OpenID Cache Freshness and Fence Decisions in packages/api

* test: Exercise JWT Cache Freshness Against Real User Methods in MongoDB

* fix: Stamp the JWT User Lookup So the Cache Write Fence Applies

* fix: Reload a Google Service Key File When It Changes or Disappears

The availability check remembers a loaded key only while the file's mtime and
size are unchanged, and fetches URL sources every time as before.

* fix: Recheck a Service Key File After a Permission Change
2026-10-30 00:24:08 +01:00
lia-by-librechat[bot]
b3f71196f3
🔚 fix: Bound Abandoned File Deletion Retries (#17640)
* fix: Bound abandoned file deletion retries

* fix: Handle absent request user in code cleanup

* fix: Preserve deferred cleanup wakeups and configured budgets

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-29 23:48:40 +01:00
lia-by-librechat[bot]
3d3edaff01
🐘 fix: Preserve Authored Skills Across Approval Resumes (#17630)
* fix: preserve authored skills across approval resumes

* fix: complete authored skill resume contracts

* fix: keep restored skill identity authoritative across batches

* fix: reject replacement skills during authored recovery

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-29 22:17:03 +01:00
lia-by-librechat[bot]
99fb03cb93
🚤 fix: Keep Host Tool Loading Independent of Worker Status (#17628)
* 🚤 fix: Keep Host Tool Loading Independent of Worker Status

* fix: Classify Workspace Tools at the Agent Boundary

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-29 22:13:10 +01:00
Marco Beretta
7f597b4787
🧊 fix: Fence Auth User Cache Writes After Eviction and Evict Favorite Holders (#17505)
Some checks are pending
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 Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (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: Fence Auth User Cache Writes After Eviction and Evict Favorite Holders

An eviction now leaves a per-user fence in the auth user cache that outlives
every document read before it. The reader skips a cached document while its
user is fenced, and a lookup slower than one cache TTL is not cached, so a
request that read the user before a change can no longer repopulate the cache
afterwards, and a document the reverse index lost is hidden as well. Role and
user methods share one bulk eviction helper, and the terms reset only waits
out the TTL when an eviction failed.

Deleting an agent, deleting a user's agents and removing an agent from
favorites now evict the cached auth documents of the users whose favorites
changed.

* fix: Anchor Cached Auth Document Expiry to the Lookup Start

A stalled reverse-index write could land a stale document after the eviction
fence expired, with a fresh TTL. The document now carries an expiry two cache
TTLs after its lookup began; its Redis TTL is computed after the index write
and the reader refuses it past that expiry.

* refactor: Time the Auth User Lookup in the API Package

The lookup start that anchors a cached document's lifetime is now stamped by
timeAuthUserLookup in packages/api, so the OpenID JWT strategy only wires the
lookup through it.

* fix: Wait Out the Full Cached Document Lifetime After Failed Eviction

A document read just before a change can live two cache TTLs from its lookup,
so a credential change or terms reset whose eviction failed now waits that
long before reporting success.

* fix: Recheck Cached Auth Document Expiry After the Fence Read

A fence read that stalls can return after both the fence and the document
expired, so the reader checks the document's expiry again before serving it.
2026-10-29 17:44:51 +01:00
Marco Beretta
5b8bb3c31f
⏱️ fix: Bound Remaining Outbound Calls With Timeout Budgets (#17468)
* fix: Bound outbound HTTP calls that had no timeout

Add timeouts.toolsMs, speechMs and imageGenerationMs to the timeouts block and apply the
existing budgets to the RAG delete paths, built-in tool APIs, TTS/STT providers (TTS also
aborts when the client closes), Stable Diffusion, Firebase reads and Mailgun. Calls made
before app config exists (remote config, RAG health, service key URL, Google refresh) get a
fixed 10 second budget.

* fix: Honor configured budgets for RAG deletes and per-chunk TTS deadlines

* refactor: Share one budget helper between speech and image CJS callers

* test: Cover a stalled RAG delete with a mock scenario

* test: Wait for the RAG embed before stalling the delete

* test: Embed at upload so the stalled delete has a vector to remove

* fix: Close a started TTS response on a late chunk timeout and share the service budget helper

* fix: Fail startup when the remote config fetch times out
2026-10-29 09:55:18 +01:00
Marco Beretta
749c1a3943
📌 fix: Keep the Composer Thinking Level for the Rest of the Conversation (#17497)
* fix: Label Composer Thinking Levels and State the One-Shot Scope

* test: Cover Composer Thinking Labels and One-Shot Scope in E2E

* test: Cover Thinking Focus for Option Lists Without Auto

* test: Wait for the Thinking Popover's Open Focus Before Arrow Keys

* test: Match the High Effort Radio Exactly

* fix: Keep the Composer Thinking Level for the Rest of the Conversation

* fix: Keep a Queued Turn's Picked Level on the Turns Queued After It

* test: Name the Numeric Reasoning Control by Its Thinking Label

* fix: Name the Queued Turn's Level on the Thinking Button

* test: Dismiss the Thinking Tooltip Before Typing on a Phone

* fix: Respect Enforced Specs and Parameters Edits Over the Inherited Thinking Level

* test: Expect the Model Spec Enforcement Flag in Chat Settings

* fix: Keep a Queued Turn Off a Level Its Target No Longer Runs

* fix: Record the Target a Queued Turn's Level Belongs To

* refactor: Inherit the Thinking Level on the Server

* perf: Answer the Branch Level Lookup Without Tree Links When Nothing Was Picked

* fix: Respect the Thinking Switch and Held Queue Rows Over the Inherited Level

* fix: Read the Branch Level Once and Inherit Only on Fresh Turns

* fix: Keep a Parameters Thinking Edit From Turning Thinking On

* fix: Withdraw a Staged Thinking Level When Thinking Is Switched Off

* fix: Scope the Thinking Switch Transition to the Conversation

* test: Drop the One-Shot Thinking Scenario the Conversation Level Replaces
2026-10-28 19:11:07 +01:00
Marco Beretta
7e7f559ea6
🏎️ perf: Parallelize Independent Agent and Schedule Lookups (#17465)
* perf: Parallelize Serial Lookups on Agent Load, Discovery, Skills, and Schedules

* fix: Address Review Findings on Parallel Lookups

Stage same-level discovery results before collecting edges so a shared sibling is initialized once, bound resume snapshot fetches to small chunks so over-budget graphs stop early, and surface the first ordered image failure without waiting on later reads. Update the skill name test for bounded concurrency.

* test: Tag Existing Mock Specs as Acceptance Scenarios for Parallel Lookups

* feat: Make Parallel Lookup Bounds Configurable

Add a concurrency section to librechat.yaml for MCP catalog, skill name, skill file and resume agent lookups. Defaults equal the previous hard-coded values.

* style: Sort Imports for Configurable Lookup Bounds

* test: Match Model Spec Skill Resolution Args With App Config

* test: Close the Builder Drawer Before Chatting on Narrow Viewports

* fix: Surface Fatal Discovery Errors Without Awaiting Later Siblings

* fix: Reject Discovery on the First Fatal Load Regardless of Queue Order

* fix: Keep Image Encoding Fail-Fast With Parallel Reads

* fix: Reject Resume Snapshot Lookups Without Waiting on the Whole Chunk

* feat: Make Connected Agent Discovery Concurrency Configurable
2026-10-28 18:59:16 +01:00
Danny Avila
64f2124cc6
🔐 fix: Keep the Admin OpenID State So PKCE Holds When the IdP Omits S256 (#17478)
openid-client's Passport Strategy replaces the authorization request's state with a random one
when the IdP's discovery metadata does not list S256 in code_challenge_methods_supported and the
request has no nonce. Azure Entra ID omits that field, so the admin callback could not find the
admin panel's PKCE challenge under pkce:<state> and issued an exchange code that any
code_verifier, or none, could redeem.

The admin strategy now adds a nonce in that case, so openid-client keeps the admin route's state
and checks the nonce against the ID token on the callback. The chat OpenID flow is unchanged.
2026-10-28 18:33:12 +01:00
Marco Beretta
0bcb0aaec1
🛟 fix: Promote Reconciled Compaction Snapshots to the Terminal Row (#16553)
* fix: Keep the Snapshot When the Terminal Write Settled for Reconciliation

* fix: Promote a Reconciled Compaction Snapshot to the Terminal Row

* fix: Anchor and Envelope the Reconciled Snapshot by Its Claim

* test: Cover the Abandoned Compaction Settling After Its Run in E2E

* fix: Withhold the Disconnect Snapshot of Any Durably Settled Turn

* fix: Promote Only a Same-Epoch Reconciled Snapshot and Settle Stopped Compactions

* fix: Plan the Disconnect Snapshot in packages/api and Check the Response Row Before Promoting

* fix: Read the Disconnect Snapshot Rows in the Response Conversation

* fix: Check the Anchor-Derived Error Row Before Promoting a Reconciled Snapshot

* fix: Log a Failed Disconnect Snapshot Plan Instead of Rejecting the Listener

* fix: Let a Reconciled Compaction Promote After an Earlier Live Snapshot

* refactor: Decide the Repeat Disconnect Write in the Snapshot Plan

* refactor: Report Failed Snapshot Row Reads Through the Plan

* fix: Stamp a Promoted Disconnect Snapshot and Read Its Rows Together

* fix: Derive the Compaction Error Row ID Through the Shared Helper

* fix: Plan a Saved Live Compaction Snapshot Again Once Its Turn Settles

* refactor: Queue Disconnect Snapshots and Settle Them in packages/api

* fix: Never Count the Compaction Anchor as Its Own Terminal Row

* fix: Settle Disconnect Snapshots Before Terminal Cleanup Releases the Turn
2026-10-28 11:13:50 +01:00
Marco Beretta
c81e244afd
🗂️ perf: Index Hot Lookups and Fix the Message Cursor (#17464)
Some checks are pending
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 Vote Gate / Gate (push) Waiting to run
Codegraph E2E Votes / vote (shard 1/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 10/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 2/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 3/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 4/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 5/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 6/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 7/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 8/10) (push) Waiting to run
Codegraph E2E Votes / vote (shard 9/10) (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
* perf: Index Hot Lookups and Make Message Cursor Pagination Stable

Add narrow indexes for session refresh-token deletes, user-only tool call deletes, queued-turn delivery and reconciliation claims, agent code environment references, and updatedAt message pages. Add a TTL index to the KeyvMongo collection. getMessagesByCursor now sorts and pages on a unique (sortField, _id) tiebreaker with a millisecond-precise cursor while still accepting legacy cursors, and GET /api/messages caps pageSize in a TypeScript helper.

* fix: Keep the Message Id for the Cursor Under the Client Projection

* fix: Declare select on the Message Cursor Method Type

* feat: Make the Message Page Size Ceiling Configurable

* fix: Clamp the Default Message Page Size to the Configured Ceiling

* test: Cover Message Cursor Paging and Page Size Cap End to End

* fix: Continue Message Cursors Whose Sort Value Is Empty

* fix: Include Missing Sort Values When Paging Messages Descending

* perf: Resolve the Message Page Ceiling Beside the Ownership Read

* fix: Observe the Ownership Read While the Page Size Resolves

* style: Sort Imports in the Message Page Module

* refactor: Move Page Size Read Observation Into the API Package

* fix: Keep Missing and Empty Sort Values Distinct in the Message Cursor

* fix: Page Past Messages With a Missing Timestamp
2026-10-28 00:55:02 +01:00
Marco Beretta
65d0ba8563
🧯 fix: Return Approved Tool and Generation Error Text Instead of Raw Exceptions (#17508)
* fix: Return approved tool and generation error text instead of raw exceptions

* fix: Redact generation error text without the data-schemas helper

* fix: Redact credentials and emails from shown generation errors

* refactor: Move the Wolfram status policy into packages/api

* test: Fix the Wolfram probe constructor and jest summary match

* test: Match the jest pass count through color codes

* fix: Redact credentials a tool input error echoes from its arguments

* fix: Drop free-text fields from typed generation errors under a content policy

* fix: Keep only the code and numeric fields of typed errors under a content policy
2026-10-28 00:39:01 +01:00
Marco Beretta
a0f063b1c7
🔐 fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers (#17506)
* fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers

Account erasure and server deletion now enumerate users the view ACL names
directly or through a group, so viewers without a personal OAuth token are
fenced and disconnected too. Erasure runs the OAuth teardown in strict mode,
which clears local credentials and then fails when the provider refuses a
revocation, keeping the server as the retry anchor, and holds every user's
teardown fence until the server delete commits.

* test: Type the Revocation Failure Cleanup Fixtures

* fix: Renew Retained OAuth Teardown Fences Before Deleting the Server

A teardown lease lasts 15 minutes, so a large erasure could outlive the
first fences it holds. Leases can now be renewed by their owner, and
erasure renews every retained fence right before the delete, failing
without deleting when one lapsed and another writer took it.

* fix: Report Refused MCP Revocations Without Blocking Account Erasure

A provider that refuses revocation, combined with a viewer who signs in
again between attempts, could keep an erasure failing indefinitely. The
strict teardown now throws a coded MCPOAuthRevocationError after clearing
local state and handing over its fence; server removal collects those as
refusals, logs each user and token type whose grant may remain valid, and
proceeds. Local failures (token delete, fence, ACL) still fail closed.

* fix: Annotate the Revocation Error Code for Isolated Declarations
2026-10-28 00:37:07 +01:00
Marco Beretta
7d0e79786f
🪶 fix: Time Out Client Refresh and Trim Lodash Imports (#17467)
* perf: Bound client hygiene paths (lodash imports, timeouts, listener cleanup, upload concurrency)

* feat: Make client request timeouts configurable

* test: Cover the configured refresh deadline end to end

* feat: Rename client timeouts to client limits and expose upload concurrency

* fix: Keep the published refresh deadline for the next page load
2026-10-27 23:30:08 +01:00