Put the onion slices in a 5-quart (or larger) slow cooker, along with the butter, olive oil, salt, and black pepper.
Cover the crockpot and cook on low overnight, or for 10-12 hours. The onions should be dark golden brown and soft.
Add the beef broth, balsamic vinegar, and fresh thyme.
Cover and continue cooking on low for 6 to 8 hours.
Season to taste with additional salt and pepper, if desired, and stir in the brandy, if using.
Preheat the oven to 350 degrees Fahrenheit (180 degrees Celcius).
In evenly-portioned amounts, ladle the soup into oven-safe bowls. Place the bowls on a baking sheet to catch any spills while in the oven.
Top each bowl with a baguette slice and the shredded Gruyere.
Bake for 20 to 30 minutes, until the cheese is completely melted.
Turn the oven to broil and brown the tops for 2 to 3 minutes, or until the cheese is bubbling and browned. Remove from the oven and let cool for a few minutes before enjoying!
