* fix: Keep the Projects Section Expanded by Default
* fix: Label the Streaming Dot With a Tooltip and an Accessible Name
* fix: Move the Welcome Screen Footer Directly Under the Composer
* fix: Drop the Agent Name From Responses When the Selector Already Shows It
* fix: Align the Sidebar Section Headings With the Date Labels
* feat: Make the Welcome Footer Placement and Response Author Configurable
* fix: Hide the Memories Panel on the Agents Route
* test: Cover the Launch QA Chat Chrome in E2E Scenarios
* test: Assert the Section Heading Padding Merge Without Mocking App Internals
* fix: Read the Response Author Setting Through the Messages Host
* test: Give the Consumer Spec's Messages Host the Author Setting
* fix: Resolve User and Group Balance Overrides on Sign-In
Login routes pass the lean user document from the passport strategy, which has _id but no id, so the balance sync resolved config from the role alone and wrote role-level balance settings over user and group overrides on every login.
* test: Cover the Sign-In Balance Sync With a User Override Scenario
* fix: Report Union, Object, Array and Later Fields in Tool Validation Feedback
Type checks now cover integer, array, object and null, accept any member
of a declared type union, and scan every schema property. The cap of 8
applies to reported fields instead of inspected properties, so a mismatch
past the eighth property is still named.
Related to #17875
* fix: Read anyOf, oneOf and nullable Types in Tool Validation Feedback
Pydantic and zod describe an optional object as an anyOf of object and null,
and the Gemini sanitizer collapses unions into a type plus nullable: true.
Both shapes now report the field, and a valid null is no longer flagged.
Adds a mock MCP tool with a nullable object after its eighth property and a
scenario that checks the model receives the field name but not the value.
* test: Cover a Deployment Skill File Removed at Runtime
* fix: Name the Skipped Skill File in the Console Log
The default console format prints the message and request context but drops metadata, so a relativePath passed as metadata only reached the JSON file log.
* test: Keep the Removed-File Fixture Skill Out of the Palette
As a user-invocable skill it added a row to the virtualized composer palette and pushed the Your files section out of the rendered window, which broke palette-show-all.spec.ts.
A deployment skill file deleted from a running instance stays registered, and
fs.createReadStream only reported the missing path as a stream error once the
multipart upload was already in flight, which aborted the whole batch. Open the
file first so ENOENT rejects the promise primeSkillFiles already inspects, and
log the relative path of any file whose stream could not be acquired.
* fix: Let Native Azure Deployments Declare Their Reasoning Efforts
The composer effort control needs explicit capability evidence on Azure,
because a deployment name does not identify its model, but the native
Azure config had no way to supply any, so the control could never appear.
Add an optional per-model reasoningEfforts list to Azure groups. The
endpoints config serves only model names and efforts, and the composer,
the submit check and the server override validation all resolve them
through getReasoningParamDefinitions. Undeclared deployments stay without
a control and model spec locks still apply.
* test: Assert Auto as the Reset Button in the Azure Effort Scenario
* test: Ignore Looping Animations When the Memory Alert Settles
The spec waited for every animation in the document to finish. A looping one
never does, so it hung whenever earlier specs in its shard left a chat list
long enough to show pulsing skeleton rows. Adding any spec can move it there:
the shard planner places it in shard 9 instead of 6 with this branch.
* 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
Seven settings are read only from librechat.yaml as loaded, from the
YAML-only base config, or once at startup, yet the admin config API
stored overrides for them as if they applied. List them in
DEPLOYMENT_ONLY_CONFIG_PATHS, so writes skip them (deployment_only_path),
the merge keeps the librechat.yaml value, and GET /meta reports them:
- clientLimits (operator): /api/config reads appConfig.config.clientLimits
- telemetry.rum (operator): /api/config and the RUM proxy read the raw
telemetry block, the proxy through a base-only req.config
- conversationList (operator): loadConversationListLimits reads the
base-only config
- fileConfig.skills.deletionCleanupConcurrency (operator): the skill
deletion service loads the base-only config
- endpoints.agents.managementApi (operator): the agent management M2M
auth reads the base-only config
- passwordHashing (startup): configureHashPool runs once in the startup
checks
- interface.colorModeFromUrl (startup): injected into the HTML shell at
boot
GET /api/files bounds an explicit limit with req.config.fileListLimit,
but AppService never copied fileListLimit into the app config, so the
librechat.yaml value never applied. AppService now copies it.
* fix: Bind Role Delete Config Restore to the Role Identity and Audit the Members It Moved
* fix: Reassign Deleted Role Members With Per-Account Conditional Writes
* test: Type the Member Reassignment Race Spy With Mongoose Query Types
* perf: Reassign Deleted Role Members in Stamped Bulk Writes
* test: Type the Bulk Reassignment Race Spy Options
* fix: Attribute Role Deletion Reassignments by a Per-Batch Nonce
* fix: Keep a Role Whose Members Could Not All Be Reassigned and Audit Those Moved
* fix: Report a Reassignment Batch Whose Write Committed Before Rejecting
* fix: Audit Members Moved Before a Concurrent Role Deletion Won
* fix: Hold Role Deletion to Its Identity, Audit, Cache and Retry Invariants on Every Path
* fix: Recheck the Targeted Role Before Every Reassignment Batch
* fix: Resolve the Targeted Role Id When a Role Delete Names Only the Role
* fix: Report Each Reassigned Account Once and Retry a Config Restore Deferred by an Unreadable Role
* fix: Keep the Reassignment Tag When a Failed Batch Cannot Be Read Back
* fix: Keep Each Overlapping Role Deletion's Reassignment Tag on the Accounts It Moved
* 🔎 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>
* refactor: Move Ask State, Approval and File Previews, and Diff View Into the Chat Package
* fix: Point the HITL Edits Spec at the Moved Approval Preview
- 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.
* 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.
Fixesberry-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
* 🚤 fix: Keep Host Tool Loading Independent of Worker Status
* fix: Classify Workspace Tools at the Agent Boundary
---------
Co-authored-by: Lia <lia@librechat.ai>
* 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.
* refactor: Move Pure Part Helpers Into @librechat/chat
Tool output parsers (JSON fields, background handles, wakeups, background
tasks, command results) and the small routing, params and rerun helpers move
from client Content/ into packages/chat/src/core/parts, exported from the
package root. Client importers read them from @librechat/chat; parseJsonField
becomes a named export so the root barrel can carry it.
* test: Cover Wake-Up Turns Rendering as Task Cards
* fix: Point the API Background Spec at the Moved Parsers
* 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
* 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
* 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
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.
* 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
* 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
* 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
* 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
* 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
* fix: Harden Timer Sweeps, SSE Writes, and Violation Counters
Guard SSE writes against ended or destroyed responses through one helper, catch and single-flight the job store and TTL cache cleanup timers, serialize in-process counter updates, cap the violation log, prune stale OAuth failure records, batch the active-job lookup, and count Redis keys with DBSIZE.
* refactor: Drop the redundant violation log entry copy
* refactor: Log single-flight sweep failures from the API package
* test: Cover active generation listing and client disconnect mid-stream
* refactor: Configure violation log retention and move title timeout into the API package
* feat: Configure OAuth failure retention through mcpSettings
* fix: Prune OAuth failures promptly under short retention
* fix(agents): skip the empty-memory notice for agents that cannot use memory
Since #16301 formatMemoryContext('') returns the bare memory instructions sentence, and
prepareRuntimeAgent applied it to the primary agent whenever the user had no saved memories.
An agent with no memory tools and no automatic memory extraction can neither read nor write
memory, so the sentence told the model nothing it could act on, yet it reached the model as
per-turn context. The empty-store notice is now added only when the agent has memory tools or
automatic extraction is on. Saved memories are still injected as before.
* fix(agents): distinguish relocated context from user input
* fix(agents): narrow runtime context types
---------
Co-authored-by: shars <32410570+Shabonasar@users.noreply.github.com>
Co-authored-by: Lia <lia@librechat.ai>
- GET /resolved resolves a group or user profile in the partition its document belongs to, as
writes judge it: for an admin without a tenant reading a tenant's profile, that tenant's
librechat.yaml and __base__. GET /catalog resolves such a scope there too, instead of
answering 404, and GET /effective finds a user by id the way profiles are addressed and
resolves them in their own tenant: their role, groups and documents there.
- findPartitionUser becomes findPrincipalUser, which also returns the user's tenant.
- Admin role operations address the role of the caller's tenant partition: the role lookup
(getPartitionRole), listing, creation's name check, the members a rename migrates or a deletion
reassigns, the members listed and counted, and the ACL entries (deletePrincipalAclEntries) and
grants a deletion removes. A member added or removed by id must be a user of that partition.
- getRoleByName, which every request's permission checks read, reads the role of the caller's
partition too: outside a tenant and under the system context the platform-level one, never an
older tenant role of the same name. updateRoleByName without an id and updateAccessPermissions
for a role read without its _id write that role, so the legacy permission route changes the
platform role. The grants route checks a role exists with getPartitionRole.
- runInPartition moves a read into another partition only from outside a tenant, and rejects
leaving an active one.
- deleteGrantsForPrincipal and findGrantsForPrincipal without a tenantId reach only
platform-level grants, as moveGrantsToPrincipal does.
- updateRoleByName takes { id } to change one role document; renames, their rollback,
description updates and updateAccessPermissions write the document they read.
- The exported keyed rename helpers (applyConfigChange rename, renameConfigEntryTombstones)
refuse a new name no keyed path can address, as the admin routes do.
Move every local prompt group and native-revision read and write behind
one PromptStore (createPromptStore) and reduce the native adapter to
resolvePrompt, the contract the Langfuse adapter already has. The
service receives { store, sources } and dispatches resolution by group
source. Service behavior, errors (including unsupported), database
calls and result shapes are unchanged.
Co-authored-by: Rebase Probe <probe@example.com>
PromptService gains importSourceGroup, which finds or creates a source
pointer group, grants the PUBLIC viewer role and rolls the group back if
the grant fails. The Langfuse catalog sync calls it instead of four
storage callbacks and two Mongo error predicates, and the prompt service
is composed once in api/server/services/Prompts.js and passed to the
prompt routes, linked instructions, instructions prompt access and the
Langfuse sync runner.
Co-authored-by: Rebase Probe <probe@example.com>