Skip to content

Commit b5b6a58

Browse files
committed
fix: Set default model ID in MistralHandler options if not provided
1 parent 0573643 commit b5b6a58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/api/providers/mistral.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ export class MistralHandler implements ApiHandler {
2525
throw new Error("Mistral API key is required")
2626
}
2727

28-
this.options = options
28+
// Set default model ID if not provided
29+
this.options = {
30+
...options,
31+
apiModelId: options.apiModelId || mistralDefaultModelId,
32+
}
33+
2934
const baseUrl = this.getBaseUrl()
3035
console.debug(`[Roo Code] MistralHandler using baseUrl: ${baseUrl}`)
3136
this.client = new Mistral({
@@ -36,6 +41,7 @@ export class MistralHandler implements ApiHandler {
3641

3742
private getBaseUrl(): string {
3843
const modelId = this.options.apiModelId ?? mistralDefaultModelId
44+
console.debug(`[Roo Code] MistralHandler using modelId: ${modelId}`)
3945
if (modelId?.startsWith("codestral-")) {
4046
return this.options.mistralCodestralUrl || "https://codestral.mistral.ai"
4147
}

0 commit comments

Comments
 (0)