@@ -199,10 +199,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
200 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
200 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
202− // Update the agent with the new model/provider configuration
203− if err := a.app.UpdateAgentModel(context.TODO()); err != nil {
202+ go a.app.UpdateAgentModel(context.TODO())
204− return a, util.ReportError(fmt.Errorf("model changed to %s but failed to update agent: %v", msg.Model.Model, err))
207 modelTypeName := "large"
204 modelTypeName := "large"
208 if msg.ModelType == config.SelectedModelTypeSmall {
205 if msg.ModelType == config.SelectedModelTypeSmall {