Skip to content

[Dev UI][Go] Dev UI doesn't populate model names from googlegenai plugin #4783

@danicat

Description

@danicat

Describe the bug
The Dev UI doesn't pre-populate model names if using Genkit Go.

To Reproduce

  1. Create a "hello world" flow:
package main

import (
	"context"
	"log"
	"net/http"

	"github.com/firebase/genkit/go/ai"
	"github.com/firebase/genkit/go/genkit"
	"github.com/firebase/genkit/go/plugins/googlegenai"
	"github.com/firebase/genkit/go/plugins/server"
)

func main() {
	ctx := context.Background()

	// Initialize the googlegenai plugin for Vertex AI mode
	g := genkit.Init(ctx,
		genkit.WithPlugins(&googlegenai.VertexAI{
			ProjectID: "my-project-id",
			Location:  "global",
		}),
	)

	// Define the greeter flow
	greeterFlow := genkit.DefineFlow(g, "greeter", func(ctx context.Context, name string) (string, error) {
		text, err := genkit.GenerateText(ctx, g,
			ai.WithModelName("vertexai/gemini-2.5-pro"),
			ai.WithPrompt("Say a warm and creative hello to %s", name),
		)
		if err != nil {
			return "", err
		}

		return text, nil
	})

	// Start a server to serve the flow and keep the app running for the Developer UI
	mux := http.NewServeMux()
	mux.HandleFunc("POST /greeter", genkit.Handler(greeterFlow))

	log.Fatal(server.Start(ctx, "127.0.0.1:3400", mux))
}
  1. Start the dev ui with genkit start -- go run main.go
  2. Look for the models box - it is not visible:
Image
  1. Navigate to the models page - no model is available to select:
Image

Expected behavior
The list of models (actions) from the plugin should be visible in the landing page and on the models section.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: genkit CLI 1.28 / genkit go 1.4.0

Metadata

Metadata

Labels

bugSomething isn't workingtooling

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions