Preheat oven to 200°F. Heat oil in a large nonstick skillet over medium-high heat. Add shallot and cook, stirring often, until softened, about 3 minutes. Add mushrooms and thyme; cook, stirring occasionally, until the mushrooms soften and begin to brown, about 10 minutes. Add vinegar; cook, stirring often, until mostly evaporated, about 2 minutes. Transfer the mushroom mixture to a bowl and set aside.
Coat 1 side of each bread slice evenly with butter and set 4 slices aside. Place the remaining 4 slices, coated-sides down, on a cutting board. Top each with 1 slice Swiss cheese, 2 ½ tablespoons mushroom mixture and 2 tablespoons Gruyère. Top with the remaining bread slices, coated-sides up.
Wipe the skillet clean and heat over medium heat. Add 2 sandwiches; cook until the bottom side is crispy and browned, 2 to 3 minutes. Carefully turn the sandwiches over and continue cooking until the cheese has completely melted, about 2 minutes more. (Alternatively, heat a panini press to medium. Place 2 sandwiches on the cooking grates and close the press. Cook until both sides of the sandwiches are browned and crisp and the cheese is melted, about 2 minutes.) Remove from the skillet; keep warm in the oven. Repeat with the remaining sandwiches.