[GH-ISSUE #4675] [BUG]: Agent always fails at TOOL_CALL #2964

Closed
opened 2026-02-22 18:32:03 -05:00 by yindo · 2 comments
Owner

Originally created by @iocron on GitHub (Nov 21, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4675

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Every time I use a @agent then I only get similar responses to:
[TOOL_CALL] {tool => “document-summarizer”, args => { –action “list” –document_filename null }} [/TOOL_CALL]

It seems the agent is unable to make correct tool calls, or write files.
I am currently using Ollama with minimax-m2:cloud and gemma3:latest

Are there known steps to reproduce?

No response

Originally created by @iocron on GitHub (Nov 21, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4675 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Every time I use a @agent then I only get similar responses to: [TOOL_CALL] {tool => “document-summarizer”, args => { –action “list” –document_filename null }} [/TOOL_CALL] It seems the agent is unable to make correct tool calls, or write files. I am currently using Ollama with minimax-m2:cloud and gemma3:latest ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:03 -05:00
yindo closed this issue 2026-02-22 18:32:03 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 21, 2025):

This looks like a chat template issue - all we can do is ask the model to respond with JSON. If it fails to do so it is a model issue, not a bug with our software. Gemma3 however, should be able to produce JSON readily without issue. The fact that template strings like [TOOL_CALL] are in the output is indicative of a template issue with the model itself

@timothycarambat commented on GitHub (Nov 21, 2025): This looks like a chat template issue - all we can do is ask the model to respond with JSON. If it fails to do so it is a model issue, not a bug with our software. Gemma3 however, should be able to produce JSON readily without issue. The fact that template strings like [TOOL_CALL] are in the output is indicative of a template issue with the model itself
Author
Owner

@iocron commented on GitHub (Nov 21, 2025):

That's interesting, because I just used the official ollama models inside AnythingLLM. When I do the same with the Zed Editor, then everything is fine, so I don't think this is only a Model problem.

@iocron commented on GitHub (Nov 21, 2025): That's interesting, because I just used the official ollama models inside AnythingLLM. When I do the same with the Zed Editor, then everything is fine, so I don't think this is only a Model problem.
yindo changed title from [BUG]: Agent always fails at TOOL_CALL to [GH-ISSUE #4675] [BUG]: Agent always fails at TOOL_CALL 2026-06-05 14:49:32 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2964