From cb1551fe6795238fe0c565f7c7823e58fc576792 Mon Sep 17 00:00:00 2001 From: ollie Date: Sat, 30 May 2026 10:46:12 +0200 Subject: [PATCH] fix compaction model to deepseek-v4-flash; accept error stop reason in loop --- pkg/agent/compaction.go | 2 +- pkg/agent/loop.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/agent/compaction.go b/pkg/agent/compaction.go index 45bf4b4..49446f2 100644 --- a/pkg/agent/compaction.go +++ b/pkg/agent/compaction.go @@ -6,7 +6,7 @@ import "os" var defaultCompactionModels = map[string]string{ "anthropic": "claude-3-5-haiku-latest", "openai": "gpt-4o-mini", - "openrouter": "gpt-4o-mini", + "openrouter": "deepseek-v4-flash", "gemini": "gemini-2.0-flash", } diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 05eda47..f62ec2e 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -228,7 +228,7 @@ func run(ctx context.Context, cfg agentConfig, state state) error { } switch stopReason { - case "stop", "tool_calls", "length", "": + case "stop", "tool_calls", "length", "error", "": // normal default: return fmt.Errorf("step %d: %s", step, stopReason)