Error creating agent “unmarshal json failed: use_template enable_thinking not found” #20256

Closed
opened 2026-02-21 20:06:30 -05:00 by yindo · 5 comments
Owner

Originally created by @yangbig730 on GitHub (Nov 11, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

api-1 | 2025-11-11 18:31:52.479 ERROR [Dummy-5052] [base.py:271] - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"error_type\":\"unmarshal_error\",\"message\":\"unmarshal json failed: use_template enable_thinking not found\"}","error_type":"PluginInvokeError","args":null}', 'data': None}

Image

✔️ Expected Behavior

Fix agent creation error

Actual Behavior

Image
Originally created by @yangbig730 on GitHub (Nov 11, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.2 ### Cloud or Self Hosted Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce api-1 | 2025-11-11 18:31:52.479 ERROR [Dummy-5052] [base.py:271] - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"error_type\\":\\"unmarshal_error\\",\\"message\\":\\"unmarshal json failed: use_template enable_thinking not found\\"}","error_type":"PluginInvokeError","args":null}', 'data': None} <img width="443" height="182" alt="Image" src="https://github.com/user-attachments/assets/1003da6e-1108-4859-937c-70e8beb1b89c" /> ### ✔️ Expected Behavior Fix agent creation error ### ❌ Actual Behavior <img width="443" height="182" alt="Image" src="https://github.com/user-attachments/assets/a2df2561-d83f-44d7-90e1-d4c6ecc278fd" />
yindo added the 🐞 bug🌚 invalid labels 2026-02-21 20:06:30 -05:00
yindo closed this issue 2026-02-21 20:06:30 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 11, 2025):

This error happens because Dify expects certain fields—specifically use_template and enable_thinking—in the plugin or custom model schema when creating agents, especially in "Enhancing Agent" mode. If these fields are missing from your plugin's manifest or the model's configuration, the backend can't parse the response and throws this error.

To resolve it, check your plugin or custom model configuration and make sure it includes all required fields, including use_template and enable_thinking. If you're using a custom plugin or model, update its manifest/schema to match Dify's expected structure. If you switch to a different agent mode (not "Enhancing Agent"), the error may not appear, but the root cause is still the missing fields in the schema.

If you want the frontend to show these errors more clearly, you may need to update the frontend logic to display error fields from the backend stream events, but the main fix is ensuring your plugin/model config is complete and matches Dify's requirements. For more details and context, see the discussion and issue tracking this problem:
Relevant GitHub issue
Another report of the same error

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 11, 2025): <!-- Answer --> This error happens because Dify expects certain fields—specifically `use_template` and `enable_thinking`—in the plugin or custom model schema when creating agents, especially in "Enhancing Agent" mode. If these fields are missing from your plugin's manifest or the model's configuration, the backend can't parse the response and throws this error. To resolve it, check your plugin or custom model configuration and make sure it includes all required fields, including `use_template` and `enable_thinking`. If you're using a custom plugin or model, update its manifest/schema to match Dify's expected structure. If you switch to a different agent mode (not "Enhancing Agent"), the error may not appear, but the root cause is still the missing fields in the schema. If you want the frontend to show these errors more clearly, you may need to update the frontend logic to display error fields from the backend stream events, but the main fix is ensuring your plugin/model config is complete and matches Dify's requirements. For more details and context, see the discussion and issue tracking this problem: [Relevant GitHub issue](https://github.com/langgenius/dify/issues/26759) [Another report of the same error](https://github.com/langgenius/dify/issues/27681) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/16aa2573-49cd-4a77-bcce-d32f13c8df54?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28085)
Author
Owner

@yangbig730 commented on GitHub (Nov 11, 2025):

@dosu I encountered an error right after creating it. There were no other steps involved; the process was: create a blank application -- agent -- create -- error.

@yangbig730 commented on GitHub (Nov 11, 2025): @dosu I encountered an error right after creating it. There were no other steps involved; the process was: create a blank application -- agent -- create -- error.
Author
Owner

@yangbig730 commented on GitHub (Nov 11, 2025):

workflows and chatflows can be created; chat assistants, agents, and text generation applications all fail.

@yangbig730 commented on GitHub (Nov 11, 2025): workflows and chatflows can be created; chat assistants, agents, and text generation applications all fail.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 11, 2025):

This is a known bug in Dify 1.9.2, especially in self-hosted Docker setups. The error happens because the agent creation flow expects certain fields—like use_template and enable_thinking—in the agent or plugin schema, but they're missing even for blank agents. This isn't a misconfiguration on your part; it's an issue with the default agent creation workflow in this version. The problem is being tracked and discussed by others as well (see here).

Currently, there isn't an official workaround or patch available. If you need to proceed urgently, you could try downgrading to a previous version where this bug doesn't occur, or keep an eye on the linked issue for updates or hotfixes.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 11, 2025): <!-- Answer --> This is a known bug in Dify 1.9.2, especially in self-hosted Docker setups. The error happens because the agent creation flow expects certain fields—like use_template and enable_thinking—in the agent or plugin schema, but they're missing even for blank agents. This isn't a misconfiguration on your part; it's an issue with the default agent creation workflow in this version. The problem is being tracked and discussed by others as well ([see here](https://github.com/langgenius/dify/issues/27681)). Currently, there isn't an official workaround or patch available. If you need to proceed urgently, you could try downgrading to a previous version where this bug doesn't occur, or keep an eye on the linked issue for updates or hotfixes. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/dfcf9930-1344-48ce-b414-af36f61f796d?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28085)
Author
Owner

@crazywoola commented on GitHub (Nov 11, 2025):

For plugin related question, please follow the issue template when you try to open it. The plugin's name are required. Those information are not relevant to investigate.

@crazywoola commented on GitHub (Nov 11, 2025): For plugin related question, please follow the issue template when you try to open it. The plugin's name are required. Those information are not relevant to investigate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20256