* feat: Add Gemini Hydrogen Model Support
* fix: Restore Google History For Reachable Agents
* fix: Preserve Mixed Google Signature History
* refactor: Inject Google billing configuration at application boundary
* fix: Preserve Call Signatures From Unsupported Google Output
* chore: Use Released Agents SDK 4.2.5
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🧽 fix: Replace an Abandoned Summary Attempt's Text When Its Retry Streams
Summary deltas append to the in-flight summary part. Once the agents SDK
streams them while the provider is still responding, an attempt that is
then abandoned (a retry, a fallback provider) has already put text in the
part, and the next attempt's deltas would follow it until the completion
event replaced the lot.
A delta may now carry `reset`: the part's content is replaced instead of
extended, and a reset with no content empties it. The part keeps its slot
and stays in flight. Deltas without the field behave as before, so this
is inert until the SDK sends it.
* 🦿 chore: Bump Agents SDK to 4.2.3
4.2.3 dispatches each summary delta while the provider is still responding
and marks the first delta after an abandoned attempt `reset`, which the
chat reducer now honors. It also stops sending reasoning as summary text,
which is where the `incoming.content is not iterable` handler errors
during compaction came from.
The release changed only the SDK's own dev dependencies and overrides, so
the lockfile moves the package's version, URL and integrity and nothing
else.
* 🦠 chore: Upgrade Node.js and Undici to Security Releases
* test: Wait for Restored Composer Readiness and Reuse Wrapping Config
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🥐 chore: Standardize Bun-First Workspace Typechecks
* fix: Preserve Bun 1.4.3 Checker Compatibility
* chore: Pin Bun 1.4.4 for Local and CI Typechecks
---------
Co-authored-by: Lia <lia@librechat.ai>
* chore: Update package dependencies across multiple modules
- Upgraded `@azure/identity` to version 4.14.0 in package.json files.
- Updated `multer` to version 2.5.0 and `nodemailer` to version 10.2.1.
- Incremented `undici` to version 7.30.1.
- Updated `@happy-dom/jest-environment` to version 21.0.4.
- Incremented `qs` to version 6.16.1 and `fast-uri` to version 3.1.9.
- Updated `serialize-javascript` to version 7.1.4.
- Updated `zod` to version 4.6.7 in multiple modules.
These updates ensure compatibility with the latest features and security improvements.
* chore: update bun.lock file
* chore: Update dompurify to version 3.4.17 across all package files
- Bumped dompurify version from 3.4.16 to 3.4.17 in package.json, package-lock.json, and relevant sub-packages.
- Ensured consistency in dependency versions across the project.
* chore: Update ip-address package to version 10.7.4 in package.json and package-lock.json
- Bumped ip-address version from 10.5.1 to 10.7.4 in package.json.
- Updated package-lock.json to reflect the new version and integrity hash.
* 🔧 chore: Update sanitize-html and related dependencies in package-lock.json and package.json
- Upgrade sanitize-html from ^2.17.7 to ^2.18.1 across multiple package.json files.
- Update dayjs from 1.11.21 to 1.11.23 in package-lock.json.
- Upgrade is-plain-object from 5.0.0 to 5.1.0 in package-lock.json.
- Upgrade launder from 1.7.1 to 1.7.2 in package-lock.json.
- Update postcss from ^8.3.11 to ^8.5.27 in package-lock.json.
* 🔧 chore: Upgrade mongodb-memory-server to version 11.3.0 across package-lock.json and multiple package.json files
- Update mongodb-memory-server from ^11.0.1 to ^11.3.0 in package-lock.json.
- Reflect the same version change in api/package.json and packages/data-schemas/package.json.
* 🔧 chore: Upgrade hono to version 4.13.13 in package.json and package-lock.json
- Update hono from ^4.13.7 to ^4.13.13 in package.json.
- Reflect the same version change in package-lock.json.
* 🔧 chore: Upgrade follow-redirects to version 1.16.1 in package-lock.json
- Update follow-redirects from 1.16.0 to 1.16.1 in package-lock.json.
* fix: Hash Off the Event Loop and Surface API Key Lookup Failures
Registration, email verification, password reset and verification resends
hashed and compared with bcryptjs's synchronous calls. bcryptjs is pure
JavaScript, so each call blocked the event loop for every request in the
process. They now use the promise APIs, and the password reset
dependencies are async.
validateAgentApiKey caught its own query failures and returned null, so a
database outage answered remote callers with 401 Invalid API key. It now
lets the failure reach requireApiKeyAuth, which answers with a 500.
* fix: Run bcrypt on a Worker Pool in packages/api
bcryptjs's promise API still computes on the main thread, only in chunks
of up to 100 ms, so concurrent registrations and resets kept stalling
unrelated requests (four cost-10 hashes delayed a 5 ms timer by about
190 ms). hashSecret and compareSecret now run bcryptjs on a small
worker_threads pool in packages/api, and AuthService.js calls them.
* feat: Configure the Password Hashing Worker Count
* fix: Verify Login and Step-Up Passwords on the Hash Pool
* 🧵 test: Cover Harmony Headers in Text Attachments Sent to OpenAI Models on Bedrock
A pasted text/plain attachment is sent inline as file context, so a harmony header such as `<|channel|>analysis` inside it reaches every later turn. OpenAI models on Bedrock answer that request with an event stream that closes before any event, which crashed the turn in @librechat/agents 4.0.4 with `Cannot use 'in' operator to search for 'tool_calls' in undefined`.
Drive LibreChat's own file-context formatting through the SDK's Bedrock model with a recorded response and assert the header reaches an OpenAI model neutralized and other model families unchanged.
* 📦 chore: Bump @librechat/agents to v4.0.5
* 📦 chore: Regenerate the Lockfile with npm 11 to Keep libc Constraints
* refactor: Remove Unused Agent Helpers and Superseded Wrappers
* refactor: Remove Dead Auth, Middleware, Protection and Prompt Helpers
* refactor: Remove Dead MCP, File, Skill and Endpoint Code
* refactor: Remove Dead Stream, Telemetry, Utility and Type Exports
* chore: Drop Unused packages/api Dependencies From bun.lock
* refactor: Keep Published Compatibility and Deprecated packages/api Exports
Bump @modelcontextprotocol/sdk from ^1.30.0 to ^1.32.1 in api and
packages/api. 1.31.0 binds stored OAuth credentials to the issuing
authorization server; LibreChat does not use the affected auth()/
authProvider path and already pins refreshes to the stored token endpoint.
1.32.0 makes the client transports follow same-origin redirects
themselves, which would re-issue requests the connection fetch declined
(hop cap, reauthorized tools/call). Set redirectPolicy: 'follow' so
redirects stay with the connection fetch, and cover both transports with
real-SDK tests.
* feat: passkey authentication with WebAuthn sign-in and management
* refactor: tighten passkey account protections
Require password confirmation before adding or removing a passkey, and rate
limit those confirmations per user in their own namespace. Restrict passkey
enrollment and sign-in to local accounts, and re-evaluate account status once
the credential owner is resolved. Require user verification on the sign-in
ceremony. Invalidate outstanding access tokens on password reset. Tighten
redirect target validation and sanitize ceremony failure logs.
Adds coverage across the passkey controller, the WebAuthn helpers, the step-up
limiter, both JWT strategies, the redirect utility and the passkey settings UI.
* fix: localize passkey default name and respect router basename
Send a localized default credential label at enrollment so non-English
locales no longer persist the server's English fallback, and route the
passkey post-login and 2FA navigations through the deployment base path
so subdirectory installs stay inside the router.
Also mock syncStaticTools in the server boot specs; without it the
post-listen MCP initialization calls undefined and exits the worker.
* fix: harden passkey counter checks and reach stranded credentials
Make the signature counter write a compare-and-swap so two assertions
that verified against the same stored counter cannot both commit, and
reject the losing one; a cloned authenticator is otherwise accepted
inside that window. Counterless authenticators keep restamping at 0.
Keep the passkey panel reachable for identity-provider accounts, which
already get passwordless removal server-side but had no way in, while
hiding the add control they cannot use. Cascade passkey deletion from
the admin user-deletion path so credential IDs are not stranded.
* fix: reject stale 2FA temp tokens and surface passkey load failures
A temporary 2FA token proves only the first factor, so honouring one
minted before a password reset let anyone holding the second factor
survive account recovery. Apply the same credentials-changed cutoff the
JWT strategy uses.
Also distinguish a failed passkey query from an empty list; the error
state previously rendered as "no passkeys yet", which misreports what
is protecting the account.
* fix: fail closed when the passkey counter write cannot commit
Returning success on a storage error bypassed the compare-and-swap it
exists to enforce, so a cloned authenticator could be accepted while the
stored counter stayed stale. A database that cannot take this write
cannot mint the session either, so little is gained by failing open.
Counterless credentials carry no clone signal and keep their old path.
* fix: keep the passkey 2FA handoff inside the router
A full-page navigation to the 2FA screen remounted AuthContextProvider,
which silent-refreshes on mount; no refresh session exists yet at that
point, so it bounced back to login before the code could be entered.
Route through the router like the password flow does.
Also reveal the removal step-up field when the server refuses a
passwordless attempt, so an account migrated to an identity provider
without its old hash cleared can still clear its credentials; drop the
staged password when the dialog closes; and revoke passkeys in the CLI
password reset, which bypassed the HTTP controller's cleanup.
* fix: apply one email-verification policy across login methods
Accounts predating mandatory verification are marked verified as they
sign in when no email is configured, but only the password strategy did
it, so the same legacy account was admitted by password and refused by
passkey. Extract the rule into a shared helper and call it from both.
* fix: refuse a passkey sign-in when the ban check cannot complete
checkBan defaults next to a no-op, so calling it bare discarded any
internal failure and left req.banned unset, letting the request fall
through and be issued tokens. Capture the error the middleware chain
would have propagated and reject instead.
* fix: refine passkey management dialogs
* test: stabilize passkey tooltip assertions
* test: reconcile passkey specs with the canary reset and deletion flows
The credentialsChangedAt stamp now lives in commitPasswordReset, so its
assertion moves to the passwordReset unit spec. Restores the describe
blocks the rebase merged together.
* test: mock passkey routes in the cross-site login suite
* refactor: move passkey handlers and credential checks into packages/api
The passkey controller, the credentialsChangedAt predicate and the legacy
email-verification grandfathering now live in TypeScript with injected
dependencies; /api keeps only the wiring that builds the handlers.
* style: align passkey UI with Tailwind v4 order and design-rule lint
* fix: revoke earlier access tokens on a CLI password reset
passwordVersion is not a user schema field, so the write was dropped and
tokens issued before the reset kept verifying.
* test: cover passkey sign-in and credential revocation end to end
* fix: hide passkey sign-in when email login is disabled
The passkey endpoints already refuse under ALLOW_EMAIL_LOGIN=false, so
advertising the button only led to a 403.
* fix: let only one concurrent verification consume a passkey challenge
Without a native getDel the challenge was read then deleted, so two
concurrent verifications could both use it. The delete now arbitrates:
only the caller whose delete removed the key gets the challenge.
* test: run passkey ceremonies on the localhost relying party
WebAuthn refuses an IP address as the RP ID, and the harness serves the
app on 127.0.0.1. The reset scenario runs once per project, so the mock
harness lifts the per-IP reset request limit as it does for forks.
* fix: keep passkey management when email login is disabled
Gate only the sign-in button on emailLoginEnabled, since only the sign-in
routes sit behind that gate; list, rename and remove stay reachable.
* fix: build the passkey credential index before the first registration
With MONGO_AUTO_INDEX=false the unique credentialId index was never
created, so concurrent registrations could store the same credential.
* test: enable password reset in the mock harness and cover email-login-off passkeys
* fix: stop re-exporting the passkey cap from data-schemas
The bundler left every import of methods/passkey.ts unlinked while that
module re-exported MAX_PASSKEYS_PER_USER from librechat-data-provider, so
the index build and the counter-failure log threw ReferenceError at
runtime. Consumers now import the cap from librechat-data-provider.
* test: close nested settings dialogs before logging out in passkey scenarios
* fix: reject cross-site passkey assertions
The verify route accepted a form posted from another site, which let an
attacker sign a victim into the attacker's account. It now runs the same
requireSameOrigin guard as password login and the 2FA step.
* fix: end refresh sessions on a CLI password reset
A surviving refresh session could mint an access token issued after the
credentialsChangedAt stamp, so the CLI now deletes sessions like the web
reset does.
* fix: keep the passkey button locked when it supersedes autofill
Starting the modal ceremony aborts the pending autofill one, and the
autofill error path cleared the shared lock and busy state while the
modal ceremony was still running.
(cherry picked from commit 471abaa64d)
Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/14715
Update package repository and bugs URLs, GitHub links in docs, templates and comments, and image references (compose files, deployed-update, Helm values and renovate hints) from danny-avila to LibreChat-AI / librechat-ai. Covers the rag-api repository and its images, which moved to the organization. Sponsor links and the sealed star-history chart are unchanged.