From 349e820473254334d24c599938f44d2dc3f32699 Mon Sep 17 00:00:00 2001 From: Youngbin Kim <64558592+youngbinkim0@users.noreply.github.com> Date: Thu, 12 Feb 2026 18:12:38 -0500 Subject: [PATCH] fix(config): allow timeout_seconds to be 0 to disable fallback Previously, the Zod schema rejected timeout_seconds: 0 due to .min(1). Now it accepts 0-integer values to allow disabling timeout-based fallback. - Changed z.number().min(1) to z.number().min(0) - Updated comment to clarify 0 disables timeout checks - All tests pass (44 runtime-fallback + 46 schema tests) - Build successful --- src/config/schema/runtime-fallback.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/schema/runtime-fallback.ts b/src/config/schema/runtime-fallback.ts index 3089d28b..8592de05 100644 --- a/src/config/schema/runtime-fallback.ts +++ b/src/config/schema/runtime-fallback.ts @@ -9,8 +9,8 @@ export const RuntimeFallbackConfigSchema = z.object({ max_fallback_attempts: z.number().min(1).max(20).optional(), /** Cooldown in seconds before retrying a failed model (default: 60) */ cooldown_seconds: z.number().min(0).optional(), - /** Session-level timeout in seconds to advance fallback when provider hangs (default: 30) */ - timeout_seconds: z.number().min(1).optional(), + /** Session-level timeout in seconds to advance fallback when provider hangs (default: 30, 0 to disable) */ + timeout_seconds: z.number().min(0).optional(), /** Show toast notification when switching to fallback model (default: true) */ notify_on_fallback: z.boolean().optional(), })