diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx
index 3b6536f75b..627a15627e 100644
--- a/webview-ui/src/components/settings/ApiOptions.tsx
+++ b/webview-ui/src/components/settings/ApiOptions.tsx
@@ -196,12 +196,8 @@ const ApiOptions = ({
apiConfiguration.openRouterModelId in routerModels.openrouter,
})
- // Update `apiModelId` whenever `selectedModelId` changes.
- useEffect(() => {
- if (selectedModelId && apiConfiguration.apiModelId !== selectedModelId) {
- setApiConfigurationField("apiModelId", selectedModelId)
- }
- }, [selectedModelId, setApiConfigurationField, apiConfiguration.apiModelId])
+ // Removed the effect that was causing race condition with user selection
+ // The apiModelId is now properly set directly in the onValueChange callback
// Debounced refresh model updates, only executed 250ms after the user
// stops typing.
@@ -683,7 +679,34 @@ const ApiOptions = ({