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.
This commit is contained in:
Roo Code 2025-09-17 02:14:50 +00:00
parent ac4b624bfd
commit 1e06592b55

View file

@ -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]