Skip to content

Commit 1e06592

Browse files
committed
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.
1 parent ac4b624 commit 1e06592

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webview-ui/src/components/ui/hooks/useSelectedModel.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,17 @@ function getSelectedModel({
348348
const info = routerModels["vercel-ai-gateway"]?.[id]
349349
return { id, info }
350350
}
351+
case "codex-cli-native": {
352+
// Codex CLI Native uses the same models as OpenAI Native
353+
const id = apiConfiguration.apiModelId ?? openAiNativeDefaultModelId
354+
const info = openAiNativeModels[id as keyof typeof openAiNativeModels]
355+
return { id, info }
356+
}
351357
// case "anthropic":
352358
// case "human-relay":
353359
// case "fake-ai":
354360
default: {
355-
provider satisfies "anthropic" | "gemini-cli" | "qwen-code" | "human-relay" | "fake-ai"
361+
provider satisfies "anthropic" | "gemini-cli" | "human-relay" | "fake-ai"
356362
const id = apiConfiguration.apiModelId ?? anthropicDefaultModelId
357363
const baseInfo = anthropicModels[id as keyof typeof anthropicModels]
358364

0 commit comments

Comments
 (0)