LibreChat/packages/data-provider
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
..
specs 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144) 2026-11-17 09:37:34 -05:00
src 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144) 2026-11-17 09:37:34 -05:00
.gitignore 🗃️ refactor: Remove Dead Data Schemas Methods and Data Provider Exports (#17113) 2026-10-15 12:23:29 +02:00
babel.config.js
check_updates.sh
jest.config.js
package.json 🚀 v0.8.9 (#18236) 2026-11-17 09:22:57 -05:00
tsconfig.build.json
tsconfig.json 🥟 ci: Type-Check Workspaces with bun check (#17009) 2026-10-12 06:40:07 -04:00
tsconfig.spec.json
tsdown.config.mjs 🔑 feat: Keep Dotted Record Keys in Admin Config Writes and Publish the Config Contract (#17322) 2026-10-22 09:59:08 +02:00