LibreChat/packages/data-provider/src
Danny Avila 5aaf87a73c
⏲️ feat: Defer Loading MCP Tools (#11270)
* WIP: code ptc

* refactor: tool classification and calling logic

* 🔧 fix: Update @librechat/agents dependency to version 3.0.68

* chore: import order and correct renamed tool name for tool search

* refactor: streamline tool classification logic for local and programmatic tools

* feat: add per-tool configuration options for agents, including deferred loading and allowed callers

- Introduced `tool_options` in agent forms to manage tool behavior.
- Updated tool classification logic to prioritize agent-level configurations.
- Enhanced UI components to support tool deferral functionality.
- Added localization strings for new tool options and actions.

* feat: enhance agent schema with per-tool options for configuration

- Added `tool_options` schema to support per-tool configurations, including `defer_loading` and `allowed_callers`.
- Updated agent data model to incorporate new tool options, ensuring flexibility in tool behavior management.
- Modified type definitions to reflect the new `tool_options` structure for agents.

* feat: add tool_options parameter to loadTools and initializeAgent for enhanced agent configuration

* chore: update @librechat/agents dependency to version 3.0.71 and enhance agent tool loading logic

- Updated the @librechat/agents package to version 3.0.71 across multiple files.
- Added support for handling deferred loading of tools in agent initialization and execution processes.
- Improved the extraction of discovered tools from message history to optimize tool loading behavior.

* chore: update @librechat/agents dependency to version 3.0.72

* chore: update @librechat/agents dependency to version 3.0.75

* refactor: simplify tool defer loading logic in MCPTool component

- Removed local state management for deferred tools, relying on form state instead.
- Updated related functions to directly use form values for checking and toggling defer loading.
- Cleaned up code by eliminating unnecessary optimistic updates and local state dependencies.

* chore: remove deprecated localization strings for tool deferral in translation.json

- Eliminated unused strings related to deferred loading descriptions in the English translation file.
- Streamlined localization to reflect recent changes in tool loading logic.

* refactor: improve tool defer loading handling in MCPTool component

- Enhanced the logic for managing deferred loading of tools by simplifying the update process for tool options.
- Ensured that the state reflects the correct loading behavior based on the new deferred loading conditions.
- Cleaned up the code to remove unnecessary complexity in handling tool options.

* refactor: update agent mocks in callbacks test to use actual implementations

- Modified the agent mocks in the callbacks test to include actual implementations from the @librechat/agents module.
- This change enhances the accuracy of the tests by ensuring they reflect the real behavior of the agent functions.
2026-01-16 17:46:52 -05:00
..
react-query 🏗️ feat: Dynamic MCP Server Infrastructure with Access Control (#10787) 2025-12-11 16:38:37 -05:00
types ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-16 17:46:52 -05:00
accessPermissions.ts 🏗️ feat: Dynamic MCP Server Infrastructure with Access Control (#10787) 2025-12-11 16:38:37 -05:00
actions.ts 🎯 fix: Actions Allowed Domains Handling (#11215) 2026-01-05 14:58:26 -05:00
api-endpoints.ts 🏺 fix: Restore Archive Functionality with Dedicated Endpoint (#11183) 2026-01-02 19:41:53 -05:00
artifacts.ts 🪟 fix: Windows Build (npm) (#3889) 2024-09-02 10:01:09 -04:00
azure.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
bedrock.ts 🪨 feat: Anthropic Beta Support for Bedrock (#11371) 2026-01-15 22:48:48 -05:00
config.ts ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-16 17:46:52 -05:00
createPayload.ts ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
data-service.ts 🧭 fix: Correct Subpath Routing for SSE and Favorites Endpoints (#11339) 2026-01-13 10:53:14 -05:00
feedback.ts 📈 feat: Chat rating for feedback (#5878) 2025-05-30 12:16:34 -04:00
file-config.spec.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00
file-config.ts 📂 fix: Extend MIME Type Support for Developer Code Files (#10908) 2025-12-16 19:55:35 -05:00
generate.ts 🪐 feat: Initial OpenAI Responses API Support (#8149) 2025-06-30 18:34:47 -04:00
headers-helpers.ts chore: add back data-provider 2023-07-30 11:50:24 -04:00
index.ts 📡 refactor: MCP Runtime Config Sync with Redis Distributed Locking (#10352) 2025-12-11 16:36:15 -05:00
keys.ts 🌊 feat: Resumable LLM Streams with Horizontal Scaling (#10926) 2025-12-19 12:14:19 -05:00
mcp.ts 🔒 fix: Restrict MCP Stdio Transport via API (#11184) 2026-01-03 12:47:11 -05:00
messages.ts 🐛 fix: String Interpolation in Messages Endpoint from #9155 (#9312) 2025-08-27 13:48:48 -04:00
models.ts 🪧 feat: Add Custom Group Icon Support for Model Specs (#10782) 2025-12-25 17:21:21 -05:00
parameterSettings.ts 🌙 feat: Add Moonshot Kimi K2 Bedrock Support (#11288) 2026-01-10 14:26:19 -05:00
parsers.ts ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
permissions.ts 🔧 refactor: Permission handling for Resource Sharing (#11283) 2026-01-10 14:02:56 -05:00
request.ts 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
roles.ts 🔧 refactor: Permission handling for Resource Sharing (#11283) 2026-01-10 14:02:56 -05:00
schemas.spec.ts 🤖 feat: Claude Opus 4.5 Token Rates and Window Limits (#10653) 2025-11-24 16:30:56 -05:00
schemas.ts ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-16 17:46:52 -05:00
types.ts ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
utils.ts 📂 refactor: Cleanup File Filtering Logic, Improve Validation (#10414) 2025-11-10 19:05:30 -05:00