Conversation
Summary of ChangesHello @Ehesp, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands Genkit's deployment flexibility by introducing a new web plugin. This plugin leverages Web Standard APIs to enable Genkit flows to run efficiently across diverse JavaScript environments, from edge functions to serverless platforms and various modern frameworks. It streamlines the process of exposing Genkit functionalities over HTTP, providing robust tools for handling requests, managing context, and supporting durable streaming, thereby broadening Genkit's ecosystem integration capabilities. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'web' plugin for Genkit, enabling compatibility with modern Web Standard APIs (Request/Response). This allows Genkit flows to run on various runtimes like Bun, Deno, and Cloudflare Workers. The implementation is solid and well-integrated with Genkit's core concepts. I have identified a few issues regarding path routing logic, error logging robustness, and cross-runtime compatibility that should be addressed.
|
Sample CI check failing due to the new package not being published (I think!) |
| type RequestData, | ||
| } from 'genkit/context'; | ||
| import { logger } from 'genkit/logging'; | ||
| import { getErrorMessage, getErrorStack } from './utils'; |
There was a problem hiding this comment.
| import { getErrorMessage, getErrorStack } from './utils'; | |
| import { getErrorMessage, getErrorStack } from './utils.js'; |
While Genkit currently supports Express, the modern JavaScript ecosystem is rapidly consolidating around Web Standard APIs (Request, Response, Headers). This PR introduces a new plugin that allows Genkit flows to be exposed via the Fetch API standard, making Genkit natively compatible with virtually every modern JS runtime and framework.
By moving away from Node-specific HTTP abstractions, Genkit can now run seamlessly at the Edge, in Serverless environments, and in high-performance runtimes like Bun and Deno:
Runtimes:
Frameworks:
Usage (e.g. Hono):
This PR also includes a sample
js-hono.Checklist (if applicable):
TODO:
web- might be a bit too generic.