Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
config fixes
  • Loading branch information
Rishi authored and Rishi committed Nov 10, 2025
commit ec7148ef8775adf62cfe54c475dedf5bb02f16f5
26 changes: 26 additions & 0 deletions src/backend/base/langflow/spec_flow_builder/config_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,32 @@ def _apply_config_to_node(self, node: Dict[str, Any], yaml_component: Dict[str,
# Set the value in the template
field["value"] = converted_value

# Mark as user-configured to prevent component updates from overwriting
field["user_configured"] = True
field["configured_from_spec"] = True

# Special handling for DropdownInput to preserve dropdown properties
if input_type == "DropdownInput":
# The template already contains options, options_metadata, combobox, etc.
# We only update the value, keeping all other dropdown properties intact

# Optional: Validate that the configured value is valid for this dropdown
options = field.get("options", [])
is_combobox = field.get("combobox", False)

# Only validate if options exist and combobox is disabled (strict dropdown)
if options and not is_combobox and converted_value not in options:
logger.warning(
f"Value '{converted_value}' for '{config_key}' in component '{component_id}' "
f"is not in the available options: {options}. "
f"This may cause issues unless combobox mode is enabled."
)

logger.debug(
f"Preserved dropdown properties for '{config_key}': "
f"options={len(options)} items, combobox={is_combobox}"
)

# Set advanced to false for any field configured in YAML
if "advanced" in field:
field["advanced"] = False
Expand Down