mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
🔍 chore: TEMP diagnostics for lazy code provisioning (revert)
This commit is contained in:
parent
f620673d97
commit
c9051310a6
2 changed files with 8 additions and 0 deletions
|
|
@ -256,6 +256,9 @@ const initializeClient = async ({ req, res, signal, endpointOption }) => {
|
|||
...getSkillToolDeps(),
|
||||
provisionFiles: async (toolNames, agentId) => {
|
||||
const ctx = agentToolContexts.get(agentId);
|
||||
logger.warn(
|
||||
`[e2e-diag provisionFiles] agentId=${agentId} tools=${JSON.stringify(toolNames)} hasCtx=${!!ctx} hasProvisionState=${!!ctx?.provisionState} codeEnvFiles=${ctx?.provisionState?.codeEnvFiles?.length ?? 'na'} vectorDBFiles=${ctx?.provisionState?.vectorDBFiles?.length ?? 'na'} codeApiKey=${!!ctx?.provisionState?.codeApiKey}`,
|
||||
);
|
||||
if (!ctx?.provisionState) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -611,6 +611,11 @@ function fileAuthoringResponses(operation, toolNames) {
|
|||
function provisioningToolResponses({ text, toolNames }) {
|
||||
const codeLabel = getMarkerValue(text, EXECUTE_CODE_MARKER);
|
||||
if (codeLabel) {
|
||||
console.warn(
|
||||
`[e2e-diag fake-model] execute_code marker; advertised=${toolNames.has(
|
||||
EXECUTE_CODE_TOOL_NAME,
|
||||
)} tools=${JSON.stringify([...toolNames])}`,
|
||||
);
|
||||
if (!toolNames.has(EXECUTE_CODE_TOOL_NAME)) {
|
||||
return {
|
||||
responses: [`E2E execute_code unavailable: ${EXECUTE_CODE_TOOL_NAME} was not advertised.`],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue