fix compaction model to deepseek-v4-flash; accept error stop reason in loop
This commit is contained in:
parent
bc7a536ced
commit
cb1551fe67
|
|
@ -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",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Reference in New Issue