Preheat oven to 325℉.
Peel, halve, and slice onions to a ¼" thickness.
In a large pot, heat olive oil and butter over medium heat.
Add in sliced onions. Stir and cover.
Cook, stirring occasionally, until onions become soft and translucent (about 15 minutes).
Remove cover. Add in sugar and thyme along with 1 tsp of kosher salt.
Increase heat slightly and continue to cook onions, uncovered, until rich golden brown in color (about 30 minutes more). Stir occasionally and scrape up any bits on bottom of pan, as needed.
Stir in flour. Continue cooking until onions are well coated and flour is cooked (about 2 to 3 minutes).
Add in beef stock, wine, Cognac, bay leaf, pepper, and an additional 1 tsp of kosher salt.
Bring to a boil. Then, reduce heat to medium/low and simmer, partially covered, until all of the flavors have melded together (about 35 minutes).
Remove the bay leaf. Taste for seasoning.
Meanwhile, while the soup is simmering, cut baguette into ¾" rounds and place them on an oven rack or baking sheet. Toast rounds in the oven for 15 minutes.
Remove rounds from the oven. Brush each side of rounds with a raw piece of garlic, which has been peeled and halved.
Continue toasting rounds in the oven until they are dry, crisp, and very slightly browned (about 15 minutes more).
Remove rounds from the oven and set aside.
Turn the oven to a high broil.
In a large bowl, mix together Gruyère cheese, Mozzarella cheese, and Parmesan cheese (or whichever combination of cheeses you wish).
In an oven-safe bowl or tureen, ladle in desired amount of soup. Place one or several toasted baguette rounds on top of soup, and cover generously with a handful of the cheese mixture. Repeat for each serving.
Place bowl(s) or tureen(s) on a baking sheet and broil in the oven until the cheese is brown and bubbly (about 5 minutes).
Carefully remove from oven. Serve hot.
