Preheat oven to 350 degrees F. Lightly grease an 8 or 9 inch baking pan or cast iron skillet with non-stick cooking spray.
In a large skillet on medium heat, add olive oil.
When oil is hot, add onions, garlic, and brown sugar.
Reduce heat to medium low and cook, stirring occasionally, until the onions are very soft and caramelized, about 20 minutes.
Once caramelized, add beef broth and bring to a simmer.
Remove from heat and stir in cream cheese, sour cream, salt, pepper, dried thyme and 1/2 cup Gruyere Cheese.
Pour into baking dish and top with remaining cheese.
Bake for 15-20 minutes until cheese has slightly browned and edges are bubbly.
Serve with toasted baguette slices.