Place a large stock pot over medium heat. Add butter to pot. Once it's melted, add in onions and garlic. Stir onions every few minutes, until onions are evenly caramelized. About 30 minutes.
Pour in red wine and let it reduce. About 5 minutes. Dust flour over top of onions and stir to coat. Let the flour absorb the rest of the wine and thicken, another 5 minutes.
Sprinkle the thyme over top and add in the rosemary sprig and bay leaf. Pour in the beef broth and bring to a simmer. Cover and reduce heat, but keep at a gentle simmer for at about 30 minutes, but no more than 60.
Ladle soup into bowls then top with French bread and slices with Gruyere cheese. Place bowls on a baking sheet, then placed the baking sheet on the top rack of the oven and turn broiler on high. Once cheese has melted and browned, about 3-5 minutes, remove from oven and