LibreChat/api/server
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
..
controllers 🔐 fix: Retire Credentials by Their Committing Write and on Opt-In 2FA (#17504) 2026-11-05 22:53:11 +01:00
middleware 🔑 perf: Cache JWT Users and Batch Auth-Path Reads (#17466) 2026-10-30 00:24:08 +01:00
routes 🧮 fix: Count Memory Tokens After the o200k Encoding Loads (#17892) 2026-11-08 15:23:40 +01:00
services 🔐 fix: Retire Credentials by Their Committing Write and on Opt-In 2FA (#17504) 2026-11-05 22:53:11 +01:00
utils ⏱️ fix: Bound Remaining Outbound Calls With Timeout Budgets (#17468) 2026-10-29 09:55:18 +01:00
cleanup.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
csp.spec.js
experimental.js 🛡️ fix: Reject Unknown Admin Config Sections and Scope Write Responses to Read Access (#17315) 2026-10-22 16:52:56 +02:00
experimental.spec.js 🛡️ fix: Reject Unknown Admin Config Sections and Scope Write Responses to Read Access (#17315) 2026-10-22 16:52:56 +02:00
index.js 🧬 feat: Re-Derive Azure Groups, Vertex AI, Custom Parameters and Spec Defaults for Config Profiles (#17399) 2026-10-24 11:46:01 +02:00
index.metrics.spec.js
index.spec.js 🔭 feat: Recover Stale Chunks Without the Error Page and Ship Client Logs to RUM (#16701) 2026-10-03 23:17:56 -04:00
socialLogins.js 🔁 feat: Retry OpenID Discovery After Startup Failures (#15899) 2026-09-13 23:16:26 -04:00
socialLogins.spec.js 🔁 feat: Retry OpenID Discovery After Startup Failures (#15899) 2026-09-13 23:16:26 -04:00
telemetry.js
telemetry.spec.js