My experience with using AI is that it's a glorified stack overflow copy paster. It'll even glue a handful of SO answers together!
But then you run into classic SO problems... Like the first solution doesn't work. Nor the second one. And the third one introduces a completely different coding style. The last one is implemented in pure sh/GNU utils.
One thing it is absolutely amazing at: digesting things that have bad documentation, like openssl C api. Even then you still gotta be on the watch for hallucinations, and audit it very thoroughly.