Commit graph

848 commits

Author SHA1 Message Date
Danny Avila
f7ea232760
refactor: decouple caching and DB operations from AppService, make part of consolidated getAppConfig 2025-08-20 02:03:38 -04:00
Danny Avila
550bf56077
refactor: migrate checkEmailConfig to TypeScript and update imports 2025-08-20 01:07:31 -04:00
Danny Avila
ab4596206f
refactor: move interface config logic to TS API 2025-08-20 01:00:25 -04:00
Danny Avila
84c78f5812
refactor: consolidate tool loading logic into a new tools module for startup logic 2025-08-20 00:57:42 -04:00
Danny Avila
1c7b3b53da
refactor: move /services/Files/images/parse to TS API 2025-08-20 00:54:02 -04:00
Danny Avila
c160e7c7d5
refactor: add type annotation for loadedEndpoints in loadEndpoints function 2025-08-19 12:22:14 -04:00
Danny Avila
c0d6404385
refactor: replace getMCPAuthMap with getUserMCPAuthMap and remove unused getCustomConfig file 2025-08-19 12:22:14 -04:00
Danny Avila
71a14517cd
refactor: streamline endpoint configuration and enhance appConfig usage across services 2025-08-19 12:22:11 -04:00
Danny Avila
647b1bbac6
refactor: update getAppConfig call to include user role parameter 2025-08-19 12:22:11 -04:00
Danny Avila
5eef6ea9e8
refactor: implement custom endpoints configuration and streamline endpoint loading logic 2025-08-19 12:22:11 -04:00
Danny Avila
240e3bd59e
refactor: update appConfig access to use endpoints structure across various services 2025-08-19 12:22:10 -04:00
Danny Avila
89fb9c7e1c
refactor: consolidate endpoint loading logic into loadEndpoints function 2025-08-19 12:22:10 -04:00
Danny Avila
8525c8df36
refactor: remove getCustomConfig usage and use app config in file citations 2025-08-19 12:22:10 -04:00
Danny Avila
46f9c90223
refactor: remove customConfig dependency for appConfig and streamline loadConfigModels logic 2025-08-19 12:22:09 -04:00
Danny Avila
1d2be247cf
refactor: get balance config primarily from appConfig 2025-08-19 12:22:09 -04:00
Danny Avila
5e70d518aa
refactor: update imports to use normalizeEndpointName from @librechat/api and remove redundant definitions 2025-08-19 12:22:08 -04:00
Danny Avila
8df0ecd438
refactor: enhance AppConfig to include fileStrategies and update related file strategy logic 2025-08-19 12:22:08 -04:00
Danny Avila
f25e4253d0
fix: update appConfig usage to access allowedDomains from actions instead of registration 2025-08-19 12:22:07 -04:00
Danny Avila
493f60fa54
refactor: update getAppConfig call in getCustomConfigSpeech to include user role 2025-08-19 12:22:07 -04:00
Danny Avila
1168a7d82e
ci: update related tests 2025-08-19 12:22:07 -04:00
Danny Avila
c82c47ab6a
refactor: replace getCustomConfig with getAppConfig in STTService, TTSService, and related files 2025-08-19 12:22:06 -04:00
Danny Avila
b0256510b5
refactor: remove getCustomConfig dependency and use getAppConfig in PluginController, multer, and MCP services 2025-08-19 12:22:05 -04:00
Danny Avila
370e2d7ade
chore: remove app parameter from AppService invocation 2025-08-19 12:22:05 -04:00
Danny Avila
0e0758edaf
refactor: use appConfig registration property 2025-08-19 12:22:04 -04:00
Danny Avila
50bd6d3a02
refactor: update domain validation to use appConfig for allowed domains 2025-08-19 12:22:04 -04:00
Danny Avila
677481dde6
refactor: remove getCustomConfig dependency in config route 2025-08-19 12:22:01 -04:00
Danny Avila
2229672929
chore: correct parameter documentation for imageOutputType in ToolService.js 2025-08-19 12:21:31 -04:00
Danny Avila
68c6afd009
fix: streamline OpenAI image tools configuration by removing direct appConfig dependency and using function parameters 2025-08-19 12:21:30 -04:00
Danny Avila
0b5816d1be
chore: rename Config/getAppConfig -> Config/app 2025-08-19 12:21:30 -04:00
Danny Avila
e7af3bdaed
refactor: Update convertMCPToolsToPlugins to use mcpManager for server configuration and adjust related tests 2025-08-19 12:21:30 -04:00
Danny Avila
b2b2aee945
ci: Mock getAppConfig in various tests to provide default configurations 2025-08-19 12:21:29 -04:00
Danny Avila
2501d11fa0
refactor: Rename initializeAppConfig to setAppConfig and update related tests 2025-08-19 12:21:29 -04:00
Danny Avila
eeab69ff7f
refactor: Update multer storage destination to use promise-based getAppConfig and improve error handling in tests 2025-08-19 12:21:29 -04:00
Danny Avila
5bb731764c
ci: Integrate getAppConfig into remaining tests 2025-08-19 12:21:28 -04:00
Danny Avila
5b43bf6c95
ci: Update AppService tests to initialize app config instead of app.locals 2025-08-19 12:21:28 -04:00
Danny Avila
3ecb96149a
🏷️ refactor: Update tests to use getAppConfig for endpoint configurations 2025-08-19 12:21:28 -04:00
Danny Avila
b992fed16c
WIP: app.locals refactoring
WIP: appConfig

fix: update memory configuration retrieval to use getAppConfig based on user role

fix: update comment for AppConfig interface to clarify purpose
2025-08-19 12:21:27 -04:00
Danny Avila
3394aa5030
🗃️ fix: Only Unlink Temp files on Error for Firebase File Uploads (#9152) 2025-08-19 12:05:27 -04:00
Danny Avila
822e2310ce
🚮 fix: Remove Filtering Logic Before MCP Initialization (#9149) 2025-08-19 11:03:11 -04:00
Danny Avila
d7d02766ea
🏷️ feat: Request Placeholders for Custom Endpoint & MCP Headers (#9095)
* feat: Add conversation ID support to custom endpoint headers

- Add LIBRECHAT_CONVERSATION_ID to customUserVars when provided
- Pass conversation ID to header resolution for dynamic headers
- Add comprehensive test coverage

Enables custom endpoints to access conversation context using {{LIBRECHAT_CONVERSATION_ID}} placeholder.

* fix: filter out unresolved placeholders from headers (thanks @MrunmayS)

* feat: add support for request body placeholders in custom endpoint headers

- Add {{LIBRECHAT_BODY_*}} placeholders for conversationId, parentMessageId, messageId
- Update tests to reflect new body placeholder functionality

* refactor resolveHeaders

* style: minor styling cleanup

* fix: type error in unit test

* feat: add body to other endpoints

* feat: add body for mcp tool calls

* chore: remove changes that unnecessarily increase scope after clarification of requirements

* refactor: move http.ts to packages/api and have RequestBody intersect with Express request body

* refactor: processMCPEnv now uses single object argument pattern

* refactor: update processMCPEnv to use 'options' parameter and align types across MCP connection classes

* feat: enhance MCP connection handling with dynamic request headers to pass request body fields

---------

Co-authored-by: Gopal Sharma <gopalsharma@gopal.sharma1>
Co-authored-by: s10gopal <36487439+s10gopal@users.noreply.github.com>
Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
2025-08-16 20:45:55 -04:00
Danny Avila
8bcdc041b2
⚙️ refactor: Only register OpenID Strategy if Config Succeeded (#9094)
* fix: register openId the strategy if setupOpenId succeeded

* chore: linting and update imports

* refactor: extract OpenID configuration into a separate function

---------

Co-authored-by: Denis <denis.sheremetov@gmail.com>
2025-08-16 14:49:03 -04:00
Danny Avila
ad1503abdc
🧪 feat: Claude Sonnet 4 - 1M Context Window (Beta Header) (#9093)
* adding beta header context-1m-2025-08-07 to claude sonnet 4 to increase contact window to 1M tokens

* adding context-1m beta header to test cases

* ci: Update Anthropic `getLLMConfig` tests and headers for model variations

- Refactored test cases to ensure proper handling of model variations for 'claude-sonnet-4'.
- Cleaned up unused mock implementations in tests for better clarity and performance.

* refactor: regex in header retrieval for 'claude-sonnet-4' models

* refactor: default tokens for 'claude-sonnet-4' to `1,000,000`

* refactor: add token value retrieval and pattern matching to model tests

---------

Co-authored-by: Dirk Petersen <no-reply@nowhere.com>
2025-08-16 13:36:46 -04:00
Danny Avila
3547873bc4
🧑‍💻 refactor: Secure Field Selection for 2FA & API Build Sourcemap (#9087)
* refactor: `packages/api` build scripts for better inline debugging

* refactor: Explicitly select secure fields as no longer returned by default, exclude backupCodes from user data retrieval in authentication and 2FA processes

* refactor: Backup Codes UI to not expect backup codes, only regeneration

* refactor: Ensure secure fields are deleted from user data in getUserController
2025-08-15 18:55:49 -04:00
Danny Avila
50b7bd6643
🔄 fix: Ensure lastRefill Date for Existing Users & Refactor Balance Middleware (#9086)
- Deleted setBalanceConfig middleware and its associated file.
- Introduced createSetBalanceConfig factory function to create middleware for synchronizing user balance settings.
- Updated auth and oauth routes to use the new balance configuration middleware.
- Added comprehensive tests for the new balance middleware functionality.
- Updated package versions and dependencies in package.json and package-lock.json.
- Added balance types and updated middleware index to export new balance middleware.
2025-08-15 17:02:49 -04:00
Danny Avila
81186312ef
🪙 refactor: Remove Title maxTokens & Support New LMStudio/Ollama Reasoning Format (#9085)
* 📦 chore: bump `@librechat/agents` to v2.4.76

* refactor: remove default maxTokens from title `clientOptions`
2025-08-15 15:29:16 -04:00
Danny Avila
e4e25aaf2b
🔎 feat: Add Prompt and Agent Permissions Migration Checks (#9063)
* chore: fix mock typing in packages/api tests

* chore: improve imports, type handling and method signatures for MCPServersRegistry

* chore: use enum in migration scripts

* chore: ParsedServerConfig type to enhance server configuration handling

* feat: Implement agent permissions migration check and logging

* feat: Integrate migration checks into server initialization process

* feat: Add prompt permissions migration check and logging to server initialization

* chore: move prompt formatting functions to dedicated prompts dir
2025-08-14 17:20:00 -04:00
Danny Avila
e8ddd279fd
🎏 refactor: Streamline Role Permissions from Interface Config 2025-08-14 02:15:33 -04:00
Danny Avila
803ade8601
🔄 refactor: Principal Type Handling in Search Principals to use Array 2025-08-13 16:24:26 -04:00
Danny Avila
dcd96c29c5
🗨️ refactor: Optimize Prompt Queries
feat: Refactor prompt and prompt group schemas; move types to separate file

feat: Implement paginated access to prompt groups with filtering and public visibility

refactor: Add PromptGroups context provider and integrate it into relevant components

refactor: Optimize filter change handling and query invalidation in usePromptGroupsNav hook

refactor: Simplify context usage in FilterPrompts and GroupSidePanel components
2025-08-13 16:24:25 -04:00
Danny Avila
53c31b85d0
🗞️ refactor: Apply Role Permissions at Startup only if Missing or Configured 2025-08-13 16:24:25 -04:00