fix: overhaul default model settings across workflow apps and tools - #6843
Merged
shaohuzhang1 merged 1 commit intoSep 1, 2026
Hidden character warning
The head ref may contain hidden characters: "pr@v2@fix_workflow\u2011global\u2011model\u2011switch"
Merged
Conversation
One combined change set covering default-model configuration for workflow applications and tools, from Persistence/execution correctness through the panel UI and per-category parameter dialog. Bugs and issues fixed: - [Copy app] Copying a workflow application dropped its default model configuration: the WorkflowRequest serializer neither declared nor mapped default_model_setting, so DRF silently discarded it and the copy had empty dropdowns in the default-model settings panel. - [Copy tool] Copying a workflow tool lost its default model settings: tool creation (ToolSerializer.Create.insert) built the ToolWorkflow row with only work_flow. default_model_setting is now passed through so the copy keeps it. - [Execution] A node in "default" model mode kept running the last configured model after that default was cleared: base step-node impls left stale node_data.model_id. They now always resolve model_id from default_model_setting in "default" mode (None when unconfigured) so debug fails fast with the existing empty-model error, matching publish-time validation across all 13 affected step nodes. - [Panel staging] Default-model-setting panel: closing without save let nodes pick up non-persisted config and debug still succeeded. Edits are now staged locally and committed only on save, with an unsaved-changes confirm (save/discard/cancel) on close; panel mounts via v-if so its click-outside listener is not live while collapsed. - [Publish highlight] Missing default model blocks publish validation but the offending problem node was not highlighted on the canvas; it is now located and highlighted when publish validation fails. - [Long-term memory] Long-term memory AI model config field position did not match the prototype; repositioned to match. - [Save button] Default-model-settings save button stayed enabled with nothing changed; now disabled when there are no unstaged modifications. - [Readonly] Read-only users could not see/open the default-model settings at all (button gated on edit-level permission). Re-gated on read-level (debug/read) and the panel is view-only for them (model select, param button, apply-to-all, save disabled; hasChanges always false). - [Reranker] Parameter-settings button in the default-model panel was enabled for RERANKER, which has no parameter form; disabled for that category. - [Param dialog flash] Opening a model's parameter config flashed the previous category's content (~1s) before the correct one: AIModeParamSettingDialog reused the prior model_form_field on a destroy-on-close remount. Fields are now cleared before the dialog shows, and the body is wrapped in a v-loading mask covering the async getModelParamsForm window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One combined fix set covering default-model configuration for workflow applications and tools — from persistence/execution correctness through the panel UI and per-category parameter dialog.
This PR squashes 8 prior commits into one and includes fixes for the following bugs/issues:
Data loss — copy operations
WorkflowRequestserializer neither declared nor mappeddefault_model_setting, so DRF silently discarded it and the copy had empty dropdowns in the default-model settings panel.ToolSerializer.Create.insert) built theToolWorkflowrow with onlywork_flow.default_model_settingis now passed through so the copy keeps it.Missing-default execution
node_data.model_id. They now always resolvemodel_idfromdefault_model_settingin "default" mode (Nonewhen unconfigured), so debug fails fast with the existing empty-model error, matching publish-time validation — across all affected step nodes.Panel behavior (
default-model-setting)v-ifso its click-outside listener is not live while collapsed.hasChangesalways false).RERANKER, which has no parameter form; now disabled for that category.Param dialog flash (
AIModeParamSettingDialog)model_form_fieldon adestroy-on-closeremount, soDynamicsFormrendered the last category's params until the asyncgetModelParamsFormresolved. Fields are now cleared before the dialog shows, and the body is wrapped in av-loadingmask covering the async window.Files
application.py,tool.py, locales.default-model-setting/index.vue,AIModeParamSettingDialog.vue, workflow views,validate.ts, nodes.