Add filename support to multi-modal prompt messages #57

Closed
opened 2026-02-15 21:15:29 -05:00 by yindo · 0 comments
Owner

Originally created by @laipz8200 on GitHub (Aug 29, 2025).

Feature Request

Description

Add support for preserving filename information in multi-modal prompt message content. This feature aligns with the implementation in the main Dify repository (PR #24777).

Motivation

Currently, when converting File objects to prompt messages in the SDK, the original filename information is lost. This makes it difficult for plugins to maintain file identity information throughout the processing pipeline, which can be important for:

  • Displaying original filenames to users
  • Maintaining file context in multi-modal workflows
  • Debugging and logging purposes
  • Consistency with the main Dify platform behavior

Expected Behavior

Multi-modal prompt message content (Image, Video, Audio, Document) should include an optional filename field that preserves the original filename when available. This field should:

  • Default to an empty string for backward compatibility
  • Be properly serialized and deserialized
  • Be available on all multi-modal content types

This enhancement will improve the SDK's ability to handle file metadata consistently with the main Dify platform.

Originally created by @laipz8200 on GitHub (Aug 29, 2025). ## Feature Request ### Description Add support for preserving filename information in multi-modal prompt message content. This feature aligns with the implementation in the main Dify repository (PR #24777). ### Motivation Currently, when converting File objects to prompt messages in the SDK, the original filename information is lost. This makes it difficult for plugins to maintain file identity information throughout the processing pipeline, which can be important for: - Displaying original filenames to users - Maintaining file context in multi-modal workflows - Debugging and logging purposes - Consistency with the main Dify platform behavior ### Expected Behavior Multi-modal prompt message content (Image, Video, Audio, Document) should include an optional `filename` field that preserves the original filename when available. This field should: - Default to an empty string for backward compatibility - Be properly serialized and deserialized - Be available on all multi-modal content types This enhancement will improve the SDK's ability to handle file metadata consistently with the main Dify platform.
yindo closed this issue 2026-02-15 21:15:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#57