kimi k2.5 error #960

Closed
opened 2026-02-16 10:21:07 -05:00 by yindo · 1 comment
Owner

Originally created by @leslie2046 on GitHub (Jan 30, 2026).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.4

Plugin version

0.1.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

✔️ Error log

2026-01-30 17:41:55.356 ERROR [Thread-111953 (_generate_worker)] [base.py:305] 5db29c4afe435c168479233db823fa38 - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"args\":{\"description\":\"[models] Error: API request failed with status code 400: {\\\"error\\\":{\\\"message\\\":\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 2\\\",\\\"type\\\":\\\"invalid_request_error\\\"}}\"},\"error_type\":\"InvokeError\",\"message\":\"[models] Error: API request failed with status code 400: {\\\"error\\\":{\\\"message\\\":\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 2\\\",\\\"type\\\":\\\"invalid_request_error\\\"}}\"}","error_type":"PluginInvokeError","args":null}', 'data': None}

Originally created by @leslie2046 on GitHub (Jan 30, 2026). ### Self Checks - [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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.4 ### Plugin version 0.1.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="1164" height="861" alt="Image" src="https://github.com/user-attachments/assets/0c08cd20-323d-4116-9da4-f92f4af6cd8e" /> ### ✔️ Error log 2026-01-30 17:41:55.356 ERROR [Thread-111953 (_generate_worker)] [base.py:305] 5db29c4afe435c168479233db823fa38 - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{\\"description\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 2\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"},\\"error_type\\":\\"InvokeError\\",\\"message\\":\\"[models] Error: API request failed with status code 400: {\\\\\\"error\\\\\\":{\\\\\\"message\\\\\\":\\\\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 2\\\\\\",\\\\\\"type\\\\\\":\\\\\\"invalid_request_error\\\\\\"}}\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
yindo added the bug label 2026-02-16 10:21:07 -05:00
yindo closed this issue 2026-02-16 10:21:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 30, 2026):

This error happens because the kimi k2.5 (and similar "thinking mode" models) require a reasoning_content field in assistant messages during tool calls. Older plugin versions—including 0.1.0—don't extract or include this field, which triggers the 400 error you’re seeing. This isn't a configuration issue; it's a gap in the plugin's implementation.

A fix was merged in the dify-official-plugins repo (PR #2298, Dec 2025) that extracts reasoning content from ... blocks and includes it as reasoning_content in the API request. To resolve the error, upgrade your dify-official-plugins to at least version 0.0.37 or later, where this patch is present. The Dify core platform also received a related fix (PR #30083, Jan 2026) to ensure reasoning_content is handled correctly [details](https://github.com/langgenius/dify-official-plugins/pull/2298) [core fix](https://github.com/langgenius/dify/pull/30083).

If you can't upgrade, you would need to patch the plugin code to extract reasoning_content from tags and include it in the assistant tool call message. There are no runtime flags or config changes that can bypass this; it requires a code update.

Let me know if you need help with the patching process or want more details on where to apply the fix.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 30, 2026): <!-- Answer --> This error happens because the kimi k2.5 (and similar "thinking mode" models) require a reasoning_content field in assistant messages during tool calls. Older plugin versions—including 0.1.0—don't extract or include this field, which triggers the 400 error you’re seeing. This isn't a configuration issue; it's a gap in the plugin's implementation. A fix was merged in the dify-official-plugins repo (PR #2298, Dec 2025) that extracts reasoning content from <think>...</think> blocks and includes it as reasoning_content in the API request. To resolve the error, upgrade your dify-official-plugins to at least version 0.0.37 or later, where this patch is present. The Dify core platform also received a related fix (PR #30083, Jan 2026) to ensure reasoning_content is handled correctly [[details](https://github.com/langgenius/dify-official-plugins/pull/2298)](https://github.com/langgenius/dify-official-plugins/pull/2298) [[core fix](https://github.com/langgenius/dify/pull/30083)](https://github.com/langgenius/dify/pull/30083). If you can't upgrade, you would need to patch the plugin code to extract reasoning_content from <think> tags and include it in the assistant tool call message. There are no runtime flags or config changes that can bypass this; it requires a code update. Let me know if you need help with the patching process or want more details on where to apply the fix. <!-- 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/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7e7c3e43-405d-415e-94af-c8d55a81938e?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20error%20happens%20because%20the%20kimi%20k2.5%20%28and%20similar%20%22thinking%20mode%22%20models%29%20require%20a%20reasoning_content%20field%20in%20assistant%20messages%20during%20tool%20calls.%20Older%20plugin%20versions%E2%80%94including%200.1.0%E2%80%94don%27t%20extract%20or%20include%20this%20field%2C%20which%20triggers%20the%20400%20error%20you%E2%80%99re%20seeing.%20This%20isn%27t%20a%20configuration%20issue%3B%20it%27s%20a%20gap%20in%20the%20plugin%27s%20implementation.%0A%0AA%20fix%20was%20merged%20in%20the%20dify-official-plugins%20repo%20%28PR%20%232298%2C%20Dec%202025%29%20that%20extracts%20reasoning%20content%20from%20%3Cthink%3E...%3C/think%3E%20blocks%20and%20includes%20it%20as%20reasoning_content%20in%20the%20API%20request.%20To%20resolve%20the%20error%2C%20upgrade%20your%20dify-official-plugins%20to%20at%20least%20version%200.0.37%20or%20later%2C%20where%20this%20patch%20is%20present.%20The%20Dify%20core%20platform%20also%20received%20a%20related%20fix%20%28PR%20%2330083%2C%20Jan%202026%29%20to%20ensure%20reasoning_content%20is%20handled%20correctly%20%5B%5Bdetails%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2298%29%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2298%29%20%5B%5Bcore%20fix%5D%28https%3A//github.com/langgenius/dify/pull/30083%29%5D%28https%3A//github.com/langgenius/dify/pull/30083%29.%0A%0AIf%20you%20can%27t%20upgrade%2C%20you%20would%20need%20to%20patch%20the%20plugin%20code%20to%20extract%20reasoning_content%20from%20%3Cthink%3E%20tags%20and%20include%20it%20in%20the%20assistant%20tool%20call%20message.%20There%20are%20no%20runtime%20flags%20or%20config%20changes%20that%20can%20bypass%20this%3B%20it%20requires%20a%20code%20update.%0A%0ALet%20me%20know%20if%20you%20need%20help%20with%20the%20patching%20process%20or%20want%20more%20details%20on%20where%20to%20apply%20the%20fix.)&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-official-plugins/issues/2523)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#960