Skip to content

[BUG] Ollama models fail to execute tools and return tool calls as plain text #1429

Description

@lorenzo-castellani

Describe the bug
Ollama models fail to execute tools and return tool calls as plain text

Environment:

  • Zoo Code 3.80.0
  • Provider: ollama (proxy)
  • Models tested:
    • qwen3-coder:30b
    • qwen2.5-coder:32b
  • OS: Windows

Problem:

Zoo Code correctly exposes tools to the model (write_to_file, read_file, list_files, execute_command, etc.), and tool auto-approval is configured.

However, when asked to perform an action requiring a tool, the model does not invoke the tool. Instead it returns either:

  1. Plain text responses describing the action

or

  1. Pseudo tool calls such as:

<function=write_to_file>
<parameter=path>
prova.txt

<parameter=content>
test

Zoo Code then reports:

"The model provided text/reasoning but did not call any of the required tools. This usually indicates the model misunderstood the task or is having difficulty determining which tool to use."

Expected behavior:

The model should invoke the write_to_file tool and create the file.

Actual behavior:

The model generates a textual representation of the tool call and Zoo Code reports that no required tool was invoked.

Additional information:

  • "Enable Ollama native thinking" was tested both enabled and disabled.
  • qwen3-coder:30b previously produced:
    "qwen3-coder:30b does not support thinking"
  • qwen2.5-coder:32b shows the same tool-calling issue.
  • Asking the model to list available tools confirms that Zoo Code exposes the tools correctly.

Question:

Is this a known compatibility issue between Zoo Code and Ollama-hosted Qwen models, or is additional configuration required for tool/function calling support?

Screenshots

Image

Additional context
// Please share this file with Zoo Code Support (support@zoocode.dev) to diagnose the issue faster
// Just make sure you're OK sharing the contents of the conversation below.

{
"error": {
"timestamp": "2026-08-28T17:28:59.808Z",
"version": "3.80.0",
"provider": "ollama",
"model": "qwen2.5-coder:32b",
"details": "fetch failed"
},
"history": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<user_message>\nCrea un file prova.txt contenente la parola test.\n</user_message>"
},
{
"type": "text",
"text": "<environment_details>\n# VSCode Visible Files\n\n\n# VSCode Open Tabs\n\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2026-08-28T17:23:39.091Z\nUser time zone: Europe/Rome, UTC+2:00\n\n# Current Cost\n$0.00\n\n# Current Mode\ncode\n💻 Code\nqwen2.5-coder:32b\n\n\n# Current Workspace Directory (c:/Temp/test_AI) Files\nNo files found.\nYou have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps.\n</environment_details>"
}
],
"ts": 1787937819122
}
]
}

// Please share this file with Zoo Code Support (support@zoocode.dev) to diagnose the issue faster
// Just make sure you're OK sharing the contents of the conversation below.

{
"error": {
"timestamp": "2026-08-28T17:33:39.277Z",
"version": "3.80.0",
"provider": "ollama",
"model": "qwen2.5-coder:32b",
"details": "The model provided text/reasoning but did not call any of the required tools. This usually indicates the model misunderstood the task or is having difficulty determining which tool to use. The model has been automatically prompted to retry with proper tool usage."
},
"history": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<user_message>\nCrea un file prova.txt contenente la parola test.\n</user_message>"
},
{
"type": "text",
"text": "<environment_details>\n# VSCode Visible Files\n\n\n# VSCode Open Tabs\n\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2026-08-28T17:23:39.091Z\nUser time zone: Europe/Rome, UTC+2:00\n\n# Current Cost\n$0.00\n\n# Current Mode\ncode\n💻 Code\nqwen2.5-coder:32b\n\n\n# Current Workspace Directory (c:/Temp/test_AI) Files\nNo files found.\nYou have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps.\n</environment_details>"
}
],
"ts": 1787937819122
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "{"name": "write_to_file", "arguments": {"path": "prova.txt", "content": "test"}}"
}
],
"ts": 1787938356487
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[ERROR] You did not use a tool in your previous response! Please retry with a tool use.\n\n# Reminder: Instructions for Tool Use\n\nTools are invoked using the platform's native tool calling mechanism. Each tool requires specific parameters as defined in the tool descriptions. Refer to the tool definitions provided in your system instructions for the correct parameter structure and usage examples.\n\nAlways ensure you provide all required parameters for the tool you wish to use.\n\n# Next Steps\n\nIf you have completed the user's task, use the attempt_completion tool.\nIf you require additional information from the user, use the ask_followup_question tool.\nOtherwise, if you have not completed the task and do not need additional information, then proceed with the next step of the task.\n(This is an automated message, so do not respond to it conversationally.)"
},
{
"type": "text",
"text": "<environment_details>\n# VSCode Visible Files\n..\..\Users\CASTE1.FIS\AppData\Local\Temp\zoo-diagnostics-01a04966-1787938139811.json\n\n# VSCode Open Tabs\n../../Users/CASTE1.FIS/AppData/Local/Temp/zoo-diagnostics-01a04966-1787938139811.json\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2026-08-28T17:32:36.534Z\nUser time zone: Europe/Rome, UTC+2:00\n\n# Current Cost\n$0.00\n\n# Current Mode\ncode\n💻 Code\nqwen2.5-coder:32b\nYou have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps.\n</environment_details>"
}
],
"ts": 1787938356536
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "{"name": "write_to_file", "arguments": {"path": "prova.txt", "content": "test"}}"
}
],
"ts": 1787938402570
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "[ERROR] You did not use a tool in your previous response! Please retry with a tool use.\n\n# Reminder: Instructions for Tool Use\n\nTools are invoked using the platform's native tool calling mechanism. Each tool requires specific parameters as defined in the tool descriptions. Refer to the tool definitions provided in your system instructions for the correct parameter structure and usage examples.\n\nAlways ensure you provide all required parameters for the tool you wish to use.\n\n# Next Steps\n\nIf you have completed the user's task, use the attempt_completion tool.\nIf you require additional information from the user, use the ask_followup_question tool.\nOtherwise, if you have not completed the task and do not need additional information, then proceed with the next step of the task.\n(This is an automated message, so do not respond to it conversationally.)"
},
{
"type": "text",
"text": "<environment_details>\n# VSCode Visible Files\n..\..\Users\CASTE1.FIS\AppData\Local\Temp\zoo-diagnostics-01a04966-1787938139811.json\n\n# VSCode Open Tabs\n../../Users/CASTE1.FIS/AppData/Local/Temp/zoo-diagnostics-01a04966-1787938139811.json\n\n# Current Time\nCurrent time in ISO 8601 UTC format: 2026-08-28T17:33:22.630Z\nUser time zone: Europe/Rome, UTC+2:00\n\n# Current Cost\n$0.00\n\n# Current Mode\ncode\n💻 Code\nqwen2.5-coder:32b\nYou have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps.\n</environment_details>"
}
],
"ts": 1787938402631
}
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions