Preheat your oven to 350°F (175°C) and grease a 9x13 inch baking dish.
In a large skillet, melt butter over medium heat. Add onions, celery, and mushrooms. Cook until vegetables are softened, about 5-7 minutes.
Add garlic and thyme, cooking for another minute until fragrant.
In a large bowl, combine the cooked vegetables with wild rice, chicken, frozen peas, cream of mushroom soup, sour cream, and chicken broth. Mix well.
Season the mixture with salt and pepper to taste.
Transfer everything to your prepared baking dish and spread evenly.
If using almonds, sprinkle them on top.
Bake for 30-35 minutes, or until bubbly and lightly golden on top.
Let stand for 5-10 minutes before serving.