In a large pot, melt the butter over medium heat. Add the sliced onions and cook, stirring occasionally, until they are caramelized and golden brown, about 30-40 minutes.
Add the minced garlic and thyme to the pot and cook for an additional 2 minutes until fragrant.
Season the onions with salt and pepper, then pour in the white wine. Bring the mixture to a simmer and let cook for 5 minutes to allow the alcohol to evaporate.
Add the beef broth to the pot and bring to a boil. Reduce the heat to low and let simmer for 30 minutes to allow the flavors to meld together.
Preheat the broiler in your oven. Ladle the soup into oven-safe bowls. Top each bowl with a slice of toasted baguette and a generous amount of grated Gruyere cheese.
Place the bowls under the broiler for 2-3 minutes, or until the cheese is melted and bubbly.
Serve the French onion soup hot and enjoy!