Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/plugins/googlegenai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Genkit automatically discovers available models supported by the [Go GenAI SDK](

Commonly used models include:

- **Gemini Series**: `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-2.5-flash`, `gemini-2.5-pro`
- **Gemini Series**: `gemini-3-flash-preview`, `gemini-2.5-flash`, `gemini-2.5-pro`
- **Imagen Series**: `imagen-3.0-generate-001`
- **Veo Series**: `veo-3.0-generate-001`

Expand Down
2 changes: 1 addition & 1 deletion go/plugins/googlegenai/googleai_live_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func TestGoogleAILive(t *testing.T) {
}
})
t.Run("multipart tool", func(t *testing.T) {
m := googlegenai.GoogleAIModel(g, "gemini-3-pro-preview")
m := googlegenai.GoogleAIModel(g, "gemini-2.5-pro")
img64, err := fetchImgAsBase64()
if err != nil {
t.Fatal(err)
Expand Down
12 changes: 12 additions & 0 deletions go/plugins/googlegenai/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ const (
)

var (
deprecatedGenAIModels = map[string]struct{}{
"gemini-3-pro-preview": {},
}

// eventually, Vertex AI and Google AI models will match, in the meantime,
// keep them sepparated
vertexAIModels = []string{
Expand Down Expand Up @@ -373,6 +377,9 @@ func listGenaiModels(ctx context.Context, client *genai.Client) (genaiModels, er

name := strings.TrimPrefix(item.Name, "publishers/google/")
name = strings.TrimPrefix(name, "models/")
if isDeprecatedGenAIModel(name) {
continue
}

// The Vertex AI backend does not populate SupportedActions,
// so we fall back to name-based categorization.
Expand All @@ -399,3 +406,8 @@ func listGenaiModels(ctx context.Context, client *genai.Client) (genaiModels, er

return models, nil
}

func isDeprecatedGenAIModel(name string) bool {
_, ok := deprecatedGenAIModels[name]
return ok
}
4 changes: 0 additions & 4 deletions go/plugins/vertexai/modelgarden/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ var AnthropicModels = map[string]ai.ModelOptions{
Label: "Claude 3 Sonnet",
Supports: &internal.Multimodal,
},
"claude-3-haiku@20240307": {
Label: "Claude 3 Haiku",
Supports: &internal.Multimodal,
},
"claude-3-opus@20240229": {
Label: "Claude 3 Opus",
Supports: &internal.Multimodal,
Expand Down
2 changes: 1 addition & 1 deletion go/samples/multipart-tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {
// Define a simple flow that uses the multipart tool
genkit.DefineStreamingFlow(g, "cardFlow", func(ctx context.Context, input any, cb ai.ModelStreamCallback) (string, error) {
resp, err := genkit.Generate(ctx, g,
ai.WithModelName("googleai/gemini-3-pro-preview"),
ai.WithModelName("googleai/gemini-2.5-pro"),
ai.WithConfig(&genai.GenerateContentConfig{
Temperature: genai.Ptr[float32](1.0),
ThinkingConfig: &genai.ThinkingConfig{
Expand Down
Loading