1. In a large, heavy-bottomed pot, heat oil and melt the butter over low heat.
2. Add onions and slowly caramelize, maintaining moderate heat and regularly stirring, until deeply browned, soft, and very fragrant, about 45 minutes.
3. Add salt, pepper, and thyme and stir. Add two cups of vegetable broth and bring to a boil. Taste and adjust seasoning as necessary.
4. Prepare ravioli according to package directions. Drain. Gently toss with onion sauce and plate. Generously grate the Gruyère cheese over the top.