mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[GH-ISSUE #17447] Prompt “Input Variables” modal forces every field to be required #33820
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 @spencerthayer on GitHub (Sep 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17447
Check Existing Issues
Installation Method
Docker
Open WebUI Version
Open WebUI ‧ v0.6.28
Ollama Version (if applicable)
NA
Operating System
Ubuntu 22.04
Browser (if applicable)
Chrome, Safari, Fire Fox, all of them.
Confirmation
README.md.Expected Behavior
Variables in Prompt “Input Variables” modal should be optional by default unless explicitly marked required, or there should be a way to declare
required=falsein the typed input syntax. The official docs for Prompts and variable types do not mention anyrequiredproperty, so creators reasonably expect that leaving fields blank is supported.requiredproperty. Authors cannot declare a field optional or required. The current behavior forces every variable to be required and contradicts the mental model established by the docs.Proposed Solutions
Any of the following would resolve the issue:
Add a typed-input property to control required status like
{{topic | text:placeholder="...", required=false}}Make fields optional by default and allow
required=truewhere authors need it.Remove the
requiredattribute from the generated inputs and let creators enforce required logic inside the prompt text, or via a future validation layer.Actual Behavior
The “Input Variables” modal enforces native HTML5 validation on all fields. Attempting to save with any empty field triggers the browser tooltip “Please fill out this field.” This occurs for
text,textarea,email,url, and other inputs. Supplyingdefault=""or even a zero-width space does not bypass validation. Select fields also require a non-empty selection. The UI indicates the required status visually on several fields. See attached screenshot showing the tooltip and “*required” indicators.No console errors are thrown at submit time because the block happens at the browser validation level before the form submits.
Steps to Reproduce
Command:
/optional_testPlease echo the values below. If any are empty, just omit the line.
/optional_testand trigger the prompt.Result: The modal blocks submission with the native tooltip “Please fill out this field.” The select cannot be left blank unless a visible non-empty option is chosen. The number input cannot be left blank. Replacing
numberwithtextstill blocks because the field is marked required by the modal. Settingdefault=""(zero-width space) does not change the behavior.Logs & Screenshots
Additional Information
NA
@spencerthayer commented on GitHub (Sep 14, 2025):
If this isn't a bug, and this is intentional, then I would please request that the official prompt documentation be updated to include this.
@rgaricano commented on GitHub (Sep 15, 2025):
Yes, required should be author setted mandatory,
maybe changing
requiredbyrequired={variables[variable]?.required ?? true}in all var input fields of https://github.com/open-webui/open-webui/blob/main/src/lib/components/chat/MessageInput/InputVariablesModal.svelte ?@tjbck commented on GitHub (Sep 15, 2025):
Addressed with d5824b1b495fcf86e57171769bcec2a0f698b070!