You are liable until a new tenant is found.
However, the reality is that a court would expect him to show that he has tried to find a new tenant and cannot which is unlikely to succeed.
Usually landlords are given one to two months to achieve this unless a really exceptional circumstance arises.
Therefore your liability would end.
In academic law you are liable until the end of your agreement.
The law requires the landlord to mitigate his loss though by seeking a replacement and he has to show he has made reasonable efforts.
If he cannot then your liability ends.
If does succeed then it ends anyway.
Can I clarify anything for you?
No, not on an AST.
It is as I've said really on the point of liability. If no replacement he has to show he has made reasonable efforts.
All the best.