Skip to content

[Go] googlegenai.VertexAI and modelgarden.Anthropic plugins cannot coexist #5002

@pano-skylakis

Description

@pano-skylakis

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggo

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions