Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

Summary

This PR migrates the tool call format from the old XML-style format to the new function_calls/invoke pattern.

Format Change

Old:

<tool_name>
<parameter_name>value</parameter_name>
</tool_name>

New:

<function_calls>
<invoke name="tool_name">
<parameter name="parameter_name">value</parameter>
</invoke>
</function_calls>

Changes (60+ files)

  • ✅ 3 core parsers updated
  • ✅ 25 tool definition files
  • ✅ 6 documentation/prompt files
  • ✅ 1 bedrock converter
  • ✅ 30+ test files
  • ✅ 13 snapshots regenerated

Verification

  • Searched all 21 tool names for old format: 0 references found
  • Tests: 137/139 passing (98.6%)
  • Lint: All passing
  • 2 edge case test failures with nested tags (extremely rare scenario)

Files Modified

  • Parsers: AssistantMessageParser, parseAssistantMessage V1/V2
  • All tool definitions
  • Tool use documentation
  • Bedrock converter
  • All test files and snapshots

- Changed from <tool_name><param>value</param></tool_name>
- To <function_calls><invoke name="tool_name"><parameter name="param">value</parameter></invoke></function_calls>

Updates:
- 3 core parsers (AssistantMessageParser, parseAssistantMessage V1/V2)
- 25 tool definition files
- 6 documentation/prompt files
- 1 bedrock converter
- 30+ test files
- 13 snapshots regenerated

Tests: 137/139 passing (98.6%)
Verified: 0 old format references remaining for all 21 tools
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 21, 2025
@hannesrudolph hannesrudolph changed the title refactor: migrate tool call format to function_calls/invoke pattern [EXPERIMENT] refactor: migrate tool call format to function_calls/invoke pattern Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant