Repository navigation
fix(py)!: rename .embedding() to .embedder() and drop unused Plugin.model/embedder - #7049
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request renames the embedding method to embedder across the Google GenAI plugin to align with the naming conventions of other reference constructors. Additionally, it removes the model and embedder helper methods from the base Plugin class in the core package to prevent naming collisions with class-level reference constructors, updating the corresponding unit tests to reflect these changes. I have no further feedback to provide as there are no review comments to evaluate.
MichaelDoyle
approved these changes
Nov 4, 2026
…xAI.embedding to .embedder
huangjeff5
force-pushed
the
fix/py-plugin-embedder-ref
branch
from
November 4, 2026 20:13
6f8da62 to
dc7b509
Compare
huangjeff5
enabled stacked auto-merge (squash)
November 4, 2026 20:13
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.
Renames
GoogleAI.embedding()andVertexAI.embedding()to.embedder()(+12 / -41lines insrc/) so plugin ref constructors name theEmbedderRefhandle rather than the vector output, matchingai.embed(embedder=...), JS (googleAI.embedder(...)), and Go (googlegenai.GoogleAIEmbedder(...)). Dropping the unusedPlugin.modelandPlugin.embeddermethods ongenkit.plugin_api.Pluginfrees.embedder()on plugin subclasses without unbound-method collisions.Main Changes
Plugin.modelandPlugin.embedderbase methods: Previously,genkit.plugin_api.Plugincarriedasync def model(self, name)andasync def embedder(self, name)wrappers thatRegistrynever called (it invokesawait plugin.resolve(kind, local)directly). Because Python resolvesSubPlugin.embedder('id')to the unbound base instance method (self='id'), those dead methods blocked plugins from defining@classmethod def embedder(...) -> EmbedderRef. Removing them frees.modeland.embedderfor typed ref constructors across all plugins.GoogleAI.embeddingandVertexAI.embeddingto.embedder: feat(py): typed family ref constructors on GoogleAI and VertexAI #6104 originally picked.embedding()only to avoid shadowingPlugin.embedder, leaving the constructor named after the vector output (Embedding) rather thanEmbedderRef. WithPlugin.embedderremoved, renaming to.embedder()before 1.0 aligns Python withai.embed(embedder=...), JS, and Go.Breaking
GoogleAI.embedding(...)andVertexAI.embedding(...)(added inv0.11.0via feat(py): typed family ref constructors on GoogleAI and VertexAI #6104) are renamed toGoogleAI.embedder(...)andVertexAI.embedder(...).Plugin.model(name)andPlugin.embedder(name)ongenkit.plugin_api.Pluginare removed; callawait plugin.resolve(ActionKind.MODEL, name)orawait plugin.resolve(ActionKind.EMBEDDER, name)when testing a plugin directly.