Skip to content

Commit 059b14e

Browse files
committed
Fix RooCodeInc#2167 where openRouterModelId was returning a non-string value
1 parent 4d95817 commit 059b14e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,8 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
21862186
qwenApiLine,
21872187
mistralApiKey,
21882188
azureApiVersion,
2189-
openRouterModelId,
2189+
// Fixes bug where switching to plan/act would result in setting this model id to previousModeModelId which may have been a non-string value by default, causing a type error in the webview when calling .toLowerCase() on it.
2190+
openRouterModelId: openRouterModelId ? String(openRouterModelId) : undefined,
21902191
openRouterModelInfo,
21912192
openRouterProviderSorting,
21922193
vsCodeLmModelSelector,
@@ -2208,7 +2209,7 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
22082209
chatSettings: chatSettings || DEFAULT_CHAT_SETTINGS,
22092210
userInfo,
22102211
previousModeApiProvider,
2211-
previousModeModelId,
2212+
previousModeModelId: previousModeModelId ? String(previousModeModelId) : undefined,
22122213
previousModeModelInfo,
22132214
previousModeThinkingBudgetTokens,
22142215
mcpMarketplaceEnabled,

0 commit comments

Comments
 (0)