In a soup pot over medium-low heat, melt butter and add olive oil.
When it begins to bubble, add onions and thyme. Raise heat to medium, stirring occasionally, keeping a close eye on the onions so they don’t scorch. As soon as they begin to brown, after about 15 minutes, reduce heat to medium low and continue to cook, covered, stirring more often, until onions have a rich brown color, about 40 minutes.
Stir in sherry.
Increase heat to high and cook, stirring constantly, until all the sherry has cooked off.
Stir in the prepared broth. Bring to a boil, reduce heat and simmer, partially covered, for 20 minutes. Season with salt and pepper.
Place oven-proof soup bowls or crocks on a baking sheet. Ladle hot soup into soup bowls and top each serving with a slice of French bread. Evenly divide the grated Gruyere cheese over the top of each bowl. Broil or bake at 450 degrees until cheese becomes brown and bubbly. Serve immediately.