[GH-ISSUE #2576] [BUG]: Custom plugins not working with codegeex4 model #1671

Closed
opened 2026-02-22 18:25:58 -05:00 by yindo · 1 comment
Owner

Originally created by @socir9 on GitHub (Nov 3, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2576

How are you running AnythingLLM?

Docker (local)

What happened?

Description

Custom plugins are not working with the codegeex4 model from Ollama. The agent attempts to call the plugin but always returns "Will assume chat completion without tool call inputs" response.

Environment

  • AnythingLLM version: v1.6.8
  • OS: Windows
  • Model: codegeex4:latest (Ollama)
  • Deployment: Docker

Current Behavior

When trying to use any custom plugin, the system responds with:
[debug]: @agent is attempting to call plugin-name tool
[AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack.
[AgentLLM - codegeex4:latest] Will assume chat completion without tool call inputs.

Are there known steps to reproduce?

Expected Behavior

The plugin should be called and executed successfully.

Steps to Reproduce

  1. Create a simple custom plugin:
// plugin.json
{
  "active": true,
  "hubId": "hello-plugin",
  "name": "Hello Plugin",
  "schema": "skill-1.0.0",
  "version": "1.0.0",
  "description": "Basic hello world plugin",
  "setup_args": {},
  "examples": [
    {
      "prompt": "say hello",
      "call": ""
    }
  ],
  "entrypoint": {
    "file": "handler.js",
    "params": {}
  },
  "imported": true
}

// handler.js
module.exports.runtime = {
  handler: async () => {
    return "Hello from plugin!";
  }
};
Originally created by @socir9 on GitHub (Nov 3, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2576 ### How are you running AnythingLLM? Docker (local) ### What happened? ### Description Custom plugins are not working with the codegeex4 model from Ollama. The agent attempts to call the plugin but always returns "Will assume chat completion without tool call inputs" response. ### Environment - AnythingLLM version: v1.6.8 - OS: Windows - Model: codegeex4:latest (Ollama) - Deployment: Docker ### Current Behavior When trying to use any custom plugin, the system responds with: [debug]: @agent is attempting to call plugin-name tool [AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack. [AgentLLM - codegeex4:latest] Will assume chat completion without tool call inputs. ### Are there known steps to reproduce? ### Expected Behavior The plugin should be called and executed successfully. ### Steps to Reproduce 1. Create a simple custom plugin: ```javascript // plugin.json { "active": true, "hubId": "hello-plugin", "name": "Hello Plugin", "schema": "skill-1.0.0", "version": "1.0.0", "description": "Basic hello world plugin", "setup_args": {}, "examples": [ { "prompt": "say hello", "call": "" } ], "entrypoint": { "file": "handler.js", "params": {} }, "imported": true } // handler.js module.exports.runtime = { handler: async () => { return "Hello from plugin!"; } };
yindo added the possible bug label 2026-02-22 18:25:58 -05:00
yindo closed this issue 2026-02-22 18:25:59 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 4, 2024):

[debug]: https://github.com/agent is attempting to call plugin-name tool
[AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack.
[AgentLLM - codegeex4:latest] Will assume chat completion without tool call inputs.

In the debug: is attempting to call plugin-name tool which means the agent did call the plugin and it did not appear to fail. All it did was return Hello from plugin! as a tool response. So there is little to do with that tool or information to return.

Then for custom plugins we prevent runaway recursive tool calls with the Deduplicator since some LLMs will keep calling

[AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack. is that debug log telling you that.

So the plugin is working, the LLM is just not using the tool call response for anything because it is either not relevant to the prompt or just doesn't think it is helpful to the prompt to repeat.

If you want to confirm this, add an introspect above your return to know it was called.
this.introspect("I am in my custom plugin!")

This will show in the chat as a thought

@timothycarambat commented on GitHub (Nov 4, 2024): ``` [debug]: https://github.com/agent is attempting to call plugin-name tool [AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack. [AgentLLM - codegeex4:latest] Will assume chat completion without tool call inputs. ``` In the debug: ` is attempting to call plugin-name tool` which means the agent did call the plugin and it did not appear to fail. All it did was return `Hello from plugin!` as a tool response. So there is little to do with that tool or information to return. Then for custom plugins we prevent runaway recursive tool calls with the [Deduplicator](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/utils/dedupe.js) since some LLMs will keep calling `[AgentLLM - codegeex4:latest] Function tool with exact arguments has already been called this stack.` is that debug log telling you that. So the plugin is working, the LLM is just not using the tool call response for anything because it is either not relevant to the prompt or just doesn't think it is helpful to the prompt to repeat. If you want to confirm this, add an `introspect` above your return to know it was called. `this.introspect("I am in my custom plugin!")` This will show in the chat as a thought
yindo changed title from [BUG]: Custom plugins not working with codegeex4 model to [GH-ISSUE #2576] [BUG]: Custom plugins not working with codegeex4 model 2026-06-05 14:42:03 -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#1671