Put the olive oil and butter in a large pot over medium-low heat. When the butter melts, add the onions, season with salt and pepper, and cook, stirring occasionally, until thick and dark brown, 1 to 3 hours.
Add the wine, raise the heat to medium-high, and cook until the wine evaporates. Add the stock and thyme sprigs, bring to a boil, and simmer for 20 minutes.
Meanwhile, heat the oven (or a toaster oven) to 400°F, or heat a broiler. Sprinkle the cheese evenly over the bread slices, and bake or broil until the cheese is melted and lightly browned, 3 to 5 minutes.
Remove the thyme sprigs from the soup, and discard them. Taste the soup and adjust the seasoning. Ladle the soup into four bowls, top each bowl with a bread slice, and serve.
