Prepare the Vegetables: Clean and cut the onion, leeks, and shallots as described. For leeks, remove the dark green parts and cut into pieces.
Caramelize the Onions: In a pan, caramelize the onions with a little butter. Then, do the same with the leeks and shallots.
Make a Roux: In a separate pot, melt butter and add flour to make a roux. Cook until it's a soft roux.
Combine and Cook: Add the caramelized onions, leeks, and shallots to the roux. Then, add chicken or beef stock, sherry, and port wine. Season with salt and pepper.
Simmer: Bring to a boil, then reduce heat and simmer for about 1.5 hours until the onions are soft but not mushy.
Prepare Croutons and Cheese: Place baguette slices on top of the soup, cover with Swiss cheese, and broil until cheese is melted and bubbly.
Serve: Serve the soup in bowls or crocks, topped with the cheesy croutons. Garnish with fresh chives if desired.