Your Users Click "Regenerate". Are You Paying Twice?
typescript
dev.to
A user watches an answer stream in, decides it's going the wrong way, and clicks Regenerate before it finishes. Your app starts a second generation. What happens to the first one? There are three common answers, and they cost very different amounts: 1. You abort the first request, then start the second. 2. You start the second request and forget about the first. 3. You stop reading the first stream, but never cancel it. The first is what most people intend. The second and third are wh