fix: Update ApiOptions to handle default model ID for codestral URLs

This commit is contained in:
d.o.it 2025-02-14 17:03:19 +01:00
parent 2fa8dc7291
commit 8842497f20

View file

@ -314,7 +314,6 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage, fromWelcomeView }: A
placeholder="Enter API Key...">
<span style={{ fontWeight: 500 }}>Mistral API Key</span>
</VSCodeTextField>
<p
style={{
fontSize: "12px",
@ -335,7 +334,8 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage, fromWelcomeView }: A
)}
</p>
{apiConfiguration?.apiModelId?.startsWith("codestral-") && (
{(apiConfiguration?.apiModelId?.startsWith("codestral-") ||
(!apiConfiguration?.apiModelId && mistralDefaultModelId.startsWith("codestral-"))) && (
<div>
<VSCodeTextField
value={apiConfiguration?.mistralCodestralUrl || ""}