mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix: Set default model ID in MistralHandler options if not provided
This commit is contained in:
parent
0573643797
commit
b5b6a587de
1 changed files with 7 additions and 1 deletions
|
|
@ -25,7 +25,12 @@ export class MistralHandler implements ApiHandler {
|
|||
throw new Error("Mistral API key is required")
|
||||
}
|
||||
|
||||
this.options = options
|
||||
// Set default model ID if not provided
|
||||
this.options = {
|
||||
...options,
|
||||
apiModelId: options.apiModelId || mistralDefaultModelId,
|
||||
}
|
||||
|
||||
const baseUrl = this.getBaseUrl()
|
||||
console.debug(`[Roo Code] MistralHandler using baseUrl: ${baseUrl}`)
|
||||
this.client = new Mistral({
|
||||
|
|
@ -36,6 +41,7 @@ export class MistralHandler implements ApiHandler {
|
|||
|
||||
private getBaseUrl(): string {
|
||||
const modelId = this.options.apiModelId ?? mistralDefaultModelId
|
||||
console.debug(`[Roo Code] MistralHandler using modelId: ${modelId}`)
|
||||
if (modelId?.startsWith("codestral-")) {
|
||||
return this.options.mistralCodestralUrl || "https://codestral.mistral.ai"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue