Preheat oven to 400°F (205°C)
Leave cherry and grape tomatoes whole. Core larger tomatoes and cut them into chunks roughly similar in size to the cherry tomatoes.
Place the tomatoes, onion and garlic in a large bowl. Drizzle with olive oil, splash of balsamic vinegar and sprinkle with salt, pepper, oregano and red pepper flakes, if using. Toss everything together until evenly coated.
Place it all on a parchment lined rimmed baking sheet.
Roast for 40–50 minutes, stirring once after about 30 minutes. The tomatoes should be soft and collapsed, the onion tender, and everything should have some lovely caramelized edges.
Transfer the roasted vegetables and all of the juices from the pan to a saucepan.
Using an immersion blender, blend to your preferred consistency. I like this sauce with a little texture left in it rather than completely smooth.
Simmer uncovered over medium-low heat for 10–20 minutes, stirring occasionally, until the sauce has reduced and thickened to your liking. Garden tomatoes vary quite a bit in how much liquid they contain, so let the sauce rather than the clock tell you when it's ready.
Reduce the heat to low. Stir in the fresh basil, Parmesan and butter. Cook just until the cheese and butter have melted into the sauce.
Taste and adjust the salt and pepper as needed.
Toss with your favourite pasta and finish with a little extra Parmesan and fresh basil.