Peel and thinly slice the yellow onions into uniform half-moons.
In a large heavy-bottomed pot or Dutch oven, melt the ghee over medium-low heat.
Add the onions to the pot and cook slowly, stirring occasionally, for 25 to 30 minutes until they are deeply caramelized and dark golden brown.
Pour in the balsamic vinegar to deglaze the pot, scraping up any browned bits from the bottom.
Add the beef bone broth, sea salt, black pepper, and fresh thyme leaves.
Bring the soup to a gentle simmer and let the flavors meld for 15 to 20 minutes.
While the soup simmers, lightly toast the sourdough bread slice.
Preheat your oven broiler and ladle the hot soup into a deep, oven-safe ceramic bowl or crock.
Place the toasted sourdough on top of the soup and cover with the shredded Gruyère cheese.
Place the bowl under the broiler for 2 to 3 minutes until the cheese is melted, bubbly, and slightly browned.