Closed bhodrolok closed 6 days ago
Thanks for the review! Updated code as per your suggestions. There is a small issue where the same display provider is shown to the user even if the requests themselves come from Codestral and Mistral's other models separately.
I suspect it is because of the switch case handling in src/managers/ai-request.manager.ts
, specifically here.
Here is the statement that controls the provider to be displayed.
Thank you very much. I'm going to look at the issue you mentioned.
@bhodrolok Considering the usability of Mistral along with the issues you mentioned, I thought it would be better to divide the CordestralService
and MistralService
. Please understand.
Issue
48
Description
Adds support for Mistral AI's new genAI model, Codestral.
Testing
Manually by staging (adding to the index) multiple files, running the tool, and checking if there was generated commit messages from
codestral.mistral.ai
.Also tested it on other projects by publishing it and using it as outlined in the contributing guide.
Development was done on a machine Windows and looks like some of the automatic test cases would have been skipped because of this (a NodeJS bug apparently).
Additional context
I think the current approach here is a more refactored one, in the sense that the preexisting
MistralService
class is (re)used instead of creating a newCodestralService
. Went with this because the only tangible difference was in the domain where the requests were sent to and the fact that this domain also didn't have aList All Models
endpoint likeapi.mistral.ai
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.