Skip to content

Conversation

@HassanBahati
Copy link

@HassanBahati HassanBahati commented Sep 23, 2025

Before you submit a pull request, please make sure you have read and understood the contribution guidelines and the code of conduct.

This pull request is related to:

  • A bug
  • A new feature
  • Documentation
  • Other (please specify)

I have checked the following:

  • I have read and understood the contribution guidelines and the code of conduct;
  • I have added new tests (for bug fixes/features);
  • I have added/updated the documentation (for bug fixes / features).

Description:
Please provide a clear and concise description of the changes you are proposing here.

Related issues:
Closes #353

@xavidop xavidop marked this pull request as ready for review September 23, 2025 15:57
@xavidop
Copy link
Collaborator

xavidop commented Sep 23, 2025

you will need to implement the changes see this similar PR: #347

@HassanBahati
Copy link
Author

you will need to implement the changes see this similar PR: #347

Hi @xavidop, definitely! Just started working on this. Will alert when ready.

},
list: async () => {
return Object.keys(SUPPORTED_GROQ_MODELS).map((name) => ({
name: `groq/${name}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the groq/ part?

Copy link
Author

Choose a reason for hiding this comment

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

Well, groq/ was initially being appended to the model name.

The prefix groq/ was added here:
https://github.com/BloomLabsInc/genkit-plugins/pull/9/files#diff-9c9efbee9ae1c4a79760d6d2d0f89c9d46d538f645235c21e3f51f3c4c9e35aeR454-R457

When the initialized Genkit object is logged while using the genkitx-groq package (which has the v1 plugin under the hood), the resulting model name will include this prefix.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's necessary anymore in v2.

Copy link
Author

Choose a reason for hiding this comment

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

alright, removing it shortly

Copy link
Contributor

Choose a reason for hiding this comment

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

@HassanBahati I think we're going for namespace: 'pluginName' and name: 'modelName' instead. So can we apply that here and to your other migrations too.

For example:

{
  name: 'llama3-70b-8192',
  namespace: 'groq'
  ...
}

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @CorieW, i've updated

@@ -97,3 +98,45 @@ describe('toGroqRequestBody', () => {
});
});
});

describe('Groq Plugin', () => {
it('should create plugin with v2 API', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@cabljac thoughts on this test?

Copy link
Contributor

Choose a reason for hiding this comment

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

it's not bad, but tests seem quite minimal. ideally i'd like some integration tests with the core genkit methods

e.g we initialise genkit with the plugin, we mock global fetch, we call ai.generate with groq

@HassanBahati HassanBahati marked this pull request as draft October 21, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: migrate groq plugin to V2 Plugin API

4 participants