* fix: Keep API Keys and Internal Errors Out of Logs and Responses
The log redaction patterns did not cover the appid query parameter, so a
failed Wolfram request logged its AppID with the axios request URL. appid
now joins the redacted token and query names.
OpenWeather returned a fetch error's message to the model verbatim, and
node-fetch puts the full request URL, appid included, in that message. The
tool now passes it through redactMessage, as ToolService does.
The public startup config route and the unauthenticated password reset
route sent raw error text on unexpected failures. Both now answer with a
fixed message and keep the detail in the server log.
* refactor: Format Tool Error Text in packages/api
* fix: Redact appid Metadata Keys in Structured Logs
* fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors
The legacy abort route passed any caller-supplied conversation id straight to
GenerationJobManager.abortJob, so a signed-in user who knew another user's
conversation id could stop that generation and receive its partial output.
abortOwnedGeneration now reads the job first and stops it only for its owner
and tenant, fenced to the epoch it read; anything else reads as not found.
saveURLToS3 piped Readable.fromWeb into the byte-limit transform with .pipe,
which does not forward source errors. A body that failed mid-download emitted
an unhandled error and left the upload awaiting forever. Use stream.pipeline,
as the CloudFront strategy already does.
* test: Cover Stop Ownership on the Legacy Abort Route
* test: Scope the Parts Attachment Check to the Composer Tray
The file name also labels a hidden recent-file row once earlier tests in the
shard have left one mounted, so the unscoped locator resolved to two buttons.
* refactor: Draw Provider Icons as Theme-Following Brand Marks
Replace the raster and oversized provider art with single colour SVG marks
that inherit currentColor. Marks come from simple-icons (CC0) or are cut
from the logo each brand publishes, as noted per entry in marks.ts.
Lemonade, MLX, ShuttleAI and Unify keep their raster art for now.
The Cohere landing padding only compensated for the old PNG, so it goes.
* fix: Use the Groq Wordmark G Instead of the Site Favicon Bolt
* fix: Report Not Ready on /readyz While Redis Is Disconnected
/readyz only reflected the one-shot startup flag, so a pod whose Redis
connection dropped after startup kept answering 200 while sign-in failed.
It now also returns 503 when USE_REDIS is on and either shared client
(ioredis or the Keyv node-redis client) is not connected. /livez and
/health stay unconditional so a Redis blip cannot cause a restart loop.
Related to #16814
* test: Cover Readiness Probes Across a Redis Outage
* fix: Inject Redis Clients Into Readiness and Check Every Cluster Master
* refactor: Drop the Request/Response Pair No Emitter Sends From ChatErrorData
No server path writes requestMessage or responseMessage on the SSE error event: handleError writes a string or sendError's error message, and a failed turn's pair travels on the final frame, which already types it as partial. Removing the fields keeps clients from reading data that never arrives.
* test: Cover a Turn That Ends on the Served Stream Error
* fix: Pair English Plural Keys as _one/_other for Locize
Locize groups keys by plural suffix and generates every form a language
needs. Families that paired a bare base key with _one surfaced empty-source
_other rows, and literal keys ending in _other or _one spawned unrelated
plural siblings. Rename the bases to _other, rename the colliding literal
keys, and guard the English file against a regression.
* test: Cover Plural Version Count and Other Issue Feedback Tag
* fix: Announce a Single Running or Finished Chat in the Singular
* fix: Resolve Plural Forms From Base Keys So Locale Plural Rules Apply
Selecting an explicit _other key bypassed i18next's plural resolution, so a
single running chat was announced in the plural and locale forms such as
_zero and _many were never chosen. Call sites pass the base key with a
numeric count again, and TranslationKeys accepts plural base keys.
* fix: Let i18next Pick Duration Plural Forms From a Numeric Count
Duration and elapsed announcements selected an explicit _one or _other key
and passed the formatted number as count, so locale forms such as _few and
_many were unreachable. They now pass the base key with a numeric count and
interpolate the locale-formatted number as value.
* fix: Route Subagent Files Delivered After a Mid-Run Reload
* test: Stub Stored Part Queries in the ContentParts Integration Suite
* fix: Recover Stored Part Lookups That Fail Without a Reader
* fix: Resolve Late Subagent Files With One Previewed Message Read
* fix: Read Late Subagent Hints Again Until the File Is Saved
* fix: Count Failed Reads Toward the Late Hint Poll Bound
* fix: Let Unresolved Late Hint Reads Recover on Focus and Reconnect
* fix: Resolve Late Subagent File Owners From the Stored Transcripts
* fix: Ask for Late Subagent File Owners in Bounded Batches
* fix: Render Files Saved by Tools Inside a Subagent Run
* test: Cover Subagent Nested Tool Images After Reload
* fix: Hoist Subagent Child-Run Files With Grouped Tool Calls
* fix: Route Live Subagent Child Files Through the Part Attachment Map
* fix: Keep Subagent Child File Routing Through Previews and Ownership Rules
* test: Match Subagent Image Names Exactly
* fix: Key Subagent Child Files by Their Owning Part
* fix: Apply Attachment Scope Rules to Subagent Child Calls
* fix: Carry Child Call Scope Through Previews and Live Progress
* fix: Retain Live Subagent Progress Readers and Seen Child Calls
* fix: Keep Live Progress Keys Retained Across Streamed Deltas
* fix: Assign Subagent Child Files Once Per Message
* fix: Route Late and Id-less Subagent Child Files
* fix: Keep Seen Subagent Child Calls With Their Invocation
* fix: Use Streamed Index and Call-Level Owner for Subagent Child Files
* fix: Reserve Scoped Child Files From Unscoped Top-Level Calls
* fix: Record Subagent Child Calls When Progress Is Written
* fix: Keep Agent Scope on Remembered Subagent Child Calls
* refactor: Share One Subagent Child Call Collector
* fix: Derive Live Signature From Remembered Child Calls
* fix: Keep Child Calls a Bounded Batch Evicts
* fix: Bound Remembered Subagent Child Calls and Include Replay Segments
* fix: Refresh Owners of Shown Files in the Bounded Call History
* fix: Keep Remembered Call Order Stable Across Eviction Replays
* fix: Scope Preview Hints to Attachments and Walk Nested Calls Iteratively
* fix: Bound Wildcard Preview Hints and Own Live Calls by Their Run
* fix: Own Stored Subagent Child Calls by Their Persisted Identity
* feat: Add Gemini 4 Argon Support
Registers gemini-4-argon (GA 2026-10-13) for both the Gemini API and
Google Cloud Gemini Enterprise Agent Platform, following the Gemini 3.8
Flash integration.
- Model dropdown (config.ts) and both GOOGLE_MODELS examples
- Shared 1,048,576-token context window in googleModels; output stays
capped at the 65,535 synchronous limit by googleSettings
- Thinking rule: medium default, minimal substituted with low, ignored
sampling params and rejected thinkingBudget stripped; the allowlisted
cyber-permissive variant defaults to high
- Introductory rates ($2 in / $10 out / $0.10 implicit cache read per
1M) with the 2026-12-01 revert to $4 / $20 / $0.20 noted at both
call sites; no long-context premium tier
- Tests: thinking default and levels, minimal substitution, legacy param
strip, Vertex eu multi-region, OpenAI-compatible addParams strip,
context window, value key and rates
Refs #17074
* test: Cover Gemini 4 Argon Request Shape and Billing End to End
Adds a Gemini-compatible mock endpoint whose addParams carry sampling
params, an E2E_REPORT_LLM_CONFIG fake-model marker that reports the
resolved agent request, and scenarios asserting that an Argon turn sends
no ignored sampling params (with gemini-2.5-pro as the control) and is
billed at the Argon rates.
* test: Read the Resolved Agent Request From the Graph in Argon Scenarios
The hook's agents are the unresolved agent configs, so the report now
reads the graph's agent context. The scenarios select the Gemini model
explicitly and key billed rates by model so a mismatch names the model.
* test: Match the Mobile Model Option Name in Argon Scenarios
* fix: Route Gemini 4 Argon to a Multi-Region Vertex Endpoint by Default
Argon is served only from the global, us and eu multi-regions, so with
GOOGLE_LOC unset a Vertex request now uses global instead of the
us-central1 regional default; a configured location is kept as is.
Argon also rejects a candidate count, so candidateCount, candidate_count
and its OpenAI alias n are stripped for Argon on the native and
Gemini-compatible paths.
* chore: Bump @librechat/agents to 4.0.6 for Gemini 4 Argon Input Rules
* fix: Move Regional Vertex Locations to Their Multi-Region for Gemini 4 Argon
A configured regional location such as europe-west1 does not serve
Argon, so it now resolves to the multi-region that contains it (europe-*
to eu, us-* to us) wherever the location comes from, GOOGLE_LOC or
addParams. A region outside us and eu is kept rather than sent to
global, so data never leaves the configured geography silently.
* fix: Route Gemini 4 Argon Past Regional Vertex Endpoint Overrides
* fix: Skip Re-Embedding Legacy File Search Files an Agent Already Holds
Files embedded before per-namespace tracking carry no embeddedEntities, so
lazy provisioning treated them as unembedded and embedded them a second
time on the first search after upgrading, duplicating every passage.
A legacy record in the agent's own file_search resources was embedded for
it, so trust its embedded flag there instead of re-queueing it.
* fix: Adopt Legacy Search Embeddings Only for Their Sole Holder
Trusting the embedded flag for every legacy File Search file left an agent
that inherited one querying a namespace without its vectors. Legacy files
held by no other agent now record the active agent as their namespace, a
one-time write, and are not embedded again; a file another agent also
holds keeps the per-namespace re-embed.
Adds an e2e scenario that reshapes an uploaded agent file into the v0.8.7
record and checks that search queries it without a second embed.
* test: Cover Legacy Search Files Shared With Another Agent
* test: Read the Stored File Id in Legacy Search Scenarios
* fix: Pin Legacy Search Adoption to Loaded Records and Wire Every Agent Init
file_id is not unique, so adoption now matches each record by its owner and
tenant as well, and only rewrites the records priming loaded. The added
conversation and client agent initializations receive the dependency too,
so their sole-holder legacy files are not embedded a second time.
* fix: Adopt Each Legacy Search Record in One Conditional Write
* fix: Count a Concurrent Same-Agent Adoption as Adopted
* fix: Run Legacy Search Adoption Beside the Liveness Probe and Fall Back on Failure
* fix: Keep Committed Legacy Search Adoptions When a Sibling Write Fails
* fix: Confirm Legacy Search Embeddings With RAG Before Adopting Them
Inferring the embedding agent from current File Search holders could adopt a
file for an agent whose namespace held none of its vectors, for example after
the agent that embedded it was deleted. Priming now asks RAG for one chunk of
each legacy file under the agent's entity_id and records the namespace only
on a hit; a miss or an unreachable RAG keeps the file queued for embedding.
The data-schemas method no longer scans agents and matches untenanted records
as untenanted. The fake RAG server answers these presence checks from the
embeds it stores.
* fix: Require the Entity's Own Chunks and Keep Confirmed Vectors
RAG also returns chunks owned by the requesting user, so a presence check now
counts only chunks recorded under the agent itself. Once vectors are
confirmed, the turn skips the re-embed even if recording the namespace fails.
* fix: Bound the Legacy Search Check and Keep the Fake RAG Query Shape
The RAG presence check now times out (fileConfig.legacySearchProbeTimeoutMs,
5s by default) and falls back to embedding, so a stalled RAG cannot hang
priming. The fake RAG server records presence checks in their own list and
keeps the file_search query records it already returned.
* fix: Check Any Unrecorded Namespace Before Embedding a Search File
A file another agent embedded first lists only that agent, so the agent
whose older vectors went unrecorded skipped the check and embedded a second
copy. Priming now asks RAG for every agent File Search file that records no
embedding for the active agent, and recording adds the namespace to the ones
already there.
* fix: Ask RAG for Several Chunks So a User Copy Cannot Hide the Agent's
RAG ranks chunks across every owner of a file_id and, once the top one is
authorized, returns them all. A copy of an agent file embedded for the
requesting user could rank first with k: 1 and hide the agent's own chunks,
so the presence check now asks for ten and checks every owner.
* fix: Confirm Setup Embeddings in Shared-File Runs and Log Safely
The run-file host primes an agent's setup files on its own, so it now
receives the RAG presence check and the namespace recorder too; without
them a shared-file run could embed a legacy setup file a second time.
Failed checks are logged with getSafeErrorMetadata rather than the raw
error, which carries the vector store's response body.
* chore: Retire the DALL-E 3 Tool
OpenAI shut down dall-e-3 on May 12, 2026, so the built-in DALL-E 3 tool can no longer generate images on api.openai.com. Remove the tool, its manifest entry, registry definition, and env docs, along with the loadTools functions flag that only existed to register it. The OpenAI Image Tools cover the same use case. Stored agents that still list dalle load without it, and dalle stays in imageGenTools so past images keep rendering.
* test: Cover the Retired DALL-E 3 Tool in Mock Scenarios
* docs: Drop DALL-E from the README Image Generation List
* fix: Price 1-Hour Prompt Cache Writes at the 1-Hour Rate
* test: Cover 1-Hour Cache Write Pricing End to End
* test: Price Cache Scenario on the Configured Mock Model
* fix: Accept a 1-Hour Cache Write Rate in Endpoint Token Configs
* feat: Add Claude Haiku 5.5 Support
Haiku 5.5 (`claude-haiku-5-5`) matched none of the Claude family gates, so
every endpoint treated it as a legacy Claude 4 model: thinking went out as
`enabled` with a budget (400), sampling parameters were sent, thinking blocks
were not bound to the conversation prefix, and it resolved to a 200K context,
64K output and the default token rate.
Add a Haiku version parser and `hasAdaptiveHaikuThinking` (5.5 or later),
and include it in the adaptive thinking, block binding, omitted display,
sampling omission, explicit disabled, effort cap, 1M context and 128K output
gates. Unlike Sonnet 5.5, Haiku 5.5 still accepts `disabled` at effort high or
below, so "thinking off" sends `disabled` and clamps xhigh/max to high. The
settings panel keeps the thinking toggle and hides budget and sampling.
Register it in the Anthropic, Bedrock (`global.anthropic.claude-haiku-5-5`)
and Vertex default model lists, the 1M context map and the 128K output cap,
and price it at $0.10 / $0.50 up to a 100K prompt and $0.50 / $2.50 above,
with matching cache tiers.
Related to #17078, #16911 and #17025.
* test: Cover Claude Haiku 5.5 Parameter Panel
* test: Pin Haiku Scenarios to Model Specs
* fix: Keep Claude Haiku 5.5 Off Regional Vertex Endpoints
* fix: Keep Temporary Chats Out of Langfuse
* fix: Gate Forced-Ephemeral and Open Responses Turns From Langfuse
* fix: Treat Legacy and Chat Completion Temporary Turns as Untraced
---------
Co-authored-by: Joel Hirzel <joel.hirzel@eps.ch>
* 🧵 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
* perf: Debounce People Picker Search
* perf: Index-Bound Word-Prefix Search for Users and Groups
Principal search and admin user search matched name, email and username
with case-insensitive regexes, which scan the whole users collection.
Users and groups now store lowercase, accent-folded token arrays derived
from each searchable field, indexed with tenantId, and searches match
anchored token prefixes. Schema middleware keeps the tokens in sync on
save, insertMany and update queries. Documents written before the tokens
existed stay findable through a fallback branch until
npm run migrate:search-tokens backfills them; startup warns while any
remain.
* perf: Build Search Token Indexes in the Backfill Migration
* fix: Reconcile Stale Search Tokens and Close Write-Path Gaps
The backfill now compares every document's tokens with its source fields and
repairs stale ones, so writes from an older server during a rolling deploy are
recoverable by rerunning it. Undefined assignments no longer clear tokens,
upsert inserts initialize every token field, every query word is required,
relevance scoring folds accents like the filter does, and the startup check
counts both collections in parallel and owns its error logging.
* perf: Drop the Second People Picker Debounce
SearchPicker already debounces query changes by 500ms; the extra 300ms delay
in UnifiedPeopleSearch stacked on top of it.
* fix: Match Nothing for Queries Over the Word Cap
Dropping the query word cap let one request build an unbounded filter. Restore
a 16 word cap, but a longer query now matches nothing instead of ignoring its
extra words, so a cap never produces a false positive.
* test: Cover Word-Prefix People Search and the Token Backfill End to End
* fix: Tokenize Fields an Upsert Copies From Its Filter
MongoDB copies equality conditions from an upsert's filter into the inserted
document, so their token fields now derive from that value instead of being
initialized empty.
* fix: Rank Accent-Folded User Matches Like the Search Filter
* test: Run the Token Backfill Without Blocking the Playwright Worker
* perf: Index Search Tokens Tenant First for Scoped Searches and Ignore Undefined Unsets
* test: Skip the Module-Scope Index Rebuild When the Scenario Runs the Backfill
* fix: Exit the Search Token Migration When Redis Clients Stay Open
* perf: Probe for Missing Search Tokens at Startup Instead of Counting Them
* test: Explain the Startup Probe the Warning Actually Issues
* fix: Keep Search Token Fields Out of Serialized Users and Groups
* fix: Keep the Admin Search Legacy Fallback Anchored at the Field Start
* fix: Score Groups Only on the Fields Search Matches
* perf: Start the Search Token Probe Alongside the Permission Checks
* fix: Warn at Startup When the Search Token Indexes Were Never Built
* fix: Score People Search Matches With the Filter's Word Separators
* perf: Check the Token Indexes Before Probing for Unmigrated Documents
* test: Drive the Failed Startup Probe Past the Index Check
* fix: Score People Search Matches Independently of Word Order
A backend jest worker keeps every module and transform it has loaded for its whole life and grows past three gigabytes on a packages/api shard. Share a 1GB workerIdleMemoryLimit from config/jest.workers.cjs and apply it to api, packages/api and data-schemas, as the client config already does.
* refactor: Drop Queue Reset Helper From The Client Queue Module
* refactor: Drop Unused Shortcut Getters And Subagent Batch Wrappers
* refactor: Move HITL Approval Payload Builder To Test Fixtures And Drop Dead Helpers
* 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.