fix: Add Mistral provider configuration and tests (#2200)

- Add Mistral provider to constants.py with API key config
- Add Mistral models to available models list
- Fix env file creation to only write when API keys are provided
- Add tests for Mistral provider setup with and without API key

Fixes #2200

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-22 16:36:25 +00:00
parent 409892d65f
commit dc765e6491
3 changed files with 83 additions and 1 deletions

View File

@@ -5,6 +5,12 @@ ENV_VARS = {
"key_name": "OPENAI_API_KEY",
}
],
"mistral": [
{
"prompt": "Enter your MISTRAL API key (press Enter to skip)",
"key_name": "MISTRAL_API_KEY",
}
],
"anthropic": [
{
"prompt": "Enter your ANTHROPIC API key (press Enter to skip)",
@@ -98,10 +104,17 @@ PROVIDERS = [
"bedrock",
"azure",
"cerebras",
"mistral",
]
MODELS = {
"openai": ["gpt-4", "gpt-4o", "gpt-4o-mini", "o1-mini", "o1-preview"],
"mistral": [
"mistral-tiny",
"mistral-small",
"mistral-medium",
"mistral-large",
],
"anthropic": [
"claude-3-5-sonnet-20240620",
"claude-3-sonnet-20240229",