fix(resilience): expose providerCooldown in GET+PATCH /api/resilience (#3591)

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-06-10 16:28:24 -03:00
committed by GitHub
parent bf8b56b29f
commit d6f008cdaf
3 changed files with 83 additions and 0 deletions

View File

@@ -1161,6 +1161,14 @@ const waitForCooldownSettingsSchema = z
})
.strict();
const providerCooldownSettingsSchema = z
.object({
enabled: z.boolean().optional(),
minRetryCooldownMs: z.number().int().min(0).max(300000).optional(),
maxRetryCooldownMs: z.number().int().min(0).max(3600000).optional(),
})
.strict();
export const updateResilienceSchema = z
.object({
requestQueue: requestQueueSettingsSchema.optional(),
@@ -1179,6 +1187,7 @@ export const updateResilienceSchema = z
.strict()
.optional(),
waitForCooldown: waitForCooldownSettingsSchema.optional(),
providerCooldown: providerCooldownSettingsSchema.optional(),
profiles: z
.object({
oauth: legacyResilienceProfileSchema.optional(),
@@ -1195,6 +1204,7 @@ export const updateResilienceSchema = z
!value.connectionCooldown &&
!value.providerBreaker &&
!value.waitForCooldown &&
!value.providerCooldown &&
!value.profiles &&
!value.defaults
) {