01 - Preheat oven to 350°F.
02 - In a large skillet over medium heat, melt butter. Add sliced onions, salt, and pepper. Cook, stirring frequently, until onions are soft and golden brown, about 18–22 minutes. Stir in brown sugar and balsamic vinegar if using. Continue cooking 2–3 more minutes, then set aside to cool slightly.
03 - While onions cook, toast pecans in a dry skillet over medium heat for 3–4 minutes, stirring often, until fragrant. Remove from heat and roughly chop.
04 - Remove brie from any outer packaging and place on a parchment-lined baking sheet or in a small ovenproof dish.
05 - Top brie with caramelized onions, then sprinkle toasted pecans and thyme over the top.
06 - Bake brie for 12–15 minutes, until soft and melty but not bursting.
07 - Transfer baked brie to a serving platter. Serve immediately with sliced baguette or crackers.