LibreChat/api
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
..
app/clients 🚪 fix: Refuse Interactive MCP Sign-in on Remote Agent API Runs (#18058) 2026-11-11 20:56:17 -05:00
cache fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
config 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
db fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
models 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05:00
server 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144) 2026-11-17 09:37:34 -05:00
strategies fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
test fix: Guard Mongo Cleanup In Api Services Tests (#17990) 2026-11-11 11:10:39 +01:00
utils 🦊 feat: Add Claude Fable 5.2 Support (#18015) 2026-11-10 12:54:39 -05:00
jest.config.js 🦿 chore: Bump Agents SDK to 4.2.1 (#17664) 2026-10-31 15:17:05 -04:00
jsconfig.json
package.json 🧩 feat: Stream Host Models Through Remote SDK Runtimes (#18250) 2026-11-17 09:36:04 -05: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