Caramelize the onions: Melt butter and olive oil in a large pot over medium heat. Add onions and cook, stirring occasionally, for 30-40 minutes, until deeply caramelized.
Deglaze and simmer: Add wine to the pot and scrape up any browned bits from the bottom. Add stock, bay leaves, and thyme. Bring to a simmer and cook for 15-20 minutes.
Assemble and broil: Preheat broiler. Place oven-safe bowls on a baking sheet. Ladle soup into bowls. Top with toasted baguette slices and grated Gruyere cheese.
Broil until cheese is melted and bubbly, about 2-3 minutes. Serve immediately.