Thinly slice the yellow onions into uniform half-moons.
In a large pot, melt the ghee over medium-low heat and add the onions.
Cook the onions slowly for 30-40 minutes, stirring occasionally, until they reach a deep, jammy caramelization.
Deglaze the pot with balsamic vinegar, scraping up any browned bits from the bottom with a wooden spoon.
Pour in the beef bone broth and add the fresh thyme, sea salt, and black pepper.
Bring the soup to a gentle simmer and let the flavors meld for 15 minutes.
Preheat your oven broiler and toast the sourdough slice until crisp.
Ladle the soup into an oven-safe crock, place the toasted bread on top, and cover with the shredded Gruyère cheese.
Broil for 2-3 minutes until the cheese is golden, bubbling, and slightly browned.