fix(deepseek): normalize mcp union tool schemas

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>

Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
This commit is contained in:
clawsweeper
2026-05-19 01:43:33 +00:00
parent 6d8a50b693
commit 1bbbb44d2b
2 changed files with 6 additions and 2 deletions

View File

@@ -811,7 +811,11 @@ async function compactEmbeddedPiSessionDirectOnce(
senderIsOwner: params.senderIsOwner,
warn: (message) => log.warn(message),
});
const effectiveTools = [...tools, ...filteredBundledTools];
const normalizedBundledTools =
filteredBundledTools.length > 0
? runtimePlan.tools.normalize(filteredBundledTools, runtimePlanModelContext)
: filteredBundledTools;
const effectiveTools = [...tools, ...normalizedBundledTools];
const allowedToolNames = collectAllowedToolNames({ tools: effectiveTools });
runtimePlan.tools.logDiagnostics(effectiveTools, runtimePlanModelContext);
const machineName = await getMachineDisplayName();