Thinly slice the yellow onions into uniform half-moons.
Heat the ghee in a large heavy-bottomed pot over medium-low heat.
Add the onions to the pot and cook slowly for 30-40 minutes, stirring occasionally, until they are deeply caramelized and golden brown.
Stir in the balsamic vinegar to deglaze the bottom of the pot, scraping up any flavorful browned bits.
Pour in the beef bone broth and add the fresh thyme sprig.
Season the soup with sea salt and black pepper, then bring to a gentle simmer.
Allow the soup to simmer for 15-20 minutes to develop a deep, complex flavor.
Preheat your oven broiler to high.
Ladle the hot soup into a broiler-safe ceramic crock or bowl.
Place the sourdough slice on top of the soup and cover it evenly with the shredded Gruyere cheese.
Place the crock under the broiler for 2-3 minutes until the cheese is melted, bubbly, and slightly browned.