Decouple and fix mistral (#595)
* decouple and fix mistral * fix wrong variable for currentBaseUrl and buildAPIProviderProperties
This commit is contained in:
@@ -13,9 +13,9 @@ export type ProviderPreset =
|
||||
| 'moonshotai'
|
||||
| 'deepseek'
|
||||
| 'gemini'
|
||||
| 'mistral'
|
||||
| 'together'
|
||||
| 'groq'
|
||||
| 'mistral'
|
||||
| 'azure-openai'
|
||||
| 'openrouter'
|
||||
| 'lmstudio'
|
||||
@@ -163,6 +163,15 @@ export function getProviderPresetDefaults(
|
||||
apiKey: '',
|
||||
requiresApiKey: true,
|
||||
}
|
||||
case 'mistral':
|
||||
return {
|
||||
provider: 'openai',
|
||||
name: 'Mistral',
|
||||
baseUrl: 'https://api.mistral.ai/v1',
|
||||
model: 'devstral-latest',
|
||||
apiKey: '',
|
||||
requiresApiKey: true
|
||||
}
|
||||
case 'together':
|
||||
return {
|
||||
provider: 'openai',
|
||||
@@ -181,15 +190,6 @@ export function getProviderPresetDefaults(
|
||||
apiKey: '',
|
||||
requiresApiKey: true,
|
||||
}
|
||||
case 'mistral':
|
||||
return {
|
||||
provider: 'openai',
|
||||
name: 'Mistral',
|
||||
baseUrl: 'https://api.mistral.ai/v1',
|
||||
model: 'mistral-large-latest',
|
||||
apiKey: '',
|
||||
requiresApiKey: true,
|
||||
}
|
||||
case 'azure-openai':
|
||||
return {
|
||||
provider: 'openai',
|
||||
@@ -258,6 +258,7 @@ function hasProviderSelectionFlags(
|
||||
return (
|
||||
processEnv.CLAUDE_CODE_USE_OPENAI !== undefined ||
|
||||
processEnv.CLAUDE_CODE_USE_GEMINI !== undefined ||
|
||||
processEnv.CLAUDE_CODE_USE_MISTRAL !== undefined ||
|
||||
processEnv.CLAUDE_CODE_USE_GITHUB !== undefined ||
|
||||
processEnv.CLAUDE_CODE_USE_BEDROCK !== undefined ||
|
||||
processEnv.CLAUDE_CODE_USE_VERTEX !== undefined ||
|
||||
@@ -319,6 +320,7 @@ function isProcessEnvAlignedWithProfile(
|
||||
return (
|
||||
processEnv.CLAUDE_CODE_USE_OPENAI !== undefined &&
|
||||
processEnv.CLAUDE_CODE_USE_GEMINI === undefined &&
|
||||
processEnv.CLAUDE_CODE_USE_MISTRAL === undefined &&
|
||||
processEnv.CLAUDE_CODE_USE_GITHUB === undefined &&
|
||||
processEnv.CLAUDE_CODE_USE_BEDROCK === undefined &&
|
||||
processEnv.CLAUDE_CODE_USE_VERTEX === undefined &&
|
||||
@@ -347,6 +349,7 @@ export function clearProviderProfileEnvFromProcessEnv(
|
||||
): void {
|
||||
delete processEnv.CLAUDE_CODE_USE_OPENAI
|
||||
delete processEnv.CLAUDE_CODE_USE_GEMINI
|
||||
delete processEnv.CLAUDE_CODE_USE_MISTRAL
|
||||
delete processEnv.CLAUDE_CODE_USE_GITHUB
|
||||
delete processEnv.CLAUDE_CODE_USE_BEDROCK
|
||||
delete processEnv.CLAUDE_CODE_USE_VERTEX
|
||||
|
||||
Reference in New Issue
Block a user