Using a heavy bottomed saucepan, heat the oil and butter over a moderate heat.
Add the onions and cover. Cook over a low heat until tender and translucent, about 10 minutes.
Stir in salt and sugar, raise heat to moderately high and let the onions brown, stirring frequently until they are a golden walnut color, 35 to 40 minutes.
Add flour and cook slowly, stirring, for another 3 to 4 minutes. Remove from heat, let cool a moment, then whisk in 2 cups of hot stock.
When well blended, bring to a simmer, add the rest of the stock, the brandy or Cognac and the vermouth. Add a sprig of fresh thyme.
Cover loosely and simmer very slowly 1 1/2 hours, adding a little more broth if the liquid reduces too much.
Adjust seasoning. At this point taste the broth and decide if it needs any more salt or pepper.
To finish the soup, brush both sides of the bread slices with olive oil, then rub the cut side of a clove of garlic over both sides. Toast under a broiler, flipping until both sides are golden brown.
Ladle soup into oven proof bowls. Preheat broiler.
Float one or two croutons on top of the soup to cover.
Top with grated cheese. Place bowls on a sheet pan.
Place under the broiler, watching carefully, since it will brown fast! Broil until cheese is melted and light golden brown.