In a large soup pot or Dutch oven, melt the butter over medium heat. Add the onions, cover and cook for 30 minutes, stirring occasionally. Remove the cover; increase the heat to medium-high and cook until the onions are brown and caramelized, about 30 minutes. (Stir the onions frequently toward the end of this stage in the cooking so they do not scorch or burn.) Add the thyme and garlic; cook for 2 to 3 minutes more. Pour in the wine and scrape up the browned bits from the bottom of the pan with a wooden spoon; simmer until the wine is reduced by about half. Stir in the broth and 1 teaspoon salt and bring to a gentle simmer. Cover and cook for 30 minutes. Add the cognac if using and season with pepper. (The soup can be made to this point a day ahead and refrigerated.)
Preheat the broiler.
Divide the soup evenly among 6 heatproof crocks or bowls. Top each with 1 or 2 slices of the baguette and about 1/2 cup of the Gruyere. Place the bowls on a rimmed baking sheet and broil until the cheese is bubbly and brown. Carefully transfer each crock to a plate. Serve immediately.
Copyright 2018 Television Food Network, G.P. All rights reserved