In practice even with much better AIs this would still be a pretty big risk. The testing you'd need would be extensive.
[1]: https://jerf.org/iri/post/2026/what_value_code_in_ai_era/
When people rewriting open source libs with a bot then come crying to maintainers that their rewrites have bugs, and they would like for someone to fix said bugs for free, there is absolutely no one who will feel obligated to help them out.