Teff should be gluten free as far as I know, research it a little bit. Buckwheat is gluten free and is allowed on the diet.
Do you have leaky gut (allergies?) If you treat leaky gut, you can gain weight.
If you increase the amount of beneficial bacteria in the gut, this will allow you gain weight because you will have a greater surface area within the gut. Prebiotics and probiotics do this.
We developed a general plan to get better and this should allow you gain weight: