Heat the olive oil in a wide skillet over medium-high heat and add the mushrooms in an even layer.
Cook without stirring for 4 minutes, then add the onion, thyme, salt and black pepper and cook for 7 to 9 minutes until dry and browned.
Cool the mushroom mixture for 3 minutes so it does not immediately steam the bread.
Build each sandwich with 1 Swiss slice, one-quarter of the mushrooms and a second Swiss slice between 2 sourdough slices.
Butter the exteriors and griddle over medium heat for 3 to 4 minutes per side until the bread is crisp and the cheese melts.
Let the melts stand for 1 minute, then cut them in half.