From 1b44fca8ed803714eaf94d835cb8b0f0a6f40f0b Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 17 Nov 2025 19:15:33 +0000 Subject: [PATCH] fix: add cloudru case to useSelectedModel hook --- webview-ui/src/components/ui/hooks/useSelectedModel.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webview-ui/src/components/ui/hooks/useSelectedModel.ts b/webview-ui/src/components/ui/hooks/useSelectedModel.ts index c2a57942d2..971a354f6b 100644 --- a/webview-ui/src/components/ui/hooks/useSelectedModel.ts +++ b/webview-ui/src/components/ui/hooks/useSelectedModel.ts @@ -26,6 +26,7 @@ import { featherlessModels, ioIntelligenceModels, qwenCodeModels, + cloudRuModels, BEDROCK_1M_CONTEXT_MODEL_IDS, isDynamicProvider, getProviderDefaultModelId, @@ -365,11 +366,16 @@ function getSelectedModel({ const info = routerModels["vercel-ai-gateway"]?.[id] return { id, info } } + case "cloudru": { + const id = apiConfiguration.apiModelId ?? defaultModelId + const info = cloudRuModels[id as keyof typeof cloudRuModels] + return { id, info } + } // case "anthropic": // case "human-relay": // case "fake-ai": default: { - provider satisfies "anthropic" | "gemini-cli" | "qwen-code" | "human-relay" | "fake-ai" + provider satisfies "anthropic" | "gemini-cli" | "human-relay" | "fake-ai" const id = apiConfiguration.apiModelId ?? defaultModelId const baseInfo = anthropicModels[id as keyof typeof anthropicModels]