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.
This commit is contained in:
Danny Avila 2026-01-08 10:32:30 -05:00
parent 1496e11e88
commit 4a6c2aa1e8
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
8 changed files with 179 additions and 14 deletions

View file

@ -1019,6 +1019,7 @@ class AgentClient extends BaseClient {
run = await createRun({
agents,
messages,
indexTokenCountMap,
runId: this.responseMessageId,
signal: abortController.signal,

View file

@ -374,6 +374,7 @@ async function processRequiredActions(client, requiredActions) {
* toolContextMap?: Record<string, unknown>;
* userMCPAuthMap?: Record<string, Record<string, string>>;
* toolRegistry?: Map<string, import('~/utils/toolClassification').LCTool>;
* hasDeferredTools?: boolean;
* }>} The agent tools and registry.
*/
async function loadAgentTools({
@ -518,7 +519,7 @@ async function loadAgentTools({
}, {});
/** Build tool registry from MCP tools and create PTC/tool search tools if configured */
const { toolRegistry, additionalTools } = await buildToolClassification({
const { toolRegistry, additionalTools, hasDeferredTools } = await buildToolClassification({
loadedTools,
userId: req.user.id,
agentId: agent.id,
@ -533,6 +534,7 @@ async function loadAgentTools({
userMCPAuthMap,
toolContextMap,
toolRegistry,
hasDeferredTools,
};
}
@ -546,6 +548,7 @@ async function loadAgentTools({
userMCPAuthMap,
toolContextMap,
toolRegistry,
hasDeferredTools,
};
}
@ -674,6 +677,7 @@ async function loadAgentTools({
toolContextMap,
userMCPAuthMap,
toolRegistry,
hasDeferredTools,
};
}