Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ disable-cooling: false
save-cooldown-status: false

# Cooldown duration in seconds for transient upstream errors (408/500/502/503/504).
# Set to 0 to keep the legacy 60-second cooldown; set to -1 to disable transient error cooldowns.
# Set to 0 to keep the legacy 10-second cooldown; set to -1 to disable transient error cooldowns.
transient-error-cooldown-seconds: 0

# When true, globally disable Claude request cloaking (the Claude Code CLI disguise and
Expand Down
4 changes: 2 additions & 2 deletions sdk/cliproxy/auth/conductor_overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,8 @@ func TestManager_MarkResult_TransientErrorCooldownDefault(t *testing.T) {
t.Fatal("expected transient error cooldown to keep the legacy default")
}
diff := time.Until(state.NextRetryAfter)
if diff < 55*time.Second || diff > 65*time.Second {
t.Fatalf("expected transient error cooldown to be ~60 seconds, got %v", diff)
if diff < 5*time.Second || diff > 15*time.Second {
t.Fatalf("expected transient error cooldown to be ~10 seconds, got %v", diff)
}
}

Expand Down
7 changes: 6 additions & 1 deletion sdk/cliproxy/auth/conductor_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ const (
refreshIneffectiveBackoff = 30 * time.Second
quotaBackoffBase = time.Second
quotaBackoffMax = 30 * time.Minute
transientErrorCooldown = time.Minute
// transientErrorCooldown is the default for 408/500/502/503/504 transient
// errors and the fallback enforced cooldown for request-scoped
// stop-and-cooldown / continue-and-cooldown rules. The latter use this
// constant directly and do not consult the transient-error-cooldown-seconds
// knob.
transientErrorCooldown = 10 * time.Second
)

// StartAutoRefresh launches a background loop that evaluates auth freshness
Expand Down
Loading