ImportError: cannot import name 'ChatStreamRequestToolResultsItem' from 'cohere' #203

Closed
opened 2026-02-16 10:18:26 -05:00 by yindo · 2 comments
Owner

Originally created by @edagarli on GitHub (Apr 17, 2025).

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 search for existing issues, 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.2.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

ImportError: cannot import name 'ChatStreamRequestToolResultsItem' from 'cohere' (/Users/edagarli_1/Library/Caches/pypoetry/virtualenvs/dify-api-YdOqIlwS-py3.12/lib/python3.12/site-packages/cohere/__init__.py). Did you mean: 'V2ChatStreamRequestDocumentsItem'?

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @edagarli on GitHub (Apr 17, 2025). ### 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 [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 (我已阅读并同意 [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.2.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ImportError: cannot import name 'ChatStreamRequestToolResultsItem' from 'cohere' (/Users/edagarli_1/Library/Caches/pypoetry/virtualenvs/dify-api-YdOqIlwS-py3.12/lib/python3.12/site-packages/cohere/__init__.py). Did you mean: 'V2ChatStreamRequestDocumentsItem'? ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:26 -05:00
Author
Owner

@rupert-lee commented on GitHub (Apr 21, 2025):

use cohere==5.2.6

@rupert-lee commented on GitHub (Apr 21, 2025): use cohere==5.2.6
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @edagarli. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You encountered an ImportError in Dify v1.2.0 related to importing ChatStreamRequestToolResultsItem from the cohere package.
  • The problem was identified as a version compatibility issue between Dify and the cohere package.
  • Maintainer rupert-lee recommended using cohere version 5.2.6 to fix the ImportError.
  • The issue was resolved by switching to cohere version 5.2.6.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @edagarli. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You encountered an ImportError in Dify v1.2.0 related to importing `ChatStreamRequestToolResultsItem` from the cohere package. - The problem was identified as a version compatibility issue between Dify and the cohere package. - Maintainer rupert-lee recommended using cohere version 5.2.6 to fix the ImportError. - The issue was resolved by switching to cohere version 5.2.6. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#203