LibreChat/api/server
Danny Avila 1526b429c9
🧵 feat: Implement Request Executor Pattern for Actions (#4566)
* chore: actions typing

* fix(actions): implement request executor pattern to prevent concurrent execution issues

BREAKING CHANGE: ActionRequest now uses a RequestExecutor pattern for isolated request state

- Introduce RequestConfig class to store immutable configuration
- Add RequestExecutor class to handle isolated request state for each execution
- Modify ActionRequest to act as a facade creating new executors for each operation
- Maintain backward compatibility through delegation and getters
- Add TypeScript types for better type safety
- Fix race conditions in concurrent executions with auth and params

This change prevents state mutation issues when the same action is called
multiple times concurrently, particularly when using authentication. Each
request now gets its own isolated state through a new executor instance,
solving race conditions while maintaining the existing API interface.

* ci: test isolation/immutatability

* chore: Update version to 0.7.51 in data-provider package

* refactor(actions): refactor createActionTool to use request executor pattern
2024-10-28 13:42:38 -04:00
..
controllers 👓 fix: Assistants Vision Prompt Error Handling (legacy) (#4529) 2024-10-23 15:21:22 -04:00
middleware 🛡️ fix: Minor Vulnerabilities (#4543) 2024-10-24 15:50:48 -04:00
routes 🛡️ fix: Minor Vulnerabilities (#4543) 2024-10-24 15:50:48 -04:00
services 🧵 feat: Implement Request Executor Pattern for Actions (#4566) 2024-10-28 13:42:38 -04:00
utils 🛡️ fix: Minor Vulnerabilities (#4543) 2024-10-24 15:50:48 -04:00
index.js 🔄 feat: Add Configurable Cache Headers for Index.html (#4565) 2024-10-28 11:01:31 -04:00
socialLogins.js 🔍 fix: USE_REDIS condition, Markdown list counter, code highlights (#3806) 2024-08-27 14:49:43 -04:00