In a large pot over low heat, cook the onions in the butter until caramelized, about 1 hour. Deglaze the pot with the white wine and allow the liquid to reduce.
Add the chicken stock, beef stock, thyme, bay leaf, salt, and pepper to the pot and bring to a boil. Lower the heat and simmer for 30 minutes. Taste and adjust the seasoning if necessary.
Pour the soup into serving bowls. Cover each bowl with the toasted bread and top with shredded cheese. Place under the broiler until the cheese is melted and golden brown.