Skip to content

When using Ollama, I keep getting an error that the model cannot call tools. #625

@heiqilin1985

Description

@heiqilin1985

When using Ollama, I keep getting an error that the model cannot call tools. I've already switched to multiple models, such as gemma3, qwen2.5-coder, and llama3.1, but the issue persists.


[ERROR] You did not use a tool in your previous response! Please retry with a tool use.

Reminder: Instructions for Tool Use

Tool uses are formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure:

<tool_name>
<parameter1_name>value1</parameter1_name>
<parameter2_name>value2</parameter2_name>
...
</tool_name>

For example:

<attempt_completion>

I have completed the task...

</attempt_completion>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions