Skip to content

fix(runtime): force tool-free child summaries - #1989

Merged
likun666661 merged 1 commit into
apache:mainfrom
likun666661:fix/deepseek-child-final-summary
Aug 3, 2026
Merged

fix(runtime): force tool-free child summaries#1989
likun666661 merged 1 commit into
apache:mainfrom
likun666661:fix/deepseek-child-final-summary

Conversation

@likun666661

Copy link
Copy Markdown
Member

Summary

  • force toolChoice: none whenever the runtime has an authoritative empty active-tool set
  • prevent DeepSeek-compatible child finalization steps from emitting native DSML tool-call envelopes as plain summary text
  • lock the child finalization contract with a regression assertion

Real-model verification

Reproduced before the fix with a local DeepSeek chain:

  • root: deepseek-v4-pro
  • configured subagent preset: deepseek-flash-reader
  • two swarm children: deepseek-v4-flash
  • maxSteps=12

Before the change, both child summaries ended as raw DSML tool-call envelopes and the root had to recover through agent_output.

After the change:

  • root session: fd8c6c3e-e944-4296-9d3d-fade5f18e2c1
  • root called only load_tools, agent_list, and agent_swarm
  • both child sessions persisted deepseek-v4-flash, deepseek-flash-reader, and local_read
  • both children read their assigned runtime source file
  • both swarm summaries were complete natural-language results with no DSML envelope
  • root synthesized directly from the swarm result without agent_output

Tests

  • npm --workspace @maka/runtime run typecheck
  • npm --workspace @maka/runtime run build
  • targeted child-finalization regression test
  • full ai-sdk-backend test file: 175 passed
  • real DeepSeek Pro to Flash swarm E2E: passed
  • full runtime suite: 2740 passed, 5 failed, 9 skipped; all 5 failures are pre-existing macOS /var vs /private/var path-canonicalization assertions in builtin-tools.test, unrelated to this change

@likun666661
likun666661 marked this pull request as ready for review August 3, 2026 10:59
@likun666661
likun666661 merged commit 346668d into apache:main Aug 3, 2026
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant