Skip to content

Commit 19c38a3

Browse files
committed
Add mistralCodestralUrl to global state management in ClineProvider
1 parent 95078a6 commit 19c38a3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/api/providers/mistral.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export class MistralHandler implements ApiHandler {
2323
constructor(options: ApiHandlerOptions) {
2424
this.options = options
2525
const baseUrl = this.getBaseUrl()
26-
console.log("MistralHandler: baseUrl", baseUrl)
26+
// OR Option 2: Using the built-in debug logger
27+
console.debug(`[Roo Code] MistralHandler using baseUrl: ${baseUrl}`)
2728
this.client = new Mistral({
2829
serverURL: baseUrl,
2930
apiKey: this.options.mistralApiKey,

src/core/webview/ClineProvider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ type GlobalStateKey =
127127
| "requestyModelInfo"
128128
| "unboundModelInfo"
129129
| "modelTemperature"
130+
| "mistralCodestralUrl"
130131

131132
export const GlobalFileNames = {
132133
apiConversationHistory: "api_conversation_history.json",
@@ -1631,6 +1632,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
16311632
openRouterUseMiddleOutTransform,
16321633
vsCodeLmModelSelector,
16331634
mistralApiKey,
1635+
mistralCodestralUrl,
16341636
unboundApiKey,
16351637
unboundModelId,
16361638
unboundModelInfo,
@@ -1676,6 +1678,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
16761678
await this.updateGlobalState("openRouterUseMiddleOutTransform", openRouterUseMiddleOutTransform)
16771679
await this.updateGlobalState("vsCodeLmModelSelector", vsCodeLmModelSelector)
16781680
await this.storeSecret("mistralApiKey", mistralApiKey)
1681+
await this.updateGlobalState("mistralCodestralUrl", mistralCodestralUrl)
16791682
await this.storeSecret("unboundApiKey", unboundApiKey)
16801683
await this.updateGlobalState("unboundModelId", unboundModelId)
16811684
await this.updateGlobalState("unboundModelInfo", unboundModelInfo)
@@ -2490,6 +2493,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
24902493
openAiNativeApiKey,
24912494
deepSeekApiKey,
24922495
mistralApiKey,
2496+
mistralCodestralUrl,
24932497
azureApiVersion,
24942498
openAiStreamingEnabled,
24952499
openRouterModelId,
@@ -2570,6 +2574,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
25702574
this.getSecret("openAiNativeApiKey") as Promise<string | undefined>,
25712575
this.getSecret("deepSeekApiKey") as Promise<string | undefined>,
25722576
this.getSecret("mistralApiKey") as Promise<string | undefined>,
2577+
this.getGlobalState("mistralCodestralUrl") as Promise<string | undefined>,
25732578
this.getGlobalState("azureApiVersion") as Promise<string | undefined>,
25742579
this.getGlobalState("openAiStreamingEnabled") as Promise<boolean | undefined>,
25752580
this.getGlobalState("openRouterModelId") as Promise<string | undefined>,
@@ -2667,6 +2672,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
26672672
openAiNativeApiKey,
26682673
deepSeekApiKey,
26692674
mistralApiKey,
2675+
mistralCodestralUrl,
26702676
azureApiVersion,
26712677
openAiStreamingEnabled,
26722678
openRouterModelId,

0 commit comments

Comments
 (0)