Skip to content

Conversation

gvozdevs
Copy link
Contributor

Added support for xAI models

Checklist (if applicable):

@github-actions github-actions bot added docs Improvements or additions to documentation go labels Sep 18, 2025
@gvozdevs
Copy link
Contributor Author

@hugoaguirre review it please

@hugoaguirre
Copy link
Contributor

Hey @gvozdevs, thanks for the contribution. I'll review the changes in a moment.

@hugoaguirre hugoaguirre self-assigned this Sep 19, 2025
@hugoaguirre hugoaguirre changed the title feat(go,plugins,compat_oai) Added xAI support feat(go/plugins/compat_oai): Added xAI support Sep 19, 2025
}

// Initialize Genkit with the xAI plugin
g, err := genkit.Init(ctx,
Copy link
Contributor

Choose a reason for hiding this comment

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

genkit.Init no longer returns an error, it panics if something goes wrong.

@@ -0,0 +1,91 @@
# OpenAI Plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be helpful if we list the supported features of the plugin. Some providers might have limited functionality if their models are being called using the OpenAI API

})

t.Run("invalid config type", func(t *testing.T) {
// Try to use a string as config instead of *ai.GenerationCommonConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be *openai.ChatCompletionNewParams instead of *ai.GenerationCommonConfig

Copy link
Contributor

@hugoaguirre hugoaguirre left a comment

Choose a reason for hiding this comment

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

Overall, it looks good. Could you also add a test for Media content parts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation go
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants