Cook the onions. Melt butter with olive oil in a large pot over medium heat. Add onions and sugar, season with salt. Cook, stirring occasionally, for 40–45 minutes until deeply golden and caramelised.
Deglaze. Pour in the wine and scrape up any browned bits. Cook until the wine has mostly evaporated.
Add broth. Pour in the beef broth, add thyme and bay leaf. Bring to a simmer and cook 15 minutes. Discard the bay leaf and adjust seasoning.
Assemble. Ladle soup into oven-safe bowls. Top each with a baguette slice and a generous amount of Gruyère.
Broil for 3–4 minutes until the cheese is bubbly and golden brown. Serve immediately.
Tips
Substitutions & variations
Vegetarian: Use vegetable broth and add a splash of soy sauce for depth.
Cheese swap: Emmental or Comté work well in place of Gruyère.
Slow cooker: Cook onions on low for 8 hours, then continue from step 2 on the stovetop.