-
Notifications
You must be signed in to change notification settings - Fork 703
[Go] googlegenai.VertexAI and modelgarden.Anthropic plugins cannot coexist #5002
Copy link
Copy link
Open
Labels
Description
Describe the bug
Registering both googlegenai.VertexAI and vertexai/modelgarden.Anthropic plugins in the same Genkit app panics at startup because both plugins return "vertexai" from Name(), and RegisterPlugin enforces unique names.
This makes it impossible to use Gemini and Vertex Model Garden models together in a single Genkit Go application via Vertex AI.
To Reproduce
package main
import (
"context"
"github.com/firebase/genkit/go/genkit"
"github.com/firebase/genkit/go/plugins/googlegenai"
"github.com/firebase/genkit/go/plugins/vertexai/modelgarden"
)
func main() {
ctx := context.Background()
_ = genkit.Init(ctx,
genkit.WithPlugins(
&googlegenai.VertexAI{
ProjectID: "my-project",
Location: "us-central1",
},
&modelgarden.Anthropic{
ProjectID: "my-project",
Location: "us-central1",
},
),
)
}Error: panic: plugin "vertexai" is already registered
Expected behavior
Both plugins should initialise without conflict.
Runtime:
- OS: macOS
- Version: Darwin 25
Go version:
1.24.6
Genkit version:
- v1.5.0
Fix:
Rename the modelgarden plugin to modelgarden - tested this locally and it works fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status