This commit is contained in:
lpf
2026-02-19 15:40:27 +08:00
parent 75e678061a
commit 15bd337c49
3 changed files with 282 additions and 16 deletions

View File

@@ -277,3 +277,10 @@ func TestShouldRetryWithFallbackModel_AuthUnavailableError(t *testing.T) {
t.Fatalf("expected auth_unavailable error to trigger fallback retry")
}
}
func TestShouldRetryWithFallbackModel_ContextDeadlineExceeded(t *testing.T) {
err := fmt.Errorf("failed to send request: Post \"https://v2.kkkk.dev/v1/chat/completions\": context deadline exceeded")
if !shouldRetryWithFallbackModel(err) {
t.Fatalf("expected context deadline exceeded to trigger fallback retry")
}
}