fix: xai grok

Carlos Alexandro Becker created

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Change summary

cmd/copilot/main.go                     | 5 +++++
internal/providers/configs/copilot.json | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)

Detailed changes

cmd/copilot/main.go 🔗

@@ -173,6 +173,11 @@ func detectReasoningCapabilities(m Model) (canReason bool, levels []string, defa
 		return true, []string{"low", "medium", "high"}, "medium"
 	}
 
+	// Grok models support reasoning without effort levels
+	if strings.HasPrefix(m.ID, "grok") {
+		return true, nil, ""
+	}
+
 	return false, nil, ""
 }
 

internal/providers/configs/copilot.json 🔗

@@ -220,7 +220,7 @@
       "cost_per_1m_out_cached": 0,
       "context_window": 128000,
       "default_max_tokens": 64000,
-      "can_reason": false,
+      "can_reason": true,
       "supports_attachments": false,
       "options": {}
     }