This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit f39fad5
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 #110111 parent b9cf163 commit f39fad5
3 files changed
Lines changed: 986 additions & 10 deletions
File tree
- src/core/assistant-message
- __tests__
0 commit comments