Stream Chat Post
Changed onStart a new turn and return an AI SDK UI message stream.
Returns an SSE stream (text/event-stream) with Vercel AI SDK chunks (text fragments, tool-call UI, tool results). The generation runs in a background task that survives client disconnects; reconnect via GET /sessions/{session_id}/stream to resume.
Follow-up messages typed while a turn is already running should use POST /sessions/{session_id}/messages/pending. If an older client still posts that follow-up here, we queue it defensively but still return a valid empty UI-message stream so AI SDK transports never receive a JSON body from the stream endpoint.
Args: session_id: The chat session identifier. request: Request body with message, is_user_message, and optional context. user_id: Authenticated user ID.
Request
- The document declares no server URL.
- AuthHTTP bearer
Path parameters
Request body
Response
Successful Response
Changes
- info
added the new optional request property
- info
- info
added the new optional request property
- info