LibreChat/api/server
Danny Avila cb133ebf09
🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144)
* 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries

Add balance.refillAnchor, an ISO timestamp with a fixed offset that periods align to: a refill or reset is due at the first anchor-plus-whole-intervals boundary after the last one, so every user resets at the same moment (e.g. each Monday at 00:00 UTC, or the 1st of each month). Omitted, periods keep running from each user's last refill. The gauge names the reset date for anchored periods.

* 🧭 fix: Clear a Removed Reset Anchor During Admission and Shape Balance Responses in TS

A policy built without a record now always carries refillAnchor, null when unset, so removing the setting clears a stored anchor instead of looping admission until its retry bound throws. Balance response shaping moves to toBalanceResponse in packages/api; the CJS controller delegates to it.
2026-11-17 09:37:34 -05:00
..
controllers 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144) 2026-11-17 09:37:34 -05:00
middleware 🥊 fix: Reject Malformed LDAP Credentials Before Authentication (#18235) 2026-11-16 20:04:11 -05:00
routes 🏯 fix: Bind MCP Grants to Authorized Agent State and Server Identity (#18233) 2026-11-16 18:42:32 -05:00
services 🧵 feat: Run Background Shell Commands Without Holding Their Worktree (#18247) 2026-11-17 09:36:27 -05:00
utils 📬 feat: Persist Channel Events and Delivery Receipts (#17595) 2026-11-10 21:03:57 -08:00
cleanup.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
csp.spec.js fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
experimental.js 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05: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: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05:00
index.metrics.spec.js fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
index.spec.js ⏱️ test: Allow Cold-Cache Boot Time In API Server Spec (#18145) 2026-11-14 16:03:14 +01:00
persistence.spec.js 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05: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 🪵 feat: Add OpenTelemetry Logs Pipeline via Winston Bridge (#15565) 2026-09-03 21:16:09 -04:00
telemetry.spec.js 🪵 feat: Add OpenTelemetry Logs Pipeline via Winston Bridge (#15565) 2026-09-03 21:16:09 -04:00