mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
The official agent tool reports an error #378
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @z942588879 on GitHub (Jun 17, 2025).
Self Checks
Dify version
1.4.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
Normal output
❌ Actual Behavior
Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"AttributeError","message":"'AgentRuntime' object has no attribute 'model'"}
@dosubot[bot] commented on GitHub (Jun 17, 2025):
This error happens because the agent runner classes in Dify (like BaseAgentRunner, CotAgentRunner, FunctionCallAgentRunner) do not have a direct model attribute. Instead, the model is accessed via model_instance.model or model_config.model. If a plugin or tool expects agent.model, it will trigger this AttributeError.
To fix this, update the code that expects agent.model to use agent.model_instance.model instead. Alternatively, you can add a property named model to the relevant agent runner class that returns self.model_instance.model. This will make the attribute available as expected by the plugin or tool code. The plugin error reporting just forwards this error; it doesn't cause it itself.
There is no AgentRuntime class in the Dify codebase, so the error is likely due to an interface mismatch between your plugin/tool and the agent runner implementation.
See supporting code references.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@hxt365 commented on GitHub (Jun 18, 2025):
I have the same issue. The latest version of the Agent plugin is broken
@FocusProgram commented on GitHub (Jun 19, 2025):
Downgrade the version of the dify agent plugin to version 0.0.15 which is temporarily available.
@dosubot[bot] commented on GitHub (Aug 20, 2025):
Hi, @z942588879. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
model_instance.modelor add a model property to the class.Next Steps:
Thank you for your understanding and contribution!