01 - Preheat oven to 350°F. Line a small baking dish with parchment paper if desired.
02 - Melt butter with olive oil in a skillet over medium-low heat. Add the thinly sliced onions and cook for 15 to 20 minutes, stirring frequently, until deeply golden and very soft.
03 - Stir in brown sugar, thyme leaves, salt, and black pepper. Continue cooking for 2 to 3 additional minutes until the onions are fully caramelized and glossy. Remove from heat and set aside.
04 - In a dry skillet over medium heat, toast the pecans for 3 to 5 minutes until fragrant and lightly browned, shaking the pan occasionally. Chop coarsely if desired.
05 - Place the brie wheel in a small oven-safe baking dish. If using puff pastry, lay the thawed pastry sheet flat, place the brie in the center, and proceed to wrapping.
06 - Spoon the caramelized onions evenly over the top of the brie wheel, then scatter the toasted pecans over the onions. For the wrapped version, fold the puff pastry over the toppings, seal the edges, and brush with beaten egg.
07 - Bake the unwrapped brie for 15 to 18 minutes until the cheese is soft and beginning to ooze. If using the pastry-wrapped version, bake for 20 to 25 minutes until the crust is deep golden brown.
08 - Allow the baked brie to rest for 5 minutes before serving. Serve warm alongside crackers or toasted baguette slices.