Place the chicken thighs, water, onion, garlic, and ginger in a large pot. Bring to a boil, then reduce to a simmer and cook for 45 minutes until the chicken is tender.
Remove the chicken from the pot and set it aside to cool. Strain the broth and return it to the pot, discarding the solids.
Shred the chicken meat and discard the bones and skin. Add the shredded chicken back to the broth.
Stir in the mushrooms and green beans. Simmer for 8 minutes until the vegetables are tender but the green beans still have some bite.
Remove the pot from the heat. Stir in the fish sauce and lime juice.
Add the Thai basil leaves and sliced chili just before serving.