Heat olive oil in a large pot over medium heat.
Add the sliced onions and cook for 15-20 minutes, stirring frequently, until caramelized.
Stir in minced garlic and cook for another 1-2 minutes until fragrant.
Pour in the broth and bring to a simmer, scraping up any browned bits from the pot.
Add the pasta and thyme, stir well, and cover, simmering for 10-12 minutes until the pasta is al dente.
Stir in the balsamic vinegar and grated Gruyère cheese until melted and creamy.
Season with salt and pepper to taste before serving hot.