@@ -581,7 +581,12 @@ func (p *chatPage) handleReasoningEffortSelected(effort string) tea.Cmd {
581581
582582 // Update the model configuration
583583 currentModel.ReasoningEffort = effort
584− cfg.Models[agentCfg.Model] = currentModel
584+ if err := cfg.UpdatePreferredModel(agentCfg.Model, currentModel); err != nil {
585+ return util.InfoMsg{
586+ Type: util.InfoTypeError,
587+ Msg: "Failed to update reasoning effort: " + err.Error(),
588+ }
589+ }
585590
586591 // Update the agent with the new configuration
587592 if err := p.app.UpdateAgentModel(); err != nil {