File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
frontend/app/[locale]/agents/components/agentInfo Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,13 @@ export default function AgentGenerateDetail({
239239 setBusinessInfo ( initialBusinessInfo ) ;
240240
241241 form . setFieldsValue ( initialAgentInfo ) ;
242+ // Sync model to store if not already set (e.g., in create mode with default model)
243+ if ( ( isCreateMode || ! editedAgent . model ) && defaultLlmModel ) {
244+ onUpdateProfile ( {
245+ model : defaultLlmModel . displayName || "" ,
246+ model_id : defaultLlmModel . id || 0 ,
247+ } ) ;
248+ }
242249 // We intentionally initialize the form only when switching agent (or when default model becomes available),
243250 // otherwise it can create update loops with Form-controlled fields updating the store.
244251 // eslint-disable-next-line react-hooks/exhaustive-deps
You can’t perform that action at this time.
0 commit comments