From 2e37c89310f739b3c0674a12e4a18ccefb3853d9 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Wed, 17 Dec 2025 14:56:25 +0700 Subject: [PATCH] fix: fixes wrong selection in model config dropdown (#80) --- ui/src/components/ServiceConfiguration.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/src/components/ServiceConfiguration.tsx b/ui/src/components/ServiceConfiguration.tsx index d1efc70..87b7901 100644 --- a/ui/src/components/ServiceConfiguration.tsx +++ b/ui/src/components/ServiceConfiguration.tsx @@ -110,9 +110,11 @@ export default function ServiceConfiguration() { setServicePropertyValues("tts"); setServicePropertyValues("stt"); - setServiceProviders(selectedProviders); - + // IMPORTANT: Reset form values BEFORE changing providers + // Otherwise, Radix Select sees old values that don't match new provider's enum + // and calls onValueChange('') to clear "invalid" values reset(defaultValues); + setServiceProviders(selectedProviders); }; fetchConfigurations(); }, [reset, userConfig]); @@ -294,6 +296,9 @@ export default function ServiceConfiguration() {