Skip to content

dify plugin SDK missing BINARY_LINK MessageType #383

Closed

Description

@luyang93

Summary

Non-image blobs were transformed to BINARY_LINK by Dify core's message_transformer.py, but BINARY_LINK is not in the SDK's MessageType enum, causing a Pydantic validation crash in agent/chat mode.

Problem

Whem mcp server return BlobResourceContents, agent node which used mcp tool comes to an error.

tool invoke error: Failed to parse response: 1 validation error for ToolInvokeMessage
type
  Input should be 'text', 'file', 'blob', 'json', 'link', 'image', 'image_link', 'variable', 'blob_chunk', 'log' or 'retriever_resources' [type=enum, input_value='binary_link', input_type=str]
    For further information visit https://errors.pydantic.dev/2.13/v/enum

Reference

langgenius/dify-plugin-daemon#200

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions