LibreChat/api/server/controllers
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
..
__tests__ 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05:00
agents 🏯 fix: Bind MCP Grants to Authorized Agent State and Server Identity (#18233) 2026-11-16 18:42:32 -05:00
assistants 🛝 perf: Render Chats Independently of Catalog Discovery (#17692) 2026-11-09 11:11:22 -05:00
auth ⚡ fix: Parallelize Setup Cancel Lookups and Keep Attachment Drafts on Reload (#17963) 2026-11-09 21:57:01 +01:00
AuthController.js 🛂 fix: Only Hand Out OpenID Access Tokens the Bearer Verifier Accepts (#17904) 2026-11-08 23:40:21 +01:00
AuthController.spec.js 🛂 fix: Only Hand Out OpenID Access Tokens the Bearer Verifier Accepts (#17904) 2026-11-08 23:40:21 +01:00
avatar.contentFilter.spec.js 🛍️ fix: Discover Managed Agents in Marketplace Search (#16324) 2026-09-24 22:48:56 -04:00
Balance.js 🗓️ feat: Align Balance Resets to Fixed Calendar Boundaries (#18144) 2026-11-17 09:37:34 -05:00
Balance.spec.js 📏 fix: Measure Usage Percent Against the Allowance Each Period Granted (#17850) 2026-11-09 08:27:13 -05:00
EndpointController.js ✨ refactor: Integrate Capabilities into Agent File Uploads and Tool Handling (#5048) 2024-12-19 13:04:48 -05:00
FavoritesController.js 📌 feat: Add Pin Support for Model Specs (#11219) 2026-04-09 18:37:25 -04:00
FavoritesController.spec.js 📌 feat: Add Pin Support for Model Specs (#11219) 2026-04-09 18:37:25 -04:00
mcp.js 🔐 fix: Fence ACL Viewers and Surface Revocation Failures When Removing Shared MCP Servers (#17506) 2026-10-28 00:37:07 +01:00
mcpApps.js 🐛 fix: Restore MCP App Rendering and Actions (#16382) 2026-10-16 13:27:29 -07:00
mcpApps.test.js 🐛 fix: Restore MCP App Rendering and Actions (#16382) 2026-10-16 13:27:29 -07:00
ModelController.js 🛝 perf: Render Chats Independently of Catalog Discovery (#17692) 2026-11-09 11:11:22 -05:00
ModelController.spec.js 🧭 perf: Validate Agent Models Against Their Own Endpoint Catalog (#17972) 2026-11-10 17:33:29 +01:00
PermissionsController.js 🥸 fix: Resolve Directory Principals Through Trusted Integration Data (#17825) 2026-11-10 09:22:08 -05:00
PluginController.js 🔭 feat: Admin Config Read APIs (Resolved and Effective Config, Scope Catalog, Env Status) (#17383) 2026-10-24 09:23:22 +02:00
PluginController.spec.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
ReasoningCapabilitiesController.js 🎚️ feat: Filter OpenRouter Reasoning Efforts by the Selected Model (#16808) 2026-10-08 18:04:13 +02:00
SkillStatesController.js 🔌 feat: Integrate Durable Skill Lifecycle Across Writers and Routes (#17043) 2026-10-16 09:05:05 -07:00
TokenConfigController.js 💧 feat: Add Gemini Hydrogen Support (#18159) 2026-11-16 10:26:55 -05:00
tools.js 🪦 chore: Retire the DALL-E 3 Tool (#17205) 2026-10-17 18:24:22 +02:00
TwoFactorController.js 🔐 fix: Retire Credentials by Their Committing Write and on Opt-In 2FA (#17504) 2026-11-05 22:53:11 +01:00
UserController.js 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05:00
UserController.spec.js 🚜 feat: Support Native PostgreSQL Tool Favorites (#18032) 2026-11-11 12:07:07 -05:00