Yes, retry, but with backoff, and let the SDK do it. The official SDK already retries 429, 5xx and 529 with exponential backoff (2 retries by default). Bump it:
const client = new Anthropic({ maxRetries: 4, timeout: 60_000 });Mid-stream errors are different: the HTTP response was already a 200, so the SDK can't transparently retry. Handle it yourself: catch the error event, discard the partial text (or show "retrying..."), and start the request again.
Double charging: you pay for tokens that were actually generated. A failed request that produced nothing costs nothing; an interrupted stream costs what it produced. Small either way.
For a nicer UX when it keeps failing, fall back to a smaller model after the retries, a slightly different meal plan beats an error page.