Fix tool calling: handle nested XML format from Kimi K2.5 model
- Add _parse_nested_xml_tool() to extract tool calls from nested XML - Add _xml_to_dict() helper for recursive XML to dict conversion - Update extract_tool_calls() to try both JSON and nested XML formats - Improve system prompt with clearer tool format instructions and examples This fixes the issue where models outputting raw XML tool syntax (like Kimi K2.5) would have their tool calls end up in the response text instead of being properly parsed.
Showing
Please
register
or
sign in
to comment