Caramelize the onions: Melt butter and olive oil in a large pot over medium heat. Add onions and cook, stirring occasionally, for 45-60 minutes, until deeply caramelized.
Deglaze and simmer: Add sherry to the pot and scrape up any browned bits from the bottom. Add beef broth, bay leaf, and thyme. Bring to a simmer and cook for 30 minutes.
Assemble and broil: Preheat broiler. Place toasted baguette slices in oven-safe bowls. Ladle soup over bread. Top with shredded Gruyere cheese.
Broil for 3-5 minutes, or until cheese is melted and bubbly. Let cool for 5 minutes before serving.