### Description Calling `messages.pop()` when using `useChat` or any of the providers throws `TypeError: Cannot read property of undefined` when re-submitting the message. ### AI SDK Version - ai: beta25