    });
          // Save all provider details in localStorage for this provider
          localStorage.setItem(`providerDetails-${provider}`, JSON.stringify(providerDetails));
          updateAllCommands();
          apiKeyDialog.style.display = 'none';
          highlightElement(document.getElementById('apiKeyValue'));
      });

      languageSelect.addEventListener('change', updateRoutingConfig);

      // Initialize
      updateAllCommands();
      updateRoutingConfig();

      // Close dialogs when cl