Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/dify_plugin/entities/provider_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class CommonParameterType(Enum):
OBJECT = "object"
ARRAY = "array"
DYNAMIC_SELECT = "dynamic-select"
DATE = "date"
DATE_PICKER = "date-picker"
Comment on lines +41 to +42
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new DATE and DATE_PICKER types are added to CommonParameterType but are not included in the ProviderConfig.Config inner enum (lines 90-98). This omission prevents these types from being used in provider credentials or configuration schemas. For full consistency as a "Common" type, they should be exposed there as well.



@docs(
Expand Down
2 changes: 2 additions & 0 deletions src/dify_plugin/entities/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class ToolParameterType(StrEnum):
OBJECT = CommonParameterType.OBJECT.value
ARRAY = CommonParameterType.ARRAY.value
DYNAMIC_SELECT = CommonParameterType.DYNAMIC_SELECT.value
DATE = CommonParameterType.DATE.value
DATE_PICKER = CommonParameterType.DATE_PICKER.value
Comment on lines +90 to +91
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Adding DATE and DATE_PICKER to ToolParameterType without updating the translation logic in ToolSelector.to_prompt_message (lines 361-375) will cause issues with LLM tool calling. Most LLM providers (e.g., OpenAI) do not support "date" or "date-picker" as valid JSON Schema types. These should ideally be mapped to "string" (potentially with a "format": "date") when generating the schema for the LLM.


class ToolParameterForm(Enum):
SCHEMA = "schema" # should be set while adding tool
Expand Down