Heat butter and olive oil in a large pot over medium heat.
Add thinly sliced onions, stirring occasionally until golden brown.
Sprinkle sugar for enhanced caramelization, season with salt and pepper.
Pour beef broth into the pot, stirring to combine.
Introduce minced garlic, bay leaves, and a handful of fresh thyme.
For an extra layer of flavor, add red wine if desired.
Allow the soup to simmer on low heat, letting the flavors meld for at least 30 minutes.
Adjust seasoning to taste.
Preheat the broiler.
Ladle the soup into oven-safe bowls.
Float slices of French baguette on the soup surface.
Generously sprinkle Gruyère cheese on top.
Place the bowls under the broiler until the cheese turns golden and bubbly.
Keep an eye to avoid burning.