fix: make sure to keep table outputs when changing provider (#11426)

* fix: make sure to keep table outputs when changing provider

* [autofix.ci] apply automated fixes

* fix: enable real-time refresh for Else output option in SmartRouterComponent

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
This commit is contained in:
Viktor Avelino
2026-01-28 09:11:37 -05:00
committed by GitHub
parent 4b056b4a4b
commit ddac7ea3ed
3 changed files with 7 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -1176,7 +1176,7 @@
},
"SmartRouter": {
"versions": {
"0.3.0": "9c6736e784f6"
"0.3.0": "2b49dc46dae8"
}
},
"LLMSelectorComponent": {

View File

@ -117,6 +117,7 @@ class SmartRouterComponent(Component):
info="Include an Else output for cases that don't match any route.",
value=False,
advanced=True,
real_time_refresh=True,
),
MultilineInput(
name="custom_prompt",
@ -145,7 +146,7 @@ class SmartRouterComponent(Component):
def update_outputs(self, frontend_node: dict, field_name: str, field_value: Any) -> dict:
"""Create a dynamic output for each category in the categories table."""
if field_name in {"routes", "enable_else_output"}:
if field_name in {"routes", "enable_else_output", "model"}:
frontend_node["outputs"] = []
# Get the routes data - either from field_value (if routes field) or from component state