mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Unable to add a select dropdown in the Agent-Strategies YAML [parameters] #771
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @XUANYUANRuins on GitHub (Nov 2, 2025).
Self Checks
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:

step6:
@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
optionsfield for a select dropdown is a list of objects withvalueandlabelkeys (wherelabelcan be localized), and thedefaultvalue 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
optionsfield 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 removeoptions, 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:
Make sure the
defaultvalue matches one of the strings inoptions. 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
defaultvalue 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

@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
@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:
Next Steps:
Thank you for your understanding and contribution!