Skip to content

feat(go): add middleware reference to Genkit Go skill#18

Merged
apascal07 merged 5 commits into
mainfrom
ap/go-skill-middleware
Apr 27, 2026
Merged

feat(go): add middleware reference to Genkit Go skill#18
apascal07 merged 5 commits into
mainfrom
ap/go-skill-middleware

Conversation

@apascal07

@apascal07 apascal07 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds 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-ins shipped in plugins/middleware (Retry, Fallback, ToolApproval, Filesystem, Skills). Reflects the Middleware V2 API from genkit#4464 and the built-ins from genkit#4719.
  • Surfaces the new reference in 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.
  • 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.

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.

@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 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.

Comment thread skills/developing-genkit-go/references/middleware.md Outdated
Comment thread skills/developing-genkit-go/references/middleware.md Outdated
Comment thread skills/developing-genkit-go/references/middleware.md
apascal07 and others added 4 commits April 27, 2026 15:07
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>
@apascal07 apascal07 merged commit 932ed6f into main Apr 27, 2026
2 checks passed
@apascal07 apascal07 deleted the ap/go-skill-middleware branch April 27, 2026 22:14
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