Problem/Motivation
In MistralConfigForm::submitForm(), the defaultIfNone() method is called with 'anthropic' as the provider ID instead of 'mistral':
$this->aiProviderManager->defaultIfNone('chat', 'anthropic', 'mistral-large-latest');
$this->aiProviderManager->defaultIfNone('embeddings', 'anthropic', 'mistral-embed'); when a user saves the Mistral configuration form and no default provider is set, the system attempts to set Anthropic as the default provider with Mistral model names, which is incorrect.
Steps to reproduce
1. Install Mistral provider module on a fresh site with no default AI providers configured
2. Navigate to /admin/config/ai/providers/mistral
3. Enter an API key and save the form
4. Check the AI settings - the default provider will not be set to Mistral as expected
Proposed resolution
Change the provider ID from 'anthropic' to 'mistral'
Remaining tasks
Fix the provider ID in MistralConfigForm.php
Issue fork ai_provider_mistral-3570585
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
petar_basic commentedFixed error in MistralConfigForm::submitForm() - changed provider ID from 'anthropic' to 'mistral' in both defaultIfNone() calls
Comment #6
fagothx, straight-forward fix - merged!