Krispy e3ee90bcba fix: add XML tool call parsing fallback for Qwen3-coder via Ollama
When using Qwen3-coder model through Ollama with many tools (6+), the
model outputs XML-style tool calls in the content field instead of
using the native JSON tool_calls format. This causes Goose to fail
to execute any tools.

This commit adds XML parsing as a fallback mechanism:

- Add parse_xml_tool_calls() helper function using regex to parse
  <function=name><parameter=key>value</parameter></function> format
- Modify response_to_message() to check for XML tool calls when no
  JSON tool_calls are found in the response
- Modify response_to_streaming_message() to accumulate text and
  parse XML tool calls when stream completes
- Add comprehensive unit tests for XML parsing

The fix is backward-compatible and only activates when JSON tool_calls
are absent, ensuring existing providers continue to work normally.

Tested with Qwen3-coder:latest via Ollama with 11 developer tools.

Signed-off-by: Krispy <krispy@emergentbit.com>
2026-02-01 07:41:39 -08:00
2026-01-29 12:21:47 -05:00
2025-11-10 13:54:42 -06:00
2026-01-29 19:04:39 -05:00
2026-01-29 19:04:39 -05:00
2025-12-23 15:38:26 -06:00
2025-09-26 23:44:38 -05:00
2025-11-10 08:37:31 -05:00
2025-11-03 02:25:51 -06:00
…
2026-01-22 11:45:27 +11:00
2025-09-26 23:44:38 -05:00

goose

a local, extensible, open source AI agent that automates engineering tasks

Discord CI

goose is your on-machine AI agent, capable of automating complex development tasks from start to finish. More than just code suggestions, goose can build entire projects from scratch, write and execute code, debug failures, orchestrate workflows, and interact with external APIs - autonomously.

Whether you're prototyping an idea, refining existing code, or managing intricate engineering pipelines, goose adapts to your workflow and executes tasks with precision.

Designed for maximum flexibility, goose works with any LLM and supports multi-model configuration to optimize performance and cost, seamlessly integrates with MCP servers, and is available as both a desktop app as well as CLI - making it the ultimate AI assistant for developers who want to move faster and focus on innovation.

Watch the video

Quick Links

Need Help?

a little goose humor 🦢

Why did the developer choose goose as their AI agent?

Because it always helps them "migrate" their code to production! 🚀

goose around with us

S
Description
an open-source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Readme Apache-2.0 2 GiB
Languages
Rust 63.6%
TypeScript 29.6%
JavaScript 1.7%
Shell 1.6%
Python 1.5%
Other 1.8%