From 1e06592b55da7f32c748105947abfac9ab36e60f Mon Sep 17 00:00:00 2001 From: Roo Code Date: Wed, 17 Sep 2025 02:14:50 +0000 Subject: [PATCH] fix: add codex-cli-native case to useSelectedModel hook The provider was missing from the switch statement, causing TypeScript errors. It now reuses the OpenAI Native models as intended. --- 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 f8a005e86a..84a885d254 100644 --- a/webview-ui/src/components/ui/hooks/useSelectedModel.ts +++ b/webview-ui/src/components/ui/hooks/useSelectedModel.ts @@ -348,11 +348,17 @@ function getSelectedModel({ const info = routerModels["vercel-ai-gateway"]?.[id] return { id, info } } + case "codex-cli-native": { + // Codex CLI Native uses the same models as OpenAI Native + const id = apiConfiguration.apiModelId ?? openAiNativeDefaultModelId + const info = openAiNativeModels[id as keyof typeof openAiNativeModels] + 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 ?? anthropicDefaultModelId const baseInfo = anthropicModels[id as keyof typeof anthropicModels]