-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Labels
Description
Describe the bug
The Dev UI doesn't pre-populate model names if using Genkit Go.
To Reproduce
- 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))
}- Start the dev ui with
genkit start -- go run main.go - Look for the models box - it is not visible:
- Navigate to the models page - no model is available to select:
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done