Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit f39fad5

Browse files
committed
feat: add XML tool call fallback for OpenAI-compatible providers
Some API providers (like kie.ai with Gemini 3 Pro) do not fully support native function calling and instead output XML-formatted tool calls in text responses. This change adds support for parsing these XML tool calls and executing them as a fallback. Changes: - Add XmlToolCallParser to parse XML tool calls from text content - Modify presentAssistantMessage to detect and parse XML tool calls instead of rejecting them with an error - Add comprehensive tests for the XmlToolCallParser Fixes #11011
1 parent b9cf163 commit f39fad5

3 files changed

Lines changed: 986 additions & 10 deletions

File tree

0 commit comments

Comments
 (0)