3 tablespoons extra-virgin olive oil, plus more for brushing
3 pounds large yellow onions, halved lengthwise and thinly sliced crosswise
2 thyme sprigs
1/4 teaspoon salt
1 tablespoon all-purpose flour
6 cups chicken or beef stock or canned low-sodium broth
Freshly ground black pepper
12 baguette slices
1 1/2 cups shredded Gruyère cheese (6 ounces)
2 tablespoons grated Parmesan cheese
In a large enameled cast-iron casserole, melt the butter in the 3 tablespoons of olive oil. Add the onions, thyme and salt and stir to combine. Cover the onions with a moistened sheet of parchment, pressing it directly on the onions and cover with the lid. Cook over moderately low heat, stirring occasionally, until the liquid is completely evaporated and the onions are very tender and deeply golden, 2 1/2 to 3 hours. Sprinkle the flour over the onions and stir. Add the stock and bring to a simmer. Season with salt and pepper and cook for 10 minutes.
Meanwhile, preheat the oven to 350°. Brush the baguette slices on both sides with olive oil, spread them on a baking sheet and toast for 12 minutes, or until golden and crisp.
Preheat the broiler. Pour the soup into heatproof bowls and set them on a heavy baking sheet. In a small bowl, combine 1 cup of the Gruyère with the Parmesan. Sprinkle the remaining 1/2 cup of Gruyère into the soup and top with the toasted baguettes. Sprinkle the cheese mixture on top and broil 8 inches from the heat for about 2 minutes, or until melted and golden, shifting the pan for even browning. Serve right away.