LibreChat/api/server/controllers
Ruben Talstra 3a62a2633d
💵 feat: Add Automatic Balance Refill (#6452)
* 🚀 feat: Add automatic refill settings to balance schema

* 🚀 feat: Refactor balance feature to use global interface configuration

* 🚀 feat: Implement auto-refill functionality for balance management

* 🚀 feat: Enhance auto-refill logic and configuration for balance management

* 🚀 chore: Bump version to 0.7.74 in package.json and package-lock.json

* 🚀 chore: Bump version to 0.0.5 in package.json and package-lock.json

* 🚀 docs: Update comment for balance settings in librechat.example.yaml

* chore: space in `.env.example`

* 🚀 feat: Implement balance configuration loading and refactor related components

* 🚀 test: Refactor tests to use custom config for balance feature

* 🚀 fix: Update balance response handling in Transaction.js to use Balance model

* 🚀 test: Update AppService tests to include balance configuration in mock setup

* 🚀 test: Enhance AppService tests with complete balance configuration scenarios

* 🚀 refactor: Rename balanceConfig to balance and update related tests for clarity

* 🚀 refactor: Remove loadDefaultBalance and update balance handling in AppService

* 🚀 test: Update AppService tests to reflect new balance structure and defaults

* 🚀 test: Mock getCustomConfig in BaseClient tests to control balance configuration

* 🚀 test: Add get method to mockCache in OpenAIClient tests for improved cache handling

* 🚀 test: Mock getCustomConfig in OpenAIClient tests to control balance configuration

* 🚀 test: Remove mock for getCustomConfig in OpenAIClient tests to streamline configuration handling

* 🚀 fix: Update balance configuration reference in config.js for consistency

* refactor: Add getBalanceConfig function to retrieve balance configuration

* chore: Comment out example balance settings in librechat.example.yaml

* refactor: Replace getCustomConfig with getBalanceConfig for balance handling

* fix: tests

* refactor: Replace getBalanceConfig call with balance from request locals

* refactor: Update balance handling to use environment variables for configuration

* refactor: Replace getBalanceConfig calls with balance from request locals

* refactor: Simplify balance configuration logic in getBalanceConfig

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-03-21 17:48:11 -04:00
..
agents 🏃‍♂️ refactor: Improve Agent Run Context & Misc. Changes (#6448) 2025-03-20 22:56:57 -04:00
assistants 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
auth 🔐 fix: Invalid Key Length in 2FA Encryption (#6432) 2025-03-20 16:46:11 -04:00
AskController.js 🔃 refactor: Parent Message ID Handling on Error, Update Translations, Bump Agents (#5833) 2025-02-12 16:49:32 -05:00
AuthController.js 🔒 feat: Two-Factor Authentication with Backup Codes & QR support (#5685) 2025-02-17 19:09:36 -05:00
Balance.js 🧮 feat: Improve structured token spending and testing; fix: Anthropic Cache Spend (#3766) 2024-08-24 04:36:08 -04:00
EditController.js 🔃 refactor: Parent Message ID Handling on Error, Update Translations, Bump Agents (#5833) 2025-02-12 16:49:32 -05:00
EndpointController.js refactor: Integrate Capabilities into Agent File Uploads and Tool Handling (#5048) 2024-12-19 13:04:48 -05:00
ErrorController.js 🛡️ : Security Enhancements (#1681) 2024-01-30 14:34:02 -05:00
ModelController.js 🚀 feat: Enhance Model Handling, Logging & xAI Agent Support (#6182) 2025-03-05 12:04:26 -05:00
OverrideController.js 💫 feat: Config File & Custom Endpoints (#1474) 2024-01-03 09:22:48 -05:00
PluginController.js 🎥 feat: YouTube Tool (#5582) 2025-01-31 19:11:04 -05:00
tools.js 🔍 feat: Mistral OCR API / Upload Files as Text (#6274) 2025-03-10 17:23:46 -04:00
TwoFactorController.js 🔐 fix: Invalid Key Length in 2FA Encryption (#6432) 2025-03-20 16:46:11 -04:00
UserController.js 🔒 feat: Two-Factor Authentication with Backup Codes & QR support (#5685) 2025-02-17 19:09:36 -05:00