fix compaction model to deepseek-v4-flash; accept error stop reason in loop

This commit is contained in:
ollie 2026-05-30 10:46:12 +02:00
parent bc7a536ced
commit cb1551fe67
2 changed files with 2 additions and 2 deletions

View File

@ -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",
}

View File

@ -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)