summaryrefslogtreecommitdiff
path: root/internal/executor/classifier_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 23:44:14 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 23:44:14 +0000
commite5255dcc85c7c4bb0e8838c0064dd545ed0bd830 (patch)
tree4ab9eb814df90ebf6ac8db8a83a3387256e4bff4 /internal/executor/classifier_test.go
parentcfbcc7b921c48fd2eaebcd814b49f3b8a02d7823 (diff)
executor: update gemini model to 2.5-flash-lite and fix classifier parsing
Update the default Gemini model and classification prompt to use gemini-2.5-flash-lite, which is the current available model. Improved the classifier's parsing logic to correctly handle the JSON envelope returned by the gemini CLI (stripping 'response' wrapper and 'Loaded cached credentials' noise).
Diffstat (limited to 'internal/executor/classifier_test.go')
-rw-r--r--internal/executor/classifier_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/executor/classifier_test.go b/internal/executor/classifier_test.go
index 4de44ca..631952f 100644
--- a/internal/executor/classifier_test.go
+++ b/internal/executor/classifier_test.go
@@ -11,7 +11,7 @@ func TestClassifier_Classify_Mock(t *testing.T) {
// Create a temporary mock binary.
mockBinary := filepathJoin(t.TempDir(), "mock-gemini")
mockContent := `#!/bin/sh
-echo '{"agent_type": "gemini", "model": "gemini-2.0-flash", "reason": "test reason"}'
+echo '{"response": "{\"agent_type\": \"gemini\", \"model\": \"gemini-2.5-flash-lite\", \"reason\": \"test reason\"}"}'
`
if err := os.WriteFile(mockBinary, []byte(mockContent), 0755); err != nil {
t.Fatal(err)
@@ -31,8 +31,8 @@ echo '{"agent_type": "gemini", "model": "gemini-2.0-flash", "reason": "test reas
if cls.AgentType != "gemini" {
t.Errorf("expected gemini, got %s", cls.AgentType)
}
- if cls.Model != "gemini-2.0-flash" {
- t.Errorf("expected gemini-2.0-flash, got %s", cls.Model)
+ if cls.Model != "gemini-2.5-flash-lite" {
+ t.Errorf("expected gemini-2.5-flash-lite, got %s", cls.Model)
}
}