test(provider): format per-model cooldown regression

This commit is contained in:
Alix-007 2026-03-17 21:35:12 +08:00
parent e55208c450
commit 9c55a5a506

View file

@ -241,10 +241,14 @@ func TestFallback_DefaultProviderCooldownSkipsSiblingModel(t *testing.T) {
ct.MarkFailure("litellm", FailoverRateLimit) ct.MarkFailure("litellm", FailoverRateLimit)
_, err := fc.Execute(context.Background(), candidates, func(ctx context.Context, provider, model string) (*LLMResponse, error) { _, err := fc.Execute(
t.Fatal("run should not be called when provider cooldown is shared") context.Background(),
return nil, nil candidates,
}) func(ctx context.Context, provider, model string) (*LLMResponse, error) {
t.Fatal("run should not be called when provider cooldown is shared")
return nil, nil
},
)
if err == nil { if err == nil {
t.Fatal("expected error when all same-provider candidates are skipped") t.Fatal("expected error when all same-provider candidates are skipped")
} }