LibreChat/api
Danny Avila 9ea3c5647d
🔑 fix: Use Admin-Stored Web Search Credentials at Runtime (#17323)
* 🔑 fix: Use Admin-Stored Web Search Credentials at Runtime

Use admin-stored (encrypted or literal) web search credentials as system
credentials at runtime, add the Keenable key to the secret registry, bind a
stored key to the layer that set its URL, and require re-entering the key when
a write changes or removes that URL (checked atomically with a version
precondition).

* 🧹 fix: Keep Dotted-Key Write Guarantees on Version-Checked Web Search Writes

A version-checked write the caller saw absent first creates an empty
document. When the database then refuses the write (a key name it cannot
store, answered 422 CONFIG_KEY_NOT_STORABLE), remove that document again
so a refused write stores nothing, unless another write has changed it.

Secret re-entry issues now carry `segments` like every other config
issue.

* 🚩 feat: Publish the webSearchStoredKeys Feature Flag in the Config Contract

GET /api/admin/config/meta now reports `webSearchStoredKeys: true`, so an
admin client can stop warning that only ${VAR} web search references work at
runtime. meta.spec probes the behaviour behind it: an encrypted stored key
reaches web search auth, the Keenable key is encrypted on write, and changing
a URL beside a stored key requires entering the key again.

* 🧪 test: Type the Refused-Write Driver Stub in the Config Methods Spec

* 🧪 test: Expect the Write Precondition Arguments in the Admin Config Route Test

The handler passes a session slot and an optional version precondition to
patchConfigFields since the web search re-entry check; the route test added
in #17322 asserted the earlier five-argument call.

* 🧹 fix: Surface a Failed Cleanup of the Empty Config Document

When a version-checked write the database refused cannot remove the empty
document created for it, let that failure reach the handler (500) instead
of logging it and answering 422 CONFIG_KEY_NOT_STORABLE, which promises that
nothing was stored.

* 📝 docs: State the Web Search Stored-Key Binding Rule Exactly in the webSearchStoredKeys Flag

The flag's doc said a stored key goes only to a URL the same layer set. The merge rule keeps a stored key over an inherited ${VAR} or default URL, so the doc now names the exact rule: a stored key reaches a URL stored in config only when one layer set both, a later layer that changes, blanks or removes the URL drops the key, and a write that changes or removes the URL must enter the key again.

* 🧹 refactor: Read the Secret Registry Through getConfigSecretRules Only

The dev merge kept this branch's getConfigSecretFields and getConfigArraySecretFields beside dev's getConfigSecretRules, which returns the same registry data. Only the secret specs used the two extra accessors. They now read getConfigSecretRules().secretFields and .arraySecretFields, so the accessors and their exported ConfigSecretField and ArraySecretField interfaces (duplicates of AdminConfigSecretFieldRule and AdminConfigArraySecretFieldRule) are gone.
2026-10-22 11:29:20 +02:00
..
app/clients ⏱️ fix: Bound Outbound Calls Made Inside a Request (#17263) 2026-10-21 19:10:13 +02:00
cache 🪪 fix: Boot-Paint a Cached Theme Only for Its Signed-In Owner (#16926) 2026-10-14 11:08:53 +02:00
config 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
db 🛬 fix: Land MCP OAuth Callbacks on Waiting Connections (#15876) 2026-09-13 01:46:41 -04:00
models 🥢 fix: Fit MCP App Snapshots Within Message Documents (#16299) 2026-10-01 03:46:17 +00:00
server 🔑 fix: Use Admin-Stored Web Search Credentials at Runtime (#17323) 2026-10-22 11:29:20 +02:00
strategies 🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261) 2026-10-19 22:13:31 +02:00
test ⏱️ fix: Bound Outbound Calls Made Inside a Request (#17263) 2026-10-21 19:10:13 +02:00
utils 💠 feat: Add Gemini 4 Argon Support (#17200) 2026-10-17 21:44:44 +02:00
jest.config.js 🧠 perf: Recycle Backend Jest Workers Past 1GB (#17098) 2026-10-16 22:15:10 +02:00
jsconfig.json
package.json 🐣 chore: Prepare v0.8.9-rc1 Release (#17336) 2026-10-22 08:56:53 +00:00
recover-skill-upload.js 🔌 feat: Integrate Durable Skill Lifecycle Across Writers and Routes (#17043) 2026-10-16 09:05:05 -07:00
typedefs.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00