Turn the Instant Pot to ‘Saute’ and let it pre-heat. Add the butter, and once it’s melted, add the onions and shallots. Stir constantly to ensure the onions are coated in butter.
Once the onions are beginning to break down and caramelize (this takes about 10 minutes) add in the red wine, and scrape any fond off the bottom of the pan. Let the wine reduce by half. Turn the Instant Pot off, add in the thyme and bone broth. Be sure to mix this well. Taste for seasoning and add any salt or pepper if needed at this point.
Put the lid back on the Instant Pot, and make sure the vent is sealed. Cook for 20 minutes on high pressure. Once the time is up, release the pressure from the vent. When the pressure is released, taste the soup again for seasoning and adjust if needed.
To serve, turn the oven to broil. Then, taking the sliced bread, lay it on a sheet pan and lightly butter the bread if desired. Place in the oven and keep an eye on it! Turn the bread over once it has toasted on one side, then top with the sliced cheese and put it back in the oven until the cheese is golden brown and bubbling. Serve this on top of the soup!