The short answer to the question “who is responsible if AI fails,” is whoever owns it. We don’t need to make it more complicated than that.
If someone else contributed to negligence that AI is involved with, they may share in the liability. But tort law is sufficiently evolved to deal with this.
Let’s not confuse the applicability of existing legal doctrines with the complexity of software.