Preheat the oven to 180°C.
Cut the onions into wedges and halve the garlic cloves.
Put the tomatoes (with the vine) into a roasting dish, then tuck the onion and garlic pieces between them.
Scatter the dried herbs on top, then drizzle with the oil and the balsamic vinegar. Add the chilli flakes, if used. Season with salt and pepper.
Arrange the chipolatas between the tomatoes, lightly coating them with the dressing.
Bake for 20-25 minutes, until the tomatoes have softened and the sausages are golden. Turn the sausages over at least a couple of times during the baking.
Serve warm.