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

@ -57,7 +57,7 @@ Docs: https://docs.openclaw.ai
- Agents/subagents: keep collect-mode announce queues batching unresolved-origin items with compatible same-route messages and resume collection after a true cross-channel drain when a later compatible batch remains. Fixes #83577.
- Skills: refresh existing session skill snapshots when watched skill roots change, so changed extra skill directories take effect without starting a new session. Fixes #83782. (#83800) Thanks @hclsys.
- Providers/Anthropic: preserve native image input for current Claude model rows when stale local catalog data marks them text-only. (#83756) Thanks @TurboTheTurtle.
- Providers/DeepSeek: normalize MCP tool schemas with `anyOf`/`oneOf` unions before sending them to DeepSeek, preventing union-shaped parameters from being rejected. (#83766) Thanks @TurboTheTurtle.
- Providers/DeepSeek: normalize MCP tool schemas with `anyOf`/`oneOf` unions before normal and compaction requests reach DeepSeek, preventing union-shaped parameters from being rejected. (#83766) Thanks @TurboTheTurtle.
- Control UI: render live tool progress from session-scoped `session.tool` Gateway events so externally started runs show their tool cards in the active session. (#83734) Thanks @TurboTheTurtle.
- Outbound: resolve send-capable channel plugins from the active runtime registry when the pinned startup registry only has setup metadata. (#83733) Thanks @TurboTheTurtle.
- Control UI: keep the chat delete confirmation popover clamped inside the visible viewport on small screens. (#83804) Thanks @ThiagoCAltoe.

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();