Slice the onions evenly. Trim root ends, slice in half pole-to-pole, then cut into thin half-moons.
Aim for uniform slices so they cook at the same rate.
Start the caramelization. In a large heavy pot or Dutch oven, melt butter with olive oil over medium heat. Add onions, salt, pepper, and sugar if using. Cook, stirring every few minutes, until they soften and turn translucent, 10–15 minutes.
Take them deep. Reduce heat to medium-low and keep cooking, stirring often and scraping browned bits from the bottom.
If the pot looks dry, add a splash of water. This can take 35–45 minutes. You’re aiming for a rich, deep-brown color and jammy texture.
Add garlic and flour. Stir in garlic and cook 1 minute.
Sprinkle flour over the onions and cook 1–2 minutes more to remove the raw taste. This helps thicken the broth slightly.
Deglaze with wine. Pour in the wine or sherry. Scrape up any fond from the pot and let it simmer until mostly reduced, 2–3 minutes.
Build the broth. Add beef stock, bay leaf, thyme, and Worcestershire or soy sauce.
Bring to a simmer and cook 20–25 minutes. If it tastes too intense, add 1–2 cups chicken or vegetable stock to balance.
Adjust and finish. Remove bay leaf and thyme stems. Taste and adjust salt and pepper.
Stir in vinegar, starting with 1 teaspoon. The acid should brighten the soup without making it sour.
Toast the bread. While the soup simmers, toast baguette slices under the broiler until crisp and lightly golden on both sides. This helps them hold up in the soup.
Assemble and broil. Ladle hot soup into broiler-safe bowls.
Top each with 1–2 toasts, then a generous mound of Gruyère and a sprinkle of Parmesan. Broil until the cheese is melted, bubbling, and browned in spots, 2–4 minutes. Watch closely.
Serve carefully. Let bowls cool for a minute before serving.
The cheese and broth will be very hot.