Skip to content

refactor(agent-streaming): Use Genkit beta client library#128

Merged
nohe427 merged 1 commit into
mainfrom
agent-streaming/beta-client
Jun 17, 2026
Merged

refactor(agent-streaming): Use Genkit beta client library#128
nohe427 merged 1 commit into
mainfrom
agent-streaming/beta-client

Conversation

@agduan

@agduan agduan commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Replace Fetch API with Genkit Beta Client library to call Genkit flows

@agduan agduan requested a review from nohe427 June 17, 2026 18:45

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the streaming flow implementation to use the Genkit Beta Client library. On the frontend, manual SSE stream parsing is replaced with the streamFlow helper. On the backend, the /api/chat endpoint is updated to match the expected protocol by accepting data instead of prompt, wrapping chunks in a { message: chunk } structure, and appending the final result. Feedback suggests checking res.writable before writing error details to the response stream to prevent potential unhandled exceptions if the client aborts the connection.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread agent-streaming/src/server/index.ts Outdated
@agduan agduan force-pushed the agent-streaming/beta-client branch from 97cb2f7 to 792fbe1 Compare June 17, 2026 18:54
@nohe427 nohe427 merged commit 28177aa into main Jun 17, 2026
6 checks passed
@agduan agduan deleted the agent-streaming/beta-client branch June 17, 2026 23:39
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.

2 participants