Skip to content

feat(go/plugins/vertexai): Add flows for Claude Sonnet 4.6 and Claude Opus 4.6 models in Vertex Model Garden#5031

Open
cabljac wants to merge 2 commits intogenkit-ai:mainfrom
invertase:feat/add-go-claude4.6-models
Open

feat(go/plugins/vertexai): Add flows for Claude Sonnet 4.6 and Claude Opus 4.6 models in Vertex Model Garden#5031
cabljac wants to merge 2 commits intogenkit-ai:mainfrom
invertase:feat/add-go-claude4.6-models

Conversation

@cabljac
Copy link
Copy Markdown
Contributor

@cabljac cabljac commented Mar 31, 2026

Summary

  • Adds Vertex Model Garden model registrations in Go for:

    • claude-sonnet-4-6
    • claude-opus-4-6
  • Updates go/samples/basic/main.go to include explicit demo flows for both new models:

    • claudeSonnet46VertexModelGardenFlow
image
  • claudeOpus46VertexModelGardenFlow

  • Configures Anthropic request options in sample flows (MaxTokens) so Model Garden requests are valid.

Test plan

  • gofmt on changed Go files

  • go test ./plugins/vertexai/modelgarden ./samples/basic/...

  • Verified Dev UI reflection includes:

    • /model/vertexai/claude-sonnet-4-6
    • /model/vertexai/claude-opus-4-6
    • /flow/claudeSonnet46VertexModelGardenFlow
    • /flow/claudeOpus46VertexModelGardenFlow
  • Manual flow execution:

  • Sonnet 4.6 success

Checklist

  • PR title follows Conventional Commits
  • Tested (manual + package tests)
  • Docs updated (not required for this code-only change)

Closes #136
Closes #137

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for Claude Sonnet 4.6 and Claude Opus 4.6 models to the Vertex AI Model Garden plugin and includes sample flows demonstrating their usage. Feedback was provided regarding the naming consistency of the model labels to ensure they align with existing patterns in the codebase.

Comment on lines +72 to +79
"claude-sonnet-4-6": {
Label: "Claude Sonnet 4.6",
Supports: &internal.Multimodal,
},
"claude-opus-4-6": {
Label: "Claude Opus 4.6",
Supports: &internal.Multimodal,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The labels for the new models are inconsistent with the naming convention used for other versioned models in this file (e.g., lines 61, 65, 69). Those follow the pattern Claude [Version] [ModelName] (e.g., Claude 4.5 Sonnet), while these use Claude [ModelName] [Version]. Furthermore, the model IDs claude-sonnet-4-6 and claude-opus-4-6 lack the date suffix (e.g., -YYYYMMDD) present in all other models in this list, which is inconsistent and may cause runtime issues if the Vertex AI endpoint expects a fully qualified versioned ID.

Suggested change
"claude-sonnet-4-6": {
Label: "Claude Sonnet 4.6",
Supports: &internal.Multimodal,
},
"claude-opus-4-6": {
Label: "Claude Opus 4.6",
Supports: &internal.Multimodal,
},
"claude-sonnet-4-6": {
Label: "Claude 4.6 Sonnet",
Supports: &internal.Multimodal,
},
"claude-opus-4-6": {
Label: "Claude 4.6 Opus",
Supports: &internal.Multimodal,
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the model IDs are correct already i believe. the naming could be fixed though

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — updated labels to Claude 4.6 Sonnet and Claude 4.6 Opus to match existing convention.

Comment thread go/samples/basic/main.go
Copy link
Copy Markdown
Collaborator

@apascal07 apascal07 Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put these in a separate sample. The basic- and intermediate- samples are meant to be canonical framework examples, not kitchen sinks. They can be a complete copy if need be, called anthropic-basic or similar.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — moved the Claude 4.6 flows out of go/samples/basic/main.go into go/samples/modelgarden/main.go so basic stays canonical.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure the anthropic plugin is updated too if needed?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked — I think no Anthropic plugin changes were needed for this PR. the required updates were in Vertex Model Garden model registration/sample usage.

@andyma-star andyma-star force-pushed the feat/add-go-claude4.6-models branch from 6d582d4 to beee7c1 Compare April 7, 2026 09:27
@andyma-star andyma-star force-pushed the feat/add-go-claude4.6-models branch from beee7c1 to c52a83a Compare April 7, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error messages when PROJECT ID is missing

3 participants