I took metformin for the first trimester of my pregnancy and then my OBGYN wanted me to stop. My situation is a little difference since my OBGYN was not the one who prescribed me metformin, I was participating in a study for women with PCOS who were trying to get pregnant. So I think my OBGYN wanted me to stop after 12 weeks because she wasn't really familiar with it, I only went to her because she was a doctor that took my insurance and delivered at the hospital I wanted....My regular OB had just moved and changed insurances so I couldn't go back to him like I wanted.
Anyway, there are some ladies who were pregnant around the same time as me with PCOS and their OB's kept them on met their entire pregnancy and some told them to stop after 12 weeks. I think it's all up to the doctors and how they feel about the chances of met helping with women not having miscarriages.
Good luck with your pregnancy and hope you have two happy and healthy little ones.