Unable to add a select dropdown in the Agent-Strategies YAML [parameters] #771

Closed
opened 2026-02-16 10:20:27 -05:00 by yindo · 3 comments
Owner

Originally created by @XUANYUANRuins on GitHub (Nov 2, 2025).

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 Dify issues & Dify Official Plugins, 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

1.7.1

Plugin version

0.2.0-local

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

step 1: add a [select]
step 2 : start plugin
step3: create a workflow and add a Agent Node,then select my plugin
step4: error
step5: remove the [options] of select
step6: normal to show,but no item to select

✔️ Error log

step4:
Image

step6:

Image
Originally created by @XUANYUANRuins on GitHub (Nov 2, 2025). ### 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 1.7.1 ### Plugin version 0.2.0-local ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce step 1: add a [select] step 2 : start plugin step3: create a workflow and add a Agent Node,then select my plugin step4: error step5: remove the [options] of select step6: normal to show,but no item to select ### ✔️ Error log step4: <img width="1315" height="435" alt="Image" src="https://github.com/user-attachments/assets/b343efa8-3a20-4b93-867f-dfc9ebbc9535" /> step6: <img width="2987" height="490" alt="Image" src="https://github.com/user-attachments/assets/d4127390-aaf5-4ecb-8709-e54945a40fc7" />
yindo added the bug label 2026-02-16 10:20:27 -05:00
yindo closed this issue 2026-02-16 10:20:27 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 2, 2025):

Dify supports select dropdowns in YAML parameters, but there are important differences between how plugins and agent strategies handle them. For plugins, the options field for a select dropdown is a list of objects with value and label keys (where label can be localized), and the default value must match one of the option values. This structure works for plugin YAMLs and is shown in recent plugin PRs (example).

However, for agent strategies, the codebase expects the options field to be a list of strings, not objects. If you use the plugin-style object structure in an agent strategy YAML, it will likely cause a validation or rendering error. If you remove options, the dropdown renders but has no items, which matches what you observed.

To define a select dropdown in an agent strategy YAML, use this structure:

parameters:
  my_select:
    type: select
    label: Choose an option
    options:
      - option1
      - option2
      - option3
    default: option1

Make sure the default value matches one of the strings in options. Avoid using the object structure (value/label) in agent strategies, as that is only supported for plugins. If you need localized labels or more advanced dropdowns, this may not be supported yet for agent strategies.

If you follow this structure and still see errors, double-check that your YAML is valid and that the default value exactly matches one of the options. If you need dynamic options or localization, those features are currently only available for plugin parameters, not agent strategies.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 2, 2025): <!-- Answer --> Dify supports select dropdowns in YAML parameters, but there are important differences between how plugins and agent strategies handle them. For plugins, the `options` field for a select dropdown is a list of objects with `value` and `label` keys (where `label` can be localized), and the `default` value must match one of the option values. This structure works for plugin YAMLs and is shown in recent plugin PRs ([example](https://github.com/langgenius/dify-official-plugins/pull/1808)). However, for agent strategies, the codebase expects the `options` field to be a list of strings, not objects. If you use the plugin-style object structure in an agent strategy YAML, it will likely cause a validation or rendering error. If you remove `options`, the dropdown renders but has no items, which matches what you observed. To define a select dropdown in an agent strategy YAML, use this structure: ```yaml parameters: my_select: type: select label: Choose an option options: - option1 - option2 - option3 default: option1 ``` Make sure the `default` value matches one of the strings in `options`. Avoid using the object structure (`value`/`label`) in agent strategies, as that is only supported for plugins. If you need localized labels or more advanced dropdowns, this may not be supported yet for agent strategies. If you follow this structure and still see errors, double-check that your YAML is valid and that the `default` value exactly matches one of the options. If you need dynamic options or localization, those features are currently only available for plugin parameters, not agent strategies. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0e65f0e6-ebb6-44df-86cf-6e3a07f3069d?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1987)
Author
Owner

@XUANYUANRuins commented on GitHub (Nov 5, 2025):

The incorrect line of code is at:
app/components/header/account-setting/model-provider-page/model-modal/Form.tsx:254:34

@XUANYUANRuins commented on GitHub (Nov 5, 2025): The incorrect line of code is at: app/components/header/account-setting/model-provider-page/model-modal/Form.tsx:254:34
Author
Owner

@dosubot[bot] commented on GitHub (Nov 21, 2025):

Hi, @XUANYUANRuins. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an error in Dify 1.7.1 related to adding a select dropdown with options in Agent-Strategies YAML.
  • The error caused plugin startup and workflow selection failures.
  • It was clarified that agent strategies require the options field to be a list of strings, not objects with value/label pairs.
  • A correct YAML example was provided to resolve the issue.
  • You also pointed out a specific problematic line in the frontend component Form.tsx at line 254.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 21, 2025): Hi, @XUANYUANRuins. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported an error in Dify 1.7.1 related to adding a select dropdown with options in Agent-Strategies YAML. - The error caused plugin startup and workflow selection failures. - It was clarified that agent strategies require the options field to be a list of strings, not objects with value/label pairs. - A correct YAML example was provided to resolve the issue. - You also pointed out a specific problematic line in the frontend component Form.tsx at line 254. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#771