Skip to content

feat(chat): streaming replies with live tool status, retry button, same pipeline as the JSON endpoint - #228

Merged
Kumar2421 merged 5 commits into
mainfrom
feat/assistant-streaming
Oct 23, 2026
Merged

Kumar2421 merged 5 commits into
mainfrom
feat/assistant-streaming

Conversation

@Kumar2421

Copy link
Copy Markdown
Owner

New POST /api/chat/stream (SSE: status/delta/done/error, 10s keepalive, abort on disconnect, maxDuration 60); POST /api/chat JSON stays as the fallback. runAssistantTurnStream reuses runAssistantTurn via optional hooks (no forked pipeline): same candidate plan, fallback (blocked once a delta has streamed), entitlement check, charge-once-after-success; a client abort before a reply charges nothing. Plan-limit denials arrive as an in-stream error event with code chat_limit + used/limit/resetsAt/plan so the unlock panel fires exactly like the JSON path; the stream shares the 12/min per-user limiter with /api/chat and returns a JSON 429 before streaming. Real token streaming only where a driver supports it (no-tools path: any provider; Anthropic/Google context path); the tool path (OpenAI/Groq/Mistral/etc.) shows live tool-status chips then types the finished answer in ~24-char chunks (presentation only, documented). Client: streamChatMessage falls back to JSON only if the stream fails BEFORE the first byte; after that a broken stream is an error event (no silent re-run of a charged turn). Reducer actions stream_start/status/delta/done/retry; MessageBubble tool-status chip (role=status, aria-live polite, motion-reduce safe); 'Try again' button wired to the newest error bubble. 2031 tests pass. Not verified: Vercel SSE buffering and the 60s cap, a real browser, real provider drivers.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

Deployment failed for project okara-alternative with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/kumar2421s-projects?upgradeToPro=build-rate-limit

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-23T12:41:23.169571Z
We couldn’t complete this review. Comment @codex review to try again.
dfba083 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Kumar2421
Kumar2421 merged commit a98bd73 into main Oct 23, 2026
2 of 3 checks passed
@Kumar2421
Kumar2421 deleted the feat/assistant-streaming branch October 23, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant