Turn Instant Pot to sauté mode. Add butter and sauté onions for 15 minutes until they start to brown, stirring occasionally and scraping bits off the bottom.
Add salt & pepper, thyme, and flour, stirring until onions are well coated. Pour in red wine, then sauté for 1-2 minutes until some of the liquid is reduced.
Add beef broth, then place lid on Instant Pot and make sure valve is set to seal. Press the pressure cook button and set to high, then cook for 5 minutes.
Do a quick release of the pressure on the Instant Pot by flicking the switch at the top with a spoon. Open the lid when pressure gauge has dropped and the lid opens easily. Meanwhile, slice baguette, grate cheese, and turn oven to broil on high.
Ladle soup into ramekins or oven-safe bowls, then top with a slice of baguette and sprinkle some cheese overtop. Broil for 2-3 minutes until cheese is melted, watching closely so it doesn't burn. Remove from oven, then serve and enjoy!
Notes
For an extra crispy topping, toast the baguette slices before adding the cheese and broiling. You can also use other cheeses like mozzarella if Gruyère is unavailable.