[Bug] PromptMessageContent fields is not align/missing field with Dify core and plugin #201

Closed
opened 2026-02-16 00:20:28 -05:00 by yindo · 2 comments
Owner

Originally created by @AlexChim1231 on GitHub (Oct 17, 2025).

Originally assigned to: @laipz8200 on GitHub.

This issue cause by Dify Core invoke llm to Dify Plugin.

In Dify Core PluginModelClient.invoke_llm, the prompt_messages in request body is list[PromptMessage], the PromptMessage was inherit from MultiModalPromptMessageContent, which should contain filename

In Dify Plugin PluginExecutor.invoke_llm, the data .content is also MultiModalPromptMessageContent

However, the request between Dify core and Dify plugin will in Dify plugin daemon with post processing
content from Dify core request body

"content": [
          {
            "type": "document",
            "format": "csv",
            "base64_data": "file base 64 string here",
            "url": "",
            "mime_type": "text/csv",
            "filename": "Errors.csv"
          }
        ],

content from Dify plugin daemon request body

"content": [
        {
          "type": "document",
          "base64_data":"file base 64 string here",
          "url": "",
          "data": "",
          "encode_format": "",
          "format": "csv",
          "mime_type": "text/csv",
          "detail": ""
        }
      ],

Possible related code
https://github.com/langgenius/dify-plugin-daemon/blob/a386efd44672dfcb7f538ea2c7cb666d89ec6a98/pkg/entities/model_entities/llm.go#L100-L109

related issue:

  1. issue 1
  2. issue 2
Originally created by @AlexChim1231 on GitHub (Oct 17, 2025). Originally assigned to: @laipz8200 on GitHub. This issue cause by Dify Core invoke llm to Dify Plugin. In Dify Core `PluginModelClient`.`invoke_llm`, the `prompt_messages` in request body is `list[PromptMessage]`, the PromptMessage was inherit from `MultiModalPromptMessageContent`, which should contain `filename` In Dify Plugin `PluginExecutor`.`invoke_llm`, the `data` .`content` is also `MultiModalPromptMessageContent` However, the request between Dify core and Dify plugin will in Dify plugin daemon with post processing content from Dify core request body ```json "content": [ { "type": "document", "format": "csv", "base64_data": "file base 64 string here", "url": "", "mime_type": "text/csv", "filename": "Errors.csv" } ], ``` content from Dify plugin daemon request body ```json "content": [ { "type": "document", "base64_data":"file base 64 string here", "url": "", "data": "", "encode_format": "", "format": "csv", "mime_type": "text/csv", "detail": "" } ], ``` Possible related code https://github.com/langgenius/dify-plugin-daemon/blob/a386efd44672dfcb7f538ea2c7cb666d89ec6a98/pkg/entities/model_entities/llm.go#L100-L109 related issue: 1. [issue 1](https://github.com/langgenius/dify/issues/26544#issuecomment-3388455320) 2. [issue 2](https://github.com/langgenius/dify/issues/24762)
yindo closed this issue 2026-02-16 00:20:28 -05:00
Author
Owner

@AlexChim1231 commented on GitHub (Oct 17, 2025):

@laipz8200
Sorry for taggin you again, i guess i find the issue, can you please help me to fix this? thank you so much!

@AlexChim1231 commented on GitHub (Oct 17, 2025): @laipz8200 Sorry for taggin you again, i guess i find the issue, can you please help me to fix this? thank you so much!
Author
Owner

@laipz8200 commented on GitHub (Oct 17, 2025):

@AlexChim1231 Thank you for the mention, I will help track this issue.

@laipz8200 commented on GitHub (Oct 17, 2025): @AlexChim1231 Thank you for the mention, I will help track this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#201