LibreChat/api/models
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
..
plugins 🔧 fix: MeiliSearch Field Error and Patch Incorrect Import by #6210 (#6245) 2025-03-08 14:37:33 -05:00
schema 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Action.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Agent.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Agent.spec.js 🛠 refactor: Ensure File Deletions, File Naming, and Agent Resource Updates (#5928) 2025-02-17 19:37:03 -05:00
Assistant.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Balance.js 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
Banner.js 🔗 feat: Agent Chain (Mixture-of-Agents) (#6374) 2025-03-17 16:43:44 -04:00
Categories.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
checkBalance.js 🪙 feat: Assistants Token Balance & other improvements (#2114) 2024-03-15 19:48:42 -04:00
Config.js refactor(api): Central Logging 📜 (#1348) 2023-12-14 07:49:27 -05:00
Conversation.js 🐞 fix: Agent "Resend" Message Attachments + Source Icon Styling (#6408) 2025-03-19 03:27:20 -04:00
ConversationTag.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
convoStructure.spec.js feat: Implement Conversation Duplication & UI Improvements (#5036) 2024-12-18 11:10:34 -05:00
File.js 🐞 fix: Agent "Resend" Message Attachments + Source Icon Styling (#6408) 2025-03-19 03:27:20 -04:00
index.js 🔒 fix: resolve session persistence post password reset (#5077) 2024-12-23 05:12:07 -05:00
inviteUser.js 🔐 fix: token not using webcrypto (#4005) 2024-09-11 22:25:14 -04:00
Key.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Message.js 🐛 fix: Prevent Crash on Duplicate Message ID (#6392) 2025-03-19 03:27:58 -04:00
Message.spec.js 🎥 feat: YouTube Tool (#5582) 2025-01-31 19:11:04 -05:00
Preset.js 🛡️ fix: Minor Vulnerabilities (#4543) 2024-10-24 15:50:48 -04:00
Project.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Prompt.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Role.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Role.spec.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Session.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Share.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
spendTokens.js 🧮 feat: Improve structured token spending and testing; fix: Anthropic Cache Spend (#3766) 2024-08-24 04:36:08 -04:00
spendTokens.spec.js 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
Token.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
ToolCall.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
Transaction.js 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
Transaction.spec.js 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
tx.js 🔗 feat: Agent Chain (Mixture-of-Agents) (#6374) 2025-03-17 16:43:44 -04:00
tx.spec.js 🔗 feat: Agent Chain (Mixture-of-Agents) (#6374) 2025-03-17 16:43:44 -04:00
User.js 📦 refactor: Move DB Models to @librechat/data-schemas (#6210) 2025-03-07 11:55:44 -05:00
userMethods.js 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00