Skip to content

fix: show all configured Mistral models and fix model selection priority (#1360)#1418

Open
adityachaudhary99 wants to merge 3 commits into
Gitlawb:mainfrom
adityachaudhary99:fix/mistral-multi-model-1360
Open

fix: show all configured Mistral models and fix model selection priority (#1360)#1418
adityachaudhary99 wants to merge 3 commits into
Gitlawb:mainfrom
adityachaudhary99:fix/mistral-multi-model-1360

Conversation

@adityachaudhary99
Copy link
Copy Markdown

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

  • src/integrations/gateways/mistral.ts: expanded model catalog from 1 to 8 entries with correct Mistral API names
  • src/utils/providerProfiles.ts: changed append to prepend so selected model becomes the active primary

Copilot AI review requested due to automatic review settings May 28, 2026 17:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 thread src/integrations/gateways/mistral.ts Outdated
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' },
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.

Mistral AI (maybe also other) provider only takes default or first model configured

2 participants