Peel the onions, slice them in half, then thinly slice into half moons.
In a large pot, place the butter and olive oil over medium-low heat.
Once the butter is melted, add the onions and cook, stirring occasionally, until softened and deeply golden, around 30-45 minutes. Adjust the heat as needed between medium low and low to keep the onions from burning before they get a chance to caramelize.
Season with salt and pepper.
Stir in the garlic and cook just until fragrant, 30 seconds to 1 minute.
Increase heat to medium-high. Pour in the wine and stir, scraping up the browned bits from the bottom of the pan.
Once the wine has reduced by half, pour in the vegetable broth followed by the bay leaves and thyme.
Season with salt and pepper and bring to a boil. Reduce to a simmer and cook for another 30 minutes, stirring occasionally, to allow the flavors to blend.
Remove the bay leaves and thyme stems.
While the soup is cooking, slice the baguette into 1/2 inch (1.25 centimeter) thick slices and toast until golden.
Divide the soup among broiler safe bowls. Top each with a toasted baguette slice. Cover with large slices of Gruyere cheese.
Place bowls on rimmed baking sheet and broil until the Gruyere is melted and starting to brown.
Serve immediately with the remaining slices of baguette for dipping.