Decouple and fix mistral (#595)

* decouple and fix mistral

* fix wrong variable for currentBaseUrl and buildAPIProviderProperties
This commit is contained in:
lunamonke
2026-04-12 08:26:14 +01:00
committed by GitHub
parent b126e38b1a
commit 4c50977f3c
24 changed files with 556 additions and 46 deletions

View File

@@ -250,6 +250,8 @@ export function buildAPIProviderProperties(): Property[] {
openai: 'OpenAI-compatible',
codex: 'Codex',
gemini: 'Google Gemini',
github: 'GitHub Models',
mistral: 'Mistral',
}[apiProvider];
properties.push({
label: 'API provider',
@@ -394,6 +396,21 @@ export function buildAPIProviderProperties(): Property[] {
value: redactSecretValueForDisplay(geminiModel, process.env) ?? geminiModel
});
}
} else if (apiProvider === 'mistral') {
const mistralBaseUrl = process.env.MISTRAL_BASE_URL;
if (mistralBaseUrl) {
properties.push({
label: 'Mistral base URL',
value: redactSecretValueForDisplay(mistralBaseUrl, process.env) ?? mistralBaseUrl
})
}
const mistralModel = process.env.MISTRAL_MODEL;
if (mistralModel) {
properties.push({
label: 'Model',
value: redactSecretValueForDisplay(mistralModel, process.env) ?? mistralModel
})
}
}
const proxyUrl = getProxyUrl();
if (proxyUrl) {