- Symptom
- Server always receives the first render value from transport bodyChanging a model or agent selector in the UI has no effect on requestsPassing body as a function still sends the old value
- Cause
- useChat creates its Chat instance once and kept the transport from the first render, so values captured in transport body never updated. The fix landed in July 2026 (PR 16546).
- Fix
- Upgrade @ai-sdk/react to 3.0.223 or later on the ai 6 line, or 4.0.12 or later on the ai 7 line. On ai 5, which has no fix, pass per request data in the sendMessage options instead of the transport.
- Apply
sendMessage({ text: input }, { body: { subagent } });- Affected
- @ai-sdk/react before 3.0.223 (ai 6 line) and before 4.0.12 (ai 7 line); the ai 5 line has no fix
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders