01 -
Preheat oven to 375°F. Grease a medium baking dish with butter or oil.
02 -
Melt unsalted butter with olive oil in a large skillet over medium heat. Add sliced onions and cook, stirring occasionally, until deeply golden and caramelized, about 20 to 25 minutes.
03 -
Stir fresh thyme leaves, salt, and black pepper into the caramelized onions. Add cooked white rice and mix thoroughly to combine.
04 -
Transfer the onion and rice mixture to the prepared baking dish. Pour beef broth evenly over the top.
05 -
Sprinkle shredded Gruyère cheese evenly over the rice mixture. Bake uncovered for 20 to 25 minutes, until the cheese is melted and bubbly.
06 -
Remove from oven, let cool slightly, then serve warm.