on main help sign in
chore: small fix
042725fKujtim Hoxha
internal/agent/coordinator.go−1
@@ -655,7 +655,6 @@ func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model con
655 headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
655 headers["anthropic-beta"] = "interleaved-thinking-2025-05-14"
656 }
656 }
657 }
657 }
658− slog.Info("Headers", "headers", headers)
659
658
660 // TODO: make sure we have
659 // TODO: make sure we have
661 apiKey, _ := c.cfg.Resolve(providerCfg.APIKey)
660 apiKey, _ := c.cfg.Resolve(providerCfg.APIKey)
internal/tui/page/chat/chat.go+1−6
@@ -543,12 +543,7 @@ func (p *chatPage) toggleThinking() tea.Cmd {
543 }
543 }
544
544
545 // Update the agent with the new configuration
545 // Update the agent with the new configuration
546− if err := p.app.UpdateAgentModel(context.TODO()); err != nil {
546+ go p.app.UpdateAgentModel(context.TODO())
547− return util.InfoMsg{
548− Type: util.InfoTypeError,
549− Msg: "Failed to update thinking mode: " + err.Error(),
550− }
551− }
552
547
553 status := "disabled"
548 status := "disabled"
554 if currentModel.Think {
549 if currentModel.Think {
internal/tui/tui.go+1−4
@@ -199,10 +199,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
199
199
200 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
200 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
201
201
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))
205− }
206
203
207 modelTypeName := "large"
204 modelTypeName := "large"
208 if msg.ModelType == config.SelectedModelTypeSmall {
205 if msg.ModelType == config.SelectedModelTypeSmall {