refactor: tool classification and calling logic

This commit is contained in:
Danny Avila 2025-12-08 14:57:14 -05:00
parent 3588929c70
commit 984607d339
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
6 changed files with 25 additions and 14 deletions

View file

@ -1,5 +1,6 @@
const { nanoid } = require('nanoid');
const { sendEvent } = require('@librechat/api');
const { Constants } = require('@librechat/agents');
const { logger } = require('@librechat/data-schemas');
const { Tools, StepTypes, FileContext, ErrorTypes } = require('librechat-data-provider');
const {
@ -406,9 +407,11 @@ function createToolEndCallback({ req, res, artifactPromises }) {
}
return;
}
// Constants.PROGRAMMATIC_TOOL_CALLING
{
if (output.name !== Tools.execute_code) {
const isCodeTool =
output.name === Tools.execute_code || output.name === Constants.PROGRAMMATIC_TOOL_CALLING;
if (!isCodeTool) {
return;
}
}