Skip to content

Commit 1bbbb44

Browse files
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>
1 parent 6d8a50b commit 1bbbb44

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Docs: https://docs.openclaw.ai
5757
- 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.
5858
- 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.
5959
- Providers/Anthropic: preserve native image input for current Claude model rows when stale local catalog data marks them text-only. (#83756) Thanks @TurboTheTurtle.
60-
- 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.
60+
- 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.
6161
- 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.
6262
- Outbound: resolve send-capable channel plugins from the active runtime registry when the pinned startup registry only has setup metadata. (#83733) Thanks @TurboTheTurtle.
6363
- Control UI: keep the chat delete confirmation popover clamped inside the visible viewport on small screens. (#83804) Thanks @ThiagoCAltoe.

src/agents/pi-embedded-runner/compact.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,11 @@ async function compactEmbeddedPiSessionDirectOnce(
811811
senderIsOwner: params.senderIsOwner,
812812
warn: (message) => log.warn(message),
813813
});
814-
const effectiveTools = [...tools, ...filteredBundledTools];
814+
const normalizedBundledTools =
815+
filteredBundledTools.length > 0
816+
? runtimePlan.tools.normalize(filteredBundledTools, runtimePlanModelContext)
817+
: filteredBundledTools;
818+
const effectiveTools = [...tools, ...normalizedBundledTools];
815819
const allowedToolNames = collectAllowedToolNames({ tools: effectiveTools });
816820
runtimePlan.tools.logDiagnostics(effectiveTools, runtimePlanModelContext);
817821
const machineName = await getMachineDisplayName();

0 commit comments

Comments
 (0)