fix: show all configured Mistral models and fix model selection priority (#1360)#1418
Open
adityachaudhary99 wants to merge 3 commits into
Open
fix: show all configured Mistral models and fix model selection priority (#1360)#1418adityachaudhary99 wants to merge 3 commits into
adityachaudhary99 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds additional Mistral models to the static gateway and changes how the active provider profile model is persisted to preserve previously configured models.
Changes:
- Expand the Mistral gateway's static model list with six additional models.
- When persisting an active model, concatenate it with existing models (semicolon-separated) instead of replacing, when more than one model was previously configured.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/integrations/gateways/mistral.ts | Adds six new Mistral model entries to the static model list. |
| src/utils/providerProfiles.ts | Changes profile model persistence to preserve multi-model lists by joining IDs with ; . |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+890
to
+896
| const finalModel = | ||
| existingModels.length > 1 | ||
| ? [nextModel, ...existingModels].join('; ') | ||
| : nextModel | ||
| nextProfiles[profileIndex] = { | ||
| ...currentProfile, | ||
| model: nextModel, | ||
| model: finalModel, |
Comment on lines
+887
to
+893
| // Preserve multi-model lists: when switching to a model that isn't | ||
| // already in the list, append rather than replace so the user doesn't | ||
| // lose models they configured during setup (#1360). | ||
| const finalModel = | ||
| existingModels.length > 1 | ||
| ? [nextModel, ...existingModels].join('; ') | ||
| : nextModel |
Comment on lines
+50
to
+55
| { id: 'mistral-devstral', apiName: 'devstral-latest', label: 'Devstral Latest', modelDescriptorId: 'devstral-latest' }, | ||
| { id: 'mistral-large', apiName: 'mistral-large-latest', label: 'Mistral Large Latest', modelDescriptorId: 'mistral-large-latest' }, | ||
| { id: 'mistral-small', apiName: 'mistral-small-latest', label: 'Mistral Small Latest', modelDescriptorId: 'mistral-small-latest' }, | ||
| { id: 'ministral-3b', apiName: 'ministral-3b-latest', label: 'Ministral 3B Latest', modelDescriptorId: 'ministral-3b-latest' }, | ||
| { id: 'open-mixtral-8x7b', apiName: 'open-mixtral-8x7b', label: 'Open Mixtral 8x7B', modelDescriptorId: 'open-mixtral-8x7b' }, | ||
| { id: 'codestral-latest', apiName: 'codestral-latest', label: 'Codestral Latest', modelDescriptorId: 'codestral-latest' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1360
Two bugs prevented Mistral from working properly with multiple configured models:
Bug 1: Model catalog only showed 1 model
The static gateway catalog only listed devstral-latest, hiding the other 6 Mistral models from the picker. Expanded to all 8 models using correct Mistral API names.
Bug 2: Newly selected model never became active
persistActiveProviderProfileModel() appended the selected model to the end of the list, but getPrimaryModel() returns the first model. This meant selecting a new model had no effect - the old model kept being used. Fixed by prepending the selected model so it becomes the primary.
Changes