on main help sign in
chore(agent): cleanup logic
7d50e8fChristian Rocha
internal/agent/coordinator.go+1−12
@@ -772,19 +772,8 @@ func (c *coordinator) isAnthropicThinking(model config.SelectedModel) bool {
772 if model.Think {
772 if model.Think {
773 return true
773 return true
774 }
774 }
775−
776− if model.ProviderOptions == nil {
777− return false
778− }
779−
780 opts, err := anthropic.ParseOptions(model.ProviderOptions)
775 opts, err := anthropic.ParseOptions(model.ProviderOptions)
781− if err != nil {
782− return false
783− }
784− if opts.Thinking != nil {
776+ return err == nil && opts.Thinking != nil
785− return true
786− }
787− return false
788}
777}
789
778
790func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model config.SelectedModel, isSubAgent bool) (fantasy.Provider, error) {
779func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model config.SelectedModel, isSubAgent bool) (fantasy.Provider, error) {