feat(go): add middleware reference to Genkit Go skill#18
Merged
Conversation
Adds a new references/middleware.md covering the ai.Middleware interface, hook stages (WrapGenerate, WrapModel, WrapTool), per-call and plugin-level state patterns, composition order, inline middleware, and the five built-in implementations from plugins/middleware (Retry, Fallback, ToolApproval, Filesystem, Skills). SKILL.md surfaces the new reference in the Core Features table and adds a Key Guidance bullet on preferring built-ins and the per-call/concurrency rules when writing custom middleware. Also fixes the Go module import path across SKILL.md, references/ getting-started.md, and references/providers.md from github.com/genkit-ai/genkit/go to github.com/firebase/genkit/go to match the actual module declared in genkit/go/go.mod.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates Genkit Go import paths to the new Firebase-prefixed repository and introduces a comprehensive reference guide for the Middleware system. The review feedback identifies a naming mismatch in a middleware lookup example, corrects a non-existent model version, and updates the Go version requirement for the os.Root feature.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…/skills into ap/go-skill-middleware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
references/middleware.mdcovering theai.Middlewareinterface, hook stages (WrapGenerate,WrapModel,WrapTool), per-call and plugin-level state patterns, composition order, inline middleware, and the five built-ins shipped inplugins/middleware(Retry,Fallback,ToolApproval,Filesystem,Skills). Reflects the Middleware V2 API from genkit#4464 and the built-ins from genkit#4719.SKILL.md's Core Features table and adds a Key Guidance bullet on preferring built-ins and the per-call / concurrency rules when writing custom middleware.SKILL.md,references/getting-started.md, andreferences/providers.mdfromgithub.com/genkit-ai/genkit/gotogithub.com/firebase/genkit/goto match the actual module declared ingenkit/go/go.mod.