"the parent_meesage_id is not valid uuid" while doing multi model compaire test #6986

Closed
opened 2026-02-21 18:18:15 -05:00 by yindo · 2 comments
Owner

Originally created by @IceNiro on GitHub (Nov 28, 2024).

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

0.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

We encountered an error when doing a multi-model test on the web debug and preview page.

image
image

We notice that when the opening statement setting is not present in the agent config, it is just fine, but an error occurs with the opening statement.
With the error message shows up, the request parameter: parent_message_id is different, it requires a UUID string but looks like receive a timestamp number sequence when an error encountered

✔️ Expected Behavior

the multi-model test can run normally

Actual Behavior

encounter an exception

Originally created by @IceNiro on GitHub (Nov 28, 2024). ### 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 0.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce We encountered an error when doing a multi-model test on the web debug and preview page. ![image](https://github.com/user-attachments/assets/8e593d0e-abe7-4dd2-b724-a78bdd19d14c) <img width="1206" alt="image" src="https://github.com/user-attachments/assets/958f2757-a095-4cbf-be98-13b9bb2598ab"> We notice that when the opening statement setting is not present in the agent config, it is just fine, but an error occurs with the opening statement. With the error message shows up, the request parameter: parent_message_id is different, it requires a UUID string but looks like receive a timestamp number sequence when an error encountered ### ✔️ Expected Behavior the multi-model test can run normally ### ❌ Actual Behavior encounter an exception
yindo added the 🐞 bug label 2026-02-21 18:18:15 -05:00
yindo closed this issue 2026-02-21 18:18:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 28, 2024):

The error you're encountering seems to be related to the parent_message_id not being a valid UUID during a multi-model comparison test. This issue arises when an opening statement is present in the agent configuration, which seems to cause the parent_message_id to be generated as a timestamp instead of a UUID.

To address this, you should ensure that the parent_message_id is always generated as a UUID, even when an opening statement is present. The _safe_parse_uuid method in the Dify codebase is designed to handle invalid UUIDs by returning None if the input is not a valid UUID [1]. This method could be useful in identifying and handling cases where the parent_message_id is not correctly formatted.

You might want to check the part of the code where the parent_message_id is assigned when an opening statement is configured, to ensure it adheres to the expected UUID format. If the issue persists, reviewing the logic that handles the opening statements in the agent configuration could provide further insights into why a timestamp is being used instead of a UUID.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 28, 2024): <!-- Answer --> The error you're encountering seems to be related to the `parent_message_id` not being a valid UUID during a multi-model comparison test. This issue arises when an opening statement is present in the agent configuration, which seems to cause the `parent_message_id` to be generated as a timestamp instead of a UUID. To address this, you should ensure that the `parent_message_id` is always generated as a UUID, even when an opening statement is present. The `_safe_parse_uuid` method in the Dify codebase is designed to handle invalid UUIDs by returning `None` if the input is not a valid UUID <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/services/workflow_app_service.py)</sup>. This method could be useful in identifying and handling cases where the `parent_message_id` is not correctly formatted. You might want to check the part of the code where the `parent_message_id` is assigned when an opening statement is configured, to ensure it adheres to the expected UUID format. If the issue persists, reviewing the logic that handles the opening statements in the agent configuration could provide further insights into why a timestamp is being used instead of a UUID. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 29, 2024):

Please upgrade to latest version. This should been resolved in later version.

@crazywoola commented on GitHub (Nov 29, 2024): Please upgrade to latest version. This should been resolved in later version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6986