In a large pot, melt the butter over medium heat. Add the frozen diced onions and cook, stirring occasionally, until the onions are soft and golden brown, about 15-20 minutes.
Add minced garlic to the pot and sauté for an additional 1-2 minutes.
Pour the wine into the pot to deglaze, scraping any browned bits from the bottom of the pot. Let it simmer for a few minutes.
Pour in the broth, add dried thyme, salt, and pepper to taste. Bring the soup to a simmer and let it cook for another 15-20 minutes to allow the flavors to meld.
Preheat the broiler in your oven.
Toast baguette slices in the oven or toaster until they are lightly browned. Sprinkle shredded Gruyere or Swiss cheese on top of each slice.
Ladle the hot onion soup into oven-safe bowls. Float a slice of the cheesy bread on top of each bowl.
Place the bowls under the broiler for 1-2 minutes, or until the cheese is melted and bubbly. Keep a close eye to avoid burning. Serve hot.