high severityVercel AI SDK (useChat hook)
Streaming abruptly stops midway (e.g., during 5th-12th tool call at tool-input-delta event), no console/server errors, HTTP 200. Next message prompt fails with OpenAI 400 error: \"Item 'rs_...' of type 'reasoning' was provided without its required following item.\" Common in complex React apps with long tool inputs/SQL (>1000 chars).
Root cause
High-volume streaming events from OpenAI (hundreds/thousands, esp. char-by-char tool-input-delta for long inputs) overwhelm React's synchronous re-rendering in useChat hook. Slow re-renders (complex apps with providers, queries) block the JS main thread, causing SSE event backlog, queue timeout, and incomplete stream (leaves dangling 'reasoning' item).
Vercel AI SDKuseChatbackpressurestreamingReact re-renderexperimental_throttleOpenAI tool calls